repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Rohit-dev-coder/MyPythonCodes | 7,834,020,349,528 | fe2cf78ce9e1aeea0eff879d0b0cb72927043731 | 7de2bc9c439bb14f45840dbe9535cb4c65b87320 | /upperorlowerletter.py | f7282e4a3993d273f6aa33b9b211962d5ad3086c | [] | no_license | https://github.com/Rohit-dev-coder/MyPythonCodes | 51899330ddec120abd3340da4130ac375b74ba25 | 986fb8d9f40a55d2718563fb2ece3088f49f813b | refs/heads/master | 2020-06-29T08:11:21.971783 | 2019-08-04T11:00:04 | 2019-08-04T11:00:04 | 200,481,704 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ch = input("Enter a Character : ")
ch = ch[0]
if "A" <= ch <="Z":
print("Character is Upper")
elif "0" <= ch <= "9":
print("Character is Number")
else:
print("Character is lower")
| UTF-8 | Python | false | false | 189 | py | 43 | upperorlowerletter.py | 42 | 0.57672 | 0.560847 | 0 | 8 | 22.625 | 34 |
carriercomm/Trieste | 17,841,294,180,890 | 9bd60d09008239bb428329e8e5ea94f3e86c2e35 | ad4decd93a1baaf700eaee3f4a62085e30765c84 | /Trieste/vice/vicedata.py | 65b56a281768be8a73f4a7be4769de9635c5d60b | [] | no_license | https://github.com/carriercomm/Trieste | ca666a3cee249f247cc26dcb39d2ce738a394e2f | 5891cc1c02f4df9b460c00965c0c5f93f7734d3f | refs/heads/master | 2018-02-06T15:36:22.411758 | 2016-02-24T18:10:04 | 2016-02-24T18:10:04 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ###########################################################################
# Copyright (C) 2003 by Marcos Dione
# <mdione@grulic.org.ar>
#
# Copyright: See COPYING file that comes with this distribution
#
###########################################################################
from bsddb import hashopen
from... | UTF-8 | Python | false | false | 14,734 | py | 37 | vicedata.py | 34 | 0.558708 | 0.552464 | 0 | 495 | 28.765657 | 143 |
niezongxia/personal | 18,090,402,275,959 | 7b9bbbd859ee869cf138338ec432341ac235b55f | 01cfe7cd0f1d24e1224f52b15cf86f223b52692d | /python/code/wait/read_excel.py | ef28a7202b54905ed44c7de1352a03f93be374f2 | [] | no_license | https://github.com/niezongxia/personal | a782397068bc2be6cae5e4cac0a0ee9ff4927443 | ff70eb1dba1cc8ac47b863e55533902bec1604e1 | refs/heads/master | 2022-10-02T14:36:20.163143 | 2022-08-27T14:09:25 | 2022-08-27T14:09:25 | 143,152,875 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #read_excel.py
import xlrd
fname="C:/Users/NZX/Desktop/test.xls"
rbook=xlrd.open_workbook(fname)
#row_value=xls_sheet.row_values(num-1)
#cow_value=xls_sheet.col_values(num-1)
rows=rbook.sheets()[0].nrows#获取已有行数
cols=rbook.sheets()[0].ncols#获取已有列数
for row in rows:
value=rbook.cell_value(row,1)
print(valu... | UTF-8 | Python | false | false | 347 | py | 25 | read_excel.py | 25 | 0.718266 | 0.702786 | 0 | 19 | 16 | 38 |
KouheiFurukawa/atcoder-back-number | 5,093,831,240,944 | 25b13fe4b92ae9c83a8f227eb508164e2e4a8a39 | b27b0bcd22973d029688ea3f10c9abfe651800a4 | /abc137/abc_137_c.py | 8c35b7c06b10186c08102d4a0a323e50017c0777 | [] | no_license | https://github.com/KouheiFurukawa/atcoder-back-number | 8f6b7c6704bc6fb32bb8ca9ccc9971650c0fdf8f | 2fe11830614bf2ce64ee7947734043fe47800277 | refs/heads/master | 2020-06-03T13:45:54.531015 | 2020-05-17T05:53:39 | 2020-05-17T05:53:39 | 191,591,257 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sys import stdin
N = int(stdin.readline().rstrip())
S = [stdin.readline().rstrip() for _ in range(N)]
count = {}
for s in S:
s = ''.join(sorted(s))
if s not in count:
count[s] = 1
else:
count[s] += 1
ans = 0
for c in count:
if count[c] > 1:
ans += count[c] * (count[c] - 1... | UTF-8 | Python | false | false | 339 | py | 237 | abc_137_c.py | 235 | 0.519174 | 0.501475 | 0 | 19 | 16.842105 | 49 |
olivercalder/scherzi | 12,034,498,374,276 | 45567a122cc837e49dc26ee2bb74300de368f8fe | 32a8b94476ab9fcb4c3896ebd1ac050d5389ab52 | /44.py | 27af49538181cd34a190bc5249829326c23e3670 | [] | no_license | https://github.com/olivercalder/scherzi | abf408c27a48dc3122b451768de76b937f2f0886 | 5a1fb78bf024d5176c0e100a818cc7205b135281 | refs/heads/master | 2022-05-02T17:12:26.138819 | 2022-04-26T04:00:26 | 2022-04-26T04:00:26 | 212,889,121 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def add_link(path, n):
if len(path) == 2*n:
return [path]
new_paths = []
if path.count('u') < n:
u_path = path.copy()
u_path.append('u')
new_paths += add_link(u_path, n)
if path.count('r') < n:
r_path = path.copy()
r_path.append('r')
new_paths += a... | UTF-8 | Python | false | false | 823 | py | 49 | 44.py | 41 | 0.487242 | 0.471446 | 0 | 36 | 21.861111 | 59 |
adderan/VBS | 5,050,881,548,698 | 0a79c2f38e8dea61f0ffeb0b962ce57318e71aaa | a598a793998408416107615717eafa96c4efcd18 | /DelphesResolution/scripts/res_formula.py | 22d0df13ce7ec359f64fb67fee340d2ffc8aa67d | [] | no_license | https://github.com/adderan/VBS | f1bce5ed36eb65fdcbe5778746752ef6b3cb6157 | 85ae92d48797f4f3d91e14345f788a9cfb200cbc | refs/heads/master | 2016-02-24T17:54:51.557152 | 2015-02-24T06:15:55 | 2015-02-24T06:15:55 | 26,232,911 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math, formula_reader
def jet_res(PT, Eta, pileup = 0):
parameters = args.parameters.readlines()
a = None
b = None
S = None
C = None
#print "Eta = " + str(Eta)
for line in parameters:
#print(line)
pars = line.split()
etaregion = float(pars[0])
a = float(pars[1])
b = float(pars[2])
S = float(... | UTF-8 | Python | false | false | 1,344 | py | 9 | res_formula.py | 5 | 0.634673 | 0.584077 | 0 | 45 | 28.822222 | 81 |
iamtrueline/Programmers | 438,086,678,681 | e9f725da941f5c2a3320fbfd863efd31cf019697 | 9eacf21048e9224443d7a7775497adf824f5549b | /Python/조이스틱.py | 53c45f09c6a521e09c24a0238b6e693fb5ba4b1d | [] | no_license | https://github.com/iamtrueline/Programmers | fb0eb29046ba813aa532a35b474ae8349c827e62 | ac19a3999cc46c748593ab9e08f4d14a13579312 | refs/heads/main | 2023-06-26T05:34:44.899022 | 2021-07-30T03:23:02 | 2021-07-30T03:23:02 | 380,900,305 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def solution(name):
answer = 0
change = [min(ord(i)-ord('A'), ord('Z')-ord(i)+1) for i in name]
idx = 0
while True:
answer += change[idx]
change[idx]=0
left = 1
right = 1
if sum(change)== 0:
return answer
while change[idx- left] ... | UTF-8 | Python | false | false | 526 | py | 40 | 조이스틱.py | 39 | 0.452471 | 0.431559 | 0 | 23 | 21.869565 | 68 |
luoxz/GID_Internal | 730,144,482,669 | d864ae640e6a82699c7635c16bfc6ef0dc5b98f9 | 0010f2f71aa04595ecbc84691f330c185f5c7356 | /test/client/test_dev_server.py | 87f883bd62c84d3f91aa028690e9f8f8b9f8a636 | [
"MIT"
] | permissive | https://github.com/luoxz/GID_Internal | e38be906f255931e6ef2a1a03695ee33db3f804b | 452cca7543d80f31c8f659709d9143ecc1d8eb93 | refs/heads/master | 2021-01-16T00:56:26.411020 | 2017-07-18T18:55:01 | 2017-07-18T18:55:01 | 99,984,036 | 1 | 0 | null | true | 2017-08-11T02:37:40 | 2017-08-11T02:37:40 | 2017-07-12T20:35:47 | 2017-07-18T18:57:01 | 35,094 | 0 | 0 | 0 | null | null | null | '''
Test the correctness of the dev server, which simulates the functions of unrealcv server in python
'''
import threading, time, socket, unittest, logging, sys
if (sys.version_info > (3, 0)):
import socketserver as SocketServer
else:
import SocketServer
from dev_server import MessageServer, MessageTCPHandler
... | UTF-8 | Python | false | false | 1,460 | py | 42 | test_dev_server.py | 22 | 0.664384 | 0.656164 | 0 | 51 | 27.627451 | 98 |
cowcai1988/-Poi- | 2,851,858,305,504 | 38cdd581f1d5dd18c739e4d8b6a4324bf79a08e1 | 50e03c155e196a2d645b7b0d1849e80e495d0a36 | /yongdushuju.py | c4817d8537508cef81f3926491a93310b9607677 | [] | no_license | https://github.com/cowcai1988/-Poi- | 8f36938880ecfbe3c82f30febeb6bf05caaeadb1 | 764b08961a6343b1760a76c6d22da3880fd581d1 | refs/heads/master | 2020-07-26T06:01:26.036224 | 2019-05-20T07:34:37 | 2019-05-20T07:34:37 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
import json
import time
import pymysql
import threading
from pandas import DataFrame
def getGaodeTrafficStatus(key,furl,currentTime):
insert_list = []
TrafficStatusUrl = furl
res = requests.get(url=TrafficStatusUrl).content
res=res.decode("utf-8")
total_json = json.loads(r... | UTF-8 | Python | false | false | 3,165 | py | 2 | yongdushuju.py | 1 | 0.530619 | 0.479962 | 0 | 72 | 41.319444 | 189 |
jiaweiM/PythonNotes | 18,433,999,657,422 | 337516b42f7349c093905f2bff8b8e7aa936b09a | ae6e9d7ab3795d7580ba2d8dfa796e28d94e315c | /src/ml_test/lr_1.py | 388019e9e0b5e24abbde492f5e1b96621fbeaeb4 | [] | no_license | https://github.com/jiaweiM/PythonNotes | 302a3c6d04638628a94a5ccd96b848258c23653c | 66227b740cd05d61d77f1cd57a5f4e39f7c1a26f | refs/heads/master | 2021-09-22T08:47:42.956762 | 2021-09-14T07:44:19 | 2021-09-14T07:44:19 | 246,194,973 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import pandas as pd
import tensorflow as tf
california_housing_dataframe = pd.read_csv("../datasets/california_housing_train.csv", sep=",")
california_housing_dataframe = california_housing_dataframe.reindex(
np.random.permutation(california_housing_dataframe.index))
california_housing_dataframe... | UTF-8 | Python | false | false | 1,061 | py | 393 | lr_1.py | 177 | 0.787936 | 0.766258 | 0 | 26 | 39.807692 | 95 |
shahrulkamil98/183DB-Capstone | 9,646,496,590,658 | c0b38865460ad5ef2ab7ab882e12598308b95667 | fca8c4124dfbec8975385df924b010829be38a2e | /Demo/Demo/controllers/computer/computer.py | 94b9bd0f7e1303090aaecbdb95b9a35bd49399e8 | [] | no_license | https://github.com/shahrulkamil98/183DB-Capstone | 37a2b56dfbec50488ba44b7f0e9d2dc666700930 | 4e8dab3e00e55dc8e2dc9242e7c52a4220176b48 | refs/heads/main | 2023-06-01T16:18:50.144327 | 2021-06-12T01:52:30 | 2021-06-12T01:52:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # computer.py
from controller import *
receiverRobot = Robot()
TIME_STEP = int(receiverRobot.getBasicTimeStep())
computer_receiver = receiverRobot.getDevice('computer_receiver')
computer_emitter = receiverRobot.getDevice('computer_emitter')
computer_receiver.enable(TIME_STEP)
t = 0
while(t<1000):
receiverRobot.ste... | UTF-8 | Python | false | false | 741 | py | 20 | computer.py | 7 | 0.755735 | 0.735493 | 0 | 31 | 22.935484 | 64 |
Rao-Varun/gamerbuddy | 16,630,113,372,195 | cedb0416e5b1158c0ff2d6eed89c619e9972486e | 2dd7a5964e6333217fb816e8164f120d612c6098 | /venv/Lib/site-packages/nltk/test/unit/test_wordnet.py | f83dbcca93d26ed64124b4e9ce8e431b8a1f0b6a | [] | no_license | https://github.com/Rao-Varun/gamerbuddy | ab8cf2ab19f113edc1a3b0626c8645a30b910fcd | 01517ead2685789a4de73a5d696c33c30b2fc6d2 | refs/heads/master | 2020-05-02T00:48:34.195704 | 2019-05-09T00:00:48 | 2019-05-09T00:00:48 | 177,677,039 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:09c70093103df502db9a37d82de634943533749942d07e818f46a81529abe41f
size 7066
| UTF-8 | Python | false | false | 129 | py | 250 | test_wordnet.py | 228 | 0.883721 | 0.457364 | 0 | 3 | 42 | 75 |
redbrick/rbvm-libvirt | 15,238,544,002,141 | 3b322126145960ab7db87eb15a4c5f2bc7b0df77 | 462b8d696e9e05322ba0b48568768bf1b5850513 | /rbvm/model/database.py | 9f7b31c192687b429965b33908fba44a94616642 | [] | no_license | https://github.com/redbrick/rbvm-libvirt | fbedd656d8a3fbcf84fb20e7ae7286b042a8b69a | bd6f75964fb2f01cb5bb3d6facfc0857e4c3d11c | refs/heads/master | 2021-01-22T06:18:38.589221 | 2017-05-26T19:56:51 | 2017-05-26T19:56:51 | 92,536,318 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
import sqlalchemy
import random
import string
import hashlib
import os
import base64
import datetime
import libvirt
from sqlalchemy import Table,Column,MetaData,ForeignKey
from sqlalchemy.schema import Sequence, ForeignKeyConstraint
from sqlalchemy import Integer,String,DateTime,Unicode,SmallInteger,Tex... | UTF-8 | Python | false | false | 6,766 | py | 41 | database.py | 35 | 0.602128 | 0.593704 | 0 | 235 | 27.791489 | 125 |
apeckman/PennApps2015 | 13,950,053,825,335 | 4c4ddf8b1ac08434123b1c9d3533572335546caf | 0548becc751743b9243fe99eb6c68ad4b835649e | /bae/stocks/PythonAlg/Ftl.py | 3760d8b1421221bd2355f70124a7e35c71a9fbb8 | [] | no_license | https://github.com/apeckman/PennApps2015 | 0deda7cccc026dffdd699ceef1a61ce76cf90042 | 0f88b64fea91dbbe0c39348424788c435a580e27 | refs/heads/master | 2021-01-15T19:28:00.989846 | 2015-09-06T10:35:37 | 2015-09-06T10:35:37 | 41,937,692 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
class Ftl(object):
exp = []
algWeight = 1.0
name = 'FTL'
def __init__(self):
self.exp = []
def getName(self):
return self.name
def getWeight(self):
return self.algWeight
def setWeight(self,_weight):
self.algWeight = _weight
def add(self, e):
self.exp.append(e)
def ftl(self):
name ... | UTF-8 | Python | false | false | 447 | py | 31 | Ftl.py | 20 | 0.61745 | 0.612975 | 0 | 30 | 13.8 | 29 |
PyBeaner/IntroductionToAlgorithms | 8,040,178,818,791 | e8a4c70ba654c1010aca17e540592f948fcf3d98 | 896c93a239de381c40151832b4d07b538bc86d63 | /第一部分 基础知识/第四章 分治策略/4.1 最大子数组/max-subarray-brute-force.py | a965a79bc5c65d91403dffc613d7666f5041c677 | [] | no_license | https://github.com/PyBeaner/IntroductionToAlgorithms | 59b26fd8ab25202eaeca0745e5f4be3bbadb89aa | 561b0d82540769a1cc787226b44e9c2e44d28925 | refs/heads/master | 2020-05-18T10:22:32.577205 | 2015-07-30T15:53:24 | 2015-07-30T15:53:24 | 38,962,003 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'PyBeaner'
threshold = -10**10
# O(n^2)
def find_max_subarray(alist):
length = len(alist)
max_sum = threshold
left = right = 0
for i in range(length):
left_in_loop = right_in_loop = i
sum_in_loop = 0
max_sum_in_loop = threshold
for j in range(i, length):
... | UTF-8 | Python | false | false | 866 | py | 29 | max-subarray-brute-force.py | 29 | 0.533487 | 0.512702 | 0 | 33 | 25.242424 | 45 |
gitddabong/acmicpc | 1,640,677,544,517 | 1ebc639459bd062bb69aeec921d5636e0ad2967a | a7ebd5ac27af32faa19ea84b9a2b64abdf70ae22 | /2751.py | e79bc9206329f8ed31d0d1944970211b2ff69d96 | [] | no_license | https://github.com/gitddabong/acmicpc | b1c6e162ed1954e889945622cea02e485dd6b9cc | 433f5be41f29757f4dc9f6ff502950786714566a | refs/heads/master | 2023-07-29T04:25:20.933055 | 2021-09-06T12:03:25 | 2021-09-06T12:03:25 | 394,655,049 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
n = int(sys.stdin.readline()) # 자바 식 입력
array = [0] * n
for i in range(n):
array[i] = int(sys.stdin.readline())
for i in sorted(array):
sys.stdout.write(str(i) + '\n') # 자바 식 출력 | UTF-8 | Python | false | false | 229 | py | 23 | 2751.py | 16 | 0.569378 | 0.564593 | 0 | 10 | 20 | 49 |
drkovalskyi/Bmm5 | 12,644,383,766,916 | 28d98425583aa0915a79a1242f0406fe8d24aef0 | 274169d01aaeb3704aee765135d84c9f28349787 | /NanoAOD/validation/fake_muon_sources.py | 760ef60ae328c6cb65582eb602d3c23a4c80b593 | [] | no_license | https://github.com/drkovalskyi/Bmm5 | 891acb1ac50b0ad3061cf44a72a8aab01c34449d | c56b03c919a9827ca99baa46dc8a8b7b28aaf924 | refs/heads/master | 2023-08-31T11:24:55.148995 | 2023-08-29T12:35:40 | 2023-08-29T12:35:40 | 213,879,062 | 1 | 6 | null | false | 2021-01-08T15:30:01 | 2019-10-09T09:41:48 | 2021-01-05T14:08:25 | 2021-01-05T14:08:32 | 36,062 | 1 | 2 | 4 | Python | false | false | import ROOT
import sys, os, subprocess
from DataFormats.FWLite import Events, Handle
from ROOT import TFile,TTree,TH1,TROOT,TDirectory,TPad,TCanvas,TColor
from math import *
# output_path = "/afs/cern.ch/user/d/dmytro/www/public_html/plots/bmm5_NanoAODv6-508/muon_fake_sources_bhh_medium"
# output_path = "/afs/cern.ch/... | UTF-8 | Python | false | false | 16,681 | py | 117 | fake_muon_sources.py | 98 | 0.693903 | 0.655656 | 0 | 366 | 44.576503 | 216 |
cfranklin11/budget-buddy | 4,423,816,356,378 | dd7e2b4be78e42dcc63909ffaaff553f974e837c | e1686543c1cc1a038fb8a0f08696f45cd0522f0c | /data/scripts/data_processor.py | b39f751a62bc625cfa052a393fa2c62b25769470 | [
"MIT"
] | permissive | https://github.com/cfranklin11/budget-buddy | b55bf5d1a89d8e5e5f7bb1d2e942fb70b2c871cb | dc2e05dd8012d3e3b8a011cef9bc65a912092bab | refs/heads/master | 2021-01-20T12:24:53.259410 | 2017-06-04T09:56:31 | 2017-06-04T09:56:31 | 90,361,863 | 0 | 0 | null | false | 2017-06-04T09:56:31 | 2017-05-05T09:50:20 | 2017-05-27T11:21:39 | 2017-06-04T09:56:31 | 4,572 | 0 | 0 | 0 | Jupyter Notebook | null | null | import sys
import os
import pandas as pd
import json
pd.options.mode.chained_assignment = None
def list_depts():
data = get_data()
depts = pd.unique(data['department_name'])
return depts.tolist()
def clean_data(department):
data = get_data()
dept_data = data[data['department_name'].str.lower() ==... | UTF-8 | Python | false | false | 1,273 | py | 57 | data_processor.py | 17 | 0.64729 | 0.641005 | 0 | 40 | 30.825 | 162 |
ComboZhc/AsciiArt | 292,057,800,320 | 486ae2887383657e5cedeb17a42b99a18454cb0f | 3477bce623936d9cddbebdb7e4bb58e9c0a5199b | /ascii_art_painter.py | ad6c34390db69cca6143b51639fd7354ccc48877 | [] | no_license | https://github.com/ComboZhc/AsciiArt | bdb89f103929a738917784aadd61d5320b89d567 | 27e0feadb4be5bb35b92695f2b1e265916def409 | refs/heads/master | 2016-09-06T18:30:45.905309 | 2012-09-01T08:50:28 | 2012-09-01T08:50:28 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import Image, ImageFont, ImageDraw
import tkFileDialog
import sys
import itertools
import math
import numpy
src = tkFileDialog.askopenfilename()
if not src.strip():
print 'no file'
sys.exit()
ranks = []
f = open('result.txt', 'r')
for l in f:
a, b = l.split(',')
ranks.append((int(a), float(b))... | UTF-8 | Python | false | false | 1,444 | py | 4 | ascii_art_painter.py | 2 | 0.569945 | 0.528393 | 0 | 55 | 24.290909 | 127 |
DrNolanXW/NC-Online | 3,238,405,383,923 | 267026424ba40ae2495e8efd2871b5ae50b78644 | 5ae475f0cb6c8f3db0fc4f01dfaeb7e25fdf9658 | /NCxJLu/apps/utils/__init__.py | 917e6dca2c79c1eb48a4c4d4a6be2bf7d2782d0a | [] | no_license | https://github.com/DrNolanXW/NC-Online | fff49dcec96869163ebc7552d44d8aeab2675670 | b39407e0daeac569cb78e6391513faf5c263f999 | refs/heads/master | 2020-05-27T21:20:25.058696 | 2017-03-29T09:28:49 | 2017-03-29T09:28:49 | 83,666,438 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'wx'
__date__ = '17-2-10 下午 4:54' | UTF-8 | Python | false | false | 74 | py | 25 | __init__.py | 23 | 0.457143 | 0.328571 | 0 | 3 | 22.666667 | 28 |
lanl/OPPPY | 352,187,359,517 | 8262c3f8fd9a1fe032099c4625fd7720048a4684 | d2435243de0b83b922fbc6f527517b932328fdac | /tests/my_test_opppy_dump_parser.py | 6de2207f2999d35f35e867515fa34abfc0787d41 | [
"BSD-3-Clause"
] | permissive | https://github.com/lanl/OPPPY | 288be84f43a051ad90a8a1756b10d89c57b624a4 | c3f07c93da6969a01cda7f78d48d75af98765960 | refs/heads/master | 2023-04-02T16:06:25.010458 | 2023-03-22T16:08:25 | 2023-03-22T16:08:25 | 202,370,014 | 3 | 5 | NOASSERTION | false | 2023-03-22T18:04:00 | 2019-08-14T14:44:21 | 2023-02-02T21:10:04 | 2023-03-22T18:03:59 | 6,750 | 3 | 5 | 4 | Python | false | false | # a simple example opppy dump parser
import sys
import re
from numpy import *
sys.path.append('..')
from opppy.plotting_help import *
class my_test_opppy_dump_parser():
'''
An example OPPPY dump parser that can extract data from a simple ASCII dump file
'''
def __init__(self):
# initialize the ... | UTF-8 | Python | false | false | 1,388 | py | 58 | my_test_opppy_dump_parser.py | 26 | 0.519452 | 0.505043 | 0 | 44 | 30.318182 | 98 |
okij98/Library | 10,230,612,122,375 | c000ec43b8b99b62677431b8568a25ef3cbbee1f | 0c6d0955c2c52f311c8e6d957258fb9ba9489ca8 | /handlers/root.py | 3222187d9e01d61d923a639b9ca84f6a4a127610 | [] | no_license | https://github.com/okij98/Library | d8af89e3bf1ca9c1bccc4261d2f59b348d3d4859 | 64d3e90f8082a8c7f5bd4863fe426f4997af6c66 | refs/heads/master | 2017-12-03T07:27:01.649134 | 2016-06-01T03:10:30 | 2016-06-01T03:10:30 | 60,082,688 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
import tornado.web
import methods.readdb as mrd
class UserHandler(tornado.web.RequestHandler):
def get(self):
username = self.get_argument("user")
user_infos = mrd.select_table(table="users",column="*",condition="username",value=username)
if user_infos[0][1] == 'root':
... | UTF-8 | Python | false | false | 1,349 | py | 11 | root.py | 6 | 0.613788 | 0.610082 | 0 | 39 | 33.615385 | 99 |
paulohrpinheiro/flask-esqueletico | 4,724,464,076,093 | 400d270165ea8bcbf6db8f2a40586d9283e0b6a3 | 8e7809d38c78493a36a2ab54ebab95b540937da2 | /app/__init__.py | b75db0bbf85873f0c0328055f2b4f75d9be42659 | [] | no_license | https://github.com/paulohrpinheiro/flask-esqueletico | 169b2794075d9fb8f149d7e4875bf22db77a2b2a | 4d8454c14107ea5bee396c7217ce053987248e92 | refs/heads/master | 2021-01-12T12:06:48.929324 | 2016-10-29T18:45:05 | 2016-10-29T18:45:05 | 72,302,855 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask, render_template
app = Flask(__name__)
app.config.from_object('config')
from app.mod_root.controllers import mod_root as root_module
app.register_blueprint(root_module)
application = app
| UTF-8 | Python | false | false | 214 | py | 5 | __init__.py | 3 | 0.771028 | 0.771028 | 0 | 9 | 22.777778 | 60 |
TECH-IN-EYE/Speech-to-text-data_collection | 3,178,275,823,237 | 2f6faff143398d4b9e5870329bd9c2683c9d914f | af40414e861a35de3eda304c46a2ebac42e49f3e | /scripts/sendtext.py | 5e553aac11e757c7dab1692db02b81d7b973e31d | [] | no_license | https://github.com/TECH-IN-EYE/Speech-to-text-data_collection | 147ec806c929cf0ab8191aa26cb90c1989e769c1 | 7bba5778593e89548a8538905f0239bb782aee57 | refs/heads/main | 2023-08-07T19:24:03.939888 | 2021-09-15T07:02:17 | 2021-09-15T07:02:17 | 408,710,261 | 0 | 1 | null | true | 2021-09-21T06:24:08 | 2021-09-21T06:24:08 | 2021-09-16T00:21:54 | 2021-09-15T11:09:19 | 40,403 | 0 | 0 | 0 | null | false | false | import pyspark
import json
from pyspark.sql import SparkSession
from kafka import KafkaProducer
from kafka.errors import KafkaError
#os.environ['PYSPARK_SUBMIT_ARGS'] = '--packages com.amazonaws:aws-java-sdk-pom:1.11.538,org.apache.hadoop:hadoop-aws:2.7.3 pyspark-shell'
spark = SparkSession.builder.appName('testspark')... | UTF-8 | Python | false | false | 911 | py | 20 | sendtext.py | 9 | 0.720088 | 0.673985 | 0 | 24 | 36.916667 | 138 |
aethylx/intern-proj-2017 | 3,015,067,086,971 | 8c6f03d66ae18ab8ba48fc2fe01c289dd8b5f76f | be21b39697605fbf07c2ae66b9e33c56c142e3b9 | /project/urls.py | ba01e8a5768b65c299b1824219b3ca43e49ac974 | [] | no_license | https://github.com/aethylx/intern-proj-2017 | c9ad51d774267fec94b5cc4f94a0499ba4360d38 | ae3831e59deca6bd62a277a7c926c173f523c476 | refs/heads/master | 2018-02-08T23:28:48.508245 | 2016-11-14T21:53:20 | 2016-11-14T21:53:20 | 96,582,845 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls import url, include
from rest_framework import routers
from django.contrib import admin
from django.contrib.auth import views as auth_views, forms as auth_forms
from django.views.generic.edit import CreateView
from project import views
urlpatterns = [
# router.urls,
url(r'^$', auth_views.... | UTF-8 | Python | false | false | 2,379 | py | 34 | urls.py | 13 | 0.678016 | 0.678016 | 0 | 38 | 61.605263 | 164 |
wkeenan/HTTPi | 12,412,455,485,661 | 2452805ba645b19675189e05763a7798f9eb5372 | 80107d5947c802e44f3d93d021881c57e011aeb3 | /shared/lib/ipi/bluetooth.py | 387a477d104d67d60c609c6841344c511f0fdb05 | [] | no_license | https://github.com/wkeenan/HTTPi | e4b1befc6576798adc74eda96571c7be3c302362 | 0302f274ae62cc87d8f764d7b3115715eea0ff0c | refs/heads/master | 2015-08-07T17:09:42.783094 | 2013-04-21T22:10:46 | 2013-04-21T22:10:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!python
# This 'bluetooth' module name clashes with the system package 'bluetoot' so we need to resolve that...
# http://stackoverflow.com/questions/4816595/how-do-i-import-a-module-whose-name-clashes-with-a-module-in-my-package
from __future__ import absolute_import
import os
import sys
import atexit
from ipi.uti... | UTF-8 | Python | false | false | 2,779 | py | 20 | bluetooth.py | 17 | 0.587621 | 0.579345 | 0 | 95 | 28.242105 | 137 |
luc3001/bfg9000 | 16,372,415,378,287 | c8acc767216fc1d22f11f191afe3eba52f4935b8 | 0c452a191d35a26499abec71854f8a8cdb1efc68 | /test/unit/__init__.py | 8f448be0d2633a5c28cb29c363d1df7b7f5aeb1b | [
"BSD-3-Clause"
] | permissive | https://github.com/luc3001/bfg9000 | fe609d64d7b605fef0ffb375873729c8cf0bd641 | 41452e9dd12f1a44bae68d3bf44f362d283e6802 | refs/heads/master | 2020-09-15T17:10:52.434281 | 2019-11-22T04:33:26 | 2019-11-22T04:33:42 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import mock
import ntpath
import os.path
import posixpath
import sys
from six import iteritems
from .. import *
from bfg9000.path import Path
from bfg9000.platforms.posix import PosixPath
from bfg9000.platforms.windows import WindowsPath
if sys.version_info >= (3,):
mock_open_name = 'builtins.open'
else:
moc... | UTF-8 | Python | false | false | 2,566 | py | 23 | __init__.py | 22 | 0.626656 | 0.620421 | 0 | 91 | 27.197802 | 79 |
cyh24/media-player | 1,314,259,999,789 | 473278eed9b438b90b811789f2179727a748747a | 1fe33ab269c3f68f6dbf7cf820c9fd0dc8d77f10 | /app/dbprocess.py | b58956e6fb447e56ae5f1cf2aa8265aa2ec76abb | [] | no_license | https://github.com/cyh24/media-player | 703b6ef09762e598c1b26bdfc49305415961d1f1 | bb379e62b20fc5236fb30ed663f731e0c9128a01 | refs/heads/master | 2016-08-02T22:12:07.375269 | 2015-07-12T15:44:04 | 2015-07-12T15:44:04 | 38,149,730 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
#-*- coding:utf-8 -*-
from django.db import models
from models import Teacher, Comments, Video, Serial
import time
def curTime():
return time.strftime('%Y.%m.%d-%H:%M:%S')
def add_teacher(name, info=""):
t = Teacher(name=name, info=info)
t.save()
def add_serial(title, teacher_id, video... | UTF-8 | Python | false | false | 734 | py | 12 | dbprocess.py | 4 | 0.623978 | 0.621253 | 0 | 30 | 23.433333 | 82 |
CrisBMoya/IEEE_Fraud_Detection | 2,370,821,947,644 | ee2b1e6b01bce3f0ddbf642d0f43aa43ed0862b3 | fbff2c7ef32a140f5780be7133f56322f1aef37b | /IEEE_Fraud_Detection_v6.py | 6b8a3836c3135e296319b62c4f1fbee2144922c0 | [] | no_license | https://github.com/CrisBMoya/IEEE_Fraud_Detection | 3f064f50bf70dba4d92260f9e29ff820e9b58914 | 7d742781993896b18ae3b6a7b61f64d9f066f8ca | refs/heads/master | 2020-07-23T03:56:27.809266 | 2019-09-17T14:37:37 | 2019-09-17T14:37:37 | 207,438,697 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | %config Completer.use_jedi = False
#Import Modules
import pandas as pd
import zipfile as zip
import plotly as plt
import numpy as np
import seaborn as sns
import plotly.express as px
import plotly.graph_objs as go
import pandas_profiling
from sklearn.model_selection import train_test_split
from sklearn.metrics import... | UTF-8 | Python | false | false | 3,318 | py | 12 | IEEE_Fraud_Detection_v6.py | 5 | 0.720313 | 0.712176 | 0 | 83 | 38.987952 | 188 |
tlnguyen2018/holbertonschool-higher_level_programming | 16,114,717,305,278 | d56998f13dbd3431f9476901875526ac01aaab94 | dc0a1a670dcbf862d45f8957419b04beffc9462d | /0x0B-python-input_output/12-student.py | d2de43079656aacd0061900bdf97f32af50aaa60 | [] | no_license | https://github.com/tlnguyen2018/holbertonschool-higher_level_programming | 3b4e67895e1fe70b9a727893edcfafe86d159d19 | fd307b134fb298e1b9e0ef19c353f0b40ae5998c | refs/heads/master | 2020-04-09T09:58:55.209093 | 2019-01-26T01:47:36 | 2019-01-26T01:47:36 | 160,253,304 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
"""
class student
like task 11, adding attribute presentation condition
"""
class Student:
def __init__(self, first_name, last_name, age):
self.first_name = first_name
self.last_name = last_name
self.age = age
def to_json(self, attrs=None):
"""
Check... | UTF-8 | Python | false | false | 663 | py | 59 | 12-student.py | 43 | 0.541478 | 0.536953 | 0 | 24 | 26.625 | 60 |
tomstorey/Z80_clock | 11,089,605,584,234 | 954cc7f5d457650b01bf06f7517cb78c6f47a89e | 600b7b596918aa8b96b8b2db4aa33e7b3413fc08 | /source/loader.py | cf2efc71c90b15f53c9a8a4101e8fac661581e4a | [] | no_license | https://github.com/tomstorey/Z80_clock | c2f1cb5215873b3f4094b48b041bca18a3ae9800 | f041c63a229f3253705ac12fa05ea7d73a1caf6b | refs/heads/master | 2022-06-20T03:21:54.396241 | 2022-06-06T16:09:46 | 2022-06-06T16:09:46 | 252,347,460 | 5 | 1 | null | false | 2022-06-06T16:09:47 | 2020-04-02T03:37:08 | 2022-05-30T21:22:10 | 2022-06-06T16:09:46 | 6,185 | 4 | 1 | 0 | Assembly | false | false | import argparse
import os
import time
from serial import Serial
from array import array
def main():
parser = argparse.ArgumentParser(
description='Load application software via UART'
)
parser.add_argument(
'-b', '--base',
dest='base', type=str, required=True,
help='Base add... | UTF-8 | Python | false | false | 3,637 | py | 24 | loader.py | 7 | 0.509761 | 0.48419 | 0 | 160 | 21.73125 | 86 |
shivamShankhdhar/ChatPlayGround | 8,134,668,086,622 | 809d7e35b3695648c33ee91a64052703eeac3c27 | edfaac4e34bd48e3fda1d726f839933ba8ae6ccb | /accounts/views.py | 2e212dbbc45e9e9d9622295ba87e32a98c9d3b75 | [] | no_license | https://github.com/shivamShankhdhar/ChatPlayGround | 9733a88972cb0129ef8294b6b3bcf71ed42e116a | 9076bc98b4e83c4123468aabb727b9bdd759aac4 | refs/heads/master | 2023-02-15T21:02:22.432301 | 2021-01-12T10:46:12 | 2021-01-12T10:46:12 | 328,175,237 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from django.shortcuts import render, redirect
from django.http import HttpResponse, request
# FORMS
from accounts.forms import AccountAuthenticationForm, RegistrationForm, AccountUpdateForm
# IMPORTED FOR CREATING LOGIN, LOGOUT AND AUTHENTICATING TO THE USER
from django.contrib.auth import login, authenticate, logout,... | UTF-8 | Python | false | false | 11,321 | py | 14 | views.py | 8 | 0.590319 | 0.587316 | 0 | 314 | 35.050955 | 124 |
starsfamily/PyStudio | 14,671,608,306,808 | 85d287ce95be19e451e6fe5b7349aa540f8c4898 | e6722fb2cdbb58d76d05272c8a3a7b39a1eb711d | /分行显示星期(list操作).py | 4a99b6b43efca263286105222d25cd494b5b264e | [] | no_license | https://github.com/starsfamily/PyStudio | cd14a3c8e064fe1e1cd2a7736f01e022d4c9b852 | 3665cdb9bed57b4d47d69273aeadca68a222cbb4 | refs/heads/master | 2021-06-19T19:36:08.232408 | 2021-02-14T09:09:03 | 2021-02-14T09:09:03 | 173,943,021 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | week=['Mon.', 'Tues.', 'Wedn.', 'Thur.', 'Fri.']
weekend=['Sat.', 'Sun.']
#week.append(weekend)
week.extend(weekend)
for i, j in enumerate(week, 1):
print(i, j)
for element in week:
print(element)
| UTF-8 | Python | false | false | 207 | py | 40 | 分行显示星期(list操作).py | 36 | 0.603865 | 0.599034 | 0 | 9 | 21.888889 | 48 |
chbicibi/vae_mnist | 13,709,535,649,708 | 2f0fb7f532f45290d8aac61e201db071111bf6a6 | 8a9e3584a4236c197f83fa92fafb48628ee9b4d0 | /dataset.py | e5027f496a18bb4a33f3290dc2840bda8fd2efbc | [] | no_license | https://github.com/chbicibi/vae_mnist | fc86e7072fe75ad8f5d33773c04d74c4ce8225cf | 41d9e199c1670896509208b7b5f0def90d7359a6 | refs/heads/master | 2020-04-21T06:34:21.761502 | 2019-02-15T10:01:37 | 2019-02-15T10:01:37 | 169,368,961 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import argparse
import configparser
import math
import os
import shutil
import numpy as np
import matplotlib.pyplot as plt
import myutils as ut
import common as C_
DEBUG0 = False
################################################################################
# 学習イテレータ
########################... | UTF-8 | Python | false | false | 5,570 | py | 5 | dataset.py | 4 | 0.445367 | 0.442783 | 0 | 207 | 24.173913 | 80 |
acontenti/japanize | 15,745,350,129,036 | b33faae75962238f39c3e63b5855ca2b7bca0ccb | 5d2ea039c1b3c4bb0d62cc2c78c63799ec2685d6 | /japanize_server.py | 2ede5d914faa2438896cc6fe541283c70077c17b | [
"BSD-3-Clause"
] | permissive | https://github.com/acontenti/japanize | 2f22bac8446bd78e7fd5ced3942c74ac044416f7 | fb9a3ee5b2393bf6466e57cb110b886563489621 | refs/heads/master | 2023-01-24T07:22:13.113227 | 2020-12-01T00:23:33 | 2020-12-01T00:23:33 | 312,388,156 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import jsonify, Flask
import japanize
app = Flask(__name__, static_folder="static")
@app.route("/", defaults={"names": None})
@app.route("/<names>")
def root(names):
if names:
return jsonify(list(map(japanize.transform, names.split(" "))))
else:
return app.send_static_file("index.... | UTF-8 | Python | false | false | 327 | py | 10 | japanize_server.py | 8 | 0.64526 | 0.64526 | 0 | 14 | 22.357143 | 71 |
nb-spaceship/ontology-test | 1,967,095,071,765 | d6ce34fbda7453003bf3f9251b81891ddac58c0e | c87cae10a1f821f141fe487c04f8b7ac4f4be9d1 | /test_tool/test/test_neo_param/test_main.py | a6b30e1474e162adeec994da86b955612be187f7 | [] | no_license | https://github.com/nb-spaceship/ontology-test | 27e0669246b03c39591be474c2044227ad0c9553 | 30f240064b8883f9ff978543ef63e30f1af098e6 | refs/heads/master | 2020-03-17T09:24:13.272297 | 2018-08-31T02:30:24 | 2018-08-31T02:30:24 | 133,473,590 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding:utf-8 -*-
import re
import ddt
import unittest
import urllib
import urllib.request
import json
import os
import sys
import getopt
import time
import requests
import subprocess
import traceback
sys.path.append('..')
sys.path.append('../..')
import utils.connect
from utils.config import Config
from utils.t... | UTF-8 | Python | false | false | 15,971 | py | 309 | test_main.py | 180 | 0.652871 | 0.621564 | 0 | 412 | 37.76699 | 211 |
bthate/wtfbot | 15,281,493,649,436 | 4657cd72a41a4b52fcf33f617437d18546c6b41e | 426a8b9f358d59aebace72083c6c5bfa2d00ea0f | /wtf/typ.py | 74f36db95007b3dd6270f4d42368b13bc5704f89 | [] | no_license | https://github.com/bthate/wtfbot | 5bc3790b67ef202ab037c3f62924328f533fde56 | 38406a1f515fefa1bfdcae7ef6bac318dcafb364 | refs/heads/master | 2020-11-27T06:12:14.069206 | 2019-12-22T00:41:46 | 2019-12-22T00:41:46 | 229,334,522 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import importlib
import types
import wtf
import wtf.utl
def get_cls(name):
try:
modname, clsname = name.rsplit(".", 1)
except ValueError:
modname = "wtf"
clsname = name
mod = importlib.import_module(modname)
return getattr(mod, clsname)
def get_name(o):
t = type(o)
if t... | UTF-8 | Python | false | false | 1,241 | py | 34 | typ.py | 32 | 0.501209 | 0.497985 | 0 | 53 | 22.396226 | 71 |
JoaoFaria025/udemyDjango | 12,034,498,378,480 | b7ac39537916956acdeb510cbdbd707f8dbb0217 | 7784538b4c6fd2f7cc1a228ce99177f9f7e2af5c | /base/views.py | e7cdba6b7c16a76f4c7710cc975833f3dc5bf4eb | [] | no_license | https://github.com/JoaoFaria025/udemyDjango | 0b8e3c2921bb98462540849503a2e81662d4b9ea | 7cfdaee1f5a994b7a23ba334e4da73fa58075484 | refs/heads/main | 2023-07-29T05:01:37.126645 | 2021-08-27T01:45:37 | 2021-08-27T01:45:37 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render
from django.contrib import messages
from .models import Cliente
from .forms import ContatoForm
def index(request):
cliente = Cliente.objects.all()
form = ContatoForm()
messages.success(request,'Email enviado com sucesso')
context = {
'nome' : 'POO',
... | UTF-8 | Python | false | false | 414 | py | 5 | views.py | 4 | 0.676329 | 0.676329 | 0 | 16 | 24.9375 | 57 |
matheusalefe/tdd-python | 7,894,149,927,478 | fa0333a259d9461277244a86a86ad6c23a66d391 | 82478001844769e35e9c940cb30a793a5bb8786a | /framework/posts/forms.py | a4ee593e7dfb175bf520168d60409fb54c4d414e | [] | no_license | https://github.com/matheusalefe/tdd-python | 49399350e2ef3946fd42b021c4a978ccef8e9e16 | 0883fed1631fef103d5aaa906b6a8d961bd6a811 | refs/heads/master | 2020-09-08T09:32:56.171909 | 2019-12-11T06:18:44 | 2019-12-11T06:18:44 | 221,095,218 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django import forms
from .models import Formulario
class PedidoForm(forms.ModelForm):
class Meta:
model = Formulario
fields = [
'nome',
'email',
'data_nascimento',
'senha',
'confirmacao_senha'
] | UTF-8 | Python | false | false | 289 | py | 32 | forms.py | 29 | 0.519031 | 0.519031 | 0 | 13 | 21.307692 | 34 |
bitcoinsSG/QRL | 10,806,137,763,948 | 992792b32692a3cd1bf9109726a019944c6ece52 | 8518699dfa14a328b1f0c9239a244d6202973034 | /qrl/services/PeerManager.py | d7900a0f120eb1c75eccb3f77efecc90e5d6b6de | [
"MIT"
] | permissive | https://github.com/bitcoinsSG/QRL | 61d43d5766e4a5d966c53ee81a49fe97a204e5b6 | 88960b1ebbcfaaddc2a2b83ce069d5597ec99654 | refs/heads/master | 2021-01-19T07:34:03.526396 | 2017-11-19T21:27:44 | 2017-11-19T21:27:44 | 100,640,901 | 2 | 0 | null | true | 2017-08-17T20:05:24 | 2017-08-17T20:05:24 | 2017-08-17T19:47:44 | 2017-08-16T09:50:21 | 4,047 | 0 | 0 | 0 | null | null | null | import threading
from time import time, sleep
import grpc
from qrl.core import logger
from qrl.generated import qrl_pb2
class PeerMetadata(object):
DISCOVERY_THRESHOLD_SECS = 20
STABILITY_THRESHOLD_SECS = 5
def __init__(self, conn_addr):
self.connected_since = time()
self.peers_refreshe... | UTF-8 | Python | false | false | 4,976 | py | 64 | PeerManager.py | 60 | 0.562098 | 0.556672 | 0 | 137 | 35.328467 | 114 |
OSTnm/tiny_mdb | 16,303,695,888,482 | cdd15969877945abe34771e96fb3b76431005ad0 | eb90902a1d6d941019a91b2cf385085869229811 | /thirdparty/dbfread/__init__.py | b6a3f76090536403f53d658c5e299cd61a9ca7b9 | [
"Apache-2.0"
] | permissive | https://github.com/OSTnm/tiny_mdb | 25d3d7c4e3570d43544049b74bdcbff5ec111823 | 4871f3bd6c3c6c47962d5d9e4c0e0070949ce6ae | refs/heads/master | 2021-01-08T01:27:14.781341 | 2020-02-25T09:51:10 | 2020-02-25T09:51:10 | 241,872,163 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Read DBF files with Python.
Example:
>>> from dbfread import DBF
>>> for record in DBF('people.dbf'):
... print(record)
OrderedDict([('NAME', 'Alice'), ('BIRTHDATE', datetime.date(1987, 3, 1))])
OrderedDict([('NAME', 'Bob'), ('BIRTHDATE', datetime.date(1980, 11, 12))])
Full documentation ... | UTF-8 | Python | true | false | 685 | py | 15 | __init__.py | 11 | 0.640876 | 0.616058 | 0 | 27 | 24.37037 | 78 |
lastmikoi/python-project-boilerplate | 558,345,782,955 | 470cd594f6df8c5ca5967f36434dd8451c4567e9 | 25848265586460ed8966bc6aa94efcd6cd220bd8 | /setup.py | a9bebbbe7d44e407307a39fc3bcc241987c8d315 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | https://github.com/lastmikoi/python-project-boilerplate | c4983d6451ebb7fa216257c7e148372ccd6ced15 | b58fe4dd19d8bd80b9c9be5c47f2bf95e8664153 | refs/heads/master | 2020-04-09T01:08:14.291870 | 2018-12-01T00:18:44 | 2018-12-01T00:33:13 | 159,893,115 | 4 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # --------------------------------License Notice----------------------------------
# Python Project Boilerplate - A boilerplate project for python packages
#
# Written in 2018 by Mickaël 'lastmikoi' FALCK <lastmikoi@lastmikoi.net>
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and re... | UTF-8 | Python | false | false | 2,189 | py | 3 | setup.py | 1 | 0.575674 | 0.561043 | 0 | 63 | 33.714286 | 82 |
Hybbon/era-scripts | 17,600,776,016,237 | 676f0a7c2703175af3d3d52b362c02f7032df406 | b4521a5e1b668bed9f253d222092313895753da5 | /recommenders/cofactor/run_cofactor.py | 8572452b65bf161a50553b45f7b6408001d7c76d | [] | no_license | https://github.com/Hybbon/era-scripts | 0b3bd41e76c11305803a193e8aa9830695285a1e | 405e8e77787d0ed641d9e31f5c4ac59ca7ecfd37 | refs/heads/master | 2021-03-19T14:25:49.913508 | 2017-12-12T16:46:39 | 2017-12-12T16:46:39 | 72,033,547 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import CoF_pre_process as pre_CoF
import Cofactorization as CoF
import argparse
import os
def parse_args():
p = argparse.ArgumentParser()
p.add_argument("data", type=str,
help="path to the input files")
p.add_argument("-o'", "--output_dir", type=str, default="",
help="output direct... | UTF-8 | Python | false | false | 1,317 | py | 57 | run_cofactor.py | 49 | 0.594533 | 0.593014 | 0 | 43 | 29.627907 | 86 |
tim-schilling/bettersimple | 19,043,885,026,310 | ce595cfac7cdf61cbe8624a54477012c9d22c617 | 853c6a1b6d17fd24c18875af7cc17d4750d4b9d7 | /charge/urls.py | e3fd480c5957ee9c66909d67147e518ffcda75fc | [] | no_license | https://github.com/tim-schilling/bettersimple | f0db73bfac07a0879229ed335d8462ed151dbbb7 | 19abbb72db2998f7e83874d905570e309686e854 | refs/heads/master | 2019-01-02T03:58:40.167777 | 2013-11-01T00:31:37 | 2013-11-01T00:31:37 | 13,758,820 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls import patterns, include, url
from .views import edit_credit_card, billing, past_charge, stripe_webhook, process_monthly_charges
urlpatterns = patterns(
'charge.views',
url(r'^(?i)creditcard', edit_credit_card, name="edit_card_card"),
url(r'^(?i)billing', billing, name="billing"),
... | UTF-8 | Python | false | false | 797 | py | 71 | urls.py | 37 | 0.602258 | 0.559598 | 0 | 15 | 52.133333 | 136 |
pabloduque0/handwrittingOCR | 12,919,261,635,390 | 55c3fa3cfd889737e5fedec99dfda74f246f5e76 | 7ce026a15234d64eb278849a03a8f89548276373 | /SVM_OCR.py | 6828445a1295210ee4dc6b09799c40421611f311 | [] | no_license | https://github.com/pabloduque0/handwrittingOCR | ad97b2ff063b2f697dd2a2f8da5971ee42a0dd72 | e8c93d55ef24f56314092dcd70636db19d574702 | refs/heads/master | 2021-06-19T15:08:24.978778 | 2017-06-18T20:34:46 | 2017-06-18T20:34:46 | 94,634,671 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
import numpy as np
# In this test we will use SVM instead of kNN
size=20
bin_n = 16 # Number of bins
svm_params = dict( kernel_type = cv2.SVM_LINEAR,
svm_type = cv2.SVM_C_SVC,
C=2.67, gamma=5.383 )
thisFlags = cv2.WARP_INVERSE_MAP|cv2.INTER_LINEAR
# First deskew i... | UTF-8 | Python | false | false | 2,586 | py | 4 | SVM_OCR.py | 3 | 0.649652 | 0.595901 | 0 | 84 | 29.797619 | 92 |
thecut/thecut-forms | 1,168,231,122,062 | 3bb10ecda4753c17da3104ea8a2775c7f1860d42 | 14479931c39afa19b345bd15dd7286e0a917615b | /thecut/forms/forms.py | f39685e0932ee56601187f36db3872232eec275d | [
"Apache-2.0"
] | permissive | https://github.com/thecut/thecut-forms | d4c208a885428763ebb29345af8a2cd42e52851b | a0aefa87c67124eb033525b1d3d5dedcd0a3ed70 | refs/heads/master | 2021-01-17T07:58:15.822239 | 2017-05-23T02:34:27 | 2017-05-23T02:34:27 | 28,124,893 | 0 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django import forms
from thecut.forms.utils import add_css_class
class EmailTypeMixin(object):
"""A mixin for a :py:class:`~django.forms.Form` that sets the HTML5
``email`` input type on any child :py:class:`~django.forms.Em... | UTF-8 | Python | false | false | 6,774 | py | 16 | forms.py | 6 | 0.628137 | 0.626366 | 0 | 176 | 37.488636 | 81 |
briantoe/MachineLearning | 6,682,969,144,018 | a31e013bfa7c909cd189ecef4ee6ad9c3c2a38ed | 75b2d28b683033e50c9ed5407412fa98748db9e4 | /ps2/problem3/problem1.py | ee896f43cfade2cb376c714c0fac58ba550b7497 | [] | no_license | https://github.com/briantoe/MachineLearning | 361cc4934649c14a70cf6c77ed2e1791a8ef9d9e | adbe85c1b45e38796464b50d7b39f28276846683 | refs/heads/master | 2020-07-18T10:16:34.420312 | 2019-11-23T06:12:54 | 2019-11-23T06:12:54 | 206,228,354 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
class Question:
def __init__(self, col, val):
self.col = col
self.val = val
def match(self, inputt): # puts given input into the question and evaulates boolean value
val = inputt[self.col]
return val == self.val
class Leaf:
def __init__(self, rows):
... | UTF-8 | Python | false | false | 4,028 | py | 45 | problem1.py | 23 | 0.596822 | 0.592602 | 0 | 145 | 26.77931 | 385 |
bornhack/bornhack-website | 14,096,082,666,200 | 33c5d76fb5eae9abb7c316ca0bed722c5446615e | 716e1f229eab5b5087752ebf32c3370a87958798 | /src/shop/migrations/0060_productcategory_weight.py | 3791ddf24dddd32ff917e723cd05c669a00c9a88 | [
"BSD-3-Clause"
] | permissive | https://github.com/bornhack/bornhack-website | 2e8810e00f7a48a8a7e82f02f66d67edcce6e404 | 767deb7f58429e9162e0c2ef79be9f0f38f37ce1 | refs/heads/master | 2023-08-31T23:31:04.344829 | 2023-08-08T21:59:19 | 2023-08-08T21:59:19 | 43,702,500 | 9 | 43 | BSD-3-Clause | false | 2023-09-11T09:46:14 | 2015-10-05T17:45:55 | 2023-08-08T18:32:10 | 2023-09-11T09:46:09 | 177,417 | 7 | 28 | 93 | Python | false | false | # Generated by Django 2.2.3 on 2019-12-16 22:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("shop", "0059_auto_20190718_2051"),
]
operations = [
migrations.AddField(
model_name="productcategory",
name="weight"... | UTF-8 | Python | false | false | 501 | py | 876 | 0060_productcategory_weight.py | 545 | 0.558882 | 0.491018 | 0 | 21 | 22.857143 | 78 |
simplehonestwork/django-clortho | 18,425,409,704,394 | fe7ceda58157e9d8c4fbc51166ced98f952faca5 | 098cd0dcf98ad157804c60dc2b50b0e5772b9173 | /clortho/auth_backends.py | 35ef08556e564eb4d9d32ba23fe0397502d145d3 | [] | no_license | https://github.com/simplehonestwork/django-clortho | 9347575bf5c49689f078c7bc6431ef76fa5c786d | 11a006b627900f4b0b70a0ea870d6256ef0da9d5 | refs/heads/master | 2021-01-17T22:20:15.132489 | 2011-11-10T21:39:37 | 2011-11-10T21:39:37 | 2,743,111 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from datetime import datetime
from django.contrib.auth.models import User
from django.conf import settings
import facebook
from clortho.models import Facebook
class FacebookBackend:
def authenticate(self, cookies):
APP_ID = settings.FACEBOOK_APP_ID
SECRET_KEY = settings.FACEBOOK_SECRET_KEY
... | UTF-8 | Python | false | false | 2,040 | py | 11 | auth_backends.py | 8 | 0.511275 | 0.511275 | 0 | 50 | 39.82 | 103 |
django-stars/cfb | 10,187,662,464,299 | 90a0fe87e219d50f322aa3049399972051541089 | 1f8f002b1f9bba24dad226578b3a931693850fd2 | /tests/test_header.py | 8d6a8c7f2afb3a47ab42964ea5136d15de18829a | [
"BSD-2-Clause"
] | permissive | https://github.com/django-stars/cfb | 408c5413f0164b96395af238861c505382bcd70c | afe2a0af7ac6dd99c4c2cea730ca1c34707bbc16 | refs/heads/master | 2021-01-21T17:06:50.462633 | 2016-04-26T08:52:34 | 2016-04-26T08:52:34 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from os import SEEK_END, SEEK_SET
from six import b, BytesIO
from unittest import TestCase
from cfb.exceptions import MaybeDefected, ErrorDefect, FatalDefect, \
WarningDefect
from cfb.header import Header
class SourceMock(BytesIO, MaybeDefected):
def __init__(self, value="", raise_if=ErrorDefect):
su... | UTF-8 | Python | false | false | 2,669 | py | 15 | test_header.py | 13 | 0.581117 | 0.532784 | 0.01124 | 72 | 36.069444 | 77 |
avogis/messenger | 11,244,224,431,301 | af43795b4d27c96e0745d7207b5ea6d6c048b287 | 7d65a982c99b49d0727aa346de103196f127e8d5 | /tests/tests.py | 8275262bc197fcb2b19c96cc7cad3e372fec7af4 | [] | no_license | https://github.com/avogis/messenger | 1451c2cbec5612787a29233ab8debf4040808d02 | cfe90005cdfe6df0fd6763fcc8271beaa752c41b | refs/heads/master | 2020-03-28T20:05:51.218719 | 2017-06-20T18:53:58 | 2017-06-20T18:53:58 | 94,607,518 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from datetime import datetime
import json
from messenger.api import User, Message, user_dict, messages_dict
class TestModelToDict(object):
def test_usr_dict(self):
timestamp = datetime.utcnow()
user = User('test', 'l@a', created=timestamp, last_checked=timestamp)
dict_user = user_dict(us... | UTF-8 | Python | false | false | 8,522 | py | 7 | tests.py | 5 | 0.566299 | 0.555151 | 0 | 262 | 31.526718 | 98 |
Yash-Patel01/mysite | 14,379,550,513,320 | c5285c340754e0425c5901bcf9793923ca3e5170 | 9a0f815030ff9721f1a82ffd2498470976546324 | /project/views.py | 52edfdd4089a4b310602c86d359a817c90e2de50 | [] | no_license | https://github.com/Yash-Patel01/mysite | 838cb8904411ed7f5566d72ff87ae2b1c905427e | c415045c4b8f8cf90fa08fde36b1263a6b713eff | refs/heads/master | 2022-11-26T15:16:18.540708 | 2020-03-28T04:51:20 | 2020-03-28T04:51:20 | 248,917,233 | 1 | 1 | null | false | 2022-11-22T05:24:58 | 2020-03-21T06:05:12 | 2020-03-28T04:51:23 | 2022-11-22T05:24:56 | 8,882 | 1 | 1 | 2 | CSS | false | false | from django.shortcuts import render
from .models import course, registration, contact, blog1, comment2, coursecomment
from django.contrib.auth.models import User
from django.http import HttpResponse
import datetime
import urbandictionary as ud
from mysite.settings import EMAIL_HOST_USER
from django.core.mail import sen... | UTF-8 | Python | false | false | 6,408 | py | 20 | views.py | 16 | 0.603464 | 0.59176 | 0 | 187 | 33.26738 | 199 |
Leezr8023/try | 8,581,344,661,778 | 1151bd00675b48ebc5b812635357b7ef480fe1ea | 20cbaebf8778829b45ec8652a42ea6afd23d244c | /test.py | 8cdb49328d63c9f31096a7666dc543fcf747140c | [] | no_license | https://github.com/Leezr8023/try | c52ee5e072d5319c7d9fa30ab7d442ee87771bf3 | fa4d4b586476714c8f3273c75540dabc33c3f1c5 | refs/heads/master | 2020-12-05T07:59:19.757814 | 2020-02-06T02:21:41 | 2020-02-06T02:21:41 | 232,053,012 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import time
from ui_new import Ui_MainWindow
from Algorithm import qtoutput
from matplotlib.backends.qt_compat import QtCore, QtWidgets, is_pyqt5
from PyQt5.QtGui import QFont
if is_pyqt5():
from matplotlib.backends.backend_qt5agg import (
FigureCanvas, NavigationToolbar2QT as NavigationToolbar)... | UTF-8 | Python | false | false | 2,333 | py | 68 | test.py | 7 | 0.632169 | 0.608021 | 0 | 70 | 32.128571 | 69 |
pl77/redditPostArchiver | 4,423,816,351,520 | ef60654e3fdba364bec586b439319e15eb926ebe | 3b58ac6e6035968f30b45f92efd67c2395649da6 | /postids.py | 092301fbea8eb9df265ec3dff348700a80847ece | [] | no_license | https://github.com/pl77/redditPostArchiver | c493a9da78b8596bf820c9f234f7188295e2805f | 2dcac4e736883c792c6a4966554db9cae2cf84bc | refs/heads/master | 2022-08-06T23:46:50.505488 | 2022-07-22T15:11:13 | 2022-07-22T15:11:13 | 119,421,291 | 67 | 11 | null | true | 2022-07-22T15:11:14 | 2018-01-29T18:13:30 | 2022-06-11T22:18:39 | 2022-07-22T15:11:13 | 143 | 47 | 9 | 3 | Python | false | false | #!/usr/bin/env python3
import os
import sys
import arrow
import praw
import requests
import yaml
from prawcore.exceptions import RequestException, NotFound
from requests.exceptions import HTTPError
"""
Customization Configuration
"""
# Default post_id: #
username = 'GallowBoob'
# Path to which to output the file #... | UTF-8 | Python | false | false | 5,017 | py | 15 | postids.py | 9 | 0.635041 | 0.630855 | 0 | 147 | 33.129252 | 124 |
frankliumin/MemeRep | 1,297,080,147,461 | 24bab2a1655c6c89a14221762871f36af94c3f1e | 0b0af4c236f8f25dc54916bfe79dcc60323bea09 | /MemeRep/cal_fit.py | 711899233ed093ed05e8f92016632a9e58879bff | [] | no_license | https://github.com/frankliumin/MemeRep | 2d48f13103ee31215e4c04d0f553417458353203 | ecee6e882870cdcad976f427c7ef3c030de0a21d | refs/heads/master | 2022-11-15T07:53:41.905472 | 2020-07-07T08:58:21 | 2020-07-07T08:58:21 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 7 16:18:25 2020
@author: Administrator
"""
import numpy as np
from sklearn.cluster import KMeans
import random
import itertools
import time
def cal_fit(x1, adjData):
lamda = 0.5
x = x1[0:len(x1)]
k = len(list(set(x)))
label = list(set(x))
KKM = 0
... | UTF-8 | Python | false | false | 994 | py | 10 | cal_fit.py | 8 | 0.532839 | 0.486229 | 0 | 39 | 23.230769 | 96 |
KalePrajwal/PythonDB | 8,220,567,448,649 | 22af280f97ae5175e7fe03be44e6f19b51a8c7ff | 307ea510630d841f1ac44ebdeab43bb1879810d7 | /Search_Book.py | 4d2b1751d82ed6d6185dc21bcf04b8f3859fb115 | [] | no_license | https://github.com/KalePrajwal/PythonDB | 06526919d6b2f7b9c1d1a9a11f2ff868eb01f296 | 663e5a346f04e00c62f0f4113f40fec6765991c0 | refs/heads/main | 2023-09-04T12:14:14.474174 | 2021-11-08T14:42:37 | 2021-11-08T14:42:37 | 425,726,238 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import mysql.connector as my
con = my.connect(host='bplx7zjluj8ztqdment0-mysql.services.clever-cloud.com', user='utdc4xugroxopi4q', password='l3A4aV1qVd3bMPBHITBG', database='bplx7zjluj8ztqdment0')
curs=con.cursor()
try:
id = int(input('Enter Book id : '))
curs.execute("Select * from Books where Book_I... | UTF-8 | Python | false | false | 851 | py | 8 | Search_Book.py | 7 | 0.547591 | 0.518214 | 0 | 28 | 28.464286 | 168 |
fiskercui/testlanguage | 4,587,025,110,945 | 15444854f40d9a9e1ed887769ad68895895b2f82 | bb72b975267b12fb678248ce565f3fd9bd6153ee | /testpython/testjson.py | a6274232e1d4815b4b70ac3e229f674bd21943f7 | [] | no_license | https://github.com/fiskercui/testlanguage | cfbcc84ffaa31a535a7f898d6c7b42dcbf2dc71b | b15746d9fa387172b749e54a90e8c6251750f192 | refs/heads/master | 2021-05-30T13:26:11.792822 | 2016-01-13T02:03:26 | 2016-01-13T02:03:26 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
print json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])
print json.dumps("\"foo\bar")
print json.dumps(u'\u1234')
print json.dumps('\\')
print json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True)
{"a": 0, "b": 0, "c": 0}
from StringIO import StringIO
io = StringIO()
json.dump(['streaming API'], io)
print ... | UTF-8 | Python | false | false | 1,722 | py | 101 | testjson.py | 44 | 0.633566 | 0.615563 | 0 | 83 | 19.710843 | 58 |
kurtejung/PurdueForest | 16,999,480,565,501 | eaacd7b6b7b06b152ca3e694521a5c77ba2f95c0 | 21fb99baaaeaed674cd99fb1a5d39ea54a1db827 | /HLTrigger/HLTanalyzers/python/HLTopen_cff.py | 69902c047a0726383b4e84bb8ec7e023b7c5985c | [] | no_license | https://github.com/kurtejung/PurdueForest | e413d4bc953df386a50d01ca09d1b648d07a926c | 9c7de9e7452b0837a872cfdd428244cb46b55322 | refs/heads/master | 2020-05-16T20:32:30.896495 | 2014-06-02T18:42:18 | 2014-06-02T18:42:18 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import FWCore.ParameterSet.Config as cms
# import the whole HLT menu
from HLTrigger.HLTanalyzers.HLT_FULL_cff import *
hltL1IsoR9shape = cms.EDProducer( "EgammaHLTR9Producer",
recoEcalCandidateProducer = cms.InputTag( "hltL1IsoRecoEcalCandidate" ),
... | UTF-8 | Python | false | false | 8,066 | py | 122 | HLTopen_cff.py | 75 | 0.72849 | 0.704066 | 0 | 215 | 36.511628 | 210 |
impiyush83/slambook | 11,699,490,929,656 | 9e6b08fe369787f6b5ffcef866d2389f8212c523 | bba538f0246c01407b16fcf990df5e2af0d93cfc | /slambook_restful/resource/customer_homepage.py | 683292c7246b425b6916470b5c2d4c82d3aff13c | [] | no_license | https://github.com/impiyush83/slambook | 7218f6ed9e3905dcf8531744984c58bba8a9827f | 1c3cbb9a6e69199a3978dd51734dd617d1200f4e | refs/heads/master | 2022-12-10T23:49:40.962475 | 2019-07-07T13:50:53 | 2019-07-07T13:50:53 | 142,017,369 | 0 | 0 | null | false | 2019-10-24T19:25:28 | 2018-07-23T13:21:46 | 2019-10-24T19:23:24 | 2019-10-24T19:25:27 | 10,014 | 0 | 0 | 0 | CSS | false | false | from flask import current_app as app, render_template, make_response
from flask_jwt_extended import jwt_required, get_jwt_identity
from flask_restful import Resource
from constants.common_constants import headers
from slambook_restful.models.Friend.friend import Friend
from slambook_restful.models.Secret.secret import... | UTF-8 | Python | false | false | 1,638 | py | 30 | customer_homepage.py | 23 | 0.647741 | 0.641026 | 0 | 57 | 27.736842 | 98 |
loum/pyrob | 15,015,205,680,592 | 07693ac6d4e671c7fa59e508295a03382acaea1c | fbe55b7d87d11faa7911a23cc78df02bc6af5406 | /pyrob/schema/ipact_tran/zabbix/zbx_device_energy.py | fe9e29f2ce9dac378bef77988a2f639fdacc1768 | [] | no_license | https://github.com/loum/pyrob | 463e25fba2fa6ee1f6da8f256fd42d09a7fc88bd | 551ebdfc449fb565d7f324297887401ec553f6c5 | refs/heads/master | 2020-07-31T12:08:30.095751 | 2019-09-24T12:34:39 | 2019-09-24T12:34:39 | 210,598,588 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """IPACT_TRAN T_TRN_ZBX_DEVICE_ENERGY table class mapping.
"""
from sqlalchemy import Column, String
import sqlalchemy.types
import pyrob.table
import pyrob.schema.types
class ZbxDeviceEnergy(pyrob.table.Common, pyrob.table.Base):
__tablename__ = 'T_TRN_ZBX_DEVICE_ENERGY'
__table_args__ = {'schema': 'IPACT... | UTF-8 | Python | false | false | 1,931 | py | 682 | zbx_device_energy.py | 487 | 0.659762 | 0.657172 | 0 | 55 | 34.109091 | 94 |
Naught0/qtbot | 14,001,593,405,335 | 075c185debf3d3aa830895906adaa860d768ab95 | 5616e441a3bd34cb46ab211ce625609b4cebca3c | /cogs/news.py | dcbc1b8f7c718352870054505a6b8b4e54793ed6 | [
"MIT"
] | permissive | https://github.com/Naught0/qtbot | 08a55ae758f8f42611cdc186fc37749ec9d3e646 | d5824aebc4892b3fbe24c2d053dbb4052c57b5ae | refs/heads/master | 2023-06-24T15:51:22.505671 | 2023-06-15T19:19:41 | 2023-06-15T19:45:12 | 93,383,576 | 9 | 9 | MIT | false | 2023-05-23T00:28:18 | 2017-06-05T08:43:16 | 2023-02-20T17:32:04 | 2023-05-23T00:28:18 | 5,100 | 3 | 1 | 2 | Python | false | false | import json
import asyncio
import discord
from urllib.parse import quote
from dateutil.parser import parse
from datetime import datetime, timedelta
from utils import aiohttp_wrap as aw
from discord.ext import commands
class News(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.redis_c... | UTF-8 | Python | false | false | 4,396 | py | 59 | news.py | 51 | 0.544586 | 0.538672 | 0 | 131 | 32.557252 | 129 |
fcea/scrape_InflFore_Lid | 4,604,204,973,838 | 7855838359b0713de7ad99f8485eb617a5f8f706 | 5954f1181b3654cbfdaea011326013af769ea012 | /Lider_Webscraper_Alimentos.py | f6c3aa3ec4eec743e5baa3a22efd69bd5884d51a | [] | no_license | https://github.com/fcea/scrape_InflFore_Lid | 7db2873ed9256db5c268f6d5acb0f35438d9c0bd | 1e8dc8f3a976d485d73bb7a2172b5ed1a04e927b | refs/heads/master | 2021-01-22T20:43:54.928600 | 2013-08-28T05:46:30 | 2013-08-28T05:46:30 | 11,716,225 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import csv
from math import ceil
import datetime
import re
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import datetime
from bs4 import UnicodeDammit
import MySQLdb as mdb
import time
import sys
import random
#METODO QUE CREA LA TABLA SQL EN CASO DE QUE NO EXISTA
def create_Table_Pro... | UTF-8 | Python | false | false | 11,249 | py | 8 | Lider_Webscraper_Alimentos.py | 7 | 0.698551 | 0.682994 | 0 | 235 | 46.868085 | 386 |
kishmakov/rs | 1,425,929,181,365 | 25fdd4766fe77277721e608e413b18eaa25ac1e1 | 1d62731ed2ebc3c84ed27d40c7d0417f6ce0ab0e | /rs/urls.py | b484a9e53dfeca1d32c3c23fc53ab0c39b628994 | [] | no_license | https://github.com/kishmakov/rs | 064fd19aeac4dafda8788a35aa3bb5c5e78c687c | c5e932c36fd2a62625aaf5b374f754ee8b839602 | refs/heads/master | 2021-01-10T08:25:21.901462 | 2013-03-23T18:04:55 | 2013-03-23T18:04:55 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls import patterns
from app.views import process_beg, process_go
import settings
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
('^$', process_beg),
('^go/$', process_go),
(r'^static/(?P<path>.*)$', '... | UTF-8 | Python | false | false | 392 | py | 21 | urls.py | 4 | 0.693878 | 0.693878 | 0 | 13 | 29.153846 | 100 |
eco3/stochastik-ss21 | 7,662,221,700,551 | 3c34e698f52145225364495abc042a20ce008a31 | 7b43998db0d31e0e2036f4c06681d263a7875f5b | /Klausurtools/tools/multivariate_statistik.py | efbeeb0cd43a2cdd07aaa60c0c5c5bcab596747e | [] | no_license | https://github.com/eco3/stochastik-ss21 | 3dbabf87495a6274730b799c630a3b98624766cc | 3974a51c3b7c5dc9ebc79df01fc14cf635da9b11 | refs/heads/master | 2023-06-16T23:46:31.069291 | 2021-07-14T16:25:50 | 2021-07-14T16:25:50 | 353,711,310 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
def lineare_korrelation(a, b):
korrelationskoeffizient = np.corrcoef(a, b)[0][1]
kovarianz = np.cov(a, b)[0][1]
print(f"(empirischer) Korrelationskoeffizient\t", "np.corrcoef(...)\t", f"r_x,y = {korrelationskoeffizient}")
prin... | UTF-8 | Python | false | false | 840 | py | 13 | multivariate_statistik.py | 11 | 0.636038 | 0.626492 | 0 | 28 | 28.928571 | 113 |
AtomikKeo/ProgrammingContestPractice | 3,332,894,629,908 | 8d539bbd68cf165857879ea93afc6144826e74ab | e0c5d703ab688e6a1f8384279d9ce46cf0f667c7 | /AtCoder/ABC/66/ss.py | 733f483d321037ca63be9df18d69be72e76ad7da | [] | no_license | https://github.com/AtomikKeo/ProgrammingContestPractice | a9b739156981f8c1b7213549ff2f258c4c6af8d4 | 52140087e825fad3be3a19c73814e70c434e0f0c | refs/heads/master | 2018-04-05T04:57:07.735681 | 2018-02-26T14:27:21 | 2018-02-26T14:27:21 | 89,137,597 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | s = input()
for i in range(1, len(s)):
if((len(s)-i) % 2 == 0):
ans = len(s) - i
if(s[0:ans//2] == s[ans//2:ans]):
print(ans)
break
| UTF-8 | Python | false | false | 176 | py | 66 | ss.py | 66 | 0.386364 | 0.352273 | 0 | 7 | 24.142857 | 41 |
bbmhmmad/django | 6,820,408,105,748 | 652069c451fc365fd1b0c38b582906b43b44c447 | f3100ddd6c7f20538949785fce97960ba07f4128 | /poke_app/apps/poke_app/migrations/0001_initial.py | be7be1cc62107330aaf1baa49dd56cf8dbba01db | [] | no_license | https://github.com/bbmhmmad/django | bfb14ea307515ae8675d404195dae9374e1a8550 | 5b6cc59bb2c40d7f4c7fc57e8b02e0c8c477ff9c | refs/heads/master | 2021-01-17T11:20:07.160572 | 2017-03-07T08:58:51 | 2017-03-07T08:58:51 | 84,030,826 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-18 16:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('login_app', '0001_initial'),
]
operations = [
migration... | UTF-8 | Python | false | false | 860 | py | 23 | 0001_initial.py | 12 | 0.576744 | 0.552326 | 0 | 27 | 30.851852 | 114 |
ash9750/Re0-ML | 11,312,943,867,671 | db98133ed3d5d503bc92008b237a826b6fcb41f7 | bf1f5acf58438c0eeed4e822ff5dfcafa4d5f934 | /balanced_kdtree.py | 80f1aa23d128ea883e05caebb1acf2cd8300c3aa | [] | no_license | https://github.com/ash9750/Re0-ML | 1d5ac183a724461ddd81af5bbc4db5ae482c33c4 | 094cc72b16bf55892213ec355de4199033d4ff06 | refs/heads/master | 2021-01-21T11:15:12.079280 | 2019-04-06T13:26:19 | 2019-04-06T13:26:19 | 83,539,185 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Node:
def __init__(self, point, dimension, depth, left=[], right=[]):
self.left = left
self.right = right
self.point = point
self.dimension = dimension
self.depth = depth
def median(data):
m = int(len(data) / 2)
return data[m], m
def build_tree... | UTF-8 | Python | false | false | 1,369 | py | 4 | balanced_kdtree.py | 3 | 0.552958 | 0.53981 | 0 | 40 | 32.225 | 102 |
aCoffeeYin/pyreco | 16,140,487,119,963 | 31977ba1fa30d78438c128d5ce598b796198cfc1 | 9b9a02657812ea0cb47db0ae411196f0e81c5152 | /repoData/openembedded-oe-core/allPythonContent.py | a0f23ebc945949a2b8fe7601b1af6dc68986c47f | [] | no_license | https://github.com/aCoffeeYin/pyreco | cb42db94a3a5fc134356c9a2a738a063d0898572 | 0ac6653219c2701c13c508c5c4fc9bc3437eea06 | refs/heads/master | 2020-12-14T14:10:05.763693 | 2016-06-27T05:15:15 | 2016-06-27T05:15:15 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __FILENAME__ = buildhistory_analysis
# Report significant differences in the buildhistory repository since a specific revision
#
# Copyright (C) 2012 Intel Corporation
# Author: Paul Eggleton <paul.eggleton@linux.intel.com>
#
# Note: requires GitPython 0.3.1+
#
# You can use this from the command line by runnin... | UTF-8 | Python | false | false | 1,724,689 | py | 16,703 | allPythonContent.py | 3,862 | 0.568044 | 0.560071 | 0.000032 | 46,342 | 35.216542 | 335 |
Weevils/India_Climate | 4,990,752,020,632 | 97a7b3ffda3d790323ab200f4040e93a1d933e6e | 0c22e50b81bc59bc3bed5eb0d3339964d50f2b47 | /Scripts/DataAnalysis_Yield_Stability_Quick.py | 4361529e4747281dc4a199f9c68e0e4c7cf9cd0b | [] | no_license | https://github.com/Weevils/India_Climate | 698941d36b38a244887e1453dd9901d800462ac3 | a5fb70b88894211f2db36bcf4cbb700aee9e0821 | refs/heads/master | 2019-08-20T20:48:07.954099 | 2016-09-23T22:57:43 | 2016-09-23T22:57:52 | 58,396,671 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'Vinny_Ricciardi'
#Goal: merge and work with yield, climate (tmp, pre), and farm size data
# Todo: expand to tmp(erature), for now just pre(cipitation)
import pandas as pd
from datetime import datetime
import os
import glob
import matplotlib as plt
import seaborn as sns
import numpy as np
import sys
impo... | UTF-8 | Python | false | false | 14,086 | py | 10 | DataAnalysis_Yield_Stability_Quick.py | 9 | 0.647096 | 0.617919 | 0 | 426 | 32.068075 | 132 |
yeldiRium/2048 | 11,587,821,788,200 | b79bf649a4fff85a2cbc7361546a9248f7d56b80 | c6895e2b1e81ad5ad7309c379c35a1e533b8570d | /exceptions.py | 1a2fc21b335099eca214b34374801889fcbfa1e2 | [] | no_license | https://github.com/yeldiRium/2048 | f9d8f85eab141f430df2116bc053633902b19713 | 8e12b3a4140d93c51a783914bfabdeb2682e7679 | refs/heads/master | 2021-01-21T12:59:08.329248 | 2016-04-09T23:06:44 | 2016-04-09T23:06:44 | 55,513,557 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class GameNotInitializedError(Exception):
pass
class GameLostError(Exception):
pass
class InvalidActionError(Exception):
pass
class NoEmptyContainerError(Exception):
pass
class MoveNotAllowedError(Exception):
pass
class FusionNotAllowedError(Exception):
pass
| UTF-8 | Python | false | false | 293 | py | 23 | exceptions.py | 22 | 0.761092 | 0.761092 | 0 | 22 | 12.318182 | 41 |
Mfhodges/CRF2 | 19,679,540,155,105 | 4e1823a344d604e9c1a5b20b22aa07722afaedcd | e3095c9f598ad7c59a059ca27554546c18906863 | /crf2/custom_auth.py | 1109e6c75b7286a5480d8c8f96c8eb841dea3f2c | [] | no_license | https://github.com/Mfhodges/CRF2 | 9d6c465fabad7c7e09b8324675a460b12e9f71fa | 636f17ed540456ec867c17f8078dd96ffcdbabc4 | refs/heads/master | 2022-02-27T23:06:45.884356 | 2020-10-12T18:31:43 | 2020-10-12T18:31:43 | 172,382,692 | 1 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib.auth.middleware import RemoteUserMiddleware
from django.contrib.auth.models import User
from course.models import Profile
class CustomRemoteUserMiddleware(RemoteUserMiddleware):
def configure_user(request, user):
meta = request.META
try:
user.update(first_name=meta[... | UTF-8 | Python | false | false | 514 | py | 123 | custom_auth.py | 56 | 0.684825 | 0.684825 | 0 | 14 | 35.714286 | 93 |
jack-mars/selemium_webdriver | 1,503,238,596,648 | 4b222385bcb82302332228ca379442a7a6b7b74b | e9e11aee109878d490a77eef74fb14aa1538f684 | /test37understandingmethods.py | 071bc8082bc8aa719d0b1d016ed76219766b76ec | [] | no_license | https://github.com/jack-mars/selemium_webdriver | c107990a1564ec038db6b7c52556fd7438aa13f2 | 1e76ac27a47422bc996831946974a3c107202ae8 | refs/heads/master | 2020-04-01T09:00:03.503760 | 2018-10-25T03:55:18 | 2018-10-25T03:55:18 | 153,055,658 | 0 | 0 | null | false | 2018-10-16T05:54:12 | 2018-10-15T05:03:15 | 2018-10-15T17:28:33 | 2018-10-16T05:54:11 | 20 | 0 | 0 | 0 | Python | false | null | def sum_nums(n1, n2):
print(n1 + n2)
sum_nums(2, 8)
l = [1, 2, 3, 2, 2]
print(l.count(2))
print(l.append(6))
print(l)
print(len(l)) | UTF-8 | Python | false | false | 135 | py | 50 | test37understandingmethods.py | 47 | 0.577778 | 0.481481 | 0 | 8 | 16 | 21 |
Dachoka3000/password-locker | 2,611,340,151,366 | 01ac8183a595b9e117d0b3b630204afcd67152e1 | 3221080135f2740a29738144b52e18d026347c5f | /credentials_test.py | 971e355cfcd96c1a7f2177bf03ef5d8a93d12740 | [
"MIT"
] | permissive | https://github.com/Dachoka3000/password-locker | 82aeffcebf9198a492d2107cffaff70b1d47474a | 179f0c29c03b0a20f09a477f1b4ef86ab7d18c27 | refs/heads/master | 2022-12-22T15:47:21.084424 | 2020-09-16T15:29:00 | 2020-09-16T15:29:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import unittest
import pyperclip
from credentials import Credentials
class TestCredentials(unittest.TestCase):
'''
Test class that defines test cases for the credentials class behaviours
Args:
unittest.TestCase: TestCase class that helps in creating test cases
'''
def tearDown(self):
... | UTF-8 | Python | false | false | 3,515 | py | 6 | credentials_test.py | 5 | 0.652916 | 0.645804 | 0 | 109 | 31.229358 | 100 |
shikouchen/WalkingTKK_crawler | 7,198,365,199,514 | cac43cce1e43cff4b8d3f2127b0ad9e321729e3a | 43c0be39103305ad8ad6b8fee78b3d515a13f8de | /jw_update_info/check_ele_info.py | f39ee281f35db83d8b2ef30a8c8fb84132d8bc6f | [] | no_license | https://github.com/shikouchen/WalkingTKK_crawler | 96b66b22a09801e769684fcdf51c365efdac1e64 | 6e3567c74901575d446dad0c4fe50368fb567796 | refs/heads/master | 2020-05-31T16:59:12.824500 | 2019-06-05T13:09:23 | 2019-06-05T13:09:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Author: Erick
from jw_info_update_method import *
from log import logger
import os,sys
import urllib
import xml.dom.minidom
import time
import datetime
import json
import urllib.request
import requests
class CheckEleInfo():
def __init__(self):
pass
def... | UTF-8 | Python | false | false | 3,351 | py | 30 | check_ele_info.py | 22 | 0.539732 | 0.529448 | 0 | 85 | 36.705882 | 120 |
lukewbecker/classification-exercises | 9,835,475,125,690 | 0ed5c1582374c7513bcd4e8716e2848ded2072e8 | 9f0a648ace0555f5a7af3a7a59a4b34c74f8238e | /aquire.py | 651f4048638f9d333ac30e24e88a3826e43531eb | [] | no_license | https://github.com/lukewbecker/classification-exercises | 10afb485a517d814df108abc718d8505f9c19d42 | fa21ad6e2466896d2a945ed8b2fe522b35487183 | refs/heads/master | 2022-12-12T05:59:21.089591 | 2020-09-24T13:24:26 | 2020-09-24T13:24:26 | 293,915,453 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Creating the aquire.py file
# Make a new python module, acquire.py to hold the following data aquisition functions:
# get_titanic_data
# get_iris_data
# Importing libraries:
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
# Importing the os library specifically for rea... | UTF-8 | Python | false | false | 3,041 | py | 10 | aquire.py | 4 | 0.713252 | 0.713252 | 0 | 82 | 36.097561 | 414 |
HelenProkopova/structural-programming | 14,010,183,349,418 | 8cf36a42a6bb33e9aea28671176b2c3c0fe32fc8 | 560549f12e4139d31225d806406d489ec9b36f0c | /4.1.py | 3dc2f2229adaf0a7a42e1d55fd05ef6816b79f81 | [] | no_license | https://github.com/HelenProkopova/structural-programming | ee937f5072efb80594d53a5c1131e0de88800be5 | 56f9885dbf34024a4da2d038110a50c002d8f279 | refs/heads/master | 2021-01-19T14:40:45.800619 | 2017-05-24T18:43:48 | 2017-05-24T18:43:48 | 88,181,810 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | s=input ('введите строку: ')
t=int(0)
for i in range(len(s)):
if s[i]== ',' or s[i]== '.' :
t=t+1
print ('количество точек и запятых= ',t)
| UTF-8 | Python | false | false | 212 | py | 25 | 4.1.py | 24 | 0.448864 | 0.4375 | 0 | 7 | 20.714286 | 40 |
katarzynalatos/Lab_1 | 7,533,372,642,781 | 5b27a787979b1b8249feed8d02b9e52c06aff541 | 9d1a857b529e2c1fe9ae4174b5d859e094299a86 | /problem2/InputFileValidator.py | 1c9be451969cac835cc9f3af4d210facb03f399e | [] | no_license | https://github.com/katarzynalatos/Lab_1 | 900c40e2513be858cceda8a7b9b20325fe30b029 | 710bcd135775783337c5728c88d8283e800419b9 | refs/heads/master | 2020-05-25T23:59:03.156302 | 2017-04-05T06:53:38 | 2017-04-05T06:53:38 | 84,980,182 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from os.path import isfile
from os.path import isdir
from os import listdir
from AbstractValidator import AbstractValidator
class InputFileValidator(AbstractValidator):
def __init__(self, name):
self._name=name
self._files = []
def validate(self):
if isfile(self._name):
... | UTF-8 | Python | false | false | 757 | py | 7 | InputFileValidator.py | 5 | 0.557464 | 0.556143 | 0 | 26 | 27.115385 | 113 |
Aasthaengg/IBMdataset | 3,848,290,739,084 | d6999daea8ff69ecd418869fce153499d0e9368d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02747/s241428742.py | c8aff520471c477e8a417c13c4623a03de673779 | [] | no_license | https://github.com/Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | s=input()
if len(s)%2==0:
for i in range(len(s)//2):
if s[2*i:2*i+2]=="hi":
continue
print("No")
break
else:
print("Yes")
else:
print("No") | UTF-8 | Python | false | false | 167 | py | 202,060 | s241428742.py | 202,055 | 0.497006 | 0.461078 | 0 | 11 | 14.272727 | 28 |
ericw13/radabo | 2,138,893,759,898 | 925b67370ff7768675d691992373fdb5a4061780 | 463aaa1a47c50f93e19e7b6b7d4d00bbdaec7769 | /app/radabo/urls.py | 7a9971749ef4ecc0ef9890ec71139dada65db41b | [] | no_license | https://github.com/ericw13/radabo | 83bee8d1c1dadac05999876a69d8a650f97dcfce | ed6b9ba4b57d8fccc59686ea66c98ed23e9646f0 | refs/heads/master | 2021-01-12T06:55:25.197106 | 2016-12-19T15:09:50 | 2016-12-19T15:09:50 | 76,681,084 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls import url
from radabo import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^prioritization/?$', views.Priority, name='priority'),
url(r'^dashboard/?$', views.Dashboard, name='dashboard'),
url(r'^enhancements/release/?$', views.ReleaseReport, nam... | UTF-8 | Python | false | false | 1,525 | py | 49 | urls.py | 21 | 0.668197 | 0.666885 | 0 | 25 | 60 | 100 |
msh5/pipfile-sort | 7,816,840,513,810 | 9d995078121f8703b8757e4e8ee42b56a1074b46 | fcc5337a191d4214655f8c34c84674270c153aa5 | /pipfile_sort/__init__.py | d660901d32413abfb6582396a808173febfa3446 | [
"MIT"
] | permissive | https://github.com/msh5/pipfile-sort | 6dd6bab03a5e69f80bf241e0ed4792f418fe3272 | c196cf282c20e2aaefdce8ea8959faf638311ef6 | refs/heads/master | 2023-02-18T07:41:47.518111 | 2021-09-02T13:07:07 | 2021-09-02T13:07:07 | 223,908,588 | 10 | 2 | MIT | false | 2023-02-08T01:50:09 | 2019-11-25T09:20:43 | 2022-11-15T13:13:27 | 2023-02-08T01:50:09 | 44 | 10 | 2 | 5 | Python | false | false | from click import command
from click import option
from click import version_option
from plette import Pipfile
from plette.pipfiles import PackageCollection
import sys
APP_VERSION = '0.2.2'
PIPFILE_FILENAME = './Pipfile'
PIPFILE_ENCODING = 'utf-8'
@command()
@version_option(version=APP_VERSION)
@option('--exit-code'... | UTF-8 | Python | false | false | 1,612 | py | 7 | __init__.py | 2 | 0.687345 | 0.681141 | 0 | 53 | 29.396226 | 111 |
vert-rouge/sample-zodb-migration-2to3 | 14,834,817,076,671 | 59339f1ab85776fd6bac63f3449b26ba9c844192 | 302c9d74cd6b5dd910d0d810d8f646e054d6662c | /readDbfrompython3.py | f85beb975702c42e212a1b27ff96932a7f740f2d | [] | no_license | https://github.com/vert-rouge/sample-zodb-migration-2to3 | ff7f45cbdbcbac4d1f180a3abbf0424473c21d61 | 0295f7e9a5349135b18aad7dfd7b72a9a10237e1 | refs/heads/master | 2021-09-10T01:21:24.714389 | 2018-03-20T14:17:18 | 2018-03-20T14:17:18 | 126,027,959 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import ZODB, ZODB.FileStorage
storage = ZODB.FileStorage.FileStorage('Data_python2.fs')
db = ZODB.DB(storage)
with db.transaction() as connection:
print("la transaction est ouverte!")
print(connection.root.truc)
print(dir(connection.root.truc))
for k,v in connection.root.truc... | UTF-8 | Python | false | false | 364 | py | 3 | readDbfrompython3.py | 3 | 0.67033 | 0.664835 | 0 | 15 | 23.266667 | 57 |
stevenman42/DefenderDotPyToo | 9,680,856,298,397 | 05522959a044a6a662c665a5be72edb1642009c7 | eb7e62574e80a3561d4917aef98d2e4cadd88dd7 | /main.py | fe859ed44ee8094d2ca4fb07fb7a133e5471bb1c | [] | no_license | https://github.com/stevenman42/DefenderDotPyToo | 6fbff160787c614c3f99350e9d24a8970608ccd4 | e11bf1e1fba3509837b55f8ac74b738bc23760df | refs/heads/master | 2020-05-07T17:42:24.301865 | 2014-07-10T02:01:46 | 2014-07-10T02:01:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pygame, sys
from classes import *
from math import *
pygame.init()
pygame.mixer.init()
pygame.font.init()
#test
WIDTH = 960
HEIGHT = 640
BLUE = ( 50, 80,220)
RED = (230, 70, 90)
SKY_BLUE = (191,244,255)
screen = pygame.display.set_mode((WIDTH,HEIGHT))
pygame.display.set_caption("Defender")
clock = py... | UTF-8 | Python | false | false | 8,608 | py | 4 | main.py | 3 | 0.682156 | 0.645795 | 0 | 340 | 24.320588 | 101 |
m-wrzr/code30 | 4,114,578,706,809 | 1152e8d9b88912fd1a70a0387411ab6311c98dff | 1089f139ea13e422f8c52668866414cc1b18085d | /solutions/21/solution.py | 2e97783123553a5579e1f6dd5341ad0761d2ee27 | [] | no_license | https://github.com/m-wrzr/code30 | d297d12888cf0256cf64daca594086f4cadb8938 | 2f28371685364b4b64e3253bd3a07d211f81ceee | refs/heads/master | 2020-12-24T19:37:05.939264 | 2016-05-12T15:56:08 | 2016-05-12T15:56:08 | 56,145,017 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | inputSize = "large"
with open("A-" + inputSize + "-practice.in", "r") as file:
output = ""
nCase = int(file.readline())
for case in range(0, nCase):
inputs = file.readline().split()
standing = 0
friendsNeeded = 0
for i, amount in enumerate([int(s) for s in list(inputs[1]... | UTF-8 | Python | false | false | 610 | py | 37 | solution.py | 18 | 0.570492 | 0.562295 | 0 | 24 | 24.291667 | 70 |
Zilby/Stuy-Stuff | 10,307,921,511,886 | db17878d614dc60e52483374b4d9f9052fec6ed5 | 2b25aae9266437b657e748f3d6fea4db9e9d7f15 | /graphics/polygons/8/adam_dehovitz/draw.py | 90b55664497a1feccbc227a858e47511f42846e6 | [] | no_license | https://github.com/Zilby/Stuy-Stuff | b1c3bc23abf40092a8a7a80e406e7c412bd22ae0 | 5c5e375304952f62667d3b34b36f0056c1a8e753 | refs/heads/master | 2020-05-18T03:03:48.210196 | 2018-11-15T04:50:03 | 2018-11-15T04:50:03 | 24,191,397 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from display import *
from matrix import *
import math
def add_rect( points, x0, y0, z0, h, w, d):
add_edge(points, x0, y0, z0, x0, y0, z0)
add_edge(points, x0, y0 - h, z0, x0, y0 - h, z0)
add_edge(points, x0, y0, z0 - d, x0, y0, z0 - d)
add_edge(points, x0, y0 - h, z0 - d, x0, y0 - h, z0 - d)
add... | UTF-8 | Python | false | false | 4,306 | py | 742 | draw.py | 601 | 0.397817 | 0.33372 | 0 | 158 | 26.246835 | 75 |
HectorTR/ica | 7,765,300,884,587 | e86f03f7d907a6f68eb4d3818b8b81ff141a3ab4 | 37f0da68f87247c814fa6ad039ceee8be2167ffd | /my_test.py | d51f2e34d78d7b4119215e1fbe4356b9ce31deaf | [] | no_license | https://github.com/HectorTR/ica | 7b4d65e31aec3bd7a0e09401b1763cd1e1e590d1 | 4caed51fb54175948edd07010d823b286b7f4236 | refs/heads/master | 2022-11-17T08:48:41.018118 | 2020-07-03T19:13:05 | 2020-07-03T19:13:05 | 262,254,893 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
def find(criteria) :
finder = criteria.split("=")
if len(finder) < 2 :
raise Exception("find(criteria='key=value'): criteria syntax error")
objects = gridlabd.get("objects")
result = []
for name in objects :
item = gridlabd.get_object(name)
if finder[0] in item and i... | UTF-8 | Python | false | false | 955 | py | 4 | my_test.py | 3 | 0.591623 | 0.587435 | 0 | 33 | 27.909091 | 92 |
bopopescu/Stock_Predictor | 17,575,006,207,099 | e1dd81b061ab9a8e9a15ebf2b11005becd30898d | 6f9b457083216409be606d9903586738504336ad | /env/lib/python2.7/sre_parse.py | c173415e47fe11ff527ea10fff4531f59bd548cb | [] | no_license | https://github.com/bopopescu/Stock_Predictor | ab998a3f83a0968cdc6a97a67298693932ae4537 | bea27ceb06aeebb9d2f45ddf9dd17a6732a456c8 | refs/heads/master | 2022-04-12T10:42:34.313159 | 2018-12-09T05:04:09 | 2018-12-09T05:04:09 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /Users/jeffreychen/anaconda2/lib/python2.7/sre_parse.py | UTF-8 | Python | true | false | 55 | py | 108 | sre_parse.py | 25 | 0.836364 | 0.781818 | 0 | 1 | 55 | 55 |
listar0810/jupyterlab-snippets-multimenus | 17,712,445,159,228 | 71a220e15c2f5471e39ad1841d9df2f99dcc9bf7 | 9b32771b7d1513ee37bc62dd347675abcfc1bfc9 | /example_snippets/multimenus_snippets/Snippets/NumPy/File IO/Write single array to text file.py | 201b833875f14aa3b988fe7fb756335b515b2511 | [
"BSD-3-Clause"
] | permissive | https://github.com/listar0810/jupyterlab-snippets-multimenus | 44087ef1aeb030a3074862a337508b57d50072c6 | 477f51cfdbad7409eab45abe53cf774cd70f380c | refs/heads/master | 2022-12-12T18:19:25.221083 | 2020-09-08T01:11:01 | 2020-09-08T01:11:01 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | np.savetxt(filename, x) | UTF-8 | Python | false | false | 23 | py | 884 | Write single array to text file.py | 881 | 0.782609 | 0.782609 | 0 | 1 | 23 | 23 |
muhadyan/Modul-2-JCDS07 | 15,315,853,398,982 | 7dc1ed5ddc1aaf48cfa39dc275cde1a08b9de9b1 | 93935b1f31257d80222d39113d54ffe06ba1c6fa | /Day_20/.ipynb_checkpoints/Day20Task-checkpoint.py | 372f237dd99e9d99e3b686c39274394248d22fca | [] | no_license | https://github.com/muhadyan/Modul-2-JCDS07 | 5b34beea506d40a788898cfd4016eb81484b8c93 | d6d32e3be6a36d20597f9ef9d04898990002ee01 | refs/heads/master | 2021-01-05T01:03:30.442952 | 2020-02-16T03:12:20 | 2020-02-16T03:12:20 | 240,823,002 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.axes3d
df = pd.read_excel('indo_12_1.xls', header=3, index_col=0, skipfooter=3, na_values='-')
fig = plt.figure(figsize=[15,5])
p = plt.subplot(111, projection='3d')
for j in df:
for i in df:
x = np.arange(... | UTF-8 | Python | false | false | 660 | py | 76 | Day20Task-checkpoint.py | 31 | 0.60303 | 0.572727 | 0 | 26 | 24.423077 | 87 |
urgemag/urge | 4,483,945,892,610 | 0ab262cc8b6ec8c3cb8211990cfeea8d1223d785 | a00f31c439f81fba6327a43f2cb0aeeace4cdea6 | /flask/views/admin/accesses_add.py | cb94b0df5328f04bfb10f380f9b264897a5a78f6 | [
"MIT"
] | permissive | https://github.com/urgemag/urge | 183b6579262a2bf5f959ad193734e9da3683f0d7 | a2ca0a9d2253770204dafbbad0cf9538c357d717 | refs/heads/master | 2023-04-21T15:44:45.721486 | 2021-04-26T20:15:47 | 2021-04-26T20:15:47 | 329,867,661 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Blueprint, session, redirect, render_template, request, flash, url_for,abort
from models import PageDetails, Database, General, Authentication
from functools import wraps
from validator_collection import *
admin_add = Blueprint("admin_add", __name__)
@admin_add.route("/Admin", methods=["POST", "GET... | UTF-8 | Python | false | false | 39,273 | py | 78 | accesses_add.py | 19 | 0.525702 | 0.525195 | 0 | 1,000 | 36.468 | 148 |
L-sky/Master_Thesis | 11,235,634,489,777 | 9d1ae6a18ee2d19298f41e50bde3e0c4327e3af8 | 11e58f5519b17b8a9bee0336c1e0f10999f637ba | /elastic_tensor/elastic_coef.py | 3a5c45ba52f5d55640298bb8a5300aca2d7e87d5 | [
"MIT"
] | permissive | https://github.com/L-sky/Master_Thesis | 57e646225edffcc614ebc278324ef7616838c110 | 609e3b1c81dfb2e13d86df106d81e2e56d32488d | refs/heads/master | 2022-12-25T05:13:39.040748 | 2020-10-10T21:39:09 | 2020-10-10T21:39:09 | 259,278,932 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sympy
from sympy import sqrt
from elastic_tensor.rgaunt import rgaunt_p as rgaunt
from functools import partial
common = rgaunt(0, 0, 0, 0, 0, 0)
rgaunt_011 = partial(rgaunt, l1=0, l2=1, l3=1)
rgaunt_211 = partial(rgaunt, l1=2, l2=1, l3=1)
rgaunt_022 = partial(rgaunt, l1=0, l2=2, l3=2)
rgaunt_222 = partial(... | UTF-8 | Python | false | false | 9,563 | py | 32 | elastic_coef.py | 23 | 0.419847 | 0.242183 | 0 | 200 | 46.815 | 176 |
futureneer/simple_ur | 9,964,324,128,182 | e34057714ee618b349b02b506e543ce2badf67db | e3cf50c77945d624bd22b5a2f8fcea8c1f786311 | /simple_ur_driver/nodes/simple_urx_rt_example.py | a768e380b61e0191e84c3ef9e038ed9ee3722bb8 | [
"BSD-2-Clause"
] | permissive | https://github.com/futureneer/simple_ur | 9a8f85a18d907c6193ccae682c583a06f153996a | 0004c6450c70f3ceb06e0e96f26dde8479012c28 | refs/heads/master | 2016-09-15T06:28:53.478621 | 2015-06-27T03:56:33 | 2015-06-27T03:56:33 | 22,484,196 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import rospy
import numpy as np
from copy import deepcopy
import urx
import logging
import socket
import struct
if __name__ == "__main__":
# rob = urx.Robot("192.168.1.155", logLevel=logging.INFO)
print 'connected to robot'
sock = socket.create_connection(('192.168.1.155', 30003), ti... | UTF-8 | Python | false | false | 1,259 | py | 19 | simple_urx_rt_example.py | 12 | 0.544877 | 0.499603 | 0 | 44 | 27.636364 | 78 |
WillWagnerIV/Python-and-Data-Science | 13,073,880,479,252 | 0790878db4832faff9b8cd5f5dca61ea5a6525ad | 9ba84a4f815b217d7f62d63f0c340917f02a4a33 | /recipes/hw6pr2.py | ba388fd04b8ea9f1719c84b2511bcd165852ce61 | [] | no_license | https://github.com/WillWagnerIV/Python-and-Data-Science | e69bfd75ee512d429df687e4be938ca7aa80b46a | 259f5c48065275948efe6f3c368c77b82fe4c963 | refs/heads/master | 2020-03-22T06:33:53.738606 | 2018-07-04T00:10:21 | 2018-07-04T00:10:21 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
#
# starting examples for cs35, week1 "Web as Input"
#
import requests
import string
import json
"""
Examples to run for problem 1:
Web scraping, the basic command (Thanks, Prof. Medero!)
#
# basic use of requests:
#
url = "https://www.cs.hmc.edu/~dodds/demo.html" # try it + source
result = requests.get(url)
tex... | UTF-8 | Python | false | false | 5,330 | py | 38 | hw6pr2.py | 22 | 0.59531 | 0.58743 | 0 | 204 | 25.122549 | 173 |
anhlbt/VietnameseOCR | 10,960,756,551,607 | 2f7d67023971af4d23ba6deb8b6ce4c5167e18b7 | be591c275830d6c4a66e22e7337dfa65bd732406 | /generate_dataset.py | 649b421e47ce5bf614727015e794431215203a51 | [
"Apache-2.0"
] | permissive | https://github.com/anhlbt/VietnameseOCR | e100162f0489b817c74e7c1be000a22dbbbad421 | ccc2fbda772f72aeba4667769096beb51eeca9f2 | refs/heads/master | 2021-07-15T04:10:00.947369 | 2021-07-01T05:35:02 | 2021-07-01T05:35:02 | 189,510,030 | 0 | 0 | Apache-2.0 | true | 2019-05-31T01:59:46 | 2019-05-31T01:59:46 | 2019-05-28T05:11:22 | 2018-08-30T03:01:40 | 110,223 | 0 | 0 | 0 | null | false | false | #!/usr/bin/python
# -*- coding: utf-8 -*-
from PIL import Image, ImageDraw, ImageFont
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import json
import os
import random
import sys
from config import *
class DataGenerator:
def __init__(self):
self.i = 0
self.log = []
... | UTF-8 | Python | false | false | 3,424 | py | 10 | generate_dataset.py | 6 | 0.517231 | 0.505841 | 0 | 97 | 34.298969 | 109 |
ZIP97/Green | 6,786,048,352,275 | 7827b254a037e1dd627886732320998c10fb4acd | 78a7fbbb28ee8c7e47c2f4c3f815241efe0a44b7 | /temp/网易财经-年报解析.py | 3142483131783115bbf76cb70f8dfefc5b930c92 | [] | no_license | https://github.com/ZIP97/Green | 0287f8551f261f5735ceab2cc44142822b3874d2 | 27fc5277ab59a94ccf4a468331d75aec44cb7056 | refs/heads/master | 2020-04-18T22:24:43.915693 | 2019-02-10T15:26:27 | 2019-02-10T15:26:27 | 167,792,880 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding: utf-8
import numpy as np
import pandas as pd
import requests, os
from bs4 import BeautifulSoup
from multiprocessing import Pool
from Proxy import get_proxy, getWeb, gen_proxy
proxies = get_proxy()
def get_write(i):
'''
获取每年年报,并写入 txt 文件
:param i: 年度报告列表第几个年报
'''
text = getWeb(df.href.iloc... | UTF-8 | Python | false | false | 1,599 | py | 836 | 网易财经-年报解析.py | 14 | 0.638947 | 0.621622 | 0 | 47 | 29.659574 | 96 |
galegosimpatico/playgrnd | 18,262,200,954,502 | 68d42fc602b8eaddc21a764a4e8dff586a3fe384 | 96e78090a515a531c2020e44b09734e01e8cd29d | /contest/tuenti/2015/2/almost.py | 7c6143fd523f1811df968aa350736d432635f9f2 | [] | no_license | https://github.com/galegosimpatico/playgrnd | 8684e5465b3d6250d567b9b3fd38d01ff0aad20a | e2efe4908fce39a93ed1df7ae3bc1e0dd3a745b6 | refs/heads/master | 2019-04-30T01:32:28.112503 | 2015-05-06T07:03:57 | 2015-05-06T07:03:57 | 12,020,126 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import argparse
import sys
USE_COMPREHENSION = False
def check_prime(number, primes_set):
number_is_prime = True
for prime_number in primes_set:
if number % prime_number == 0:
number_is_prime = False
break
return number_is_prime
def grow_almost_pr... | UTF-8 | Python | false | false | 3,362 | py | 66 | almost.py | 33 | 0.580309 | 0.575848 | 0 | 105 | 31.019048 | 76 |
longshuo1995/craw_conf | 1,511,828,500,742 | 5bc68c3d9d5a87ff2f4df62c13a0db5765891bbe | 0dd0c04e495984b6ae46131fe360c597b1447915 | /crawl_conf/flask_interface/02_interface_test.py | ad392753de8b2f973794522b4ffeba9f7859704b | [] | no_license | https://github.com/longshuo1995/craw_conf | 9a20f7fdec1b821f0f1e7170619e7362a061fa0c | ae98e8fcf209bca8e959054e09621fba79864b02 | refs/heads/master | 2020-03-08T04:22:43.585495 | 2018-04-12T06:59:35 | 2018-04-12T06:59:35 | 127,919,371 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
import json
data = {
"url": "http://www.baidu.com",
"seed": {
"article": {
"field_name": "article",
"field_rule": "//a/href",
"rule_type": "xpath",
"field_type": "article"
},
"create_time":
{
"fie... | UTF-8 | Python | false | false | 615 | py | 29 | 02_interface_test.py | 25 | 0.447154 | 0.429268 | 0 | 24 | 24.625 | 67 |
rogeriosilva-ifpi/adsi-algoritmos-2016.1 | 17,875,653,901,033 | 43ca87ce2dae9ce6449afed61985483aa86cf8ce | 9861218f60ab23d6ac3bc6b400c220abf4e64fb5 | /atividade_d/gerson/GERSON CAVALCANTE PROVA/q08.py | e760cb6f525802539359c55f4f03a77ebdb6e126 | [] | no_license | https://github.com/rogeriosilva-ifpi/adsi-algoritmos-2016.1 | a0b0709eb783110a9b335c8364aa41ce4f90fb24 | 1714e2480b80e46be4d96049e878bf17b692320b | refs/heads/master | 2021-06-06T18:25:00.836715 | 2016-09-07T02:02:30 | 2016-09-07T02:02:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | a = input()
b = input()
c = input()
if (b - c) < a < (b + c) and (a - c) < b < (a + c) and (a - b) < c < (a + b):
perimetro = a + b + c
print "Perimetro = %.1f " %perimetro
else:
area = ((a + b) * c )/2
print"Area : %.1f " %area | UTF-8 | Python | false | false | 240 | py | 284 | q08.py | 281 | 0.4375 | 0.425 | 0 | 9 | 24.888889 | 77 |
dfrojas/insumos | 584,115,583,415 | 5ab13b14dd9e3b2d63bda3316a794cb4fe8037ba | 80b73d863f25cdfbeb75ef0aff7ffe84266d868c | /agroecoturismo/models.py | 3f209f988790222481aac683f0d1069102d3d3e7 | [] | no_license | https://github.com/dfrojas/insumos | 18354f37fce32230aaff7ff346e0b0068a9ebb21 | 1ecafe8393a40ff4dab1689235515f49a55d5e62 | refs/heads/master | 2016-09-09T20:48:04.899543 | 2015-04-28T21:01:27 | 2015-04-28T21:01:27 | 34,008,214 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
from predio.models import InfoPredioGeneral
from opciones.models import AtractivoEcoturismo, ActividadEcoturismo
class Agroecoturismo(models.Model):
predio = models.ForeignKey(InfoPredioGeneral)
atractivo = models.ManyToManyField(AtractivoEcoturismo)
actividad = models.ManyToManyField(... | UTF-8 | Python | false | false | 433 | py | 74 | models.py | 67 | 0.82679 | 0.82679 | 0 | 13 | 32.307692 | 68 |
archerckk/PyTest | 19,404,662,244,320 | 7b20318b7310321c53c80f2f6ea7a4db2fe42c9f | 595c69f717fc3ceb4e0701cc433f6d7f927b6fdb | /Ar_Script/ar_045_字典_通讯录程序.py | 323628e994e1a70f7d4c4d958cdf9b048add94cf | [
"MIT"
] | permissive | https://github.com/archerckk/PyTest | d6462ebf46c6dbd5bb3ce03666aad0c2665367cd | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | refs/heads/master | 2022-03-26T21:09:25.891745 | 2021-06-14T01:39:36 | 2021-06-14T01:39:36 | 129,497,345 | 0 | 0 | null | false | 2020-01-14T10:57:49 | 2018-04-14T08:23:03 | 2020-01-13T14:29:04 | 2020-01-14T10:57:49 | 28,113 | 0 | 0 | 0 | Python | false | false | print()
'尝试利用字典的特性编写一个通讯录程序'
'''
1.查询联系人资料
存在打印,不存在提示
2.插入新的联系人
不存在直接新增
已存在提示是否修改
是,覆盖原来的电话,提示修改成功
否,跳出当前新增
3.删除联系人
联系人不存在
提示删除的联系人不存在
联系人存在
提示是否删除
是,删除,打印删除id
否,跳出当前选项
4.退出通讯录程序
打印提示语,终止循环
'''
print(
'''
|---欢迎进入通讯录程序---|
|---1.查询联系人资料 ---... | UTF-8 | Python | false | false | 3,067 | py | 575 | ar_045_字典_通讯录程序.py | 530 | 0.397633 | 0.389303 | 0 | 91 | 24.076923 | 69 |
aferriss/dcganMod | 17,360,257,844,229 | 366b67baa57efdba6ab9f8f5c33a4db68d243c1b | 8a1ea67914acd3e6aa32005cd955da21d9f32f41 | /test.py | 15d6f9eb82be418da1b5d9d479b97fca5f25c226 | [
"BSD-3-Clause"
] | permissive | https://github.com/aferriss/dcganMod | 442e8bb76a05307f9c539326bbb03b4ebacdb408 | 68e0323b908c8aa7088350bd16c562a87b09e75d | refs/heads/master | 2021-01-10T14:56:09.691317 | 2017-05-16T01:26:42 | 2017-05-16T01:26:42 | 53,920,361 | 1 | 1 | null | false | 2017-05-20T17:23:28 | 2016-03-15T06:26:42 | 2016-12-21T20:51:53 | 2017-05-16T01:26:57 | 3,036 | 0 | 1 | 1 | Lua | null | null | import math
import numpy as np
import theano
ny = 11
def floatX(X):
return np.asarray(X, dtype=theano.config.floatX)
def OneHot(X, n=None, negative_class=0.):
print "neg class"
print n
X = np.asarray(X).flatten()
print (X)
if n is None:
n = np.max(X) + 1
Xoh = np.ones((len(X), n)) * negative_class
X... | UTF-8 | Python | false | false | 967 | py | 3 | test.py | 1 | 0.654602 | 0.645295 | 0 | 42 | 22.02381 | 119 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.