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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
beexu/testlearngit | 3,410,204,070,854 | 38a0d58103204ad1c0e3447449e0422044e245a7 | 9637558a4e4a94198342dd4ab7b1706d6bc682d9 | /requests git/learnpython/testall.py | 9b7d807bf1e24bb1f83e2a13350c26b4e9b091c6 | [] | no_license | https://github.com/beexu/testlearngit | 28e30efffa8280178b299a11e568f107e50a1f63 | 3b99237aaf78d09c5b2c473229702bd06aa7ad52 | refs/heads/master | 2022-04-22T05:39:48.398650 | 2020-04-25T06:54:35 | 2020-04-25T06:54:35 | 258,698,945 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: UTF-8 -*-
import requests
import sys
import unittest
# sys.path.insert(0, '..') # 这个可以
sys.path.append('..')
# 这个不行
# print(sys.path)
from learnexcel import *
from learnfixexcel import *
from learnjson import *
from mytest.testinter import *
class testurl(unittest.TestCase):
def __init__(self):... | UTF-8 | Python | false | false | 2,458 | py | 41 | testall.py | 38 | 0.550041 | 0.541427 | 0 | 79 | 29.860759 | 104 |
Hwlcoder/CNN_conflict_types | 17,875,653,910,712 | f0b72e5f9d9a2b5e6c1ff28c711cb67173e87b3c | 4e7a7570381a344c7b156da9705e996ef1dccdbd | /CNN/SVM+OurInput.py | e01fcb0cf188001ca6c89b1668c2c9c574ff1109 | [] | no_license | https://github.com/Hwlcoder/CNN_conflict_types | 7dadea6093a55abeae1938c6113c506d84d23568 | b049615de539fb3582f34cdda6d0fbf50722a30e | refs/heads/master | 2020-06-17T05:27:54.540574 | 2019-07-08T13:06:11 | 2019-07-08T13:06:11 | 195,811,301 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import tensorflow as tf
from textProcess3 import *
from sklearn.model_selection import StratifiedKFold
import os
from sklearn.decomposition import PCA
from sklearn import svm
from sklearn.externals import joblib
import time
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
os.environ["... | UTF-8 | Python | false | false | 2,594 | py | 41 | SVM+OurInput.py | 10 | 0.684022 | 0.658188 | 0 | 71 | 34.43662 | 79 |
Muzer/smartbot | 10,823,317,626,496 | facaa937cca505a07ebae77e5243694936eec16a | 5ebe97e9597c1bd7b2162d7c092897f557472b51 | /smartbot/backend.py | e0ff94bec31844d59a0edc379278d0b9f00a5ad0 | [
"MIT"
] | permissive | https://github.com/Muzer/smartbot | 048791e2731c850ffb66fa2178ee7c2f6d271b12 | c18daac6b066a7d368ef3dd0848a21c16a076604 | refs/heads/master | 2021-01-24T21:47:23.583529 | 2015-05-05T15:09:22 | 2015-05-05T15:09:22 | 16,807,677 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .events import Event
class Backend:
def __init__(self):
self.storage = None
self.event_listeners = []
self.on_connect = Event()
self.on_disconnect = Event()
self.on_ready = Event()
self.on_join = Event()
self.on_message = Event()
| UTF-8 | Python | false | false | 298 | py | 25 | backend.py | 23 | 0.553691 | 0.553691 | 0 | 13 | 21.923077 | 36 |
Patchkat/Advent-Of-Code-2020 | 16,054,587,778,825 | 58814575ed7b4e1ad76e655afd36f0bcd48704a8 | e71fd1e081af09cf3a5f8ccc3071bfbdb57ad5d1 | /Day 9/AoC9A.py | 542ca30dcb2ef0d9edebecb4f6d6fe0fe4fa61be | [] | no_license | https://github.com/Patchkat/Advent-Of-Code-2020 | 339b76ce2bd61cc1c91d225a2959a0acebbc43d9 | 7d3abee87c1c3df434cc907594b329b638839e0d | refs/heads/main | 2023-04-28T01:54:38.975577 | 2021-05-04T16:27:09 | 2021-05-04T16:27:09 | 318,089,752 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | f = [int(x.rstrip('\n')) for x in open('xmas.txt').readlines()]
preamble_length = 25
for x in range(preamble_length, len(f)):
current_nums = f[x-preamble_length:x]
summed = False
for y in current_nums:
if (f[x] - y) in current_nums:
summed = True
if summed == False:
print(f[x... | UTF-8 | Python | false | false | 337 | py | 39 | AoC9A.py | 39 | 0.569733 | 0.563798 | 0 | 11 | 29.636364 | 63 |
jakobpederson/tweetbot | 8,074,538,543,671 | a12f58a3d4d45e11d3cfdbd60fcf20304a15a99a | 404a25c21c978ed0025be797c5639f5df8f0652a | /helloworld.py | e3aa6544a92f6a14a705eec171392beee1e88b2b | [] | no_license | https://github.com/jakobpederson/tweetbot | 670b34dff5322b9a066c9a2d0cebc804ea21018a | 8b1fb4b6e249e85a97dd5660ff8f4c0b671fe8f3 | refs/heads/master | 2021-01-20T00:14:45.139541 | 2017-04-23T23:42:07 | 2017-04-23T23:42:07 | 89,100,049 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
import tweepy
from tweepy.error import TweepError
import time
import random
import string
import sys
import KEYS_AND_TOKENS
# argfile = str(sys.argv[1])
CONSUMER_KEY = KEYS_AND_TOKENS.CONSUMER_KEY
CONSUMER_SECRET = KEYS_AND_TOKENS.CONSUMER_... | UTF-8 | Python | false | false | 2,192 | py | 2 | helloworld.py | 1 | 0.565237 | 0.557026 | 0 | 84 | 25.095238 | 85 |
AZ015/design_patterns | 19,095,424,625,678 | 7a83c60cd3f7dbb9998bf2964661b91cfccc581d | 2e223fb4771146ad0f80085b60aee6110cfdeff7 | /Behavioral/observer/push_observer/main.py | e83cb5624a82a5d627ba78cd1942aa29eebf202c | [] | no_license | https://github.com/AZ015/design_patterns | c6b2612ff5ce169f0c8e343c1f9e670b2b593e96 | 704c4b29d6fab2dfaf7c4e8923909276eaabbfa7 | refs/heads/master | 2020-12-21T00:59:08.009764 | 2020-02-05T12:02:29 | 2020-02-05T12:02:29 | 236,259,486 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from Behavioral.observer.push_observer import DataSource, SpreadSheet, Chart
if __name__ == '__main__':
data_source = DataSource()
sheet_1 = SpreadSheet()
sheet_2 = SpreadSheet()
chart = Chart()
data_source.add_observer(sheet_1)
data_source.add_observer(sheet_2)
data_source.add_observer(ch... | UTF-8 | Python | false | false | 351 | py | 74 | main.py | 73 | 0.672365 | 0.65812 | 0 | 12 | 28.25 | 76 |
Tamar20/Google-project | 309,237,654,816 | 936ff441913f5a2238dbb77694875b432d2e06da | 0f8a171012617f64df5a7c98845239a583225d53 | /init.py | f3b9328fc4ca166f6edb05e764369a8d5a637e07 | [] | no_license | https://github.com/Tamar20/Google-project | 8608af4b242f052ae1341ad300561fe03ad16e3d | ffac4d8df66375c3077cbb98dee47a28200c2db6 | refs/heads/master | 2023-02-21T04:30:24.072228 | 2021-01-21T14:19:15 | 2021-01-21T14:19:15 | 331,651,072 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import string
from trie import *
def edit_sentence(prefix: str) -> str:
prefix = prefix.translate(str.maketrans('', '', string.punctuation))
return ' '.join(prefix.lower().split())
def init_data():
trie = Trie()
init_trie(trie)
return trie
def init_trie(trie):
for line, path, li... | UTF-8 | Python | false | false | 837 | py | 4 | init.py | 4 | 0.553166 | 0.548387 | 0 | 37 | 21.540541 | 72 |
pengliu380/Feature-Detectors | 12,429,635,354,752 | fcfc26575f85ae113b706f4cc041f20da95fc164 | 6089d4b659071747aa623041c6b221096f8d07e7 | /test.py | 69e68f1dae1c3838cb28acd50df6e13d90b31ecc | [] | no_license | https://github.com/pengliu380/Feature-Detectors | 47e5c92c35b7d85029f26abc4d5f40ccca2f3872 | 807ab6cf8d6ed527967ae53626ad247c8ffea47b | refs/heads/master | 2020-04-02T16:55:51.586041 | 2018-10-25T08:43:24 | 2018-10-25T08:43:24 | 154,635,415 | 4 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2 as cv
import numpy as np
# Merge pictures
classname = ['bikes_blur', 'graffiti_viewpoints', 'bark_zoom_rotation', 'cars_light']
method = ['hcd', 'dog', 'fast', 'mser']
for i in range(4):
for j in range(4):
filename = 'result/' + classname[i] +'/' + method[j]
img = cv.imread(filename + '... | UTF-8 | Python | false | false | 507 | py | 2 | test.py | 2 | 0.556213 | 0.542406 | 0 | 14 | 35.214286 | 85 |
johnnyguogrit/Python-- | 2,894,807,968,924 | b1d3af5c2bfa366f27722315771886643f2e2d47 | 094dc24a91346ab9c7e12b1b7ed85d2d596804d1 | /food.py | 5ebcc304d2ac2e9bcd8222308470db1300caffaf | [] | no_license | https://github.com/johnnyguogrit/Python-- | 23123220e8f7f5ed848b8e3593e47df000195f36 | 340c00f97449a8691ee3b2025729bdf97ff3a2a8 | refs/heads/master | 2020-08-14T21:03:16.767061 | 2019-10-18T11:07:04 | 2019-10-18T11:07:04 | 215,232,213 | 4 | 0 | null | false | 2019-10-15T08:13:40 | 2019-10-15T07:15:16 | 2019-10-15T07:15:19 | 2019-10-15T08:13:40 | 0 | 0 | 0 | 0 | null | false | false | my_foods = ['pizza', 'falafel', 'carrot cake']
friend_foods = my_foods[:]
print("My favorite foods are:")
my_foods.append('cannoli')
print(my_foods)
print("\nMy friends' favorite foods are:")
friend_foods.append('ice cream')
print(friend_foods)
print("\nThe first three items in the list are:")
print(friend_foods[:3... | UTF-8 | Python | false | false | 606 | py | 50 | food.py | 48 | 0.69967 | 0.691419 | 0 | 26 | 22.192308 | 60 |
movie5/deeplearning_from_scratch | 10,033,043,616,744 | d850002e2f8cd0a65e5373e10426b80038de955c | 91b34a72cecfaf6b11333b598cffa60b87afade8 | /ch1.헬로 파이썬/1.6.matplotlib.py | 0b54559916c03fa025b5340ba311c4362c8b84de | [
"MIT"
] | permissive | https://github.com/movie5/deeplearning_from_scratch | 635a1c1cfc96028a7a28c75d74460fdf4d911b02 | eedc8718c7995f4f82d3b71475987d6e0c1ff578 | refs/heads/master | 2023-05-29T23:19:28.262873 | 2023-05-02T04:52:34 | 2023-05-02T04:52:34 | 283,549,037 | 0 | 0 | MIT | true | 2020-07-29T16:29:28 | 2020-07-29T16:29:27 | 2020-07-29T16:27:47 | 2019-03-15T04:34:44 | 60,444 | 0 | 0 | 0 | null | false | false | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.image import imread
# 1.6.1 단순한 그래프 그리기
# 데이터 준비
x = np.arange(0, 6, 0.1)
y = np.sin(x)
# 그래프 그리기
# plt.plot(x, y)
# plt.show()
# 1.6.2 pyplot의 기능
# 데이터 준비
x = np.arange(0, 6, 0.1)
y1 = np.sin(x)
y2 = np.cos(x)
# 그래프 그리기
plt.plot(x, y1, label="sin")... | UTF-8 | Python | false | false | 623 | py | 31 | 1.6.matplotlib.py | 27 | 0.624299 | 0.585047 | 0 | 34 | 14.735294 | 44 |
shubhamverma1997/Sentiment-Dictionary | 15,006,615,736,581 | d433c7af2e70c4a8236a2661bc9b5b4030c5c242 | 8b4e33b960a7b89d4a82eb61546dd1fc53e943eb | /countForeign.py | 7ebf770539917de9f0e402e209a6d3d06d68c358 | [] | no_license | https://github.com/shubhamverma1997/Sentiment-Dictionary | e3143a3b02581659b5f95d3c86c78f561ae8c20a | a98ebed01507846eae02927201adc7fe55cdda63 | refs/heads/master | 2020-03-23T16:19:07.790928 | 2018-05-15T14:26:28 | 2018-05-15T14:26:28 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
from langdetect import detect
Dict = pd.read_csv('Dict.csv', delimiter = ",")
wlist = []
for word in Dict['Word']:
wlist.append(word)
forCnt = 0
TotWord = len(wlist)
print TotWord
wordLang = {}
for word in wlist:
wordLang[word] = detect(word)
df = pd.DataFrame(wordLang.items(), columns =[... | UTF-8 | Python | false | false | 405 | py | 25 | countForeign.py | 12 | 0.664198 | 0.661728 | 0 | 17 | 22.823529 | 67 |
Tilana/Classification | 17,523,466,572,760 | ee8d130938ccdf235e514f3594cc055a3810c602 | fa9d9985a5c1f8e02ea0983097574dcbb51bc699 | /lda/Collection.py | c5941d04c289023320878b1efff904fc747dc5dc | [] | no_license | https://github.com/Tilana/Classification | 76e111a52a1ceda6a2c090e65a03cd6c087c0fed | 636e7660ecbd7d0615a40d210fb3b7afce919166 | refs/heads/develop | 2020-05-23T07:53:12.885056 | 2018-05-08T07:29:29 | 2018-05-08T07:29:29 | 80,451,934 | 3 | 1 | null | false | 2018-04-12T08:11:26 | 2017-01-30T18:49:53 | 2018-04-09T23:49:41 | 2018-04-12T08:11:25 | 128,642 | 3 | 0 | 47 | Python | false | null | # encoding=utf8
from docLoader import loadData
from Preprocessor import Preprocessor
#import preprocessor as tweetPreprocessor
from FeatureExtractor import FeatureExtractor
import cPickle as pickle
import listUtils as utils
import pandas as pd
import numpy as np
import os
import pdb
class Collection:
def __init__... | UTF-8 | Python | false | false | 4,100 | py | 54 | Collection.py | 43 | 0.674146 | 0.666829 | 0 | 116 | 34.344828 | 202 |
Ayush1959/Python-prgs | 77,309,426,607 | 8e37d14597356190a9873e924739b500b0d8f870 | eee3b82c2596fd71738aa550225675d733b1d0f2 | /bigandsmall.py | 0d51ae5877c10777411a725a6b0905332e3881c7 | [] | no_license | https://github.com/Ayush1959/Python-prgs | d0329233b14b120ce6096ac8e87ba596033be5a4 | 3f3e26d3351d6b346bb915c135a58b3812977912 | refs/heads/master | 2021-01-23T09:39:39.948557 | 2017-09-28T08:42:05 | 2017-09-28T08:42:05 | 102,587,880 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | def big (x):
tmp = max (x)
return tmp
def small (x):
tmp = min (x)
return tmp
| UTF-8 | Python | false | false | 94 | py | 19 | bigandsmall.py | 19 | 0.510638 | 0.510638 | 0 | 6 | 14.666667 | 17 |
bpiche/sent2vec | 4,045,859,196,042 | e333fd70c6cec930ab8ba2bb2db7ceab30845284 | dd6588c995f01ce9fcd9a0ab90dfe8fcd8fd9812 | /sentence2vec.py | 471accfbd2bf63ec0dc3632ee54b6290439f03a4 | [
"Apache-2.0"
] | permissive | https://github.com/bpiche/sent2vec | 4b46f0c14719296030548798f15d59734d234f86 | 42fb05114f03377f4e3b15144ff7444610853d65 | refs/heads/master | 2020-04-07T14:45:12.243891 | 2018-11-20T22:38:28 | 2018-11-20T22:38:28 | 158,459,717 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Slightly modified from https://github.com/peter3125/sentence2vec with
some new methods for preprocessing sentences, calculating cosine similarity
with sklearn, and a pipeline for comparing an input sentence against a corpus
for some braindead question answering purposes
"""
from __future__ import print_function
imp... | UTF-8 | Python | false | false | 5,620 | py | 2 | sentence2vec.py | 1 | 0.67847 | 0.672954 | 0 | 157 | 34.802548 | 124 |
GitHubSecurity/insightconnect-plugins | 14,851,996,910,489 | 8c8916e8a332298dffb9a0e17fede9a9bee101df | 160c4eab3c0a7d6b2477a8b857001ddb83199dd1 | /recorded_future/setup.py | f40de65f2399f177239ce4549d01227dcd049690 | [
"MIT"
] | permissive | https://github.com/GitHubSecurity/insightconnect-plugins | 6bc03448b93f2180cc05029adbd5669bca5f3256 | b1ecc1ba345e3bd6db22688e5476d9e0edd4e6ac | refs/heads/master | 2020-06-17T19:37:38.276131 | 2019-07-24T09:34:11 | 2019-07-24T09:34:11 | 196,028,200 | 1 | 0 | null | true | 2019-07-09T14:47:02 | 2019-07-09T14:47:01 | 2019-06-21T16:47:16 | 2019-06-29T02:35:47 | 31,084 | 0 | 0 | 0 | null | false | false | # GENERATED BY KOMAND SDK - DO NOT EDIT
from setuptools import setup, find_packages
setup(name='recorded_future-rapid7-plugin',
version='1.0.2',
description='Recorded Future arms threat analysts, security operators, and incident responders to rapidly connect the dots and reveal unknown threats',
aut... | UTF-8 | Python | false | false | 554 | py | 374 | setup.py | 107 | 0.693141 | 0.684116 | 0 | 14 | 38.571429 | 157 |
clbm/SESSDSA-2048-F19-X-ray- | 15,899,968,973,765 | e314c0d556d110ee893c577e0a8eb738a08a2514 | 25a5398a5e7cc9f3fb172f206a4d411b73c58a87 | /α-β剪枝代码及调试/green light_2.py | 0e8893b0c770a546f6fdb355a22ac2dba47f256f | [] | no_license | https://github.com/clbm/SESSDSA-2048-F19-X-ray- | fee89ca3cabc0cd313072a9981bb3011989117ee | 7eecd7e1f9c4aaa3aea55d608547a56313b79b62 | refs/heads/master | 2022-09-26T06:27:14.057050 | 2020-06-07T13:01:49 | 2020-06-07T13:01:49 | 269,928,075 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | Inf = float('inf')
import numpy as np
Weight_L = np.array((1.0,1.05,1.1,1.15,1.2,1.2,1.2,1.2))
Weight_R = np.array((1.2,1.2,1.2,1.2,1.15,1.1,1.05,1.0))
def getmark(board, isFirst:bool):
"评估函数"
Value, Belong = np.array(board.getRaw()).transpose((2,0,1))
return np.sum(((Belong<<Value)*Weight_L-((1-Belo... | UTF-8 | Python | false | false | 3,711 | py | 31 | green light_2.py | 31 | 0.565453 | 0.542582 | 0 | 75 | 42.306667 | 114 |
lishulongVI/rest-web | 5,540,507,851,445 | 60dec3cd3f0e80df65a49f5fc9f93e9fb077bcfe | 91fe99a22aa3f6fb0842a79b138eff6190d9676a | /rest/web_admin/base_views.py | 664ce9cf0ecfa202bcfb77a9765d4c40e481a923 | [] | no_license | https://github.com/lishulongVI/rest-web | f55f2aba79eefb08bc750f3d0595b4cbc65a5bd6 | 7835c0f393deaac86ada644aa4c9f219811e037b | refs/heads/release | 2020-06-25T03:15:17.383452 | 2019-12-27T08:05:02 | 2019-12-27T08:05:02 | 199,183,013 | 0 | 0 | null | false | 2019-12-16T08:30:12 | 2019-07-27T15:35:32 | 2019-12-16T08:28:23 | 2019-12-16T08:28:21 | 40 | 0 | 0 | 0 | Python | false | false | from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import mixins, viewsets, serializers
class BaseFilter(DjangoFilterBackend):
def filter_queryset(self, request, queryset, view):
old = request.GET._mutable
request.GET._mutable = True
if 'deleted' not in reque... | UTF-8 | Python | false | false | 939 | py | 7 | base_views.py | 6 | 0.677316 | 0.676251 | 0 | 25 | 36.56 | 107 |
DCC-CC4401/2018-1-Soft-Where-T4 | 11,192,684,798,070 | 8637f85cc13d2cbf9265ead5f534794ed60b4d01 | d3fc1675c69f6523b79089e9a58510dea91f554d | /cc4401Inventory/loansApp/models.py | 99decd5142c22dcc0c44fb369c169233a422badc | [] | no_license | https://github.com/DCC-CC4401/2018-1-Soft-Where-T4 | e6ae0740e96eb9726d94e15917aa278515fe8ffe | 5171289a72e807e97a5389151d843e3d85588b78 | refs/heads/master | 2020-03-23T13:44:23.658215 | 2018-08-21T16:22:05 | 2018-08-21T16:22:05 | 141,634,468 | 0 | 0 | null | false | 2018-08-15T00:33:42 | 2018-07-19T21:53:37 | 2018-08-02T22:23:42 | 2018-08-14T20:27:28 | 996 | 0 | 0 | 1 | HTML | false | null | from mainApp.models import Action, User
from articlesApp.models import Article
from django.db import models
class Loan(Action):
article = models.ForeignKey(Article, on_delete=models.CASCADE)
admin = models.ForeignKey(User, related_name="admin_art_prestador", on_delete=models.CASCADE, default=None,
... | UTF-8 | Python | false | false | 349 | py | 12 | models.py | 5 | 0.716332 | 0.716332 | 0 | 9 | 37.888889 | 111 |
kiruthihan10/Music-Classifier | 7,224,135,028,688 | c8c0ab3de630a9a85fcbeaa3f49819884d48ebe3 | 275112ddf479e40316866a08161713c9a84e6a02 | /classifier.py | 4af712fe015017b897a72c70d9565c4c8409270e | [
"MIT"
] | permissive | https://github.com/kiruthihan10/Music-Classifier | 70fb9157d332663ba4382d43597eb9b85f9a5096 | e782d230194cd1acdee72c85f3b14a5fd802131c | refs/heads/master | 2020-05-03T10:36:16.601275 | 2019-03-30T16:37:01 | 2019-03-30T16:37:01 | 178,583,501 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ##################################################
#Import Libs
import scipy
import sklearn as sk
import matplotlib.pyplot as plt
from PIL import Image
import numpy
import numpy as np
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.svm import LinearSVC
f... | UTF-8 | Python | false | false | 2,878 | py | 4 | classifier.py | 3 | 0.579222 | 0.56845 | 0 | 111 | 23.927928 | 94 |
Henry-Yan/BusTickets | 6,253,472,411,241 | d8ee72f9c287bb3f5b0bb0a1248a4da8c0d2cf9b | d1c526efe6c7daa0fd4b52f2585a16fbb4b8bde5 | /src/tickets/ticket.py | 799ebe9957cab8ef47ddebfb1dd9201573583771 | [] | no_license | https://github.com/Henry-Yan/BusTickets | 4266a8c3e1c3418622ede695b2e833e5741c7e4f | 2ff79dcda8bb086dcfe8f89727fd4917f7ffb8b7 | refs/heads/master | 2015-08-09T17:54:25.862241 | 2014-01-13T04:30:15 | 2014-01-13T04:30:15 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Created on Dec 11, 2013
@author: Jilin Yan
'''
import datetime
class Ticket(object):
'''
Basic class for ticket
'''
cities = { 'Boston' : 94,
'New York' : 123,
'Philadelphia' : 127,
'Washington' : 142,
'Toronto' : 1... | UTF-8 | Python | false | false | 2,568 | py | 7 | ticket.py | 6 | 0.508956 | 0.499611 | 0 | 87 | 28.425287 | 101 |
FabSchilling/WarframePrimeManager | 1,176,821,039,661 | 6d5351e6af69c7c78e1531e40b0a109a900a3d50 | 11cdf3279144b6aaab299ec2878a5c6aad88b97a | /database_functions.py | 537f491e595b47c538ad0003acb70809e753f05b | [] | no_license | https://github.com/FabSchilling/WarframePrimeManager | 5cdfd530feec53327ebe63c6008e5ec4d80a5d72 | ec42729ed1aab5c90270c9caff8e883e82f31fe8 | refs/heads/master | 2021-10-24T18:03:24.214454 | 2018-05-05T17:30:24 | 2018-05-05T17:30:24 | 125,201,237 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
import re
from six.moves import urllib
from tinydb import TinyDB, Query
db = TinyDB('db.json')
qr = Query()
def updateDatabase():
download_Path_allinone = "https://destiny.trade/JSON/allinone.json"
urllib.request.urlretrieve(download_Path_allinone, "./allinone.json")
resetDatabase()
def res... | UTF-8 | Python | false | false | 2,924 | py | 8 | database_functions.py | 5 | 0.596443 | 0.584815 | 0 | 95 | 29.778947 | 169 |
hienha/python | 2,697,239,493,916 | de2e912c30d8b939d51fa2bf3dd65d1986c19e47 | 826b521587f1384b4d6de83819d6f75d59c2d71d | /apepy/codes/1-Python基础篇/1-2_Python基础进阶/1.8_递归列出目录里的文件.py | de6efe323789712d0302d6bf5fc738246d0ee49e | [] | no_license | https://github.com/hienha/python | b69be98bba5939b89fadd7feacb358b9b59de9d2 | a7c1d44be3f7c3ee569dcbca0c7b5c202d40041e | refs/heads/master | 2018-05-31T16:48:44.295948 | 2018-05-30T10:04:47 | 2018-05-30T10:04:47 | 59,118,477 | 4 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import os
import sys
def print_files(path):
lsdir = os.listdir( path )
files = [ i for i in lsdir if os.path.isfile( os.path.join(path, i) ) ]
dirs = [ i for i in lsdir if os.path.isdir( os.path.join(path,i) ) ]
if files:
for f in files:
print os.path.join(path, f)
if dirs:
for d ... | UTF-8 | Python | false | false | 397 | py | 948 | 1.8_递归列出目录里的文件.py | 558 | 0.639798 | 0.63728 | 0 | 19 | 19.894737 | 72 |
Texas-Waitlisters/BlinkLink | 13,984,413,544,580 | e700d7b079e4546c945d8c9e230881d0aad4591f | 813b2275838f234190d7a325cf22cee4b589944a | /Redtooth/RedtoothWindows/Windows.py | e35d2c092dc81790198abd4557017a1a78726a65 | [] | no_license | https://github.com/Texas-Waitlisters/BlinkLink | ef57c7750d6718124e0014026643bb55d9fb288d | 7554cb227ab28767e9508f3d0c59d9f13ad3db20 | refs/heads/master | 2021-09-09T09:04:32.509724 | 2018-03-14T14:33:53 | 2018-03-14T14:33:53 | 117,875,405 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
import os
from urllib.request import urlopen
import subprocess
from uuid import getnode as get_mac
ipAddress = "10.209.6.212"
mac = str(hex(get_mac()))
print(mac)
#audio state
def getVolumeStatus():
audiovalue = subprocess.Popen("ConsoleApplication1.exe", shell=False, stdout=subprocess.PIPE)
va... | UTF-8 | Python | false | false | 1,301 | py | 13 | Windows.py | 10 | 0.644889 | 0.631053 | 0 | 60 | 20.666667 | 97 |
opensciencegrid/osg-display-data | 9,612,136,827,039 | 079daec333d98bf95b86a2f2a2c6ec216c1b01e5 | 52b5fd2bdc4906e1f944f9d03c9b98a3d1ec3fa6 | /src/osg_display/transfer_datasource.py | 5d3dbf6ecb4aeff7e0254bb8d25b7744ba7191dd | [] | no_license | https://github.com/opensciencegrid/osg-display-data | bba930f630d4eec8bd621e32d97129c18bd1df5d | 93df8bc98f703a4c83fdd979357dd764148dc165 | refs/heads/master | 2021-07-18T02:10:31.200337 | 2021-06-28T16:55:00 | 2021-06-28T16:55:00 | 55,262,958 | 0 | 3 | null | false | 2021-06-28T16:55:01 | 2016-04-01T21:18:23 | 2020-10-27T22:02:11 | 2021-06-28T16:55:00 | 105 | 0 | 2 | 0 | Python | false | false |
import sys
import time
import pickle
import datetime
from .common import log, get_files, commit_files, euid
import elasticsearch
from elasticsearch_dsl import Search, A, Q
import logging
logging.basicConfig(level=logging.WARN)
tracer = logging.getLogger('elasticsearch.trace')
tracer.setLevel(logging.WARN)
tracer.a... | UTF-8 | Python | false | false | 9,565 | py | 14 | transfer_datasource.py | 10 | 0.555463 | 0.544903 | 0 | 259 | 35.926641 | 85 |
karthigkk/chicago_taxi_ss | 15,693,810,531,077 | a2fb8027ad655d8377ffb1124d8aa8915a37b1dd | c4e3edae8a27ff6f65a21fe9f41d6fb3cfd56fe3 | /packages/regression_model/regression_model/pipeline.py | 5998a7ecd1ed038ffdcc6f53e30b06e04763035a | [] | no_license | https://github.com/karthigkk/chicago_taxi_ss | 648ef04626a10bef0380df14f9c56d1b3a3af6f7 | 942cd98ef2e3f381e09344713221f37f6e51cceb | refs/heads/master | 2023-01-11T18:05:32.487938 | 2020-11-11T10:34:49 | 2020-11-11T10:34:49 | 288,145,261 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from regression_model.preprocessing.preprocessors import Preprocessdataframe
from mmlspark.featurize import AssembleFeatures
from mmlspark.lightgbm import LightGBMRegressor
from mmlspark.stages import UDFTransformer, DropColumns
from pyspark.sql.types import IntegerType
from pyspark.sql.functions import udf
# from pysp... | UTF-8 | Python | false | false | 2,313 | py | 36 | pipeline.py | 19 | 0.711198 | 0.70601 | 0 | 40 | 56.825 | 125 |
deutranium/speed-ideating | 11,424,613,033,155 | c488ae41aae24984de02185ec7ba010a9c409764 | c70ef424f4f15fcce67af55ed93248e21f0c2791 | /bot.py | aeaab62c67272c1233e4091e7ea21a5f5721178c | [] | no_license | https://github.com/deutranium/speed-ideating | cfbb32ef8b1281ec379ed56b729dcd5115d1242c | 9f955636d83ddb8a90ee7ca218c4619ba3c4297b | refs/heads/master | 2023-01-05T10:06:23.802102 | 2020-10-27T17:28:30 | 2020-10-27T17:28:30 | 305,782,759 | 0 | 0 | null | false | 2020-10-22T08:39:06 | 2020-10-20T17:23:04 | 2020-10-21T14:59:04 | 2020-10-22T08:39:05 | 16 | 0 | 0 | 0 | Python | false | false | import os
import sys
from time import sleep
import discord
from tabulate import tabulate
from dotenv import load_dotenv
from sql import SQL
load_dotenv()
client = discord.Client()
TOKEN = os.getenv("DISCORD_TOKEN")
GUILD = os.getenv("DISCORD_GUILD")
db = None
history_channel = None
# TODO: Add all the teams here
... | UTF-8 | Python | false | false | 3,806 | py | 3 | bot.py | 2 | 0.596689 | 0.585129 | 0 | 174 | 20.873563 | 116 |
zaswedyg/Algorithms | 5,214,090,335,203 | 2eca1c78e7c0a5f5c3d5011fcc9aa7b100e9c3ee | 96ca5294a67294885a7519c558e4036801815211 | /HW2.py | 0d62e3ac4b9902a685257c109d132f18cd8116b1 | [] | no_license | https://github.com/zaswedyg/Algorithms | be8cf3d19b3a9b2c5c4e30a52a43ba3b980b716c | 2954e26cececebcd5d74bcc4121b337ac441ea7b | refs/heads/main | 2023-06-26T06:18:58.490317 | 2021-07-28T03:08:19 | 2021-07-28T03:08:19 | 383,977,546 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
# 1. Split in Half
#Given a string. Split it into two equal parts. Swap these parts and return the result.
#If the string has odd characters, the first part should be one character greater than the second part.
#Example: string = 'bbbbbcaaaaa'. Result = ‘aaaaabbbbbc’.
"""
def split_in_half(s):
first_half = ""
... | UTF-8 | Python | false | false | 1,218 | py | 8 | HW2.py | 7 | 0.64168 | 0.630972 | 0 | 42 | 27.880952 | 103 |
soyoungcheng/senti_c | 4,045,859,195,557 | 9bada3e0148b96096293a40d3fb8136d8a35f8e4 | 4af5e167a8b49298b994e68411217f5baf666709 | /src/senti_c/model_structure.py | 9b3b64a1898e6383758b0827251fc53930b817d1 | [] | no_license | https://github.com/soyoungcheng/senti_c | bdb18f608f9e761c0f32cc2628040b12e58e0dfa | 4ea14b83040ef586d1edbd995f6fb1eef8a3282a | refs/heads/master | 2023-04-02T22:34:37.418203 | 2021-04-06T00:43:13 | 2021-04-06T00:43:13 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
# Some of structures or codes in this script are referenced from HuggingFace Inc. team.
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");... | UTF-8 | Python | false | false | 17,198 | py | 15 | model_structure.py | 10 | 0.550063 | 0.537469 | 0 | 413 | 37.641646 | 139 |
doamaral/MIA | 566,935,694,076 | ff53daf2e608630130f4ddb21cb401353a0f214a | 60cbc3aae5cc975b962d6a57c376af608355f4d7 | /pest/envsim/__init__.py | 6808c33e877bfb34492bfd119163fb5d7e3f2146 | [] | no_license | https://github.com/doamaral/MIA | 553c0c1732c50470108e8c21b71fbe0f6c2e2c07 | 7deb195f8a98e2ce0d53b03dc5e9c4ba71205deb | refs/heads/master | 2021-01-10T01:02:31.216041 | 2015-06-18T11:18:40 | 2015-06-18T11:18:40 | 31,398,747 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'Usuário'
| UTF-8 | Python | false | false | 24 | py | 12 | __init__.py | 10 | 0.565217 | 0.565217 | 0 | 1 | 22 | 22 |
jeansyo/Python | 7,799,660,618,766 | 6bf8d19ab8cf175214a0171b64f59cf8b0ddc9fd | 353955d50f75ec7363961aad7c6a9761ae0bc46d | /suma_de_matrizes.py | b9bf3d5d186f919a51a36cc467c20c367c781ea2 | [] | no_license | https://github.com/jeansyo/Python | 06f86894b5c5b6e0449cd5e6fedbc1c509550d5c | 96badd322b793849e82500543d26981cc9af0360 | refs/heads/master | 2022-09-25T07:20:18.918979 | 2020-06-06T05:36:38 | 2020-06-06T05:36:38 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed May 6 21:30:25 2020
@author: DELL.E5430.SSD
"""
m = int(input('Digite la cantidad de filas: '))
n = int(input('Digite la cantidad de columnas: '))
matriz_a = []
matriz_b = []
matriz_suma = []
for i in range(m):
matriz_a.append([0]*n)
for i in range(m):
matri... | UTF-8 | Python | false | false | 1,021 | py | 97 | suma_de_matrizes.py | 97 | 0.553379 | 0.530852 | 0 | 55 | 17.581818 | 80 |
odify/PORT-OF-PYTHON | 6,055,903,913,726 | a1386c7be4c7fd74cb891a7565a8dd2001fab47c | 3af1a0ba485f28ee695c9a95773140b6cfa721f1 | /CLI/metas-cli/metaextractor.py | 19e7b802e248701a88111cf215a14e867a4c833a | [] | no_license | https://github.com/odify/PORT-OF-PYTHON | d985e1a25ac20072f375ed96b4186279e17f237e | b7335af2c55eb10768e3a0b9ad621e263e1b766d | refs/heads/main | 2023-08-18T06:48:19.103446 | 2021-10-13T18:37:41 | 2021-10-13T18:37:41 | 311,485,221 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/local/bin/python3
from colored import stylize, fg
from PIL import Image
from PIL.ExifTags import TAGS
# EXTRACT METADATA FROM IMG
class Metadata:
def __init__(self, file):
self.file = file
def __repr__(self):
metadata = self.extract_metadata(self.file)
if len(metadata) == 0:... | UTF-8 | Python | false | false | 1,058 | py | 85 | metaextractor.py | 53 | 0.545369 | 0.541588 | 0 | 49 | 20.591837 | 70 |
cash2one/xai | 19,232,863,562,926 | 6b2dbefb5db45211a1230a314ae6b1ba34b8c88d | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_dog.py | 28708a46d37edb8ee9d3422bc35e91a4912bec0d | [
"MIT"
] | permissive | https://github.com/cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
#calss header
class _DOG():
def __init__(self,):
self.name = "DOG"
self.definitions = [u'a common animal with four legs, especially kept by people as a pet or to hunt or guard things: ', u'a man who is unpleasant or not to be trusted: ', u'a woman who is not attractive']
self.parents = []
self.childen = []... | UTF-8 | Python | false | false | 454 | py | 37,275 | _dog.py | 37,266 | 0.640969 | 0.636564 | 0 | 17 | 25.588235 | 206 |
franciscovillaescusa/Quijote-simulations | 4,758,823,787,835 | a2e68f0f1828debab440cfca7a30aa93366acb94 | fb228c9604964b9bea7d099e581906918cd24e5b | /Bk/Bk_halos.py | 26d0b17bdb6cd3118490391b889febc04857f06b | [
"MIT"
] | permissive | https://github.com/franciscovillaescusa/Quijote-simulations | 927efec911799858a74a57f27fb5a9178f22cc8c | 36644e63c5ca421a3a1e664d0fe735f40abb7d27 | refs/heads/master | 2023-08-21T15:30:44.937134 | 2023-08-16T14:11:41 | 2023-08-16T14:11:41 | 183,778,267 | 81 | 256 | MIT | false | 2023-03-22T01:34:32 | 2019-04-27T13:45:47 | 2023-01-15T10:01:57 | 2023-03-22T01:34:31 | 71,354 | 69 | 131 | 1 | Python | false | false | # This script computes the halo bispectrum in real- and redshift-space. It takes as input
# the first and last number of the wanted realizations, the cosmology and the snapnum
# In redshift-space it computes the bispectrum along the 3 different axes.
import argparse
from mpi4py import MPI
import numpy as np
import sys... | UTF-8 | Python | false | false | 5,888 | py | 115 | Bk_halos.py | 56 | 0.584239 | 0.557575 | 0 | 151 | 37.907285 | 90 |
nurse/nkf | 6,725,918,799,152 | 52e8949fb60d7f7fd49435cb3d6c4afad2624d40 | ec5fc1c97ec8638966099d1699e363b728e5d2f7 | /NKF.python3/setup.py | c68d03cef593907031c448f2adeccfe795d80c75 | [] | no_license | https://github.com/nurse/nkf | a29e950709af320bcbcb871b1b9158d4b8ae5e22 | a937062004418d776cef426876def9aba6d8e94f | refs/heads/master | 2022-12-12T13:45:42.854398 | 2022-08-08T09:57:16 | 2022-08-08T09:57:16 | 3,713,060 | 72 | 19 | null | false | 2022-12-06T03:38:34 | 2012-03-14T00:44:33 | 2022-09-20T12:57:11 | 2022-08-08T09:57:16 | 1,066 | 69 | 15 | 1 | C | false | false | #!/usr/bin/env python
from distutils.core import setup, Extension
setup (name = "nkf",
version="1.0",
description="Python Interface to NKF",
author="Matsumoto Tadashi",
author_email="ma2@city.plala.jp",
ext_modules = [
Extension("nkf", ["NKF_python.c"],
... | UTF-8 | Python | false | false | 359 | py | 21 | setup.py | 2 | 0.548747 | 0.54039 | 0 | 12 | 28.916667 | 52 |
Ebuyuktas/11-HAFTA-OOP | 6,597,069,806,266 | 4787aad7c5732a2c14ad8b99228739511a343935 | b822f5f418092f44b3b8c4111561961f905261a0 | /odev2.py | dfccaeb54e8feda6c5ea89d3b19f91d7c74ddffe | [] | no_license | https://github.com/Ebuyuktas/11-HAFTA-OOP | d250f3ca697eefd0ecc1857965d5849e6974a92d | 04337e5ed113a09bf73b8d791ce92853391a6ef5 | refs/heads/master | 2020-07-12T05:54:36.344834 | 2019-08-30T17:52:13 | 2019-08-30T17:52:13 | 204,736,772 | 0 | 0 | null | true | 2019-08-27T18:46:50 | 2019-08-27T15:46:50 | 2019-08-26T09:50:26 | 2019-08-26T09:50:25 | 1 | 0 | 0 | 0 | null | false | false | #hafta 11 odev 2#
#muzik listesi#
import random
class walkman():
liste=[]
def cal(self,sarki):
if sarki in self.liste:
print(sarki,"yurutuluyor..")
else:
print("Malesef repertuvarimizda mevcut degil")
def temizle(self):
self.liste.clear()
print("yurutme listes... | UTF-8 | Python | false | false | 1,463 | py | 2 | odev2.py | 2 | 0.663021 | 0.654819 | 0 | 54 | 25.092593 | 52 |
jiamo/concurrent_server | 3,143,916,083,613 | 8ea4e701963363f8337da6bf40759d13cb194ff3 | f640756039e04dae4a3e4adfb69b0b15eda3c54a | /epoll_server.py | f16e7c4a47626ff475183b8666c0bd8807639e05 | [] | no_license | https://github.com/jiamo/concurrent_server | de0b518a3e729be1a678d0ee1371a0abcbefed8b | 9a6d661b2afe2a7207cc3b6eb2eab45976f604a8 | refs/heads/master | 2021-06-02T09:09:20.124364 | 2020-01-13T04:43:18 | 2020-01-13T04:43:18 | 144,312,145 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
"""Simple server using epoll. running in linux"""
from __future__ import print_function
from contextlib import contextmanager
import socket
import select
from enum import Enum
class ProcessingState(Enum):
INITIAL_ACK = 0
WAIT_FOR_MSG = 1
IN_MSG = 2
class PeerState:
def __init... | UTF-8 | Python | false | false | 6,978 | py | 12 | epoll_server.py | 11 | 0.597592 | 0.591574 | 0 | 230 | 29.343478 | 79 |
mark-barrett/Ticketr-2 | 19,284,403,161,813 | e68f0d0d53870b82bf03cd0155248a35d20e63d6 | d98d650fe46caa922e9cf60cbecfc6a9f7e5b40d | /account/views.py | 87b9f6cded93a5626e35a4c4d3ad2c588297f65a | [
"MIT"
] | permissive | https://github.com/mark-barrett/Ticketr-2 | ca6cee6bfe9c94c78a30b8a6989fff8f0bbeb913 | 723bb2542bee818132b4c2315efe07c5ac3146c6 | refs/heads/master | 2021-09-07T20:02:43.370478 | 2018-02-28T09:00:28 | 2018-02-28T09:00:28 | 117,800,313 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from django.shortcuts import render, redirect
from django.contrib import messages
# Create your views here.
from django.views import View
class SignIn(View):
def get(self, request):
if not request.us... | UTF-8 | Python | false | false | 2,737 | py | 39 | views.py | 18 | 0.584216 | 0.584216 | 0 | 91 | 29.076923 | 83 |
KU2021-NLP17/odqa_baseline_code | 4,861,903,024,649 | 24ae8e9f9dd5abf87d337998f0446c8cdf9047d7 | 277f60ec8afec6cb874906d1540e6cab1ec450b1 | /retrieval/dense/dp_base.py | 1e9053436a8e3927423bd18ab235d2deadcb2f6d | [
"Apache-2.0"
] | permissive | https://github.com/KU2021-NLP17/odqa_baseline_code | 519a596e881b6f6af52709b147b96a8ec7bd6226 | fd14652ebce050cd43dbcd58c6625caaeed0d5bd | refs/heads/main | 2023-09-02T17:19:03.011957 | 2021-11-23T15:15:13 | 2021-11-23T15:15:13 | 428,232,707 | 2 | 1 | Apache-2.0 | true | 2021-11-15T11:16:40 | 2021-11-15T11:16:40 | 2021-11-13T14:17:36 | 2021-06-19T13:35:31 | 7,246 | 0 | 0 | 0 | null | false | false | from tqdm.auto import tqdm, trange
import pickle
import random
import time
import os.path as p
from itertools import chain
import torch
import numpy as np
import torch.nn.functional as F
from datasets import load_from_disk, load_dataset
from transformers import TrainingArguments
from transformers import AdamW, get_lin... | UTF-8 | Python | false | false | 11,797 | py | 66 | dp_base.py | 50 | 0.57832 | 0.572194 | 0 | 295 | 38.844068 | 164 |
thipaulino/tpTools | 17,497,696,779,952 | e695402a0988274dfbbb086c9519896fc8c2fb9e | 6956291893c1deef10b10e645d18dcacc2819969 | /tpRig/tpRigBuilder/tpBuildable.py | 50028398a8efa4a2d80103f2c090d10f1c922d14 | [] | no_license | https://github.com/thipaulino/tpTools | 19c8bcbd98b1e4d6fc6f015a6f73bd890cedac36 | dbf799eb65b0da0db612b97c9b2bedf0e79bb537 | refs/heads/master | 2023-02-20T04:11:49.767739 | 2023-02-06T10:08:28 | 2023-02-06T10:08:28 | 249,549,932 | 9 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
class Buildable(object):
def __init__(self):
self.build_methods_list = []
self.top_level_item = 'FaceRig'
self.register_build_method('Pre-Build Utils', 'root', background_color='dark_magenta')
self.register_build_method(self.top_level_item, 'root', background_color='dark_cyan')
... | UTF-8 | Python | false | false | 1,440 | py | 31 | tpBuildable.py | 30 | 0.521528 | 0.521528 | 0 | 43 | 32.418605 | 94 |
arthuroe/ibu_backend | 1,614,907,726,356 | c1d5169aea0d1f9e6b7312630611ba231d1b597b | 0d0286770c13134252e04fb9dc163855f0eb6d46 | /api/patient/views.py | 49feace29f001a87ca4ec066d4fb233e334fd67d | [] | no_license | https://github.com/arthuroe/ibu_backend | ac21834fe9e16dbf9e4e8a7746bdcb96fb4488d1 | b08619f532649d875b117d021f601d6e511f58db | refs/heads/develop | 2022-04-20T13:38:56.286907 | 2020-04-03T06:30:23 | 2020-04-03T06:30:23 | 251,427,051 | 0 | 0 | null | false | 2020-04-03T05:28:48 | 2020-03-30T20:59:29 | 2020-04-02T14:21:26 | 2020-04-03T05:28:47 | 23 | 0 | 0 | 2 | Python | false | false | import logging
from flask import Blueprint, request, make_response, jsonify
from flask.views import MethodView
from api.decorators import token_required
from api.models import Patient
class PatientView(MethodView):
"""
View to manage patients
"""
decorators = [token_required]
def get(self, cur... | UTF-8 | Python | false | false | 5,087 | py | 29 | views.py | 26 | 0.482406 | 0.471987 | 0 | 151 | 32.688742 | 80 |
openstack/python-troveclient | 9,586,367,007,452 | a472545a39390304fa4cb92be3e2c92ecb349da8 | e1e8c24070460e5edc07f168663d9783fc18a8b1 | /troveclient/tests/test_root.py | 58d0e67b8ec8a9908464d8f58ee98ae16d996213 | [
"Apache-2.0"
] | permissive | https://github.com/openstack/python-troveclient | 5bfafda27ccb4b788118b2fe4e92ed862f02cd93 | 0415e4bc884b4acb341960f35678c6b93f262518 | refs/heads/master | 2023-09-04T13:04:02.033407 | 2022-05-11T10:03:17 | 2023-06-26T10:03:58 | 10,698,584 | 47 | 35 | Apache-2.0 | false | 2021-04-30T06:12:22 | 2013-06-14T21:58:05 | 2021-04-29T02:44:53 | 2021-04-29T07:38:00 | 2,052 | 70 | 49 | 0 | Python | false | false | # Copyright 2015 Tesora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | UTF-8 | Python | false | false | 1,766 | py | 190 | test_root.py | 92 | 0.64043 | 0.625142 | 0 | 56 | 30.535714 | 78 |
someshwar123/python | 15,315,853,403,521 | 2ec304ce33dd5a7ad255f5dc2517d621b01668ad | c9d8671400781bc2ec1cfe560cf49f17d436afcb | /set-9/lcm.py | 180796c6cc15edbef517fca7b9e590744e081ea0 | [] | no_license | https://github.com/someshwar123/python | 7d6e9d5d4969742a999d0d7083415bef76a79346 | 55cbf4076ab48999c99fa8f3c595379e31d60150 | refs/heads/master | 2020-03-24T03:42:27.655146 | 2018-08-16T18:37:21 | 2018-08-16T18:37:21 | 142,429,758 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Somesh
#
# Created: 14/08/2018
# Copyright: (c) Somesh 2018
# Licence: <your licence>
#-------------------------------------------------------------------------------
def lcm (a... | UTF-8 | Python | false | false | 638 | py | 77 | lcm.py | 77 | 0.398119 | 0.366771 | 0 | 27 | 22.666667 | 80 |
BlaiseGratton/DataAnalysisNgin | 13,125,420,056,641 | 84547c95f2e58b05b074ee8640c02aa47365b071 | 39f9d416f11e9136ed404c25a876d6a83727c7c9 | /anatolution/models/project_marker_option/__init__.py | a29d5a31a5b661536b7d9bce61ff0121e9b1e8e1 | [
"MIT"
] | permissive | https://github.com/BlaiseGratton/DataAnalysisNgin | 478dc24e50fd4915fdfe7661102e483a26c477e2 | 24d72320735faf6183d44ae728dd8557014abf8d | refs/heads/master | 2016-09-23T10:53:24.412773 | 2016-09-10T18:37:16 | 2016-09-10T18:37:16 | 42,779,692 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
anatolution.project_marker_option
~~~~~~~~~~~~~~~~~~
"""
from ...core import Service
from .project_marker_option import ProjectMarkerOption
class ProjectMarkerOptionService(Service):
__model__ = ProjectMarkerOption
| UTF-8 | Python | false | false | 233 | py | 122 | __init__.py | 88 | 0.690987 | 0.690987 | 0 | 10 | 22.3 | 54 |
McDermott-Group/Analysis | 14,671,608,324,567 | 04d6711d1eac2d44023a87ee12e98c67aac581ef | 93ef9d1738328036320d3dbff018b04f05a75b36 | /projects/fluxNoise/python/analyze_P1_dwell_time.py | 8df386a482ca8a19bd0b161e7d1e12ca1261ff7e | [] | no_license | https://github.com/McDermott-Group/Analysis | a1fcf314c0182dbd0261fb148843a998e183b966 | 1426997aa7e5a156deedca9e0f3381e1c7d0a7cc | refs/heads/master | 2023-06-21T15:59:32.519975 | 2023-06-19T19:16:50 | 2023-06-19T19:16:50 | 37,875,133 | 0 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import numpy as np
import noiselib
import importlib
importlib.reload(noiselib)
from noiselib import matpaths
from dataChest import *
import general.calibration as cal
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
import datasets
importlib.reload(datasets)
from datasets import *
# q, da... | UTF-8 | Python | false | false | 4,646 | py | 569 | analyze_P1_dwell_time.py | 322 | 0.596427 | 0.535945 | 0 | 128 | 35.304688 | 103 |
tell-k/code-snippets | 14,791,867,401,119 | 021aaa1d1c307044c731ba73349b20976b105b96 | 4b0de0c936d8c2300de61c42a5ba7a549ed60ae1 | /python/snippets/convert_nfc.py | 243932bbb97cb907babb5e4083204c6a75d8104f | [] | no_license | https://github.com/tell-k/code-snippets | 54adf5e1967af25c362e72af391fffc83dc9c291 | ab85aa3e4e8f74aa3cb394aee427efd29ec623ec | refs/heads/master | 2021-06-06T13:47:42.978609 | 2017-04-05T14:27:34 | 2017-04-05T14:27:34 | 365,239 | 0 | 2 | null | false | 2020-10-02T11:37:46 | 2009-11-08T13:40:22 | 2015-01-22T11:03:56 | 2017-04-05T14:32:45 | 108,440 | 0 | 2 | 1 | ActionScript | false | false |
from unicodedata import normalize
import sys, codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout)
with open('./templates/core/index.html') as f:
hoge = f.readlines()
hoge_body = "".join(hoge)
hoge_nfc = normalize('NFC', hoge_body.decode('utf8'))
print hoge_nfc
| UTF-8 | Python | false | false | 287 | py | 300 | convert_nfc.py | 192 | 0.675958 | 0.66899 | 0 | 11 | 25 | 57 |
sintetizzatore/dsp | 9,139,690,425,963 | db8e45ba72d604700d1214c49e27de5c51f7088e | 632b349062e6f4611a276d74dee3fe3a0d461d3b | /python/advanced_python_csv.py | cde9a5535a02757f564df16ee850b30b5ed82d67 | [] | no_license | https://github.com/sintetizzatore/dsp | 910be4ad20ffab08b2fea09d1b7a24d9b1923502 | 436ea8170426a3518cdc839441315d910667dc56 | refs/heads/master | 2020-04-07T12:44:37.545561 | 2015-09-24T23:26:32 | 2015-09-24T23:26:32 | 40,987,242 | 0 | 0 | null | true | 2015-08-18T17:35:08 | 2015-08-18T17:35:08 | 2015-08-13T14:48:23 | 2015-08-17T21:07:05 | 1,437 | 0 | 0 | 0 | null | null | null | import csv
with open('faculty.csv', 'r') as book1:
with open('emails.csv', 'r') as book2:
reader1 = csv.reader(book1, delimiter=',')
reader2 = csv.reader(book2, delimiter=',')
both = []
fields = reader1.next()
reader2.next()
for row1, row2 in zip(reader1, reader2):
... | UTF-8 | Python | false | false | 560 | py | 9 | advanced_python_csv.py | 4 | 0.548214 | 0.517857 | 0 | 18 | 30.111111 | 54 |
BrutuZ/Flexget | 9,655,086,493,598 | 34bf2c8e2c26570e5c9ed89d8613030292ebe82f | b18c069efe396a05b9e3156e527fd5a3bdb081b2 | /flexget/components/sites/sites/eztv.py | 20cd31bcf96d575d5b7d3dd2f47c66a5721ccac5 | [
"MIT"
] | permissive | https://github.com/BrutuZ/Flexget | 032692abeff3f6e5687dee2e7ba3d00a316400d4 | 2b7e8314d103c94cf4552bd0152699eeca0ad159 | refs/heads/master | 2023-08-30T22:31:16.746674 | 2023-08-28T15:14:04 | 2023-08-28T15:14:04 | 143,061,489 | 1 | 0 | MIT | true | 2022-11-06T17:25:03 | 2018-07-31T20:03:45 | 2022-03-19T22:29:58 | 2022-11-06T17:22:09 | 127,261 | 0 | 0 | 1 | Python | false | false | import re
from urllib.parse import urlparse, urlunparse
from loguru import logger
from requests import RequestException
from flexget import plugin
from flexget.components.sites.urlrewriting import UrlRewritingError
from flexget.event import event
from flexget.utils.soup import get_soup
logger = logger.bind(name='ezt... | UTF-8 | Python | false | false | 1,852 | py | 854 | eztv.py | 737 | 0.613391 | 0.612311 | 0 | 57 | 31.491228 | 91 |
jongfranco/python-workshop-2 | 18,047,452,602,657 | 3b376c2319a691ae7e89e5408050c6ae552da1fb | f16545184a8fd369ef2f9ee9ebae8b1a3271cb9a | /day-1/if-else.py | c5034094cb529004ae54135f080b8d0dceea8b99 | [] | no_license | https://github.com/jongfranco/python-workshop-2 | 81e86708d0e24428b8aebebe17063b05dfa5ebba | 417e2f07e40e5ca5a66acaa919dcd84c922d1c14 | refs/heads/master | 2022-11-16T17:26:52.490254 | 2020-07-15T18:39:15 | 2020-07-15T18:39:15 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Structure of if else
if predicate:
code
code
code
elif predicate2: (not cumpolsory)
code
code
elif predicate3: (not cumpolsory)
code
code
elif predicate4: (not cumpolsory)
code
code
else: (not compulsory)
code
code
elif --> else if
"""
# if 1 > 2:
# print('i am in ... | UTF-8 | Python | false | false | 662 | py | 31 | if-else.py | 31 | 0.60574 | 0.58006 | 0 | 42 | 14.761905 | 53 |
willist/dailyprogrammer | 14,207,751,820,130 | 178f9958fa5510dc749e389ec143cf70e0643c32 | 733c57c8952a58b2a3fcaa818e56833bc0f34d8a | /049_hard.py | 35ebd749eb605a8f8cfbdd022580c26904dbf786 | [] | no_license | https://github.com/willist/dailyprogrammer | 7ad308ad2f7801f80906973eb4ba53a31754bcc8 | 70592cd27847fae87b9e35927ad4a48173ff4514 | refs/heads/master | 2020-04-01T08:12:57.865946 | 2012-05-08T14:54:34 | 2012-05-08T14:55:24 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
from collections import defaultdict
from contextlib import contextmanager
from itertools import product
from math import factorial
def dice_iter(n):
for item in range(n):
yield range(1,7)
def count_sums(iterator):
counter = defaultdict(int)
for item in iterator:
if sum(item) == ... | UTF-8 | Python | false | false | 2,030 | py | 5 | 049_hard.py | 5 | 0.586207 | 0.543842 | 0 | 72 | 27.194444 | 72 |
AMDevG/MarathonTrackerServer | 11,141,145,168,863 | c64bb83044613ffad6bcef87bbcccc5292107d16 | c98c1b73a30b7f9f961d5f5ff2cfcdcdb3c4d63d | /marathonapp/models.py | 2ef9f71ceed0d537f4e91f46c8007580e17096f0 | [] | no_license | https://github.com/AMDevG/MarathonTrackerServer | eb64bff7f4d030aa960b7c4506479a49be2d1d41 | 5338c4069a520c1d43f7fa635acfde50b5006e16 | refs/heads/master | 2018-12-23T13:06:14.843724 | 2018-10-16T17:12:19 | 2018-10-16T17:12:19 | 152,489,476 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
class RunTrain(models.Model):
date = models.DateTimeField(auto_now_add=True)
distance = models.CharField(max_length=255, null=True, blank=True, default=None)
time = models.CharField(max_length=255, null=True, blank=True, default=None)
minsPerMile = models.CharField(max_length=255, nul... | UTF-8 | Python | false | false | 1,024 | py | 4 | models.py | 4 | 0.714844 | 0.694336 | 0 | 27 | 36.962963 | 84 |
JosephLevinthal/Research-projects | 5,222,680,248,812 | 50a3c182c322aacadd9983dcdd98b52d00005d25 | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/223/users/4444/codes/1716_2504.py | b0ca13315e36aba4d3bd53bdc18d78b27047d013 | [] | no_license | https://github.com/JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | v=int(input("quantidade de virus: "))
l=int(input("qtd leucocitos: "))
pv=float(input(" percentual de mut virus: "))
pl=float(input(" percentual de mut leococutos: "))
dias=0
i=0
while(l<=2*v):
v=v+v*pv/100
l=l+l*pl/100
i=i+1
dias=dias+1
print(dias)
| UTF-8 | Python | false | false | 256 | py | 13,190 | 1716_2504.py | 13,160 | 0.660156 | 0.617188 | 0 | 13 | 18.615385 | 50 |
oliverroick/rosi | 14,010,183,344,908 | e6ef060d5416d5c18bb801bd1f7213dc6d47563c | 143580af7e40e292ce5cf2e2c47ac3ed98721a57 | /tests/util.py | a2c5db2b6b223d9f28df45ad8d9dddc42527d061 | [
"MIT"
] | permissive | https://github.com/oliverroick/rosi | 46e4cb68596fc79fddd8d27c1a7591fae1e7f1ab | 27cf94ae3e73c199a7533fa28937e2b25a4f6106 | refs/heads/master | 2020-03-30T12:51:21.319148 | 2018-10-06T11:20:06 | 2018-10-06T11:20:06 | 151,244,450 | 1 | 0 | MIT | false | 2018-10-06T11:01:15 | 2018-10-02T11:36:13 | 2018-10-06T10:32:45 | 2018-10-06T11:01:14 | 10 | 0 | 0 | 1 | Python | false | null | def depth(L):
return isinstance(L, list) and max(map(depth, L))+1
| UTF-8 | Python | false | false | 70 | py | 6 | util.py | 3 | 0.657143 | 0.642857 | 0 | 2 | 34 | 55 |
liana-80/flask-vue-example | 9,268,539,451,841 | 1af80ec811fde0cee0b833f4aa587890acb95e9f | 0524b31a1185272af5ab572800783c4d6362b8eb | /api_rest/privileges.py | 27ef8dcca3ba2685ea174a55e336618954978e47 | [
"MIT"
] | permissive | https://github.com/liana-80/flask-vue-example | f17bbd922aaccc8783d582f854569a6a4b8360a1 | c0fc343312b2baf0f3009eb0c114c224d5f5deed | refs/heads/master | 2022-09-25T12:39:55.975663 | 2020-06-04T15:03:10 | 2020-06-04T15:03:10 | 269,379,966 | 0 | 0 | MIT | true | 2020-06-04T15:03:11 | 2020-06-04T14:21:37 | 2020-06-04T14:34:59 | 2020-06-04T15:03:10 | 41 | 0 | 0 | 0 | Python | false | false | # coding=utf-8
"""
desc: 定义权限
author: congqing.li
date: 2016-10-31
"""
from permission.permission import ItemPermission, VIEWNEEDS, MANAGENEEDS
# 权限管理模块的查看权限
admin_view = ItemPermission("admin", u"用户角色管理", VIEWNEEDS)
# 权限管理模块的管理权限
admin_manage = ItemPermission("admin", u"用户角色管理", MANAGENEEDS)
# 学生管理权限
student_... | UTF-8 | Python | false | false | 473 | py | 27 | privileges.py | 25 | 0.742706 | 0.718833 | 0 | 18 | 19.944444 | 72 |
au3641/HEPY_site | 7,318,624,292,662 | ef57ad4eec2c79f236ed46d4919f8a96f69a6601 | b8b8e640ce4c5f7084a6594c71ea5c3e51afbb9d | /HEPY_django/HEPY_new/migrations/0005_auto_20170716_1903.py | 8fc1eacddc7fdf114a448bb2621afb838641cebc | [] | no_license | https://github.com/au3641/HEPY_site | 8c51a6a33a61fcac39ed11fea171e158315aae9c | 04036d5ab5480c060488617048092911dfc69f25 | refs/heads/master | 2020-05-20T15:06:10.032928 | 2017-07-24T21:30:40 | 2017-07-24T21:30:40 | 84,488,450 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-16 17:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('HEPY_new', '0004_auto_20170712_0716'),
]
operations = [
migrations.AddField... | UTF-8 | Python | false | false | 743 | py | 60 | 0005_auto_20170716_1903.py | 19 | 0.570659 | 0.523553 | 0 | 25 | 28.72 | 174 |
baehll/python-exercise | 11,493,332,511,971 | 9857286b0d593ab6737b873e9b78ecd467c86daa | ba53cac18be782295fd54f1a9558094dbec4d11d | /chapter12/managerui.py | 14532bd6f54628831a51a2e6c95a1c8f48a31490 | [] | no_license | https://github.com/baehll/python-exercise | fff775d3f8ace636709fa948acc36a80dbae3b7a | 8a1f2578e59fec5046e541ca40607dce8095e685 | refs/heads/master | 2020-03-13T16:13:17.082255 | 2018-05-15T14:11:28 | 2018-05-15T14:11:28 | 131,192,437 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #####################
# Aufgabe 1,12.4.3#
# v1.0 #
# baehll #
# 02.05.2018 #
#####################
import pickle
from musical import *
class Manager:
__menuetext = """
Musical-Manager
------------------
(n)eue Vorstellung
(U)eberblick Vorstellungen
(S)torniere ... | UTF-8 | Python | false | false | 2,385 | py | 45 | managerui.py | 43 | 0.504406 | 0.497692 | 0 | 80 | 28.8 | 82 |
mfigat/public_rshpn_tool | 1,151,051,275,070 | 81371fa5fb576508aa13a6fb0a0e0e41a2b53828 | cfd374b34a6b1a6ae16b5d23f633a0c47ae471e1 | /generated_python_code/ball_collector/teleoperated/scripts/subsystem_cs.py | a8addcfbb53cffe97cb94e2be8cea36f22e5d4af | [
"BSD-3-Clause"
] | permissive | https://github.com/mfigat/public_rshpn_tool | dd91d12e28d31a9c97c878b4d6e0a482a9bddfb6 | 3555cb8f1eb35ef12441b9aef63dae8f578c2aa7 | refs/heads/master | 2021-11-05T23:47:08.904506 | 2021-11-02T12:26:29 | 2021-11-02T12:26:29 | 207,675,046 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
'''
Copyright (c) 2019, Robot Control and Pattern Recognition Group, Warsaw University of Technology
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions... | UTF-8 | Python | false | false | 174,238 | py | 59 | subsystem_cs.py | 32 | 0.750795 | 0.748252 | 0 | 3,007 | 56.943798 | 554 |
nagpureabhirag/Graph-1 | 17,471,926,969,178 | a932817460a1c07c44956c28efae9a826375e875 | 1c5de78c2f731a6e5c34524880912bfe89593048 | /find_the_town_judge.py | 12cfdfc1cc478a69e5a4e72aa60fe3afcd2924e1 | [] | no_license | https://github.com/nagpureabhirag/Graph-1 | cc6a19178e5e9e26e4e588088ebb009f152e2619 | a813d3b086bb6c899fb79f1a5b1438f69ab16fd2 | refs/heads/master | 2023-08-26T09:08:26.208774 | 2021-10-18T16:09:05 | 2021-10-18T16:09:05 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Did this code successfully run on Leetcode : YES
# approach
# calculate difference between indegrees and outdegrees
# TC: O(N)
# SC: O(N)
class Solution:
def findJudge(self, n: int, trust: List[List[int]]) -> int:
degrees = [0 for _ in range(n)]
for [i, j] in trust:
degrees[j-1] += 1... | UTF-8 | Python | false | false | 456 | py | 2 | find_the_town_judge.py | 2 | 0.537281 | 0.519737 | 0 | 17 | 25.882353 | 63 |
Ochwada/Thesis_-Data_Analysis-Public | 11,012,296,162,218 | 0f851d8f9f361781b6b920668062ea119f13c6f0 | 1c7c2690c4439be51135c85533f6f0d3cf4ff1ce | /wind_histogram.py | af10a3026442e4295738734ad0702b60f4a5657f | [] | no_license | https://github.com/Ochwada/Thesis_-Data_Analysis-Public | 516c4c15464511f0ef969f56c8bbb648c2767b94 | ac1e8a7bff96521c9e9b2134d56f3a09c1a72524 | refs/heads/master | 2020-04-09T02:45:24.202761 | 2018-12-01T14:48:49 | 2018-12-01T14:48:49 | 159,952,732 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# -*- codiing for wind_histogram -*-
import matplotlib.pyplot as plt
import numpy as np
#import scipy.stats as stats
from scipy import stats
import matplotlib.mlab as mlab
import statsmodels.api as sm
import wind_data as wd
import plot_winddata as pwd
from helper import date_to_doy, doy_to_date... | UTF-8 | Python | false | false | 5,467 | py | 10 | wind_histogram.py | 9 | 0.56338 | 0.449241 | 0 | 140 | 38.057143 | 131 |
TheDrHax/streamlink | 8,693,013,818,674 | d3c223fe1854552333643c1d17387b59ce411cbb | 716501ff054d10f095879f986d74882778fa72c5 | /tests/plugins/test_webcast_india_gov.py | 9e83d7dded01b3393c4227b4e511a4f73a88d4bd | [
"BSD-2-Clause"
] | permissive | https://github.com/TheDrHax/streamlink | 017fdfd999277089a0c89a209ba4f64df9e54916 | 4dfd0d516fd8484438389518985e3b5131b7a253 | refs/heads/master | 2021-10-26T17:43:50.402219 | 2020-10-11T22:43:53 | 2021-10-25T19:10:01 | 223,461,822 | 4 | 0 | BSD-2-Clause | true | 2019-11-22T18:25:47 | 2019-11-22T18:25:46 | 2019-11-22T15:37:19 | 2019-11-22T16:48:00 | 35,041 | 0 | 0 | 0 | null | false | false | from streamlink.plugins.webcast_india_gov import WebcastIndiaGov
from tests.plugins import PluginCanHandleUrl
class TestPluginCanHandleUrlWebcastIndiaGov(PluginCanHandleUrl):
__plugin__ = WebcastIndiaGov
should_match = [
"http://webcast.gov.in/ddpunjabi/",
"http://webcast.gov.in/#Channel1",
... | UTF-8 | Python | false | false | 368 | py | 111 | test_webcast_india_gov.py | 103 | 0.711957 | 0.706522 | 0 | 12 | 29.666667 | 64 |
colinmipapi/italian | 14,190,571,951,544 | 437a9635f279630430e9296b4f70dd2f82ab51b9 | cfbf93c27ea19920d620dabd1f0648fe082f9391 | /blog/models.py | 5980326e7c80d5d524c45e9763a75f9e549ebb9e | [] | no_license | https://github.com/colinmipapi/italian | 63c8ee03e55c3a572d89c42f3211687c60422ea1 | 8dbd270d6c7b9b2acb9f5e5fd964379030731f37 | refs/heads/master | 2021-01-21T17:17:17.988107 | 2017-03-16T03:36:58 | 2017-03-16T03:36:58 | 85,148,252 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.core.validators import MinValueValidator, MaxValueValidator
from django.http import HttpResponseRedirect
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=300)
slug = models.CharField(max_l... | UTF-8 | Python | false | false | 3,074 | py | 18 | models.py | 10 | 0.657775 | 0.639558 | 0 | 88 | 33.931818 | 112 |
kurodo/apiprueba | 17,583,596,128,773 | 11fd527bb4ed0167cf1e1591b7391d99580f4e52 | b41805d913e7bc0f09399bec558d7079863e331b | /catalogo/urls.py | ed0ac18afd608514b00565f422339fde25d38631 | [] | no_license | https://github.com/kurodo/apiprueba | 21fb5cd569ba2311d0f2de887c34ed0e8c065c98 | 7db0682f2b054dcfdbc4d98e713cb3b067651f09 | refs/heads/master | 2020-05-17T15:55:53.227062 | 2019-05-05T00:17:18 | 2019-05-05T00:17:18 | 183,805,181 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path, include
from rest_framework import routers
from .views import *
router = routers.DefaultRouter()
router.register(r'producto', ProductoViewSet)
router.register(r'precio', PrecioProductoViewSet)
router.register(r'variacion', VariacionViewSet)
router.register(r'producto_variacion', Prodcuto... | UTF-8 | Python | false | false | 535 | py | 38 | urls.py | 36 | 0.781308 | 0.781308 | 0 | 17 | 30.470588 | 66 |
mengyuqianxun/Python-Algorithm-interview | 6,854,767,851,226 | 8150bdd89ac24e0504450d895cabe091697ec4be | fdfbcf4451f3f165ad6c897c74563dc1f04908db | /ch3_binary_tree/5.py | f2f7763f7f731f78996a097caa6eae12752983dd | [] | no_license | https://github.com/mengyuqianxun/Python-Algorithm-interview | 3c9baac00657fea68786876706b526140c1f7799 | 95b6aa69fdffb2e8cbc696cc958d8d5ee8eb5c29 | refs/heads/master | 2020-08-29T06:50:37.178084 | 2020-02-17T03:11:48 | 2020-02-17T03:11:48 | 217,958,936 | 4 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
class BiTNode:
def __init__(self):
self.data = None
self.lchild = None
self.rchild = None
def array2tree(arr,start,end):
root = None
if end >= start:
root = BiTNode()
mid = math.floor((start + end +1)/2)
root.data = arr[mid]
root.lchild =... | UTF-8 | Python | false | false | 1,328 | py | 84 | 5.py | 68 | 0.518838 | 0.502355 | 0 | 55 | 21.963636 | 49 |
2877992943/count_record | 19,679,540,180,773 | bfc7192cf95786ec3455a8b28e8f3de0dadcfd5a | fca9fbaae9bff52d5ebb9cbce424983734101143 | /demo1028_tagitApp_QueryCleanData_chenyuTeam_walkRunRid_countRecord_ios.py | f4129a769e2470e2da3e54c04dd1903914e5bca0 | [] | no_license | https://github.com/2877992943/count_record | c15383b38b10334eac482b49e3bcd3661acf6cc5 | cfd53d30c606a9dadca9f9a33b66ad670b1934f9 | refs/heads/master | 2016-09-01T16:07:57.582265 | 2015-11-23T12:17:09 | 2015-11-23T12:17:09 | 46,718,267 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# encoding=utf-8
"""
tagit app
android
count the number of record for each data collector
not visualize,cleaning,store data
"""
import numpy as np
import cPickle,math,random
from leancloud import Object
from leancloud import Query
import leancloud
import time,os
deviceId={'huawei':'ff... | UTF-8 | Python | false | false | 6,408 | py | 1 | demo1028_tagitApp_QueryCleanData_chenyuTeam_walkRunRid_countRecord_ios.py | 1 | 0.647784 | 0.571941 | 0 | 224 | 27.388393 | 100 |
ohjho/pyp-w1-gw-language-detector | 3,762,391,372,115 | 43d54a81c4a6636972bcb519188cdebf60cc6d2b | 23c333a9db3bedf1688a346bf1573e2f5bd34117 | /language_detector/main.py | c39596f4d92bac9f2427cb78c0c74dfafbd361ab | [
"MIT"
] | permissive | https://github.com/ohjho/pyp-w1-gw-language-detector | ee5215e35dea4a304fefe77c6a58c77bce37b1c1 | d40f9ab7b02eb568208c02a8add591a81b627236 | refs/heads/master | 2021-01-23T10:56:34.334393 | 2017-06-02T02:18:48 | 2017-06-02T02:18:48 | 93,109,242 | 0 | 0 | null | true | 2017-06-01T23:56:54 | 2017-06-01T23:56:54 | 2017-01-12T23:09:17 | 2017-06-01T23:29:51 | 20 | 0 | 0 | 0 | null | null | null | # -*- coding: utf-8 -*-
def detect_language(text, languages):
"""Returns the detected language of given text."""
count = {}
for language in languages:
matches = (len(set(text.split(' ')) & set(language['common_words'])))
count[language['name']] = matches
return max(count, key=coun... | UTF-8 | Python | false | false | 337 | py | 2 | main.py | 2 | 0.58457 | 0.581602 | 0 | 11 | 28.727273 | 77 |
h-mayorquin/mnist_deep_neural_network_BPNNs | 9,500,467,661,736 | 3b1d73bd2a961ffa0f686f1e0d7d42812d8a511e | a5aa4c7d0b7b2a6202c1befadd11a4a31d571da1 | /distort_pattern.py | 4275c3c6cc4172597e08ac47102c25f4db06ce6e | [] | no_license | https://github.com/h-mayorquin/mnist_deep_neural_network_BPNNs | 793b60985df41f4895e266829b8308bbf62952dd | a679e09b5f5b18ce95282e6963662ab700c227d6 | refs/heads/master | 2021-01-01T19:47:19.908058 | 2015-05-08T16:57:37 | 2015-05-08T16:57:37 | 31,664,159 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from load_binary_files import training_ims, training_labels
from corrupt_functions import distort_binnary
from copy import deepcopy
# Select quantity of data to use
N_data_total = len(training_labels)
percentage = 0.01
N_to_use = int(percentage * N_data_total)
# Deci... | UTF-8 | Python | false | false | 867 | py | 23 | distort_pattern.py | 22 | 0.734717 | 0.710496 | 0 | 35 | 23.771429 | 59 |
TheClearwind/DeepISP | 1,228,360,690,722 | 5a3fae6bb03628b93bdb2cea8b2499dbdcd1edca | 3a37356348b1961a70dac753980c61e21a7ae725 | /utils.py | 936648a6bd9a083ea261ce16a58beb617b73277d | [] | no_license | https://github.com/TheClearwind/DeepISP | cf328be53ba42ca5ba929fd56bd5f33bdc582eef | 0e88c8915eab0723989a5f8632b09f2fa57d240d | refs/heads/master | 2022-11-23T06:43:51.022142 | 2020-07-15T06:44:21 | 2020-07-15T06:44:21 | 279,495,723 | 8 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
def extract_bayer_channels(raw):
# RGGB模式
ch_B = raw[1::2, 1::2]
ch_Gb = raw[0::2, 1::2]
ch_R = raw[0::2, 0::2]
ch_Gr = raw[1::2, 0::2]
return ch_R, ch_Gr, ch_B, ch_Gb
def extract_bayer_channels_v2(raw):
# RGGB模式
ch_R = np.zeros_like(raw)
ch_G = np.zeros_like(... | UTF-8 | Python | false | false | 1,045 | py | 9 | utils.py | 8 | 0.537126 | 0.47541 | 0 | 44 | 22.568182 | 58 |
Sovetnikov/livelock | 2,413,771,641,869 | 7e88346d92d017aba1a4973a11d39333d2302304 | 6b6a99d78765d71b1024c3876753013cb3cb0398 | /livelock/server.py | 816cf39bbb09849538eee4f0ced410c3be7bd101 | [] | no_license | https://github.com/Sovetnikov/livelock | a8beead745405f957576e6f8e2af0e82b1436c6a | 237b01c2ab2efebf5e74c2a5653ca5168ede65dd | refs/heads/master | 2022-12-24T14:46:43.013963 | 2022-12-14T15:32:24 | 2022-12-14T15:32:24 | 193,243,160 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import asyncio
import logging
import os
import signal
import socket
import time
import uuid
from asyncio import StreamReader, IncompleteReadError, Event
from timeit import default_timer
from livelock.memory_storage import InMemoryLockStorage
from livelock.shared import DEFAULT_RELEASE_ALL_TIMEOUT, DEFAULT_BIND_TO, DEF... | UTF-8 | Python | false | false | 31,248 | py | 19 | server.py | 16 | 0.55163 | 0.5482 | 0 | 769 | 39.563069 | 179 |
Oneflow-Inc/oneflow_convert_tools | 3,307,124,850,380 | 36e9733468c3d435d9be826a6472de1b0c544134 | 9c4987a2db63a269ca86b035fb1c5924342a8ee6 | /oneflow_onnx/oneflow2onnx/handlers/math.py | 588f52195d7f141d76df440f4d1e36677faedfbe | [] | no_license | https://github.com/Oneflow-Inc/oneflow_convert_tools | 6d50b11a190f173071b89984a851c266af888995 | 6bb9b54dcfa78eaaddaa117b8af423ab328451cb | refs/heads/main | 2023-07-09T19:46:46.472939 | 2023-03-07T07:38:58 | 2023-03-07T07:38:58 | 347,891,709 | 22 | 4 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | UTF-8 | Python | false | false | 48,404 | py | 30 | math.py | 17 | 0.599289 | 0.582369 | 0 | 1,145 | 41.274236 | 190 |
PADAS/das-clients | 4,776,003,639,402 | e62b7e4e0d071b6b24963c3680a2644c64ca2f69 | 729926a37895feba9b754739e7e9e2f09113f8b4 | /python/dasclient/dasclient.py | 3e31f334912660d2d5924c143d7e9ca5831dd40b | [
"MIT"
] | permissive | https://github.com/PADAS/das-clients | 159959d6c5c6cc776f27ff86d77a386e25d3138e | 05a9ca1ff395bfaef4ab9af0cb75aab18b6150a2 | refs/heads/main | 2022-12-12T21:41:10.250817 | 2022-07-12T19:13:27 | 2022-07-12T19:13:27 | 84,587,693 | 4 | 0 | MIT | false | 2022-12-08T15:44:05 | 2017-03-10T18:08:56 | 2022-05-06T15:56:08 | 2022-12-08T15:44:03 | 183 | 5 | 0 | 3 | Python | false | false | from datetime import datetime, timedelta
import urllib.parse
from urllib3.util.retry import Retry
import pytz
import logging
import re
import dateparser
import concurrent.futures
import math
import requests
from requests.adapters import HTTPAdapter
import io
import json
from .version import __version__
version_string ... | UTF-8 | Python | false | false | 34,143 | py | 18 | dasclient.py | 8 | 0.558387 | 0.555165 | 0 | 902 | 36.85255 | 169 |
MaxT2/EWPythonDevelopment | 14,774,687,502,634 | 49def9b3e9840ab2ea8c904543c6cf2385d290ad | f05e792af806f1069238aae3ce966a3268708f41 | /RandomStuff/SpaceBackgroundScreenshot/SpaceBackgroundCreator.py | 84dc5d491e56d1d093bd144c91ab3e9748bb6c83 | [] | no_license | https://github.com/MaxT2/EWPythonDevelopment | 9de608e32f319132b85e0ea4a1548872d2c90b55 | 6154b85a0b35438bb51944eddc742684469e6b60 | refs/heads/master | 2020-06-18T12:10:56.381449 | 2019-07-11T18:39:04 | 2019-07-11T18:39:04 | 196,299,153 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # import pygame library so we can use it!
import pygame
import random
from pathlib import Path
from PythonCodingClub import pygameColors
# class definitions
class Star(pygame.sprite.Sprite):
def __init__(self, screen_width, screen_height):
pygame.sprite.Sprite.__init__(self)
# setup random numbers
... | UTF-8 | Python | false | false | 2,957 | py | 52 | SpaceBackgroundCreator.py | 49 | 0.682448 | 0.671288 | 0 | 103 | 27.708738 | 94 |
eshenkulovilias/month_3 | 10,110,353,014,800 | 247546cead6969bef3fe65b9ae4fa2d6bdabdd22 | 3575106d0386044a3e010c3d454d74bf2ec911f9 | /twit_post.py | 728aee6ade9be404c405cea9cd23046df533e212 | [] | no_license | https://github.com/eshenkulovilias/month_3 | 92d4a2b7198e18a48ef5c6d8be2471cfb735666b | 716e1b5b1677fc47951c21aa78abffbf983ec6a1 | refs/heads/main | 2023-05-08T11:52:31.614816 | 2021-06-02T03:26:39 | 2021-06-02T03:26:39 | 370,043,570 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class CharField:
def __init__(self, char, max_length):
self.char = char
self.max_length = max_length
def __str__(self):
return self.char
class User:
def __init__(self, name, age):
self.name = name
self.age = age
def __str__(self):
return self.name
cl... | UTF-8 | Python | false | false | 677 | py | 5 | twit_post.py | 5 | 0.564254 | 0.553914 | 0 | 31 | 20.83871 | 73 |
joelcolucci/mailgunpi | 16,595,753,656,094 | 1e69a10db5d8d50c33bb5ef62518a657c8110332 | 52fc554d8f11e2b3e2e3dda9a13815b2adc45b62 | /tests/mailgunservice/test_api.py | 471a57de418665730ecc87a30d8d5ad0f8164757 | [] | no_license | https://github.com/joelcolucci/mailgunpi | 759fc0b47b8b72062a3a11a867271fccfe4e2ed1 | 186109e1b5f0aa7575ae2b8ff6636e0c003c6786 | refs/heads/master | 2016-06-13T15:00:22.305192 | 2016-06-13T03:00:02 | 2016-06-13T03:00:02 | 56,538,257 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Unit tests for mailgunservice api blueprint
"""
import json
from unittest import TestCase
from unittest import main
from flask import Flask
from smokinggun.mailgunservice import service_api
# Create Flask application for blueprint only
app = Flask(__name__)
app.register_blueprint(service_api, url_prefix='')
... | UTF-8 | Python | false | false | 1,917 | py | 20 | test_api.py | 15 | 0.636411 | 0.634324 | 0 | 74 | 24.905405 | 69 |
andarabr/simvas | 9,981,504,029,995 | 38507d86a308dd2fcec2f25c7e32375450b98f4e | aa694370905208d986a0e29a678f18aef328dfed | /mvasapi/apps.py | c74bb7d6f33348d8467c74b96c6ae71b00c12627 | [] | no_license | https://github.com/andarabr/simvas | 4d1369a5f2935554f42b330e1630ce7831706016 | bb4a9bbc16c0e4c84e754194947756fb7d568b12 | refs/heads/master | 2023-08-26T22:43:55.396918 | 2021-11-11T07:54:47 | 2021-11-11T07:54:47 | 421,659,325 | 0 | 0 | null | false | 2021-11-11T07:54:48 | 2021-10-27T03:07:03 | 2021-11-10T09:29:24 | 2021-11-11T07:54:47 | 41 | 0 | 0 | 0 | Python | false | false | from django.apps import AppConfig
class MvasapiConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'mvasapi'
| UTF-8 | Python | false | false | 146 | py | 21 | apps.py | 14 | 0.746575 | 0.746575 | 0 | 6 | 23.333333 | 56 |
mhw32/PersistentHomology | 2,585,570,342,328 | 45c4fe229c4ade63c2971be48a2e4956c18cb776 | 3096e153fa8400f7c4686ba94d733d0e05c6a54f | /paper/image_tools/gen_fig9_v2.py | 2183276ba0f1f46d7be6339905402babe56590f3 | [] | no_license | https://github.com/mhw32/PersistentHomology | be9982fcf022cb63541187cfff6421e889dce6ca | db806a5e091eb9c14f03c0720d11eabe9dd089de | refs/heads/master | 2021-05-01T12:36:15.017641 | 2017-10-31T06:24:20 | 2017-10-31T06:24:20 | 42,668,152 | 1 | 0 | null | false | 2017-04-22T17:05:36 | 2015-09-17T16:36:51 | 2017-01-16T18:58:49 | 2017-04-22T17:05:36 | 355,699 | 0 | 0 | 1 | Jupyter Notebook | null | null | import sys, numpy as np
sys.path.append('/Users/mikewu/Desktop/Research/persist-homology/')
import sub_parse
reload(sub_parse)
import matplotlib.pyplot as plt
import matplotlib
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
name = '/Users/mikewu/Desktop/Research/persist-homology/saved_states/... | UTF-8 | Python | false | false | 7,749 | py | 70 | gen_fig9_v2.py | 61 | 0.597755 | 0.562137 | 0 | 198 | 38.131313 | 138 |
mongesan/Atcoder-m0_ngesan-py | 18,236,431,170,095 | a3b01ee380964443acd439460f9528f168f60863 | d27af9d58b91b8cd998ac0eb87d980d304ff0670 | /Beginner-Contest/ABC178/ABC178_F.py | 63f77f925218a53ab97c450c0ccb5e4a53ff520f | [] | no_license | https://github.com/mongesan/Atcoder-m0_ngesan-py | 29dd79daab149003ffc8b6b6bad5fa2e7daa9646 | 6654af034d4ff4cece1be04c2c8b756976d99a4b | refs/heads/master | 2023-08-20T19:50:04.547025 | 2021-10-27T12:24:51 | 2021-10-27T12:24:51 | 258,486,105 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | cnt=0
for i in range(10):
for j in range(10):
if 0<i<9 and 0<j<9:
continue
else:
print(i,j)
cnt+=1
print(cnt) | UTF-8 | Python | false | false | 165 | py | 193 | ABC178_F.py | 191 | 0.436364 | 0.375758 | 0 | 9 | 17.444444 | 27 |
nadav7679/Hopfield-Model | 12,386,685,716,093 | 6099dd1004f63e91ffaa7fd7d2b0ff502d11f37c | 0aca4f6434bf86958205098f4bc669790ef8c93b | /network.py | c7b16613fdcce7620adefc1f7808754fa81075f0 | [] | no_license | https://github.com/nadav7679/Hopfield-Model | 6650869509cc2cf429c8cd9b56a864eeb4b275c4 | 77cfcd5a2bad3ca4979b008e81d4ddc40a0b47e3 | refs/heads/master | 2022-06-26T11:41:07.779961 | 2020-05-10T20:42:59 | 2020-05-10T20:42:59 | 262,868,494 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
# Hopfield model - Network class
## By Nadav Porat
# ------------------------------------
import numpy as np
import matplotlib.pyplot as plt
import idx2numpy
from scipy.special import erfc
from PIL import Image
import matplotlib.animation as animation
from IPython.display import HTML
get_ipython().run_line_magic('ma... | UTF-8 | Python | false | false | 8,258 | py | 2 | network.py | 2 | 0.49782 | 0.486922 | 0 | 293 | 27.174061 | 141 |
liman21/qiyexinyong | 7,567,732,390,180 | b176ece3f890b701874475bfacff3a832fe0791b | 5c6df020950d6f684903d3c6cd22f74c7bacbf34 | /企查查/xin/zhanghao.py | 8449b8016c8cf75e386e33bdb6791bf31a85d497 | [] | no_license | https://github.com/liman21/qiyexinyong | 5a569b1a03ec5492897b81cc856ab81e0d0c7e4d | 9f05332e934c33b2ce446f78a699e29abda93485 | refs/heads/master | 2022-12-05T11:35:33.193184 | 2020-08-31T03:26:27 | 2020-08-31T03:26:27 | 291,604,379 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests,re
url='https://www.yinsiduanxin.com/'
con=requests.get(url).content.decode('utf-8').replace('\n','').replace('\t','').replace('\r','')
conts=re.findall(' <a href="/(\w+)-phone-number/verification-code-(\d+)\.html" class="clickA"',con)
for cont in conts:
tell=cont[1]
link='https://www.yinsiduanx... | UTF-8 | Python | false | false | 508 | py | 23 | zhanghao.py | 20 | 0.637795 | 0.627953 | 0 | 10 | 49.9 | 107 |
gabbpuy/django-discordbot | 3,856,880,636,815 | fbe1308b848910334c5fe10724e5ed508fb66f71 | 24c9e2bdb02debeb5f95ac439760f36f3c7171f1 | /discordbot/botevents/__init__.py | 50bac56d1297158acafb5275ff808f78d1efea0b | [
"MIT"
] | permissive | https://github.com/gabbpuy/django-discordbot | a63f3ce0b042c56475863158a3d6a2595627f127 | 7da39206b9b01f615447ca824851e79fafbe9305 | refs/heads/master | 2023-05-24T10:19:32.436866 | 2021-06-10T19:05:34 | 2021-06-10T19:05:34 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from discordbot.botevents.on_command_error import setup as setup_on_command_error
from discordbot.botevents.on_command import setup as setup_on_command
from discordbot.botevents.on_message import setup as setup_on_message
from discordbot.botevents.general import setup as setup_general
def setup(bot):
setup_on_comm... | UTF-8 | Python | false | false | 409 | py | 60 | __init__.py | 55 | 0.792176 | 0.792176 | 0 | 10 | 40 | 81 |
manch93/vfs-slots-api-monitor | 10,849,087,412,761 | b85c047a7fee80b48de14eb40b1f024c3fb8f963 | e0089c60a870e1837c321ef9a1293ff75359a306 | /PingVFS.py | 97d55a252966331c7d061363ad124b7cad438325 | [
"MIT"
] | permissive | https://github.com/manch93/vfs-slots-api-monitor | bf6fdbdf1bc0843199837ee69f90b3636701d747 | 864342fd1e144971df2a31e45b120fb22536f2bd | refs/heads/main | 2023-06-14T21:30:16.700534 | 2021-07-15T02:19:11 | 2021-07-15T02:19:11 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import os
import sys
import time
import json
import requests
import subprocess
from playsound import playsound
from urllib.parse import urlencode, quote_plus
from datetime import datetime, timedelta
class PingVFS:
# default constructor
def __init__(self, params):
self.url = params... | UTF-8 | Python | false | false | 5,062 | py | 9 | PingVFS.py | 4 | 0.463415 | 0.46031 | 0 | 158 | 27.544304 | 83 |
vanshdevgan/Crypton | 1,589,137,913,906 | c2f4cf155aba2b72dc6902c883daec4683d19376 | 9c923224c9422f4da3336bb6bdadb9d550a30eb0 | /RSA-encryption/Attack-Coppersmith/exploit.py | 41062c7e23746cd15d55bb7b3f5e2422642b7c3d | [
"MIT"
] | permissive | https://github.com/vanshdevgan/Crypton | d8f79f6d0a456fb13253913ffb27ebc6f47a6454 | 92033a94bc6e7a543117dcef51407121ac7acfa2 | refs/heads/master | 2021-07-02T08:40:40.068449 | 2020-10-02T15:57:58 | 2020-10-02T15:57:58 | 181,874,564 | 0 | 2 | MIT | true | 2020-10-16T16:10:05 | 2019-04-17T11:08:37 | 2020-10-02T15:58:02 | 2020-10-02T15:57:59 | 1,138 | 0 | 2 | 1 | Python | false | false | from sage.all import *
# f is the monic polynomial f(x) = (m + x)**e - c whose roots we have to find
def stereotyped(f, N):
P.<x> = PolynomialRing(Zmod(N))
beta = 1
dd = f.degree() # Degree of the polynomial
epsilon = beta/7
XX = ceil(N**((beta**2/dd) - epsilon))
rt = f.small_roots(XX, beta, ... | UTF-8 | Python | false | false | 588 | py | 204 | exploit.py | 69 | 0.585034 | 0.573129 | 0 | 20 | 28.4 | 77 |
ytgw/01_MicroMouse2016 | 7,567,732,402,304 | db987e08beaf2aff796f56c2b59b79bc9e700208 | 20ab163d5c8052322e8ea235d2c32fd99ab83c03 | /middleware.py | a0b13829539f5f440f0e29ca9a5703efbd3f7da4 | [] | no_license | https://github.com/ytgw/01_MicroMouse2016 | 3eea19a1c3567ddc33d0d57b71124ae4e4aced9c | b4bc0c1d0f6e940be88b3b8b7bf6b6cd3d0cfea8 | refs/heads/master | 2017-04-26T19:41:35.663047 | 2016-08-30T13:25:13 | 2016-08-30T13:25:13 | 66,799,173 | 0 | 0 | null | true | 2016-08-29T00:51:29 | 2016-08-29T00:51:29 | 2016-08-04T16:18:10 | 2016-08-28T16:35:15 | 876 | 0 | 0 | 0 | null | null | null | # coding: UTF-8
#-----------------------------------------------------------------------------#
# Declation #
#-----------------------------------------------------------------------------#
# 各デバイスドライバのパス
sensor_driver = "/dev/rtlightsensor0"
switch_dri... | UTF-8 | Python | false | false | 5,152 | py | 4 | middleware.py | 3 | 0.455315 | 0.434691 | 0 | 110 | 33.390909 | 79 |
jl223vy/Catching-a-Python | 19,628,000,563,000 | b804a6f8f0ea07a96eabbe6fc2fbd9bc1a4293e4 | 8689bf35529fd245df659abbbeaaa158d91cf749 | /Test/用户登录(三次机会).py | de98a903bb9a96e1308bb385078c9560ddc45d6c | [] | no_license | https://github.com/jl223vy/Catching-a-Python | 56a5ebd5994b221233b6504dd0de975fa7b4738e | 1a8495bfc35f4a98d061783c65d84bfe415c3f13 | refs/heads/master | 2021-05-08T19:05:39.701496 | 2018-07-09T13:58:44 | 2018-07-09T13:58:44 | 119,550,132 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def main():
name = "Kate"
psw = "666666"
flag = 1
for i in range(3):
tName = input()
tPsw = input()
if tName == name and tPsw == psw:
print("登录成功!")
break
else:
flag = 0
if flag == 0:
print("3次用户名或者密码均有误!退出程序。")
main()
| UTF-8 | Python | false | false | 361 | py | 41 | 用户登录(三次机会).py | 40 | 0.429022 | 0.394322 | 0 | 17 | 17.647059 | 41 |
abbasjam/abbas_repo | 2,319,282,364,171 | 5dd40a792a30e6f0134a1eb3beb7501b77d0d1c9 | 8ff01e8bbb04a6411a16766f29ff6bc94878be0c | /python/dev-ops/python/pythan-class/set_example2.py | 3d3fac7648bca127372c2422830502278c8a1e23 | [] | no_license | https://github.com/abbasjam/abbas_repo | 5642db639e12b5ec99f88834b472e44567b5e3aa | 6a55288ba7c7e44f55f034b0e4978c51da6d2116 | refs/heads/master | 2020-08-17T23:12:47.168145 | 2020-03-23T09:15:41 | 2020-03-23T09:15:41 | 215,722,331 | 4 | 4 | null | null | null | null | null | null | null | null | null | null | null | null | null | print ("Set Manipulations")
print ("-----------------")
x={1,2,3,4,5,6}
print ("Given x is :",x)
x.discard(5)
print ("after discard(5):",x)
x.discard(100)
print ("After discard(100):",x)
| UTF-8 | Python | false | false | 187 | py | 229 | set_example2.py | 153 | 0.572193 | 0.497326 | 0 | 8 | 22.375 | 31 |
Kuroko0o/eje_python | 13,683,765,806,392 | 617cc3362893cf70d5fb52e38a59a92b155bef2b | d2078cf5931ceb38307ee74da918ada83d28b867 | /promedios.py | e37ccb5f98e0088b23ff631a1eb94c3d59725727 | [
"Apache-2.0"
] | permissive | https://github.com/Kuroko0o/eje_python | 98255d08ba262b343ea75eaf375bf827812cd1fe | 12580bdcb2b70b89b20e2566bf17870ba4532ef2 | refs/heads/master | 2022-11-09T13:34:46.832207 | 2020-06-21T03:58:29 | 2020-06-21T03:58:29 | 273,349,945 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | print(" ****** Bienvenido al Registro de Promedios por Materias Y Alumnos ****** ")
print(" ")
print ("*******************************************************")
print(" ")
k = input("Ingresar la cantidad deseada de nombres de alumnos y promedios que desea conseguir: \n")
try:
cant = int(k)
except :
print("L... | UTF-8 | Python | false | false | 1,630 | py | 5 | promedios.py | 3 | 0.456335 | 0.45572 | 0 | 32 | 49.8125 | 99 |
xielinshai1992/PyQt5 | 11,553,462,035,406 | 787724c7d651a4e447a4673a2d5a4868a3ff5b0e | b9004f0539279fe61539164076d8e71b8a884965 | /create_airportdata/adsb_mainForm.py | 2c8360d0b8ccf90a19ad819d51850de563a8581d | [] | no_license | https://github.com/xielinshai1992/PyQt5 | 2576eaa3dd672da94a0cab389ad3a1a5eb48df50 | a295b8d97165f8fec7f7e4b64ffc75604ac91269 | refs/heads/master | 2021-06-15T18:18:12.748160 | 2021-05-14T09:02:52 | 2021-05-14T09:02:52 | 200,157,657 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'adsb_mainForm.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Ma... | UTF-8 | Python | false | false | 26,115 | py | 20 | adsb_mainForm.py | 13 | 0.697866 | 0.652364 | 0 | 408 | 62.289216 | 133 |
ruoyuryc/Deep-Learning-and-Practice-2020-Spring | 10,015,863,742,504 | cf013a25a98a87241155c3a652812f76407a55a8 | 1a7b47bb1ff483b236211aaa5cc648b9c7854853 | /Lab6/dataset/preprocess.py | d7f6f828773917338ced47463e4c8f1aed341920 | [] | no_license | https://github.com/ruoyuryc/Deep-Learning-and-Practice-2020-Spring | 4929ed3aa83312029daf724d76554f8768a23e4c | 7ac9fc9163635aff8ae386c610396ae4646f8095 | refs/heads/master | 2022-10-20T04:45:37.648427 | 2020-06-15T15:24:25 | 2020-06-15T15:24:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import PIL
from PIL import Image
import torch
import json
from torchvision import transforms
from tqdm import tqdm
with open('objects.json', 'r') as f:
objects = json.load(f)
with open('labels.json', 'r') as f:
labels = json.load(f)
trans = transforms.Compose([
transforms.Resize((64, 64)),
transfor... | UTF-8 | Python | false | false | 902 | py | 79 | preprocess.py | 54 | 0.638581 | 0.611973 | 0 | 39 | 22.128205 | 88 |
radtek/Server-Monitoring | 9,423,158,281,982 | 7219366ebfbf87e59f6fdd2fd5ccae0112e74180 | 5cd16658110d9a65556b63a16cf07a9b6ea338fc | /Ver2.0/zabbix/CentOS-7/vdisk_status.py | 7c0126bdacdb53b979ffaff12a108657d624781c | [] | no_license | https://github.com/radtek/Server-Monitoring | 60a21c837bddd786bddb41ee463ba2f5c11acce5 | 9f3ca9876a0ed5e9f4971cec873e524f06fd87ab | refs/heads/master | 2023-05-02T16:20:52.299839 | 2021-05-19T14:57:15 | 2021-05-19T14:57:15 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import re
import sys
def get_pdisk_status(logicaldrive):
conent=os.popen("sudo hpacucli ctrl all show config").readlines()
for index in range(len(conent)):
if logicaldrive in conent[index] and re.split(r'[ ]',conent[index])[7].strip()==logicaldrive:
return re.split(r'[) ]',conent[index])[12].strip()
... | UTF-8 | Python | false | false | 413 | py | 74 | vdisk_status.py | 40 | 0.677966 | 0.663438 | 0 | 15 | 26.533333 | 95 |
baidw/languages | 11,965,778,916,584 | d13a61b51cf2af8b54e138d63029d9326688fd45 | 2f4c7fae43c7d13d1925f8d5a53d05021865c34b | /python/trainning/train_001_farbic.py | e23676cea992ef58f7f2852115628f5ac1a9a023 | [] | no_license | https://github.com/baidw/languages | 87aafe620d6873e6bffc6d0aafe517939784bba0 | 5e7cccc737cc6f415e0b1e91f441a84b6286603b | refs/heads/master | 2020-05-22T06:40:33.668235 | 2018-10-23T05:59:22 | 2018-10-23T05:59:22 | 60,157,718 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__='baidw'
def tribonacci(signature,n):
#your code here
temp = signature
slen=len(temp)
if n ==0:
return []
if n==1 and len(list(set(signature)))==1:
return signature[:1]
while slen<n:
temp.append(int(temp[slen-1])+... | UTF-8 | Python | false | false | 434 | py | 78 | train_001_farbic.py | 66 | 0.56682 | 0.539171 | 0 | 21 | 19.714286 | 74 |
cpressland/dictfilter | 15,693,810,512,280 | 73cec6a3d0e754d20788f3fe19326ddf0f70fc83 | 80cad9acb46be23437f22344e23b79caf3c45e98 | /dictfilter/__init__.py | 64fa0354e1a5c9182228aaf6b3a9d30c6ed0590a | [
"MIT"
] | permissive | https://github.com/cpressland/dictfilter | fbd1e5ba6b47253c529eb2c25b666e223dcae90c | a55f68d1719bc951e283b8dccbd7eee315bbdee5 | refs/heads/master | 2023-03-12T16:08:14.512146 | 2023-02-28T13:46:46 | 2023-02-28T13:46:46 | 289,022,266 | 0 | 0 | null | true | 2020-08-20T14:05:32 | 2020-08-20T14:05:31 | 2020-08-20T13:57:11 | 2020-08-20T13:57:07 | 0 | 0 | 0 | 0 | null | false | false | from dictfilter.core import query # noqa
| UTF-8 | Python | false | false | 42 | py | 10 | __init__.py | 5 | 0.785714 | 0.785714 | 0 | 1 | 41 | 41 |
dcherix/apiontology-demonstrator | 1,829,656,074,901 | 1c132bae81dadeec1fa82712aa2177961c35223c | d62283766afd59ddde1a630c80eb92d52cf3df0f | /apiontology-demonstrator-example-services/citylatlong.py | 15ff810ace2780c3d5a5ec1a00e3a9b56c1af313 | [] | no_license | https://github.com/dcherix/apiontology-demonstrator | 129d16e4081f22677642f38a62a7ec49ecb1c1b1 | 9a4974f1cfdbba6b7e05e5f64beaa7e2792592cd | refs/heads/master | 2022-12-22T17:19:40.697607 | 2018-10-18T05:14:53 | 2019-09-04T19:56:21 | 42,429,342 | 2 | 0 | null | false | 2022-12-16T09:52:56 | 2015-09-14T05:40:31 | 2019-09-04T19:57:03 | 2022-12-16T09:52:52 | 5,566 | 2 | 0 | 10 | Java | false | false | '''
service returns for a given city and adminarea the corresponding lat,long
@author a.both
'''
from service import init_service
import csv
from pprint import pprint
def citylatlong( cityname, adminarea ):
'''
returns the companys city, country and stock name as strings for a given company name
'''
g... | UTF-8 | Python | false | false | 1,064 | py | 75 | citylatlong.py | 49 | 0.665414 | 0.661654 | 0 | 45 | 22.666667 | 89 |
Richard-CH-NG/djangular_project | 3,728,031,638,696 | 55d208038bc4f61ccdeddc5720f80405fe8a0516 | cc8445d0af32a7134ffd8c5b45851d7bd73069a3 | /accounts/forms.py | 7a2d40f0ee12fb875f5e64ca998d198314a07b1e | [] | no_license | https://github.com/Richard-CH-NG/djangular_project | 5a5ad33b080bc25ae7a93f15e7e507961d1f4a9f | fa121457cf9ae81886df034692811141d8868daa | refs/heads/master | 2017-07-31T17:12:25.470749 | 2017-06-29T06:00:07 | 2017-06-29T06:00:07 | 95,001,627 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django import forms
from django.contrib.auth import (
authenticate,
get_user_model,
login,
logout,
)
User = get_user_model()
class UserLoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget=forms.PasswordInput)
def clean(self):
username = self.... | UTF-8 | Python | false | false | 1,894 | py | 31 | forms.py | 18 | 0.629356 | 0.62566 | 0 | 56 | 32.821429 | 82 |
guchio3/kaggle-homecredit | 14,671,608,304,654 | 4e58d936853ac71598de202f0ec4a27cc48d6fd4 | e29103f2f7e4a44dbb4626f4f138ed09555d2dcc | /protos/shared_kfold/split.py | c66a33d0cee56735c0558f7ee054e78c3d7075c4 | [] | no_license | https://github.com/guchio3/kaggle-homecredit | e800eac42dd0f2428de9099d6052139c2df6e2ac | 210a7bb3a5e124bd4a9895cf95be8d5269c1a225 | refs/heads/master | 2020-04-27T23:56:57.408848 | 2019-03-16T07:05:56 | 2019-03-16T07:05:56 | 174,797,829 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sklearn.cross_validation import KFold
import numpy as np
def splitter(clf, x_train, y, x_test):
NFOLDS = 5
SEED = 71
kf = KFold(len(x_train), n_folds=NFOLDS, shuffle=True, random_state=SEED)
fold_train_test = {}
for i, (train_index, test_index) in enumerate(kf):
fold_train_test[i] = { 'train_index... | UTF-8 | Python | false | false | 1,280 | py | 307 | split.py | 16 | 0.684474 | 0.673623 | 0 | 35 | 33.2 | 109 |
eymenkurdoglu/ml_projects | 15,882,789,085,006 | f3e620a9e29086f57bc765a48ed5564769bf515d | 1c1d8f76da7fb157af608ece27d9759b0b6c8bbf | /time-ser-forecast/svr.py | 9df9f4792ee82d1b15e818763f01bc5158dd512a | [] | no_license | https://github.com/eymenkurdoglu/ml_projects | f3a4c7b160621e4d603bd2b5e2c000897e6da0a0 | 1756d6a274952864ad23b835843734684a6ca17f | refs/heads/master | 2021-04-15T15:10:24.684323 | 2018-03-27T02:24:27 | 2018-03-27T02:24:27 | 126,917,214 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import csv
import numpy as np
from sklearn.svm import SVR
import matplotlib.pyplot as plt
dates = []
prices = []
def get_data(filename):
with open(filename, 'r') as csvfile:
csvFileReader = csv.reader(csvfile)
next(csvFileReader)
for row in csvFileReader:
dates.append(int(row[0].split('-')[0]))
prices.ap... | UTF-8 | Python | false | false | 1,254 | py | 3 | svr.py | 1 | 0.660287 | 0.645933 | 0 | 42 | 28.857143 | 89 |
Semenyshyn/CodeWars | 17,076,789,999,317 | 4735c2217f97658ae8046d13262f1bc4575dea45 | 72220530641dd387f5cf178a3ed53b4a6815a22f | /Sum consecutives.py | 73e43ffbb2590369dd4777cfa0c4333b20b05881 | [] | no_license | https://github.com/Semenyshyn/CodeWars | 7516d7ba27e46ab47364c5266ef578de95b4be7b | 131ac35c55402853ddbeda38a8e27210ac1a7c7c | refs/heads/master | 2020-06-23T13:41:04.134166 | 2016-08-20T11:56:11 | 2016-08-20T11:56:11 | 66,144,292 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | s = [1, 1, 1, 0, 1, 2, 2, -3, -3, -3]
def sum_consecutives(s):
prev = None
x = []
for i in s:
if i == prev:
x[-1] += i
else:
x.append(i)
prev = i
return x
print(sum_consecutives(s)) | UTF-8 | Python | false | false | 248 | py | 15 | Sum consecutives.py | 15 | 0.407258 | 0.362903 | 0 | 15 | 15.6 | 37 |
uit-no/python-open-mike | 14,499,809,609,993 | 31abe97f6eb43e59b864334d735deeb9ef29e6d2 | 21d7c98b8c7d62dd182f04d3a9ea092b8c330dea | /solutions/2/most-frequent/most_frequent.py | 59149faf9558d3034f132ce342cbdf43313baac3 | [] | no_license | https://github.com/uit-no/python-open-mike | 951678870b61d63203e0b8c248c9189687473d9a | 2a83b27ca31959f0c0de2ee6f72abca440d76ec8 | refs/heads/gh-pages | 2020-03-30T12:42:37.311093 | 2019-09-11T14:13:06 | 2019-09-11T14:13:06 | 151,236,182 | 2 | 4 | null | false | 2018-11-19T13:12:01 | 2018-10-02T10:16:25 | 2018-11-19T09:41:01 | 2018-11-19T13:12:00 | 363 | 0 | 2 | 0 | Python | false | null | #!/usr/bin/env python3
from collections import Counter
def strip_special_chars(string):
return "".join(char for char in string if char.isalpha())
def char_counter(string, number):
chars = filter(str.isalpha, string)
return Counter(chars).most_common(number)
def word_counter(string, number):
words ... | UTF-8 | Python | false | false | 655 | py | 45 | most_frequent.py | 31 | 0.668702 | 0.664122 | 0 | 24 | 26.291667 | 61 |
Jayashsatolia403/Projects | 13,889,924,259,540 | c3f9d3dc3dfdc3c8f7b66286d5c85f2a008a25ff | 6e083faecc108f78210c9b43f5e19f2e29be8b56 | /EcommerceFullStack/FullStack/EcommerceProject/order/migrations/0013_remove_order_users.py | 82051cd23177920bbada0bcf7f77dc24f244d320 | [] | no_license | https://github.com/Jayashsatolia403/Projects | d86240124ca189c00f706d5788b78c360b433cab | d98dc8600e29ae8e751da6c68d31902d3f5e9142 | refs/heads/master | 2023-06-26T01:01:49.983012 | 2021-07-20T11:28:01 | 2021-07-20T11:28:01 | 385,829,888 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.7 on 2021-04-13 20:28
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('order', '0012_auto_20210414_0150'),
]
operations = [
migrations.RemoveField(
model_name='order',
name='users',
),
... | UTF-8 | Python | false | false | 324 | py | 114 | 0013_remove_order_users.py | 97 | 0.574074 | 0.478395 | 0 | 17 | 18.058824 | 47 |
w-x-me/PyImageSearch | 1,486,058,703,088 | ce640a62583d401723fadc67b29991ba287401e4 | e1def0cb3ea2f1b9e7e8c9183ef3eae6eb4f2d97 | /Moudel1/Threshold3.py | a4fc0edef07bce52f351456350845733feb4a2e4 | [] | no_license | https://github.com/w-x-me/PyImageSearch | 58084fd4834457a10a75383702093f5d98a0e6e4 | fc6034ae43767f9ec5cc0d4e6bb771d70a866a56 | refs/heads/master | 2020-03-20T07:50:17.690517 | 2018-06-14T02:08:51 | 2018-06-14T02:08:51 | 134,201,710 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from skimage.filters import threshold_adaptive
import argparse
import cv2
ap = argparse.ArgumenParser()
ap.add_argument("-i", "--image", required = True, help = "Path to the image")
args = vars(ap.parse_args())
image = cv2.imread(args["image"])
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
blurred = cv2.GussianBlur... | UTF-8 | Python | false | false | 683 | py | 65 | Threshold3.py | 60 | 0.7306 | 0.683748 | 0 | 20 | 33.15 | 103 |
machukhinktato/test_tasks_python | 11,003,706,223,296 | 7e317a238433dece7c80b26c1d27912986d35974 | c4ad8eb9ad11e821806c01953e630617a2dc274a | /task2/SRC/task2.py | 1322ab674b152fa8add9dacb98f8056a10cdba7e | [] | no_license | https://github.com/machukhinktato/test_tasks_python | 09cac9d2d2fac651efbe4bff8cb8327e62aa3b54 | 7dcf494742dbd24e6a271db368be91e64eeed26f | refs/heads/master | 2023-02-17T00:21:15.459882 | 2021-01-20T15:48:50 | 2021-01-20T15:48:50 | 311,645,105 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
def file_loader(name):
"""Загружает json файл с данынми"""
with open(name) as f:
try:
file = json.load(f)
except:
file = f.readlines()
f.close()
return file
def main(filename):
"""
Основная функция, принимает исходные значения, сортирует... | UTF-8 | Python | false | false | 3,345 | py | 6 | task2.py | 4 | 0.521113 | 0.508347 | 0 | 97 | 30.505155 | 83 |
Alicia1529/ComputerScience | 14,267,881,406,749 | 45a2b31320d52a14c4382ce3c0753920e5f9fa04 | 77106803619fd019cca5ec2b7744bfd1a70e0fc9 | /CodeJam/2019-pre/test3.py | 09dcb33583f132eb0ee90396d2039e3e5d92d812 | [] | no_license | https://github.com/Alicia1529/ComputerScience | dc18960eeb4f7a4deb2a6b99d33bcf08c1afe583 | 4529f4cb2797d59684fa68c615c8a0b6525f7004 | refs/heads/master | 2020-06-28T17:01:05.363189 | 2019-08-02T20:59:53 | 2019-08-02T20:59:53 | 200,290,236 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
def foundInit(n,N):
for i in range(1,N):
if is_prime(i) and is_prime(n//i) and (n//i)*i==n:
return i,n//i
def is_prime(n):
if n == 2 or n == 3: return True
if n < 2 or n%2 == 0: return False
if n < 9: return True
if n%3 == 0: return False
r = int(n**0.5)
f = 5
while... | UTF-8 | Python | false | false | 1,498 | py | 52 | test3.py | 46 | 0.493324 | 0.477971 | 0 | 56 | 25.732143 | 103 |
Donnadonnam/SOEN487-ResoluteLeopards | 5,823,975,674,440 | c79e22863ade7eef8a81289ba398b028fd7e5658 | 86eae54c21c850a3c00c7dffa22f2b76c35cc857 | /user_api/config.py | 22faf3814a7c33eb41c95eeb53a87fe193e55190 | [] | no_license | https://github.com/Donnadonnam/SOEN487-ResoluteLeopards | 916675735645db319c20e1017871354844abd493 | 48de7ba82ddcbe3627920e9e435bb05b49845186 | refs/heads/master | 2023-03-18T15:49:20.944037 | 2020-03-04T12:38:00 | 2020-03-04T12:38:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
class Config(object):
SQLALCHEMY_DATABASE_URI = r"sqlite:///userdb.sqlite"
SQLALCHEMY_TRACK_MODIFICATIONS = False
class ProdConfig(Config):
pass
class DevConfig(Config):
KEY_LIST_PATH = os.path.join(os.path.dirname(__file__), "keys/keylist.json")
DEBUG = True
class TestConfig(Confi... | UTF-8 | Python | false | false | 497 | py | 76 | config.py | 45 | 0.692153 | 0.692153 | 0 | 21 | 22.714286 | 86 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.