This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import copy | |
| import csv | |
| import json | |
| import socket | |
| import time | |
| import urllib.request | |
| socket.setdefaulttimeout(30) | |
| id_file = '1.csv' #insert your input filename | |
| clientid = '' #insert your actual Facebook app client id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version='1.0' encoding='utf-8'?> | |
| <realty-feed xmlns="http://webmaster.yandex.ru/schemas/feed/realty/2010-06"> | |
| <generation-date>2019-06-06T11:18:43.2790075Z</generation-date> | |
| <offer internal-id="11754908512"> | |
| <type>продажа</type> | |
| <property-type>жилая</property-type> | |
| <category>cottage</category> | |
| <url>https://www.avito.ru/perm/doma_dachi_kottedzhi/dacha_80_m_na_uchastke_5_sot._1175490857</url> | |
| <creation-date>2019-06-03 21:02:21</creation-date> | |
| <location> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This program is free software; you can redistribute it and/or modify | |
| // it under the terms of the GNU General Public License as published by | |
| // the Free Software Foundation; either version 2 of the License, or | |
| // (at your option) any later version. | |
| // | |
| // This program is distributed in the hope that it will be useful, | |
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| // GNU General Public License for more details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| #include <sstream> | |
| #include <string.h> | |
| #include <chrono> | |
| #include <math.h> | |
| #ifdef __APPLE__ | |
| #include <OpenCL/cl.h> | |
| #else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import itertools | |
| hh = list(itertools.product([0, 1], repeat=9)) | |
| a = "101101101" | |
| b = "001011001" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import traceback | |
| def is_odd(number): | |
| return number % 2 == 0 | |
| def check_input(number): | |
| if number <= 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Request | |
| POST api/registration | |
| json body: | |
| { | |
| user_name : "Ivan", | |
| user_email : "[email protected]", | |
| user_password : "1234qwerQWER" | |
| } | |
| Response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.naive_bayes import GaussianNB | |
| cv = CountVectorizer(ngram_range=(1, 5)) | |
| X = cv.fit_transform(X_train) | |
| X_t = cv.transform(X_test) | |
| clf = GaussianNB() | |
| clf.fit(X.toarray(), y_train) | |
| y_pred = clf.predict(X_t.toarray()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 08-29 15:12:31.569 29551-29551/com.dbulgakov.task1 D/Measuring info: onMeasure in CustomViewGroup call | |
| 08-29 15:12:31.570 29551-29551/com.dbulgakov.task1 D/Measuring info: onMeasure call for 1 | |
| 08-29 15:12:31.570 29551-29551/com.dbulgakov.task1 D/Measuring info: onMeasure call for 3 | |
| 08-29 15:12:31.571 29551-29551/com.dbulgakov.task1 D/Measuring info: onMeasure call for 2 | |
| 08-29 15:12:31.607 29551-29551/com.dbulgakov.task1 D/Measuring info: onMeasure in CustomViewGroup call |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 8-24 09:55:11.460 9696-9696/com.dbulgakov.task1 E/AndroidRuntime: FATAL EXCEPTION: main | |
| Process: com.dbulgakov.task1, PID: 9696 | |
| java.lang.ClassCastException: android.view.ViewGroup$LayoutParams cannot be cast to android.view.ViewGroup$MarginLayoutParams | |
| at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6111) | |
| at com.dbulgakov.task1.CustomViewGroup.onMeasure(CustomViewGroup.java:66) | |
| at android.view.View.measure(View.java:19730) | |
| at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) | |
| at android.widget.F |
NewerOlder