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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RL89pl/usb_test | 19,602,230,750,324 | 6780dcd89b277a5ed726eb63bfd22bfd522022e4 | d11c147586c218079940afea337fe267c7f68d5b | /usb_test.py | 67f047e37a5ae7f618cc7d5370cb7770fc0ed620 | [] | no_license | https://github.com/RL89pl/usb_test | 0e263532ecd4683647c8e3fda5e10bbed62625d0 | 094ff03a768ef6cc2d86af6140af46948b62658b | refs/heads/master | 2020-06-13T03:09:18.448770 | 2019-06-30T12:30:18 | 2019-06-30T12:30:18 | 194,513,577 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env/python3
import time, os, sys
import usb.core
import pyudev
def writetofile(filename,mysizeMB):
# writes string to specified file repeatdely, until mysizeMB is reached. Then deletes fle
mystring = "The quick brown fox jumps over the lazy dog"
writeloops = int(1000000*mysizeMB/len(mystring))
try:
... | UTF-8 | Python | false | false | 2,651 | py | 2 | usb_test.py | 1 | 0.516786 | 0.50811 | 0 | 91 | 28.131868 | 101 |
rrana/django-simple_blog | 18,811,956,770,367 | 83df158a0525fda5335b74ac6c7fae31c3e85e50 | a0453439f0a94e0baa8a25477af0e6c8605b1c69 | /project/context_processors/vars.py | 7caca2d39debd22e5ea368981a1744181de3f424 | [] | no_license | https://github.com/rrana/django-simple_blog | 82656f880f0e7f46eee04a9c90f1cf166a96331e | 1a6cd48a352db2ea5444f803af592a19e7e9e7a5 | refs/heads/master | 2021-01-09T06:00:47.158432 | 2011-10-02T20:45:03 | 2011-10-02T20:45:03 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import project.settings
from project.apps.blog.models import Group, Entry
def setting_vars(request):
return {
'PROJECT_NAME' : project.settings.PROJECT_NAME,
'TITLE': project.settings.TITLE,
}
def menu_vars(request):
groups = Group.objects.all().order_by('n... | UTF-8 | Python | false | false | 536 | py | 30 | vars.py | 17 | 0.619403 | 0.617537 | 0 | 23 | 22.347826 | 114 |
nicktang1983/python | 6,768,868,498,427 | c08c02c3b9665ba5a317e215f6800b745810bf43 | 0098258043540a0e9e00137d7ef14a02c1c5026e | /py_module/src/importBackend.py | 30f121ac8e80760397cb0b316d2db70860c72424 | [] | no_license | https://github.com/nicktang1983/python | 60c3a9031eb795fe71fd6c97fbe806f7cda948ed | aa6ba97e7f5756dc21cf058330b091538d2adc73 | refs/heads/master | 2018-02-22T09:44:57.318786 | 2017-05-13T05:08:27 | 2017-05-13T05:08:27 | 50,985,832 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# @Author: nick_tang
# @Date: 2016-10-12 11:36:27
# @Last Modified by: nick_tang
# @Last Modified time: 2017-02-04 21:15:31
import sys
from pprint import pprint
import fibo
import moduleA
from moduleB import *
# You can find sys, fibo, module_a and module_b_func
print('-'*30)
print('Curre... | UTF-8 | Python | false | false | 565 | py | 332 | importBackend.py | 208 | 0.699115 | 0.640708 | 0 | 24 | 22.5 | 52 |
pmdproject2020/UploadFile_FlaskApp | 9,887,014,718,691 | d7be8918d0c7a559e8a009127568e9ead46030d8 | 4d087c23662299e42d15afd2535b2f3781f2fa54 | /img_upload_working.py | 1f3c0070df7f9fef902c3286c806e1f3bfdccdd1 | [] | no_license | https://github.com/pmdproject2020/UploadFile_FlaskApp | 8e0810fe0f6a46f959eab2af7e386c44cb0be91c | 2848b0d4ee53a0350c4b842ee01483e6a0255eaf | refs/heads/master | 2020-12-21T07:48:40.244062 | 2020-01-26T19:26:14 | 2020-01-26T19:26:14 | 236,363,800 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""img_upload_working.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1WY-HtFC_SjCjFKoTRafXSqjzwApFJvRU
"""
!pip install flask-ngrok
from flask import Flask , render_template, request
from flask_ngrok import run_with_ngro... | UTF-8 | Python | false | false | 1,709 | py | 1 | img_upload_working.py | 1 | 0.691047 | 0.684026 | 0 | 54 | 30.62963 | 150 |
yijxiang/flack | 15,109,694,965,152 | 233f729fbb1da3ef861f85248ca216e63f8529a3 | 0383eec4050f449903ac572384fb80b7c1f33c67 | /flack.py | 412f31ac05f2610ab482aaa0a552b4f62634e6de | [
"MIT"
] | permissive | https://github.com/yijxiang/flack | d7777415d3c71530c6c605953efcd32c6ace07cc | d14e5328a96abd735f73d7eaf0ce256e8c5a5c51 | refs/heads/master | 2021-05-31T11:45:46.889053 | 2016-04-13T04:26:53 | 2016-05-11T19:21:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import binascii
import os
import threading
import time
from flask import Flask, render_template, url_for as _url_for, request, \
abort, jsonify, g
from flask_sqlalchemy import SQLAlchemy
from flask_httpauth import HTTPBasicAuth, HTTPTokenAuth
from flask_bootstrap import Bootstrap
from werkzeug.security import gene... | UTF-8 | Python | false | false | 14,442 | py | 5 | flack.py | 3 | 0.614389 | 0.60601 | 0 | 448 | 31.236607 | 78 |
Aliersh/thinkcspy | 19,404,662,249,375 | 744d461ddde210814a7cbc1ef03e575eb916f068 | c5fe05b1295c5425e1640c2b581767f6864714c9 | /Chapter_8/ex_8_11.py | 86b01f85020142e80774a6039a825254f659896e | [] | no_license | https://github.com/Aliersh/thinkcspy | 52be2508db5cc824d5c87b491f4ecbf5783084bb | 3f8bdd8978d0e902c255e3bf04090c54fcd33956 | refs/heads/master | 2022-11-12T03:00:17.469349 | 2020-07-01T01:27:04 | 2020-07-01T01:27:04 | 271,703,063 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''Write a function to uniformly enlarge an image by a factor of 2 (double the size).'''
# I couldn't do this exercise. Below the answer
import image
def double(oldimage):
oldw = oldimage.getWidth()
oldh = oldimage.getHeight()
newim = image.EmptyImage(oldw * 2, oldh * 2)
for row in range(oldh):
... | UTF-8 | Python | false | false | 778 | py | 66 | ex_8_11.py | 66 | 0.641388 | 0.619537 | 0 | 29 | 25.862069 | 88 |
restato/Algorithms | 12,850,542,177,601 | 5dad4c44686873e788db766a7c079261a6aad32d | c1049c60bd1dc8d68d14c32a0ba766f10ca7e42c | /Tree/populating_next_right_pointers_in_each_node(level).py | d8b5fd2a769215bea5304bc886a87ef2e067a09d | [] | no_license | https://github.com/restato/Algorithms | 0bb109943e41e1549b52a0cabe07446c06ebad90 | 2536cf3d7cd248088d37e5ddcd4470a6333305ab | refs/heads/master | 2022-04-28T15:25:39.315352 | 2022-03-22T15:35:01 | 2022-03-22T15:35:01 | 168,792,210 | 5 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # https://leetcode.com/problems/populating-next-right-pointers-in-each-node
"""
# Definition for a Node.
class Node:
def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None):
self.val = val
self.left = left
self.right = right
self.next = next
"... | UTF-8 | Python | false | false | 1,536 | py | 27 | populating_next_right_pointers_in_each_node(level).py | 26 | 0.50651 | 0.5 | 0 | 49 | 30.346939 | 101 |
isaintnik/ml-rank | 16,269,336,130,522 | dfda8b6f3d96724888588654fb17de2e4cd58bab | 137df3d0c74ba6d8a0cde625b3ab5310497d2775 | /ffs_service.py | a1a3061f4bdbcf2e09f87666c9b078202bed1322 | [] | no_license | https://github.com/isaintnik/ml-rank | d79311ab74854e366cc65884e8de218e4e0f2069 | e97121db61d5b29d94c7383b60d113233d739a21 | refs/heads/master | 2020-04-01T09:43:20.710492 | 2020-02-06T12:02:35 | 2020-02-06T12:02:35 | 153,087,186 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import sys
import warnings
import time
from functools import partial
from mlrank.preprocessing.dichotomizer import DichotomizationImpossible
from mlrank.submodular.metrics import log_likelihood_regularized_score_multiplicative_balanced
from mlrank.submodular.optimization.ffs_parallel import ForwardFeatureSel... | UTF-8 | Python | false | false | 5,054 | py | 41 | ffs_service.py | 39 | 0.601702 | 0.594183 | 0 | 163 | 30.006135 | 109 |
beccae1225/Python_Challenge | 790,274,019,278 | e016ded78469c911d0de4de0aae7420a5420996f | 80168b068e4802328b808a98aab2826b20fa7299 | /PyPoll/main_redo.py | af9bcb916192db1bba3f56a8d56e21c2309be369 | [] | no_license | https://github.com/beccae1225/Python_Challenge | 5a58e0879e380b4e54d758fd04e601badeede157 | f2e0a94da88e863a550df2696500f2acb20f68a0 | refs/heads/master | 2022-11-13T07:13:51.690982 | 2020-07-11T19:54:37 | 2020-07-11T19:54:37 | 273,612,173 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import csv
election_data_csv = os.path.join("Resources", "election_data.csv")
total_votes = 0
votes_per_person = 0
candidate_list = []
vote_counts = []
unique_list = []
vote_percents = []
max_vote_count = 0
with open(election_data_csv) as csvfile:
csvreader=csv.reader(csvfile, delimiter=",")
csv_... | UTF-8 | Python | false | false | 1,778 | py | 4 | main_redo.py | 3 | 0.559618 | 0.552306 | 0 | 65 | 26.369231 | 79 |
minimav/project-euler | 7,284,264,564,987 | 4b083d48291dc029cbb760c4d37307f67b0e11fa | 90e44c7afbf262e4baf9f4e8fd6c40c16008b12b | /old_solutions/projecteuler20.py | 781922008e9548ac8ab98c39a90a9d9d574d1378 | [] | no_license | https://github.com/minimav/project-euler | 980474227a4534a45cbc10b54ebb064e4ea6df48 | ddcbd7d874466e61d33913826ebd2ccbf9f1520d | refs/heads/master | 2015-08-11T13:48:38.811962 | 2015-06-24T21:18:02 | 2015-06-24T21:18:02 | 19,576,426 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from math import *
import time
s = time.time()
def fac(n):
if n == 1:
return 1
else:
return n*fac(n-1)
f = [1]
i = 1
while i < 100:
if len(f) < i:
f.append(i*fac(i-1))
i*fac(i-1)
i += 1
sum = 0
m = str(f[-1])
j = 0
while j < len(m):
sum += i... | UTF-8 | Python | false | false | 379 | py | 132 | projecteuler20.py | 125 | 0.427441 | 0.387863 | 0 | 26 | 12.5 | 28 |
eminamitani/HDNNP-tools | 9,311,489,118,665 | 749c0b1b662d60f2c63f316c15317b1e178f1628 | 4b026650a63ffde8093641384d6cc06317843f44 | /BulkSi/checkRMSE-TC/plotRMSETCdata-T5L7-3.py | 84c5e02696593f3793a05670282c2c1a5360847c | [] | no_license | https://github.com/eminamitani/HDNNP-tools | 3426ec92e7071d0c0a50ed36c12481003b472c03 | 27d4d8a598cc3aa5b5450a76404a1df97c027818 | refs/heads/master | 2023-03-14T23:21:19.843507 | 2021-03-28T02:08:25 | 2021-03-28T02:08:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import csv,sys
import re
import matplotlib.pyplot as plt
"""
This script is for plotting scatter of force/RMSE & TC err from
2100 samples in /Si-200917/T5L7/result/RMSETCdata.csv
"""
if __name__ == '__main__':
T5L7folder="/home/okugawa/HDNNP/Si-200917/T5L7/"
T5L7data= T5L7folder+"resu... | UTF-8 | Python | false | false | 3,137 | py | 132 | plotRMSETCdata-T5L7-3.py | 128 | 0.564233 | 0.510041 | 0 | 79 | 38.721519 | 82 |
kshitij1235/Windows10Activation | 3,599,182,618,574 | ca34e83668a6a0dfb93d2716cc1362098d4550aa | 7228e82648ebd6d486e5c85b0f96e3a5fe458543 | /windows10 activation/windows_activation_source_code.py | b933df628fdfa635bd952c54ed8a6b8b5094e9ec | [] | no_license | https://github.com/kshitij1235/Windows10Activation | 379d600f33f0ee48f8a6a91b6dea11bdb5fcf034 | 06aa974da7d797d6408cd184645a700265f294f0 | refs/heads/main | 2023-08-20T21:29:53.701119 | 2021-10-24T17:31:29 | 2021-10-24T17:31:29 | 420,074,658 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """windows actvation pakages"""
import threading
from tkinter import ttk
import os
import tkinter
from PIL import ImageTk, Image
def unlock():
"""allows threading that helps with perforamnce"""
pb.place(x=10, y=170)
threading.Thread(target=commands).start()
def commands():
"""commands... | UTF-8 | Python | false | false | 1,516 | py | 2 | windows_activation_source_code.py | 1 | 0.600923 | 0.55343 | 0 | 60 | 23.266667 | 97 |
ajiexw/old-zarkpy | 4,861,903,003,602 | b0ea0b136073cf519dcdce3c3b836e0fbf6b5fee | 5e8404b864402563e17d7d02c130c81b56e94323 | /web/cgi/testing/__init__.py | b87e9ea9c1e80d3aa6f357ba21e8e1c62838edf5 | [] | no_license | https://github.com/ajiexw/old-zarkpy | ea1b82f96d6066c88f2dabb3f4f8ef6c61fbad96 | 718c4817fbad53daa221652e5b9d576867e92f99 | refs/heads/master | 2016-09-06T13:45:11.832938 | 2013-10-09T09:25:01 | 2013-10-09T09:25:01 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #coding=utf-8
'''注意:python自带一个库库叫做test,请勿重名!'''
| UTF-8 | Python | false | false | 78 | py | 195 | __init__.py | 144 | 0.708333 | 0.6875 | 0 | 2 | 23 | 33 |
samarth-kashyap/dopplervel | 10,703,058,518,130 | 8dc2a2c2b927e9209cca24126c88c4461e19dc0c | 6b3e1de2a7695e0b31f11b38a0c411b3eea9ae3c | /magnetogram/vecmagneto_ts.py | b61b9b5ff8c7c458a6956766907a1b44f5dff088 | [] | no_license | https://github.com/samarth-kashyap/dopplervel | efb29320d665cf75cbbab05c813317b6b793f7c3 | a3d8bff33b521b8391f23142fcd2411d5d030b71 | refs/heads/master | 2023-05-06T23:58:47.376040 | 2021-05-24T20:20:27 | 2021-05-24T20:20:27 | 265,152,313 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
# {{{ analyze_blocks_plot(u, comp, freqarr, num_blocks, lmax):
def analyze_blocks_plot(u, comp, freqarr, num_blocks, lmax):
if comp==0:
title_str = " $\\sqrt{\sum_{s, t} |B^r_{st}(\sigma)|^2}$ s $\in$ "
elif comp==1:
title_str = " $\sqrt{\sum_... | UTF-8 | Python | false | false | 4,113 | py | 66 | vecmagneto_ts.py | 52 | 0.546317 | 0.522733 | 0 | 117 | 34.153846 | 85 |
superspma/Word-Query-Server-and-Client | 652,835,036,878 | 282c3bb435324f65e12d0cbcc36337bcee863539 | e28d1a8f8e50e7cc0a1374677f943a15942d0e3b | /dict/demo.py | 68f9001329d408bb403b1a001c692bb4a4b7ec36 | [] | no_license | https://github.com/superspma/Word-Query-Server-and-Client | 11e3aad2cdefcf3be16d0ab6546269768323b391 | ef9651c399d9ddad594a01d8ca61179ac52e2fdb | refs/heads/master | 2020-06-06T10:38:10.735707 | 2019-06-20T01:37:32 | 2019-06-20T01:37:32 | 192,717,245 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
客户端界面简述
"""
while True:
print("第一界面")
cmd = input(">>>:")
if cmd == "go":
while True:
print("第二界面")
cmd = input(">>>:")
if cmd == "out":
break
| UTF-8 | Python | false | false | 250 | py | 4 | demo.py | 2 | 0.359091 | 0.359091 | 0 | 13 | 15.923077 | 31 |
sharathgowda815/py8 | 17,428,977,324,062 | c2b5f72b6b6c61b263110b10cb40f9d4b6b1499c | 486732078c0d767bf34d828395841b7d9c00cecd | /assignment_2/task_1/3/3.py | e675053b36b6b92b87584e7a1e00d03f8d75e380 | [] | no_license | https://github.com/sharathgowda815/py8 | 94dc1e80000a16f6bda06fa7e0b978d25440b7cc | 93e79dc13caf5f08c6a53c5c5aefcf8f3a1b3fb2 | refs/heads/master | 2022-08-02T15:08:49.599213 | 2020-05-25T14:04:04 | 2020-05-25T14:04:04 | 262,832,958 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def longestWord(words):
length_of_word = len(words[0])
longest_Word = words[0]
for word in words:
if(len(word) > length_of_word):
length_of_word = len(word)
longest_Word = word
return longest_Word
print('Longest Word is ' + str(longestWord(words = ['PHP', ... | UTF-8 | Python | false | false | 346 | py | 15 | 3.py | 15 | 0.575145 | 0.569364 | 0 | 13 | 24.769231 | 85 |
asmaur/azo-projeto | 10,642,928,967,480 | b5657206819d29cc893b2fbad324cb9beff3e3d6 | a648fd77abe6bf808c2d55b0b1f7426f0043e759 | /apps/azo/cms_app.py | 3e7d8aa324b18de9055e3a18490bbdecf7e15dd3 | [] | no_license | https://github.com/asmaur/azo-projeto | d4a4b6ed3dcabb0da61d36498a818c675ee61b07 | 9f44572b7225f6c3631bac5458ddc66ac95b725c | refs/heads/master | 2018-09-12T20:43:08.466842 | 2016-07-25T20:51:20 | 2016-07-25T20:51:20 | 63,534,526 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool
from django.utils.translation import ugettext_lazy as _
#from .menu import StaffSubMenu
class AzoApp(CMSApp):
name = _('Azo')
urls = ['apps.azo.urls', ]
app_name = 'azo'
#menus = [StaffSubMenu, ]
appho... | UTF-8 | Python | false | false | 344 | py | 62 | cms_app.py | 36 | 0.680233 | 0.677326 | 0 | 16 | 20.5625 | 55 |
mboylevt/cred | 14,302,241,120,366 | 8e4c5af2a90d8fbee3ddb437ea0f31ab8f6d2c46 | a7533d98b56f8956f3e5155c3360106b512a51af | /lib/RecordLib.py | 366fc3d57116496ec69f59b66de37c76469b722b | [] | no_license | https://github.com/mboylevt/cred | a77413c1cdd5b159bb8c00e168308994a390c1c6 | 818719ce30d6dfd1ba53d3bae3dbe644ab5e359a | refs/heads/master | 2021-01-25T05:15:50.347044 | 2014-05-11T15:29:19 | 2014-05-11T15:29:19 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'matt'
from models.Models import Record
def add_record(session, student_id, record_type_id, class_id, date, dow, score):
"""
Function to add a record to the models
"""
session.add(Record(student_id=student_id, record_type_id=record_type_id,
class_id=class_id, date_of_record=date,... | UTF-8 | Python | false | false | 1,588 | py | 17 | RecordLib.py | 13 | 0.688917 | 0.685768 | 0 | 42 | 36.833333 | 157 |
maxs-im/Tasks | 16,810,502,032,431 | 87434e7f9b3339b6d6e3dfdc923e6ace5584f9ee | 7c24ab6786e9d65fd3baf4f3122c088de6a33844 | /Catch/scripts/catch_test_run.py | 833d68a053c4bbb9cceab369c390669122dd0973 | [
"BSL-1.0"
] | permissive | https://github.com/maxs-im/Tasks | deb8451cd79ae24ca898eaf5995b90f8b5df8836 | bf26ce060aeee75130dca33ac7a13cecdf5bd87a | refs/heads/master | 2017-10-06T07:40:32.568753 | 2017-06-24T01:26:50 | 2017-06-24T01:26:50 | 94,937,511 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import re
import os
from catch_test_case import TestCaseApprovedParser
from catch_test_case import TestCaseResultParser
from catch_test_case import TestCaseData
from catch_conditions import RandomOutput
class TestRunData:
def __init__(self):
self.appname = ""
self.version = ""
self.testcases = []
self.re... | UTF-8 | Python | false | false | 14,108 | py | 68 | catch_test_run.py | 49 | 0.615466 | 0.610717 | 0 | 430 | 31.809302 | 122 |
zakir360hossain/MyProgramming | 17,291,538,346,377 | 7a1150d3d771befcadabc9cce273b3414832f8a7 | 9881f114b357d334b5010b74f9d8ee4d9f124d87 | /Languages/Python/Learning/topic2/duck_typing/ex1.py | e3a1ad301499e9a2fa55e9da15dc3a7fdfcafa51 | [] | no_license | https://github.com/zakir360hossain/MyProgramming | 55dc6b796805a8497d62c245188c9de326fb8426 | 4b810b08a8bef0adc9a76e9c3082dada06516e53 | refs/heads/master | 2023-06-11T00:35:54.681794 | 2021-04-19T03:56:21 | 2021-04-19T03:56:21 | 219,240,979 | 1 | 0 | null | false | 2021-01-06T01:58:04 | 2019-11-03T02:27:16 | 2020-12-30T05:42:23 | 2021-01-06T01:58:03 | 43,256 | 0 | 0 | 2 | Jupyter Notebook | false | false |
class Laptop:
def code(self, ide):
ide.execute()
class PyCharm:
def execute(self):
print("Compiling")
print("Running")
class myEditor:
def execute(self):
print("Convention Checking")
print("Compiling")
print("Debugging")
print("Running")
ide = PyCharm()
mac = Laptop()
mac.code(ide)
# let say ... | UTF-8 | Python | false | false | 545 | py | 588 | ex1.py | 428 | 0.686239 | 0.682569 | 0 | 29 | 17.62069 | 102 |
student513/qrating | 12,017,318,526,544 | 186dd51a0dadcdab2d6a2784966a97d5b61e3261 | ef9978aed4eadad7043a2d1ec5dfd17a43b0f241 | /blog/migrations/0002_question_category.py | 5622f841d3745151637ea0a8cc6beb7af695d475 | [] | no_license | https://github.com/student513/qrating | c15581fff0d87ab6c09fe2295cc2185121cc3a16 | 664a43418dfeb16d2b22f0abdff145d34c03ada2 | refs/heads/master | 2021-02-28T05:50:04.851723 | 2019-09-02T08:56:43 | 2019-09-02T08:56:43 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.2.3 on 2019-08-29 13:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='question',
name='category',
fi... | UTF-8 | Python | false | false | 556 | py | 24 | 0002_question_category.py | 10 | 0.565134 | 0.524904 | 0 | 18 | 28 | 198 |
oddlama/forge | 12,086,037,991,254 | f81c2d13e5c89a2db17f4a0a6ce3bff4b41cdb70 | e81d97e0151f37dab9980f602d615e907582127f | /test/inventory/mock_inventories/missing_definition.py | 8bb1603ba5780149fb7e00755af9653234141717 | [
"MIT"
] | permissive | https://github.com/oddlama/forge | 08fe8b2d792b6a59428e27361c199e063dbe4d9f | e270a021c45666c8b22250f1ae7a1534fe6040d3 | refs/heads/main | 2023-09-02T13:28:53.206632 | 2022-06-04T12:38:58 | 2022-06-04T12:38:58 | 329,370,687 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # No hosts= definition
| UTF-8 | Python | false | false | 23 | py | 75 | missing_definition.py | 71 | 0.73913 | 0.73913 | 0 | 1 | 22 | 22 |
3098701248/python | 7,971,459,306,066 | cc8ab78c443173a89c7da60678e21ca620d6bfaf | e5151fd95c3f4b53eeb91116e2ae93a8b318041e | /_function.py | c273c745f4619f968581a5b013ff996e93e498e1 | [] | no_license | https://github.com/3098701248/python | efbb924b65833adffa919947f64831154477d938 | 9913e3011625931e4f71c3ca22b92f99d3ebba8f | refs/heads/master | 2018-10-10T11:23:52.677604 | 2018-09-28T09:14:37 | 2018-09-28T09:14:37 | 105,228,116 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
def say(name, *, major='CS'):
print('{} majored in {}.'.format(name, major))
say('I', major='AI')
| UTF-8 | Python | false | false | 128 | py | 43 | _function.py | 43 | 0.5625 | 0.5625 | 0 | 8 | 15 | 50 |
HaroldXu97/Exercise | 5,609,227,324,194 | d91568a480361b360b3d379a3afc971d2b0b8ec2 | 8b94dda5e951ca1d421b4df2986b1ac1f22941e2 | /PartitionArrayIntoThreePartsWithEqualSum/PartitionArrayIntoThreePartsWithEqualSum_2.py | ba43fc50f15f04ddee2d430c2b63456bc203aa0d | [] | no_license | https://github.com/HaroldXu97/Exercise | aa8cb708e0036871f3271ef45f1cbf8bd0f6030b | 90079d92278d5f06a7893ec91be4d92a3fb41d13 | refs/heads/master | 2020-08-04T16:45:52.229155 | 2019-11-14T22:17:41 | 2019-11-14T22:17:41 | 212,207,834 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Question: how to check whether x is before 2x?
class Solution:
def canThreePartsEqualSum(self, A: List[int]) -> bool:
return (lambda x,y: x in y and 2*x in y)(sum(A)//3,itertools.accumulate(A)) | UTF-8 | Python | false | false | 207 | py | 82 | PartitionArrayIntoThreePartsWithEqualSum_2.py | 82 | 0.676329 | 0.661836 | 0 | 4 | 51 | 83 |
KataOcean/openhub-scraping | 11,278,584,158,479 | e3cf2ac41697ce77c9fd27a2d6f8e366b1de7dfe | 6c48adcc295c2e64daca18259172247db3e6dba9 | /src/main.py | fc3fdca9abd8f1fdc654be61a52a0417a7745b36 | [
"MIT"
] | permissive | https://github.com/KataOcean/openhub-scraping | 4c66ffe6f08a18ff26f33eea3a26884c4d237833 | 1708891172f93947a533231f42beb85cf8259579 | refs/heads/master | 2022-12-12T01:05:06.345399 | 2019-12-20T15:30:19 | 2019-12-20T15:30:19 | 227,323,729 | 0 | 0 | MIT | false | 2022-12-08T03:19:20 | 2019-12-11T09:16:07 | 2019-12-20T15:30:31 | 2022-12-08T03:19:18 | 20 | 0 | 0 | 2 | Python | false | false | import requests
import time
import argparse
import urllib.parse
import re
import os
import sys
from bs4 import BeautifulSoup
from tqdm import tqdm
parser = argparse.ArgumentParser()
parser.add_argument('-t', '--tag', default='gui')
parser.add_argument('-e', '--explicit_tags', nargs='*')
parser.add_argument('-i', '--i... | UTF-8 | Python | false | false | 3,103 | py | 6 | main.py | 4 | 0.555914 | 0.553335 | 0 | 114 | 26.219298 | 69 |
BerilBBJ/scraperwiki-scraper-vault | 2,774,548,875,428 | 5056072282c37fe80bb0ecd29cb3debd869619a0 | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/S/san/kw_realty.py | 6a9156224b73e3c0931563b4fdc4ca78ce417eb8 | [] | no_license | https://github.com/BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Scrapes KW Realty associates' details
import scraperwiki
import lxml.html
# Records counter, used as ID in records
counter = 1
# Get root element
def scrape_content(url):
html = scraperwiki.scrape(url)
root = lxml.html.fromstring(html)
return root
# Scrape cities
def parse_cities(root):
div = root... | UTF-8 | Python | false | false | 5,212 | py | 9,616 | kw_realty.py | 7,963 | 0.595165 | 0.579048 | 0 | 179 | 28.111732 | 99 |
mikpim01/ReflexGame | 10,737,418,271,469 | 8d803c17f826eeac7b49ed484fd734df8bd57de6 | 101da39fc18efd02f72d43140348138517b506bb | /ReflexGame.py | 8f25d6f1cc3487edfc2ccfc882d3b9eb3012e60d | [] | no_license | https://github.com/mikpim01/ReflexGame | e319b44e9b32f5277a18bd9714ecc82a2701b1c2 | bb6625203cf13092a5dc2e4110372d8f6c43ac32 | refs/heads/main | 2023-01-05T04:22:18.324210 | 2020-10-18T10:19:46 | 2020-10-18T10:19:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #initialising pygame
import pygame
import sys
import time
from utils import *
pygame.init()
screen = pygame.display.set_mode((width,height))
def drawGrid():
blockSize = 20 #Set the size of the grid block
grid_width = pow(blockSize,2)
centering = (width - grid_width)//2
for x in range(20):
for... | UTF-8 | Python | false | false | 1,032 | py | 2 | ReflexGame.py | 1 | 0.585271 | 0.573643 | 0 | 42 | 23.571429 | 106 |
ONSdigital/eq-questionnaire-runner | 4,922,032,539,962 | 219c0af0400cac281a8804a9f660b96be5eace3e | 6f866eb49d0b67f0bbbf35c34cebe2babe2f8719 | /tests/integration/questionnaire/test_questionnaire_page_titles.py | afa5d2f976714d04b196cfeaf093e8282c5496db | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | https://github.com/ONSdigital/eq-questionnaire-runner | 681b0d081f9cff0ee4ae3017ecc61f7390d553bf | 87e7364c4d54fee99e6a5e96649123f11c4b53f1 | refs/heads/main | 2023-09-01T21:59:56.733363 | 2023-08-31T15:07:55 | 2023-08-31T15:07:55 | 219,752,509 | 12 | 18 | MIT | false | 2023-09-14T11:37:31 | 2019-11-05T13:32:18 | 2023-06-13T14:56:23 | 2023-09-14T11:37:30 | 26,445 | 7 | 11 | 8 | Python | false | false | from tests.integration.integration_test_case import IntegrationTestCase
class TestQuestionnairePageTitles(IntegrationTestCase):
def test_introduction_has_introduction_in_page_title(self):
# Given, When
self.launchSurvey("test_submit_with_custom_submission_text")
# Then
self.assertE... | UTF-8 | Python | false | false | 4,004 | py | 772 | test_questionnaire_page_titles.py | 599 | 0.625313 | 0.624812 | 0 | 113 | 34.380531 | 87 |
mover-io/raspee | 11,244,224,383,580 | 94c9c9248268383efcd78ccb81d3c70a7500df1d | 976ebbddb3010d3e3e2151b7a9192685fc076cd0 | /raw_switch_test.py | 9f1a588f68071a4cacc120d982c2cd3b440202d8 | [] | no_license | https://github.com/mover-io/raspee | 7dae17ca8dd4873ae38a90d4d4d1b04b706676b0 | a803a177fdb73d3089153d78e8e1d76c02c40798 | refs/heads/master | 2016-09-06T11:17:41.437405 | 2013-11-08T22:06:55 | 2013-11-08T22:06:55 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN)
# Loop and output the value of input pin 0
while True:
input = GPIO.input(18)
print state
time.sleep(1)
| UTF-8 | Python | false | false | 195 | py | 6 | raw_switch_test.py | 6 | 0.723077 | 0.692308 | 0 | 11 | 16.727273 | 42 |
Juan8bits/holbertonschool-higher_level_programming | 352,187,331,246 | c9fc35da121789c0058bc87472ac1b8d8c6a9972 | e2b168b9a229592fa7ead4a4d1c32c8653a86aca | /0x0B-python-input_output/8-class_to_json.py | c2f21957303f2b59a63c5df9e457b9f740575c0f | [] | no_license | https://github.com/Juan8bits/holbertonschool-higher_level_programming | ce7aea7ccdee448b666bd2080485f6ec3850febd | 289470b9193a5eecc1cad2fa464172dc93ec66f8 | refs/heads/main | 2023-04-22T02:44:34.271963 | 2021-05-12T23:54:41 | 2021-05-12T23:54:41 | 319,356,637 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
"""Function that returns the dictionary description
with simple data structure (list, dictionary,
string, integer and boolean) for JSON serialization
of an object.
"""
def class_to_json(obj):
"""class_to_json function"""
return obj.__dict__
| UTF-8 | Python | false | false | 279 | py | 104 | 8-class_to_json.py | 89 | 0.698925 | 0.695341 | 0 | 11 | 24.363636 | 54 |
PatrykDagiel/Python_Dawson | 11,441,792,889,167 | 9e18ca0c910a39afcedd81193e4b16ecdffb726e | 01494c3ac2e3281d71066ee220628afc452beb70 | /Chapter IV/dostep_swobodny.py | 24b2e875deb371d3f45b0076b3882a8bab9ddd20 | [] | no_license | https://github.com/PatrykDagiel/Python_Dawson | b3a4aab8dbb875eda54c0cd46ceed3650edc3dc7 | d3a04a5041df5ac728e2596331521191f941f536 | refs/heads/master | 2020-07-17T12:58:47.390099 | 2017-10-11T21:11:37 | 2017-10-11T21:11:37 | 94,321,332 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
word = "indeks"
high=len(word)
low=-len(word)
for i in range(10):
position = random.randrange(low, high)
print("word[", position, "]\t", word[position])
input("\nAby zakonczyc program nacisnij enter") | UTF-8 | Python | false | false | 225 | py | 32 | dostep_swobodny.py | 30 | 0.684444 | 0.675556 | 0 | 11 | 19.545455 | 51 |
edwardmpgh/event_portal | 17,583,596,112,172 | 44771e6f9893e56b0e0f0c0f54fc178227213b89 | a2ce1913d68f82acb8c5ad3a3019d3f00ee4b95e | /events/migrations/0042_attendee_comment.py | 3ea8fc507fae95d78074bc4e6ff8bebbf39af766 | [] | no_license | https://github.com/edwardmpgh/event_portal | b0cc1376ffe7549c17c4d7e164f860c22cb19a53 | 244a116ee3b9aff913aaf06413acb82c8eed2348 | refs/heads/main | 2023-05-27T17:49:42.352668 | 2021-06-16T15:31:36 | 2021-06-16T15:31:36 | 377,543,366 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.2 on 2019-04-16 16:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0041_attendee_title'),
]
operations = [
migrations.AddField(
model_name='attendee',
name='comment',
... | UTF-8 | Python | false | false | 388 | py | 79 | 0042_attendee_comment.py | 49 | 0.587629 | 0.541237 | 0 | 18 | 20.555556 | 58 |
tyj144/noisystudent-lite | 15,530,601,751,449 | 356ade281c19e185fe9381c4204fe6dc769e03c4 | 3a6b2532f9cfc2842b040045c5cfc6c79da4c8fb | /experiments/data_experiments/compare_sets.py | 527c3334b7d21e7e7cc3ec69755e5ed43869c045 | [] | no_license | https://github.com/tyj144/noisystudent-lite | 6102939d290be74356b20be21aaf8f4de67fed28 | 95bc74b74e09d8211d8121e17264086b9525d52f | refs/heads/main | 2023-02-10T19:29:42.453898 | 2020-12-30T22:05:38 | 2020-12-30T22:05:38 | 308,987,774 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Find percentage of overlap between Tiny ImageNet and ImageNet-A labels.
Results:
74 / 200 of Tiny ImageNet labels are in ImageNet-A, 0.37
Tiny ImageNet # of labels: 200
ImageNet-A # of labels: 200
'''
with open("datasets/TinyImageNet_ids.txt", 'r') as file:
tiny_imgnet_ids = fi... | UTF-8 | Python | false | false | 2,478 | py | 23 | compare_sets.py | 12 | 0.75908 | 0.513317 | 0 | 107 | 22.158879 | 75 |
pokabu55/ImageViewer | 15,539,191,691,728 | 30ff0abef62761ac1a06b74b56147075fca11ee8 | 2fdd741dc9ca66b8c79c5890ea8ce99d2b9fbdb1 | /ImageViewer.py | 9cd152a2db7e2590cbd15f90683b56169d79714b | [] | no_license | https://github.com/pokabu55/ImageViewer | d69cc6e70f95aff2afee81dedf55e363fd9265ce | 74da14d9f1cfc5d2c45e9be8f5e71f2be16ff341 | refs/heads/master | 2022-07-11T23:24:48.318280 | 2022-07-06T11:34:14 | 2022-07-06T11:34:14 | 193,224,941 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import os
import numpy as np
import tkinter as tk
import tkinter.ttk as ttk
from PIL import Image, ImageTk
from tkinter import messagebox as tkMessageBox
from tkinter import filedialog as tkFileDialog
# アプリケーション(GUI)クラス
class Application(tk.Frame):
DEBUG_LOG = True
def __init__(self, master=None):... | UTF-8 | Python | false | false | 810 | py | 23 | ImageViewer.py | 13 | 0.689041 | 0.679452 | 0 | 30 | 23.366667 | 98 |
fbesserer/DataStructuresAndAlgorithms-Problemset2 | 798,863,936,779 | b4fb1bb95ed0d409fc4f993fd08f94d2b4cf7cb9 | d1239316b8e96ca44e8efc3f72d4a2d453d19513 | /problem_6_unsorted_int_arr.py | a9a957c0f9d4ab27c047b3091133042015ce5dd8 | [] | no_license | https://github.com/fbesserer/DataStructuresAndAlgorithms-Problemset2 | b52b28f0a228b5467df3ea18f5799c9791e75c43 | f75eaf4dd66330ec70a8192685bb18ba1b9a0a70 | refs/heads/master | 2023-06-02T04:08:34.511605 | 2021-06-22T10:05:43 | 2021-06-22T10:05:43 | 379,223,615 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ## Example Test Case of Ten Integers
import random
def get_min_max(ints):
"""
Return a tuple(min, max) out of list of unsorted integers.
Args:
ints(list): list of integers containing one or more integers
"""
if not ints:
return
min = ints[0]
max = ints[0]
# loop over val... | UTF-8 | Python | false | false | 1,163 | py | 15 | problem_6_unsorted_int_arr.py | 8 | 0.577816 | 0.552021 | 0 | 45 | 24.844444 | 70 |
ChrisLR/BasicDungeonRL | 15,753,940,071,770 | 227d104c0c351074e9ec0150f1b044306285ee75 | 51108a50ffb48ad154f587c230045bb783f22240 | /bflib/characters/races/elf.py | cae7f2bf367643b771b198cdd39113b8ac3825b2 | [
"MIT"
] | permissive | https://github.com/ChrisLR/BasicDungeonRL | c90bd0866c457557cccbad24e14689d5d6db7b00 | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | refs/heads/master | 2021-06-15T13:56:53.888646 | 2019-08-05T16:33:57 | 2019-08-05T16:33:57 | 104,269,987 | 3 | 0 | MIT | false | 2019-08-05T16:28:23 | 2017-09-20T21:35:19 | 2018-11-11T00:40:35 | 2019-08-05T16:28:22 | 659 | 3 | 0 | 0 | Python | false | false | from datetime import timedelta
from bflib import dice, languages, restrictions, units
from bflib.characters import abilityscores, specialabilities, savingthrows
from bflib.characters.races.base import Race
class Elf(Race):
name = "Elf"
average_height = units.Feet(5)
average_weight = units.Pound(130)
... | UTF-8 | Python | false | false | 1,209 | py | 544 | elf.py | 541 | 0.712159 | 0.698098 | 0 | 35 | 33.542857 | 74 |
derooie/agile | 369,367,208,552 | 445a1c36dca13026c8668651c4fccdd75f5f10ab | d13b3abfbbc5b84cda87d3462ba6e548065d467e | /src/accounts/tests/test_settings.py | 0a05ddd11416e99753ba3c8c59ed1619b00d954a | [] | no_license | https://github.com/derooie/agile | f6a41bd950b2b301c749346c71cabd1ea557ee8e | 8bd105d471fd53ab12eb2f3e13681922c045fa31 | refs/heads/master | 2021-06-23T16:22:21.836242 | 2018-11-16T12:28:18 | 2018-11-16T12:28:18 | 199,092,960 | 0 | 0 | null | false | 2021-06-10T21:46:22 | 2019-07-26T23:46:04 | 2019-07-26T23:46:35 | 2021-06-10T21:46:20 | 5,043 | 0 | 0 | 1 | JavaScript | false | false | from django.contrib.auth.models import User
from django.test import TestCase, Client
from django.urls import reverse
from accounts.models import AgileUser, Team
from accounts.forms import AppSettingsForm
class SettingsViewTest(TestCase):
def setUp(self):
self.client = Client()
self.user = User.ob... | UTF-8 | Python | false | false | 1,457 | py | 43 | test_settings.py | 19 | 0.684969 | 0.679478 | 0 | 34 | 41.852941 | 97 |
mauronunez/api | 4,922,032,533,287 | 38ed114b61388faef3595c7b8c682755c50cb828 | bd3724258c1426ba768a5d6431a571c7849f2aa2 | /endpoints/licitacion.py | 3dd54dbde40460d2d7002bd134eeb964e639e87d | [] | no_license | https://github.com/mauronunez/api | d95b034fcef05a49f560f2c584032401a95115e5 | 41668080e72165406e3cc5d8a927e259c876e995 | refs/heads/master | 2020-12-31T02:02:18.876230 | 2015-11-27T23:06:07 | 2015-11-27T23:06:07 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
import operator
import dateutil.parser
import falcon
from models import models_api
from utils.myjson import JSONEncoderPlus
from utils.mypeewee import ts_match
class LicitacionId(object):
@models_api.database.atomic()
def on_get(self, req, resp, licitacion_id=None):
# Obtener la licita... | UTF-8 | Python | false | false | 18,484 | py | 16 | licitacion.py | 15 | 0.574064 | 0.572441 | 0 | 435 | 41.491954 | 193 |
moraygrieve/pysys | 2,757,369,033,368 | 728857a0f9757b87d2eadcd0b46f93cbaa7b170a | 113d2f4b998c049a981d5c82260c0a7316d7a8a2 | /pysys-examples/internal/testcases/PySys_internal_056/run.py | 69d59a1a18cb9395027b52ef5dbd5c5a26e25f81 | [] | no_license | https://github.com/moraygrieve/pysys | a9055b56fc7fb8c7ec3c50b641b2bfa1939e1c9c | 3f93cbedbb806b6c53de89358025f93c740ebdc3 | refs/heads/master | 2020-04-29T10:39:42.850088 | 2019-02-27T18:07:13 | 2019-02-27T18:07:13 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from pysys.constants import *
from pysys.basetest import BaseTest
class PySysTest(BaseTest):
def execute(self):
pass
def validate(self):
self.assertTrue(True)
self.assertTrue(False)
self.addOutcome(TIMEDOUT, 'simulated timeout')
self.assertTrue(True)
self.assertGrep('not_there', expr="")
se... | UTF-8 | Python | false | false | 616 | py | 115 | run.py | 97 | 0.685065 | 0.685065 | 0 | 22 | 25.727273 | 50 |
0x706972686f/experimentation | 274,877,920,057 | 6962097a80904286c850d7faad6c9476e2618a70 | c0413119e4e6c459cd9acc9e5459ed6d4cffc71a | /python37example.py | 37ca1e7aeff4bacce270c98a6bcc5864aec5550c | [] | no_license | https://github.com/0x706972686f/experimentation | ace3f73da0d3f63f9889ed925c13ca23e58a7fd9 | 68c592e8e25e0f227e05ef11d0d9e23d665720d4 | refs/heads/master | 2020-07-29T19:57:41.884138 | 2019-09-21T07:15:07 | 2019-09-21T07:15:07 | 209,941,826 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
This is an experiment to play with some of the new features of Python 3.7
Specifically
-Dataclasses (https://docs.python.org/3/library/dataclasses.html)
-Coroutines and Tasks (https://docs.python.org/3/library/asyncio-task.html)
-Breakpoint (https://docs.python.org/3/library/functions.html#breakpoint)
-Annota... | UTF-8 | Python | false | false | 3,214 | py | 1 | python37example.py | 1 | 0.656192 | 0.645924 | 0 | 92 | 32.956522 | 160 |
BanosLopezDA/BEATCLOU | 2,671,469,686,112 | 900830e0714ad15caff5c08cfe5129d6c56da8b3 | 47a19b098719d020feb7bacd93aaefe5c11b4afc | /SistemaAudios/models.py | 689c1d995077566c463e7529b2bdd2fd0bf78c26 | [] | no_license | https://github.com/BanosLopezDA/BEATCLOU | a8860bb3e0fd5cff6450d5a800c3cbc0c7a13a5e | 3ceedfeb9bb88525eab3444287dc104add2660b6 | refs/heads/master | 2023-02-10T22:57:56.653201 | 2021-01-08T00:56:09 | 2021-01-08T00:56:09 | 327,760,178 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class User(AbstractUser):
codigoSeguridad = models.CharField(max_length=20, null = True, blank=True)
class Categoria(models.Model):
idCategoria = models.AutoField(primary_key=True)
nombre = models.... | UTF-8 | Python | false | false | 1,439 | py | 22 | models.py | 9 | 0.719944 | 0.711605 | 0 | 37 | 37.891892 | 97 |
gfanto/aiopika | 18,219,251,282,874 | 02932e2779dbe2bfec812ef783564aeefef0de83 | 490cee06cfdd914ee1505b4f00384602ae103bf2 | /aiopika/frame.py | 28140c338e5564a76f0eca1b8d257b224cb32ba6 | [
"MIT"
] | permissive | https://github.com/gfanto/aiopika | 33ef4ad58c7bd49686a3351799f0ab90b24d8272 | c2da34e3169dc1592cbf89076fd6024285e2f206 | refs/heads/master | 2022-03-28T01:46:20.359848 | 2019-12-30T22:33:23 | 2019-12-30T22:33:23 | 217,752,525 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
import struct
import asyncio
from typing import Union, Iterable
from . import exceptions
from . import spec
from . import amqp_object
LOGGER = logging.getLogger(__name__)
class Frame(amqp_object.AMQPObject):
"""Base Frame object mapping. Defines a behavior for all child classes for
assignme... | UTF-8 | Python | false | false | 8,471 | py | 12 | frame.py | 10 | 0.617401 | 0.61563 | 0 | 294 | 27.809524 | 80 |
smolynets/ajax_test | 8,349,416,453,896 | 103c9bca202a8cd48284539712a8a712de35a29e | a2478aaaa2b470365f2eaa4687895653f15588b3 | /ajax/urls.py | b19d6e5ce9be8e9b1681b11b06445361fe753655 | [] | no_license | https://github.com/smolynets/ajax_test | 7b188a417c045816b4d7d310870d686acfbeb579 | b0ad375e461dc9636c52bdbb1b7f93d0081eea58 | refs/heads/master | 2021-05-12T04:12:01.183162 | 2018-03-28T19:00:55 | 2018-03-28T19:00:55 | 117,154,811 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from django.conf.urls import url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^$', views.test, name='main'),
url(r'^adding', views.adding, name='adding'),
]
| UTF-8 | Python | false | false | 197 | py | 7 | urls.py | 5 | 0.675127 | 0.675127 | 0 | 8 | 23.5 | 49 |
indico/indico | 5,918,464,938,537 | cf77a451b01190f15935be256588d18863c91fb0 | 7af0ff378525ef6132f74bac0b1eb54ce4c40c08 | /indico/modules/events/sessions/blueprint.py | b550c85cf08a4550e5921924cca890ce79dca24a | [
"MIT"
] | permissive | https://github.com/indico/indico | 1126ee0ac3e9d36510a64989ce71be9c02680831 | 463951511d3a8409f944f98f29875c4323f3e897 | refs/heads/master | 2023-08-31T11:15:00.092526 | 2023-08-30T11:07:25 | 2023-08-30T11:07:25 | 2,113,067 | 1,549 | 429 | MIT | false | 2023-09-13T20:09:56 | 2011-07-27T13:56:30 | 2023-09-10T02:22:28 | 2023-09-13T20:09:56 | 244,382 | 1,524 | 383 | 689 | Python | false | false | # This file is part of Indico.
# Copyright (C) 2002 - 2023 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from functools import partial
from indico.modules.events.sessions.controllers.compat import compat_sessio... | UTF-8 | Python | false | false | 5,130 | py | 2,723 | blueprint.py | 1,673 | 0.614425 | 0.612865 | 0 | 74 | 68.324324 | 120 |
VB6Hobbyst7/3-Dimensional-Modeling | 10,290,741,657,396 | 8e9546b532cf2a4f47c6d762666a03879d3d0fd3 | 7dea487156aa5e716780fe9cb23b4d586eaf0859 | /script.py | 79b5dadec93642b880aa30c3bd098013aa80cfdb | [] | no_license | https://github.com/VB6Hobbyst7/3-Dimensional-Modeling | bae7b04e65c5ef4322906301b01e516cbcdd8339 | 02b3f01e567cbe976afbe3acc7bf9aea8f2bd539 | refs/heads/master | 2021-05-18T23:50:50.416212 | 2019-07-14T07:12:03 | 2019-07-14T07:12:03 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 21 22:20:34 2019
@author:Wei Huajing
@company:Nanjing University
@e-mail:jerryweihuajing@126.com
@title:seismic profile model construction-execution script
"""
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
import copy as cp
i... | UTF-8 | Python | false | false | 3,457 | py | 11 | script.py | 11 | 0.616721 | 0.606123 | 0 | 152 | 21.355263 | 101 |
kvsaijayanthkrishna/Python_Programming | 14,027,363,212,224 | f4402d4e5fbf9ea40d21be3431f30fb1e13adc97 | 5fbd4d5dae0091e829a9b41a7e00f6c5f8e1656e | /leap year or not.py | c51619ab05afbce623e3e57c99e417b6cf8dee7a | [] | no_license | https://github.com/kvsaijayanthkrishna/Python_Programming | 999ec6a91643f0d03757d7b6b1010f6dc1da130d | 0816c84c7010f550125b9e8e259104bee027eb53 | refs/heads/main | 2023-01-22T05:26:42.948436 | 2020-11-18T06:49:50 | 2020-11-18T06:49:50 | 307,591,168 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #. WAP to check whether entered year is leap year or not
year=int(input("enter a year\t:"))
if not(year%100) and not(year%400):print(year,"is leap year")
elif not(year%4) and year%100:print(year,"is a leap year")
else:print(year,"is not a leap year")
| UTF-8 | Python | false | false | 256 | py | 51 | leap year or not.py | 50 | 0.699219 | 0.660156 | 0 | 5 | 49.2 | 61 |
gogulakiran/TaskCompletionPortal | 987,842,524,402 | 7ec4f7ff1455d6269983866ed00656b90bedd84d | 1f9b349edcd4ae0b33d4474c32b50c9e9980913c | /cal/forms.py | 9133130baf9873ba32fa31beb9cbd3c4230373a9 | [] | no_license | https://github.com/gogulakiran/TaskCompletionPortal | c37f70f505fdf56eff624d2c44bbf91f1fd32e00 | 06bc3f40c2ee2c2d373a861ed9c20c56105db7b2 | refs/heads/master | 2022-04-16T19:38:57.330664 | 2020-04-13T06:40:57 | 2020-04-13T06:40:57 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.forms import ModelForm, DateInput
| UTF-8 | Python | false | false | 46 | py | 7 | forms.py | 6 | 0.847826 | 0.847826 | 0 | 1 | 45 | 45 |
manim-kindergarten/manim | 18,296,560,709,400 | e634e80b927a7e22978add6151c20a7dd7eb9d9a | 7a6644b553316ece2498e4f8f629454e0b379d23 | /manimlib/utils/space_ops.py | d6ccc280d0c318ed26be5922599c077c4462bd5d | [
"MIT"
] | permissive | https://github.com/manim-kindergarten/manim | 9f17cac6c1c4db5db6e7f4edfe4885eee9ec1f5e | 99fe80a55cdc5c2fcc249b3645d7f1cd19852bcd | refs/heads/master | 2023-06-27T19:44:05.384032 | 2022-12-08T04:00:27 | 2022-12-08T04:00:27 | 245,434,121 | 130 | 27 | MIT | true | 2023-06-17T07:15:31 | 2020-03-06T14:00:57 | 2023-05-19T09:55:15 | 2023-01-29T13:37:43 | 77,198 | 112 | 11 | 3 | Python | false | false | from __future__ import annotations
from functools import reduce
import math
import operator as op
import platform
from mapbox_earcut import triangulate_float32 as earcut
import numpy as np
from scipy.spatial.transform import Rotation
from tqdm import tqdm as ProgressDisplay
from manimlib.constants import DOWN, OUT, ... | UTF-8 | Python | false | false | 12,520 | py | 217 | space_ops.py | 88 | 0.590176 | 0.566454 | 0 | 452 | 26.699115 | 98 |
Der-Eddy/file-info | 8,787,503,088,029 | 40c4e7b964bd0aaac7b2c6ec21d368f1e834e34b | 75e25efb77df8310f7541444163704b0dbf3230e | /fileinfo.py | d8ba41dceefddc457ed28bab7fc2ecf573b7d10d | [
"Unlicense"
] | permissive | https://github.com/Der-Eddy/file-info | a54da8210b9e132f29138ed281e79f348382bd0d | 2bf0b45ea882172aa03e29b4cc761267be400b57 | refs/heads/master | 2021-01-22T22:07:40.404392 | 2017-03-22T23:48:16 | 2017-03-22T23:48:16 | 85,506,771 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
import hashlib
import datetime
import platform
from tkinter import Tk, Label, Entry, StringVar, filedialog
class Fileinfo:
def __init__(self, filePath):
self.file = filePath
self.getStats()
def getStats(self):
self.nam... | UTF-8 | Python | false | false | 4,229 | py | 2 | fileinfo.py | 1 | 0.573658 | 0.54812 | 0 | 119 | 34.537815 | 117 |
Tribruin/AdventOfCode | 3,934,190,069,309 | 38aedfc8ef5fb3b08bf1a8af64307740ca973249 | c1c859cdae98593270d74a3baffc6317f0279a28 | /2020/Day12/main.py | 314f91b476098dd1df085f4364599fcd76135767 | [] | no_license | https://github.com/Tribruin/AdventOfCode | a7b97d19609bfc8cb7f6f5e3587d85bba5745c82 | 93709de6469093ef8d137c1dca377ce3393b4dac | refs/heads/master | 2023-08-17T22:29:39.646596 | 2023-08-05T01:43:57 | 2023-08-05T01:43:57 | 225,481,815 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
sys.path.append("/Users/rblount/Scripts/AdventOfCode/2020/tools")
from AOC import AOC
move_options = {"N": (0, -1), "E": (1, 0), "S": (0, 1), "W": (-1, 0)}
move_directions = list(move_options.values())
dir_chars = list(move_options.keys())
turn_chars = ["L", "R"]
move_char = ["F"]
class Ferry_Nav:
d... | UTF-8 | Python | false | false | 2,827 | py | 181 | main.py | 171 | 0.540149 | 0.524231 | 0 | 96 | 28.458333 | 83 |
NGnius/casl | 5,720,896,449,181 | c552d3a7d756f50a44b1b3d5ee350000a42af807 | 7e246c308597762dccb129883706fb5f827b1f05 | /examples/net_debug.py | c2295d7d8523341f05e7b87df5cbb5bb3178feec | [] | no_license | https://github.com/NGnius/casl | b54bdd26003e582d77bb04b4e80e13c34074b4ad | db5bc4fbf6819ba89d0258e4c24a7fa85273d145 | refs/heads/master | 2023-03-01T08:52:31.681391 | 2021-02-05T03:12:43 | 2021-02-05T03:12:43 | 330,711,583 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
import socket
import sys
import json
ip = "127.0.0.1"
port = 42069
# Create socket for server
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
print("Do Ctrl+c to exit the program !!")
s.bind(("0.0.0.0", 3198))
# Let's send data through UDP protocol
while True:
data, addr = s.recvfrom(819... | UTF-8 | Python | false | false | 672 | py | 13 | net_debug.py | 10 | 0.644345 | 0.596726 | 0 | 26 | 24.846154 | 70 |
koliankolin/public_vk | 13,176,959,681,376 | e18ec9c952640a97fdabc8c27917c1f83d21cb74 | 7000409eea0bb0d5cdb60514672b91e2501b27ea | /Classes/vk/Post.py | bdc7eb1955b83905290c9df4bc750762186f6ce5 | [] | no_license | https://github.com/koliankolin/public_vk | 81e9b91874f29837c6b6845035d12affa02fd623 | 99b8390e3561680bcd6fa29f5fab1f0203c0d1f3 | refs/heads/master | 2022-11-17T17:42:03.819301 | 2020-07-13T09:27:20 | 2020-07-13T09:27:20 | 276,551,951 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import constants
from Classes.vk.Base import Base
from Classes.vk.Image import ImageCls
from Classes.image.NewsLoaderMirror import NewsLoaderMirror
from tqdm import tqdm
import time
class Post(Base):
def __init__(self):
super().__init__()
def post(self, publish_dates=()):
for i, date in enumer... | UTF-8 | Python | false | false | 967 | py | 15 | Post.py | 13 | 0.514077 | 0.509906 | 0 | 27 | 34.518519 | 184 |
palanceli/MachineLearningSample | 10,617,159,164,557 | 98618dc35419f9a92faa2a6413ac2a1eab457dd2 | f7a9153bb65b5e6fc8ea12198383c464ed8e315c | /LinearRegression/sample1.py | f36be5027fa465b2377cb32e43acfd60638a460f | [] | no_license | https://github.com/palanceli/MachineLearningSample | 398cf9bf1d1d5cff09f22618b610b839881b4ef7 | 177a891e97f553b8b63803c7ec8b595dc2f45b8b | refs/heads/master | 2021-01-22T05:01:07.515658 | 2018-05-20T16:08:01 | 2018-05-20T16:08:01 | 102,275,158 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
# -*- coding:utf-8 -*-
import logging
import os
import random
import pandas
import io
import sklearn
import sklearn.linear_model
import matplotlib
import matplotlib.pyplot
import mpl_toolkits.mplot3d
import numpy
class DictReader(object):
def __init__(self):
self.path = os.path.join(os.path.dirname(os.getcwd()), ... | UTF-8 | Python | false | false | 7,004 | py | 16 | sample1.py | 12 | 0.682157 | 0.67221 | 0 | 203 | 30.689655 | 133 |
frequent-nomad/python-start | 8,211,977,497,223 | 16d4cb722004b82534aa78dd810d215c7a7cbca5 | 4950b1819a19a9a94c1fba08a8efa6f183bda58d | /Codewars test1.py | 38ba9f0dc705ec58fd9930e33d218d5e982dd32f | [] | no_license | https://github.com/frequent-nomad/python-start | 903f31b5be79bea55fba4061f689ba1de4703540 | ed7be4ee5a6cf8fbe03e7270126cecc9ddb23b19 | refs/heads/master | 2018-09-22T22:42:11.234892 | 2018-06-06T19:48:06 | 2018-06-06T19:48:06 | 135,634,571 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
# You are going to be given a word. return the middle character of the word.
# If the word's length is odd, return the middle character.
# If the word's length is even, return the middle 2 characters.
# #Examples:
# Kata.getMiddle("test") should return "es"
# Kata.getMiddle("testing") should return "t"
# Kata.getMi... | UTF-8 | Python | false | false | 774 | py | 14 | Codewars test1.py | 14 | 0.630491 | 0.618863 | 0 | 28 | 26.607143 | 76 |
ToddPeterson/QCReview | 18,580,028,561,716 | 151298215e9255acf0e9e6249d08cb3b57e930d1 | dbb0be329cf29d44b806ce11d07c5e2db11822bd | /qc_review/tests/test_forms.py | 53bd0e9b341f84fc82339eaa24083f6d7fb09070 | [] | no_license | https://github.com/ToddPeterson/QCReview | 585c244c43870a70f963d49ae43c423b9562a0b1 | 0fb0f8e415128ba3b14163928baaf54b093b557f | refs/heads/master | 2022-05-26T21:45:53.440238 | 2020-06-06T14:06:37 | 2020-06-06T14:06:37 | 211,562,633 | 1 | 0 | null | false | 2022-04-22T22:24:52 | 2019-09-28T21:16:22 | 2020-06-06T14:06:40 | 2022-04-22T22:24:50 | 21 | 1 | 0 | 2 | Python | false | false | from django.test import TestCase
from qc_review.forms import QCRunSelectForm
from .utils import create_qcrun, create_suite
class TestForms(TestCase):
def setUp(self):
self.run1 = create_qcrun(123, 'ADAMSDEV')
self.suite1 = create_suite(self.run1, 'adamspy', 10, 5, 1)
self.run2 = create_q... | UTF-8 | Python | false | false | 1,285 | py | 26 | test_forms.py | 20 | 0.603891 | 0.578988 | 0 | 41 | 30.341463 | 66 |
oscarjb/sensor-box | 1,305,670,101,149 | 20f22bc5aaf6cfb672fb779134aa4fa035d6b759 | f14b8c37e72dc46f006c54d54a673c40d5398bbb | /server/migrations/0010_auto_20200228_1104.py | 9ef1d76c12b393f220fd6009a977889a3c052416 | [] | no_license | https://github.com/oscarjb/sensor-box | cbe2bb4fc0a292b73b7baddc4ecec42250ab5dbd | 19b7d46a9bec9025b300bc827465597e896cb534 | refs/heads/main | 2023-02-16T07:11:03.035084 | 2021-01-13T12:00:43 | 2021-01-13T12:00:43 | 305,773,983 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.2.7 on 2020-02-28 10:04
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('server', '0009_auto_20200213_1159'),
]
operations = [
migrations.AddField(
model_name='test',
... | UTF-8 | Python | false | false | 697 | py | 50 | 0010_auto_20200228_1104.py | 39 | 0.56241 | 0.48924 | 0 | 24 | 27.041667 | 132 |
PaPiix/verificationcog | 9,861,244,925,338 | 3e8d361b8c26f9bd837bb0ac509c0be6f4e72dc6 | 7cbb735e70c55f47868aa9cd7166a2b07be514a3 | /verify.py | 34d04ef22a45f9ff2d5afcac28e8f5eda13e6e5d | [] | no_license | https://github.com/PaPiix/verificationcog | f1e90543fd36e60f3c85b0edd596a6519262475c | cc67cb895583d3de7e6c2c4333a117bf26ecf9ac | refs/heads/master | 2021-09-09T16:58:34.712985 | 2018-03-18T11:44:43 | 2018-03-18T11:44:43 | 125,718,555 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import discord
from discord.ext import commands
from cogs.utils.dataIO import dataIO
from cogs.utils import checks
class verify:
"""Verify"""
def __init__(self, bot):
self.bot = bot
self.settings = dataIO.load_json('data/verificationsettings.json')
for s in self.settings:
... | UTF-8 | Python | false | false | 9,145 | py | 2 | verify.py | 1 | 0.553478 | 0.551947 | 0 | 193 | 46.378238 | 165 |
mxmua/airflow_project | 5,660,766,912,252 | 8208f1c1e10cf5a145e79003ba73aadb67b37be5 | e96721568355e62a380af9bb8e1c04a00af6bddb | /air_project_dag.py | 689f4a3c3e0021e9313b70516e043b22e5cecff0 | [
"MIT"
] | permissive | https://github.com/mxmua/airflow_project | 1c99d6226719cdd315e00582fc35bf503a705cd4 | 0b88cb4a7fcdca4fb875abc633a641275d5c79f2 | refs/heads/master | 2022-11-18T17:02:38.872436 | 2020-07-06T19:34:23 | 2020-07-06T19:34:23 | 273,556,461 | 0 | 0 | MIT | true | 2020-07-06T19:34:25 | 2020-06-19T17:59:52 | 2020-06-21T12:25:13 | 2020-07-06T19:34:24 | 77 | 0 | 0 | 0 | Python | false | false | from airflow import DAG
from airflow.utils.dates import days_ago
from airflow.operators.python_operator import PythonOperator
from datetime import timedelta
import requests
import re
import csv
import os
import air_project as libs
import secur.credentials as ENV
args = {
'owner': 'air101',
'start_date': day... | UTF-8 | Python | false | false | 2,357 | py | 5 | air_project_dag.py | 3 | 0.619856 | 0.615613 | 0 | 81 | 28.098765 | 76 |
TonyFlury/py-importjson | 8,650,064,143,531 | f645ae92ecf1cbb05c96edf1ed569f4c589e2b4a | 6e9b6e978e8100c6432703f1591202b6212eac63 | /sandbox/classproperty.py | 022a9382c254a7c213e244ea53e57e31434f11bb | [] | no_license | https://github.com/TonyFlury/py-importjson | 44670edb2e507cfe600c16f64dce8119e73b2b6f | 1b86453afd20a32d4124b6ee7061a70f8e28fc61 | refs/heads/master | 2021-01-10T15:19:04.065297 | 2019-05-27T22:28:12 | 2019-05-27T22:28:12 | 44,206,947 | 8 | 3 | null | false | 2019-04-09T10:18:44 | 2015-10-13T21:49:02 | 2019-04-07T09:50:28 | 2019-04-09T10:18:44 | 1,115 | 6 | 3 | 14 | Python | false | false | #!/usr/bin/env python
"""
# importjson : Implementation of classproperty.py
Summary :
<summary of module/class being implemented>
Use Case :
As a <actor> I want <outcome> So that <justification>
Testable Statements :
Can I <Boolean statement>
....
"""
__version__ = "0.1"
__author__ = 'Tony Flury : ... | UTF-8 | Python | false | false | 2,117 | py | 20 | classproperty.py | 6 | 0.578649 | 0.572036 | 0 | 87 | 23.333333 | 78 |
holen/Python | 10,720,238,401,222 | ebdfad095411d3333af405b035f7c7b59a9e2eaa | 95f9c734c4bf5de8e5d0adff9ac2cf0228df75ac | /mailcode/adjectStrategy-new.py | e34c8811373cff85842fd7ed71fae9d25a1bf0c8 | [] | no_license | https://github.com/holen/Python | 7a996b13ff2224084397223879c380169d47ff8c | 506fff291d6e9c6f80c30a51cc3b77e9dd048468 | refs/heads/master | 2022-12-12T22:12:51.561716 | 2019-10-16T03:08:00 | 2019-10-16T03:08:00 | 14,278,665 | 1 | 0 | null | false | 2022-12-08T00:51:26 | 2013-11-10T15:29:59 | 2019-10-16T03:08:15 | 2022-12-08T00:51:24 | 3,972 | 0 | 0 | 5 | Python | false | false | #-* coding:UTF-8 -*
#!/usr/bin/env python
import common.mdb as mdb
import sys, argparse
from getloadstr import getLoadInfo
from getserverip import getServerIp
from showresource import getresource
def deloldstg(domainkey, owner_value):
sql = " delete from strategy where domain_key = '%s' and owner_value = %s "
... | UTF-8 | Python | false | false | 5,828 | py | 171 | adjectStrategy-new.py | 147 | 0.595361 | 0.587113 | 0 | 120 | 47.5 | 245 |
Yoonhyungseon/codeReview | 5,042,291,639,560 | 9701c744802b3ee0f2185a537a96174be817c9b4 | 7adc1c5eb910fc7d7320c666b2ec6ffa5d855a64 | /pythonWorkspace/LeeBros/1_Basic(26)/3_문자열 다루기/2_부분문자열 위치 구하기.py | c891df93e94224a9ebdcd58122d3d651e0af10da | [] | no_license | https://github.com/Yoonhyungseon/codeReview | 87661f38ba9b022a60b37a9896c642e3970bc27c | c006e662d2956f977fc96755a5d0a2256975bc10 | refs/heads/main | 2023-08-05T19:42:22.437149 | 2021-09-16T14:43:59 | 2021-09-16T14:43:59 | 407,200,546 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
주어진 입력 문자열에 대하여 목적 문자열이 부분 문자열로 존재하는 경우, 부분 문자열의 시작 인덱스를 출력하는 코드를 작성해보세요. 인덱스는 0부터 시작한다고 가정합니다.
입력 형식
첫 번째 줄에는 입력 문자열이 주어지고,
두 번째 줄에는 목적 문자열이 주어집니다.
1 ≤ 목적 문자열의 길이(M) ≤ 입력 문자열의 길이 (N) ≤ 1,000
출력 형식
주어진 입력 문자열에 대하여 목적 문자열이 부분 문자열로 존재하는 경우, 부분 문자열의 시작 인덱스를 출력하고, 목적 문자열이 부분 문자열로 존재하지 않는 경우 -1을 출력합니다.
단 목적 문자열이 입력 문... | UTF-8 | Python | false | false | 1,154 | py | 88 | 2_부분문자열 위치 구하기.py | 81 | 0.611465 | 0.582803 | 0 | 50 | 11.58 | 100 |
Tawfik-Metwally/Python | 14,929,306,357,162 | 8544adcbeaeeb4f10d902a96fe23e7c58baaf43b | b34f5da31f6a5df430f558f959527254fcf62b43 | /12-Bhaskara.py | c6f07a64c92e22a2353c3b837df4db622f477fea | [] | no_license | https://github.com/Tawfik-Metwally/Python | c090f706a6f91eb2d7a82edf1681b2beb68e6c8f | d6b38ca8b828f3deb2d9539ee6d159defaa5dcd1 | refs/heads/master | 2020-12-19T14:04:41.230898 | 2020-01-23T09:14:38 | 2020-01-23T09:14:38 | 235,755,534 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | a = float(input("Digite o numero a: "))
b = float(input("Digite o numero b: "))
c = float(input("Digite o numero c: "))
delta = (b**2) - (4 * a * c)
import math
if delta < 0:
print("esta equação não possui raízes reais")
else:
raiz1 = (-b + math.sqrt(delta)) / (2 * a)
raiz2 = (-b - math.sqrt(delta)) / (2 * ... | UTF-8 | Python | false | false | 590 | py | 15 | 12-Bhaskara.py | 15 | 0.537133 | 0.500864 | 0 | 20 | 27.95 | 51 |
AR85AR/stiner_django | 1,675,037,267,083 | 7be55bf8a5c9183528b78b57d43a985b0b66e8c4 | 03eeb74899a8d44fdd0587cd06f413b4a67a1f30 | /contact/forms.py | 15dfa92235146da7838a7f1324d4274ccf047674 | [] | no_license | https://github.com/AR85AR/stiner_django | 74ef202a5e14145bba2d4ad3350f5796d056ead8 | d7346d725756f3a90749b682bbbdcbe1b45e65d3 | refs/heads/master | 2023-05-27T16:27:52.995170 | 2021-06-10T08:00:58 | 2021-06-10T08:00:58 | 362,386,010 | 1 | 0 | null | true | 2021-06-10T08:01:51 | 2021-04-28T08:00:09 | 2021-06-10T07:59:00 | 2021-06-10T08:01:50 | 159,282 | 0 | 0 | 0 | CSS | false | false | from django import forms
class EmailForm(forms.Form):
""" Formularz wysyłania wiadomości email """
name = forms.CharField(max_length=25,
widget=forms.TextInput(attrs={'placeholder': 'Podaj swoje imię', 'class': 'name'}))
email = forms.EmailField(widget=forms.TextInput(attrs={'p... | UTF-8 | Python | false | false | 534 | py | 178 | forms.py | 88 | 0.662879 | 0.659091 | 0 | 11 | 47 | 119 |
Fieoner/padmiss-daemon | 171,798,740,053 | c61c35cfb08da6f0b63aff9adec51d59048ee274 | c621719284f603127376f15bf6d95be85909177d | /hid.py | 58da6946bb9c75cd223649676b6173ba7507c005 | [] | no_license | https://github.com/Fieoner/padmiss-daemon | 228f38e2da7f3a93aa1c45eb919f01ccd0185970 | 6a59d9b51b2781d09f29444c2a110e96b9b45194 | refs/heads/master | 2020-06-17T10:38:31.611655 | 2019-07-07T12:02:32 | 2019-07-07T12:02:32 | 195,898,953 | 0 | 0 | null | true | 2019-07-08T23:26:45 | 2019-07-08T23:26:45 | 2019-07-07T12:02:49 | 2019-07-07T12:02:47 | 177 | 0 | 0 | 0 | null | false | false | #!/usr/bin/env python
import sys
import usb
import logging
import time
import os
from pprint import pprint
from config import PadmissConfig, ScannerConfig
log = logging.getLogger(__name__)
def listDevices():
ret = []
dev = usb.core.find(find_all=True)
for d in dev:
vendor = str(("%x" % d.idVendor... | UTF-8 | Python | false | false | 6,399 | py | 15 | hid.py | 10 | 0.504298 | 0.490077 | 0 | 201 | 30.835821 | 113 |
TimothySeah/SOSPrinceton | 6,055,903,897,428 | f00650bc3264fbc206ba7c5a98d2f9de319a72cd | 444fa360b62816ee87d64ffc51036b00990330aa | /pickle.py | c7d5fa1dfe7168769c1cf738d8b46db46c488d8c | [] | no_license | https://github.com/TimothySeah/SOSPrinceton | 8cc09b77129d737886013ac7358ed54375841257 | 644c9c3da2ae87b637fec310ecdeb33ac8a6f6b6 | refs/heads/master | 2021-01-10T15:10:15.946859 | 2015-11-08T03:46:01 | 2015-11-08T03:46:01 | 45,764,549 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python2
import numpy as np
from sklearn import mixture
from sklearn import svm
from sklearn import preprocessing
from sklearn import multiclass
from sklearn import metrics
from sklearn import cross_validation
from matplotlib.pyplot import *
def loadData(dataset):
X = np.genfromtxt(dataset + '_X.dat')
y... | UTF-8 | Python | false | false | 6,233 | py | 4 | pickle.py | 4 | 0.664688 | 0.646238 | 0 | 250 | 23.924 | 131 |
rpytel1/occlusion-vs-data-augmentations | 8,323,646,625,357 | 2ed5fde458527e2d76254fc7f174a5347250d7f9 | 635006678377a79d62e2e003abd744ff837f3fd6 | /code/Top_down/lib/utils/cutout_util.py | b7ebe40501c7def750119e388860b8f25e3be858 | [
"BSD-3-Clause"
] | permissive | https://github.com/rpytel1/occlusion-vs-data-augmentations | 80a5228bdac19cb0f09db4c05d37519806bf2474 | 6a21650e578c3cc8b166dea23528d4b76b93dfde | refs/heads/master | 2023-02-16T02:30:50.191259 | 2021-01-15T11:15:41 | 2021-01-15T11:15:41 | 305,066,044 | 8 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
import numpy as np
import json
import math
import shutil
import os
from lib.utils.keypoints_constants import part_mapping, advanced_parts, keypoint_names
def get_image_mean_color(img):
return img.mean(axis=0).mean(axis=0)
def get_xy(center, widths, img_dims):
x, y = center
width_x, width_y =... | UTF-8 | Python | false | false | 12,817 | py | 23 | cutout_util.py | 18 | 0.596395 | 0.580635 | 0 | 304 | 41.161184 | 124 |
Anseik/algorithm | 9,895,604,659,851 | d0ff06942c1144038806859c4b04e04b23416bed | d7cfe98faeb0fe1b4ce02d54d8bbedaca82764f7 | /1105_문제풀이/swea_5208_전기버스2_solution.py | 2d0fdaf23fe06de6f2a7b558d603164d22819ffb | [] | no_license | https://github.com/Anseik/algorithm | 27cb5c8ec9692cf705a8cea1d60e079a7d78ef72 | 925404006b84178682206fbbb3b989dcf4c3dee9 | refs/heads/master | 2023-02-26T00:02:01.696624 | 2021-02-03T14:10:28 | 2021-02-03T14:10:28 | 301,753,927 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
sys.stdin = open('swea_5208_전기버스2_solution.txt')
# idx : 정류장 번호 / cnt : 배터리 교환횟수 / remain : 배터리 잔량
def backtrack(idx, cnt, remain):
global min_cnt
# 다음 정류장 도착하면 remain -1
remain -= 1
if cnt >= min_cnt: # 중간 배터리 교환 횟수가 정답후보 이상이면 리턴
return
if idx == N:
min_cnt = cnt
... | UTF-8 | Python | false | false | 886 | py | 450 | swea_5208_전기버스2_solution.py | 435 | 0.557143 | 0.531429 | 0 | 29 | 23.103448 | 52 |
Ilade-s/QRCode_V1 | 16,827,681,870,067 | 7929bcab0a988da32c3e08c0ef0a1e3bd6df1680 | f8822f01114a62da72c7207e6e9da3b5b08c3786 | /QRcode_Std.py | 7a6c4ba73bb0d34071bc79c0b556b4bccdfc773c | [
"MIT"
] | permissive | https://github.com/Ilade-s/QRCode_V1 | 888c27cb8d2d1cd7d8f2a8eb5199a7ee0b4411a3 | 49d20c3d3ee4930851a0b8183fccf075cf4205fa | refs/heads/main | 2023-03-30T19:01:48.921183 | 2021-03-30T11:41:01 | 2021-03-30T11:41:01 | 349,127,294 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Module des fonctions pour décoder un QR code V1 (plus petit mode)
La fonction pricipale est lire_QRCode(QR_code)
Quand lancé en main, proposera une interface avec toutes les fonctionnalités du programme
-----------
Pour utlisation dans un autre programme, utiliser FuncLaunch(ImgName) pour un lancement sans interfac... | UTF-8 | Python | false | false | 14,296 | py | 6 | QRcode_Std.py | 4 | 0.457439 | 0.399209 | 0 | 425 | 32.336471 | 121 |
MountPOTATO/Elevator-Dispatching | 14,242,111,588,769 | d3b3bd044f31f07cca4d00ce2e6aabd62cec4537 | 51828b2d8cec8b090b581e7573125e4834a962d6 | /src/main.py | 76e721defc4d0341f63193febec99fe3e29405ce | [] | no_license | https://github.com/MountPOTATO/Elevator-Dispatching | a249d5bd0eac3c76fa27731b6628fdf72a9f1d38 | 941c7f3ac62f4f4ce6abb6faf5f1f99e334858ba | refs/heads/master | 2023-04-12T02:36:46.991490 | 2021-05-21T01:51:03 | 2021-05-21T01:51:03 | 362,339,027 | 7 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Author: mount_potato
Date: 2021-04-28 12:47:13
LastEditTime: 2021-05-12 22:22:29
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: \Elevator-Dispatching\src\main.py
'''
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from utils import *
from elevator_ui import *
c... | UTF-8 | Python | false | false | 760 | py | 6 | main.py | 4 | 0.705263 | 0.665789 | 0 | 31 | 23.387097 | 66 |
Yansb/pythonAprender | 9,199,819,971,383 | d583c8f5d4d6a3cae45b8c9a52cf34e5d97d2618 | 12b8ca1390643c0a9e8fa5539e291b39f1a53406 | /Learning/motorbike.py | de3b25acb5ad3a09892a2d82d8cbe73eadd2a336 | [] | no_license | https://github.com/Yansb/pythonAprender | 710d11a6b8a9c4414c1cb7496d13cc92aef2ccd2 | 93080b35ea9b69420b430cadce7ec949cbcd3ba0 | refs/heads/master | 2020-04-06T17:26:16.283323 | 2018-11-16T03:49:50 | 2018-11-16T03:49:50 | 157,659,194 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | bike={"make": "Honda", "model": "250 dream", "colour": "red", "engine size": 250}
print(bike["make"])
| UTF-8 | Python | false | false | 102 | py | 40 | motorbike.py | 39 | 0.598039 | 0.539216 | 0 | 2 | 50 | 81 |
doublejy715/Problem-Solve | 206,158,466,267 | 4f18468f7ccf3cdbd9a4c34f2497cdf7706e2655 | 739e91039c05943352a3fc07e768641f74097482 | /Python_Practice/insert_sort.py | 265f3ca96076f5088fd661a5a017cc6cbd11199e | [] | no_license | https://github.com/doublejy715/Problem-Solve | 651182079ded1a9da3478dd30a4c4507894de85e | 57d5a672a48103769c8cc022cb7132d988624600 | refs/heads/master | 2023-07-13T09:51:23.145427 | 2021-08-31T04:35:04 | 2021-08-31T04:35:04 | 234,250,382 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 단순히 스왑 형식으로 마무리 할 수 있다.
def Insert_Sort(data):
for index1 in range(len(data)-1):
for index2 in range(index1+1,0,-1):
if data[index2] < data[index2-1]:
data[index2], data[index2-1] = data[index2-1],data[index2]
else:
break
return data | UTF-8 | Python | false | false | 340 | py | 272 | insert_sort.py | 271 | 0.538961 | 0.487013 | 0 | 10 | 29.9 | 74 |
eironside/PMLDM | 14,903,536,554,618 | d1621d1285cd37c0b1b8165406be5dbd5cfdd24a | f586b45973b3f6eb8939dff6326a6a2aaa399dba | /ngce/wrapper/NRCS_Contours.py | cf86ea8851ff2c3275549271974ef60455529e1a | [] | no_license | https://github.com/eironside/PMLDM | e9648f4e2f1d9f82792dd2902a9d9274487b1f05 | e15c2e2ba5abd87adf6ec047b18a4fcb19ee053e | refs/heads/master | 2021-01-02T22:47:02.761359 | 2020-04-30T16:40:26 | 2020-04-30T16:40:26 | 99,386,267 | 3 | 2 | null | false | 2020-04-16T16:10:59 | 2017-08-04T23:22:07 | 2020-02-03T18:22:36 | 2020-04-16T16:10:59 | 39,155 | 1 | 1 | 0 | Python | false | false | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# NRCS_Contours.py
# Created on: 2019-04-11
# Description: Wrapper for the contour generation for NRCS
# ---------------------------------------------------------------------------
import ALClasses
import arcpy
import ... | UTF-8 | Python | false | false | 9,974 | py | 88 | NRCS_Contours.py | 63 | 0.594746 | 0.591638 | 0 | 239 | 40.728033 | 130 |
alexjorenby/ConvNNSandbox | 14,723,147,938,148 | 79df36f1744bd7eb5d37121b833cc031abde9580 | 9237bb56fbd9b5bd677a5d84c1e1c756e63fdcb7 | /Scripts/helpers.py | d12b6c13ec2b96043b152663ace814b7ca58cea9 | [] | no_license | https://github.com/alexjorenby/ConvNNSandbox | 41d56b8dd79aa124fccef01c69ee831e7d6fd7a7 | 521e9a2ed7617f2bb95a5d49c82303b1332e3724 | refs/heads/master | 2020-07-02T11:55:30.352509 | 2019-08-19T03:31:55 | 2019-08-19T03:31:55 | 201,520,871 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from tensorflow import keras
from sklearn.preprocessing import OneHotEncoder
from sklearn.preprocessing import LabelEncoder
class PrintDot(keras.callbacks.Callback):
def on_epoch_end(self, epoch, logs):
if epoch % 100 == 0: print('')
... | UTF-8 | Python | false | false | 1,570 | py | 10 | helpers.py | 10 | 0.643949 | 0.63758 | 0 | 50 | 30.42 | 74 |
burnSTATION/spgt | 5,205,500,394,007 | d73531c64889b54a392c5d5e72fcfa9d258e2e3d | 466735b3ae1473e4d6254d2aa6cac99959966fd2 | /ready_service.py | 76aa2fb711597864faf81f6201160473fa498033 | [] | no_license | https://github.com/burnSTATION/spgt | fada79c55ab9739a8836f6d8467d1f26457ea7ad | 7006a3778127acbc912501da182457a8dc72930b | refs/heads/master | 2020-12-06T22:20:16.599883 | 2016-09-06T11:19:35 | 2016-09-06T11:19:35 | 67,461,258 | 1 | 0 | null | false | 2016-09-16T23:49:46 | 2016-09-06T01:09:16 | 2016-09-06T15:50:28 | 2016-09-16T23:49:45 | 14 | 1 | 0 | 3 | Python | null | null | from listeners import OnClientFullyConnect, OnClientDisconnect, OnLevelInit
from messages import SayText2
from players.entity import Player
from commands.say import SayCommand
from engines.server import engine_server
### GLOBALS & CONSTANTS ###
CHAT_PREFIX = "[\x02eSN\x01]"
players = {}
is_warmup_period = True
class... | UTF-8 | Python | false | false | 2,996 | py | 1 | ready_service.py | 1 | 0.676569 | 0.667223 | 0.002003 | 93 | 31.225806 | 105 |
Fawaz441/scholarsbank-pya | 8,186,207,712,960 | b0c0765bf00f5740aad1ea388448e96acd3105b6 | 2356bc6be0b8938c30ca07d36ec8bfd352094405 | /accounts/models.py | 244e8a539cde524a8e3822d275556e66d2312d0b | [] | no_license | https://github.com/Fawaz441/scholarsbank-pya | 3ccfa74dd1afd0c53972612c2810d3efbf85a1d6 | 56458ea5325e8f92c7989037879284a9409cf8ef | refs/heads/master | 2022-07-30T20:45:09.166321 | 2020-05-12T12:46:10 | 2020-05-12T12:46:10 | 263,336,879 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
from django.contrib.auth.models import User,PermissionsMixin
from django.urls import reverse
# Create your models here.
class Student(models.Model):
user = models.OneToOneField(User,on_delete=models.CASCADE,related_name='student')
uploads = models.IntegerField(default=0)
de... | UTF-8 | Python | false | false | 824 | py | 60 | models.py | 28 | 0.728155 | 0.714806 | 0 | 21 | 38.285714 | 106 |
fblrainbow/Python | 3,118,146,279,802 | aa9e2d94751ba2e40ab956c333ae2f44ecbf69e7 | fd0f25debda5eb51b8d404e78661752bf6eb1e5f | /python3.6.5/2018/第三季度/8月/27/class.py | 5fd6861ef33e91db078af312317c6d8bf5d5052e | [] | no_license | https://github.com/fblrainbow/Python | 53f5be4de065dbde2809f69de41fa276107b176a | 525604e756e1107183ae8fcc4d6dd611ea0f34ef | refs/heads/master | 2021-01-20T14:03:11.263929 | 2019-01-06T15:19:33 | 2019-01-06T15:19:33 | 90,551,373 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
#coding=utf-8
#__author__ = 'Administrator'
# class Man(object):
# def __init__(self, name, gender):
# self.name = name
# self.__gender = gender
# def get_gender(self):
# return self.__gender
# def set_gender(self,gender):
# self.__gender=gende... | UTF-8 | Python | false | false | 1,057 | py | 1,117 | class.py | 177 | 0.532556 | 0.525753 | 0 | 35 | 27.4 | 74 |
foxlf823/relation_classification | 15,307,263,443,730 | 18ef367c9b688129b28ce7e8d53322f30e8d11df | a28e8416614e280ee7463479f801b634daf26475 | /capsulenet.py | 91a5d0994e7c933b23821816e7e2296ef7ccf8b8 | [] | no_license | https://github.com/foxlf823/relation_classification | c8eb8510420f4da7b82bb7fda28e20a674ce36b3 | 334e0bda8a807d668635254a939990c8c23246c1 | refs/heads/master | 2021-05-02T03:25:50.078806 | 2018-02-26T05:27:16 | 2018-02-26T05:27:16 | 120,898,055 | 6 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
import torch
from torch import nn
from torch.autograd import Variable
from capsulelayers import DenseCapsule, PrimaryCapsule
import pyt_acnn as pa
import math
import torch.nn.functional as F
class CapsuleNet(nn.Module):
def __init__(self, max_len, embedding, pos_embed_size,
pos_embed_num, slide_wi... | UTF-8 | Python | false | false | 13,293 | py | 10 | capsulenet.py | 7 | 0.558715 | 0.535094 | 0 | 310 | 41.858065 | 186 |
Valeriitsoy/HW | 17,282,948,403,246 | 5299b2eec2cdc09fe2f0377137b4b595f383ea8b | 9ba12fc26836841693cfbe66e6b4c714bcf290b3 | /lesson03/task_6.py | e12e112fe028cea68457235ddab7d56c42b5eaa6 | [] | no_license | https://github.com/Valeriitsoy/HW | ea48bb9113af4c8af613a8dd322f0c3fc6745308 | 2291538d9b5069fb01d3eece60bd24bc55dbcd3e | refs/heads/master | 2020-12-20T03:35:24.857882 | 2020-02-18T20:27:43 | 2020-02-18T20:27:43 | 235,948,022 | 0 | 0 | null | false | 2020-02-18T20:27:44 | 2020-01-24T05:57:09 | 2020-02-15T17:00:08 | 2020-02-18T20:27:44 | 19 | 0 | 0 | 0 | Python | false | false | def int_func(word):
return word.capitalize()
print(int_func('text'))
print(list(map(int_func, input('Введите набор слов на латинце в нижнем регситре: ').split())))
| UTF-8 | Python | false | false | 215 | py | 45 | task_6.py | 41 | 0.68 | 0.68 | 0 | 8 | 20.625 | 95 |
langenhagen/experiments-and-tutorials | 18,872,086,298,962 | 0683a81d2caf0de4949799a5d2d354a738c73b13 | fa3f5368cbba48de3b9c57c79785e51086afb04d | /Python/inheritance-hello.py | ad1228f82a34d437c255c2e3b42459f18a8c24a4 | [] | no_license | https://github.com/langenhagen/experiments-and-tutorials | 8f853675e0d8718581c33ff099fcb35c8958f315 | 9598af1b8be7ebe8462a0bbfc87a6edfa5063741 | refs/heads/master | 2023-08-03T15:07:38.757388 | 2023-07-31T16:15:34 | 2023-07-31T16:15:34 | 211,196,519 | 4 | 1 | null | false | 2022-03-27T10:02:49 | 2019-09-26T23:15:40 | 2022-01-05T14:28:47 | 2022-03-27T10:02:48 | 254,076 | 1 | 1 | 15 | HTML | false | false | """
Showcase inheritance.
"""
print("---1---")
class C:
def __init__(self):
print("Hello from C.__init__!")
class D(C):
pass
c = C() # calls the print
d = D() # also calls the print
| UTF-8 | Python | false | false | 207 | py | 1,602 | inheritance-hello.py | 1,027 | 0.512077 | 0.507246 | 0 | 18 | 10.5 | 39 |
Hellofafar/Leetcode | 11,364,483,488,334 | c691a91222818c9d56d22abd8ba983378800b579 | 6ac0bba8c1851e71529269c0d9d89a7c8fa507f2 | /Medium/467.py | ee21d5c6a072c61604aaf74d66d17f56c37701a3 | [] | no_license | https://github.com/Hellofafar/Leetcode | e81dc85689cd6f9e6e9756beba070cb11e7b192e | 7a459e9742958e63be8886874904e5ab2489411a | refs/heads/master | 2021-05-16T07:07:19.823953 | 2020-02-17T03:00:09 | 2020-02-17T03:00:09 | 103,690,780 | 6 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # ------------------------------
# 467. Unique Substrings in Wraparound String
#
# Description:
# Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz",
# so s will look like this: "...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....".
# Now we have another string p.... | UTF-8 | Python | false | false | 2,661 | py | 540 | 467.py | 537 | 0.6118 | 0.59752 | 0 | 74 | 34.972973 | 126 |
MuteMeteor/PythonLearning | 9,345,848,841,926 | 6e2aa4597029e25178e027a196b4ae377c999f78 | d6e2322a19508ad9f172fd09dd3ce59babe53da3 | /01 Python3/Jan-kenPunch.py | badac2e441aa382b0979c4e8e8577c984a16c919 | [
"MIT"
] | permissive | https://github.com/MuteMeteor/PythonLearning | a14034af0abef9923279e0cee511c94c021b738e | 9400b119e16be262a7fe61250f3f2f5946018607 | refs/heads/master | 2021-05-13T20:41:21.409910 | 2018-01-23T10:23:44 | 2018-01-23T10:23:44 | 116,915,226 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
#1. 提示并获取用户的输入
player = int(input("请输入 0剪刀 1石头 2布:"))
#2. 让电脑出一个
computer = random.randint(0,2)
#2. 判断用户的输入,然后显示对应的结果
#if 玩家获胜的条件:
if (player==0 and computer==2) or (player==1 and computer==0) or (player==2 and computer==1):
print("You win.")
#elif 玩家平局的条件:
elif player==computer:
print("Draw.")... | UTF-8 | Python | false | false | 459 | py | 6 | Jan-kenPunch.py | 6 | 0.660969 | 0.621083 | 0 | 17 | 19.588235 | 93 |
karthikpappu/pyc_source | 13,314,398,637,683 | 9574f54f0c17c00637358b03d0776301af09fbf7 | 91fa095f423a3bf47eba7178a355aab3ca22cf7f | /pycfiles/ClueBin-0.2.3-py2.5/pastebin.py | 94bc01dd98b9d072a123df3986778ccb0c170a0a | [] | no_license | https://github.com/karthikpappu/pyc_source | 0ff4d03e6d7f88c1aca7263cc294d3fa17145c9f | 739e7e73180f2c3da5fd25bd1304a3fecfff8d6e | refs/heads/master | 2023-02-04T11:27:19.098827 | 2020-12-27T04:51:17 | 2020-12-27T04:51:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 2.5 (62131)
# Decompiled from: Python 3.6.9 (default, Apr 18 2020, 01:56:04)
# [GCC 8.4.0]
# Embedded file name: build/bdist.linux-i686/egg/cluebin/pastebin.py
# Compiled at: 2008-06-27 12:04:19
import webob
from StringIO import StringIO
import pygments
from pygments import... | UTF-8 | Python | false | false | 9,398 | py | 114,545 | pastebin.py | 111,506 | 0.561077 | 0.549159 | 0 | 184 | 50.081522 | 931 |
yang5426/pythonCrawler | 15,539,191,689,676 | f776b69610fcb1073787fb9382a944ce2a7c3c75 | b8df4370781b091efff72134af86914d1a0757dc | /pthonCrawler/MongoDBSave.py | 76391909376e8fa5435f370d2ba8492b36f2d46f | [] | no_license | https://github.com/yang5426/pythonCrawler | da87e78f48f7bcd413573571ab975a35def8cb48 | 73030b59bb97c742e5b5026d7b8787cffd7e2a57 | refs/heads/master | 2022-12-13T05:56:13.811053 | 2020-09-10T09:34:40 | 2020-09-10T09:34:40 | 292,805,667 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pymongo
client = pymongo.MongoClient(host='localhost', port=27017)
db = client.test
# db = client['test']
collection = db.students
# collection = db['students']
student = {
'id': '20170101',
'name': 'Jordan',
'age': 20,
'gender': 'male'
}
# result = collection.insert(student)
# print(result)
... | UTF-8 | Python | false | false | 3,366 | py | 30 | MongoDBSave.py | 13 | 0.66343 | 0.62589 | 0 | 143 | 20.608392 | 105 |
WorkRock/python_lab | 9,414,568,345,312 | 12bfd9f88cfa58fc86b2bd0439145579e5d8edda | 2862a0f5a5e344650300365a6c9f1e2c9bd5a0d4 | /HomeWork/15/lab5_12.py | 8596f4cfd32012eab5edf0420b52f7d75c44ad97 | [] | no_license | https://github.com/WorkRock/python_lab | 8da4e377eb1c0a2302f30154acaf9e4400c34863 | 01c82b050addd4261e1aaace3b19ee1e9307f27d | refs/heads/master | 2021-09-01T23:50:12.381411 | 2017-12-29T08:01:31 | 2017-12-29T08:01:31 | 109,681,471 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
주제 :
01. intSet 클래스는 정수들의 집합이다. 정수들을 관리하는 리스트 selfvals를 애트리뷰트로 가진다
02. 새로운 정수 e를 추가하는 insert 메소드 이미 있다면 추가하지 않음.
03. e가 정수집합에 포함되어 있는지 확인하는 member메소드인 involve(True, False 반환)
04. e를 제거하는 remove메소드. 단, e가 해당 집합에 없다면 '적당한 오류 메세지 출력'
05. 집합 형식의 문자열로 변환시켜주는 __str__메소드. 단, 정수들은 정렬되어 반환되어야 한다.
06. intSet을 저장하는 변수 s를 정의
0... | UTF-8 | Python | false | false | 1,741 | py | 44 | lab5_12.py | 41 | 0.573705 | 0.528287 | 0 | 56 | 21.428571 | 61 |
sjy428034591/python | 7,249,904,826,954 | 9138b1d63c751b60769680fec37a2cfcc87de4a9 | 03bda622ab7bcc736ff71e829b32895cb33cf4df | /call_satr.py | e75fb5f2491bcddc025a9fb631140a7d321e6e7e | [] | no_license | https://github.com/sjy428034591/python | a0aaab81cf3048640dbb8c2fb8fa51ed0a60fbb0 | 49bbff00cffb4bc355c2eaab0c2af9b2758f14d8 | refs/heads/master | 2020-05-20T05:21:50.231016 | 2019-05-09T13:16:27 | 2019-05-09T13:16:27 | 185,403,005 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import star
print(star.hi)
star.pstar()
star.pstar(30)
| UTF-8 | Python | false | false | 56 | py | 37 | call_satr.py | 37 | 0.732143 | 0.696429 | 0 | 5 | 10.2 | 14 |
KL35Ronaldo/MegaUploaderbot | 4,312,147,178,123 | a7aa4441f72a67df218cec035cd0020b56ccd062 | b2c44782b33a063bdb5066e92a924b596e5215d8 | /helper/downloader/tgDL.py | 0ceded81ff45c6c009ee359a9f605ff7e483b5d3 | [
"Apache-2.0"
] | permissive | https://github.com/KL35Ronaldo/MegaUploaderbot | 1e414ea93d2d5e801ac25eceaefd2fcf535b3577 | ddd58980ee568f696d226b52750778ca138416e3 | refs/heads/master | 2023-09-02T17:19:52.795920 | 2021-11-19T16:41:56 | 2021-11-19T16:41:56 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # !/usr/bin/env python3
"""Importing"""
from pyrogram.errors import exceptions
# Importing Required developer defined data
from helper.downloader.downloadingData import *
class TgDown:
def __init__(self, bot, msg, process_msg, Downloadfolder):
self.msg = msg
self.bot = bot
self.process... | UTF-8 | Python | false | false | 2,200 | py | 22 | tgDL.py | 19 | 0.579212 | 0.561813 | 0 | 58 | 36.637931 | 268 |
xiaopp123/machine-learning | 13,005,160,977,517 | aee412cfba456121e3cf926efd33517065d33ec9 | c1b62fef790878d3e4f917bcc9f6ff56c6f639bf | /PCA/pca.py | d3d70599cf703fc2fc25abe32ea41d992a86bb77 | [] | no_license | https://github.com/xiaopp123/machine-learning | 86a11af2919985b7a8d6fd75f79fc99a611e0915 | 0e27972d48837b294953e18b1e6bfd88bdb03575 | refs/heads/master | 2021-09-14T00:04:24.254311 | 2018-05-06T10:43:17 | 2018-05-06T10:43:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
#import numpy as np
#
#X = [[2, 0, -1.4],
# [2.2, 0.2, -1.5],
# [2.4, 0.1, -1],
# [1.9, 0, -1.2]]
#
##print (np.mean(X, axis=0))
##print (np.cov(np.array(X).T))
#
#w, v = np.linalg.eig(np.array([[1, -2],
# [2, -3]]))
##print('特征值:{}\n特征向量:{}'.format(w, ... | UTF-8 | Python | false | false | 1,400 | py | 13 | pca.py | 12 | 0.512301 | 0.457308 | 0 | 59 | 22.423729 | 64 |
dherna/Development-Tools | 13,348,758,386,320 | 40659acc79648074b983f7bee13d71867a9e047b | 3554b165fd042d12a84aa3c9c78b582df71f1f80 | /ejercicio1.py | 46d4968f3ff26bbf7f7b2e407e95ca248354975b | [] | no_license | https://github.com/dherna/Development-Tools | eb70ae9a7714c4b9d7a55d9760d0736ae89056a8 | 4bd99deb7abdb99262ad576cca449c5a5a159319 | refs/heads/master | 2021-01-19T14:09:30.879241 | 2012-05-02T22:03:39 | 2012-05-02T22:03:39 | 2,400,493 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
try:
fichero = file('/etc/passwd','r')
except IOError:
print "Esto no es un sistama Linux"
else:
while True:
linea = fichero.readline()
if not linea: break
dato = linea.split(":")
print dato[0]+" --> "+dato[6]
print "fin del ejercicio1"
| UTF-8 | Python | false | false | 299 | py | 9 | ejercicio1.py | 7 | 0.591973 | 0.58194 | 0 | 13 | 21.923077 | 43 |
deepfunc/ita | 16,647,293,255,655 | c8732e96ba58664607aae751617e36d93b08125a | 98fc79b9e67cf896b6ee6fe766e560e4a7f08c2b | /search/randomized_select.py | 43f1f0f74b473ee3820bb2bcc70b1281ca63b2ed | [] | no_license | https://github.com/deepfunc/ita | d9bcaa20717bc43edc6870ab3def378cb899635b | ea25e196ee61118c3aba9ff23323ac1da54296ed | refs/heads/master | 2020-07-23T19:50:10.115603 | 2020-01-14T09:58:48 | 2020-01-14T09:58:48 | 207,688,260 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sort.quick_sort import QuickSort
class RandomizedSelect(object):
"""返回序列的第 i 小元素
"""
def __init__(self, list_):
if not isinstance(list_, list):
raise Exception('list_ must be a list!')
self._list = list_
def select(self, i):
a = self._list
if i <= 0:
... | UTF-8 | Python | false | false | 949 | py | 36 | randomized_select.py | 36 | 0.518797 | 0.510204 | 0 | 34 | 26.382353 | 73 |
dana6691/deep-learning | 283,467,878,372 | befa7d6c9a031b2918d6e66b1865070e0aea4d8d | 655159b76898d468a009163f5a894e343c40ffad | /Basic.py | 3f30f7b18cd781b0d796eb7a35dcce2fe9605d0c | [] | no_license | https://github.com/dana6691/deep-learning | adc5f10f3b6008f550997727b18f7acec1c3610d | 91a1c6d03f80742f0ad979432fde0dac60230390 | refs/heads/master | 2020-09-12T17:42:20.947460 | 2019-11-18T20:50:55 | 2019-11-18T20:50:55 | 222,498,796 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
import numpy as np
def basic_sigmoid(z):
### START CODE HERE ### (≈ 1 line of code)
s = 1/(1+np.exp(-z))
### END CODE HERE ###
return s
print(basic_sigmoid(3))
# GRADED FUNCTION: sigmoid_derivative
def sigmoid_derivative(x):
### START CODE HERE ### (≈ 2 lines of code)
... | UTF-8 | Python | false | false | 1,364 | py | 1 | Basic.py | 1 | 0.559647 | 0.423417 | 0 | 61 | 21.262295 | 112 |
asnogordo/eth2.tax | 17,540,646,456,673 | 05134b76f6a073101bf9e9f40e4027b3e9e06a61 | 7665a4bd77679fc33ad30c1786c4795910df0270 | /src/indexer/balances.py | 85442fd188be5c68fc919516ecd5209f35413823 | [] | no_license | https://github.com/asnogordo/eth2.tax | 7705dbeeeca1fedd5f78d3c4a959b43f7c137272 | 2e24b6193b413d152d9252a115c550dd7fa78aae | refs/heads/main | 2023-05-09T20:34:52.339376 | 2021-06-05T11:43:59 | 2021-06-05T11:52:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import datetime
from contextlib import contextmanager
import asyncio
import pytz
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from tqdm import tqdm
from prometheus_client import start_http_server, Gauge
from shared.setup_logging import setup_logging
from shared.config import config
from pro... | UTF-8 | Python | false | false | 5,102 | py | 13 | balances.py | 11 | 0.610937 | 0.604665 | 0 | 161 | 30.689441 | 112 |
Royal-Devendra01/Manager | 3,358,664,448,715 | ae0dea7a8f93501f244c158d5605f07ec45f4711 | f034a29ce5748fdd3cf21cbdd968c3464205f5a5 | /Manager/modules/rules.py | 563b4fd170d952c461ff15e3019d76d33a53efbd | [
"MIT"
] | permissive | https://github.com/Royal-Devendra01/Manager | b20fad5226293faec2bcf13ebfe14a4d4e6ce088 | 0cc3e585cd79f25c0af77946074c869599def128 | refs/heads/master | 2023-04-08T07:37:07.361563 | 2021-04-13T18:22:07 | 2021-04-13T18:22:07 | 339,805,559 | 0 | 1 | MIT | true | 2021-04-13T08:59:59 | 2021-02-17T17:40:26 | 2021-04-13T07:50:02 | 2021-04-13T08:59:59 | 281 | 0 | 1 | 0 | Python | false | false | from typing import Optional
from telegram import Message, Update, Bot, User
from telegram import ParseMode, InlineKeyboardMarkup, InlineKeyboardButton
from telegram.error import BadRequest
from telegram.ext import CommandHandler, run_async, Filters
from telegram.utils.helpers import escape_markdown
import Manager.mod... | UTF-8 | Python | false | false | 4,077 | py | 72 | rules.py | 67 | 0.647261 | 0.646524 | 0 | 111 | 35.675676 | 118 |
zhenxinlei/StockDataUtil | 19,043,885,010,887 | 71c3f753e4c476085577ec8574458930b14ea1e1 | 30e0d9e4d25e1420aecec42d9b1f53e2b80297a4 | /com/datautil/RankingEng/StockRankingEng.py | 69899bb6ad289f4268b95c8385df5375c73ef3f1 | [] | no_license | https://github.com/zhenxinlei/StockDataUtil | c173363796d283a1476b3bdf51481805cfdc74a7 | 03b81b0f5b773653d7153a558c11109d90811dcf | refs/heads/master | 2020-04-22T05:48:40.937534 | 2019-09-14T09:02:41 | 2019-09-14T09:02:41 | 25,719,488 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'Zhenxin Lei'
import numpy as np
import pandas
import com.datautil.RiskCal.EqCVarCalImp as cVarCal
def rankReOverCvar(reMx, cvar ):
'''
:param reMx:
:param cvar:
:return:
ranking result of stocks( column index)
'''
a=np.mean(reMx,0)/cvar
array = np.array(a[0])
... | UTF-8 | Python | false | false | 1,813 | py | 29 | StockRankingEng.py | 16 | 0.570877 | 0.558742 | 0 | 72 | 24.125 | 72 |
GuazP/Python | 16,612,933,514,693 | fd1a912a39dc9243e75b062ed6a994141bd284b8 | d2ffcebe0fe74f3b59661a7c51fe77f9c62598d2 | /Alghoritms/Sort_by_unregular_value/sort_cards.py | d87990743486e07b17912987e2cd94cbeab0f77d | [] | no_license | https://github.com/GuazP/Python | f7cecdb4aab1f852d04bbac3dad09f0407353f21 | 41e0a7ce8b0840fb27c3c892e5ff294816424082 | refs/heads/master | 2020-06-10T17:46:36.757444 | 2019-06-26T00:52:48 | 2019-06-26T00:52:48 | 193,697,149 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
def main():
test = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
test2 = ['6', '8', '10', 'Q', 'A', '3', '5', '7', '9', 'J', 'K', '2', '4']
test3 = ['10', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'J', 'K', 'Q']
print (sortuj(test))
print (sortuj(test2))
print (sortuj(te... | UTF-8 | Python | false | false | 1,085 | py | 60 | sort_cards.py | 58 | 0.38894 | 0.290323 | 0 | 26 | 40.692308 | 134 |
devdonghyun/Algorithm_Class | 16,432,544,906,416 | b3a9bc0128c5bc096e940c32664aee24b6e085ad | 662db11f5f7c698488d44e6c58567446167afb63 | /newLeftAlign.py | dfb705e5d08f367eb0ce6b5f5028ef6a749ef068 | [] | no_license | https://github.com/devdonghyun/Algorithm_Class | 2b6ed459033b05a8ca0e6179d3aee4c8efcd847e | a08b1f5b12bdc0e0724e33c183ee93d73a3d926b | refs/heads/main | 2023-02-26T11:53:30.659999 | 2021-02-08T14:59:25 | 2021-02-08T14:59:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | W = int(input())
words = input().split()
# code below
length = len(words)
DP = [[0] * length for i in range(length)]
cost = [0 for i in range(length)]
for i in range(length):
if i == length-1:
break
DP[i][i] = W - len(words[i])
for j in range(i+1, length):
DP[i][j] = DP[i][j-1] - len(words... | UTF-8 | Python | false | false | 1,346 | py | 23 | newLeftAlign.py | 23 | 0.372214 | 0.350669 | 0 | 54 | 23.925926 | 49 |
DatTobbes/Analyse-Retail-Data | 18,915,035,995,693 | 5c70c622f225abbb445b63354d626cfd45e695a5 | dbc88423d3ecc11fc21f408bb9e17db51deca0e7 | /data_aggregation/read_price_data.py | 5d84700ea3990fd706a34d1752c902be43bde6f2 | [] | no_license | https://github.com/DatTobbes/Analyse-Retail-Data | 459a8e1da09fcd5c37f863a251c9bb330ae8347c | 0225f789c896f61705e87a2d3f0851aad37c02d4 | refs/heads/master | 2020-04-02T02:41:20.758096 | 2018-11-13T09:10:05 | 2018-11-13T09:10:05 | 153,922,246 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import numpy as np
from bokeh.plotting import figure, output_file, show
class HistoricalPriceDataReader:
def __init__(self, path='../data/price_data_reader.csv'):
self.df = pd.read_csv(path, sep='\t')
def get_historical_data_for_device(self, item="Apple iPhone 7 Plus (32GB)"):
... | UTF-8 | Python | false | false | 1,432 | py | 15 | read_price_data.py | 8 | 0.584497 | 0.567737 | 0 | 43 | 32.325581 | 105 |
Yaeeun-Kang/Djangotest | 2,585,570,350,073 | d2b891c7fe1e3edc0a3282857e6395be293046bb | d103018a6e612c5342d789e911e399d2a468244c | /Wordcount/wordcount_app/views.py | a32771815c02d4ac3f6145db5071212f0a8df304 | [] | no_license | https://github.com/Yaeeun-Kang/Djangotest | 05e49e3c2c715359689a68bb12246de8618b4c3a | 8568cdd64820829165ab55820f75815c5556c8dc | refs/heads/master | 2022-11-20T22:09:08.062013 | 2020-07-26T11:29:15 | 2020-07-26T11:29:15 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render
# Create your views here.
def home(request):
return render(request, 'home.html')
def test(request):
return render(request, 'test.html')
def test1(request):
return render(request, 'test1.html')
def test2(request):
return render(request, 'test2.html') | UTF-8 | Python | false | false | 306 | py | 5 | views.py | 1 | 0.712418 | 0.699346 | 0 | 15 | 19.466667 | 40 |
rodalbert/Flask | 11,149,735,135,712 | 401837c44fa03d55ea59891e1248ac85fa28ba7e | 239c4d66d4e57c075526cc2f81cbbb025d7d2cf5 | /hello_world.py | 076cb35beac1e820991852aff3cfa6abc52e22ba | [] | no_license | https://github.com/rodalbert/Flask | a7985156010b7b79574e9435d4b017988dbbc363 | 7746d08a490ee41e6567a404bc2b79ff4d6322d4 | refs/heads/main | 2023-02-05T22:56:53.052753 | 2020-12-23T19:47:39 | 2020-12-23T19:47:39 | 323,988,294 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
"""Our first Flask application."""
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
"""Our front page for our Flask app."""
return "Hello world!"
if (__name__ == "__main__"):
app.run(debug=True)
| UTF-8 | Python | false | false | 278 | py | 2 | hello_world.py | 1 | 0.607914 | 0.604317 | 0 | 15 | 17.533333 | 43 |
gkgg123/TIL | 19,559,281,071,408 | 8aedb29daa78775966391312a2504297068cc087 | cb97973dc79a58f8b785cd94f7c129c9492694a1 | /Python/csv_ex/daum_read.py | fea1c25557c6359dbba6e3b570f18dd9b3884994 | [] | no_license | https://github.com/gkgg123/TIL | 6aa25cd2e9390bded3f842ce1e6843a9081cf1b0 | cbbd55190893550cd40920fe1cd732b4da1830a0 | refs/heads/master | 2023-07-23T23:08:22.542224 | 2022-07-27T01:02:42 | 2022-07-27T01:02:42 | 235,233,061 | 0 | 0 | null | false | 2023-07-18T23:31:17 | 2020-01-21T01:38:15 | 2022-07-24T12:40:30 | 2023-07-18T23:31:17 | 54,245 | 0 | 0 | 6 | Python | false | false | import csv
with open('ranking.csv','r',encoding='utf-8',newline='') as csvfile:
csv_reader=csv.DictReader(csvfile)
for row in csv_reader:
print(row['rank'],row['value']) | UTF-8 | Python | false | false | 186 | py | 299 | daum_read.py | 240 | 0.655914 | 0.650538 | 0 | 6 | 30.166667 | 68 |
mike-fang/led_micro | 13,013,750,926,765 | d1a4d052c1f78961414f9f2c3d2986a9cfe3514c | caaf7723580684886559dedba9a0cfa19036243d | /capture_msi_spin.py | de962b7fe1430d85a4bc2144adbb7691576d281a | [] | no_license | https://github.com/mike-fang/led_micro | 27214b5d9e67abd3dbc85c2962be13bb82c83723 | c08105b1cd84836fed2dea11074e1d47d13f099a | refs/heads/master | 2022-11-28T10:46:09.647242 | 2020-08-02T19:44:22 | 2020-08-02T19:44:22 | 275,946,959 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from ft245r import relay_ft245r
from ft245r.relay_ft245r import FT245R
import sys
from time import sleep
import numpy as np
from spin_spin import Stepper
from elp_usb_cam import ELP_Camera
import matplotlib.pylab as plt
from msi_proc import *
import cv2
import os
from led_controller import LED_Controller
def init_rb()... | UTF-8 | Python | false | false | 3,024 | py | 27 | capture_msi_spin.py | 24 | 0.553571 | 0.525463 | 0 | 98 | 29.836735 | 99 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.