Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ProjectUnifree/unifree
/ functions
Functions
205 in github.com/ProjectUnifree/unifree
⨍
Functions
205
◇
Types & classes
35
↓ 10 callers
Function
_normalize_definition
(s: str)
tests/test_csharp_migration_strategies.py:310
↓ 9 callers
Method
create_destination_file_path
(self, extension: str)
unifree/csharp_migration_strategies.py:98
↓ 9 callers
Function
to_default_dict
(d)
unifree/utils.py:69
↓ 7 callers
Function
_load_file_migration_spec
(source_file_name: str)
tests/test_csharp_migration_strategies.py:289
↓ 7 callers
Method
translate_code
(self, code: str, prompt_type: str, system: str, extractor_fn: Callable[[str], ResultType])
unifree/csharp_migration_strategies.py:166
↓ 4 callers
Method
count_tokens
Count number of tokens for the given source text :param source_text: Text to count tokens in :return: Number of tokens
unifree/__init__.py:89
↓ 4 callers
Method
create_prompt
(self, prompt_type: str, replacements: Dict[str, str])
unifree/csharp_migration_strategies.py:175
↓ 4 callers
Method
fits_in_one_prompt
Check if the given token count fits into one prompt :param token_count: Token count to check :return: True if this token coun
unifree/__init__.py:81
↓ 3 callers
Method
_to_user_prompt
(self, user: str)
unifree/llms/huggingface_llm.py:74
↓ 3 callers
Function
load_llm
(config: Dict)
unifree/utils.py:53
↓ 3 callers
Method
maybe_convert_tabs_and_spaces
(self, source: str)
unifree/csharp_migration_strategies.py:121
↓ 3 callers
Method
save_content
(self, content: str, target_file_path: str)
unifree/csharp_migration_strategies.py:132
↓ 2 callers
Method
__init__
( self, source_path: str, destination_path: str, config: Dict,
unifree/project_migration_strategies.py:32
↓ 2 callers
Method
__init__
(self, file_migration_spec: FileMigrationSpec, config: Dict)
unifree/csharp_migration_strategies.py:151
↓ 2 callers
Method
_c_sharp_library_path
(cls)
unifree/source_code_parsers.py:67
↓ 2 callers
Function
_setup_test_config
(target)
tests/test_csharp_migration_strategies.py:314
↓ 2 callers
Method
_upsert_translations
(self, translations: Iterable[KnownTranslation])
unifree/known_translations_db.py:139
↓ 2 callers
Method
create_code_prompt
(self, prompt_type: str, code: str)
unifree/csharp_migration_strategies.py:172
↓ 2 callers
Method
execute
(self)
tests/test_csharp_migration_strategies.py:17
↓ 2 callers
Method
execute
(self)
unifree/project_migration_strategies.py:58
↓ 2 callers
Method
fetch_nearest_as_query_history
(self, query: str, count: Optional[int] = None)
unifree/known_translations_db.py:49
↓ 2 callers
Method
fetch_nearest_known_translations
(self, query: str, count: Optional[int] = None)
unifree/known_translations_db.py:73
↓ 2 callers
Method
initialize
(self)
tests/test_csharp_migration_strategies.py:253
↓ 2 callers
Method
initialize
Initialize the LLM
unifree/__init__.py:75
↓ 2 callers
Method
initialize
(self)
unifree/llms/multiprocess_local_llm.py:42
↓ 2 callers
Method
is_instance_initialized
(cls)
unifree/known_translations_db.py:169
↓ 2 callers
Method
map_concurrently
(self, fn, iterables, **tqdm_kwargs)
unifree/project_migration_strategies.py:21
↓ 2 callers
Method
query
Query LLM with the provided input. :param user: The actual query. :param system: "System" query. Some LLMs support ins
unifree/__init__.py:63
↓ 1 callers
Method
_check_if_source_is_unity_project
(self)
unifree/project_migration_strategies.py:142
↓ 1 callers
Method
_create_migration_strategy
(self, strategy_name: str, spec: FileMigrationSpec)
unifree/project_migration_strategies.py:127
↓ 1 callers
Method
_create_sentence_transformer
(self, translations_config: Dict)
unifree/known_translations_db.py:118
↓ 1 callers
Method
_initialize_shared_objects
(self)
unifree/project_migration_strategies.py:135
↓ 1 callers
Function
_load_source_file
(source_file_name: str)
tests/test_csharp_migration_strategies.py:303
↓ 1 callers
Method
_load_source_file_paths
(self)
unifree/project_migration_strategies.py:88
↓ 1 callers
Method
_replace_macros_with_comments
(self, source_str)
unifree/source_code_parsers.py:71
↓ 1 callers
Method
_upsert_translations_from_yaml
(self, target_engine: str)
unifree/known_translations_db.py:123
↓ 1 callers
Method
appWillOpenUrl
(string url)
tests/resources/LongClassWithNamespace.cs:332
↓ 1 callers
Method
count_tokens
(self, source_text: str)
unifree/llms/multiprocess_local_llm.py:69
↓ 1 callers
Method
count_tokens
(self, source_text: str)
unifree/llms/chatgpt_llm.py:89
↓ 1 callers
Method
execute
(self)
unifree/project_migration_strategies.py:158
↓ 1 callers
Function
extract_first_source_code
Parse response and find the first occurrence of text separated with `code_delimiter` :param response: Response from the model :par
unifree/llms/code_extrators.py:9
↓ 1 callers
Function
extract_header_implementation
This is a hacky attempt to parse ChatGPT response that contain both header an implementation. Sometimes the result would be something like:
unifree/llms/code_extrators.py:31
↓ 1 callers
Method
fits_in_one_prompt
(self, token_count: int)
unifree/llms/multiprocess_local_llm.py:65
↓ 1 callers
Function
get_or_create_global_instance
(name: str, new_instance_creator: Callable[[], InstanceType])
unifree/utils.py:88
↓ 1 callers
Method
initialize
(self)
unifree/known_translations_db.py:96
↓ 1 callers
Method
initialize
(cls)
unifree/source_code_parsers.py:27
↓ 1 callers
Method
initialize_instance
(cls, config: Dict)
unifree/known_translations_db.py:173
↓ 1 callers
Method
instance
(cls)
unifree/known_translations_db.py:162
↓ 1 callers
Method
is_success
(self)
unifree/llms/multiprocess_local_llm.py:105
↓ 1 callers
Function
load_class
(class_name: str, module: str)
unifree/utils.py:42
↓ 1 callers
Method
load_llm
Load target LLM. Please note: this method is separate for unit tests to be able to override it :return: Newly loaded LLM
unifree/csharp_migration_strategies.py:202
↓ 1 callers
Method
load_translation_history
Load translation history that is relevant to the given bit of translated code. :param code: Code that will be translated
unifree/csharp_migration_strategies.py:186
↓ 1 callers
Method
maybe_initialize_shared_executor
(cls, config: Dict)
unifree/llms/multiprocess_local_llm.py:74
↓ 1 callers
Function
migrate
()
unifree/free.py:73
↓ 1 callers
Method
migrations
(self)
unifree/project_migration_strategies.py:55
↓ 1 callers
Method
parse
(self, file_path: str)
unifree/source_code_parsers.py:41
↓ 1 callers
Method
query
(self, user: str, system: Optional[str] = None, history: Optional[List[QueryHistoryItem]] = None)
tests/test_csharp_migration_strategies.py:243
↓ 1 callers
Method
query
(self, user: str, system: Optional[str] = None, history: Optional[List[QueryHistoryItem]] = None)
unifree/llms/multiprocess_local_llm.py:48
↓ 1 callers
Method
replace_spaces_with_tabs
(s: str)
unifree/csharp_migration_strategies.py:144
↓ 1 callers
Method
replace_tabs_with_spaces
(s: str)
unifree/csharp_migration_strategies.py:140
↓ 1 callers
Function
run_migration
( config: str, source: str, destination: str, llm_secret_key: Optional[str] =
unifree/free.py:16
↓ 1 callers
Method
start
(AdjustConfig adjustConfig)
tests/resources/LongClassWithNamespace.cs:168
Method
AdjustAdRevenue
(string source)
tests/resources/ShortClassNoNamespace.cs:17
Method
AdjustAdRevenue
(string source)
tests/resources/ShortClassWithNamespace.cs:18
Method
Awake
()
tests/resources/LongClassWithNamespace.cs:91
Method
GetAuthorizationStatus
(string authorizationStatus)
tests/resources/LongClassWithNamespace.cs:1124
Method
GetNativeAttribution
(string attributionData)
tests/resources/LongClassWithNamespace.cs:942
Method
GetNativeConversionValueUpdated
(string conversionValue)
tests/resources/LongClassWithNamespace.cs:1043
Method
GetNativeDeferredDeeplink
(string deeplinkURL)
tests/resources/LongClassWithNamespace.cs:1027
Method
GetNativeEventFailure
(string eventFailureData)
tests/resources/LongClassWithNamespace.cs:976
Method
GetNativeEventSuccess
(string eventSuccessData)
tests/resources/LongClassWithNamespace.cs:959
Method
GetNativeSessionFailure
(string sessionFailureData)
tests/resources/LongClassWithNamespace.cs:1010
Method
GetNativeSessionSuccess
(string sessionSuccessData)
tests/resources/LongClassWithNamespace.cs:993
Method
GetNativeSkad4CompletionDelegate
(string message)
tests/resources/LongClassWithNamespace.cs:1105
Method
GetNativeSkad4ConversionValueUpdated
(string conversionValueUpdate)
tests/resources/LongClassWithNamespace.cs:1066
Method
GetNativeSkadCompletionDelegate
(string message)
tests/resources/LongClassWithNamespace.cs:1086
Method
GetNativeVerificationInfo
(string verificationInfoData)
tests/resources/LongClassWithNamespace.cs:1144
Method
IsEditor
()
tests/resources/LongClassWithNamespace.cs:1162
Method
OnApplicationPause
(bool pauseStatus)
tests/resources/LongClassWithNamespace.cs:136
Method
SetTestOptions
(Dictionary<string, string> testOptions)
tests/resources/LongClassWithNamespace.cs:1172
Method
__init__
(self, config: Dict)
unifree/project_migration_strategies.py:18
Method
__init__
(self, strategies: List[MigrationStrategy], config: Dict)
unifree/project_migration_strategies.py:153
Method
__init__
(self, config: Dict)
unifree/__init__.py:27
Method
__init__
(self, config: Dict)
unifree/__init__.py:59
Method
__init__
(self, config: Dict)
unifree/known_translations_db.py:43
Method
__init__
(self, config: Dict)
unifree/source_code_parsers.py:19
Method
__init__
(self, file_migration_spec: FileMigrationSpec, config: Dict)
unifree/csharp_migration_strategies.py:26
Method
__init__
(self, file_migration_spec: FileMigrationSpec, destination: Dict)
unifree/csharp_migration_strategies.py:214
Method
__init__
(self, config: Dict)
unifree/llms/huggingface_llm.py:27
Method
__init__
(self, config: Dict)
unifree/llms/multiprocess_local_llm.py:37
Method
__init__
(self, config: Dict)
unifree/llms/trivial_llm.py:24
Method
__init__
(self, config: Dict)
unifree/llms/chatgpt_llm.py:31
Method
__str__
(self)
unifree/csharp_migration_strategies.py:253
Method
__str__
(self)
unifree/csharp_migration_strategies.py:305
Method
_execute_strategy
(self, strategy: MigrationStrategy)
unifree/project_migration_strategies.py:180
Method
_map_file_path_to_migration
(self, file_path: str)
unifree/project_migration_strategies.py:109
Function
_multi_process_worker_init
(config: Dict)
unifree/llms/multiprocess_local_llm.py:112
Function
_multi_process_worker_translate
(query: _QueryRequest)
unifree/llms/multiprocess_local_llm.py:123
Function
_return_none
()
unifree/utils.py:78
Method
_upsert_translations_from_yaml
(self, language: str)
tests/test_known_translations_db.py:13
next →
1–100 of 205, ranked by callers