body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
ae47f37a77f686bf6bf7a5bf4b847d601b8b38ad486c70affb988839e890015d
def is_server_alive(self): 'This method verifies if stdout is broken.' connected = False connection_error = None initial_time = time.time() try: while (not connected): connected = (not self.process.proc.poll()) if ((time.time() - initial_time) > self.MAX_TIMEOUT_TIME)...
This method verifies if stdout is broken.
spyder/plugins/completion/providers/languageserver/transport/stdio/producer.py
is_server_alive
mrclary/spyder
7,956
python
def is_server_alive(self): connected = False connection_error = None initial_time = time.time() try: while (not connected): connected = (not self.process.proc.poll()) if ((time.time() - initial_time) > self.MAX_TIMEOUT_TIME): connection_error = 'Timeo...
def is_server_alive(self): connected = False connection_error = None initial_time = time.time() try: while (not connected): connected = (not self.process.proc.poll()) if ((time.time() - initial_time) > self.MAX_TIMEOUT_TIME): connection_error = 'Timeo...
82c29abd0583abcbe6476740aeefd0d2c827f39358f8a7bfbff9239d12b6643b
def flatten_list(_list): 'Flatten a nested list' return [x for el in _list for x in el]
Flatten a nested list
narrowing_ai_research/utils/list_utils.py
flatten_list
nestauk/narrowing_ai_research
4
python
def flatten_list(_list): return [x for el in _list for x in el]
def flatten_list(_list): return [x for el in _list for x in el]<|docstring|>Flatten a nested list<|endoftext|>
e4b8cc8a70153ef77c8bbde2ad65c410addd50a144b187a024e555264b99172d
def flatten_freq(_list, normalised=False): 'Flatten a nested list and return element frequencies' return pd.Series(flatten_list(_list)).value_counts(normalised)
Flatten a nested list and return element frequencies
narrowing_ai_research/utils/list_utils.py
flatten_freq
nestauk/narrowing_ai_research
4
python
def flatten_freq(_list, normalised=False): return pd.Series(flatten_list(_list)).value_counts(normalised)
def flatten_freq(_list, normalised=False): return pd.Series(flatten_list(_list)).value_counts(normalised)<|docstring|>Flatten a nested list and return element frequencies<|endoftext|>
8f097acf303974a6a4bb02e83a7b7f6f80c0b0878987b88cdf8480d866adda3e
def BeginInvoke(self, sender, e, callback, object): ' BeginInvoke(self: UploadProgressChangedEventHandler,sender: object,e: UploadProgressChangedEventArgs,callback: AsyncCallback,object: object) -> IAsyncResult ' pass
BeginInvoke(self: UploadProgressChangedEventHandler,sender: object,e: UploadProgressChangedEventArgs,callback: AsyncCallback,object: object) -> IAsyncResult
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
BeginInvoke
htlcnn/ironpython-stubs
182
python
def BeginInvoke(self, sender, e, callback, object): ' ' pass
def BeginInvoke(self, sender, e, callback, object): ' ' pass<|docstring|>BeginInvoke(self: UploadProgressChangedEventHandler,sender: object,e: UploadProgressChangedEventArgs,callback: AsyncCallback,object: object) -> IAsyncResult<|endoftext|>
3e781a4d1e341c736a5f9fe72b707fb36972379e1905f3f44f9a1af217bff301
def CombineImpl(self, *args): '\n CombineImpl(self: MulticastDelegate,follow: Delegate) -> Delegate\n\n \n\n Combines this System.Delegate with the specified System.Delegate to form a new delegate.\n\n \n\n follow: The delegate to combine with this delegate.\n\n Returns: A delegate that is the new root of ...
CombineImpl(self: MulticastDelegate,follow: Delegate) -> Delegate Combines this System.Delegate with the specified System.Delegate to form a new delegate. follow: The delegate to combine with this delegate. Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
CombineImpl
htlcnn/ironpython-stubs
182
python
def CombineImpl(self, *args): '\n CombineImpl(self: MulticastDelegate,follow: Delegate) -> Delegate\n\n \n\n Combines this System.Delegate with the specified System.Delegate to form a new delegate.\n\n \n\n follow: The delegate to combine with this delegate.\n\n Returns: A delegate that is the new root of ...
def CombineImpl(self, *args): '\n CombineImpl(self: MulticastDelegate,follow: Delegate) -> Delegate\n\n \n\n Combines this System.Delegate with the specified System.Delegate to form a new delegate.\n\n \n\n follow: The delegate to combine with this delegate.\n\n Returns: A delegate that is the new root of ...
d9d0e2a8d5a2b907cac3ae995d6e7d46f18d95c3e2b12f34b66594dc12dac937
def DynamicInvokeImpl(self, *args): '\n DynamicInvokeImpl(self: Delegate,args: Array[object]) -> object\n\n \n\n Dynamically invokes (late-bound) the method represented by the current delegate.\n\n \n\n args: An array of objects that are the arguments to pass to the method represented by the current \n\n ...
DynamicInvokeImpl(self: Delegate,args: Array[object]) -> object Dynamically invokes (late-bound) the method represented by the current delegate. args: An array of objects that are the arguments to pass to the method represented by the current delegate.-or- null,if the method represented by the current deleg...
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
DynamicInvokeImpl
htlcnn/ironpython-stubs
182
python
def DynamicInvokeImpl(self, *args): '\n DynamicInvokeImpl(self: Delegate,args: Array[object]) -> object\n\n \n\n Dynamically invokes (late-bound) the method represented by the current delegate.\n\n \n\n args: An array of objects that are the arguments to pass to the method represented by the current \n\n ...
def DynamicInvokeImpl(self, *args): '\n DynamicInvokeImpl(self: Delegate,args: Array[object]) -> object\n\n \n\n Dynamically invokes (late-bound) the method represented by the current delegate.\n\n \n\n args: An array of objects that are the arguments to pass to the method represented by the current \n\n ...
cf714ccdac79a630f5c6ba8e25fc3ec9a37c2d968ada52ab559b4f7bbdc2b140
def EndInvoke(self, result): ' EndInvoke(self: UploadProgressChangedEventHandler,result: IAsyncResult) ' pass
EndInvoke(self: UploadProgressChangedEventHandler,result: IAsyncResult)
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
EndInvoke
htlcnn/ironpython-stubs
182
python
def EndInvoke(self, result): ' ' pass
def EndInvoke(self, result): ' ' pass<|docstring|>EndInvoke(self: UploadProgressChangedEventHandler,result: IAsyncResult)<|endoftext|>
75855a6539198420fcad89ba3b6ed1160095fb7feed925bd0e205dd6b28ac406
def GetMethodImpl(self, *args): '\n GetMethodImpl(self: MulticastDelegate) -> MethodInfo\n\n \n\n Returns a static method represented by the current System.MulticastDelegate.\n\n Returns: A static method represented by the current System.MulticastDelegate.\n ' pass
GetMethodImpl(self: MulticastDelegate) -> MethodInfo Returns a static method represented by the current System.MulticastDelegate. Returns: A static method represented by the current System.MulticastDelegate.
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
GetMethodImpl
htlcnn/ironpython-stubs
182
python
def GetMethodImpl(self, *args): '\n GetMethodImpl(self: MulticastDelegate) -> MethodInfo\n\n \n\n Returns a static method represented by the current System.MulticastDelegate.\n\n Returns: A static method represented by the current System.MulticastDelegate.\n ' pass
def GetMethodImpl(self, *args): '\n GetMethodImpl(self: MulticastDelegate) -> MethodInfo\n\n \n\n Returns a static method represented by the current System.MulticastDelegate.\n\n Returns: A static method represented by the current System.MulticastDelegate.\n ' pass<|docstring|>GetMethodImpl(self: Multica...
0aa2e3d70dad5f6817e7b4d19a6ffdf90b56b38dfa1bbc234c37c6332f273e31
def Invoke(self, sender, e): ' Invoke(self: UploadProgressChangedEventHandler,sender: object,e: UploadProgressChangedEventArgs) ' pass
Invoke(self: UploadProgressChangedEventHandler,sender: object,e: UploadProgressChangedEventArgs)
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
Invoke
htlcnn/ironpython-stubs
182
python
def Invoke(self, sender, e): ' ' pass
def Invoke(self, sender, e): ' ' pass<|docstring|>Invoke(self: UploadProgressChangedEventHandler,sender: object,e: UploadProgressChangedEventArgs)<|endoftext|>
4582985d8254d6229bffaf550edd2374b7065c8b751db05d77a1d74356bc66a4
def RemoveImpl(self, *args): '\n RemoveImpl(self: MulticastDelegate,value: Delegate) -> Delegate\n\n \n\n Removes an element from the invocation list of this System.MulticastDelegate that is equal to \n\n the specified delegate.\n\n \n\n \n\n value: The delegate to search for in the invocation list.\n\n ...
RemoveImpl(self: MulticastDelegate,value: Delegate) -> Delegate Removes an element from the invocation list of this System.MulticastDelegate that is equal to the specified delegate. value: The delegate to search for in the invocation list. Returns: If value is found in the invocation list for this insta...
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
RemoveImpl
htlcnn/ironpython-stubs
182
python
def RemoveImpl(self, *args): '\n RemoveImpl(self: MulticastDelegate,value: Delegate) -> Delegate\n\n \n\n Removes an element from the invocation list of this System.MulticastDelegate that is equal to \n\n the specified delegate.\n\n \n\n \n\n value: The delegate to search for in the invocation list.\n\n ...
def RemoveImpl(self, *args): '\n RemoveImpl(self: MulticastDelegate,value: Delegate) -> Delegate\n\n \n\n Removes an element from the invocation list of this System.MulticastDelegate that is equal to \n\n the specified delegate.\n\n \n\n \n\n value: The delegate to search for in the invocation list.\n\n ...
32b5271afcd5ecc37febb67dd854fa2d1b2c4c68b2c41d2ec119d33157e9bbaa
def __init__(self, *args): ' x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature ' pass
x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
__init__
htlcnn/ironpython-stubs
182
python
def __init__(self, *args): ' ' pass
def __init__(self, *args): ' ' pass<|docstring|>x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature<|endoftext|>
4719cf2f65d08466562a373ce4355c7fcebea5f18598a85f57e9716107bb466c
@staticmethod def __new__(self, object, method): ' __new__(cls: type,object: object,method: IntPtr) ' pass
__new__(cls: type,object: object,method: IntPtr)
release/stubs.min/System/Net/__init___parts/UploadProgressChangedEventHandler.py
__new__
htlcnn/ironpython-stubs
182
python
@staticmethod def __new__(self, object, method): ' ' pass
@staticmethod def __new__(self, object, method): ' ' pass<|docstring|>__new__(cls: type,object: object,method: IntPtr)<|endoftext|>
b2f37546a78d1a396e36a834219b7726bafb55cf07e5c867425c2aa80a4343de
def rand_fretboard_position(start=1, end=6): 'return random fretboard position e.g. string: 5, fret 12' while True: print(f'string: {random.randint(start, end):02} fret:{random.randint(0, 12):02}', end='\r') time.sleep(4)
return random fretboard position e.g. string: 5, fret 12
audiotk/guitartk.py
rand_fretboard_position
alexlewzey/audiotk
0
python
def rand_fretboard_position(start=1, end=6): while True: print(f'string: {random.randint(start, end):02} fret:{random.randint(0, 12):02}', end='\r') time.sleep(4)
def rand_fretboard_position(start=1, end=6): while True: print(f'string: {random.randint(start, end):02} fret:{random.randint(0, 12):02}', end='\r') time.sleep(4)<|docstring|>return random fretboard position e.g. string: 5, fret 12<|endoftext|>
35da9e9aac3800650abc807d7e17a2a4ceae56fc0fd5c9e02b7b0af827eafa3b
def rand_note(rest: float=5.0): 'return a random note e.g. A' rand_loop(chromatic, rest)
return a random note e.g. A
audiotk/guitartk.py
rand_note
alexlewzey/audiotk
0
python
def rand_note(rest: float=5.0): rand_loop(chromatic, rest)
def rand_note(rest: float=5.0): rand_loop(chromatic, rest)<|docstring|>return a random note e.g. A<|endoftext|>
f461b278e19f92b051ed6ce48f5bf6b02a3425b3eda2a3dbdba4db810196ab1a
def __len__(self): '\n n columns\n\n :return:\n ' return len(self.kept_trials)
n columns :return:
rotation_analysis/analysis/block.py
__len__
Sepidak/spikeGUI
0
python
def __len__(self): '\n n columns\n\n :return:\n ' return len(self.kept_trials)
def __len__(self): '\n n columns\n\n :return:\n ' return len(self.kept_trials)<|docstring|>n columns :return:<|endoftext|>
12c7451f67a245e2e5f68f2647b39cdcd2ceedd299cded844b85fc86fb46ce73
def remove_trials(self, bad_trials_list): '\n Given a list of trials indices, remove the trials in the list\n ' if (bad_trials_list is not None): for (i, t) in enumerate(self.trials): if (i in bad_trials_list): t.keep = False
Given a list of trials indices, remove the trials in the list
rotation_analysis/analysis/block.py
remove_trials
Sepidak/spikeGUI
0
python
def remove_trials(self, bad_trials_list): '\n \n ' if (bad_trials_list is not None): for (i, t) in enumerate(self.trials): if (i in bad_trials_list): t.keep = False
def remove_trials(self, bad_trials_list): '\n \n ' if (bad_trials_list is not None): for (i, t) in enumerate(self.trials): if (i in bad_trials_list): t.keep = False<|docstring|>Given a list of trials indices, remove the trials in the list<|endoftext|>
24888fd2cb754501d44aa372a1c4117fe0aed0361d80df855278546e8b0e8756
def get_freqs_from_timetable(self, levels_var_name): '\n\n :param str levels_var_name:\n :return:\n ' stim = self.kept_trials[0].stimulus (levels, timetable, cmd, cmd_x) = stim._get_timetable(levels_var_name) gaps = count_discontinuities_in_the_matrix(timetable) if gaps: ...
:param str levels_var_name: :return:
rotation_analysis/analysis/block.py
get_freqs_from_timetable
Sepidak/spikeGUI
0
python
def get_freqs_from_timetable(self, levels_var_name): '\n\n :param str levels_var_name:\n :return:\n ' stim = self.kept_trials[0].stimulus (levels, timetable, cmd, cmd_x) = stim._get_timetable(levels_var_name) gaps = count_discontinuities_in_the_matrix(timetable) if gaps: ...
def get_freqs_from_timetable(self, levels_var_name): '\n\n :param str levels_var_name:\n :return:\n ' stim = self.kept_trials[0].stimulus (levels, timetable, cmd, cmd_x) = stim._get_timetable(levels_var_name) gaps = count_discontinuities_in_the_matrix(timetable) if gaps: ...
6d6204261e93cdd3724a9e76691a9a3f83f40b0ba990031a2923bab5547edcb6
def get_trials_min_max(self): '\n Get the min([min(t) for t in self.analysed_trials])\n And the max([max(t) for t in self.analysed_trials])\n :return:\n ' trials_min = min([min(t) for t in self.kept_traces]) trials_max = max([max(t) for t in self.kept_traces]) return (trials_...
Get the min([min(t) for t in self.analysed_trials]) And the max([max(t) for t in self.analysed_trials]) :return:
rotation_analysis/analysis/block.py
get_trials_min_max
Sepidak/spikeGUI
0
python
def get_trials_min_max(self): '\n Get the min([min(t) for t in self.analysed_trials])\n And the max([max(t) for t in self.analysed_trials])\n :return:\n ' trials_min = min([min(t) for t in self.kept_traces]) trials_max = max([max(t) for t in self.kept_traces]) return (trials_...
def get_trials_min_max(self): '\n Get the min([min(t) for t in self.analysed_trials])\n And the max([max(t) for t in self.analysed_trials])\n :return:\n ' trials_min = min([min(t) for t in self.kept_traces]) trials_max = max([max(t) for t in self.kept_traces]) return (trials_...
f5a46500f418c96cca3cdb3a191694470d62261e3d945b020d87dbd2e868903b
def get_trials_freqs(self, period_name, constraining_period_name=None): '\n Trials based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' return np.array([t.get_frequency(period_name, constraining_period_name) for t in self.kept_trials])
Trials based :param str period_name: :param str constraining_period_name: :return:
rotation_analysis/analysis/block.py
get_trials_freqs
Sepidak/spikeGUI
0
python
def get_trials_freqs(self, period_name, constraining_period_name=None): '\n Trials based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' return np.array([t.get_frequency(period_name, constraining_period_name) for t in self.kept_trials])
def get_trials_freqs(self, period_name, constraining_period_name=None): '\n Trials based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' return np.array([t.get_frequency(period_name, constraining_period_name) for t in self.kept_trials])<|docst...
e6f0205ace0f54d4e21e69a792fc90e1ca2d6668a5cbb54f47af9f4e43ff4d61
def get_average_freq(self, period_name, constraining_period_name=None): '\n Cell based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' freqs = self.get_trials_freqs(period_name, constraining_period_name) return freqs.mean()
Cell based :param str period_name: :param str constraining_period_name: :return:
rotation_analysis/analysis/block.py
get_average_freq
Sepidak/spikeGUI
0
python
def get_average_freq(self, period_name, constraining_period_name=None): '\n Cell based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' freqs = self.get_trials_freqs(period_name, constraining_period_name) return freqs.mean()
def get_average_freq(self, period_name, constraining_period_name=None): '\n Cell based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' freqs = self.get_trials_freqs(period_name, constraining_period_name) return freqs.mean()<|docstring|>Cel...
ca2097c6d47247037e30c32c724ac43c7a11f4530f52f8b6981ecc8ec779f5e3
def get_trials_weighted_amplitudes(self, period_name, constraining_period_name=None): '\n Trials based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' weighted_amplitudes = [t.get_weighted_amplitude(period_name, constraining_period_name) for t...
Trials based :param str period_name: :param str constraining_period_name: :return:
rotation_analysis/analysis/block.py
get_trials_weighted_amplitudes
Sepidak/spikeGUI
0
python
def get_trials_weighted_amplitudes(self, period_name, constraining_period_name=None): '\n Trials based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' weighted_amplitudes = [t.get_weighted_amplitude(period_name, constraining_period_name) for t...
def get_trials_weighted_amplitudes(self, period_name, constraining_period_name=None): '\n Trials based\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' weighted_amplitudes = [t.get_weighted_amplitude(period_name, constraining_period_name) for t...
a60c583435f4b9bd8bf017399ff6bf7d1da0082211a16399071406eb72c21bc3
def get_weighted_average_ampl(self, period_name, constraining_period_name=None): '\n Cell based (all averaged at once)\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' ampls = np.array(self.get_trials_weighted_amplitudes(period_name, constraini...
Cell based (all averaged at once) :param str period_name: :param str constraining_period_name: :return:
rotation_analysis/analysis/block.py
get_weighted_average_ampl
Sepidak/spikeGUI
0
python
def get_weighted_average_ampl(self, period_name, constraining_period_name=None): '\n Cell based (all averaged at once)\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' ampls = np.array(self.get_trials_weighted_amplitudes(period_name, constraini...
def get_weighted_average_ampl(self, period_name, constraining_period_name=None): '\n Cell based (all averaged at once)\n\n :param str period_name:\n :param str constraining_period_name:\n :return:\n ' ampls = np.array(self.get_trials_weighted_amplitudes(period_name, constraini...
ca6bcea588513cef0c9c99389bb680743ecdb9140f552c13ce663994cf01a346
def get_events_integral(self, angle, trial_id): '\n All trials but one angle (because for detection)\n\n :param trial_id:\n :return:\n ' with temp_setattr(self, 'current_condition', {'angle': angle}): integrals = [] trial = self.trials[trial_id] trace = trial....
All trials but one angle (because for detection) :param trial_id: :return:
rotation_analysis/analysis/block.py
get_events_integral
Sepidak/spikeGUI
0
python
def get_events_integral(self, angle, trial_id): '\n All trials but one angle (because for detection)\n\n :param trial_id:\n :return:\n ' with temp_setattr(self, 'current_condition', {'angle': angle}): integrals = [] trial = self.trials[trial_id] trace = trial....
def get_events_integral(self, angle, trial_id): '\n All trials but one angle (because for detection)\n\n :param trial_id:\n :return:\n ' with temp_setattr(self, 'current_condition', {'angle': angle}): integrals = [] trial = self.trials[trial_id] trace = trial....
edb033a185f47833e6b47a3ee8a17249336a580feae235f0bfe4fb0e33fc9eee
def analyse(self, angle, processed=True): '\n All trials but one angle\n\n :param processed:\n :return:\n ' with temp_setattr(self, 'current_condition', {'angle': angle}): self.__reset_detection() for trial in self.kept_trials: trial.detect(self.detection_...
All trials but one angle :param processed: :return:
rotation_analysis/analysis/block.py
analyse
Sepidak/spikeGUI
0
python
def analyse(self, angle, processed=True): '\n All trials but one angle\n\n :param processed:\n :return:\n ' with temp_setattr(self, 'current_condition', {'angle': angle}): self.__reset_detection() for trial in self.kept_trials: trial.detect(self.detection_...
def analyse(self, angle, processed=True): '\n All trials but one angle\n\n :param processed:\n :return:\n ' with temp_setattr(self, 'current_condition', {'angle': angle}): self.__reset_detection() for trial in self.kept_trials: trial.detect(self.detection_...
561018ff247e83b57d7298d0829f265878c6317196ed15ec66ce6496a3b6696f
def save_detection(self, condition, processing_type): '\n Save detected events parameters and detection parameters to 2 csv files\n ' events_params_df = pd.DataFrame() for trial in self.kept_trials: events_params_df = pd.concat([events_params_df, trial.events.to_df(trial.idx)]) des...
Save detected events parameters and detection parameters to 2 csv files
rotation_analysis/analysis/block.py
save_detection
Sepidak/spikeGUI
0
python
def save_detection(self, condition, processing_type): '\n \n ' events_params_df = pd.DataFrame() for trial in self.kept_trials: events_params_df = pd.concat([events_params_df, trial.events.to_df(trial.idx)]) dest_name = '{}_{}_events.csv'.format(self, processing_type) dest_path...
def save_detection(self, condition, processing_type): '\n \n ' events_params_df = pd.DataFrame() for trial in self.kept_trials: events_params_df = pd.concat([events_params_df, trial.events.to_df(trial.idx)]) dest_name = '{}_{}_events.csv'.format(self, processing_type) dest_path...
38a41aa69e407eb0aa2dc609facd1e5f84553320ab62bec1caadce7b7c0205a5
def __reset_detection(self): '\n All trials but one angle\n\n :return:\n ' for trial in self.kept_trials: trial.reset_detection()
All trials but one angle :return:
rotation_analysis/analysis/block.py
__reset_detection
Sepidak/spikeGUI
0
python
def __reset_detection(self): '\n All trials but one angle\n\n :return:\n ' for trial in self.kept_trials: trial.reset_detection()
def __reset_detection(self): '\n All trials but one angle\n\n :return:\n ' for trial in self.kept_trials: trial.reset_detection()<|docstring|>All trials but one angle :return:<|endoftext|>
4d376d67c805f4f84b669adb13121398cae9f12b33c8cf36fde9c732ec0b2777
def save_stats(self, parametric=False): '\n Analyse and compare frequency and amplitude of events for each trial between condition 1 and condition 2\n e.g. baseline vs spinning\n\n :return:\n ' if parametric: stats_func_name = 'paired_t_test' stats_func = paired_t_tes...
Analyse and compare frequency and amplitude of events for each trial between condition 1 and condition 2 e.g. baseline vs spinning :return:
rotation_analysis/analysis/block.py
save_stats
Sepidak/spikeGUI
0
python
def save_stats(self, parametric=False): '\n Analyse and compare frequency and amplitude of events for each trial between condition 1 and condition 2\n e.g. baseline vs spinning\n\n :return:\n ' if parametric: stats_func_name = 'paired_t_test' stats_func = paired_t_tes...
def save_stats(self, parametric=False): '\n Analyse and compare frequency and amplitude of events for each trial between condition 1 and condition 2\n e.g. baseline vs spinning\n\n :return:\n ' if parametric: stats_func_name = 'paired_t_test' stats_func = paired_t_tes...
5044a3132346ec79080cbfc09851031d0a9e62d8e313d5ead4155a8c80344ec8
@property def mime_type(self) -> str: "\n :return: String describing the mime type of this file (based on the filename)\n :note: Defaults to 'text/plain' in case the actual file type is unknown. " guesses = None if self.path: guesses = guess_type(str(self.path)) return ((guesses an...
:return: String describing the mime type of this file (based on the filename) :note: Defaults to 'text/plain' in case the actual file type is unknown.
git/objects/blob.py
mime_type
trym-b/GitPython
3,132
python
@property def mime_type(self) -> str: "\n :return: String describing the mime type of this file (based on the filename)\n :note: Defaults to 'text/plain' in case the actual file type is unknown. " guesses = None if self.path: guesses = guess_type(str(self.path)) return ((guesses an...
@property def mime_type(self) -> str: "\n :return: String describing the mime type of this file (based on the filename)\n :note: Defaults to 'text/plain' in case the actual file type is unknown. " guesses = None if self.path: guesses = guess_type(str(self.path)) return ((guesses an...
76e6dc473fe6a9201de40e8a437ccf3dbef1735643f8de888d65dad9f01ee840
def test_repair_inchi_inchikey_smiles_various_inchi_entered_as_smiles(): 'Test a wider variety of different inchis.' test_inchis = ['1S/C4H11N5.ClH/c1-7-3(5)9-4(6)8-2;/h1-2H3,(H5,5,6,7,8,9);1H', 'InChI=1S/C11H15N3O2.ClH/c1-12-11(15)16-10-6-4-5-9(7-10)13-8-14(2)3;/h4-8H,1-3H3,(H,12,15);1H/b13-8+;', '"InChI=1S/C1...
Test a wider variety of different inchis.
tests/test_repair_inchi_inchikey_smiles.py
test_repair_inchi_inchikey_smiles_various_inchi_entered_as_smiles
janusson/matchms
64
python
def test_repair_inchi_inchikey_smiles_various_inchi_entered_as_smiles(): test_inchis = ['1S/C4H11N5.ClH/c1-7-3(5)9-4(6)8-2;/h1-2H3,(H5,5,6,7,8,9);1H', 'InChI=1S/C11H15N3O2.ClH/c1-12-11(15)16-10-6-4-5-9(7-10)13-8-14(2)3;/h4-8H,1-3H3,(H,12,15);1H/b13-8+;', '"InChI=1S/C17O8/c1-9-7-12(19)14(16(20)21)13(8-9)25-15(1...
def test_repair_inchi_inchikey_smiles_various_inchi_entered_as_smiles(): test_inchis = ['1S/C4H11N5.ClH/c1-7-3(5)9-4(6)8-2;/h1-2H3,(H5,5,6,7,8,9);1H', 'InChI=1S/C11H15N3O2.ClH/c1-12-11(15)16-10-6-4-5-9(7-10)13-8-14(2)3;/h4-8H,1-3H3,(H,12,15);1H/b13-8+;', '"InChI=1S/C17O8/c1-9-7-12(19)14(16(20)21)13(8-9)25-15(1...
e07a65bc28281c6fa69c90a8320f316ece671b680b0dbe00d2a82b4805ac31d7
def main(): 'Main function' optmgr = OptionParser() opts = optmgr.parser.parse_args() dates = opts.dates.split('-') idates = [int(d) for d in dates] pdates = [d for d in range(idates[0], idates[(- 1)])] makeCSV(opts.idir, pdates)
Main function
src/python/CMSSpark/getCSV.py
main
leggerf/CMSSpark
5
python
def main(): optmgr = OptionParser() opts = optmgr.parser.parse_args() dates = opts.dates.split('-') idates = [int(d) for d in dates] pdates = [d for d in range(idates[0], idates[(- 1)])] makeCSV(opts.idir, pdates)
def main(): optmgr = OptionParser() opts = optmgr.parser.parse_args() dates = opts.dates.split('-') idates = [int(d) for d in dates] pdates = [d for d in range(idates[0], idates[(- 1)])] makeCSV(opts.idir, pdates)<|docstring|>Main function<|endoftext|>
40f7b26c69fae09931d5ca1deab349e7964594365f6d24eac09c47a5c7c0adf9
def __init__(self): 'User based option parser' self.parser = argparse.ArgumentParser(prog='PROG') self.parser.add_argument('--idir', action='store', dest='idir', default='', help='Input data path') self.parser.add_argument('--dates', action='store', dest='dates', default='', help='dates or dates-rante t...
User based option parser
src/python/CMSSpark/getCSV.py
__init__
leggerf/CMSSpark
5
python
def __init__(self): self.parser = argparse.ArgumentParser(prog='PROG') self.parser.add_argument('--idir', action='store', dest='idir', default=, help='Input data path') self.parser.add_argument('--dates', action='store', dest='dates', default=, help='dates or dates-rante to read, e.g. YYYYMMDD-YYYYMMDD...
def __init__(self): self.parser = argparse.ArgumentParser(prog='PROG') self.parser.add_argument('--idir', action='store', dest='idir', default=, help='Input data path') self.parser.add_argument('--dates', action='store', dest='dates', default=, help='dates or dates-rante to read, e.g. YYYYMMDD-YYYYMMDD...
cd3dfb64607735f7c2dcbaae14dcffafcceba9470651ff83326b4e4802c3610e
@parse_command([('hash', 1)], launch_invalid=False) def admin_command_ipfs_pin(self, msg, args): 'Pins an IPFS object.\n\n Syntax: ipfs_pin HASH\n ' try: j = self.api_get('pin/add', *args.hash) if (args.hash[0] in j.get('Pinned', [])): self.respond(msg, ('Pinned %s!' % ...
Pins an IPFS object. Syntax: ipfs_pin HASH
botnet/modules/builtin/ipfs.py
admin_command_ipfs_pin
fadybinadnan/BOTNet-2017.4-
1
python
@parse_command([('hash', 1)], launch_invalid=False) def admin_command_ipfs_pin(self, msg, args): 'Pins an IPFS object.\n\n Syntax: ipfs_pin HASH\n ' try: j = self.api_get('pin/add', *args.hash) if (args.hash[0] in j.get('Pinned', [])): self.respond(msg, ('Pinned %s!' % ...
@parse_command([('hash', 1)], launch_invalid=False) def admin_command_ipfs_pin(self, msg, args): 'Pins an IPFS object.\n\n Syntax: ipfs_pin HASH\n ' try: j = self.api_get('pin/add', *args.hash) if (args.hash[0] in j.get('Pinned', [])): self.respond(msg, ('Pinned %s!' % ...
7603e96de62361fe1e8f2f186e6acb32092c69408e3625de49759f6a999071e9
@parse_command([('hash', 1)], launch_invalid=False) def admin_command_ipfs_unpin(self, msg, args): 'Unpins an IPFS object.\n\n Syntax: ipfs_unpin HASH\n ' try: j = self.api_get('pin/rm', *args.hash) self.respond(msg, ('Unpinned %s!' % args.hash[0])) except Exception as e: ...
Unpins an IPFS object. Syntax: ipfs_unpin HASH
botnet/modules/builtin/ipfs.py
admin_command_ipfs_unpin
fadybinadnan/BOTNet-2017.4-
1
python
@parse_command([('hash', 1)], launch_invalid=False) def admin_command_ipfs_unpin(self, msg, args): 'Unpins an IPFS object.\n\n Syntax: ipfs_unpin HASH\n ' try: j = self.api_get('pin/rm', *args.hash) self.respond(msg, ('Unpinned %s!' % args.hash[0])) except Exception as e: ...
@parse_command([('hash', 1)], launch_invalid=False) def admin_command_ipfs_unpin(self, msg, args): 'Unpins an IPFS object.\n\n Syntax: ipfs_unpin HASH\n ' try: j = self.api_get('pin/rm', *args.hash) self.respond(msg, ('Unpinned %s!' % args.hash[0])) except Exception as e: ...
38ab50993745325a0a09cc104f92da531cb2311eb5fd8f42041d4dc3313838ae
def __init__(self, ti_type, ti_field=None, optional_fields=None, required_fields=None): 'Initialize Class Properties' self.ti_type = ti_type self.ti_field = ti_field self.optional_fields = (optional_fields or {}) self.required_fields = (required_fields or {}) self.app = MockApp(runtime_level='Pl...
Initialize Class Properties
tests/threat_intelligence/ti_helpers.py
__init__
kdeltared/tcex
18
python
def __init__(self, ti_type, ti_field=None, optional_fields=None, required_fields=None): self.ti_type = ti_type self.ti_field = ti_field self.optional_fields = (optional_fields or {}) self.required_fields = (required_fields or {}) self.app = MockApp(runtime_level='Playbook') self.tcex = self...
def __init__(self, ti_type, ti_field=None, optional_fields=None, required_fields=None): self.ti_type = ti_type self.ti_field = ti_field self.optional_fields = (optional_fields or {}) self.required_fields = (required_fields or {}) self.app = MockApp(runtime_level='Playbook') self.tcex = self...
8376cfe888a1221fd4d5884f13e93581d50d9b68d03cfc37cd9aea855447bfe6
def _add_fields(self, group_data): 'Add any required or optional fields to the request body.' for (k, v) in self.required_fields.items(): group_data[k] = v for (k, v) in self.optional_fields.items(): group_data[k] = v
Add any required or optional fields to the request body.
tests/threat_intelligence/ti_helpers.py
_add_fields
kdeltared/tcex
18
python
def _add_fields(self, group_data): for (k, v) in self.required_fields.items(): group_data[k] = v for (k, v) in self.optional_fields.items(): group_data[k] = v
def _add_fields(self, group_data): for (k, v) in self.required_fields.items(): group_data[k] = v for (k, v) in self.optional_fields.items(): group_data[k] = v<|docstring|>Add any required or optional fields to the request body.<|endoftext|>
74aa866809fe325489f73cbae7b91332cebeb256d3508755895aec40c6d84206
@property def indicator_value(self): 'Return a proper indicator value for the current indicator type.' return self.im.get(self.ti_type)()
Return a proper indicator value for the current indicator type.
tests/threat_intelligence/ti_helpers.py
indicator_value
kdeltared/tcex
18
python
@property def indicator_value(self): return self.im.get(self.ti_type)()
@property def indicator_value(self): return self.im.get(self.ti_type)()<|docstring|>Return a proper indicator value for the current indicator type.<|endoftext|>
724dbf54540c860addfd2f4f27496d78ea61f48e12367993ff36794ca5ed220a
@staticmethod def rand_asn(): 'Return a random ASN.' return f'ASN{randint(1000, 9999)}'
Return a random ASN.
tests/threat_intelligence/ti_helpers.py
rand_asn
kdeltared/tcex
18
python
@staticmethod def rand_asn(): return f'ASN{randint(1000, 9999)}'
@staticmethod def rand_asn(): return f'ASN{randint(1000, 9999)}'<|docstring|>Return a random ASN.<|endoftext|>
b7d0ab5ca9e8fc9c35a78bde53f2369a777a70af1178f87d9a87ab29971eb9c1
@staticmethod def rand_cidr(): 'Return a random CIDR block.' return f'{randint(0, 255)}.{randint(0, 255)}.{randint(0, 255)}.0/{randint(16, 24)}'
Return a random CIDR block.
tests/threat_intelligence/ti_helpers.py
rand_cidr
kdeltared/tcex
18
python
@staticmethod def rand_cidr(): return f'{randint(0, 255)}.{randint(0, 255)}.{randint(0, 255)}.0/{randint(16, 24)}'
@staticmethod def rand_cidr(): return f'{randint(0, 255)}.{randint(0, 255)}.{randint(0, 255)}.0/{randint(16, 24)}'<|docstring|>Return a random CIDR block.<|endoftext|>
94790436a08dc329993c787fdec51c283b0e935ecade8a43fa5b346c66603d31
def rand_email_address(self): 'Return a random email subject.' return f'{self.tcex.utils.random_string(randint(5, 15))}@{self.tcex.utils.random_string(randint(5, 15))}.com'.lower()
Return a random email subject.
tests/threat_intelligence/ti_helpers.py
rand_email_address
kdeltared/tcex
18
python
def rand_email_address(self): return f'{self.tcex.utils.random_string(randint(5, 15))}@{self.tcex.utils.random_string(randint(5, 15))}.com'.lower()
def rand_email_address(self): return f'{self.tcex.utils.random_string(randint(5, 15))}@{self.tcex.utils.random_string(randint(5, 15))}.com'.lower()<|docstring|>Return a random email subject.<|endoftext|>
ada805b76e33075e7bac7fd1023329f8f80a4f55c536a4dea6a52c2b4907125e
def rand_email_subject(self): 'Return a random email subject.' return f'{self.tcex.utils.random_string(randint(5, 15))} {self.tcex.utils.random_string(randint(5, 15))} {self.tcex.utils.random_string(randint(5, 15))}'
Return a random email subject.
tests/threat_intelligence/ti_helpers.py
rand_email_subject
kdeltared/tcex
18
python
def rand_email_subject(self): return f'{self.tcex.utils.random_string(randint(5, 15))} {self.tcex.utils.random_string(randint(5, 15))} {self.tcex.utils.random_string(randint(5, 15))}'
def rand_email_subject(self): return f'{self.tcex.utils.random_string(randint(5, 15))} {self.tcex.utils.random_string(randint(5, 15))} {self.tcex.utils.random_string(randint(5, 15))}'<|docstring|>Return a random email subject.<|endoftext|>
8c927f43aaf51b4235c0ceede50b5c5d83d5a327c6c406c8d15bd820903cb967
def rand_filename(self): 'Return a random hashtag.' return f'{self.tcex.utils.random_string(randint(5, 15))}.pdf'.lower()
Return a random hashtag.
tests/threat_intelligence/ti_helpers.py
rand_filename
kdeltared/tcex
18
python
def rand_filename(self): return f'{self.tcex.utils.random_string(randint(5, 15))}.pdf'.lower()
def rand_filename(self): return f'{self.tcex.utils.random_string(randint(5, 15))}.pdf'.lower()<|docstring|>Return a random hashtag.<|endoftext|>
26cf238329044f3f2ab9e5a6128534b97b60d702b577b56e15be0dc2f9df4897
def rand_hashtag(self): 'Return a random hashtag.' return f'#{self.tcex.utils.random_string(randint(5, 15))}'.lower()
Return a random hashtag.
tests/threat_intelligence/ti_helpers.py
rand_hashtag
kdeltared/tcex
18
python
def rand_hashtag(self): return f'#{self.tcex.utils.random_string(randint(5, 15))}'.lower()
def rand_hashtag(self): return f'#{self.tcex.utils.random_string(randint(5, 15))}'.lower()<|docstring|>Return a random hashtag.<|endoftext|>
b73672f44cd68708c4f6b2852eee1d236680ed69602de1c9461f952542133c4f
def rand_host(self): 'Return a random hashtag.' return f'{self.tcex.utils.random_string(randint(5, 15))}.com'.lower()
Return a random hashtag.
tests/threat_intelligence/ti_helpers.py
rand_host
kdeltared/tcex
18
python
def rand_host(self): return f'{self.tcex.utils.random_string(randint(5, 15))}.com'.lower()
def rand_host(self): return f'{self.tcex.utils.random_string(randint(5, 15))}.com'.lower()<|docstring|>Return a random hashtag.<|endoftext|>
42053df20aa442e8c8bdaa0346bc4ce09c916aa5758412e3f2ffbed133541aa8
@staticmethod def rand_ip(): 'Return a random IP address.' return f'222.{randint(0, 255)}.{randint(0, 255)}.{randint(0, 255)}'
Return a random IP address.
tests/threat_intelligence/ti_helpers.py
rand_ip
kdeltared/tcex
18
python
@staticmethod def rand_ip(): return f'222.{randint(0, 255)}.{randint(0, 255)}.{randint(0, 255)}'
@staticmethod def rand_ip(): return f'222.{randint(0, 255)}.{randint(0, 255)}.{randint(0, 255)}'<|docstring|>Return a random IP address.<|endoftext|>
5f1850eeac3e90fb90ebe6607fb99272f1b5c63318530da693583a6f56544811
@staticmethod def rand_md5(): 'Return a random md5.' return f'{uuid.uuid4().hex.upper()}'
Return a random md5.
tests/threat_intelligence/ti_helpers.py
rand_md5
kdeltared/tcex
18
python
@staticmethod def rand_md5(): return f'{uuid.uuid4().hex.upper()}'
@staticmethod def rand_md5(): return f'{uuid.uuid4().hex.upper()}'<|docstring|>Return a random md5.<|endoftext|>
b101befcfb836d0c496ba0c3b2adfddf433dd627fa8e1fd4f151f28c981957f7
def rand_mutex(self): 'Return a random Mutex.' return f'Global\{self.tcex.utils.random_string(randint(5, 10))}'
Return a random Mutex.
tests/threat_intelligence/ti_helpers.py
rand_mutex
kdeltared/tcex
18
python
def rand_mutex(self): return f'Global\{self.tcex.utils.random_string(randint(5, 10))}'
def rand_mutex(self): return f'Global\{self.tcex.utils.random_string(randint(5, 10))}'<|docstring|>Return a random Mutex.<|endoftext|>
2c522e9a9854b5c2e2973a5fab47bf3ed9923b22a6459ec64d9d5bbd842afee1
def rand_name(self): 'Return a random name.' return f'{self.tcex.utils.random_string(randint(10, 100))}'
Return a random name.
tests/threat_intelligence/ti_helpers.py
rand_name
kdeltared/tcex
18
python
def rand_name(self): return f'{self.tcex.utils.random_string(randint(10, 100))}'
def rand_name(self): return f'{self.tcex.utils.random_string(randint(10, 100))}'<|docstring|>Return a random name.<|endoftext|>
895f2451040efd3a38baf37ed28f1f2c7a86e4029b39fbf3fbb66cb6f6c2c574
@staticmethod def rand_phone_number(): 'Return a random email subject.' return f'{randint(100, 999)}-{randint(100, 999)}-{randint(1000, 9999)}'
Return a random email subject.
tests/threat_intelligence/ti_helpers.py
rand_phone_number
kdeltared/tcex
18
python
@staticmethod def rand_phone_number(): return f'{randint(100, 999)}-{randint(100, 999)}-{randint(1000, 9999)}'
@staticmethod def rand_phone_number(): return f'{randint(100, 999)}-{randint(100, 999)}-{randint(1000, 9999)}'<|docstring|>Return a random email subject.<|endoftext|>
09c34e8d8d0c5ad7995c12b8244f8ef936edad278c778a49a62b4ea1ddc97ff9
@staticmethod def rand_report_status(): 'Return a random report status.' report_statuses = ['Success', 'Awaiting Upload', 'In Progress', 'Failed'] return report_statuses[randint(0, (len(report_statuses) - 1))]
Return a random report status.
tests/threat_intelligence/ti_helpers.py
rand_report_status
kdeltared/tcex
18
python
@staticmethod def rand_report_status(): report_statuses = ['Success', 'Awaiting Upload', 'In Progress', 'Failed'] return report_statuses[randint(0, (len(report_statuses) - 1))]
@staticmethod def rand_report_status(): report_statuses = ['Success', 'Awaiting Upload', 'In Progress', 'Failed'] return report_statuses[randint(0, (len(report_statuses) - 1))]<|docstring|>Return a random report status.<|endoftext|>
469f128b5bdbd00ffbf77a10c2937c8fa45c7ad68b63d5a382f75f6ecb23a8b0
@staticmethod def rand_signature_type(): 'Return a random signature type.' signature_types = ['Snort', 'Suricata', 'YARA', 'ClamAV', 'OpenIOC', 'CybOX', 'Bro', 'Regex', 'SPL'] return signature_types[randint(0, (len(signature_types) - 1))]
Return a random signature type.
tests/threat_intelligence/ti_helpers.py
rand_signature_type
kdeltared/tcex
18
python
@staticmethod def rand_signature_type(): signature_types = ['Snort', 'Suricata', 'YARA', 'ClamAV', 'OpenIOC', 'CybOX', 'Bro', 'Regex', 'SPL'] return signature_types[randint(0, (len(signature_types) - 1))]
@staticmethod def rand_signature_type(): signature_types = ['Snort', 'Suricata', 'YARA', 'ClamAV', 'OpenIOC', 'CybOX', 'Bro', 'Regex', 'SPL'] return signature_types[randint(0, (len(signature_types) - 1))]<|docstring|>Return a random signature type.<|endoftext|>
fcbd344e278fe8fa4dd41439cbff8e94abe9cc4b002a3e702009501758de8e45
def rand_url(self): 'Return a random hashtag.' return f'https://{self.tcex.utils.random_string(randint(5, 15))}.com/{self.tcex.utils.random_string(randint(5, 15))}/'.lower()
Return a random hashtag.
tests/threat_intelligence/ti_helpers.py
rand_url
kdeltared/tcex
18
python
def rand_url(self): return f'https://{self.tcex.utils.random_string(randint(5, 15))}.com/{self.tcex.utils.random_string(randint(5, 15))}/'.lower()
def rand_url(self): return f'https://{self.tcex.utils.random_string(randint(5, 15))}.com/{self.tcex.utils.random_string(randint(5, 15))}/'.lower()<|docstring|>Return a random hashtag.<|endoftext|>
27af76f69dbc956aecd0cb916b2c24f37656fb458c9ea87f4387a8c19a72a115
@staticmethod def rand_user_agent(): 'Return a random Mutex.' return f'Mozilla/{randint(1, 5)}.0 (Macintosh; Intel Mac OS X 10.8; rv:36.0) Gecko/20100101 Firefox/{randint(1, 36)}.0'
Return a random Mutex.
tests/threat_intelligence/ti_helpers.py
rand_user_agent
kdeltared/tcex
18
python
@staticmethod def rand_user_agent(): return f'Mozilla/{randint(1, 5)}.0 (Macintosh; Intel Mac OS X 10.8; rv:36.0) Gecko/20100101 Firefox/{randint(1, 36)}.0'
@staticmethod def rand_user_agent(): return f'Mozilla/{randint(1, 5)}.0 (Macintosh; Intel Mac OS X 10.8; rv:36.0) Gecko/20100101 Firefox/{randint(1, 36)}.0'<|docstring|>Return a random Mutex.<|endoftext|>
7a2a55dfce55230925da35b4ec7c655f25ebe311d35b049f3e698335abc5b38b
def create_group(self, **kwargs): 'Create an case.\n\n If a case_name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n group_type (str, kwargs): The group type.\n owner (str, kwar...
Create an case. If a case_name is not provide a dynamic case name will be used. Args: attributes (dict|list, kwargs): An attribute or attributes to add to group. group_type (str, kwargs): The group type. owner (str, kwargs): The TC owner to using when adding TI. name (str, kwargs): The name of the gro...
tests/threat_intelligence/ti_helpers.py
create_group
kdeltared/tcex
18
python
def create_group(self, **kwargs): 'Create an case.\n\n If a case_name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n group_type (str, kwargs): The group type.\n owner (str, kwar...
def create_group(self, **kwargs): 'Create an case.\n\n If a case_name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n group_type (str, kwargs): The group type.\n owner (str, kwar...
beaefe3cc320c664efe1905b7cfce410b9f2d534773cd3e0dfb7872b7372a769
def create_indicator(self, indicator_type=None, **kwargs): 'Create an case.\n\n If a case_name is not provide a dynamic case name will be used.\n\n Args:\n indicator_type (str, optional): The indicator type.\n asn_number (str, kwargs): [ASN] The value for this Indicator.\n ...
Create an case. If a case_name is not provide a dynamic case name will be used. Args: indicator_type (str, optional): The indicator type. asn_number (str, kwargs): [ASN] The value for this Indicator. attributes (dict|list, kwargs): An attribute or attributes to add to indicator. ip (str, kwargs): [add...
tests/threat_intelligence/ti_helpers.py
create_indicator
kdeltared/tcex
18
python
def create_indicator(self, indicator_type=None, **kwargs): 'Create an case.\n\n If a case_name is not provide a dynamic case name will be used.\n\n Args:\n indicator_type (str, optional): The indicator type.\n asn_number (str, kwargs): [ASN] The value for this Indicator.\n ...
def create_indicator(self, indicator_type=None, **kwargs): 'Create an case.\n\n If a case_name is not provide a dynamic case name will be used.\n\n Args:\n indicator_type (str, optional): The indicator type.\n asn_number (str, kwargs): [ASN] The value for this Indicator.\n ...
a82f9d04cf0555d591377733ff1931308ca1cc37e97ac86b29521add4effa037
def create_task(self, **kwargs): 'Create an task.\n\n If a task name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n group_type (str, kwargs): The group type.\n owner (str, kwarg...
Create an task. If a task name is not provide a dynamic case name will be used. Args: attributes (dict|list, kwargs): An attribute or attributes to add to group. group_type (str, kwargs): The group type. owner (str, kwargs): The name for this Group. Default to default Org when not provided name (str, ...
tests/threat_intelligence/ti_helpers.py
create_task
kdeltared/tcex
18
python
def create_task(self, **kwargs): 'Create an task.\n\n If a task name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n group_type (str, kwargs): The group type.\n owner (str, kwarg...
def create_task(self, **kwargs): 'Create an task.\n\n If a task name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n group_type (str, kwargs): The group type.\n owner (str, kwarg...
b09b8578964211837ba0aaa0cd5b0459440b10538f0cfed017de0e45ac66d53c
def create_victim(self, **kwargs): 'Create an Victim.\n\n If a Victim name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n owner (str, kwargs): The owner for this Victim. Default to default...
Create an Victim. If a Victim name is not provide a dynamic case name will be used. Args: attributes (dict|list, kwargs): An attribute or attributes to add to group. owner (str, kwargs): The owner for this Victim. Default to default Org when not provided name (str, kwargs): The name of the victim being ad...
tests/threat_intelligence/ti_helpers.py
create_victim
kdeltared/tcex
18
python
def create_victim(self, **kwargs): 'Create an Victim.\n\n If a Victim name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n owner (str, kwargs): The owner for this Victim. Default to default...
def create_victim(self, **kwargs): 'Create an Victim.\n\n If a Victim name is not provide a dynamic case name will be used.\n\n Args:\n attributes (dict|list, kwargs): An attribute or attributes to add to group.\n owner (str, kwargs): The owner for this Victim. Default to default...
abe3b3e9c3f4c7acce6c0a391b834a572e9edbf7bbc135038f2091f623e974d0
def cleanup(self): 'Remove all cases and child data.' for obj in self.ti_objects: obj.delete()
Remove all cases and child data.
tests/threat_intelligence/ti_helpers.py
cleanup
kdeltared/tcex
18
python
def cleanup(self): for obj in self.ti_objects: obj.delete()
def cleanup(self): for obj in self.ti_objects: obj.delete()<|docstring|>Remove all cases and child data.<|endoftext|>
cebb9da2af806fab18eb0dfba90f3bfa46ca980e7b1147654854b7e6fc04b986
def _add_group_fields(self, group_data): 'Add any required or optional fields to the request body.' for (k, v) in self.required_fields.items(): group_data[k] = v for (k, v) in self.optional_fields.items(): group_data[k] = v
Add any required or optional fields to the request body.
tests/threat_intelligence/ti_helpers.py
_add_group_fields
kdeltared/tcex
18
python
def _add_group_fields(self, group_data): for (k, v) in self.required_fields.items(): group_data[k] = v for (k, v) in self.optional_fields.items(): group_data[k] = v
def _add_group_fields(self, group_data): for (k, v) in self.required_fields.items(): group_data[k] = v for (k, v) in self.optional_fields.items(): group_data[k] = v<|docstring|>Add any required or optional fields to the request body.<|endoftext|>
53a871afd61ee9f3357b1d710e2cd1fb80c23a630614d7119799e877686c8fa6
def group_add_attribute(self, request): 'Create a attribute on a group.' helper_ti = self.ti_helper.create_group() attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name, 'source': request.node.name, 'displayed': True} r = helper_ti.add_attribute(**attribute_data) re...
Create a attribute on a group.
tests/threat_intelligence/ti_helpers.py
group_add_attribute
kdeltared/tcex
18
python
def group_add_attribute(self, request): helper_ti = self.ti_helper.create_group() attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name, 'source': request.node.name, 'displayed': True} r = helper_ti.add_attribute(**attribute_data) response_data = r.json() ti_da...
def group_add_attribute(self, request): helper_ti = self.ti_helper.create_group() attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name, 'source': request.node.name, 'displayed': True} r = helper_ti.add_attribute(**attribute_data) response_data = r.json() ti_da...
42afdab12b65e224f0c92bed612cf54ac8a7a9c4668ad58bb6031714412b7fc5
def group_add_label(self): 'Create a label on a group.' helper_ti = self.ti_helper.create_group() r = helper_ti.add_label(label='TLP:GREEN') response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')
Create a label on a group.
tests/threat_intelligence/ti_helpers.py
group_add_label
kdeltared/tcex
18
python
def group_add_label(self): helper_ti = self.ti_helper.create_group() r = helper_ti.add_label(label='TLP:GREEN') response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')
def group_add_label(self): helper_ti = self.ti_helper.create_group() r = helper_ti.add_label(label='TLP:GREEN') response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')<|docstring|>Create a label on a group.<|endoftext|>
228b6bccedd706f799afd2c16d6eeffab48b44cdc85a3a79194563c62b75fe0f
def group_add_tag(self, request): 'Create a tag on an group.' helper_ti = self.ti_helper.create_group() r = helper_ti.add_tag(request.node.name) response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')
Create a tag on an group.
tests/threat_intelligence/ti_helpers.py
group_add_tag
kdeltared/tcex
18
python
def group_add_tag(self, request): helper_ti = self.ti_helper.create_group() r = helper_ti.add_tag(request.node.name) response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')
def group_add_tag(self, request): helper_ti = self.ti_helper.create_group() r = helper_ti.add_tag(request.node.name) response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')<|docstring|>Create a tag on an group.<|endoftext|>
a8d18190b135d3dc3ffd4037ee412109797759a32ffcf7322d97a11ff91ea4fd
def group_delete(self): 'Delete group.' helper_ti = self.ti_helper.create_group() group_data = {'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) r = ti.delete() response_data = r.json() assert (r.status_code == 200) ...
Delete group.
tests/threat_intelligence/ti_helpers.py
group_delete
kdeltared/tcex
18
python
def group_delete(self): helper_ti = self.ti_helper.create_group() group_data = {'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) r = ti.delete() response_data = r.json() assert (r.status_code == 200) assert (resp...
def group_delete(self): helper_ti = self.ti_helper.create_group() group_data = {'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) r = ti.delete() response_data = r.json() assert (r.status_code == 200) assert (resp...
e4434b6f6605422ae7483a2c12df2e43da43ced3f88ee582e31403352d00913b
def group_get(self): 'Get group with generic group method.' helper_ti = self.ti_helper.create_group() group_data = {'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) r = ti.single() response_data = r.json() ti_data = r...
Get group with generic group method.
tests/threat_intelligence/ti_helpers.py
group_get
kdeltared/tcex
18
python
def group_get(self): helper_ti = self.ti_helper.create_group() group_data = {'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) r = ti.single() response_data = r.json() ti_data = response_data.get('data', {}).get(ti.ap...
def group_get(self): helper_ti = self.ti_helper.create_group() group_data = {'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) r = ti.single() response_data = r.json() ti_data = response_data.get('data', {}).get(ti.ap...
b7028911c56ead7f7b56bb3073c50862b95332cb04d9cbd339e01b4c08e1cadd
def group_get_filter(self): 'Get group with generic group method.' helper_ti = self.ti_helper.create_group() parameters = {'includes': ['additional', 'attributes', 'labels', 'tags']} groups = self.ti.group(owner=helper_ti.owner) filters = self.ti.filters() filters.add_filter('name', '=', helper_...
Get group with generic group method.
tests/threat_intelligence/ti_helpers.py
group_get_filter
kdeltared/tcex
18
python
def group_get_filter(self): helper_ti = self.ti_helper.create_group() parameters = {'includes': ['additional', 'attributes', 'labels', 'tags']} groups = self.ti.group(owner=helper_ti.owner) filters = self.ti.filters() filters.add_filter('name', '=', helper_ti.name) filters.add_filter('temp'...
def group_get_filter(self): helper_ti = self.ti_helper.create_group() parameters = {'includes': ['additional', 'attributes', 'labels', 'tags']} groups = self.ti.group(owner=helper_ti.owner) filters = self.ti.filters() filters.add_filter('name', '=', helper_ti.name) filters.add_filter('temp'...
d68b264bbfca4baa7a0c791c69f25845000c9eaf371fe257071d007254fa651a
def group_get_includes(self, request): 'Get group with includes.' attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} label_data = {'label': 'TLP:RED'} tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_group(attributes=attribute_data, label...
Get group with includes.
tests/threat_intelligence/ti_helpers.py
group_get_includes
kdeltared/tcex
18
python
def group_get_includes(self, request): attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} label_data = {'label': 'TLP:RED'} tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_group(attributes=attribute_data, labels=label_data, tags=tag_dat...
def group_get_includes(self, request): attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} label_data = {'label': 'TLP:RED'} tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_group(attributes=attribute_data, labels=label_data, tags=tag_dat...
ead1e48a710291619e970ddda22d2938bbfd668b81e80b00791719042f51b906
def group_get_attribute(self, request): 'Get attributes for an group.' attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} helper_ti = self.ti_helper.create_group(attributes=attribute_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner':...
Get attributes for an group.
tests/threat_intelligence/ti_helpers.py
group_get_attribute
kdeltared/tcex
18
python
def group_get_attribute(self, request): attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} helper_ti = self.ti_helper.create_group(attributes=attribute_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id':...
def group_get_attribute(self, request): attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} helper_ti = self.ti_helper.create_group(attributes=attribute_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id':...
dfce160c4bd0340abc07a5558d5453b661845dbc817e51afc57bddc729da2076
def group_get_label(self): 'Get tags for an group.' label_data = {'label': 'TLP:RED'} helper_ti = self.ti_helper.create_group(labels=label_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group...
Get tags for an group.
tests/threat_intelligence/ti_helpers.py
group_get_label
kdeltared/tcex
18
python
def group_get_label(self): label_data = {'label': 'TLP:RED'} helper_ti = self.ti_helper.create_group(labels=label_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) for label in ...
def group_get_label(self): label_data = {'label': 'TLP:RED'} helper_ti = self.ti_helper.create_group(labels=label_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) for label in ...
4d9bac02b67056eda928d8358ae1559121d8c3f101e7bd89c8c526497bd6b519
def group_get_tag(self, request): 'Get tags for an group.' tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_group(tags=tag_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group...
Get tags for an group.
tests/threat_intelligence/ti_helpers.py
group_get_tag
kdeltared/tcex
18
python
def group_get_tag(self, request): tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_group(tags=tag_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) for t...
def group_get_tag(self, request): tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_group(tags=tag_data) group_data = {'name': helper_ti.name, 'group_type': self.group_type, 'owner': helper_ti.owner, 'unique_id': helper_ti.unique_id} ti = self.ti.group(**group_data) for t...
0102dd4674d539446a8aee4b3ab0f3cd482f31aec347ad8291b51cfca19dc9bf
def group_update(self, request): 'Test updating group metadata.' helper_ti = self.ti_helper.create_group() group_data = {'name': request.node.name, 'group_type': self.group_type, 'owner': self.owner, 'unique_id': helper_ti.unique_id} self._add_group_fields(group_data) ti = self.ti.group(**group_data...
Test updating group metadata.
tests/threat_intelligence/ti_helpers.py
group_update
kdeltared/tcex
18
python
def group_update(self, request): helper_ti = self.ti_helper.create_group() group_data = {'name': request.node.name, 'group_type': self.group_type, 'owner': self.owner, 'unique_id': helper_ti.unique_id} self._add_group_fields(group_data) ti = self.ti.group(**group_data) r = ti.update() respo...
def group_update(self, request): helper_ti = self.ti_helper.create_group() group_data = {'name': request.node.name, 'group_type': self.group_type, 'owner': self.owner, 'unique_id': helper_ti.unique_id} self._add_group_fields(group_data) ti = self.ti.group(**group_data) r = ti.update() respo...
aa255aab6e5adde9791e6d8f3e4c106fca35af18a337090e9c1106d6a1984bca
def indicator_add_attribute(self, request): 'Create a attribute on an indicator.' helper_ti = self.ti_helper.create_indicator() attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name, 'source': request.node.name, 'displayed': True} r = helper_ti.add_attribute(**attribute...
Create a attribute on an indicator.
tests/threat_intelligence/ti_helpers.py
indicator_add_attribute
kdeltared/tcex
18
python
def indicator_add_attribute(self, request): helper_ti = self.ti_helper.create_indicator() attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name, 'source': request.node.name, 'displayed': True} r = helper_ti.add_attribute(**attribute_data) response_data = r.json() ...
def indicator_add_attribute(self, request): helper_ti = self.ti_helper.create_indicator() attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name, 'source': request.node.name, 'displayed': True} r = helper_ti.add_attribute(**attribute_data) response_data = r.json() ...
41d12b51f4bcdf2ea4f6c0fdf3e9fba75670800655e04b2801c6601c9922b76b
def indicator_add_label(self): 'Create a label on an indicator.' helper_ti = self.ti_helper.create_indicator() r = helper_ti.add_label(label='TLP:GREEN') response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')
Create a label on an indicator.
tests/threat_intelligence/ti_helpers.py
indicator_add_label
kdeltared/tcex
18
python
def indicator_add_label(self): helper_ti = self.ti_helper.create_indicator() r = helper_ti.add_label(label='TLP:GREEN') response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')
def indicator_add_label(self): helper_ti = self.ti_helper.create_indicator() r = helper_ti.add_label(label='TLP:GREEN') response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')<|docstring|>Create a label on an indicator.<|endoftext|>
bce94b8dda7ee26e18b66fa3f68da76261e691f0b8e1a93748ffd53e1e4d8574
def indicator_add_tag(self, request): 'Create a tag on an indicator.' helper_ti = self.ti_helper.create_indicator() r = helper_ti.add_tag(request.node.name) response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')
Create a tag on an indicator.
tests/threat_intelligence/ti_helpers.py
indicator_add_tag
kdeltared/tcex
18
python
def indicator_add_tag(self, request): helper_ti = self.ti_helper.create_indicator() r = helper_ti.add_tag(request.node.name) response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')
def indicator_add_tag(self, request): helper_ti = self.ti_helper.create_indicator() r = helper_ti.add_tag(request.node.name) response_data = r.json() assert (r.status_code == 201) assert (response_data.get('status') == 'Success')<|docstring|>Create a tag on an indicator.<|endoftext|>
2fe2333fb9b2af959b96e5931133de4709e95b5308db53191e2383930fe24e73
def indicator_delete(self): 'Delete indicator.' helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicator_data) r = ti.delete() response_data =...
Delete indicator.
tests/threat_intelligence/ti_helpers.py
indicator_delete
kdeltared/tcex
18
python
def indicator_delete(self): helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicator_data) r = ti.delete() response_data = r.json() asser...
def indicator_delete(self): helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicator_data) r = ti.delete() response_data = r.json() asser...
86725b23ee53cdacc23ea60d2a032998fadfbfd228b549b405cd6d9ee7672f52
def indicator_get(self): 'Get indicator with generic indicator method.' helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicator_data) r = ti.sing...
Get indicator with generic indicator method.
tests/threat_intelligence/ti_helpers.py
indicator_get
kdeltared/tcex
18
python
def indicator_get(self): helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicator_data) r = ti.single() response_data = r.json() ti_data ...
def indicator_get(self): helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicator_data) r = ti.single() response_data = r.json() ti_data ...
a7a04b47e6affa311f7a02a4e557685971bf1192c146a7c01584eef444abd599
def indicator_get_includes(self, request): 'Get indicator with includes.' attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} label_data = {'label': 'TLP:RED'} tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_indicator(attributes=attribute...
Get indicator with includes.
tests/threat_intelligence/ti_helpers.py
indicator_get_includes
kdeltared/tcex
18
python
def indicator_get_includes(self, request): attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} label_data = {'label': 'TLP:RED'} tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_indicator(attributes=attribute_data, labels=label_data, tags...
def indicator_get_includes(self, request): attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} label_data = {'label': 'TLP:RED'} tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_indicator(attributes=attribute_data, labels=label_data, tags...
27fd131eee37d8c48585d56fb945a39130a053edc33ae598925e602378419342
def indicator_get_attribute(self, request): 'Get attributes for an indicator.' attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} helper_ti = self.ti_helper.create_indicator(attributes=attribute_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, ...
Get attributes for an indicator.
tests/threat_intelligence/ti_helpers.py
indicator_get_attribute
kdeltared/tcex
18
python
def indicator_get_attribute(self, request): attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} helper_ti = self.ti_helper.create_indicator(attributes=attribute_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_t...
def indicator_get_attribute(self, request): attribute_data = {'attribute_type': 'Description', 'attribute_value': request.node.name} helper_ti = self.ti_helper.create_indicator(attributes=attribute_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_t...
ca32d773f0d5cc15059e923034396bb6684f4eac71f046a951087ec0bac625a3
def indicator_get_label(self): 'Get tags for an indicator.' label_data = {'label': 'TLP:RED'} helper_ti = self.ti_helper.create_indicator(labels=label_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti....
Get tags for an indicator.
tests/threat_intelligence/ti_helpers.py
indicator_get_label
kdeltared/tcex
18
python
def indicator_get_label(self): label_data = {'label': 'TLP:RED'} helper_ti = self.ti_helper.create_indicator(labels=label_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicator_data) ...
def indicator_get_label(self): label_data = {'label': 'TLP:RED'} helper_ti = self.ti_helper.create_indicator(labels=label_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicator_data) ...
dfe1c344711ad1e1cca4632bea9c32fd879c4706bd6199c6d122e98090d9444d
def indicator_get_tag(self, request): 'Get tags for an indicator.' tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_indicator(tags=tag_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = ...
Get tags for an indicator.
tests/threat_intelligence/ti_helpers.py
indicator_get_tag
kdeltared/tcex
18
python
def indicator_get_tag(self, request): tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_indicator(tags=tag_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicato...
def indicator_get_tag(self, request): tag_data = {'name': request.node.name} helper_ti = self.ti_helper.create_indicator(tags=tag_data) indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'indicator_type': self.indicator_type, 'owner': helper_ti.owner} ti = self.ti.indicator(**indicato...
49a7f5306f7682688639bb7215dce3ac51ed14b3e1e27dd94a4cad1424d0eb25
def indicator_update(self): 'Test updating indicator metadata.' helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'confidence': 100, 'indicator_type': self.indicator_type, 'owner': self.owner, 'rating': 5} ti = self.ti.indicator(**indicator_da...
Test updating indicator metadata.
tests/threat_intelligence/ti_helpers.py
indicator_update
kdeltared/tcex
18
python
def indicator_update(self): helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'confidence': 100, 'indicator_type': self.indicator_type, 'owner': self.owner, 'rating': 5} ti = self.ti.indicator(**indicator_data) r = ti.update() respons...
def indicator_update(self): helper_ti = self.ti_helper.create_indicator() indicator_data = {self.indicator_field_arg: helper_ti.indicator, 'confidence': 100, 'indicator_type': self.indicator_type, 'owner': self.owner, 'rating': 5} ti = self.ti.indicator(**indicator_data) r = ti.update() respons...
31d85d08ae5c115d20e172ca6c90d018e3e5d60551bfecf3176cd53cdd19105d
def convertPdfToCSV(uploadedFileUrl, destinationFile): 'Converts PDF To CSV using PDF.co Web API' parameters = {} parameters['name'] = os.path.basename(destinationFile) parameters['password'] = Password parameters['pages'] = Pages parameters['url'] = uploadedFileUrl parameters['profiles'] = ...
Converts PDF To CSV using PDF.co Web API
PDF.co Web API/PDF To CSV API/Python/Advanced Conversation Options/ConvertPdfToCSVFromUploadedFile.py
convertPdfToCSV
bytescout/ByteScout-SDK-SourceCode
24
python
def convertPdfToCSV(uploadedFileUrl, destinationFile): parameters = {} parameters['name'] = os.path.basename(destinationFile) parameters['password'] = Password parameters['pages'] = Pages parameters['url'] = uploadedFileUrl parameters['profiles'] = Profiles url = '{}/pdf/convert/to/csv'...
def convertPdfToCSV(uploadedFileUrl, destinationFile): parameters = {} parameters['name'] = os.path.basename(destinationFile) parameters['password'] = Password parameters['pages'] = Pages parameters['url'] = uploadedFileUrl parameters['profiles'] = Profiles url = '{}/pdf/convert/to/csv'...
5480461b89f7e988585de5bec2aca0027cfea34d2d0b4c66cf75480fc2969b02
def uploadFile(fileName): 'Uploads file to the cloud' url = '{}/file/upload/get-presigned-url?contenttype=application/octet-stream&name={}'.format(BASE_URL, os.path.basename(fileName)) response = requests.get(url, headers={'x-api-key': API_KEY}) if (response.status_code == 200): json = response....
Uploads file to the cloud
PDF.co Web API/PDF To CSV API/Python/Advanced Conversation Options/ConvertPdfToCSVFromUploadedFile.py
uploadFile
bytescout/ByteScout-SDK-SourceCode
24
python
def uploadFile(fileName): url = '{}/file/upload/get-presigned-url?contenttype=application/octet-stream&name={}'.format(BASE_URL, os.path.basename(fileName)) response = requests.get(url, headers={'x-api-key': API_KEY}) if (response.status_code == 200): json = response.json() if (json['er...
def uploadFile(fileName): url = '{}/file/upload/get-presigned-url?contenttype=application/octet-stream&name={}'.format(BASE_URL, os.path.basename(fileName)) response = requests.get(url, headers={'x-api-key': API_KEY}) if (response.status_code == 200): json = response.json() if (json['er...
d91f5f48d6e0050ece214fb1c7dc6dcf0d97a4643701f84cf1723d66221cb111
def create(self, engine, drop_if_exists: bool=False) -> None: '\n `engine` is a `Hive` or `Athena` object.\n ' def collapse(spec): return ', '.join((((name + ' ') + type_) for (name, type_) in spec)) columns = collapse(self.columns) if self.partitions: partitions = f'PARTI...
`engine` is a `Hive` or `Athena` object.
archive/sql/hive_table.py
create
zpz/utilities.py
0
python
def create(self, engine, drop_if_exists: bool=False) -> None: '\n \n ' def collapse(spec): return ', '.join((((name + ' ') + type_) for (name, type_) in spec)) columns = collapse(self.columns) if self.partitions: partitions = f'PARTITIONED BY ({collapse(self.partitions)})'...
def create(self, engine, drop_if_exists: bool=False) -> None: '\n \n ' def collapse(spec): return ', '.join((((name + ' ') + type_) for (name, type_) in spec)) columns = collapse(self.columns) if self.partitions: partitions = f'PARTITIONED BY ({collapse(self.partitions)})'...
07e0fcf2f982fbfa5b0be4cb1f592d1438c57c1f2b3bfed09d4d6ea477832b7a
def _partition_values_to_condition(self, *partition_values) -> str: '\n `partition_values` appear in the order they are listed\n in the table definition.\n ' assert (0 < len(partition_values) <= len(self.partitions)) elements = [] for (v, (k, t)) in zip(partition_values, self.partit...
`partition_values` appear in the order they are listed in the table definition.
archive/sql/hive_table.py
_partition_values_to_condition
zpz/utilities.py
0
python
def _partition_values_to_condition(self, *partition_values) -> str: '\n `partition_values` appear in the order they are listed\n in the table definition.\n ' assert (0 < len(partition_values) <= len(self.partitions)) elements = [] for (v, (k, t)) in zip(partition_values, self.partit...
def _partition_values_to_condition(self, *partition_values) -> str: '\n `partition_values` appear in the order they are listed\n in the table definition.\n ' assert (0 < len(partition_values) <= len(self.partitions)) elements = [] for (v, (k, t)) in zip(partition_values, self.partit...
a11a42082f256a45303422bdfdbe18b28fdc738596fb78d568e34e3d9aa0da10
def add_partitions(self, engine, *partition_values): '\n Add partitions for an external table to the table meta data.\n\n Use case is adding partition to the meta data of an external table\n after new data has been added w/o the knowledge of the meta store.\n\n `*partition_values`: value...
Add partitions for an external table to the table meta data. Use case is adding partition to the meta data of an external table after new data has been added w/o the knowledge of the meta store. `*partition_values`: values of first partition columns; update below that. If empty, update under root location.
archive/sql/hive_table.py
add_partitions
zpz/utilities.py
0
python
def add_partitions(self, engine, *partition_values): '\n Add partitions for an external table to the table meta data.\n\n Use case is adding partition to the meta data of an external table\n after new data has been added w/o the knowledge of the meta store.\n\n `*partition_values`: value...
def add_partitions(self, engine, *partition_values): '\n Add partitions for an external table to the table meta data.\n\n Use case is adding partition to the meta data of an external table\n after new data has been added w/o the knowledge of the meta store.\n\n `*partition_values`: value...
6fa316b7ac7ebf3d60ca625b7c3bf74678451c86c1fb6713a74a1dbf09ba97e0
def to_athena_table(self, db_name: str, tb_name: str=None) -> AthenaTable: "\n Use case of this method:\n\n If we have defined and manipulated an _external_ table in Hive,\n then the data is in S3 but meta data is in Hadoop.\n This table is not available to Athena because the...
Use case of this method: If we have defined and manipulated an _external_ table in Hive, then the data is in S3 but meta data is in Hadoop. This table is not available to Athena because the meta data is not in S3. The current method takes the existing Hive (external) table definition and creates an...
archive/sql/hive_table.py
to_athena_table
zpz/utilities.py
0
python
def to_athena_table(self, db_name: str, tb_name: str=None) -> AthenaTable: "\n Use case of this method:\n\n If we have defined and manipulated an _external_ table in Hive,\n then the data is in S3 but meta data is in Hadoop.\n This table is not available to Athena because the...
def to_athena_table(self, db_name: str, tb_name: str=None) -> AthenaTable: "\n Use case of this method:\n\n If we have defined and manipulated an _external_ table in Hive,\n then the data is in S3 but meta data is in Hadoop.\n This table is not available to Athena because the...
b78724ca78deaeba17eb7ac2eb80318424d6154879ea0b418ca973618e1277a1
@classmethod def from_athena_table(cls, table: AthenaTable, db_name: str, tb_name: str=None) -> 'HiveTable': '\n Use case is analogous to `to_athena_table`.\n ' assert table.s3external location = table.location if location.startswith('s3://'): location = ('s3n://' + location[len('s...
Use case is analogous to `to_athena_table`.
archive/sql/hive_table.py
from_athena_table
zpz/utilities.py
0
python
@classmethod def from_athena_table(cls, table: AthenaTable, db_name: str, tb_name: str=None) -> 'HiveTable': '\n \n ' assert table.s3external location = table.location if location.startswith('s3://'): location = ('s3n://' + location[len('s3://'):]) return cls(db_name=db_name, t...
@classmethod def from_athena_table(cls, table: AthenaTable, db_name: str, tb_name: str=None) -> 'HiveTable': '\n \n ' assert table.s3external location = table.location if location.startswith('s3://'): location = ('s3n://' + location[len('s3://'):]) return cls(db_name=db_name, t...
c727f6f3458522438d296edaa19f722668b316f9397c6131b522bb95cea61bec
@hub.pretrained('https://data.megengine.org.cn/models/weights/atss_res50_coco_3x_800size_42dot6_9a92ed8c.pkl') def atss_res50_coco_3x_800size(**kwargs): '\n ATSS trained from COCO dataset.\n `"ATSS" <https://arxiv.org/abs/1912.02424>`_\n `"FPN" <https://arxiv.org/abs/1612.03144>`_\n `"COCO" <https://arx...
ATSS trained from COCO dataset. `"ATSS" <https://arxiv.org/abs/1912.02424>`_ `"FPN" <https://arxiv.org/abs/1612.03144>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
megengine_release/configs/atss_res50_coco_3x_800size.py
atss_res50_coco_3x_800size
megvii-research/ICD
32
python
@hub.pretrained('https://data.megengine.org.cn/models/weights/atss_res50_coco_3x_800size_42dot6_9a92ed8c.pkl') def atss_res50_coco_3x_800size(**kwargs): '\n ATSS trained from COCO dataset.\n `"ATSS" <https://arxiv.org/abs/1912.02424>`_\n `"FPN" <https://arxiv.org/abs/1612.03144>`_\n `"COCO" <https://arx...
@hub.pretrained('https://data.megengine.org.cn/models/weights/atss_res50_coco_3x_800size_42dot6_9a92ed8c.pkl') def atss_res50_coco_3x_800size(**kwargs): '\n ATSS trained from COCO dataset.\n `"ATSS" <https://arxiv.org/abs/1912.02424>`_\n `"FPN" <https://arxiv.org/abs/1612.03144>`_\n `"COCO" <https://arx...
f0e6963a452cdab26074943c2defe93823ed0338906e3a019b7497d07c73503c
@staticmethod def top(bits: int) -> claripy.ast.Base: '\n Get a TOP value.\n\n :param size: Width of the TOP value (in bits).\n :return: The TOP value.\n ' if (bits in PropagatorState._tops): return PropagatorState._tops[bits] r = claripy.BVS('TOP', bits, explic...
Get a TOP value. :param size: Width of the TOP value (in bits). :return: The TOP value.
angr/analyses/propagator/propagator.py
top
usc-isi-bass/angr
1
python
@staticmethod def top(bits: int) -> claripy.ast.Base: '\n Get a TOP value.\n\n :param size: Width of the TOP value (in bits).\n :return: The TOP value.\n ' if (bits in PropagatorState._tops): return PropagatorState._tops[bits] r = claripy.BVS('TOP', bits, explic...
@staticmethod def top(bits: int) -> claripy.ast.Base: '\n Get a TOP value.\n\n :param size: Width of the TOP value (in bits).\n :return: The TOP value.\n ' if (bits in PropagatorState._tops): return PropagatorState._tops[bits] r = claripy.BVS('TOP', bits, explic...
f515d66fa8d8aa257090487a9584c5d44bac5e0a6b822a49ff08b10a0c96a95b
@staticmethod def is_top(expr) -> bool: '\n Check if the given expression is a TOP value.\n\n :param expr: The given expression.\n :return: True if the expression is TOP, False otherwise.\n ' if isinstance(expr, claripy.ast.Base): if ((expr.op == 'BVS') and (expr.ar...
Check if the given expression is a TOP value. :param expr: The given expression. :return: True if the expression is TOP, False otherwise.
angr/analyses/propagator/propagator.py
is_top
usc-isi-bass/angr
1
python
@staticmethod def is_top(expr) -> bool: '\n Check if the given expression is a TOP value.\n\n :param expr: The given expression.\n :return: True if the expression is TOP, False otherwise.\n ' if isinstance(expr, claripy.ast.Base): if ((expr.op == 'BVS') and (expr.ar...
@staticmethod def is_top(expr) -> bool: '\n Check if the given expression is a TOP value.\n\n :param expr: The given expression.\n :return: True if the expression is TOP, False otherwise.\n ' if isinstance(expr, claripy.ast.Base): if ((expr.op == 'BVS') and (expr.ar...
423552b0ea50628450dc7d85e275318c3fb059d8b5c4b09e54d09e44bc9a1f22
def add_replacement(self, codeloc, old, new): '\n Add a replacement record: Replacing expression `old` with `new` at program location `codeloc`.\n If the self._only_consts flag is set to true, only constant values will be set.\n\n :param CodeLocation codeloc: The code location.\n :par...
Add a replacement record: Replacing expression `old` with `new` at program location `codeloc`. If the self._only_consts flag is set to true, only constant values will be set. :param CodeLocation codeloc: The code location. :param old: The expression to be replaced. :param new: ...
angr/analyses/propagator/propagator.py
add_replacement
usc-isi-bass/angr
1
python
def add_replacement(self, codeloc, old, new): '\n Add a replacement record: Replacing expression `old` with `new` at program location `codeloc`.\n If the self._only_consts flag is set to true, only constant values will be set.\n\n :param CodeLocation codeloc: The code location.\n :par...
def add_replacement(self, codeloc, old, new): '\n Add a replacement record: Replacing expression `old` with `new` at program location `codeloc`.\n If the self._only_consts flag is set to true, only constant values will be set.\n\n :param CodeLocation codeloc: The code location.\n :par...
48b30731d3165ca959b67200762ea1bc71e454767b4ff4da3ceffb2648688a78
def _check_func_complete(self, func): '\n Checks if a function is completely created by the CFG. Completed\n functions are passed to the Propagator at initialization. Defaults to\n being empty if no pass is initiated.\n\n :param func: Function to check (knowledge_plugins.functions.fun...
Checks if a function is completely created by the CFG. Completed functions are passed to the Propagator at initialization. Defaults to being empty if no pass is initiated. :param func: Function to check (knowledge_plugins.functions.function.Function) :return: Bool
angr/analyses/propagator/propagator.py
_check_func_complete
usc-isi-bass/angr
1
python
def _check_func_complete(self, func): '\n Checks if a function is completely created by the CFG. Completed\n functions are passed to the Propagator at initialization. Defaults to\n being empty if no pass is initiated.\n\n :param func: Function to check (knowledge_plugins.functions.fun...
def _check_func_complete(self, func): '\n Checks if a function is completely created by the CFG. Completed\n functions are passed to the Propagator at initialization. Defaults to\n being empty if no pass is initiated.\n\n :param func: Function to check (knowledge_plugins.functions.fun...
d650df3f8c04fcff53ef4061ff1d2331ca07ed8834229d8bf6adfd07d1e8c922
def _post_analysis(self): '\n Post Analysis of Propagation().\n We add the current propagation replacements result to the kb if the\n function has already been completed in cfg creation.\n ' if (self.replacements is not None): for codeloc in list(self.replacements.keys()): ...
Post Analysis of Propagation(). We add the current propagation replacements result to the kb if the function has already been completed in cfg creation.
angr/analyses/propagator/propagator.py
_post_analysis
usc-isi-bass/angr
1
python
def _post_analysis(self): '\n Post Analysis of Propagation().\n We add the current propagation replacements result to the kb if the\n function has already been completed in cfg creation.\n ' if (self.replacements is not None): for codeloc in list(self.replacements.keys()): ...
def _post_analysis(self): '\n Post Analysis of Propagation().\n We add the current propagation replacements result to the kb if the\n function has already been completed in cfg creation.\n ' if (self.replacements is not None): for codeloc in list(self.replacements.keys()): ...
d8748392b99da5ba9427c65b44361f36eb8f08f409541d4b24b403a89c941d47
def _check_prop_kb(self): '\n Checks, and gets, stored propagations from the KB for the current\n Propagation state.\n\n :return: None or Dict of replacements\n ' replacements = None if (self._function is not None): func_loc = CodeLocation(self._function.addr, None) ...
Checks, and gets, stored propagations from the KB for the current Propagation state. :return: None or Dict of replacements
angr/analyses/propagator/propagator.py
_check_prop_kb
usc-isi-bass/angr
1
python
def _check_prop_kb(self): '\n Checks, and gets, stored propagations from the KB for the current\n Propagation state.\n\n :return: None or Dict of replacements\n ' replacements = None if (self._function is not None): func_loc = CodeLocation(self._function.addr, None) ...
def _check_prop_kb(self): '\n Checks, and gets, stored propagations from the KB for the current\n Propagation state.\n\n :return: None or Dict of replacements\n ' replacements = None if (self._function is not None): func_loc = CodeLocation(self._function.addr, None) ...
cb3956ee361b96da19f0b4e7c36f65258992c6ff74a6a86848dbfb7706d71b19
def _analyze(self): '\n The main analysis for Propagator. Overwritten to include an optimization to stop\n analysis if we have already analyzed the entire function once.\n ' self._pre_analysis() stored_replacements = self._check_prop_kb() if (stored_replacements is not None): ...
The main analysis for Propagator. Overwritten to include an optimization to stop analysis if we have already analyzed the entire function once.
angr/analyses/propagator/propagator.py
_analyze
usc-isi-bass/angr
1
python
def _analyze(self): '\n The main analysis for Propagator. Overwritten to include an optimization to stop\n analysis if we have already analyzed the entire function once.\n ' self._pre_analysis() stored_replacements = self._check_prop_kb() if (stored_replacements is not None): ...
def _analyze(self): '\n The main analysis for Propagator. Overwritten to include an optimization to stop\n analysis if we have already analyzed the entire function once.\n ' self._pre_analysis() stored_replacements = self._check_prop_kb() if (stored_replacements is not None): ...
7bab7c50dd8cdf4365b529ef551002ef220590583bcc67231181abcb1684b22b
def add(self, *components: TextInput) -> None: 'Adds components to the action row.\n\n Parameters\n ----------\n components: :class:`.TextInput`\n The text input instances to add to the action row.\n ' self.components.extend(components)
Adds components to the action row. Parameters ---------- components: :class:`.TextInput` The text input instances to add to the action row.
rin/models/message/components/modal.py
add
an-dyy/Rin
13
python
def add(self, *components: TextInput) -> None: 'Adds components to the action row.\n\n Parameters\n ----------\n components: :class:`.TextInput`\n The text input instances to add to the action row.\n ' self.components.extend(components)
def add(self, *components: TextInput) -> None: 'Adds components to the action row.\n\n Parameters\n ----------\n components: :class:`.TextInput`\n The text input instances to add to the action row.\n ' self.components.extend(components)<|docstring|>Adds components to the a...
5c5743d7b65615d8615dede2e3461f9b2d6e060dce30eaaf65cc8d9e88ffcfbe
def to_dict(self) -> dict[(str, (str | list[dict[(Any, Any)]]))]: 'Turns the Modal into a use-able dict.\n\n Returns\n -------\n :class:`dict`\n The dictionary representation of the action row.\n ' return {'title': self.title, 'custom_id': self.custom_id, 'components': [{'...
Turns the Modal into a use-able dict. Returns ------- :class:`dict` The dictionary representation of the action row.
rin/models/message/components/modal.py
to_dict
an-dyy/Rin
13
python
def to_dict(self) -> dict[(str, (str | list[dict[(Any, Any)]]))]: 'Turns the Modal into a use-able dict.\n\n Returns\n -------\n :class:`dict`\n The dictionary representation of the action row.\n ' return {'title': self.title, 'custom_id': self.custom_id, 'components': [{'...
def to_dict(self) -> dict[(str, (str | list[dict[(Any, Any)]]))]: 'Turns the Modal into a use-able dict.\n\n Returns\n -------\n :class:`dict`\n The dictionary representation of the action row.\n ' return {'title': self.title, 'custom_id': self.custom_id, 'components': [{'...
9eed2eea9a7196beabd7c74c117467d1b737972060b1199e6c091c8286650154
def __init__(self, unitcell, supercell_matrix=None, primitive_matrix=None, nac_params=None, factor=VaspToTHz, frequency_scale_factor=None, dynamical_matrix_decimals=None, force_constants_decimals=None, group_velocity_delta_q=None, symprec=1e-05, is_symmetry=True, store_dense_svecs=False, calculator=None, use_lapack_sol...
Init Phonopy API.
phonopy/api_phonopy.py
__init__
MSimoncelli/phonopy
127
python
def __init__(self, unitcell, supercell_matrix=None, primitive_matrix=None, nac_params=None, factor=VaspToTHz, frequency_scale_factor=None, dynamical_matrix_decimals=None, force_constants_decimals=None, group_velocity_delta_q=None, symprec=1e-05, is_symmetry=True, store_dense_svecs=False, calculator=None, use_lapack_sol...
def __init__(self, unitcell, supercell_matrix=None, primitive_matrix=None, nac_params=None, factor=VaspToTHz, frequency_scale_factor=None, dynamical_matrix_decimals=None, force_constants_decimals=None, group_velocity_delta_q=None, symprec=1e-05, is_symmetry=True, store_dense_svecs=False, calculator=None, use_lapack_sol...
a8e05fa5cfcaf3908b63651846858e724218f6d0051eee3891ade49d520aec3a
@property def version(self): 'Return phonopy release version number.\n\n str\n Phonopy release version number\n\n ' return __version__
Return phonopy release version number. str Phonopy release version number
phonopy/api_phonopy.py
version
MSimoncelli/phonopy
127
python
@property def version(self): 'Return phonopy release version number.\n\n str\n Phonopy release version number\n\n ' return __version__
@property def version(self): 'Return phonopy release version number.\n\n str\n Phonopy release version number\n\n ' return __version__<|docstring|>Return phonopy release version number. str Phonopy release version number<|endoftext|>
51507f1c6f5193661ce499f6d386f9d0023b0115d3510e1fc82226ef89496944
def get_version(self): 'Return phonopy release version number.' warnings.warn('Phonopy.get_version() is deprecated.Use Phonopy.version attribute.', DeprecationWarning) return self.version
Return phonopy release version number.
phonopy/api_phonopy.py
get_version
MSimoncelli/phonopy
127
python
def get_version(self): warnings.warn('Phonopy.get_version() is deprecated.Use Phonopy.version attribute.', DeprecationWarning) return self.version
def get_version(self): warnings.warn('Phonopy.get_version() is deprecated.Use Phonopy.version attribute.', DeprecationWarning) return self.version<|docstring|>Return phonopy release version number.<|endoftext|>
b61b9511b3e99a3efa1508fd5c941c29545fada451479fbbeb7f22f5b81c337f
@property def primitive(self) -> Primitive: 'Return primitive cell.\n\n Primitive\n Primitive cell.\n\n ' return self._primitive
Return primitive cell. Primitive Primitive cell.
phonopy/api_phonopy.py
primitive
MSimoncelli/phonopy
127
python
@property def primitive(self) -> Primitive: 'Return primitive cell.\n\n Primitive\n Primitive cell.\n\n ' return self._primitive
@property def primitive(self) -> Primitive: 'Return primitive cell.\n\n Primitive\n Primitive cell.\n\n ' return self._primitive<|docstring|>Return primitive cell. Primitive Primitive cell.<|endoftext|>