This file contains 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
<?php | |
/* | |
1.correct add to MySqlBase | |
2.Security, anti-injection | |
*/ | |
//DB | |
mysql_connect('localhost', 'diflog', '2ghqercds8') or die("couldn't connect to db1: " . mysql_error()); | |
mysql_select_db("db") or die("couldn't select db2: " . mysql_error()); |
This file contains 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"?> | |
<project version="4" /> | |
This file contains 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
<link rel="import" href="../paper-toast/paper-toast.html"> | |
<link rel="import" href="../topeka-elements/topeka-datasource.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../paper-item/paper-item.html"> | |
<link rel="import" href="../paper-ripple/paper-ripple.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> |
This file contains 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 urllib import request | |
import json | |
def translate_from_polish_to_english(word_to_translate): | |
req = request.urlopen( | |
'https://glosbe.com/gapi/translate?from=pol&dest=eng&format=json&phrase=%s' % word_to_translate) | |
encoding = req.headers.get_content_charset() | |
json_result = json.loads(req.read().decode(encoding)) | |
translated_word = json_result['tuc'][0]['meanings'][0]['text'] |
This file contains 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
def activation(self, inputs_row): | |
# dot product calc | |
rez = 0 | |
for w, i in zip(self.weights, inputs_row): | |
rez += w * i | |
if rez >= 0: | |
return 1 | |
else: | |
return 0 |
This file contains 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
def activation(self, inputs_row): | |
# dot product calc | |
# inputs_row example = [-0.81239265210117029, 0.85921322532026534, -1, 1] | |
rez = 0 | |
for w, i in zip(self.weights, inputs_row): | |
rez += w * i | |
if rez >= 0: | |
return 1 | |
else: |
This file contains 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 urllib import request | |
import json | |
def translate_from_polish_to_english(word_to_translate): | |
req = request.urlopen( | |
'https://glosbe.com/gapi/translate?from=pol&dest=eng&format=json&phrase=%s' % word_to_translate) | |
encoding = req.headers.get_content_charset() | |
json_result = json.loads(req.read().decode(encoding)) | |
translated_word = json_result['tuc'][0]['meanings'][0]['text'] |
This file contains 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
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../topeka-elements/avatars.html"> | |
<link rel="import" href="../topeka-elements/category-icons.html"> | |
<polymer-element name="my-element"> |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Web; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using RestSharp; |
This file contains 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
:- dynamic i_am_at/1, is_at/2, i_have/1. | |
:- retractall(is_at(_, _)), retractall(i_am_at(_)). | |
/* start point*/ | |
i_am_at(academy). | |
/* description of ways to go*/ |
OlderNewer