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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zhaopingsun/RadarGUI | 10,943,576,716,043 | 42f0f788efd42236758e6a1a2946d1d92bcee6c9 | 06e877c541be92a0ecaeb1ece7fd8556ad99a664 | /PyRadar.py | da329631a234e47e5d424fca80add1f627839d29 | [] | no_license | https://github.com/zhaopingsun/RadarGUI | ded352e4e000dd0c3d3e2fdaac48b3f4221c5aba | 06fbf90aa89f3ed8325337248268859b76634973 | refs/heads/master | 2020-04-08T11:17:47.778466 | 2018-08-01T22:56:56 | 2018-08-01T22:56:56 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from mayavi import mlab
class Radar:
def __init__(self, path, name):
self.AbsolutePath = path + name
file = open(self.AbsolutePath, 'rb')
file.seek(0)
self.RawData = np.array([int(i) for i in file.read()])
self.Name = name... | UTF-8 | Python | false | false | 17,434 | py | 4 | PyRadar.py | 2 | 0.50957 | 0.448791 | 0 | 359 | 45.420613 | 120 |
Faiyaz42/Resume-Projects | 7,799,660,656,349 | af0031013a45d2e26b944075ed9f751ef90151d1 | f07914af8d8abef96f851691477cd242db495434 | /Hangman/WordGuess.py | 0e2401f6e9a88534d4913dab5957132b70bc2324 | [
"Apache-2.0"
] | permissive | https://github.com/Faiyaz42/Resume-Projects | a126e9cd8e1c9859689426076dd6bae21f54c846 | 9d6e5597aba6672ad7bd20d02e4b7cf7d4654fcd | refs/heads/main | 2023-03-28T17:38:37.819818 | 2021-03-30T18:54:16 | 2021-03-30T18:54:16 | 330,059,753 | 1 | 1 | null | false | 2021-02-13T23:29:28 | 2021-01-16T01:27:21 | 2021-02-07T17:56:35 | 2021-02-13T23:29:28 | 38,896 | 0 | 0 | 0 | Python | false | false | import random
from SecretWord import SecretWord
class WordGuess:
def __init__(self, wordDic):
self.words_dict = wordDic
self.guess_words = [] #constructor,initiation
self.guesses = 0
self.random_word = ''
self.current_guess = ''
def play(self... | UTF-8 | Python | false | false | 5,378 | py | 42 | WordGuess.py | 13 | 0.477501 | 0.465787 | 0 | 91 | 57.967033 | 165 |
kingbar1990/labs | 7,533,372,671,335 | 3d5177889b1d9e13f27a17e566775ede24106596 | 3bd7c46a7bb2da9bfaf4a7dc3e34591e54211f8d | /Lab2.py | 55b5377421becfa51aeaa42269bbd6a7c1673779 | [] | no_license | https://github.com/kingbar1990/labs | a5d997aa06c59a608e1913990abf1c87b70311b8 | c1b4a55b76fbe1d927fd3ac7f779a5cb8e4ac681 | refs/heads/master | 2020-04-06T18:43:15.427704 | 2018-10-24T16:30:59 | 2018-10-24T16:30:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from math import exp, cos, sin, pi
import random
import time
import sys
n = int(raw_input('Enter n(10000): ') or 10000)
mu = float(raw_input('Enter mu(5): ') or 5)
k = float(raw_input('Enter k(5): ') or 5)
m = 50
maximum = 0
def fx(x):
return (1 - x) * x
def fy(y, mu):
return exp(-mu * y)
def fz(z, k):
... | UTF-8 | Python | false | false | 3,501 | py | 4 | Lab2.py | 3 | 0.502142 | 0.484719 | 0 | 126 | 26.785714 | 104 |
ralf-meyer/RLSVRD | 19,353,122,663,798 | 66e48d9b66db49e44b7bbc54184956f1bdac321e | 6f81cc8e67475b23b5b343dc14c55b6227ee49c8 | /__init__.py | 68a9d0e4d6a382c68824b2ef371f961a8601c04d | [] | no_license | https://github.com/ralf-meyer/RLSVRD | 232778c185c3e460f81f5c0c7f97512b5ef19026 | 10ce8567ec521c71d8ab4dcdc5685ef1840b6c4d | refs/heads/master | 2021-04-27T17:56:12.614967 | 2018-05-15T14:23:47 | 2018-05-15T14:23:47 | 122,330,560 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from RLSVRD import RLSVRD
from IRWLS_SVR import IRWLS_SVR
| UTF-8 | Python | false | false | 58 | py | 6 | __init__.py | 4 | 0.827586 | 0.827586 | 0 | 2 | 28 | 31 |
LouPlus/jobplus3-12 | 17,257,178,633,714 | b69c31159bb3e39526506030e8808f92138a6890 | 556b48bb805a1be3609c844fc4a251b83a893817 | /app/config.py | 29fc0fd77ff5e0babf04fd2b018879bf9b35a500 | [] | no_license | https://github.com/LouPlus/jobplus3-12 | 3a48fea7001dda32f2756113b51215c1e14f9a9f | bce7eec354187d0ce69621d5cb16cd8a3012e00d | refs/heads/master | 2021-05-13T20:43:28.162737 | 2018-01-30T16:20:57 | 2018-01-30T16:20:57 | 116,917,555 | 0 | 3 | null | false | 2018-01-30T16:20:58 | 2018-01-10T06:29:39 | 2018-01-15T14:26:06 | 2018-01-30T16:20:58 | 28 | 0 | 3 | 2 | Python | false | null | # 域名 和 端口 可根据个人环境改变
DOMAIN_NAME = 'root@localhost'
PORT = '3306'
class BaseConfig(object):
SECRET_KEY = 'wubba lubba dub dub'
INDEX_PER_PAGE = 9
class DevelopementConfig(BaseConfig):
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://' + DOMAIN_NAME + ':' + PORT + '/jobplus?charset=utf8'
class Production... | UTF-8 | Python | false | false | 542 | py | 13 | config.py | 8 | 0.723735 | 0.712062 | 0 | 28 | 17.392857 | 98 |
seokzin/Algorithm_Python | 5,703,716,607,205 | 84b0a76f0a736c6b8ad362db4c4883575495f81a | d17522373f7c82d7f16807a34aa90369dca85621 | /Code/SWEA/1966-숫자를 정렬하자.py | 814e0e7b0bbf90da78eec681270da22c742d7358 | [] | no_license | https://github.com/seokzin/Algorithm_Python | 30f15d120a73132ebfc0d55629eab6db2e24eaec | 8a6dbe19dd3613fa2e5db544db69183053dc1f5b | refs/heads/master | 2022-11-15T00:18:11.063138 | 2021-12-27T16:52:30 | 2021-12-27T16:56:20 | 276,327,838 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def selection_sort(s):
if s:
x = min(s)
s.remove(x)
return [x] + selection_sort(s)
else:
return []
for tc in range(1, int(input())+1):
n = int(input())
arr = list(map(int, input().split()))
print(f'#{tc}', *selection_sort(arr))
# 재귀적 선택정렬 직접 구현해봄 | UTF-8 | Python | false | false | 328 | py | 356 | 1966-숫자를 정렬하자.py | 355 | 0.513245 | 0.506623 | 0 | 16 | 17.9375 | 41 |
FabienCharmet/ImpactEval | 807,453,879,054 | 18ab0b5080dff7c527a56a46afc93be683f44700 | ab551cad61f922203918367b681afa3624ac4af5 | /ImpactEval.py | 84c1e818c1ee954b69256557df07576a87847cab | [] | no_license | https://github.com/FabienCharmet/ImpactEval | 115a1a7f6b845e801be66e72d69947be8c020f73 | e976c1acd2bcf4159f9a9dd667f38b39745174f6 | refs/heads/master | 2023-01-15T18:35:46.226873 | 2020-11-21T08:46:13 | 2020-11-21T08:46:13 | 297,141,005 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Éditeur de Spyder
"""
import networkx as nx
import matplotlib.pyplot as plt
import numpy as np
import itertools
import random
G=nx.DiGraph()
Gfunc=nx.DiGraph()
"""
IMPORT FUNCTION OF THE RESOURCE GRAPH
"""
# Rarray = [[0,1,0.1],[1,0,0.7],[0,2,0.4],[2,0,0.1],[0,3,0.2],[3,0,0.1],
# ... | UTF-8 | Python | false | false | 23,316 | py | 1 | ImpactEval.py | 1 | 0.437916 | 0.423118 | 0 | 566 | 40.190813 | 148 |
Mumbaikar007/Code | 12,816,182,420,545 | 09aedb3c3130d28e63b4f9ef5bdc447f343af387 | dee4f176db476b621a208e1e9c8562740228c84c | /CoursesCodes/PythonGUI/basicsOfTkinter.py | dbf7f5b90266d9e9e37ed8ca7ccad4cb5d641a11 | [] | no_license | https://github.com/Mumbaikar007/Code | 7a62f2bcb9e01c06d3d83370f78298a76f94ee87 | b55ee260f3e4e33fb59ba6ed35c2ee29443bbc11 | refs/heads/master | 2021-09-27T05:31:00.973615 | 2018-11-06T10:42:31 | 2018-11-06T10:42:31 | 104,623,021 | 6 | 8 | null | false | 2018-10-31T15:55:05 | 2017-09-24T06:10:27 | 2018-10-30T17:15:53 | 2018-10-31T15:41:01 | 8,054 | 4 | 7 | 0 | Makefile | false | null |
from tkinter import *
a = Tk()
a.title("My First Window")
a.mainloop()
| UTF-8 | Python | false | false | 75 | py | 206 | basicsOfTkinter.py | 174 | 0.64 | 0.64 | 0 | 7 | 9.571429 | 26 |
rahulmahato46/leetcode-june20 | 2,645,699,899,507 | 9a8b242b4651e10e6b319f7e6e36eb675d1fab27 | f67447f374c4a4e8889e02b4614eba0e05ea9544 | /queue-construction-by-height-part2.py | 3273b5a955bc61f7d630871a88f2252550df9c72 | [] | no_license | https://github.com/rahulmahato46/leetcode-june20 | 6519cd55ae12f8e699797588a0652da3c747e5ab | 2f378037e5c234cf4a806082d6192485338cd97c | refs/heads/master | 2022-10-02T16:31:30.334070 | 2020-06-06T14:34:54 | 2020-06-06T14:34:54 | 268,527,999 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def reconstructQueue(self, people: List[List[int]]) -> List[List[int]]:
new_arr = []
people = sorted(people, key= lambda x:(-x[0],x[1]))
for var in people:
new_arr.insert(var[1],var)
return new_arr | UTF-8 | Python | false | false | 261 | py | 3 | queue-construction-by-height-part2.py | 3 | 0.563218 | 0.551724 | 0 | 7 | 36.428571 | 75 |
lanzhou2012/Object-detection | 7,060,926,280,841 | e174df36f21abe5971bcd0d7d8d4e36341e6745e | 9fd4467dcd715b6b33c4e0cb24656c82a592ac1d | /main/my_method/validation.py | 201aaf3d5fbfd60f3bdbb6d10a388f0bbf57a03e | [] | no_license | https://github.com/lanzhou2012/Object-detection | 911711c17070c2a6d677099bc4796bb2446b7aa4 | 11d506051c274484bea31335a1ec5e12569f9719 | refs/heads/master | 2020-03-05T22:59:31.088966 | 2017-03-27T07:15:36 | 2017-03-27T07:15:36 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
import keras
from keras.applications.imagenet_utils import preprocess_input
from keras.backend.tensorflow_backend import set_session
from keras.models import Model
from keras.preprocessing import image
import matplotlib.pyplot as plt
import numpy as np
from scipy.misc import imread
import tensorflow as tf
im... | UTF-8 | Python | false | false | 5,234 | py | 3 | validation.py | 1 | 0.588269 | 0.570501 | 0 | 151 | 33.662252 | 114 |
lewbenj/qbb2018-answers | 19,292,993,120,608 | 9e6cd6aac38cebf5e32f2bb8fc3ef76cd800561e | 7809ad3224f25b41b5be2c3bf572eb69701b1a17 | /week8-lab/motif.py | a4460f6586853a93655691ef88474dac6f7753d2 | [] | no_license | https://github.com/lewbenj/qbb2018-answers | 3346ca5d2785c987d8fbba0740ace224d7a2be39 | e845c928b22450cd8ed26c211420bb293e7043b6 | refs/heads/master | 2020-03-27T09:06:04.647369 | 2018-12-24T21:40:29 | 2018-12-24T21:40:29 | 146,313,771 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import sys
import matplotlib.pyplot as plt
#Usage: ./motif.py ER4_peaks.narrowPeak.bed
Bed = open(sys.argv[1])
Percentage = []
for count, line in enumerate(Bed):
"Skip the header"
if line.startswith("#"):
continue
else:
fields = line.rstrip("\r\n").split("\t")
#p... | UTF-8 | Python | false | false | 862 | py | 37 | motif.py | 35 | 0.642691 | 0.62181 | 0 | 36 | 22.972222 | 54 |
n-kimberly/Playground_Python | 34,359,763,233 | 9bbb388ecbf25e2d0c4c6ce889878a271e58111a | 6db5887ee3f7236c5ec3f55c32db887a061f8060 | /hb/w1/d4_markov-ffs/n-grams.py | 623b9fdff8cd99d7cc1f5b51e0f68c0a16adc315 | [] | no_license | https://github.com/n-kimberly/Playground_Python | f43851410071f2e5bb3256495d6398e478b358ab | fad99fdb690e0eeb3f2c9141e70bf4a9a33a2aef | refs/heads/master | 2020-03-29T14:14:53.271813 | 2018-10-02T04:39:03 | 2018-10-02T04:39:03 | 141,058,022 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Further Study
Do any of the following:
Replace our dummy file with your own. Pass in this file from the command line, using sys.argv.
The longer the sequence of words to the left of the arrow, the closer it becomes to the original text, as well as valid English, because there are fewer and fewer random successors... | UTF-8 | Python | false | false | 1,978 | py | 241 | n-grams.py | 206 | 0.702935 | 0.697874 | 0 | 58 | 33.068966 | 355 |
foxreymann/Violent-Python-Examples | 9,285,719,335,126 | 7345c6f5a2500994b348de9369dea92b01bf4ced | 6c4824d50ec1d302a37edaafc2abc82b3a7153df | /Chapter-1/iteration.py | f8ddffbc25bac66b25597978b124a074d89ad73c | [] | no_license | https://github.com/foxreymann/Violent-Python-Examples | 223414bd410af54d3987898188c4365ca0682549 | 1f74792f1ec55f91569981c24cf44384ef396518 | refs/heads/master | 2021-08-06T06:25:09.375291 | 2017-11-03T16:53:06 | 2017-11-03T16:53:06 | 109,045,939 | 0 | 0 | null | true | 2017-10-31T19:57:01 | 2017-10-31T19:56:59 | 2017-10-26T22:38:30 | 2012-12-23T19:08:49 | 844 | 0 | 0 | 0 | null | false | null | import socket
def retBanner(ip, port):
try:
socket.setdefaulttimeout(2)
s = socket.socket()
s.connect((ip,port))
banner = s.recv(1024)
return banner.decode().strip('\n')
except:
return
def checkVulns(banner):
if "vsFTPd 3.0.3" in banner:
return "vsFT... | UTF-8 | Python | false | false | 737 | py | 4 | iteration.py | 3 | 0.522388 | 0.483039 | 0 | 30 | 23.566667 | 59 |
nekazino/pythonlab1 | 17,446,157,175,005 | 8345b90b387b177f4554bbaf8886e59a0a6b06db | 9130af7f40de20a5fcf9eecfed747df1e4f84a0d | /src/program.py | b13a9b768647865255b830b0b91c07107032f2e7 | [] | no_license | https://github.com/nekazino/pythonlab1 | 9e222081ecc393e75a117a7bea37d3cac7b896ba | a094fe24d91b9c521bb45a4e77be3b84bf2f5ab3 | refs/heads/master | 2019-04-09T14:50:28.232033 | 2017-05-06T19:00:32 | 2017-05-06T19:00:32 | 89,696,201 | 1 | 0 | null | false | 2017-05-06T19:00:33 | 2017-04-28T10:34:23 | 2017-05-04T20:30:30 | 2017-05-06T19:00:33 | 10 | 0 | 0 | 0 | Python | null | null | '''
program
=======
Provides a kivy.App implementation which create main program window.
'''
import kivy
kivy.require('1.6.0')
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
from kivy.uix.popup import Popup
from kivy.uix.textinpu... | UTF-8 | Python | false | false | 2,129 | py | 10 | program.py | 6 | 0.596524 | 0.583842 | 0 | 65 | 31.753846 | 99 |
motyliak/motor | 6,004,364,311,599 | d1132f6b5bcf618c7a21c68db0911f66fdb1b21e | cae3f975267a5f410daede1394ca8a0558c94b2c | /main.py | 3467eb2f82db0efc9e17f6d2dd58b58caf88887d | [] | no_license | https://github.com/motyliak/motor | c0bfecb4a9e62c7d7e3224686b2b649bd38da3d0 | e64fcbcddcffe26e0aaadde3183b2be2a6cffa03 | refs/heads/master | 2022-11-07T20:37:43.839236 | 2020-06-23T21:23:18 | 2020-06-23T21:23:18 | 273,765,453 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def motor_off():
pins.digital_write_pin(DigitalPin.P0, 0)
basic.show_icon(IconNames.NO)
def on_button_pressed_a():
global remote_control
remote_control = False
motor_on()
strip.rotate(1)
strip.show()
input.on_button_pressed(Button.A, on_button_pressed_a)
def on_button_pressed_b():
glob... | UTF-8 | Python | false | false | 1,034 | py | 2 | main.py | 2 | 0.68472 | 0.669246 | 0 | 41 | 24.219512 | 59 |
flashiam/wodo-backend | 1,348,619,737,609 | e3b8a0fcda0e199e08cbf270bdb3f6cb0fcd67ce | 43c61d5186ffe1e0ca1fba27ac71a860af3f1712 | /wodo/migrations/0016_auto_20201127_0929.py | 68bfb172e738c74a78b0ea858cfdbc49d294012a | [] | no_license | https://github.com/flashiam/wodo-backend | 00e4b7b15dc60458419a86c04c4fff30bb0028a0 | a020f7ab91410a03b921488d990d8013970b862f | refs/heads/master | 2023-06-05T17:12:05.944944 | 2020-12-04T06:49:52 | 2020-12-04T06:49:52 | 383,648,984 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.2 on 2020-11-27 09:29
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wodo', '0015_auto_20201127_0928'),
]
operations = [
migrations.AlterField(
model_name='dutydeni... | UTF-8 | Python | false | false | 1,598 | py | 54 | 0016_auto_20201127_0929.py | 34 | 0.62015 | 0.594493 | 0 | 39 | 39.974359 | 169 |
LsxnH/ATLAS | 10,892,037,068,817 | 32c6ec1b144bde546142b7b664057afcd5892ce6 | 6b83126f9d0507129e732d559c63de21d7e3da6e | /smartScripts/checkEntries.py | 73c9d35c68109200acf9d38408f25b209313ce04 | [] | no_license | https://github.com/LsxnH/ATLAS | 51773ee6496417eae0e211b443d31e3882003581 | b1573bc0f4456c330749570ec7881e3f812615e6 | refs/heads/master | 2020-05-27T13:27:03.574661 | 2019-06-24T07:59:16 | 2019-06-24T07:59:16 | 31,648,326 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import os, fnmatch
import re
import sys
import ROOT
def main():
listOfFiles = os.listdir(sys.argv[1])
pattern = "*.root"
ntotal = 0
for ifile in listOfFiles:
if fnmatch.fnmatch(ifile, pattern):
inputfile = ROOT.TFile(sys.argv[1]+"/"+ifile,"READ")
... | UTF-8 | Python | false | false | 540 | py | 8 | checkEntries.py | 3 | 0.581481 | 0.575926 | 0 | 21 | 24.714286 | 64 |
matibilkis/cartpole-tf2 | 7,662,221,676,487 | 14a043409180d2f101ba192a6231b7a94943cf35 | 1d2650d3e0e295635ed9e82e9decf0b34dc319be | /main.py | 291f73b77e7f3d2367894c87ff6a5dd3109a12e7 | [] | no_license | https://github.com/matibilkis/cartpole-tf2 | 1a62a14ddf2f167ae50f296de967a7a18b236733 | c26457f1a18e4c1f614cec99800124d1506de9f2 | refs/heads/master | 2020-09-03T17:37:46.658348 | 2019-11-04T14:37:17 | 2019-11-04T14:37:17 | 219,523,231 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import gym
import keras
import datetime as dt
import tensorflow as tf
import random
import numpy as np
import math
from tensorflow.keras.layers import Dense
from tqdm import tqdm
from gym import wrappers
STORE_PATH = '/run'
MAX_EPSILON = 1
MIN_EPSILON = 0.01
LAMBDA = 0.0005
GAMMA = 0.95
BATCH_SIZE = 40
TAU = 0.08
RAND... | UTF-8 | Python | false | false | 6,001 | py | 22 | main.py | 9 | 0.575571 | 0.556741 | 0 | 173 | 33.687861 | 201 |
luoluo/TestDataGenerator | 6,270,652,252,250 | 0cb4962eb344d4dbc4498cf7d89dbe83b3960e83 | d56cc09d758149cbaef30e59908df5e509209daf | /exectutor.py | c9f6f1519d925f21845b9856b2d9017e6a0b9a36 | [] | no_license | https://github.com/luoluo/TestDataGenerator | e4a4cd6ba5edca3a639fc681b8d747a365f1a753 | fec7ab70ca9f3b32dd582712c644508cd587b72a | refs/heads/master | 2016-09-06T09:39:04.364948 | 2014-08-01T08:05:30 | 2014-08-01T08:05:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from myConfig import MyConfig
from generator import *
class Exectutor():
def __init__(self):
pass
def run(self):
testDataGenerator = TestDataGenerator()
testDataGenerator.loadDescriptionFromFIle("generate.cfg")
testDataGenerator.generate()
| UTF-8 | Python | false | false | 280 | py | 12 | exectutor.py | 8 | 0.692857 | 0.692857 | 0 | 9 | 30.111111 | 65 |
github/codeql | 13,348,758,363,030 | 89d5197ecbae5dacfee8b96debd685a55a645db0 | 167c6226bc77c5daaedab007dfdad4377f588ef4 | /python/ql/test/library-tests/frameworks/django-orm/testapp/tests.py | 6b1bcb7e83c37e8ff2ddcfad617790a1663589ee | [
"MIT",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-other-copyleft",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown",
"Python-2.0"
] | permissive | https://github.com/github/codeql | 1eebb449a34f774db9e881b52cb8f7a1b1a53612 | d109637e2d7ab3b819812eb960c05cb31d9d2168 | refs/heads/main | 2023-08-20T11:32:39.162059 | 2023-08-18T14:33:32 | 2023-08-18T14:33:32 | 143,040,428 | 5,987 | 1,363 | MIT | false | 2023-09-14T19:36:50 | 2018-07-31T16:35:51 | 2023-09-14T08:53:44 | 2023-09-14T18:02:59 | 281,478 | 6,371 | 1,465 | 964 | CodeQL | false | false | import importlib
import re
import pytest
# Create your tests here.
def discover_save_tests():
mod = importlib.import_module("testapp.orm_tests")
test_names = []
for name in dir(mod):
m = re.match("test_(save.*)_load", name)
if not m:
continue
name = m.group(1)
... | UTF-8 | Python | false | false | 3,504 | py | 27,332 | tests.py | 11,432 | 0.63984 | 0.637557 | 0 | 143 | 23.503497 | 96 |
Parkyunhwan/BaekJoon | 19,524,921,348,316 | 0f6e4aa765ab25c701382bef01c34b3c3c096659 | c3432a248c8a7a43425c0fe1691557c0936ab380 | /21_04/13/1197_최소스패닝트리.py | 2559f831fbdfe6172a7933360822f395f5faebba | [] | no_license | https://github.com/Parkyunhwan/BaekJoon | 13cb3af1f45212d7c418ecc4b927f42615b14a74 | 9a882c568f991c9fed3df45277f091626fcc2c94 | refs/heads/master | 2022-12-24T21:47:47.052967 | 2022-12-20T16:16:59 | 2022-12-20T16:16:59 | 232,264,447 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | V, E = map(int, input().split())
parent = [x for x in range(V + 1)]
def find_parent(parent, x):
if parent[x] != x:
parent[x] = find_parent(parent, parent[x])
return parent[x]
def union(parent, a, b):
a = find_parent(parent, a)
b = find_parent(parent, b)
if a > b:
parent[a] = b
... | UTF-8 | Python | false | false | 627 | py | 425 | 1197_최소스패닝트리.py | 413 | 0.548644 | 0.545455 | 0 | 31 | 19.258065 | 56 |
k6project/scene3d | 19,164,144,076,984 | cef70f8324564892a738a17695a54d7ff1a2d9f5 | af8c31763223f3634ef329ec5725d9f881e4f649 | /python/s3dexport.py | 94e6944a66a7e12dea2d09d4eb938de2c038ad6f | [] | no_license | https://github.com/k6project/scene3d | af2d4236d44bf6b31bfdb82e808b7ed7a29632c5 | f5ac65d8d7004a795879f3e191e9fe8efb9526c9 | refs/heads/master | 2020-03-26T14:42:57.837876 | 2019-03-18T14:17:37 | 2019-03-18T14:17:37 | 145,001,289 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | bl_info = {
"name": "Scene3D binary format",
"category": "Import-Export",
"support": "TESTING"
}
import bpy
import bmesh
import s3dconv
from bpy.props import StringProperty
from bpy_extras.io_utils import ExportHelper
class S3DExport(bpy.types.Operator, ExportHelper):
bl_idname = "export_scene.s3d"
... | UTF-8 | Python | false | false | 1,864 | py | 62 | s3dexport.py | 23 | 0.575644 | 0.56706 | 0 | 54 | 33.518519 | 106 |
MichaelT2828/Unit_1 | 16,372,415,370,225 | 01f57d57569d9134bc8c2dbde33e857efeaac3e3 | c70e91646853a5e6732fcb56f5238cd5da840cee | /least common multiple.py | e224d673a4a8ea7f05b82b38af599a71be11239a | [] | no_license | https://github.com/MichaelT2828/Unit_1 | 48bbdcc7b80e53372bbb0ea7350a2c37c87ea564 | d47e06972b4a2b43306be8f1fa85d1af76d1afaa | refs/heads/main | 2023-09-05T22:38:25.696152 | 2021-10-28T05:44:51 | 2021-10-28T05:44:51 | 398,943,742 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def lcm(a, b, c):
#find biggest value
biggest = 0
if a > b and a > c:
biggest = a
elif b > a and b > c:
biggest = b
elif c > a and c > a:
biggest = c
while(True):
if (biggest % a == 0) and (biggest % b == 0) and (biggest % c == 0):
lcm = biggest
... | UTF-8 | Python | false | false | 395 | py | 14 | least common multiple.py | 5 | 0.455696 | 0.432911 | 0 | 18 | 20.944444 | 76 |
google-research/language | 15,453,292,334,085 | 8d2de083ec705cba9d43eea3398d9d3abcceff5b | ab40571d5051ad53c0f205fa797ba36eac516d06 | /language/bert_extraction/steal_bert_classifier/data_generation/build_aux_membership.py | 7b7c0907a3afc445d961d81595eda52df4c44c9f | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | https://github.com/google-research/language | e941b1a92ab46d40d8d03bb0c314905cb6902ce2 | ac9447064195e06de48cc91ff642f7fffa28ffe8 | refs/heads/master | 2023-08-24T23:10:13.207294 | 2023-05-25T20:47:18 | 2023-05-25T22:29:27 | 153,201,352 | 1,567 | 371 | Apache-2.0 | false | 2023-07-06T23:03:15 | 2018-10-16T00:58:14 | 2023-07-05T08:17:26 | 2023-07-06T23:03:14 | 6,047 | 1,468 | 339 | 85 | Python | false | false | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | UTF-8 | Python | false | false | 3,237 | py | 956 | build_aux_membership.py | 809 | 0.676552 | 0.670065 | 0 | 103 | 30.427184 | 140 |
ekorkut/hackerrank | 7,129,645,743,679 | efce8bf0c1c720df441f68f370240048c36c3e2c | 4ded0f0206710baa717f4e538e60800bc5cea857 | /algorithms/strings/sherlock_and_valid_strings/main.py | f22cff156e6e90a6e8ba6a25336da07a9107a5e4 | [] | no_license | https://github.com/ekorkut/hackerrank | c8f7456bf2f7a0812c60016ca82200380de93a77 | fdcde54a421ebc5c8a007c5f050971fafb727b33 | refs/heads/master | 2018-10-10T18:33:22.900269 | 2018-06-24T14:10:02 | 2018-06-24T14:10:02 | 82,475,484 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/opt/bb/bin/bbpy2.7
input_str = raw_input().strip()
char_to_freq = {}
for c in input_str:
if c in char_to_freq:
char_to_freq[c] += 1
else:
char_to_freq[c] = 1
freqs = [char_to_freq[x] for x in char_to_freq]
distinct_freqs = set(freqs)
print freqs
print distinct_freqs
if len(distinct... | UTF-8 | Python | false | false | 744 | py | 47 | main.py | 35 | 0.591398 | 0.577957 | 0 | 30 | 23.633333 | 61 |
cal-poly-dxhub/familycaresurveytool | 17,738,214,945,505 | 96a381909fae26be5f25c4ac76dec449009d5dca | e8442d6fe7b77880f532e882c9d80b324683e3fc | /lambda/PostResult/db_config.py | 6d5534b224192e4e002d2ea7252d1d0731acbf69 | [
"Apache-2.0"
] | permissive | https://github.com/cal-poly-dxhub/familycaresurveytool | 12b86ccbc6074af33e360df7f80338572f503cf3 | 2adac2af91abdc3d6bd7dc5b85e1801ca4071687 | refs/heads/master | 2023-01-10T19:31:00.452654 | 2020-08-03T21:53:05 | 2020-08-03T21:53:05 | 240,388,053 | 0 | 0 | null | false | 2023-01-06T02:32:59 | 2020-02-13T23:25:03 | 2020-08-03T21:53:08 | 2023-01-06T02:32:58 | 6,891 | 0 | 0 | 21 | Python | false | false | RDS_HOST=''
RDS_USER=''
RDS_PW=''
RDS_DB=''
| UTF-8 | Python | false | false | 44 | py | 16 | db_config.py | 12 | 0.545455 | 0.545455 | 0 | 4 | 10 | 11 |
mylekiller/NLPProject | 13,237,089,231,672 | 370ff87b8a55f7b1c3557ef90be199c3451e8bdd | d3194b506bde8b33a331e99348fd8c488b0cbe66 | /align.py | bedd7bad3226e9d7422eebda78fe64f8336123e7 | [] | no_license | https://github.com/mylekiller/NLPProject | a014aec336ed852036dccd703a739aef5b39b812 | 226a8cbeab9bbf3cdcbe26c19f15c325386b4288 | refs/heads/master | 2020-04-11T10:05:57.322113 | 2018-12-14T08:26:30 | 2018-12-14T08:26:30 | 161,703,223 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy
import sys
# -*- coding: utf-8 -*-
params = dict()
ewordtypes = set()
fwordtypes = set()
counts = dict()
outputfile = 'align.out'
def EM(trainfile):
log_likelihood = 0
counts = dict()
#E
with open(trainfile) as file:
for line in file:
e = line.strip().split('\t')[1]
f = line.strip().split('\... | UTF-8 | Python | false | false | 3,062 | py | 11 | align.py | 7 | 0.583932 | 0.568583 | 0 | 123 | 23.886179 | 66 |
Sudarsan-Sridharan/shift-python | 360,777,299,039 | 4b1c2002561ba3dc82e50bb2c101fc56275d3960 | 08727db800af02da3d7b0f3ec6921b0670bed898 | /demo/demo.py | 221cd64c062285dc3387a425509e4d98c1f8f8af | [] | no_license | https://github.com/Sudarsan-Sridharan/shift-python | bc65510656a9f03d960f98d158ad5a93b5248dc5 | 0eadb1d2b6c1dd108f2387355d1af7405bc057ff | refs/heads/master | 2020-06-03T08:10:18.376394 | 2019-06-08T03:40:42 | 2019-06-08T03:40:42 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import shift
import sys
import time
def demo01(trader):
"""
This method submits a limit buy order by indicating order type, symbol, size, and limit price.
:param trader:
:return:
"""
limit_buy = shift.Order(shift.Order.LIMIT_BUY, "AAPL", 1, 10.00)
trader.submitOrder(limit_buy)
return... | UTF-8 | Python | false | false | 6,781 | py | 17 | demo.py | 11 | 0.624982 | 0.602861 | 0 | 241 | 27.136929 | 111 |
zcZhangCheng/3d_vision | 7,318,624,307,881 | fcf35fadafbe104cbe6e5b22f13538c3360d8b40 | 13c587886fc2b8398ed67f96fd6cf3c668e55410 | /visual_map/output_re.py | fa25442a19fd1078e8630c2b1cbd3e9ef19919c3 | [] | no_license | https://github.com/zcZhangCheng/3d_vision | 99288f177e75b7259ec710cf4cf9d469c6657904 | 3555c4d8ddfec6574f1d94bc81e3a443dcee67d1 | refs/heads/master | 2023-03-17T16:06:25.909697 | 2019-07-26T09:43:31 | 2019-07-26T09:43:31 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import sys
d = sys.argv[1]
out_file=os.path.join(d, 'final_reuslt.txt')
with open(out_file,'w') as fw:
fw.seek(0,0)
file_list = os.listdir(d)
for folder in file_list:
full_addr = os.path.join(d, folder)
if os.path.isdir(full_addr):
if ".bag" in folder:
m... | UTF-8 | Python | false | false | 1,318 | py | 143 | output_re.py | 96 | 0.430956 | 0.418058 | 0 | 27 | 46.407407 | 97 |
BomberDim/Python-practice | 16,106,127,401,228 | 66423a5ebd3a8ea657ff70efe986de3159bde8ec | f2348887dbffbd2124376b97c942939e78093e8f | /examples№1/example1.py | 95b7606a0521983aea855b0e92db38fcbd728966 | [] | no_license | https://github.com/BomberDim/Python-practice | f2d0c9051b67a0269b04861c205d268611ed259b | b55baabaed088449dc70cda9f09e706f3614fbf3 | refs/heads/master | 2020-05-19T09:57:42.117307 | 2015-12-13T16:17:06 | 2015-12-13T16:17:06 | 42,327,071 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from math import cos, pi
x = 1.426
y = -1.220
z = 3.5
a = 2 * cos(x - pi/6)/0.5 + ((1 - cos(2*y))/2)
b = 1 + (2 / (3 + (z**2/5)))
print("a =", a)
print("b =", b)
input()
| UTF-8 | Python | false | false | 224 | py | 84 | example1.py | 84 | 0.455357 | 0.348214 | 0 | 18 | 11.444444 | 46 |
itsolutionscorp/AutoStyle-Clustering | 2,989,297,251,869 | f1bb4d1f9b770ca29b16988737155debc2777e26 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/difference-of-squares/d5d1107acb684775a1fb8d66887d2658.py | 601132579eb0f44eeb770164dbdfbd1e2736bae4 | [] | no_license | https://github.com/itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | true | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | 2016-05-19T22:14:37 | 2016-05-19T22:35:40 | 133,854 | 0 | 0 | 0 | null | null | null | def square_of_sum(n):
return (sum(range(1, n + 1)) ** 2)
def sum_of_squares(n):
return (sum([i ** 2 for i in range(1, n + 1)]))
def difference(n):
return (square_of_sum(n) - sum_of_squares(n))
| UTF-8 | Python | false | false | 209 | py | 54,209 | d5d1107acb684775a1fb8d66887d2658.py | 21,653 | 0.569378 | 0.54067 | 0 | 10 | 19.9 | 51 |
korJAEYOUNGYUN/django-youtube_clone | 4,896,262,734,569 | e98eaea03db7d6145d0bead55c4c9b35d23054b4 | b73762c15cf6b8a835400fbd2a8aeaef35ad50ab | /django_youtube_clone/apps/video/urls.py | 80c29861f912b3ef7d3bdfdb9fa1bc9e86090be0 | [] | no_license | https://github.com/korJAEYOUNGYUN/django-youtube_clone | b1c7df1656e2effa1d6ef0a8f38407a962e1d646 | 0e13a81286cceb578372ecb751accdeab395e9d7 | refs/heads/master | 2022-11-27T21:45:24.257145 | 2020-06-10T03:35:08 | 2020-06-10T03:35:08 | 242,132,236 | 1 | 0 | null | false | 2022-11-22T05:24:05 | 2020-02-21T12:17:01 | 2020-11-27T14:37:13 | 2022-11-22T05:24:01 | 74 | 1 | 0 | 2 | Python | false | false | from django.urls import path
from django_youtube_clone.apps.video import views
urlpatterns = [
path('', views.Home.as_view(), name='home'),
path('videos/upload/', views.Upload.as_view(), name='upload'),
path('search/', views.Search.as_view(), name='search'),
path('videos/<int:id>/edit', views.EditVide... | UTF-8 | Python | false | false | 521 | py | 21 | urls.py | 11 | 0.664107 | 0.664107 | 0 | 12 | 42.416667 | 85 |
taichi-dev/taichi-nerfs | 10,161,892,625,963 | 261618bd915febe62817ce73c06786f3fb7d0fd3 | 59a3d1c5739d27df28a7904ec32f908575427641 | /modules/utils.py | d7bac1579736d9e69b018f6ba07eecf54242ac90 | [
"Apache-2.0"
] | permissive | https://github.com/taichi-dev/taichi-nerfs | 8d91e66b29aa9f0712e177c38ee6f257c4288e77 | 50bac170584628df6a7017b77d76e780296f0e6c | refs/heads/main | 2023-07-10T07:01:29.423283 | 2023-05-29T05:53:38 | 2023-05-29T05:53:38 | 610,072,946 | 548 | 37 | Apache-2.0 | false | 2023-05-29T05:53:40 | 2023-03-06T02:58:21 | 2023-05-29T05:43:43 | 2023-05-29T05:53:39 | 157,331 | 459 | 32 | 8 | Python | false | false | import os
import cv2
import torch
import numpy as np
import taichi as ti
from taichi.math import uvec3
data_type = ti.f32
torch_type = torch.float32
MAX_SAMPLES = 1024
NEAR_DISTANCE = 0.01
SQRT3 = 1.7320508075688772
SQRT3_MAX_SAMPLES = SQRT3 / 1024
SQRT3_2 = 1.7320508075688772 * 2
def res_in_level_np(
leve... | UTF-8 | Python | false | false | 7,049 | py | 59 | utils.py | 41 | 0.567598 | 0.51369 | 0 | 253 | 26.86166 | 89 |
thibaudlemaire/autolights | 5,557,687,681,384 | 3471e5b1fe827c271918afcc336df139d0806330 | 7cf7592bca7b20627ec4c23d0d43c748367fa74f | /soft/sys_expert/energy_detection.py | 01ea956c4163abeba9d608dfccf11eb077f4d1b0 | [] | no_license | https://github.com/thibaudlemaire/autolights | 4b64d5a2ef1885c21b8a2d2e0e145dd7b067dd97 | 3b6d331efdec8b08c12c6503870704e8fe4addd7 | refs/heads/master | 2021-06-18T09:08:37.924753 | 2017-06-29T09:14:11 | 2017-06-29T09:14:11 | 94,530,591 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
@author: thibaud
"""
import logging
import librosa
import math
import time
import numpy as np
from threading import Thread
from .bibliotheque import energie
# Constants
BUFFER_SIZE = 10 # Number of frames to store in the buffer (10 -> 0,25s)
SAMPLE_PER_FRAME = 1... | UTF-8 | Python | false | false | 6,534 | py | 49 | energy_detection.py | 37 | 0.530762 | 0.522345 | 0 | 122 | 52.557377 | 135 |
whccx/ccxshop | 8,134,668,079,717 | 72a266367d2a2ea46a0de3952249b00bc9120f70 | 28ffaedb0d91e8c8316f958e002132843f41dcfd | /apps/shop/urls.py | ffec2281a9ad5dc45e2d926bddee110f6dfd1a5b | [] | no_license | https://github.com/whccx/ccxshop | 31d58cc5098f61318486a57cb927552be1074949 | 9d7ff9b49c975002dc46497df30471ba1585c962 | refs/heads/master | 2022-12-20T05:52:53.477857 | 2018-09-21T08:47:32 | 2018-09-21T08:47:32 | 147,655,448 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url
from shop import views #导入py文件
app_name = 'shop'
urlpatterns = [
url(r'^$', views.shop),#默认shop页面
] | UTF-8 | Python | false | false | 216 | py | 23 | urls.py | 18 | 0.68 | 0.675 | 0 | 11 | 17.272727 | 39 |
bh2smith/advent | 9,715,216,029,971 | cd54221ece46ac6693dda0eb957f08d8f0ee9b4f | da43f29a091ee81e93c9a91fb94ebae76ddcfa73 | /2015/day08/day08.py | e4790143fd2d509b7af724a9e1aad938837b1dba | [] | no_license | https://github.com/bh2smith/advent | c243e77992af5ea88fd77df9313afd6a90e87843 | 6b94bdd97ad4d15d9f68048f65f6db8a3173e841 | refs/heads/master | 2020-04-11T19:03:36.972230 | 2019-01-01T16:32:50 | 2019-01-01T16:32:50 | 162,020,640 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import codecs
if __name__ == '__main__':
strings = list(map(lambda t: t.strip(), open('input').readlines()))
l, r, q = 0, 0, 0
for s in strings:
l += len(s)
t = codecs.getdecoder("unicode_escape")(s)[0]
r += len(t) - 2
m = s.encode("UTF-8")
q += len(str(m)) + s.count... | UTF-8 | Python | false | false | 387 | py | 36 | day08.py | 35 | 0.465116 | 0.44186 | 0 | 14 | 26.642857 | 71 |
mittgaurav/Pietone | 19,567,871,030,748 | 57c8b6f7955530afaf0bce4c7741893b4a8cd0fe | 41862e79ab6eb99ea2dee9b5f9258a2102d29b18 | /longest_palin_subsequence.py | f08c939f25f46c453ad80f8cbd2c146a3901ced1 | [] | no_license | https://github.com/mittgaurav/Pietone | 688427226a9ed3287b5ea4136042d4d475c83ebc | 859a2d4d80e11e2b4474580a423626a0e08ac245 | refs/heads/master | 2021-08-16T08:29:42.083499 | 2021-06-17T20:13:19 | 2021-06-17T20:13:19 | 156,988,154 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 21 00:54:52 2019
@author: gaurav
"""
def longest_palin_seq(arr) -> 'int':
"""longest palindromic
subsequence"""
if not arr:
return 0
if len(arr) == 1:
return 1
if arr[0] == arr[-1]:
# The two extremes match,
# try af... | UTF-8 | Python | false | false | 2,988 | py | 70 | longest_palin_subsequence.py | 70 | 0.533802 | 0.509705 | 0 | 120 | 23.9 | 68 |
EdmundOgban/music-experiments | 19,567,871,002,396 | f2216110ec35a229101f2dba16e6ae05dfb9d3e9 | 2ed536d11a712e701830652c1388d2f040739422 | /scores/ezio/ezio0.py | 88eb2a88c5fd9c83f8d724b3f95aacd5a6e46ccf | [
"MIT"
] | permissive | https://github.com/EdmundOgban/music-experiments | ba3b1601ef93694db072e76da58b7e046277cbb3 | c340deb335eb37e6e0ca8ee20a3fe4fac7409ed3 | refs/heads/master | 2023-08-20T06:13:39.316250 | 2020-05-09T05:42:41 | 2020-05-09T05:42:41 | 259,487,465 | 0 | 0 | MIT | true | 2020-04-28T00:15:47 | 2020-04-28T00:15:46 | 2020-04-27T19:24:34 | 2020-04-27T19:24:32 | 22 | 0 | 0 | 0 | null | false | false | import random
import itertools
from music import tone, play_sequence
def gen_rhythm(beats):
while True:
res = random.choices([1,2,4,8], (32,8,2,1),
k=random.choice([4,8,16,32]))
if sum(res) == beats:
return res
def gen_rhythm2(beats):
if beats == 1:
... | UTF-8 | Python | false | false | 1,746 | py | 10 | ezio0.py | 8 | 0.538373 | 0.479381 | 0 | 51 | 33.235294 | 81 |
bojangles-m/cli-clock | 9,405,978,401,642 | ca50b97f0bdd12226f4f697f9615cf1b9d1ef2f2 | cf5b403544ae2bc664c3a529a7e6fa18b7c9f691 | /lib/apps.py | 677c3e96a60fc8c333a4d7575f757b8e69c83527 | [] | no_license | https://github.com/bojangles-m/cli-clock | 11e8a319029db651a8c7aad911f5dac7d9439e63 | f2bfcbe5f19aa557cc20579d8aff2ba76b16c2fa | refs/heads/master | 2021-06-10T06:13:15.742592 | 2016-12-26T11:24:31 | 2016-12-26T11:24:31 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import subprocess
import time
from datetime import datetime
from lib.notification import notify
from lib.exceptions import PastTimeEnetredError
class timer:
@staticmethod
def run(sec, msg=None):
while (sec > 0):
sec -= 1
time.sleep(1)
notify("It's time", msg, sound=Tru... | UTF-8 | Python | false | false | 1,362 | py | 7 | apps.py | 6 | 0.571219 | 0.566079 | 0 | 51 | 25.705882 | 82 |
ec500-software-engineering/exercise-1-modularity-sunithapriya | 2,671,469,675,547 | 43357bc2d71998c68106c19c6a1bbc1bcc5ecfd8 | 06c6969c148e205200b912f73e16c878081892f9 | /main.py | 69334efef7d6a01981ba9378abd8b130b0fd6f8f | [] | no_license | https://github.com/ec500-software-engineering/exercise-1-modularity-sunithapriya | ace829f125cfff3d4e165115cd1214af50de8284 | 050e023693478c72cc5b54614c150cb08932a973 | refs/heads/master | 2020-04-22T01:24:45.301419 | 2019-02-19T22:09:05 | 2019-02-19T22:09:05 | 170,013,476 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from input import getPatientInfo, readSensorData
from storage import searchPerson, insert
from alert_system import alertCheck
from output import patient
if __name__ == "__main__":
#Input Module#
patientInfo = getPatientInfo()
patientInfo.encode("ascii","replace")
sensorData = readSensorData()
sensorData.encode("a... | UTF-8 | Python | false | false | 761 | py | 6 | main.py | 4 | 0.764783 | 0.759527 | 0 | 28 | 26.071429 | 48 |
CodeEnvironment/django-rest-framework-deploy-heroku | 10,196,252,379,339 | f1496cd1f56cfbf088a11b9cc4b17e3beabca0c5 | 7e205af8825a41c48d7f8fb3f9988a8746564f36 | /racing/admin.py | a8b11aecb7cc2ebaa82ffbc9f5cf0329748337a4 | [
"MIT"
] | permissive | https://github.com/CodeEnvironment/django-rest-framework-deploy-heroku | 6135a9f9837842933c958683b8f0f5c6bc555046 | c6ffb20961c193b0f4dc1289de904b5d6750f335 | refs/heads/main | 2023-04-24T16:03:18.606340 | 2021-04-29T20:47:42 | 2021-04-29T20:47:42 | 354,850,998 | 4 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from .models import Driver
admin.site.register(Driver)
| UTF-8 | Python | false | false | 89 | py | 53 | admin.py | 50 | 0.820225 | 0.820225 | 0 | 4 | 21.25 | 32 |
bfpimentel/dotfiles | 11,897,059,443,582 | a62027c62f0b29a9c7ee12c9ab09edd336811691 | 73e68928271ef728dd9c25979248b578a699a1bb | /.config/qtile/settings/keys.py | ee551c47d81e1d9f4a19a5def7e44b034ad29029 | [] | no_license | https://github.com/bfpimentel/dotfiles | 9461397ebf7947bb3bda69e9f12d26d53d28e871 | d786d584651acffcd6b5d4e270d8334da07fb7c3 | refs/heads/master | 2023-02-23T18:58:14.035005 | 2021-01-29T18:23:58 | 2021-01-29T18:23:58 | 323,170,869 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from libqtile.config import Key
from libqtile.lazy import lazy
from settings.groups import groups
mod = "mod4"
keys = [
# Qtile
Key([mod, "mod1"], "r", lazy.restart()),
Key([mod, "mod1"], "q", lazy.shutdown()),
# Switch between windows
Key([mod], "Down", lazy.layout.down()),
Key([mod], "Up", ... | UTF-8 | Python | false | false | 1,566 | py | 32 | keys.py | 17 | 0.584291 | 0.58046 | 0 | 51 | 29.686275 | 79 |
l0kihardt/time-analyse-bot | 4,836,133,212,911 | c52f41ea4762c9ba7caa95abe2b7887343f53f3f | ffcdf925083be0b9ec7bab177aef4abd90936dc8 | /plugins/Test.py | ed3c837d603d3979c6f8640b60c8436463e887a1 | [] | no_license | https://github.com/l0kihardt/time-analyse-bot | 8f46dc63752c3e2a0b256357e66ec302c5a85453 | b33900043b952bce7bc302a28f89a26620522d60 | refs/heads/master | 2021-05-05T23:48:37.259783 | 2018-01-10T02:15:57 | 2018-01-10T02:15:57 | 116,893,041 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# This file defines a class that eases the connection to iCload for caldav manipulation
# Is uses the credentials supplied in the constructor to discver the users principal and calendar-home-set urls then uses
# these as inputs to the CALDAV library to add a caledndar, an... | UTF-8 | Python | false | false | 6,118 | py | 6 | Test.py | 4 | 0.621599 | 0.603019 | 0 | 187 | 31.229947 | 158 |
thomastu/CaReCur | 2,482,491,111,974 | de4e21bf7fda86d0e6337df63f5133328d94b26a | d94a8f8e512093a49a8cb0a6c246c2431b94e7ff | /src/data/geography/ca_counties.py | cf0dad2b0cd465bf8e7b05da1438f9cd85a43a69 | [
"MIT"
] | permissive | https://github.com/thomastu/CaReCur | e66a4be7f009ed36eea5fd9adaa3b9afbe0d3987 | bd057ea8c20d403beedc5eec2af353fcffaa304a | refs/heads/master | 2022-07-16T12:43:37.395740 | 2020-05-15T18:58:05 | 2020-05-15T18:58:05 | 240,231,758 | 3 | 0 | MIT | false | 2020-03-26T05:49:10 | 2020-02-13T10:18:12 | 2020-03-26T05:48:32 | 2020-03-26T05:48:28 | 6,254 | 1 | 0 | 0 | Jupyter Notebook | false | false | """California county shape files.
https://data.ca.gov/dataset/ca-geographic-boundaries/resource/b0007416-a325-4777-9295-368ea6b710e6
"""
import zipfile
from invoke import run
from loguru import logger
from src.conf import settings
RAW_DIR = settings.DATA_DIR / "raw/geography/"
PROCESSED_DIR = settings.DATA_DIR / "p... | UTF-8 | Python | false | false | 827 | py | 54 | ca_counties.py | 18 | 0.70133 | 0.608222 | 0 | 32 | 24.875 | 152 |
rowenama/Ma | 3,109,556,363,992 | f7c38d94b6919cba3d3d274b11d3c1f295702cb4 | fca04e7621f77dd05ce2f7d7eb8e609342c12022 | /Question4/question4.py | dbaae7b88f2c59f2b913da9a398c06ad5b75c530 | [] | no_license | https://github.com/rowenama/Ma | 897ac6d8196a3d2cb6e81eb56b9e745691ed17e6 | 3b4073ece142750e73946e1470209910516d641a | refs/heads/main | 2023-03-21T15:07:23.454259 | 2021-03-09T12:46:07 | 2021-03-09T12:46:07 | 345,871,038 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Given Inputs
L1 = 20
L2 = 10
InputImage= [
[0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1],
[1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0],
[0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1],
[1, 0, 0, 1, 0, 0, 0, 0, 0,... | UTF-8 | Python | false | false | 2,509 | py | 8 | question4.py | 7 | 0.474293 | 0.376644 | 0 | 69 | 35.362319 | 79 |
keiji/region_cropper | 15,187,004,360,964 | 5962289d308a019ff3288f0b72ebdfa388b64ea2 | c8bb15cabe090d1c49cff017420868b5bbf213d9 | /tools/src/entity/rect.py | 971be521dfd98b9a4e2f3bb84ec7114876cb8be2 | [
"Apache-2.0"
] | permissive | https://github.com/keiji/region_cropper | c47930ec60a175d5801e6d976f1f158e88e12a51 | b0a6838fb52569a08f48954785a36f31762f263c | refs/heads/master | 2020-12-25T16:24:57.843518 | 2020-11-04T16:32:40 | 2020-11-04T16:32:40 | 68,176,688 | 10 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/bin/python3
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Rect(object):
left = 0
top = 0
right = 0
bottom = 0
def width(self):
return (self.right - self.left)
def height(self):
return (self.bottom - ... | UTF-8 | Python | false | false | 1,284 | py | 30 | rect.py | 5 | 0.575545 | 0.569315 | 0 | 58 | 21.137931 | 78 |
epam/Indigo | 17,961,553,245,071 | e86a2857d82af12fdede4cce83c02468c9a6c5f2 | 182bbadb0ee7f59f1abd154d06484e555a30c6d8 | /api/tests/integration/tests/basic/basic_load.py | 4997a4a4c405056155d6748462e0cfd803bf4829 | [
"Apache-2.0"
] | permissive | https://github.com/epam/Indigo | 08559861adf474122366b6e2e499ed3aa56272d1 | 8e473e69f393c3a57ff75b7728999c5fb4cbf1a3 | refs/heads/master | 2023-09-02T10:14:46.843829 | 2023-08-25T08:39:24 | 2023-08-25T08:39:24 | 37,536,320 | 265 | 106 | Apache-2.0 | false | 2023-09-14T17:34:00 | 2015-06-16T14:45:56 | 2023-09-06T21:50:50 | 2023-09-14T17:33:59 | 225,517 | 246 | 88 | 336 | C++ | false | false | import os
import sys
sys.path.append(
os.path.normpath(
os.path.join(os.path.abspath(__file__), "..", "..", "..", "common")
)
)
from env_indigo import * # noqa
indigo = Indigo()
indigo.setOption("molfile-saving-skip-date", "1")
mol = indigo.loadMolecule(
"OCC1C(O)C(O)C(O)C(OC2C(O)C(O)C(OCC3CCCCC3... | UTF-8 | Python | false | false | 5,390 | py | 2,282 | basic_load.py | 1,260 | 0.642115 | 0.615584 | 0 | 189 | 27.518519 | 116 |
jasonchoww/tradingview-automation | 5,909,875,038,555 | 9986872ae1bfeae4e9eea9aef503742835b74019 | 837e81a18dbe597cf389b34ffe3bca3a28b6ee93 | /launch_tradingview.py | c12dda425c8e27ab95cedb85ca181e77224acb6a | [] | no_license | https://github.com/jasonchoww/tradingview-automation | 1c5de353edbcec94cae4bb9dce230839adcb2c01 | b4c7bd56f746c90dbe1c633f8bb4bbd75b3f5b52 | refs/heads/master | 2020-05-07T12:31:40.372230 | 2019-04-14T19:55:10 | 2019-04-14T19:55:10 | 180,507,855 | 0 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
def launch(driver):
# launches tradingview
driver.get("https://www.tradingview.com/")
# login
driver.find_element_by_xpath('/html/body/div[2]/div[2]/div[1]/div[4]/span[2]/a').click()
time.sleep(2)
# google+ login
driver.find_element_by_xpath(
'//*[@id="overlap-manager... | UTF-8 | Python | false | false | 1,191 | py | 3 | launch_tradingview.py | 3 | 0.649034 | 0.630563 | 0 | 35 | 33.028571 | 111 |
muhlik20033/muhlik20033 | 12,773,232,758,766 | 2e2835bfe307c9fcaa7a5a20e27974b7369003c1 | a2419e48f7a8ea87f71a96775eff2faa087e1603 | /TSIS 5/17.py | a9fc92a4c2fa87e5693b646fc382bbefcd1a80f4 | [] | no_license | https://github.com/muhlik20033/muhlik20033 | 6bc7211074a97aed25229a22e8e729b29df494c6 | 60bcdda9eeb360de6c233ed45597e48a874c349f | refs/heads/main | 2023-06-24T01:43:44.032740 | 2021-07-29T08:45:04 | 2021-07-29T08:45:04 | 380,452,848 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | with open('text.txt') as f:
file = f.read().splitlines()
print([s.rstrip('\n ') for s in file]) | UTF-8 | Python | false | false | 105 | py | 48 | 17.py | 48 | 0.571429 | 0.571429 | 0 | 3 | 33.666667 | 42 |
AlexandruGodri/pygame-tooltkit | 8,512,625,184,477 | 40a7642f74671d5e7457025bd994d5d3b8c87711 | 1abd3c2dd22c04fb291907989c7b4475cf1709b1 | /game/game.py | 203464ad43dac6484c41f8353fe03046dec7e81a | [] | no_license | https://github.com/AlexandruGodri/pygame-tooltkit | 76b4d428541cb7ab5b34dd6328c11be816285117 | 611ef986e520ed95205d4926e512a2a8c2770057 | refs/heads/master | 2021-01-20T07:57:20.031582 | 2017-06-08T13:23:52 | 2017-06-08T13:23:52 | 90,072,762 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
import pygame
class Game():
def __init__(self):
self._size = None
self._background = None
self.screen = None
self.sprites = pygame.sprite.Group()
self.events = {}
self._ready = False
def init(self, size, background):
self._size = size
... | UTF-8 | Python | false | false | 3,003 | py | 11 | game.py | 10 | 0.525475 | 0.521812 | 0 | 97 | 29.958763 | 74 |
mir-am/Mir-Repo | 12,515,534,709,857 | 773c73bebcbd9c993227828abde46a0576c8d816 | f40f2c84b3063eee6404422fdc3ed33b413f9503 | /src/iknntsvm.py | 53f96ce04cbdda50d8d9b452a5c931968b121cf2 | [] | no_license | https://github.com/mir-am/Mir-Repo | ec3607b9fcf6de727f7548a6bacdb39a174a1694 | 8edf848592a0111d541c5d311303ad1b2a58fd03 | refs/heads/master | 2020-03-20T20:09:56.505968 | 2019-06-11T15:33:37 | 2019-06-11T15:33:37 | 137,673,294 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 17 12:09:33 2018
@author: Mir, A.
"""
# Implementation of Improved KNN-based twin support vector machine
# IKNN-TSVM
import clippSolverv3
from dataproc import read_data
from twinsvm import train_tsvm, predict_tsvm
from clipp import clipp_dcd
from... | UTF-8 | Python | false | false | 12,594 | py | 108 | iknntsvm.py | 48 | 0.539146 | 0.506432 | 0 | 382 | 31.968586 | 179 |
azuline/cryptopals | 17,154,099,403,293 | 1c291746ae98fffc4f198173b5c9f845ad0c5dc9 | 1046257be7fede8e197cb90a5a855a748bde78ce | /set4/c32.py | 9502887de3f52298ea5e45f9668c99beffc8cf4d | [
"Apache-2.0"
] | permissive | https://github.com/azuline/cryptopals | d051f86f7c4d1b7090110f96eaf04e007707127e | 22280022fffad3bfb44bfc443abea0bad1125c8b | refs/heads/master | 2023-01-28T01:26:31.360723 | 2020-12-14T03:58:11 | 2020-12-14T03:58:11 | 209,361,493 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Break HMAC-SHA1 with a slightly less artificial timing leak
"""
import sys # isort:skip
from pathlib import Path # isort:skip
sys.path.append(str(Path(__file__).parent.resolve().parent))
import logging
from secrets import token_bytes
from threading import Thread
from time import sleep, time
import requests
f... | UTF-8 | Python | false | false | 2,224 | py | 43 | c32.py | 39 | 0.556655 | 0.533273 | 0.00045 | 92 | 23.173913 | 79 |
bmyerz/iowa-computer-science-methods | 15,135,464,779,421 | 67c7bf6d87fc170ce4928667e6a7730c54b91262 | d6b1a72f2726397f5fc7f8493362b2f0a5c20b5d | /jes-code/horndup.py | 57be016a3eabd94684c21f58d670cd95182304cf | [] | no_license | https://github.com/bmyerz/iowa-computer-science-methods | a9d8e42cff9323d0d8419a000278498e46ba8f3a | bd76a2f65c1cf291ca0255e7c03e06feba6231b3 | refs/heads/master | 2021-06-20T03:22:57.555524 | 2021-02-22T17:29:18 | 2021-02-22T17:29:18 | 189,730,334 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | s = makeSound("Ensoniq-SQ-1-French-Horn-C4.wav")
openSoundTool(s) | UTF-8 | Python | false | false | 65 | py | 19 | horndup.py | 19 | 0.753846 | 0.723077 | 0 | 2 | 32 | 48 |
WDB40/CIS189 | 9,878,424,794,517 | 339b4b34c6ab795327c3578f7298b46338943799 | 59f4388d9c3816a3af6b6d27b14e086509656cf9 | /Module8/src/get_test_scores.py | e6c47cd9e871106dcdd68abbfd38c56cf4a9259f | [] | no_license | https://github.com/WDB40/CIS189 | 93f6152f3b152d038182243d73830fb823dee339 | 3d51ba4d060c532c140ae317a825fd648ea1c7f7 | refs/heads/master | 2020-07-17T03:18:58.817312 | 2019-12-09T02:39:50 | 2019-12-09T02:39:50 | 205,929,980 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Program: get_test_scores.py
Author: Wes Brown
Last date modified: 10/15/19
Purpose:
"""
def valid_number(value, min, max):
INVALID_INPUT = -1
if value < min or value > max or value == INVALID_INPUT:
return False
else:
return True
def get_test_score():
INVALID_INPUT = -1
MAX... | UTF-8 | Python | false | false | 1,360 | py | 122 | get_test_scores.py | 118 | 0.590441 | 0.575735 | 0 | 66 | 19.606061 | 66 |
django-group/python-itvdn | 4,080,218,965,983 | 8ad07f5ecfeb5ec69a28f5ab39bed50a35b04632 | 8a1ab23b056886965fec2a3e4064c5ed55e22bfb | /домашка/essential/lesson 3/Dmytro Marianchenko/t_3.py | 827afb0f46e7a992dee4d19b588939d6e08a49f0 | [] | no_license | https://github.com/django-group/python-itvdn | 5d8a59f06618f993d20d2f60374c36aae4ae8ab0 | 62ef87dfac947ed4bf1f5b6b890461f56814d893 | refs/heads/master | 2021-01-07T11:16:37.996524 | 2020-02-14T13:53:47 | 2020-02-14T13:53:47 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def checker(name, year, company_bd):
if year > company_bd:
print(f"{name} is not an employee of the company")
else:
print(f"{name} works in the company since {year}")
def name_form(x):
while x is None:
x = input(f"Please enter:\n>> ")
if x.isalpha():
y = x.capit... | UTF-8 | Python | false | false | 1,658 | py | 706 | t_3.py | 679 | 0.532287 | 0.525649 | 0 | 63 | 25.301587 | 83 |
loek-tonnaer/UnsupervisedActionEstimation | 12,412,455,504,012 | f5ac5d406068dc7ba1b3691ca8d4d6be24feafd0 | c5bdee1e0209cf74ba70aad7e954028f0fcecae0 | /metrics/utils.py | 09624714a75eb354d85186c472499254a738017c | [] | no_license | https://github.com/loek-tonnaer/UnsupervisedActionEstimation | e856b32ccc5e01cdbcae50a9eead16d75548f115 | 1c951bf65abb8e5a8189cc67102bda6e1834168b | refs/heads/master | 2022-12-26T20:13:22.956433 | 2020-10-06T16:23:40 | 2020-10-06T16:23:40 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import sklearn
import torch
def _get_random_latent(ds):
f = []
for factor in ds.latents_sizes:
f.append(np.random.randint(0, factor))
return np.array(f)
def _sample_one_representation(rep_fn, ds, paired=False):
latent_1 = ds.sample_latent()
img1 = ds.get_img_by_latent(... | UTF-8 | Python | false | false | 1,997 | py | 34 | utils.py | 33 | 0.607912 | 0.595894 | 0 | 70 | 27.528571 | 99 |
jshrall/pm_tools | 4,217,657,896,767 | 2384c8a438dfcf1decd67b3e67686f65170a47c3 | c6e967dca129fabae2ca3f54e880805c7b0ee9df | /plugins/mermaid/mermaid.py | 99e861ac0f71f6309be805f171314877f3d8f353 | [
"MIT"
] | permissive | https://github.com/jshrall/pm_tools | d3354b5c868ddfd7dfb5a138209401129c964b23 | 2207f1f145172c3016b059b60b89c83ece184c72 | refs/heads/master | 2021-09-09T12:04:03.086767 | 2018-03-15T21:21:41 | 2018-03-15T21:21:41 | 113,763,387 | 0 | 0 | null | true | 2017-12-10T16:00:04 | 2017-12-10T16:00:02 | 2017-11-18T19:02:41 | 2017-11-18T19:42:15 | 61,739 | 0 | 0 | 0 | null | false | null | import os
class MermaidPlugin(object):
def __init__(self, preprocessor):
self.mermaid_js = preprocessor.toolpath("plugins/mermaid/mermaid.cli/index.bundle.js")
# Config and style are both currently unused
#self.mermaid_cfg = preprocessor.toolpath("plugins/mermaid/mermaid_config.json")
... | UTF-8 | Python | false | false | 1,826 | py | 68 | mermaid.py | 33 | 0.617196 | 0.615553 | 0 | 47 | 37.851064 | 132 |
tomaszmartin/stocks | 10,823,317,619,212 | b3ef49faf7afc423762745c82020f65391ee7581 | fd2b3452d1cc5539282c5861ba188bc48f5d7912 | /app/scrapers/coinapi.py | c484a97651e684dbfb0902d2793286ab57bc1512 | [] | no_license | https://github.com/tomaszmartin/stocks | 9bc568769406abd207eb4447a7029707a0bd0af3 | 4e97dd1f69e59b9643c52340bd052fd173693a4d | refs/heads/main | 2023-08-19T20:52:17.946003 | 2021-12-30T18:48:02 | 2021-12-30T18:48:02 | 365,441,638 | 0 | 0 | null | false | 2021-10-09T18:19:03 | 2021-05-08T06:51:33 | 2021-07-24T20:22:02 | 2021-10-09T18:19:02 | 232 | 0 | 0 | 2 | HTML | false | false | """Extracts data from a coinbase API."""
import datetime as dt
import json
import pandas as pd
from airflow.providers.http.hooks.http import HttpHook
COINS = [
"ADA",
"BTC",
"BTT",
"BNB",
"DASH",
"DOGE",
"ETH",
"ETC",
"LTC",
"LUNA",
"XLM",
]
def download_realtime(for_dat... | UTF-8 | Python | false | false | 3,440 | py | 62 | coinapi.py | 34 | 0.586919 | 0.585756 | 0 | 130 | 25.461538 | 100 |
peuic/pokemon | 7,481,833,038,659 | 0fcb5a8b8c306d92a1e347d52b21e7f543742025 | 00fd18e5bf1ea0b209d0e4033c7007b0a3ba6d30 | /poketest.py | bb8128532530e54413a2feaa53ce9fedf4ee0856 | [] | no_license | https://github.com/peuic/pokemon | aefcdd334cdf29528028c6673c1aaec855dc08df | c3741f7d700f1469ccf0549fb5b1128a04880962 | refs/heads/master | 2022-12-09T17:15:38.555538 | 2018-06-21T02:20:26 | 2018-06-21T02:20:26 | 138,101,337 | 0 | 0 | null | false | 2022-12-08T02:09:35 | 2018-06-21T00:50:32 | 2018-06-21T14:39:22 | 2022-12-08T02:09:33 | 4,831 | 0 | 0 | 4 | Python | false | false | from flask import Flask, render_template, request
import requests
app = Flask(__name__)
@app.route('/pokeresult', methods=['POST'])
def pokedata():
num = request.form['pokeq']
r = requests.get('https://pokeapi.co/api/v2/pokemon/'+num+'/')
json_object = r.json()
poke_id = json_object ['id']
poke_na... | UTF-8 | Python | false | false | 681 | py | 4 | poketest.py | 1 | 0.651982 | 0.650514 | 0 | 22 | 30 | 119 |
bitbybitsth/django_deploy | 14,817,637,200,521 | a6496ade3f09c77d59d3b2342c350113db5aced8 | ec60b96d8ed11b750ea91a64196ecc3a6d8b299a | /ecom/product/migrations/0002_auto_20211012_0924.py | a260695ce655eafb129b87dd0acbda5afd246d98 | [] | no_license | https://github.com/bitbybitsth/django_deploy | 1d6fe99989ea7a4ab8961dee70b3612e4bc2b589 | 670e716c4cf8a605c1ca2ffdfbed000a13f17bf7 | refs/heads/main | 2023-08-25T06:42:39.424848 | 2021-10-27T03:54:38 | 2021-10-27T03:54:38 | 421,664,267 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.2.8 on 2021-10-12 03:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("product", "0001_initial"),
]
operations = [
migrations.AlterModelOptions(
name="product",
options={"verbose_name": "... | UTF-8 | Python | false | false | 805 | py | 3 | 0002_auto_20211012_0924.py | 3 | 0.556522 | 0.529193 | 0 | 29 | 26.758621 | 83 |
pyro-ppl/pyro | 627,065,241,847 | f952fcbce3e5a98e2b6c2d3711cd19445676f828 | edc1134436a79ca883a0d25f3c8dfffc4235c514 | /tests/infer/test_svgd.py | d90efb0c8c1c8d1c7051fa944d13b930238448db | [
"Apache-2.0"
] | permissive | https://github.com/pyro-ppl/pyro | 2283d8ca528fc090c724a3a6e0f344e505ebbf77 | 0e82cad30f75b892a07e6c9a5f9e24f2cb5d0d81 | refs/heads/dev | 2023-08-18T00:35:28.014919 | 2023-08-06T21:01:36 | 2023-08-06T21:01:36 | 94,506,832 | 3,647 | 606 | Apache-2.0 | false | 2023-09-14T13:52:14 | 2017-06-16T05:03:47 | 2023-09-14T05:15:11 | 2023-09-14T12:55:38 | 95,825 | 8,118 | 973 | 243 | Python | false | false | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import pytest
import torch
import pyro
import pyro.distributions as dist
from pyro.infer import SVGD, IMQSteinKernel, RBFSteinKernel
from pyro.infer.autoguide.utils import _product
from pyro.optim import Adam
from tests.common imp... | UTF-8 | Python | false | false | 5,251 | py | 639 | test_svgd.py | 525 | 0.613217 | 0.576081 | 0 | 149 | 34.241611 | 83 |
okotaku/kaggle_statoil | 4,020,089,423,558 | 5a51f2cd307c627487617e94263b984e75b0ecbd | ed7ffb471f80f8aed29c50b1b5b1187cbd3b8a8d | /model/vgg16.py | 54b98e01004b9e5e586635ea0d8d30ab38ecdd25 | [] | no_license | https://github.com/okotaku/kaggle_statoil | f9ddc3396663eed26e533b4844cb7f57b3a39be5 | 3c3225bb4eeaf32ae9109614eda4af102394c667 | refs/heads/master | 2021-09-05T18:11:32.016595 | 2018-01-30T05:55:44 | 2018-01-30T05:55:44 | 115,371,866 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from keras.applications.vgg16 import VGG16
from keras.layers import Input, Flatten, Dense
from keras.layers.core import Activation
from keras.models import Model
def Vgg16(freeze_leyer):
input_tensor = Input(shape=(75, 75, 3))
vgg16 = VGG16(include_top=False, weights='imagenet',
... | UTF-8 | Python | false | false | 663 | py | 15 | vgg16.py | 14 | 0.650075 | 0.612368 | 0 | 23 | 27.826087 | 56 |
manishbisoi/Jinee | 10,273,561,793,635 | c14d928a2818615015cac7c4c9ceac859596960e | 05db88673dd09c36406faeb9b9d0afcb40b5fa26 | /tasks/fortune.py | ee62b4464c694dc43fda8317d964bba14b0f3c9d | [] | no_license | https://github.com/manishbisoi/Jinee | 67f9d40fbad4231ba605b890e36500140c6bf69d | 5676cd0fc4c4df4237fabb132dcfa9dec6578d5f | refs/heads/master | 2021-01-20T22:09:45.160364 | 2016-08-12T14:14:07 | 2016-08-12T14:14:07 | 65,555,800 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
os.system('fortune | xcowsay') | UTF-8 | Python | false | false | 40 | py | 19 | fortune.py | 18 | 0.75 | 0.75 | 0 | 2 | 19.5 | 30 |
gacanepa/CursoBashPython | 5,042,291,648,916 | 0ed53325fa1d72c4c2500bfca51be343adde7ad2 | 4a292a4d66451b323952d565c438d4a65d9408aa | /clase2/clase2.py | a9efa124a62c9546b0ee9c3d14fcdf67e8e376ca | [] | no_license | https://github.com/gacanepa/CursoBashPython | c5963d042aabbe64e9f182be2f14ba477401152f | 2cc83be2609aad9656594942b34a57020baf4b82 | refs/heads/master | 2019-01-25T00:28:03.621524 | 2017-12-13T20:11:05 | 2017-12-13T20:11:05 | 86,010,949 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # EJERCICIOS CLASE 2
# ------------------------------------------
# FUNCIONES AUXILIARES
# TipoDeDato: recibe una variable (nombreVariable) y su valor (dato) como entrada y devuelve el tipo de dato
def TipoDeDato(nombreVariable, dato):
print('La variable', nombreVariable, 'es igual a', dato, 'y es del ti... | UTF-8 | Python | false | false | 6,149 | py | 13 | clase2.py | 11 | 0.677683 | 0.652978 | 0 | 196 | 29.183673 | 123 |
il-dionigi/180DB-GradCaps | 790,274,004,428 | 144888937cd0e60660cbf55279a6181ff5ed8e2c | ede143f1801ab6dcc1ad67626980032257a0e936 | /HWGroup/pixelPi/encoder.py | 574bc53d9eb7cae06cac4bb5c5aac15a70892e41 | [] | no_license | https://github.com/il-dionigi/180DB-GradCaps | 1349f0c829ee43cc7a89d01fb31ef631a8df6b9b | 7330ec6d0a4bb1d1737ce634686ca463a8de1829 | refs/heads/master | 2020-12-13T12:57:25.377614 | 2020-03-12T21:13:57 | 2020-03-12T21:13:57 | 234,423,121 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from bitstring import BitArray
import math
import Node
xpos_len = 4 # 4 bits -> 0-15
xpos_start = 0 # x starts at bit 0 in x+y bits
ypos_len = 4 # 4 bits -> 0-15
ypos_start = xpos_len # y starts at bit len(xpos in bits) in x+y bits
xy_len = xpos_len + ypos_len # total lengh of x+y bits
message_length = 20 * 8 # in bit... | UTF-8 | Python | false | false | 1,542 | py | 51 | encoder.py | 36 | 0.690013 | 0.656939 | 0 | 47 | 31.829787 | 87 |
slightlynybbled/manufacturing | 18,614,388,295,929 | 8bbc2cb674f970ebc423e83189072f218c6447e8 | 18742a0ecbf392328d8df994abf937e0e72d89f3 | /examples/ppk_plot.py | 475d772870ff5c8e74adc0c024ef88cc66100a44 | [
"MIT"
] | permissive | https://github.com/slightlynybbled/manufacturing | 1ab9c3dd46b168d8be1b98472d818f5265483def | 4d172c7a12a649259ad3bc0e3f6993b1dcd79e0c | refs/heads/master | 2023-06-09T00:18:31.143098 | 2023-06-06T18:23:29 | 2023-06-06T18:23:29 | 224,505,774 | 45 | 16 | MIT | false | 2023-06-06T15:45:03 | 2019-11-27T19:47:39 | 2023-05-12T05:52:55 | 2023-06-06T15:44:15 | 3,068 | 40 | 13 | 3 | Python | false | false | import logging
import matplotlib.pyplot as plt
from manufacturing import import_excel, ppk_plot
logging.basicConfig(level=logging.INFO)
data = import_excel('data/example_data_with_faults.xlsx',
columnname='value')
fig, ax = plt.subplots() # creating a figure to provide to the ppk_plot as a param... | UTF-8 | Python | false | false | 517 | py | 54 | ppk_plot.py | 33 | 0.673114 | 0.663443 | 0 | 19 | 26.210526 | 87 |
rlee287/secure-notes-client | 14,740,327,766,827 | d10cb831011f988208c9f56177100bad3bcb0095 | 347059357e2ca1db87e6e0ceb2722c243a93e6c7 | /secure_notes_client/gui_editor.py | 665b1572285911c2092b21c809715c0582ffb093 | [
"MIT"
] | permissive | https://github.com/rlee287/secure-notes-client | b669b6ee400262ff23cc5ece35e7091edb7135af | 56d5fcce1d2eeb46de22aac63131fe7214b6f185 | refs/heads/master | 2022-12-09T02:51:26.149435 | 2019-10-14T01:56:37 | 2019-10-14T01:56:37 | 193,761,929 | 0 | 0 | MIT | false | 2022-12-08T06:36:18 | 2019-06-25T18:24:58 | 2019-10-14T01:56:45 | 2022-12-08T06:36:17 | 39 | 0 | 0 | 5 | Python | false | false | from PySide2 import QtWidgets
from PySide2.QtCore import Signal, Qt
import filesystem
import networking
class EditorClass(QtWidgets.QMainWindow):
close_signal = Signal(QtWidgets.QMainWindow)
def __init__(self, ui_obj, config_obj, note_id):
# type: (EditorClass, Ui_NoteEditWindow, ConfigObj, str) ... | UTF-8 | Python | false | false | 2,241 | py | 12 | gui_editor.py | 8 | 0.643909 | 0.643017 | 0 | 61 | 35.754098 | 72 |
ZackJorquera/ScaleLiquidRemainingIOT | 4,363,686,782,744 | 20a8b98e95aeef1bb5269b21b512d9720c49ef7d | e3210970da44105e392c6e3abbd7b1e12c0e755f | /RaspberryPiCode/ScaleAggregator/ScaleAggregator.py | 5e5058542f382aef660833981a133211a9caf99b | [
"MIT"
] | permissive | https://github.com/ZackJorquera/ScaleLiquidRemainingIOT | dedf6d1faa17dfe186cbf6db2b68761a84e9da06 | 57a349b95a3205c7dd5ad98337a9e5b01f384022 | refs/heads/master | 2018-10-22T06:41:20.700818 | 2018-07-25T03:40:57 | 2018-07-25T03:40:57 | 114,922,290 | 2 | 0 | null | false | 2018-02-07T13:59:36 | 2017-12-20T19:14:25 | 2018-02-07T13:32:49 | 2018-02-07T13:58:52 | 56 | 0 | 0 | 1 | Python | false | null | import time
import sys
import logging
import os
sys.path.append('../Tools/')
import ScaleInfoReaderWriter as ScaleIRW
import DatabaseReaderWriter as DBRW
import ConfigReaderWriter as CfgRW
def LoadDB():
if CfgRW.cfgVars["dbToUse"] == "Mongo":
db = DBRW.MongoDBProfile()
else:
db = DBRW.MongoDB... | UTF-8 | Python | false | false | 3,607 | py | 18 | ScaleAggregator.py | 10 | 0.648461 | 0.643748 | 0 | 102 | 34.372549 | 184 |
eQTL-Catalogue/eQTL-SumStats | 5,076,651,386,447 | 09a87f5f83f060c8e65d6b6d1cf524a1392a9db9 | 91bc0c7c9ee8db759444d430c100ce88bf242f8a | /sumstats/main.py | f7ffdb1ed75181eb336d8c5b394d702e065cbbb9 | [] | no_license | https://github.com/eQTL-Catalogue/eQTL-SumStats | 7bc7e9e9e8df2865aa946eba21bf248a79f21d4c | 84751d782139cb0f84c41607c9e8ee4e98ff072e | refs/heads/master | 2023-06-23T03:33:17.794710 | 2023-06-13T10:46:29 | 2023-06-13T10:46:29 | 234,100,303 | 2 | 1 | null | false | 2022-12-08T01:50:52 | 2020-01-15T14:38:50 | 2021-06-04T15:46:03 | 2022-12-08T01:50:51 | 8,853 | 2 | 1 | 18 | Python | false | false | from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse, ORJSONResponse
from fastapi.middleware.cors import CORSMiddleware
import logging
from sumstats.config import (API_BASE,
APP_VERSION,
API_DESCRIPTION,
T... | UTF-8 | Python | false | false | 2,148 | py | 163 | main.py | 135 | 0.601024 | 0.593575 | 0 | 65 | 32.046154 | 75 |
ForeverZyh/ASCC | 10,505,490,011,325 | 2a661ca6c9abc4667133de3169f4c55847aed8c2 | 4820859e8d6f68678dd212d6ad185b7b2914597e | /PWWS/get_NE_list.py | 3d8dd3a9dec1cc2da5c009a187eec93814bff31a | [
"MIT"
] | permissive | https://github.com/ForeverZyh/ASCC | c44d88e58b4a1e39bb61abcb7aaf1641c1a14164 | 2d76d679889953501c469221a37d486e7ee42ded | refs/heads/main | 2023-04-27T16:45:26.575805 | 2021-05-07T01:36:41 | 2021-05-07T01:36:41 | 364,674,852 | 0 | 0 | MIT | true | 2021-05-05T18:44:13 | 2021-05-05T18:44:12 | 2021-05-05T18:44:10 | 2021-05-03T05:27:15 | 41,614 | 0 | 0 | 0 | null | false | false | # coding: utf-8
import os
import numpy as np
from .config import config
import copy
import sys
from .read_files import split_imdb_files, split_yahoo_files, split_agnews_files
import spacy
import argparse
import re
from collections import Counter, defaultdict
nlp = spacy.load('en')
parser = argparse.ArgumentParser('nam... | UTF-8 | Python | false | false | 15,737 | py | 23 | get_NE_list.py | 19 | 0.432166 | 0.418885 | 0 | 428 | 35.768692 | 113 |
igor-barsukov/hurst-calc | 4,844,723,132,812 | 66cf9ad6f0409854330b339393af7e0f3f76edbb | 8519cc340770d1d05842dd75a1ce0e2cb47ac705 | /basic_rs/parse/parse_tbp.py | 4557402a59a25d7ec826bd7c428230c3981ad612 | [] | no_license | https://github.com/igor-barsukov/hurst-calc | 25c6194d4a98cb191d233f0d99dc33e8ce0c90f9 | 03d3ec160af780029b7fed4a5a916c044388ac5d | refs/heads/master | 2023-03-23T14:22:22.513762 | 2019-11-20T20:34:32 | 2019-11-20T20:34:32 | 221,783,518 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
# -*- encoding:utf-8 -*-
"""
Для работы требует модуль dpkt, достуаный через pip.
В качестве первого аргумента коммандной строки требует имя
файла для обработки, результат записывается в текущий каталог в
файл с таким же именем, но расширением csv.
РАССЧЕТ ВРЕМЕНИ МЕЖДУ ПАКЕТАМИ
- tbp - TIME BETWEEN... | UTF-8 | Python | false | false | 1,613 | py | 8 | parse_tbp.py | 7 | 0.663961 | 0.658279 | 0 | 46 | 25.782609 | 70 |
nagyist/ParaView | 11,338,713,702,683 | 63c423be57d97a90e908f3ea849e406830a9c0ec | 09d1138225f295ec2e5f3e700b44acedcf73f383 | /Web/Python/paraview/web/data_converter.py | ed094f364e1f01b5a4781c7a4e7692e467a8d74a | [
"BSD-3-Clause"
] | permissive | https://github.com/nagyist/ParaView | e86d1ed88a805aecb13f707684103e43d5f6b09f | 6810d701c44b2097baace5ad2c05f81c6d0fd310 | refs/heads/master | 2023-09-04T07:34:57.251637 | 2023-09-03T00:34:36 | 2023-09-03T00:34:57 | 85,244,343 | 0 | 0 | BSD-3-Clause | true | 2023-09-11T15:57:25 | 2017-03-16T21:44:59 | 2022-12-16T20:27:24 | 2023-09-11T15:57:22 | 238,433 | 0 | 0 | 0 | C++ | false | false | from vtkmodules.vtkIOImage import vtkPNGReader
from vtkmodules.vtkCommonCore import vtkFloatArray, vtkUnsignedCharArray
from vtkmodules.vtkCommonDataModel import vtkImageData
from vtkmodules.vtkIOLegacy import vtkDataSetWriter
from vtkmodules.web.camera import normalize, vectProduct, dotProduct
from vtkmodules.web imp... | UTF-8 | Python | false | false | 24,782 | py | 5,743 | data_converter.py | 3,836 | 0.453071 | 0.438867 | 0 | 644 | 37.481366 | 88 |
17tangs/CPP | 7,851,200,260,332 | bde8891980a4633e512b665696bdb027e86bd0a0 | 2bd90ca0875148b19bc273d423f2b4bdee451841 | /Main.py | b714328ee79c3788190987c2807d4650372878e9 | [] | no_license | https://github.com/17tangs/CPP | af54884fda274f77cdf326c17180d31e938587b1 | 0b0f996f5728c59043e30cf03a55c7fd320dc5e5 | refs/heads/master | 2021-01-13T00:36:47.867158 | 2016-04-13T05:08:34 | 2016-04-13T05:08:34 | 52,191,204 | 0 | 0 | null | false | 2016-03-07T04:35:55 | 2016-02-21T04:49:50 | 2016-02-21T05:03:44 | 2016-03-07T04:35:55 | 3,522 | 0 | 0 | 0 | Python | null | null | import time
import numpy as np
import sys
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
from Population import *
from R import *
from random import *
start_time = time.time()
#the best solution found on the internet at this time uses annealing
#after 400,000 iterations, the creato... | UTF-8 | Python | false | false | 7,104 | py | 6 | Main.py | 5 | 0.427083 | 0.398367 | 0 | 212 | 31.528302 | 104 |
drc-ima/hospital_project | 7,791,070,701,113 | 9ddf463f84e7f7f0c592edbf585ef63b07124c27 | 29a7f665d20880db00a8b6cd567244fe6dab1872 | /apps/user/models.py | a3d53b5a33959b36da724b3dc77dad56924cb088 | [] | no_license | https://github.com/drc-ima/hospital_project | ab7b1a9178ab58517229dcbe8f8dc57046491015 | 8abbdf569578fb6d44dcb90fb6bc28ba97237ebc | refs/heads/main | 2023-01-15T12:36:16.185323 | 2020-11-24T16:18:07 | 2020-11-24T16:18:07 | 303,461,051 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib.auth.base_user import BaseUserManager, AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.db import models
from django.utils import timezone
class UserManager(BaseUserManager):
def create_user(self, staff_id, first_name, last_name, password=None, **extra_field... | UTF-8 | Python | false | false | 3,014 | py | 81 | models.py | 50 | 0.586928 | 0.57996 | 0 | 128 | 22.554688 | 113 |
summygupta/hackerrank_python | 9,199,819,949,767 | 03b4a81ca23233c9fdf43d5dd382f0186fc16502 | 7d416ec7872f632f66d1062ee5f606152dfb3ee8 | /String Split and Join.py | 59bd53173f332f9bad1e4bc493533f4fb3672cdf | [] | no_license | https://github.com/summygupta/hackerrank_python | 66e193bdd5e6526bbc0a095d94f70ae3218305a9 | 85638548e33baf87278e59dcfe2954491f70db3c | refs/heads/master | 2022-12-12T23:26:41.453896 | 2020-08-31T10:09:47 | 2020-08-31T10:09:47 | 286,259,481 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def split_and_join(line):
t = line.split(" ")
return ("-".join(t))
| UTF-8 | Python | false | false | 75 | py | 18 | String Split and Join.py | 18 | 0.533333 | 0.533333 | 0 | 3 | 24 | 25 |
salesforce/provis | 18,519,898,992,301 | b7548d02673f7d422dd996f2f3d5dc62753c480e | 5e206b314c058b9b89a15a9c4fd3cee49bf3bd8e | /protein_attention/attention_analysis/compute_edge_features.py | 262ce2ae7248ea941662858b088132a354864df5 | [
"BSD-3-Clause"
] | permissive | https://github.com/salesforce/provis | 80abd0b98173849c7dcc4c765a28d39eb255bb87 | 051fe89190d9ac74865a6f49a3c25fd7b0fcca57 | refs/heads/master | 2023-08-29T00:53:31.325955 | 2023-05-01T19:22:27 | 2023-05-01T19:22:27 | 272,459,149 | 292 | 49 | NOASSERTION | false | 2023-06-12T21:27:47 | 2020-06-15T14:22:26 | 2023-06-12T01:04:40 | 2023-06-12T21:27:47 | 7,535 | 273 | 46 | 3 | Python | false | false | """Compute aggregate statistics of attention edge features over a dataset
Copyright (c) 2020, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
import re
from collections impor... | UTF-8 | Python | false | false | 13,708 | py | 32 | compute_edge_features.py | 26 | 0.59447 | 0.588634 | 0 | 320 | 41.8375 | 119 |
A8IK/Python-2 | 5,360,119,212,848 | 35a4b734bb85edbae4737173c825f7414974d208 | 54d3a1558a4bd38888d4d51f1ae2d2699965087c | /array.py | df7a56f511a10410349ec8c940b4aebe768e9bbe | [] | no_license | https://github.com/A8IK/Python-2 | a86843c6ccfe23d42faebb020307351a108075bd | 538aee64bac73110cd0a8ac74747c9d2fa485149 | refs/heads/main | 2023-01-21T12:42:51.226144 | 2020-12-04T18:14:32 | 2020-12-04T18:14:32 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from array import*
vals=array('i',[1,2,3,4,-5,9,10])
print (vals) | UTF-8 | Python | false | false | 67 | py | 82 | array.py | 82 | 0.626866 | 0.507463 | 0 | 3 | 21 | 33 |
brjagger/mmvt_seekr | 566,935,708,805 | cb29c68e4832357cdad37a0db083468a033190f7 | c885c0fdf8ff049d71f12fa7e06e56b892243826 | /mmvt_seekr/apbs.py | 7697fc2b6aafd37d2d8d50ecf6b94329b6124339 | [
"MIT"
] | permissive | https://github.com/brjagger/mmvt_seekr | dc0d4a82a44c004b802afbe79336678d7f1be943 | 9ee0f43716e64e16239bbf14e3eca6df6534f758 | refs/heads/master | 2023-07-03T10:22:05.976144 | 2021-08-11T16:06:24 | 2021-08-11T16:06:24 | 207,873,958 | 1 | 1 | MIT | false | 2021-08-11T16:06:25 | 2019-09-11T17:56:36 | 2020-09-02T22:46:55 | 2021-08-11T16:06:25 | 13,107 | 1 | 1 | 1 | Jupyter Notebook | false | false | #!/usr/bin/python
'''
apbs.py
creates the necessary files to run an electrostatic simulation using APBS
'''
import os, sys, shutil #, math, subprocess #, make_fxd
#import numpy as np
import pdb2 as pdb
#from copy import deepcopy # needed to keep track of separate structure objects
import unittest
import re
#import d... | UTF-8 | Python | false | false | 13,105 | py | 29 | apbs.py | 15 | 0.700038 | 0.677222 | 0 | 291 | 44.034364 | 252 |
abhishekjha2468/HackerRank-Python | 970,662,637,369 | fcb2e58d58e572ab5a9a95b873bc9a43f43b35cd | e8854329efa49df5a9038b2decc1f037540b2ef0 | /Validating Credit Card Number.py | 8fc56f27613bcbcca267b679f93d202d240f1e58 | [] | no_license | https://github.com/abhishekjha2468/HackerRank-Python | 2a6f217ccfa9805629d5af698bf8838b95a77eac | 3d5ff2e51b228e633a8250b97a6dbb4e7e115b42 | refs/heads/main | 2023-03-28T16:26:06.878931 | 2021-03-30T06:07:51 | 2021-03-30T06:07:51 | 352,885,018 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def count(string):
string=string
Count=1
list=[]
for i in range(len(string)):
try:
if i<(len(string)-1):
if string[i]==string[i+1]:
Count=Count+1
else:
list.append(Count)
Count=1
else:
list.append(Count)
except:
list.append(Count)
return max(list)
#--------------------------... | UTF-8 | Python | false | false | 2,518 | py | 108 | Validating Credit Card Number.py | 107 | 0.527403 | 0.515091 | 0 | 96 | 25.239583 | 83 |
Jisup-lim/academy-study | 2,774,548,916,142 | 7546105c1f4625270eabb34d8c8416a1c9f3cd50 | 52c4a91abba094cefe93a1a6cc837eac564bd332 | /ml/m09_SelectModel_2_cancer.py | c77fc708face697326a7db6303b93551652c5b80 | [] | no_license | https://github.com/Jisup-lim/academy-study | 9805a7d1809b51781f341b3b0eceb46f2da956df | 74e07370ac697b01a026aaaf95437300dc9913fd | refs/heads/master | 2023-04-07T19:49:35.605546 | 2021-05-31T15:15:47 | 2021-05-31T15:15:47 | 325,250,894 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sklearn.model_selection import train_test_split
from sklearn.datasets import load_breast_cancer
from sklearn.metrics import accuracy_score
from sklearn.utils.testing import all_estimators
# from sklearn.utils import all_estimators
import warnings
warnings.filterwarnings('ignore')
dataset = load_breast_cancer()
... | UTF-8 | Python | false | false | 3,025 | py | 242 | m09_SelectModel_2_cancer.py | 237 | 0.767677 | 0.554807 | 0 | 76 | 34.184211 | 91 |
satyam-seth-learnings/ds_algo_learning | 9,491,877,749,891 | 430c51fc8a240cbfbcc1cb24ef612138b92e031e | 48b7c5c6d4576c06f157abb317ced99dae64f5c5 | /Applied Course/4.Problem Solving/5.Problems on Trees/30.All Elements in Two Binary Search Trees.py | 9f7d772881a6ac6e58fc114466eb2ec5edfe0a72 | [] | no_license | https://github.com/satyam-seth-learnings/ds_algo_learning | 38cc5e6545ec8a5fbabefc797aee486c98cfb314 | 761cba2cd2dd7d7cdaf5a3c41503fdfc6dfe73ad | refs/heads/master | 2023-08-31T00:48:30.707533 | 2021-10-16T09:37:45 | 2021-10-16T09:37:45 | 415,274,888 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # https://leetcode.com/problems/all-elements-in-two-binary-search-trees/
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# Logic-1
class Solution:
def getAllElements(self, ... | UTF-8 | Python | false | false | 1,688 | py | 429 | 30.All Elements in Two Binary Search Trees.py | 404 | 0.510071 | 0.476303 | 0 | 51 | 32.117647 | 76 |
thraddash/python_tut | 4,071,629,026,525 | a11e43baef8f5b4aa1c61f139255e0d36979c052 | 799a90344c4e2e367bd79fff063ede765f816549 | /16_exception_handling/pass.py | 4ba63f53cc74b1e3bc65938668b988ac5e12fbef | [] | no_license | https://github.com/thraddash/python_tut | a49765801882003b6d3b1d6958bee476f5768470 | 5bd359f2021bb26953bcd955018dfbf6b2b6395f | refs/heads/master | 2023-03-16T10:28:56.581004 | 2021-03-05T00:08:06 | 2021-03-05T00:08:06 | 325,146,371 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# Ignore exception by pass
def div(x, y):
return x / y
try:
div_result = div(2, 1)
#div_result = div(2, 0)
except:
pass # do nothing
else:
print("Div result is: " + str(div_result))
def div2(x, y):
try:
result = x / y
except:
pass # do nothing
... | UTF-8 | Python | false | false | 448 | py | 178 | pass.py | 171 | 0.564732 | 0.537946 | 0 | 25 | 16.92 | 46 |
karthikpappu/pyc_source | 18,408,229,860,346 | 86038a4900b15b777972893507c5333fc984ab84 | 91fa095f423a3bf47eba7178a355aab3ca22cf7f | /pypi_install_script/yadage-service-cli-0.1.11.tar/setup.py | 810ad4f9a67120c49934ddeecb6ff8e50666a027 | [] | 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 | from setuptools import setup, find_packages
setup(
name = 'yadage-service-cli',
version = '0.1.11',
description = 'yadage service command line tools',
url = 'http://github.com/yadage/yadage-service-cli',
author = 'Kyle Cranmer, Lukas Heinrich',
author_email = 'cranmer@cern.ch, lukas.heinrich@cern.ch',
pa... | UTF-8 | Python | false | false | 628 | py | 114,545 | setup.py | 111,506 | 0.598726 | 0.592357 | 0 | 28 | 21.428571 | 59 |
zgreat/transient | 15,324,443,336,750 | 51270bef51b2ff9dc35131945962a06ce9e963d8 | 77da6217bf83d41b2fe479d6e414a1df4f997b3c | /runserver.py | 14dfed33dbd933b5ae057aa7b4b1e8bb9ddb0f19 | [
"MIT"
] | permissive | https://github.com/zgreat/transient | e4deb14951dc05692bc1ccb624c66cf394bc9664 | 1cfc1fe65079ef3c75754eaa0cd97f7ebb55664a | refs/heads/master | 2021-05-30T10:49:40.529829 | 2015-12-20T03:46:39 | 2015-12-20T03:46:39 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
from transient import api
if __name__ == "__main__":
api.run()
| UTF-8 | Python | false | false | 86 | py | 30 | runserver.py | 26 | 0.581395 | 0.581395 | 0 | 5 | 16.2 | 26 |
jgubert/Ensemble | 11,132,555,279,782 | 9ac2e1464c7dde54db2cdfa8ebbeeb74856f69a9 | c890014818f638d9c6f512689c515b545c21f84e | /main_teste.py | cf814623a77eae4c0095548619de0d4ade40459a | [] | no_license | https://github.com/jgubert/Ensemble | 23689853fbaf8ba5a0f7deb0a1c7dab6d5c194a1 | d1e9d33864357f4adaf9bc8c52209f3d0e6d433b | refs/heads/master | 2020-04-06T16:57:20.383220 | 2018-11-15T02:33:04 | 2018-11-15T02:33:04 | 146,955,467 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Função main()
"""
import fileinput
import csv
import math
import sys
import bootstrap
import decisionTree
import errorMeasures
import header
import kFoldStratified
import preProcessing
import tree
import voting
import random
import sampling
"""
Como executar:
> python3 main_teste.... | UTF-8 | Python | false | false | 4,125 | py | 14 | main_teste.py | 12 | 0.617311 | 0.614393 | 0 | 155 | 25.535484 | 113 |
sandeepgoyal194/CustomerChoice | 7,370,163,881,444 | 713ac129cd60bf41c7187f29065bb2cafbeafbe3 | 0a52c30680948e74349105edcd3b424c44df4b20 | /services/TopSiteGratis.py | edf39f80a92323da2618c748032fe8a96cbafdb0 | [] | no_license | https://github.com/sandeepgoyal194/CustomerChoice | e47cedf4e9b0214e949cd29532ce4b77f305abd5 | 755e182900d94a82de0b3a5d803630db6b21fedf | refs/heads/master | 2018-09-03T04:46:21.870455 | 2018-06-29T05:00:38 | 2018-06-29T05:00:38 | 128,005,895 | 0 | 1 | null | false | 2018-07-18T06:30:40 | 2018-04-04T04:14:48 | 2018-06-29T05:01:02 | 2018-07-17T06:05:31 | 21,686 | 0 | 1 | 1 | Python | false | null | from model.Servicemodel import ServiceRecord
from scrapy import Spider, Request
class TopSiteGratis(Spider):
def __init__(self):
pass
def parsing(self, response):
return self.crawl(response,self.category,self.servicename)
def crawl(self, response, category, servicename):
reviews... | UTF-8 | Python | false | false | 2,407 | py | 91 | TopSiteGratis.py | 84 | 0.606149 | 0.600748 | 0 | 46 | 51.217391 | 194 |
bellyfat/etherscan-python | 9,019,431,338,699 | 26e8d4fa3b7a294e4100dce618b751849a0cc8d1 | 6b902b5fe1dbdbde22047fe503ce46a33040ce7e | /build/lib/etherscan/enums/actions_enum.py | 2ca5d53e64874ac3b93ceaed1ae31d90d1cd246d | [
"Python-2.0",
"MIT"
] | permissive | https://github.com/bellyfat/etherscan-python | fc6cfa9ce9639febd9b069c466827a3c1ea915c0 | 0254144fc2db38c897ff843069ba3c945e19b866 | refs/heads/master | 2022-12-28T06:59:05.873455 | 2020-10-16T11:01:52 | 2020-10-16T11:01:52 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from dataclasses import dataclass
@dataclass(frozen=True)
class ActionsEnum:
BALANCE_HISTORY: str = "balancehistory"
BALANCE_MULTI: str = "balancemulti"
BALANCE: str = "balance"
CHAIN_SIZE: str = "chainsize"
ETH_BLOCK_NUMBER: str = "eth_blockNumber"
ETH_CALL: str = "eth_call"
ETH_ESTIMATE_... | UTF-8 | Python | false | false | 1,715 | py | 20 | actions_enum.py | 1 | 0.69621 | 0.69621 | 0 | 40 | 41.85 | 98 |
aloscc/Ambulance-Dispatching | 13,065,290,545,068 | 0be62f9214bd80b49085c425e3b8a4977468e65a | 1cd37beb04515d22a185624e5a304a9de0923801 | /src/gt/plot/DispatcherPlot.py | d07b56860af6950089cb2820758aca0827ee0f57 | [] | no_license | https://github.com/aloscc/Ambulance-Dispatching | fac3585096b1c3f6c5d2c9ab23cc6be5e57e44dd | 429538a08f8580043f2c72aeb289527477ec4949 | refs/heads/master | 2020-05-22T00:31:39.958716 | 2019-05-11T17:45:20 | 2019-05-11T17:45:20 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from gt.core.HospitalsAndDispatcherModel import DispatcherAndHospitalsModel
from neng.game import Game
from common import *
def find_nash(la, mu, n, print_matrix=False):
model = DispatcherAndHospitalsModel(la, mu, n, 3, 10)
matrix = model.game_matrix()
if print_matrix:
print(matrix)
text = "N... | UTF-8 | Python | false | false | 3,060 | py | 8 | DispatcherPlot.py | 7 | 0.524837 | 0.491176 | 0 | 93 | 31.903226 | 120 |
DenisCarriere/gpsimage | 2,576,980,414,240 | b92a3038f63f8230030312f1a3f8a29d56c78fb4 | 1eb44f45c7972def3b78d783582d1fe51a01c2ed | /gpsimage/base.py | 654ef0a7804c32723f757c40cd0a7b8313784ecf | [
"Apache-2.0"
] | permissive | https://github.com/DenisCarriere/gpsimage | 3796adc92d9b8d3e7c718801b3b904f520d6238b | 4f2f6c0acb7c6bb173299f86932d894c553e6c5c | refs/heads/master | 2022-11-30T23:19:06.771136 | 2014-12-01T01:22:02 | 2014-12-01T01:22:02 | 22,666,022 | 7 | 6 | Apache-2.0 | false | 2022-11-22T00:30:49 | 2014-08-06T01:53:16 | 2022-07-05T12:13:46 | 2022-11-22T00:30:46 | 6,177 | 6 | 7 | 5 | Python | false | false | import os
import time
import datetime
import dateutil.parser
import exifread
class GPSImage(object):
"""
"""
_exclude = ['lat', 'lng','debug','json','ok', 'help', 'x', 'y', 'path','exif', 'image']
exif = {}
def __init__(self, image):
if isinstance(image, str):
self.path = os.p... | UTF-8 | Python | false | false | 5,484 | py | 6 | base.py | 4 | 0.519329 | 0.511306 | 0 | 207 | 25.497585 | 108 |
jingshisun/Sentiment-Analysis | 1,348,619,732,610 | fb1a0bfad2910a66feabcae47c7cb00aa426681d | f8857b6a70c38d55056457047beeed79d9381504 | /Project Part 3/projectpart3.py | b308dc2780057f5d561354ea74d5fed8c5708034 | [] | no_license | https://github.com/jingshisun/Sentiment-Analysis | 122e90cba465bffdceba176f52befdab9bb30b7a | 8d062138e9c3379eb942a18b0940c9ec126979ed | refs/heads/master | 2021-09-01T08:29:41.101618 | 2017-12-26T02:02:18 | 2017-12-26T02:02:18 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 22 11:31:20 2016
@author: tomec
"""
import urllib
import pandas as pd
from datetime import timedelta
import datetime
import csv
import re
import unicodedata
import nltk
from nltk.sentiment.util import mark_negation
from sklearn.cluster import KMeans
fro... | UTF-8 | Python | false | false | 54,521 | py | 37 | projectpart3.py | 3 | 0.564705 | 0.547792 | 0.000037 | 1,098 | 47.653005 | 121 |
glennneiger/magicmirror | 6,992,206,759,743 | 140faa740f9a491c35b78e915857b50f23331f36 | 82acb938feb7482b07d72114342e9f29663611f2 | /python scripts/motion_sensor_updated.py | 7175556fbfaa63a4b6a01d298b71242167eff6e3 | [] | no_license | https://github.com/glennneiger/magicmirror | 80c677fc467d6b1946fd390b9b20a715e4396428 | 606f7801d57c613c23696a988d0d435f7e46cda4 | refs/heads/master | 2020-04-19T06:00:14.523986 | 2018-10-08T08:01:59 | 2018-10-08T08:01:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
import time
import os
import glob
import serial
import subprocess
from subprocess import Popen, PIPE, STDOUT
GPIO.setmode(GPIO.BOARD)
LED_OUT = 10
MOTION_IN = 8
device_file = ""
def initialize_all():
#ser = serial.Serial('/dev/ttyACM0',... | UTF-8 | Python | false | false | 2,121 | py | 12 | motion_sensor_updated.py | 10 | 0.603017 | 0.578029 | 0 | 137 | 14.481752 | 62 |
nikolajjakubets/bypass_utility | 12,128,987,650,458 | e89e415f95a34b6f11edc1fcf3a410e3622d7f43 | b3e063f035f97f90d1305b148ea16fa37d320db2 | /src/exploit.py | c8b51f44723af9520de11460aad0c2eba36e3c20 | [
"MIT"
] | permissive | https://github.com/nikolajjakubets/bypass_utility | 31f9b36f5ee18a16fb179857424ed09356ad6ed5 | 08f860671813951934900031a358598bc032f162 | refs/heads/master | 2023-02-21T11:02:02.976401 | 2021-01-23T17:18:13 | 2021-01-23T17:28:31 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from src.common import to_bytes
import usb
def exploit(device, watchdog_address, var_0, var_1, payload):
addr = watchdog_address + 0x50
device.write32(addr, [0xA1000]) # 0x00100A00
if var_0:
readl = var_0 + 0x4
device.read32(addr - var_0, readl // 4)
else:
cnt = 15
f... | UTF-8 | Python | false | false | 1,325 | py | 2 | exploit.py | 2 | 0.610566 | 0.561509 | 0 | 52 | 24.480769 | 96 |
azulnaturalbz/chillbout_django | 18,511,309,077,209 | e734bbaed0d71052d95718addd07f376260b2ca4 | 675b512308cea8b96c42a1ad27d373355fcf7ebb | /establishments/migrations/0003_establishment_creation_date.py | faa7388c6707986212db5986d05511df4741c85c | [] | no_license | https://github.com/azulnaturalbz/chillbout_django | 2e7d8a959fb9d44801995a7dc8bbd1e21e91d45e | 0948c291f146368bf6ab0f74e1b9383d6e2655f8 | refs/heads/master | 2018-09-10T23:48:35.423582 | 2018-09-04T03:15:33 | 2018-09-04T03:15:33 | 136,164,108 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.0.4 on 2018-05-02 12:39
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('establishments', '0002_auto_20180426_1458'),
]
operations = [
migrations.AddField(
... | UTF-8 | Python | false | false | 514 | py | 62 | 0003_establishment_creation_date.py | 43 | 0.638132 | 0.544747 | 0 | 20 | 24.7 | 105 |
encse/adventofcode-2015-python | 8,581,344,699,049 | 1b9496792bf7e45582e9ac76e97dba2a821e9eb2 | 47e082011ce03c55f3e92ef172233ea7bcc7c9a8 | /day20/solution.py | 81ed5c26f2a46e68af4c87f97e8b862b1608d099 | [] | no_license | https://github.com/encse/adventofcode-2015-python | 1138ade1e46ee5b37762054e7fa67d8c27e49e2b | 3e222b682430ae5570626ea9acf2ffe40f1e6264 | refs/heads/master | 2021-06-09T05:37:04.129547 | 2016-12-28T13:33:39 | 2016-12-28T13:33:39 | 47,879,224 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | dsum1 = [1] * 3600000
dsum2 = [1] * 3600000
i=2
res1 = None
res2 = None
while True:
d = i
while d < len(dsum1):
dsum1[d] += i
if d < i*50:
dsum2[d] += i
d += i
if not res1 and dsum1[i]*10 >= 36000000:
res1 = i
if not res2 and dsum2[i]*11 >= 36000000:
res2 = i
if res1 and res2:
bre... | UTF-8 | Python | false | false | 355 | py | 26 | solution.py | 26 | 0.549296 | 0.388732 | 0 | 23 | 13.521739 | 41 |
gvnsai/python_practice | 15,796,889,717,697 | 1f2d2b4d7e8c3362ed55c0260f8dbbf910b9cb08 | d6a31cfac7f6c899399c492f450ff832f2f2f4f5 | /assignment-3/numpy_food/numpy_food.py | 6c1910338645249bed5074d41727e486257d8189 | [] | no_license | https://github.com/gvnsai/python_practice | c2e51e9c73bc901375b1fb397b80a28802d85754 | dffe4b6bb4a991d2caa790415c1e5b041ed95ee3 | refs/heads/master | 2020-03-26T17:55:25.713217 | 2018-11-10T05:56:48 | 2018-11-10T05:56:48 | 145,187,300 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ''' # Numpy in Python #
Create a Python script (numpy_food.py) to perform the following tasks:
• Query the database and retrieve data to calculate the average violations for every month
between July 2015 and December 2017 for each postcode.
• Use MatPlotLib to plot the follow data over time:
o The violations per... | UTF-8 | Python | false | false | 5,075 | py | 25 | numpy_food.py | 20 | 0.714455 | 0.695524 | 0 | 153 | 32.124183 | 291 |
rachittoshniwal/opencv-projects | 10,995,116,320,360 | 186105fc3745345bae18be60c2a876fc977ca5a1 | 00102adf23cfec94df86bab5663f4cbc7a5dc2a9 | /face_blurring_image_haar.py | 809362b651ec8dcb1308b1b68ee536110665ca00 | [] | no_license | https://github.com/rachittoshniwal/opencv-projects | 10236d5107c3e53fe8a2fa72a1ab01e02d548995 | 7c1378ba719bc79f17668b40bc86596aaf0c62fa | refs/heads/master | 2023-06-25T10:49:44.040554 | 2021-07-21T16:09:52 | 2021-07-21T16:09:52 | 386,977,089 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2 as cv
haar_face = cv.CascadeClassifier('haarcascade_frontalface_default.xml')
img = cv.imread('./test images/friends1.jpg')
img = cv.resize(img, (640,480))
cv.imshow("original image", img)
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
face_rect = haar_face.detectMultiScale(gray, scaleFactor=1.2, minNeighbors... | UTF-8 | Python | false | false | 545 | py | 4 | face_blurring_image_haar.py | 2 | 0.67156 | 0.636697 | 0 | 19 | 27.736842 | 77 |
edublancas/sklearn-evaluation | 11,433,202,956,858 | c9c7e8c6cfbeb849ad522ec3b86e0a845a98e9e6 | 4b2d797b26bc919b91ce4b91479237c1ffe417a0 | /src/sklearn_evaluation/plot/_matrix.py | cb6c27e01268c33a464f66bbaf7f6027a6609b3d | [
"MIT"
] | permissive | https://github.com/edublancas/sklearn-evaluation | c0c4a0948889dab6b8987775b82672dfc5fb5787 | 91b547e7705c4096f0d7ebee5aaf7e34af795dd3 | refs/heads/master | 2023-05-28T14:46:32.627880 | 2023-01-13T21:57:34 | 2023-01-13T21:57:34 | 589,342,851 | 3 | 0 | MIT | true | 2023-01-15T21:18:53 | 2023-01-15T21:18:52 | 2023-01-15T08:53:00 | 2023-01-15T17:14:45 | 13,596 | 0 | 0 | 0 | null | false | false | import numpy as np
from matplotlib.tri import Triangulation
from sklearn_evaluation.util import default_heatmap
def add(first, second, ax, invert_axis=False, max_=None):
# Adapted from: https://stackoverflow.com/a/63531813/709975
# TODO: validate first and second have the same shape
M, N = first.shape i... | UTF-8 | Python | false | false | 1,686 | py | 158 | _matrix.py | 109 | 0.502966 | 0.46382 | 0 | 57 | 28.578947 | 79 |
Lorry1123/logging | 10,075,993,290,554 | 786c9052b1314d14b863d53f126b4bfdb24fdfc2 | 626d8d39c4864b8086b8aed3ecfed62ed4c52a7e | /logging_demo.py | ac2f977975d790f6e3c6b2873a5677307747905c | [] | no_license | https://github.com/Lorry1123/logging | 6f9424e8394e4916f2ea2ba43b4d981dcfe2365c | 2a26e1d7b0a53c3fad51bedcc2110dcbc323e7f2 | refs/heads/master | 2020-04-08T19:07:30.904086 | 2019-03-29T02:36:51 | 2019-03-29T02:36:51 | 159,641,002 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding: utf8
import sys
from exceptions import Exception
CRITICAL = 50
FATAL = CRITICAL
ERROR = 40
WARNING = 30
WARN = WARNING
INFO = 20
DEBUG = 10
NOTSET = 0
_levelNames = {
CRITICAL : 'CRITICAL',
ERROR : 'ERROR',
WARNING : 'WARNING',
INFO : 'INFO',
DEBUG : 'DEBUG',
NOTSET : 'NOTSET',
... | UTF-8 | Python | false | false | 3,738 | py | 4 | logging_demo.py | 2 | 0.587085 | 0.582797 | 0 | 167 | 21.347305 | 85 |
ii0/algorithms-6 | 7,859,790,181,301 | 9a1317a89a2eb0c8a2e2a76bb53f55d370f43457 | 1c7b5b866b505b7b8c47dce504c5bd27a34d5992 | /Leetcode/BinarySearch/69_Sqrt(x).py | 64813d0bf503b1347e64f80a499a7d92942f40b7 | [] | no_license | https://github.com/ii0/algorithms-6 | 2dbcb3df504810ea52b41e5129b334f62136d70a | 3eddc77d2f3dafffd177f2a9ee28e9850da2f020 | refs/heads/master | 2022-04-25T23:17:53.332297 | 2019-09-19T14:52:04 | 2019-09-19T14:52:04 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
author: buppter
datetime: 2019/8/8 12:45
题目描述:
实现 int sqrt(int x) 函数
Implement int sqrt(int x).
Compute and return the square root of x, where x is guaranteed to be a non-negative integer.
Since the return type is an integer, the decimal digits are truncated and only the
integer part of the result is returned.
... | UTF-8 | Python | false | false | 907 | py | 100 | 69_Sqrt(x).py | 98 | 0.544509 | 0.512139 | 0 | 43 | 19.116279 | 92 |
murrayrm/BioCRNPyler | 11,493,332,488,539 | a28076cc7ca78b0a63d58bdb0395a40ebb14ec54 | 5e6a21328057f91d489319533e1927b8107b9e0c | /biocrnpyler/dcas9.py | 980a4ab55d7178053a7eb4c642994dee9e5cb524 | [
"BSD-3-Clause"
] | permissive | https://github.com/murrayrm/BioCRNPyler | d84437326742a04ac508a7e068c19a8c8816d7d7 | 2e7d4c521b1ebdf7cff6867b25cbee014e0ee1a3 | refs/heads/master | 2020-07-05T10:12:56.382470 | 2020-04-23T20:03:01 | 2020-04-23T20:03:01 | 202,620,151 | 1 | 0 | BSD-3-Clause | true | 2019-08-15T22:35:16 | 2019-08-15T22:35:16 | 2019-08-14T16:57:46 | 2019-08-14T10:32:31 | 5,189 | 0 | 0 | 0 | null | false | false | # Copyright (c) 2019, Build-A-Cell. All rights reserved.
# See LICENSE file in the project root directory for details.
from .component import Component, RNA
from .mechanism import Reversible_Bimolecular_Binding
from .chemical_reaction_network import Species
class guideRNA(RNA):
def __init__(self, guide_name, d... | UTF-8 | Python | false | false | 2,369 | py | 29 | dcas9.py | 20 | 0.552976 | 0.542423 | 0 | 56 | 41.303571 | 80 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.