Nikos Atlas 2 anni fa
parent
commit
2a78044b30
10 ha cambiato i file con 143 aggiunte e 0 eliminazioni
  1. 8 0
      .idea/.gitignore
  2. 8 0
      .idea/modules.xml
  3. 6 0
      .idea/vcs.xml
  4. 14 0
      .idea/word-recommender.iml
  5. 1 0
      __tests__/test.py
  6. 60 0
      document.txt
  7. 16 0
      main.py
  8. 4 0
      requirements.txt
  9. 12 0
      setup.py
  10. 14 0
      src/playground.py

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/word-recommender.iml" filepath="$PROJECT_DIR$/.idea/word-recommender.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 14 - 0
.idea/word-recommender.iml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="jdk" jdkName="Python 3.8 (word-recommender)" jdkType="Python SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+  <component name="PackageRequirementsSettings">
+    <option name="requirementsPath" value="" />
+  </component>
+  <component name="TestRunnerService">
+    <option name="PROJECT_TEST_RUNNER" value="pytest" />
+  </component>
+</module>

+ 1 - 0
__tests__/test.py

@@ -0,0 +1 @@
+

+ 60 - 0
document.txt

@@ -0,0 +1,60 @@
+- AdSerializer
+
+/**
+ * Escapes a string for use in a regular expression.
+ */
+static escape(text: string): string
+
+/**
+ * Regex for redacted phone numbers with extra info for Baan-kaidee (TO BE REMOVED).
+ */
+const PHONE_PLACEHOLDER_NUMBER: RegExp = /\[redacted phone number\](#{0,1}\(([()_\-+\d ]*)\)){0,1}/;
+
+PHONE_NUMBER_REGEX_BAAN_KAIDEE
+PHONE_NUMBER_REGEX_WITH
+
+/**
+Renders a description text with placeholders in it
+for phone numbers and e-mail addresses.
+The placeholders are replaced with links. Phone number
+placeholders get a link that opens a dialog with
+the phone number in it and the e-mail addresses
+get replaced with a link that brings the contact
+form into focus.
+ */
+class DescriptionText extends React.Component<Props, State>
+
+/**
+ * Build time settings.
+ * Those settings are replaced with their value when the bundle is built and are not changed after the bundle is built.
+ * WARNING: ALL OF THE VARIABLES HERE ARE PUBLICLY AVAILABLE. DO NOT INCLUDE SECRETS HERE.
+ */
+const getBuildSettings = () =>
+
+/**
+ * Single Setting Dialog for desktop version.
+ */
+var SingleSettingDialog = function SingleSettingDialog(props)
+
+/**
+ * Method to call when the e-mail is sent.
+ */
+onSendEmailClick?: (
+
+/**
+ * Attempts to preload the form fields with previously values from the
+ * session storage. Sanitizes for `name, email, phone, message` fields.
+ */
+const filterAndSanitize = (values: Values): Object =>
+
+/**
+ *  Stick element after scroll passed the element. "scrollTop < element.scrollTop + element.height"
+ *  If neither stickBefore, nor stickAfter is specified the element will stick when "scrollTop > element.scrollTop + element.height"
+ */
++stickAfter?
+
+/**
+ * Zoom levels for the layer.
+ */
+zoomLevels: ZoomLevelType
+

+ 16 - 0
main.py

@@ -0,0 +1,16 @@
+# This is a sample Python script.
+
+# Press ⌃R to execute it or replace it with your code.
+# Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings.
+
+
+def print_hi(name):
+    # Use a breakpoint in the code line below to debug your script.
+    print(f'Hi, {name}')  # Press ⌘F8 to toggle the breakpoint.
+
+
+# Press the green button in the gutter to run the script.
+if __name__ == '__main__':
+    print_hi('PyCharm')
+
+# See PyCharm help at https://www.jetbrains.com/help/pycharm/

+ 4 - 0
requirements.txt

@@ -0,0 +1,4 @@
+setuptools==60.5.0
+spacy==3.2.1
+
+# python -m spacy download en_core_web_trf

+ 12 - 0
setup.py

@@ -0,0 +1,12 @@
+from setuptools import setup
+
+setup(
+    name='word-recommender',
+    version='0.0.1',
+    packages=['pytest'],
+    url='',
+    license='',
+    author='nikatlas',
+    author_email='[email protected]',
+    description='Variable name generator'
+)

+ 14 - 0
src/playground.py

@@ -0,0 +1,14 @@
+import spacy
+from spacy import displacy
+
+nlp = spacy.load("en_core_web_trf")
+
+
+def test_something(text):
+    doc = nlp(text)
+
+    displacy.serve(doc, style="dep", port=5001)
+
+
+# test_something('Regex for redacted phone numbers with extra info for Baan-kaidee (TO BE REMOVED).')
+test_something('makes a good correct number')