hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
241af3ee55d444a940c6be41db409a26214a6a55
3,587
py
Python
nzarttrainer.py
richwalm/nzarttrainer
82c020172106be871771c78675a58f71b0169b17
[ "0BSD" ]
2
2019-04-19T02:26:57.000Z
2021-06-22T13:19:57.000Z
nzarttrainer.py
richwalm/nzaarttrainer
82c020172106be871771c78675a58f71b0169b17
[ "0BSD" ]
2
2019-04-10T22:44:59.000Z
2020-04-06T23:30:33.000Z
nzarttrainer.py
richwalm/nzaarttrainer
82c020172106be871771c78675a58f71b0169b17
[ "0BSD" ]
3
2019-04-24T23:26:59.000Z
2020-04-10T11:38:01.000Z
#!/usr/bin/env python3 # NZART Exam Trainer # Written by Richard Walmsley <[email protected]> (ZL1RSW) from flask import Flask, request, render_template, redirect, url_for, Response, abort import random import string import json import sys app = Flask(__name__, static_folder = 's') # Constants. Neede...
24.073826
184
0.57346
0
0
0
0
1,746
0.486758
0
0
751
0.209367
241bc9ceeaf007cf8c3f1adcf1de894a391d7c80
325
py
Python
serving_patterns/src/app/api/_health.py
shibuiwilliam/ml-system-in-action
0aa9d6bc4a4346236b9c971ec90afad04bcf5cca
[ "MIT" ]
10
2020-08-30T03:19:10.000Z
2021-08-08T17:38:06.000Z
serving_patterns/src/app/api/_health.py
shibuiwilliam/ml-system-in-action
0aa9d6bc4a4346236b9c971ec90afad04bcf5cca
[ "MIT" ]
null
null
null
serving_patterns/src/app/api/_health.py
shibuiwilliam/ml-system-in-action
0aa9d6bc4a4346236b9c971ec90afad04bcf5cca
[ "MIT" ]
6
2020-08-30T03:19:13.000Z
2021-11-26T23:32:42.000Z
from typing import Dict import logging from src.middleware.profiler import do_cprofile logger = logging.getLogger(__name__) @do_cprofile def health() -> Dict[str, str]: return {"health": "ok"} def health_sync() -> Dict[str, str]: return health() async def health_async() -> Dict[str, str]: return heal...
17.105263
47
0.698462
0
0
0
0
72
0.221538
63
0.193846
12
0.036923
241ca7dfdf71434c66d3f603fa5f2372d432d554
2,498
py
Python
setup.py
michelp/cxxheaderparser
83bb2903790cf448bf838cdb8a93ca96e758bd1a
[ "BSD-3-Clause" ]
12
2020-12-28T09:40:53.000Z
2022-03-13T15:36:21.000Z
setup.py
michelp/cxxheaderparser
83bb2903790cf448bf838cdb8a93ca96e758bd1a
[ "BSD-3-Clause" ]
28
2021-01-04T14:58:59.000Z
2022-01-03T03:00:16.000Z
setup.py
michelp/cxxheaderparser
83bb2903790cf448bf838cdb8a93ca96e758bd1a
[ "BSD-3-Clause" ]
1
2021-11-06T03:44:53.000Z
2021-11-06T03:44:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from os.path import dirname, exists, join import sys, subprocess from setuptools import find_packages, setup setup_dir = dirname(__file__) git_dir = join(setup_dir, ".git") version_file = join(setup_dir, "cxxheaderparser", "version....
32.025641
92
0.667734
0
0
0
0
0
0
0
0
1,280
0.51241
241f3c603e35405488cc37103c843ad3e2397986
1,563
py
Python
RobotCode/RobotApi.py
HeapArt/DarkPaw
183c8943ed7bb3e771af019468566ff9d5ad6b2f
[ "MIT" ]
null
null
null
RobotCode/RobotApi.py
HeapArt/DarkPaw
183c8943ed7bb3e771af019468566ff9d5ad6b2f
[ "MIT" ]
null
null
null
RobotCode/RobotApi.py
HeapArt/DarkPaw
183c8943ed7bb3e771af019468566ff9d5ad6b2f
[ "MIT" ]
null
null
null
import json from flask import Blueprint, request from RobotCode import BehaviorDB from RobotCode.RobotModel import getRobotModel Robot_Api_BluePrint = Blueprint('Robot_Api_BluePrint', __name__, url_prefix="/robot_api") @Robot_Api_BluePrint.route('/getBehaviorMenu') def getBehaviorMenu(): return json.dumps(Behavior...
36.348837
117
0.726807
0
0
0
0
1,330
0.850928
0
0
366
0.234165
241f48c6616672f2a7e5001938c87fa2d8ef9975
2,126
py
Python
Rain/main.py
vanviethieuanh/art-with-python
dfd5e9b010a4d074ed01909474ff2876d5f3baaf
[ "MIT" ]
null
null
null
Rain/main.py
vanviethieuanh/art-with-python
dfd5e9b010a4d074ed01909474ff2876d5f3baaf
[ "MIT" ]
null
null
null
Rain/main.py
vanviethieuanh/art-with-python
dfd5e9b010a4d074ed01909474ff2876d5f3baaf
[ "MIT" ]
null
null
null
import pygame import random import math pygame.init() def newRain(width, rainlength): return (random.randint(-50,width),random.randint(-(rainlength),-(rainlength/2)),random.randint(1,3),0) def endpoint(start,length,angle): return ((start[0]+length*math.cos((angle/180)*math.pi)),(start[1])+length) ...
29.123288
110
0.540452
1,341
0.630762
0
0
0
0
0
0
32
0.015052
2420253761f3a882e54c81d9a136fc97fd5aabe5
818
py
Python
teachers/mixins.py
gtsiokos/diogenis
c83d4dac26df68bbbf897c48a5552ea9c9ede9c2
[ "BSD-3-Clause" ]
1
2019-08-16T13:47:46.000Z
2019-08-16T13:47:46.000Z
teachers/mixins.py
gtsiokos/diogenis
c83d4dac26df68bbbf897c48a5552ea9c9ede9c2
[ "BSD-3-Clause" ]
null
null
null
teachers/mixins.py
gtsiokos/diogenis
c83d4dac26df68bbbf897c48a5552ea9c9ede9c2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf8 -*- from django.http import Http404 from django.contrib.auth.decorators import user_passes_test from django.utils.decorators import method_decorator from diogenis.teachers.models import Teacher def user_is_teacher(user): try: request_user =...
32.72
88
0.722494
364
0.444988
0
0
314
0.383863
0
0
85
0.103912
24211de62e5f7ff2f91d6b34c32a4b78c252bb72
284
py
Python
tools/replace_fs.py
Dezorian/esp-canary
8cb597120b53d64e56a41e723539c371012b50fe
[ "MIT" ]
20
2021-05-06T19:36:01.000Z
2022-03-16T18:30:28.000Z
tools/replace_fs.py
shafr/esp-honeypot
add1daf680d12cf45776f87da6a478ab3576c974
[ "MIT" ]
16
2021-05-06T19:11:34.000Z
2021-12-23T19:26:16.000Z
tools/replace_fs.py
Dezorian/esp-canary
8cb597120b53d64e56a41e723539c371012b50fe
[ "MIT" ]
3
2021-05-12T10:24:30.000Z
2021-12-22T00:10:01.000Z
Import("env") import platform if platform.system() == 'Windows': print("Replace MKSPIFFSTOOL with mklittlefs.exe") env.Replace (MKSPIFFSTOOL = "tools/mklittlefs.exe") else: print("Replace MKSPIFFSTOOL with mklittlefs") env.Replace (MKSPIFFSTOOL = "tools/mklittlefs")
31.555556
55
0.725352
0
0
0
0
0
0
0
0
134
0.471831
2421fe0c328d6bbf457b874ac44ade8749c82265
371
py
Python
Message Bomber/Message Bomber with Random Words.py
SaiAshish-Konchada/Python-Projects-for-Beginners
bce0a705b636a1090b56f59205c6acb94ab2e54a
[ "MIT" ]
5
2021-01-19T18:32:13.000Z
2021-05-03T05:19:11.000Z
Message Bomber/Message Bomber with Random Words.py
SaiAshish-Konchada/Python-Projects-for-Beginners
bce0a705b636a1090b56f59205c6acb94ab2e54a
[ "MIT" ]
null
null
null
Message Bomber/Message Bomber with Random Words.py
SaiAshish-Konchada/Python-Projects-for-Beginners
bce0a705b636a1090b56f59205c6acb94ab2e54a
[ "MIT" ]
2
2021-05-22T13:35:51.000Z
2021-08-31T07:05:32.000Z
# importing the required libraries import pyautogui, time # delay to switch windows time.sleep(5) #setting count to 5 count = 5 # loop to spam while count >= 1: # fetch and type each word from the file pyautogui.write('Random Annoying Spam Words') # press enter to send the message pyautogui.press('ente...
23.1875
49
0.703504
0
0
0
0
0
0
0
0
220
0.592992
242215a9d56d1f78d8711fd6f634320bda681f1c
1,370
py
Python
helpers/midstate/midstate_test.py
mfkiwl/shapool-core
2223576a0cd6e52ffbc13f867600f0784f294b06
[ "BSD-3-Clause" ]
22
2018-05-28T15:17:10.000Z
2022-01-19T12:59:46.000Z
helpers/midstate/midstate_test.py
mfkiwl/shapool-core
2223576a0cd6e52ffbc13f867600f0784f294b06
[ "BSD-3-Clause" ]
24
2019-09-07T22:42:48.000Z
2021-08-04T15:31:34.000Z
helpers/midstate/midstate_test.py
mfkiwl/shapool-core
2223576a0cd6e52ffbc13f867600f0784f294b06
[ "BSD-3-Clause" ]
7
2018-05-14T15:56:00.000Z
2022-01-27T21:37:40.000Z
import binascii import midstate import pytest import struct def test_initial_state(): SHA256_H0 = bytes([ # Byte-swap 32-bit words 0x6a, 0x09, 0xe6, 0x67, 0xbb, 0x67, 0xae, 0x85, 0x3c, 0x6e, 0xf3, 0x72, 0xa5, 0x4f, 0xf5, 0x3a, 0x51, 0x0e, 0x52, 0x7f, 0x9b, 0...
28.541667
108
0.606569
0
0
0
0
0
0
0
0
165
0.120438
2422ddb221efb76a94a68ff38b54871aeac62562
289
py
Python
main/sort-array-by-parity-ii/sort-array-by-parity-ii.py
EliahKagan/old-practice-snapshot
1b53897eac6902f8d867c8f154ce2a489abb8133
[ "0BSD" ]
null
null
null
main/sort-array-by-parity-ii/sort-array-by-parity-ii.py
EliahKagan/old-practice-snapshot
1b53897eac6902f8d867c8f154ce2a489abb8133
[ "0BSD" ]
null
null
null
main/sort-array-by-parity-ii/sort-array-by-parity-ii.py
EliahKagan/old-practice-snapshot
1b53897eac6902f8d867c8f154ce2a489abb8133
[ "0BSD" ]
null
null
null
class Solution: def sortArrayByParityII(self, a): """ :type A: List[int] :rtype: List[int] """ evens = (x for x in a if x % 2 == 0) odds = (x for x in a if x % 2 == 1) return list(itertools.chain.from_iterable(zip(evens, odds)))
28.9
68
0.512111
288
0.99654
0
0
0
0
0
0
68
0.235294
24236339afd01ee7c1bc2adc58b3562319b17c37
3,485
py
Python
wrappers/tensorflow/tools/convert_to_bag.py
NobuoTsukamoto/librealsense
bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d
[ "Apache-2.0" ]
6,457
2016-01-21T03:56:07.000Z
2022-03-31T11:57:15.000Z
wrappers/tensorflow/tools/convert_to_bag.py
NobuoTsukamoto/librealsense
bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d
[ "Apache-2.0" ]
8,393
2016-01-21T09:47:28.000Z
2022-03-31T22:21:42.000Z
wrappers/tensorflow/tools/convert_to_bag.py
NobuoTsukamoto/librealsense
bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d
[ "Apache-2.0" ]
4,874
2016-01-21T09:20:08.000Z
2022-03-31T15:18:00.000Z
import numpy as np import cv2 import pyrealsense2 as rs import time, sys, glob focal = 0.0021 baseline = 0.08 sd = rs.software_device() depth_sensor = sd.add_sensor("Depth") intr = rs.intrinsics() intr.width = 848 intr.height = 480 intr.ppx = 637.951293945312 intr.ppy = 360.783233642578 intr.fx = 638.864135742188 in...
23.389262
74
0.672597
0
0
0
0
0
0
0
0
142
0.040746
2424352a464760abcf3b0b917902ab3292e94368
1,043
py
Python
src/experiments/eval_minimal.py
peldszus/evidencegraph
1720b74d801e738d08996f22e8be676114426408
[ "MIT" ]
3
2019-07-31T14:48:59.000Z
2021-09-01T07:26:15.000Z
src/experiments/eval_minimal.py
peldszus/evidencegraph
1720b74d801e738d08996f22e8be676114426408
[ "MIT" ]
7
2019-07-30T23:22:15.000Z
2021-05-22T14:11:02.000Z
src/experiments/eval_minimal.py
peldszus/evidencegraph
1720b74d801e738d08996f22e8be676114426408
[ "MIT" ]
1
2019-09-16T07:23:04.000Z
2019-09-16T07:23:04.000Z
from argparse import ArgumentParser from evidencegraph.argtree import RELATION_SETS_BY_NAME from evidencegraph.corpus import CORPORA from evidencegraph.evaluation import evaluate_setting if __name__ == "__main__": parser = ArgumentParser( description="""Evaluate argumentation parsing predictions""" )...
27.447368
68
0.637584
0
0
0
0
0
0
0
0
190
0.182167
2425800f04602f6f58d2c94bce88633d9eebc37c
4,221
py
Python
classifier/hist_classifier.py
adalrsjr1/smart-tuning
d8cb9f4ba41e7c068eda75b0fb581dcc8f329064
[ "MIT" ]
1
2021-10-04T18:02:55.000Z
2021-10-04T18:02:55.000Z
classifier/hist_classifier.py
adalrsjr1/smart-tuning
d8cb9f4ba41e7c068eda75b0fb581dcc8f329064
[ "MIT" ]
null
null
null
classifier/hist_classifier.py
adalrsjr1/smart-tuning
d8cb9f4ba41e7c068eda75b0fb581dcc8f329064
[ "MIT" ]
null
null
null
from common.dataaccess import MongoAccessLayer from common.timeutil import now import numpy as np import os import sys from classifier import workload_comparision as wc # data = [] # data.append({'metric': metric, 'mean': query_mean[0], 'std': query_std[0]}) # data = { # 'metrics': {'n_samples': QUERY_STE...
33.768
120
0.587302
2,900
0.687041
0
0
0
0
0
0
838
0.198531
2425854b676c78565d350a24516b06e65e8ec2fd
400
py
Python
scripts/return_length_of_string.py
arifulhaqueuc/python-algorithm-excersice
7f2c93be7f87cbe2a8527f4edbf6c45f01e0597e
[ "MIT" ]
null
null
null
scripts/return_length_of_string.py
arifulhaqueuc/python-algorithm-excersice
7f2c93be7f87cbe2a8527f4edbf6c45f01e0597e
[ "MIT" ]
4
2018-05-16T23:06:49.000Z
2018-10-26T22:47:52.000Z
scripts/return_length_of_string.py
arifulhaqueuc/python-algorithm-excersice
7f2c93be7f87cbe2a8527f4edbf6c45f01e0597e
[ "MIT" ]
null
null
null
''' Write a program that maps a list of words into a list of integers representing the lengths of the correponding words. Write it in three different ways: 1) using a for-loop, 2) using the higher order function map(), and 3) using list comprehensions. ''' #2 l = ['apple', 'orange', 'cat'] print map( la...
20
118
0.65
0
0
0
0
0
0
0
0
289
0.7225
2426476d2dec7acfd35014f0a631024c226cd418
10,199
py
Python
tests/test_cc_oop.py
J08nY/sec-certs
d25a4a7c830c587a45eb8e37d99f8794dec1a5eb
[ "MIT" ]
null
null
null
tests/test_cc_oop.py
J08nY/sec-certs
d25a4a7c830c587a45eb8e37d99f8794dec1a5eb
[ "MIT" ]
null
null
null
tests/test_cc_oop.py
J08nY/sec-certs
d25a4a7c830c587a45eb8e37d99f8794dec1a5eb
[ "MIT" ]
null
null
null
import filecmp import os import shutil import tempfile from datetime import date, datetime from pathlib import Path from tempfile import NamedTemporaryFile, TemporaryDirectory from unittest import TestCase import sec_certs.constants as constants import sec_certs.helpers as helpers from sec_certs.dataset.common_criteri...
42.319502
159
0.618002
9,729
0.95373
0
0
0
0
0
0
3,012
0.295265
24287f31ba2a1965f69b8b89ba6e4fe27f5a9ecc
1,234
py
Python
mountdisplay/clean.py
Smytten/Tangible_NFT_Thesis
50e6b43c85ec2836b3628015eac1f1389de4a261
[ "MIT", "Unlicense" ]
1
2022-03-25T20:39:31.000Z
2022-03-25T20:39:31.000Z
mountdisplay/clean.py
Smytten/Tangible_NFT_Thesis
50e6b43c85ec2836b3628015eac1f1389de4a261
[ "MIT", "Unlicense" ]
null
null
null
mountdisplay/clean.py
Smytten/Tangible_NFT_Thesis
50e6b43c85ec2836b3628015eac1f1389de4a261
[ "MIT", "Unlicense" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import inkyphat import time import sys print("""Inky pHAT: Clean Displays solid blocks of red, black, and white to clean the Inky pHAT display of any screen burn. """.format(sys.argv[0])) if len(sys.argv) < 2: print("""Usage: {} <colour> <number of cycles> V...
24.196078
81
0.620746
0
0
0
0
0
0
0
0
383
0.310373
242a238225ab546d0f4b2ffbed9eb41e67d70a41
1,165
py
Python
01-Introduction/index3.py
abhishekgahlot/competitive-programmer-handbook
bbb50c56fa1a2a35290cfc387f407c9b0cc3ec7e
[ "MIT" ]
133
2019-11-19T17:01:53.000Z
2022-03-22T09:28:48.000Z
01-Introduction/index3.py
abhishekgahlot/competitive-programmer-handbook
bbb50c56fa1a2a35290cfc387f407c9b0cc3ec7e
[ "MIT" ]
3
2019-12-30T04:31:22.000Z
2021-06-10T09:43:07.000Z
01-Introduction/index3.py
abhishekgahlot/competitive-programmer-handbook
bbb50c56fa1a2a35290cfc387f407c9b0cc3ec7e
[ "MIT" ]
54
2019-12-30T04:46:26.000Z
2022-03-23T19:29:48.000Z
# Python 3 version of index.py import math # Input -> 10 20 monkey a, b, c = input().split(' ') print(a, b, c) # Input with map -> 10 20 a, b = map(int, input().split(' ')) print(a, b) # Input with map -> 10, 20 a, b = map(int, input().split(',')) print(a, b) # Python has dynamic data type so integers, float are s...
19.098361
71
0.532189
0
0
0
0
0
0
0
0
550
0.472103
242ab6a7517cb79f3a010784bb05fa1bc62077cb
1,507
py
Python
project1/scoper-beginner.py
swtornio/pytools
40fa88fa754419b47f71d8f1043f266c9a308f74
[ "BSD-3-Clause" ]
null
null
null
project1/scoper-beginner.py
swtornio/pytools
40fa88fa754419b47f71d8f1043f266c9a308f74
[ "BSD-3-Clause" ]
null
null
null
project1/scoper-beginner.py
swtornio/pytools
40fa88fa754419b47f71d8f1043f266c9a308f74
[ "BSD-3-Clause" ]
null
null
null
# Project 1 - The Scope! # Scenario: Congrats, your Penetration testing company Red Planet has # landed an external assessment for Microsoft! Your point of contact has # give you a few IP addresses for you to test. Like with any test you # should always verify the scope given to you to make sure there wasn't # a mista...
33.488889
74
0.717319
0
0
0
0
0
0
0
0
1,189
0.788985
242c4a7387a45199ab823721a5e84a8b672f4b3c
96
py
Python
venv/lib/python3.8/site-packages/numpy/polynomial/setup.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/numpy/polynomial/setup.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/numpy/polynomial/setup.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/75/74/1f/cd550c3fd39c07a88abf9ca8d462c4c05077809e3ca61220a3837e78cd
96
96
0.895833
0
0
0
0
0
0
0
0
0
0
242e68ec4abda02a1ff36b6149be9f598d440417
4,408
py
Python
full_feature_version/bot/orchestrator.py
inevitablepc/RedditKarmaBot
1716e092f662e379995b28d26881ea33ea40000e
[ "MIT" ]
7
2020-06-24T11:36:31.000Z
2021-11-02T05:44:50.000Z
full_feature_version/bot/orchestrator.py
inevitablepc/RedditKarmaBot
1716e092f662e379995b28d26881ea33ea40000e
[ "MIT" ]
null
null
null
full_feature_version/bot/orchestrator.py
inevitablepc/RedditKarmaBot
1716e092f662e379995b28d26881ea33ea40000e
[ "MIT" ]
7
2020-04-05T22:49:11.000Z
2021-12-25T09:22:24.000Z
import itertools import logging import random from collections import defaultdict from concurrent.futures import wait from concurrent.futures.thread import ThreadPoolExecutor from bot import RedditBot from utils import rand_wait_min, rand_wait_sec class BotOrchestrator: def __init__(self, all_credentials: dict, ...
38.330435
110
0.622958
4,156
0.942831
0
0
0
0
0
0
349
0.079174
242e831fbeee71641da2d329c6f5ad06e8482bc8
10,476
py
Python
urdf2casadi/numpy_geom.py
ultrainren/urdf2casadi
42318720c2922977e7d57fa638ebf5ad1c092dd6
[ "MIT" ]
1
2020-03-30T10:26:31.000Z
2020-03-30T10:26:31.000Z
urdf2casadi/numpy_geom.py
ultrainren/urdf2casadi
42318720c2922977e7d57fa638ebf5ad1c092dd6
[ "MIT" ]
null
null
null
urdf2casadi/numpy_geom.py
ultrainren/urdf2casadi
42318720c2922977e7d57fa638ebf5ad1c092dd6
[ "MIT" ]
null
null
null
import numpy as np def normalize(v): nv = np.linalg.norm(v) if nv > 0.0: v[0] = v[0]/nv v[1] = v[1]/nv v[2] = v[2]/nv return v def skew_symmetric(v): """Returns a skew symmetric matrix from vector. p q r""" return np.array([[0, -v[2], v[1]], [v[2], 0,...
30.631579
96
0.55861
0
0
0
0
0
0
0
0
2,853
0.272337
242e9c8ba99915ee2b252e978052c11b8a27fd13
3,363
py
Python
2. Using Python to Interact with the Operating System/Week-7.py
indahpuspitaa17/IT-Automation-with-Python
f872324b25741769506cc8ef28b5176fb9fa8997
[ "MIT" ]
null
null
null
2. Using Python to Interact with the Operating System/Week-7.py
indahpuspitaa17/IT-Automation-with-Python
f872324b25741769506cc8ef28b5176fb9fa8997
[ "MIT" ]
null
null
null
2. Using Python to Interact with the Operating System/Week-7.py
indahpuspitaa17/IT-Automation-with-Python
f872324b25741769506cc8ef28b5176fb9fa8997
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import re import sys import operator import csv error_counter = {} error_user = {} info_user = {} #This function will read each line of the syslog.log file and check if it is an error or an info message. def search_file(): with open('syslog.log', "r") as myfile: for line in ...
31.429907
124
0.612548
0
0
0
0
0
0
0
0
958
0.284865
242f6533a1559e482c850161d329f84507d8bdcb
2,487
py
Python
twitter/envs/corpus.py
Ra-Ni/Twitter-Language-Identifier
95e28cc8b0cc7b2acd96f240134649a9e601bca7
[ "MIT" ]
null
null
null
twitter/envs/corpus.py
Ra-Ni/Twitter-Language-Identifier
95e28cc8b0cc7b2acd96f240134649a9e601bca7
[ "MIT" ]
null
null
null
twitter/envs/corpus.py
Ra-Ni/Twitter-Language-Identifier
95e28cc8b0cc7b2acd96f240134649a9e601bca7
[ "MIT" ]
null
null
null
from math import log10 from itertools import tee class Corpus: __global_corpus_frequency = 0.0 def __init__(self, size, depth, smoothing_value, label): self.depth = depth self.size = size self.smoothing_value = smoothing_value self.label = label self.frequencies = {}...
30.329268
115
0.617209
2,431
0.977483
0
0
0
0
0
0
0
0
242f6cf35d21cd6a48c92a34883a88441a76c341
16,117
py
Python
eex/translators/amber/amber_write.py
dgasmith/EEX
7608c9ef25931040524c75d227f0bee18de9ddc1
[ "BSD-3-Clause" ]
null
null
null
eex/translators/amber/amber_write.py
dgasmith/EEX
7608c9ef25931040524c75d227f0bee18de9ddc1
[ "BSD-3-Clause" ]
null
null
null
eex/translators/amber/amber_write.py
dgasmith/EEX
7608c9ef25931040524c75d227f0bee18de9ddc1
[ "BSD-3-Clause" ]
null
null
null
""" Writer for amber """ import time import pandas as pd import math import re import numpy as np from collections import Counter # Python 2/3 compat try: from StringIO import StringIO except ImportError: from io import StringIO import eex import logging # AMBER local imports from . import amber_metadata a...
37.481395
128
0.647453
0
0
0
0
0
0
0
0
5,504
0.341503
24312b312592739156a1fc2562fbc4d478ed5b64
8,457
py
Python
test/base/test_db_util.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
2
2016-02-23T00:09:14.000Z
2019-02-11T07:48:44.000Z
test/base/test_db_util.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
null
null
null
test/base/test_db_util.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
6
2015-05-27T13:09:50.000Z
2019-02-11T07:48:46.000Z
import galaxy.model from galaxy.model.orm import * from galaxy.model.mapping import context as sa_session from base.twilltestcase import * import sys def delete_obj( obj ): sa_session.delete( obj ) sa_session.flush() def delete_request_type_permissions( id ): rtps = sa_session.query( galaxy.model.RequestTy...
54.915584
112
0.620433
0
0
0
0
0
0
0
0
59
0.006976
24324bad9563b1de125f14982150d0bec0525c6c
7,085
py
Python
src/main.py
Mirris/ShiftManager1.1
6b3c1c76c8f66295053b1cf9f1187e57429cdd0b
[ "MIT" ]
null
null
null
src/main.py
Mirris/ShiftManager1.1
6b3c1c76c8f66295053b1cf9f1187e57429cdd0b
[ "MIT" ]
null
null
null
src/main.py
Mirris/ShiftManager1.1
6b3c1c76c8f66295053b1cf9f1187e57429cdd0b
[ "MIT" ]
null
null
null
from helpers.Logger import Logger from calendar import Calendar from employee import Employee import json import sys import prettytable import os import time import re # Logger setup logging = Logger() log = logging.realm('Shift Manager') def main(): # 1] Load Configuration file with open('../data/konfigurac...
39.361111
136
0.660833
0
0
0
0
0
0
0
0
2,865
0.404375
243302a8c8d74b6cc33c63504e8000d21f2d83c2
13,792
py
Python
polyphemus/utils.py
Xarthisius/polyphemus
3ae6cb9ff312d90478d8a294681bd898b7f45b1c
[ "BSD-2-Clause" ]
null
null
null
polyphemus/utils.py
Xarthisius/polyphemus
3ae6cb9ff312d90478d8a294681bd898b7f45b1c
[ "BSD-2-Clause" ]
null
null
null
polyphemus/utils.py
Xarthisius/polyphemus
3ae6cb9ff312d90478d8a294681bd898b7f45b1c
[ "BSD-2-Clause" ]
null
null
null
"""Helpers for polyphemus. Utilities API ============= """ from __future__ import print_function import os import io import re import sys import glob import tempfile import functools import subprocess from copy import deepcopy from pprint import pformat from collections import Mapping, Iterable, Hashable, Sequence, na...
30.113537
88
0.59491
6,393
0.46353
398
0.028857
331
0.023999
0
0
4,517
0.327509
24334f8a7788ca759e3c468b57d76d5b40d43699
6,698
py
Python
taxscrape.py
gehilley/KMESTaxScrape
1cf85049b6d2a5fbd532107fbe44f61197ac3263
[ "MIT" ]
null
null
null
taxscrape.py
gehilley/KMESTaxScrape
1cf85049b6d2a5fbd532107fbe44f61197ac3263
[ "MIT" ]
null
null
null
taxscrape.py
gehilley/KMESTaxScrape
1cf85049b6d2a5fbd532107fbe44f61197ac3263
[ "MIT" ]
null
null
null
output_filename = 'kings_mountain_taxes.csv' output_pfilename = 'kmes_taxes.p' base_url = "https://gis.smcgov.org/maps/rest/services/WEBAPPS/COUNTY_SAN_MATEO_TKNS/MapServer/identify" token = "fytmg9tR2rSx-1Yp0SWJ_qkAExGi-ftZoK7h4wk91UY." polygon = [(-13622312.48,4506393.674), (-13622866.64,4504129.241), ...
42.392405
127
0.597044
0
0
0
0
0
0
0
0
908
0.135563
2433c7c9ac2e786c1d378e6c6fc342567cb2343a
351
py
Python
445-with-phases/phase3/watcher/urls.py
ysyesilyurt/Metu-CENG
a83fcab00f68e28bda307bb94c060f55042a1389
[ "MIT" ]
33
2019-03-19T07:51:17.000Z
2022-03-15T11:04:35.000Z
445-with-phases/phase3/watcher/urls.py
ysyesilyurt/Metu-CENG
a83fcab00f68e28bda307bb94c060f55042a1389
[ "MIT" ]
1
2019-11-09T18:08:21.000Z
2019-11-09T18:08:21.000Z
445-with-phases/phase3/watcher/urls.py
ysyesilyurt/Metu-CENG
a83fcab00f68e28bda307bb94c060f55042a1389
[ "MIT" ]
13
2019-11-08T06:18:21.000Z
2022-01-07T17:17:38.000Z
from django.urls import path, re_path import multiprocessing import sys from . import views urlpatterns = [ path("", views.index, name='index'), path("create/", views.index, {"create": True}, name="create"), re_path(r"^logs/(?P<wid>[0-9]+)$", views.logs, name='logs'), re_path(r"^rules/(?P<wid>[0-9]+)$"...
29.25
66
0.635328
0
0
0
0
0
0
0
0
98
0.279202
2434d249e12d70943c3d01c03f5b85d253a6fbdb
344
py
Python
json_endpoint/middleware.py
nickloman/entrezajax
d487a2ccf02e9e5bce5d4cba95d7a73edf43b329
[ "Apache-2.0" ]
4
2015-06-21T01:49:39.000Z
2022-01-19T19:51:00.000Z
json_endpoint/middleware.py
nickloman/entrezajax
d487a2ccf02e9e5bce5d4cba95d7a73edf43b329
[ "Apache-2.0" ]
1
2015-08-28T06:54:45.000Z
2016-03-03T17:21:48.000Z
json_endpoint/middleware.py
nickloman/entrezajax
d487a2ccf02e9e5bce5d4cba95d7a73edf43b329
[ "Apache-2.0" ]
2
2016-10-25T14:28:08.000Z
2020-07-10T01:46:29.000Z
from views import dump_result from django.http import HttpResponse class ErrorHandlingMiddleware(object): def process_exception(self, request, exception): response = HttpResponse(mimetype="application/json") error = {'error' : True, 'error_message' : str(exception)} dump_result(request, response, [], error) ...
26.461538
60
0.752907
266
0.773256
0
0
0
0
0
0
40
0.116279
24353a8838c097071f87e4366d98031a90d7f990
555
py
Python
Dataset/Leetcode/train/94/679.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/94/679.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/94/679.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def XXX(self, root: TreeNode) -> List[int]: stack=[(None,root)] result=[] while stack: val,node=stack.pop() if val!=None: result.append(val) if node: stack.append([node.val,node.right]) if no...
29.210526
139
0.52973
400
0.720721
0
0
0
0
0
0
12
0.021622
24373e60d1c6cfd7a90fe027f9d7f55cebc34e56
4,552
py
Python
cfg/generate_nerian_config_cpp.py
RaminYT/nerian_stereo
39c03650695b462516d47594ba8f9e3d808eac15
[ "MIT" ]
null
null
null
cfg/generate_nerian_config_cpp.py
RaminYT/nerian_stereo
39c03650695b462516d47594ba8f9e3d808eac15
[ "MIT" ]
null
null
null
cfg/generate_nerian_config_cpp.py
RaminYT/nerian_stereo
39c03650695b462516d47594ba8f9e3d808eac15
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2019 Nerian Vision GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, m...
41.381818
132
0.712214
0
0
0
0
0
0
0
0
3,589
0.788445
24377195af086d2d9b533b86147cc02d046d8a1c
2,263
py
Python
tests/test_arraycoords_core.py
sakshamsingh1/micarraylib
e3a87a1ee55dce50ce33d0dfa23e266b733de535
[ "CC-BY-4.0" ]
11
2021-11-14T19:33:33.000Z
2022-03-17T20:38:27.000Z
tests/test_arraycoords_core.py
sakshamsingh1/micarraylib
e3a87a1ee55dce50ce33d0dfa23e266b733de535
[ "CC-BY-4.0" ]
7
2022-01-17T17:50:49.000Z
2022-03-31T14:42:34.000Z
tests/test_arraycoords_core.py
sakshamsingh1/micarraylib
e3a87a1ee55dce50ce33d0dfa23e266b733de535
[ "CC-BY-4.0" ]
4
2021-11-16T14:05:11.000Z
2022-03-23T00:35:00.000Z
from micarraylib.arraycoords.core import micarray from micarraylib.arraycoords import array_shapes_raw from micarraylib.arraycoords.array_shapes_utils import _polar2cart import pytest import numpy as np def test_micarray_init(): arr = micarray(array_shapes_raw.cube2l_raw, "cartesian", None, "foo") assert arr...
33.776119
83
0.691118
0
0
0
0
0
0
0
0
356
0.157313
24394928ea89d1fbae27a1d71e8a36f43eb76722
519
py
Python
ocr/utils/toDataURL.py
takuya-motoshima/document-scanner
7e4c2821ec21ba96468bcbe512bd0d40f653b0e1
[ "MIT" ]
null
null
null
ocr/utils/toDataURL.py
takuya-motoshima/document-scanner
7e4c2821ec21ba96468bcbe512bd0d40f653b0e1
[ "MIT" ]
null
null
null
ocr/utils/toDataURL.py
takuya-motoshima/document-scanner
7e4c2821ec21ba96468bcbe512bd0d40f653b0e1
[ "MIT" ]
null
null
null
import ocr.utils as utils def toDataURL(img, mime = None): """Image to Data URL. Args: img: CV2 Image object or image path. mime: The media type of the Data URL. Required if the image is an CV2 Image object. Returns: Return Data URL and MIME type. Raises: ValueError: Image types other...
30.529412
88
0.662813
0
0
0
0
0
0
0
0
388
0.747592
24395c699d46f97162aa14777bf15b0856cae6e4
491
py
Python
Math/Leetcode5839.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
Math/Leetcode5839.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
Math/Leetcode5839.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
import math import heapq class Solution: def minStoneSum(self, piles, k: int) -> int: q=list() for i in piles: heapq.heappush(q,i) while k: c=q[-1] q.pop() c=c-math.floor(c/2) heapq.heappush(q,c) k-=1 res=0 ...
20.458333
48
0.462322
348
0.708758
0
0
0
0
0
0
10
0.020367
243d8aae60e65abfff3ef3919928ba2a9f7df693
159
py
Python
deui/html/view/nav_element.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
1
2021-10-17T01:54:18.000Z
2021-10-17T01:54:18.000Z
deui/html/view/nav_element.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
null
null
null
deui/html/view/nav_element.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
null
null
null
from .element import Element class Navigation(Element): """ Represents navigation link section. """ def __str__(self): return "nav"
14.454545
39
0.628931
127
0.798742
0
0
0
0
0
0
56
0.352201
243dfce68d8d96b57a4debd0c241a4c97b4273fc
18,562
py
Python
LeapTrello.py
reaktor/trellol
13220a4a67d78ec04f96bdea9fbb0bd9e9541d67
[ "MIT" ]
1
2016-06-22T10:33:51.000Z
2016-06-22T10:33:51.000Z
LeapTrello.py
reaktor/trellol
13220a4a67d78ec04f96bdea9fbb0bd9e9541d67
[ "MIT" ]
null
null
null
LeapTrello.py
reaktor/trellol
13220a4a67d78ec04f96bdea9fbb0bd9e9541d67
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ Leap Motion + Trello A plain Trello view with Leap Motion UI. """ import Leap, sys, os, math, time import ConfigParser, argparse from collections import deque from PyQt...
34.437848
119
0.609094
16,879
0.909331
0
0
0
0
0
0
2,272
0.122401
243e4ebb71651a1947d9bfa01a4d3102ca1fdc2f
5,115
py
Python
kcwidrp/primitives/SubtractSky.py
scizen9/KCWI_DRP
1d82ee4f82be491628d6baa555401c18aa0472a2
[ "BSD-3-Clause" ]
5
2020-04-09T20:05:52.000Z
2021-08-04T18:04:28.000Z
kcwidrp/primitives/SubtractSky.py
scizen9/KCWI_DRP
1d82ee4f82be491628d6baa555401c18aa0472a2
[ "BSD-3-Clause" ]
80
2020-03-19T00:35:27.000Z
2022-03-07T20:08:23.000Z
kcwidrp/primitives/SubtractSky.py
scizen9/KCWI_DRP
1d82ee4f82be491628d6baa555401c18aa0472a2
[ "BSD-3-Clause" ]
9
2021-01-22T02:00:32.000Z
2022-02-08T19:43:16.000Z
from keckdrpframework.primitives.base_primitive import BasePrimitive from kcwidrp.primitives.kcwi_file_primitives import kcwi_fits_reader, \ kcwi_fits_writer, get_master_name, strip_fname import os class SubtractSky(BasePrimitive): def __init__(self, action, context): BasePrimitive.__init__(self, act...
38.75
85
0.504594
4,910
0.959922
0
0
0
0
0
0
768
0.150147
243f3be35cd23daccbea4684b6c7521e62d8c778
2,517
py
Python
ask-sdk-model-runtime/ask_sdk_model_runtime/api_configuration.py
Signal-Kinetics/alexa-apis-for-python
abb8d3dce18a5510c48b215406ed36c024f01495
[ "Apache-2.0" ]
90
2018-09-19T21:56:42.000Z
2022-03-30T11:25:21.000Z
ask-sdk-model-runtime/ask_sdk_model_runtime/api_configuration.py
Signal-Kinetics/alexa-apis-for-python
abb8d3dce18a5510c48b215406ed36c024f01495
[ "Apache-2.0" ]
11
2018-09-23T12:16:48.000Z
2021-06-10T19:49:45.000Z
ask-sdk-model-runtime/ask_sdk_model_runtime/api_configuration.py
Signal-Kinetics/alexa-apis-for-python
abb8d3dce18a5510c48b215406ed36c024f01495
[ "Apache-2.0" ]
28
2018-09-19T22:30:38.000Z
2022-02-22T22:57:07.000Z
# -*- coding: utf-8 -*- # # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may # not use this file except in compliance with the License. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # or in ...
41.95
80
0.72507
1,808
0.718315
0
0
0
0
0
0
2,037
0.809297
24400036af7843669245f2d059e89cd38ee90833
15,581
py
Python
test/unit/test_globals.py
cstockton/py-emit
3c240afb4a6159aa3a9a5930c0f6a606d41370b1
[ "MIT" ]
null
null
null
test/unit/test_globals.py
cstockton/py-emit
3c240afb4a6159aa3a9a5930c0f6a606d41370b1
[ "MIT" ]
null
null
null
test/unit/test_globals.py
cstockton/py-emit
3c240afb4a6159aa3a9a5930c0f6a606d41370b1
[ "MIT" ]
3
2017-08-29T22:59:25.000Z
2020-02-21T19:13:41.000Z
import pytest import random import time import itertools from multiprocessing.pool import ThreadPool from datetime import timedelta from emit.globals import Proxy, GuardedProxy, Config, ConfigDescriptor, LoggerProxy, log, conf from ..helpers import TestCase @pytest.mark.conf @pytest.mark.log @pytest.mark.proxy class ...
35.654462
102
0.638021
15,124
0.970669
0
0
14,216
0.912393
0
0
2,570
0.164944
2441847130be3f39e5967ae0ebdadf4d608571ad
374
py
Python
exercicios/01.py
paulo123araujo/minicurso-python
31cd0a168c9cd692a675a9af5172460a11c38916
[ "MIT" ]
null
null
null
exercicios/01.py
paulo123araujo/minicurso-python
31cd0a168c9cd692a675a9af5172460a11c38916
[ "MIT" ]
null
null
null
exercicios/01.py
paulo123araujo/minicurso-python
31cd0a168c9cd692a675a9af5172460a11c38916
[ "MIT" ]
null
null
null
numeros = input("Digite dois números: ").split(" ") num1 = float(numeros[0]) num2 = float(numeros[1]) # print(f"{num1} + {num2} = {num1 + num2}") print("%.2f + %.2f = %.2f" %(num1, num2, (num1 + num2))) # print(num1, "+", num2, "=", num1 + num2) print(num1, "-", num2, "=", num1 - num2) print(num1, "*", num2, "=", n...
24.933333
56
0.537433
0
0
0
0
0
0
0
0
150
0.4
2442557711a70e9fcc1b17d9d62fad88b7a458da
2,149
py
Python
src/stats/__main__.py
bmcculley/pycalcstats
74501b3fb2c5c061e5629eed127d8554345c0bd3
[ "MIT" ]
null
null
null
src/stats/__main__.py
bmcculley/pycalcstats
74501b3fb2c5c061e5629eed127d8554345c0bd3
[ "MIT" ]
null
null
null
src/stats/__main__.py
bmcculley/pycalcstats
74501b3fb2c5c061e5629eed127d8554345c0bd3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ## Copyright (c) 2011 Steven D'Aprano. ## See the file __init__.py for the licence terms for this software. """ Run the stats package as if it were an executable module. Usage: $ python3 -m stats [options] Options: -h --help Print this help text. -V --version Print the ...
29.040541
73
0.642624
0
0
0
0
0
0
0
0
1,021
0.475105
2442c8f27888189c71758520f5da703f6def7184
4,277
py
Python
tests/field_test.py
intelligenceunion/mongo-driver
02bbc6839c8264d4b06b053e8cc83d42147ede17
[ "MIT" ]
null
null
null
tests/field_test.py
intelligenceunion/mongo-driver
02bbc6839c8264d4b06b053e8cc83d42147ede17
[ "MIT" ]
null
null
null
tests/field_test.py
intelligenceunion/mongo-driver
02bbc6839c8264d4b06b053e8cc83d42147ede17
[ "MIT" ]
1
2019-06-21T17:49:08.000Z
2019-06-21T17:49:08.000Z
import unittest import pymongo import datetime from bson import ObjectId from iu_mongo import Document, connect from iu_mongo.fields import * from iu_mongo.errors import ValidationError import iu_mongo class Person(Document): meta = { 'db_name': 'test' } name = StringField() age = IntField(def...
35.347107
79
0.599018
4,071
0.951391
0
0
0
0
0
0
503
0.117551
2443bc2de907a14da3ae31b312cee64e8728b751
2,821
py
Python
signing/bin/sign_image.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
null
null
null
signing/bin/sign_image.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
2
2021-03-26T00:29:32.000Z
2021-04-30T21:29:33.000Z
signing/bin/sign_image.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Chrome OS Image file signing.""" from __future__ import print_function import collections from chromite.lib import commandli...
38.121622
80
0.700815
81
0.028713
0
0
0
0
0
0
1,515
0.537044
2444309351fb1815ca19b79bdbd6b418c960ad90
3,874
py
Python
bitsv/network/services/bchsvexplorer.py
yoursmengle/bitsv
387ff649e3916521fc3528469fdb0eef9c97e624
[ "MIT" ]
1
2019-06-28T05:20:07.000Z
2019-06-28T05:20:07.000Z
bitsv/network/services/bchsvexplorer.py
joshua-s/bitsv
8ca960c39cef7a7d655011fba690510684190f1e
[ "MIT" ]
1
2020-01-10T13:16:36.000Z
2020-01-10T13:16:36.000Z
bitsv/network/services/bchsvexplorer.py
yoursmengle/bitsv
387ff649e3916521fc3528469fdb0eef9c97e624
[ "MIT" ]
null
null
null
import requests import json from decimal import Decimal from bitsv.network import currency_to_satoshi from bitsv.network.meta import Unspent # left here as a reminder to normalize get_transaction() from bitsv.network.transaction import Transaction, TxInput, TxOutput from bitsv.constants import BSV DEFAULT_TIMEOUT = ...
33.982456
93
0.617708
3,520
0.908622
0
0
2,745
0.70857
0
0
894
0.230769
2444ac3c50dcef8edaf375b5ced228049606008a
336
py
Python
utils/common.py
Dineshs91/django-revert-test
e1954f287427e74255f17fb56886fbf90580ab77
[ "MIT" ]
null
null
null
utils/common.py
Dineshs91/django-revert-test
e1954f287427e74255f17fb56886fbf90580ab77
[ "MIT" ]
null
null
null
utils/common.py
Dineshs91/django-revert-test
e1954f287427e74255f17fb56886fbf90580ab77
[ "MIT" ]
null
null
null
from rest_framework.response import Response def create_response(data=None, error=None, status=None): if 200 <= status < 400: success = True else: success = False response = { "data": data, "error": error, "success": success } return Response(data=response,...
21
56
0.607143
0
0
0
0
0
0
0
0
22
0.065476
24468a96f003b4054d7dff4b59d198dddc557f17
1,699
py
Python
email-updates-stonks-AI-ML/venv/Lib/site-packages/pandas_datareader/econdb.py
iVibudh/stock-prediction
3900619224bb86e382c782d39138914294199733
[ "MIT" ]
1
2021-02-06T21:00:00.000Z
2021-02-06T21:00:00.000Z
venv/lib/python3.8/site-packages/pandas_datareader/econdb.py
jsherretts/stock-trading-bot
234bd7b1e67e6e2d9c728dce1851e020aab0662e
[ "MIT" ]
2
2021-03-31T19:54:17.000Z
2021-06-02T02:33:56.000Z
venv/lib/python3.8/site-packages/pandas_datareader/econdb.py
jsherretts/stock-trading-bot
234bd7b1e67e6e2d9c728dce1851e020aab0662e
[ "MIT" ]
1
2021-07-28T20:35:14.000Z
2021-07-28T20:35:14.000Z
import pandas as pd import requests from pandas_datareader.base import _BaseReader class EcondbReader(_BaseReader): """Get data for the given name from Econdb.""" _URL = "https://www.econdb.com/api/series/" _format = None _show = "labels" @property def url(self): """API URL""" ...
29.293103
88
0.535021
1,612
0.948793
0
0
271
0.159506
0
0
378
0.222484
2446ff9bc5f75c50ae2d83b9186ef463217c4dff
2,500
py
Python
adet/modeling/SparseMaskInst/SparseMaskEncoding/utils.py
shuaiqi361/AdelaiDet
35d944033a8d2f7aa623ad607b57bd8a1fe88b43
[ "BSD-2-Clause" ]
null
null
null
adet/modeling/SparseMaskInst/SparseMaskEncoding/utils.py
shuaiqi361/AdelaiDet
35d944033a8d2f7aa623ad607b57bd8a1fe88b43
[ "BSD-2-Clause" ]
null
null
null
adet/modeling/SparseMaskInst/SparseMaskEncoding/utils.py
shuaiqi361/AdelaiDet
35d944033a8d2f7aa623ad607b57bd8a1fe88b43
[ "BSD-2-Clause" ]
null
null
null
# coding:utf-8 import numpy as np import torch import math class IOUMetric(object): """ Class to calculate mean-iou using fast_hist method """ def __init__(self, num_classes): self.num_classes = num_classes self.hist = np.zeros((num_classes, num_classes)) def _fast_hist(self, la...
35.211268
106
0.6164
1,200
0.48
0
0
1,083
0.4332
0
0
569
0.2276
2447e0552af3107be48ac3a9066299a7b4696ec1
188
py
Python
backend/database/__init__.py
Stampeder525/police-data-trust-1
5fdc9d58ed51e23f1b23c626c5b97a58c3da57d8
[ "MIT" ]
null
null
null
backend/database/__init__.py
Stampeder525/police-data-trust-1
5fdc9d58ed51e23f1b23c626c5b97a58c3da57d8
[ "MIT" ]
null
null
null
backend/database/__init__.py
Stampeder525/police-data-trust-1
5fdc9d58ed51e23f1b23c626c5b97a58c3da57d8
[ "MIT" ]
null
null
null
# flake8: noqa: F401 from .core import db from .core import db_cli from .core import execute_query from .models.incidents import Incidents, IncidentSchema from .models.users import Users
23.5
55
0.803191
0
0
0
0
0
0
0
0
20
0.106383
24483a88227f9c9ae585353b8fb8fe058a952b42
11,524
py
Python
nautobot_chatops/api/views/mattermost.py
smk4664/nautobot-plugin-chatops
223d15a8a3364b44740f2912b44a2f11837946b3
[ "Apache-2.0" ]
null
null
null
nautobot_chatops/api/views/mattermost.py
smk4664/nautobot-plugin-chatops
223d15a8a3364b44740f2912b44a2f11837946b3
[ "Apache-2.0" ]
null
null
null
nautobot_chatops/api/views/mattermost.py
smk4664/nautobot-plugin-chatops
223d15a8a3364b44740f2912b44a2f11837946b3
[ "Apache-2.0" ]
null
null
null
"""Views to receive inbound notifications from Mattermost, parse them, and enqueue worker actions.""" import json import logging import shlex from django.conf import settings from django.http import HttpResponse from django.utils.decorators import method_decorator from django.views import View from django.views.decor...
42.681481
117
0.622527
8,776
0.761541
0
0
8,872
0.769872
0
0
4,224
0.366539
244b171397f7962fd703f3299789a0f3c13a25b6
2,592
py
Python
lib/tclient.py
AjaxVM/hiths-pyweek6
6661ddb8b7c75b0788ce41a411838bc28d59d284
[ "Unlicense" ]
null
null
null
lib/tclient.py
AjaxVM/hiths-pyweek6
6661ddb8b7c75b0788ce41a411838bc28d59d284
[ "Unlicense" ]
null
null
null
lib/tclient.py
AjaxVM/hiths-pyweek6
6661ddb8b7c75b0788ce41a411838bc28d59d284
[ "Unlicense" ]
null
null
null
from twisted.spread import pb from twisted.internet import reactor from tserver import User, CopyUser import sys, signal player_count = 0 loop = 0 client = None game_creator = False class Client(pb.Referenceable): def __init__(self, name): self.name = name self.players = [] def connected(sel...
26.181818
64
0.649691
1,049
0.404707
0
0
0
0
0
0
439
0.169367
244c391e531a230265dcfe8e38f79f69557d41fd
2,401
py
Python
discordspy/utils.py
NextChai/discordspy
a6f4f2f1c9ad9facfdb92e653d0d9655606878fa
[ "MIT" ]
null
null
null
discordspy/utils.py
NextChai/discordspy
a6f4f2f1c9ad9facfdb92e653d0d9655606878fa
[ "MIT" ]
null
null
null
discordspy/utils.py
NextChai/discordspy
a6f4f2f1c9ad9facfdb92e653d0d9655606878fa
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2021 NextChai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist...
33.816901
85
0.68055
1,228
0.511454
0
0
614
0.255727
0
0
1,382
0.575594
244de003b0cb8a85188f7fa3c01262ae70811773
218
py
Python
nglview/color.py
i386uk/nglview
39e207e474ef85feb0e4928d02d2d68428435b15
[ "MIT" ]
null
null
null
nglview/color.py
i386uk/nglview
39e207e474ef85feb0e4928d02d2d68428435b15
[ "MIT" ]
null
null
null
nglview/color.py
i386uk/nglview
39e207e474ef85feb0e4928d02d2d68428435b15
[ "MIT" ]
null
null
null
COLOR_SCHEMES = [ " ", "picking", "random", "uniform", "atomindex", "residueindex", "chainindex", "modelindex", "sstruc", "element", "resname", "bfactor", "hydrophobicity", "value", "volume", "occupancy" ]
36.333333
74
0.619266
0
0
0
0
0
0
0
0
155
0.711009
244f5d19d999147c55383cd2348a0a544bf75692
5,007
py
Python
dump/gui_v1.0.py
axcelerateai/Urdu-Handwriting-Recognition-using-Deep-Learning
38c6e4676b393feac380781cf37ce1abf8051132
[ "MIT" ]
3
2020-10-09T13:30:47.000Z
2021-11-03T17:55:47.000Z
dump/gui_v1.0.py
axcelerateai/Urdu-Handwriting-Recognition-using-Deep-Learning
38c6e4676b393feac380781cf37ce1abf8051132
[ "MIT" ]
2
2020-06-12T20:03:56.000Z
2020-06-16T03:53:17.000Z
dump/gui_v1.0.py
axcelerateai/Urdu-Handwriting-Recognition-using-Deep-Learning
38c6e4676b393feac380781cf37ce1abf8051132
[ "MIT" ]
3
2021-02-25T03:30:32.000Z
2022-02-07T20:04:19.000Z
import os import webbrowser import numpy as np import csv import traceback import arabic_reshaper from tkinter import * from tkinter import messagebox from tkinter.filedialog import askopenfilename from PIL import ImageTk, Image from run_model import create_and_run_model def make_menu(w): global the_menu the_m...
35.764286
94
0.656481
0
0
0
0
0
0
0
0
918
0.183343
244f65c4acce4ecfa1f271d50891f6d421d26621
1,394
py
Python
crispy/modules/download.py
hanshoffman/crispy-fortnight
6b69b0db95eb9beb5e977fdba7c6dcf1f015f6c7
[ "MIT" ]
6
2016-03-12T01:16:55.000Z
2016-08-08T04:35:54.000Z
crispy/modules/download.py
hansjhoffman/crispy-fortnight
6b69b0db95eb9beb5e977fdba7c6dcf1f015f6c7
[ "MIT" ]
17
2016-03-14T01:10:56.000Z
2016-06-28T20:42:36.000Z
crispy/modules/download.py
hanshoffman/crispy-fortnight
6b69b0db95eb9beb5e977fdba7c6dcf1f015f6c7
[ "MIT" ]
4
2016-03-16T01:17:29.000Z
2016-05-11T17:20:39.000Z
import logging import os from crispy.lib.myparser import CrispyArgumentParser from rpyc.utils.classic import download from crispy.lib.module import * from crispy.lib.fprint import * logger = logging.getLogger(__name__) __class_name__ = "DownloadModule" class DownloadModule(CrispyModule): """ Download file from r...
34
85
0.644907
1,137
0.815638
0
0
0
0
0
0
333
0.238881
245279e99eccc5a89222148405717013b6bf5d45
4,042
py
Python
blaspy/level_2/trmv.py
nicholas-moreles/blaspy
c4af6258e17dd996c4b6d90bbaae15b31b8702b4
[ "BSD-3-Clause" ]
4
2015-01-25T12:44:44.000Z
2022-03-19T08:36:19.000Z
blaspy/level_2/trmv.py
nicholas-moreles/blaspy
c4af6258e17dd996c4b6d90bbaae15b31b8702b4
[ "BSD-3-Clause" ]
7
2015-01-20T13:35:39.000Z
2015-05-31T17:11:50.000Z
blaspy/level_2/trmv.py
nicholas-moreles/blaspy
c4af6258e17dd996c4b6d90bbaae15b31b8702b4
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2014-2015-2015, The University of Texas at Austin. All rights reserved. This file is part of BLASpy and is available under the 3-Clause BSD License, which can be found in the LICENSE file at the top-level directory or at http://opensource.org/licenses/BSD-3-Clause """ from ..he...
42.104167
98
0.621475
0
0
0
0
0
0
0
0
2,958
0.731816
2453cf34dc912ae247fbb288fdddd145a7ca95cb
13,822
py
Python
Neural Style Transfer/model.py
KingJamesSong/FastDifferentiableMatSqrt
ab5278195e25df0192096581e0c0c288e0c66bd2
[ "MIT" ]
15
2022-01-21T11:57:01.000Z
2022-03-27T07:22:16.000Z
Neural Style Transfer/model.py
KingJamesSong/FastDifferentiableMatSqrt
ab5278195e25df0192096581e0c0c288e0c66bd2
[ "MIT" ]
null
null
null
Neural Style Transfer/model.py
KingJamesSong/FastDifferentiableMatSqrt
ab5278195e25df0192096581e0c0c288e0c66bd2
[ "MIT" ]
1
2022-01-24T11:29:25.000Z
2022-01-24T11:29:25.000Z
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from utils.torch_utils import * class Content_Encoder(nn.Module): def __init__(self, conv_dim=64, repeat_num=4, norm='in', activation='relu'): super(Content_Encoder, self).__init__() layers = [] ...
39.491429
156
0.576183
13,639
0.98676
0
0
0
0
0
0
1,460
0.105629
2454b360d09c5f23627ef46676a5ffb7718dbdfb
69
py
Python
Reading Data/lesson-12-vancouver-crime-information/tests/test_late_crimes_2.py
danielgarm/Data-Science-and-Machine-Learning
fa3e85cc42eb2e9f964ab5abb34d1c93e16d1cd9
[ "MIT" ]
null
null
null
Reading Data/lesson-12-vancouver-crime-information/tests/test_late_crimes_2.py
danielgarm/Data-Science-and-Machine-Learning
fa3e85cc42eb2e9f964ab5abb34d1c93e16d1cd9
[ "MIT" ]
2
2022-01-11T21:04:51.000Z
2022-01-11T21:05:05.000Z
Reading Data/lesson-12-vancouver-crime-information/tests/test_late_crimes_2.py
danielgarm/Data-Science-and-Machine-Learning
fa3e85cc42eb2e9f964ab5abb34d1c93e16d1cd9
[ "MIT" ]
null
null
null
def test_late_crimes_2(): assert late_crimes.loc[7, 'HOUR'] == 20
34.5
43
0.695652
0
0
0
0
0
0
0
0
6
0.086957
2455cb80e1aaf2ba0d39b50ac976cccb541ad91b
13,355
py
Python
main.py
hunterowens/frankenstein
36305cad0ab6552597c707c813d20eaa3ad38f81
[ "Apache-2.0" ]
2
2018-10-17T02:27:59.000Z
2019-03-12T00:58:48.000Z
main.py
hunterowens/frankenstein
36305cad0ab6552597c707c813d20eaa3ad38f81
[ "Apache-2.0" ]
null
null
null
main.py
hunterowens/frankenstein
36305cad0ab6552597c707c813d20eaa3ad38f81
[ "Apache-2.0" ]
null
null
null
import json import pythonosc import argparse import math import datetime from pythonosc import dispatcher, osc_server, udp_client, osc_message_builder import requests from collections import OrderedDict from statistics import mean ## added variables to change the ip and port easily ## testing if Git works with ST ip...
31.646919
198
0.653463
0
0
0
0
0
0
0
0
5,614
0.420367
2456194d25cdc4ce95af04bc56ef7e00c8643248
635
py
Python
src/lit_tracking/utils/run_converter.py
Actis92/lit-tracking
9e7b243ba77c80ca260bff479e54db271d10c195
[ "MIT" ]
null
null
null
src/lit_tracking/utils/run_converter.py
Actis92/lit-tracking
9e7b243ba77c80ca260bff479e54db271d10c195
[ "MIT" ]
14
2021-11-01T08:48:23.000Z
2022-01-08T14:20:17.000Z
src/lit_tracking/utils/run_converter.py
Actis92/lit-tracking
9e7b243ba77c80ca260bff479e54db271d10c195
[ "MIT" ]
null
null
null
import argparse import importlib if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--input_path', help='Path that contains data in MOT format', required=True) parser.add_argument('--output_path', help='Path that will contains the output', required=True) parser.add_argum...
48.846154
109
0.754331
0
0
0
0
0
0
0
0
198
0.311811
2456670193398aaa3aace6b23615d552f25b4839
5,825
py
Python
test/test_npu/test_network_ops/test_neg.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_network_ops/test_neg.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_network_ops/test_neg.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
41.607143
85
0.635365
4,918
0.844292
0
0
0
0
0
0
618
0.106094
2456f6933037766ba90c0161dd21869ac9959ef3
370
py
Python
Web_decoder_2.py
cegador/python_exercises
cdae01f845288475c00ed4c7c45db17e7dfb751e
[ "MIT" ]
null
null
null
Web_decoder_2.py
cegador/python_exercises
cdae01f845288475c00ed4c7c45db17e7dfb751e
[ "MIT" ]
null
null
null
Web_decoder_2.py
cegador/python_exercises
cdae01f845288475c00ed4c7c45db17e7dfb751e
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup url = 'https://www.vanityfair.com/style/society/2014/06/monica-lewinsky-humiliation-culture' vf = requests.get(url) vf.status_code s = BeautifulSoup(vf.text, 'lxml') print(s.prettify()) text_article = s.find('div', attrs={'class' : 'content-background'}).find_all('p') ...
26.428571
92
0.737838
0
0
0
0
0
0
0
0
127
0.343243
2457565434613978e65824abeb9173e30c73221a
480
py
Python
envpy/__init__.py
Combofoods/pyenv
8b33173e593054b8d46a8c3be99c44f7294c7069
[ "MIT" ]
1
2020-07-22T12:19:26.000Z
2020-07-22T12:19:26.000Z
envpy/__init__.py
Combofoods/pyenv
8b33173e593054b8d46a8c3be99c44f7294c7069
[ "MIT" ]
null
null
null
envpy/__init__.py
Combofoods/pyenv
8b33173e593054b8d46a8c3be99c44f7294c7069
[ "MIT" ]
null
null
null
import os from envpy.variables import Var as Variables from envpy.variables import __printenv__ def get_variables(readFile:bool=True, requiredFile:bool=False, readOS:bool=True, filepath:str=f'{os.getcwd()}', filename:str='.env', prefix:str=''): return Variables(readFile=readFile, requiredFile=requiredFile, readOS...
43.636364
154
0.789583
0
0
0
0
0
0
0
0
24
0.05
2458dac6adb26f8c77b50a1f69f3c2ef18781671
2,518
py
Python
models/deep_factorized_model.py
kundajelab/mpra_minimal
2799ed87821130fc537836651d37e45a3247382d
[ "MIT" ]
11
2019-05-06T13:13:35.000Z
2022-03-10T22:24:27.000Z
models/deep_factorized_model.py
mineeme/MPRA-DragoNN
2799ed87821130fc537836651d37e45a3247382d
[ "MIT" ]
null
null
null
models/deep_factorized_model.py
mineeme/MPRA-DragoNN
2799ed87821130fc537836651d37e45a3247382d
[ "MIT" ]
2
2019-07-24T20:42:08.000Z
2020-02-21T02:33:30.000Z
from models.base_model import BaseModel from keras.models import Sequential from keras.layers import Input, Dense, Conv1D, MaxPooling1D, Dropout, Flatten, BatchNormalization from keras.optimizers import Adam import tensorflow as tf class DeepFactorizedModel(BaseModel): def __init__(self, config): super(De...
34.493151
124
0.643765
2,282
0.906275
0
0
0
0
0
0
205
0.081414
2459202d8235c994028b62181cbfcd741881a72d
323
py
Python
scripts/nengo_os/print_control.py
markplagge/neuro_os
60b246c0f975d30658628e1caf60cd209e740e6e
[ "BSD-3-Clause" ]
null
null
null
scripts/nengo_os/print_control.py
markplagge/neuro_os
60b246c0f975d30658628e1caf60cd209e740e6e
[ "BSD-3-Clause" ]
1
2020-07-21T02:25:45.000Z
2020-07-21T02:27:45.000Z
scripts/nengo_os/print_control.py
markplagge/neuro_os
60b246c0f975d30658628e1caf60cd209e740e6e
[ "BSD-3-Clause" ]
null
null
null
debug_print = False has_run_once = False def d_print(*args, **kwargs): global debug_print global has_run_once if not has_run_once: m = "enabled" if debug_print else "disabled" print(f"Debug Print Mode is {m}") has_run_once = True if debug_print: print(*args, **kwargs)...
17.944444
52
0.634675
0
0
0
0
0
0
0
0
45
0.139319
245a13172d7f4a65ed0b24d40fe80fd7eeecd806
3,849
py
Python
eva-accession-release-automation/include_mapping_weight_from_dbsnp/export_all_multimap_snps_from_dbsnp_dumps.py
sundarvenkata-EBI/eva-accession
b26f0b5e5acaafe63d0755bad81837b9a5976237
[ "Apache-2.0" ]
3
2018-02-28T17:14:53.000Z
2020-03-17T17:19:45.000Z
eva-accession-release-automation/include_mapping_weight_from_dbsnp/export_all_multimap_snps_from_dbsnp_dumps.py
sundarvenkata-EBI/eva-accession
b26f0b5e5acaafe63d0755bad81837b9a5976237
[ "Apache-2.0" ]
52
2018-03-29T15:44:23.000Z
2022-02-16T00:54:28.000Z
eva-accession-release-automation/include_mapping_weight_from_dbsnp/export_all_multimap_snps_from_dbsnp_dumps.py
sundarvenkata-EBI/eva-accession
b26f0b5e5acaafe63d0755bad81837b9a5976237
[ "Apache-2.0" ]
15
2018-03-02T13:34:19.000Z
2021-06-22T15:54:59.000Z
# Copyright 2020 EMBL - European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
50.644737
119
0.71629
0
0
0
0
224
0.058197
0
0
1,295
0.336451
245a1861adb239f0bbcb20f082a3db3723b38c4f
662
py
Python
Repaso Examenes/enero2020/enero2020pd4.py
Mi7ai/Algoritmia
2f1c7b3990e4971f4f977fd0ea4d308004ab3db5
[ "Apache-2.0" ]
null
null
null
Repaso Examenes/enero2020/enero2020pd4.py
Mi7ai/Algoritmia
2f1c7b3990e4971f4f977fd0ea4d308004ab3db5
[ "Apache-2.0" ]
null
null
null
Repaso Examenes/enero2020/enero2020pd4.py
Mi7ai/Algoritmia
2f1c7b3990e4971f4f977fd0ea4d308004ab3db5
[ "Apache-2.0" ]
null
null
null
def partido_rec_mem_camino(C, S, N, M): def L(n, m): if n == 0: return 0 if (n, m) not in mem: if m >= C[n - 1]: mem[n, m] = max((L(n - 1, m - d * C[n - 1]) + d * S[n - 1] + (1 - d) * N[n - 1], d) for d in range(2)) else: mem[n, m] = (L(n - 1, m) + N[n - 1], 0) return mem[n, m][0] # nr ciudad...
17.891892
106
0.453172
0
0
0
0
0
0
0
0
35
0.05287
245c288390cedd8347f4657b97e7c373c4bcbfa5
7,357
py
Python
hilbert_curve.py
qypea/disk-usage-visualizer
c26c5866a6d885347a92f1212d132286a6ab9ddc
[ "MIT" ]
null
null
null
hilbert_curve.py
qypea/disk-usage-visualizer
c26c5866a6d885347a92f1212d132286a6ab9ddc
[ "MIT" ]
null
null
null
hilbert_curve.py
qypea/disk-usage-visualizer
c26c5866a6d885347a92f1212d132286a6ab9ddc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # From https://people.sc.fsu.edu/~jburkardt/py_src/hilbert_curve/hilbert_curve.py # def d2xy ( m, d ): #*****************************************************************************80 # ## D2XY converts a 1D Hilbert coordinate to a 2D Cartesian coordinate. # # Licensing: # # This code is dis...
18.12069
86
0.482126
0
0
0
0
0
0
0
0
4,359
0.592497
245e3ffeeef59a7f223bf3d12f43d4f94ed7e8f3
295
py
Python
webapp/rest/permissions.py
zohaib-ansari/vehicle-webapp
19ddf8aa3ebb6fe7d0642ddef8facdeda7822184
[ "MIT" ]
null
null
null
webapp/rest/permissions.py
zohaib-ansari/vehicle-webapp
19ddf8aa3ebb6fe7d0642ddef8facdeda7822184
[ "MIT" ]
null
null
null
webapp/rest/permissions.py
zohaib-ansari/vehicle-webapp
19ddf8aa3ebb6fe7d0642ddef8facdeda7822184
[ "MIT" ]
null
null
null
from rest_framework import permissions class IsReporter(permissions.BasePermission): """ Permission allowing reporters to access their own reports """ def has_object_permission(self, request, view, obj): return obj.reporter == request.user.IITGUser
26.818182
65
0.688136
255
0.864407
0
0
0
0
0
0
86
0.291525
245ea6b8625b098807a43420900faed747e3a21d
3,314
py
Python
src/search.py
yrwq/ytw
787d5c2d5d49d1cdd99a2d2448210af11727a278
[ "MIT" ]
5
2020-11-26T08:38:45.000Z
2021-03-14T11:38:38.000Z
src/search.py
yrwq/ytw
787d5c2d5d49d1cdd99a2d2448210af11727a278
[ "MIT" ]
null
null
null
src/search.py
yrwq/ytw
787d5c2d5d49d1cdd99a2d2448210af11727a278
[ "MIT" ]
2
2020-11-26T07:21:49.000Z
2021-01-01T13:09:34.000Z
#!/usr/bin/env python import sys import getopt import requests import urllib.parse import json class YoutubeSearch: def __init__(self, search_terms: str, max_results=None): self.search_terms = search_terms self.max_results = max_results self.videos = self.search() def search(self): ...
32.811881
150
0.583585
2,283
0.688896
0
0
0
0
0
0
889
0.268256
245ebdd8bc1926f462e2a124d6f07b5c8b565ff3
3,716
py
Python
mapmeta/script/script_init.py
bukun/mapserver_meta
0f1dd278b07fa747dafaf801b96eac19ffdbf327
[ "MIT" ]
null
null
null
mapmeta/script/script_init.py
bukun/mapserver_meta
0f1dd278b07fa747dafaf801b96eac19ffdbf327
[ "MIT" ]
null
null
null
mapmeta/script/script_init.py
bukun/mapserver_meta
0f1dd278b07fa747dafaf801b96eac19ffdbf327
[ "MIT" ]
1
2019-06-20T00:29:25.000Z
2019-06-20T00:29:25.000Z
# -*- coding: utf-8 -*- ''' script for initialization. ''' import os import requests from .script_init_tabels import run_init_tables from mapmeta.model.mapmeta_model import MMapMeta from lxml import etree def do_for_maplet(mapserver_ip): ''' 代码来自 `maplet_arch//030_gen_mapproxy.py` , 原用来找到 mapfile , 生成 yaml . ...
30.459016
184
0.558127
0
0
0
0
0
0
0
0
1,353
0.357937
245fd6a78e559e016c8aa53d6a9cbeb14ced94d9
3,713
py
Python
dissect/utils/data_processing.py
dufkan/DiSSECT
834755f106fefff2475bd247c414aa6d13ec0851
[ "MIT" ]
null
null
null
dissect/utils/data_processing.py
dufkan/DiSSECT
834755f106fefff2475bd247c414aa6d13ec0851
[ "MIT" ]
null
null
null
dissect/utils/data_processing.py
dufkan/DiSSECT
834755f106fefff2475bd247c414aa6d13ec0851
[ "MIT" ]
null
null
null
from typing import Dict, Any import pandas as pd from tqdm.contrib import tmap from sage.all import RR, ZZ import dissect.utils.database_handler as database from dissect.definitions import STD_CURVE_DICT, ALL_CURVE_COUNT class Modifier: """a class of lambda functions for easier modifications if visualised values...
28.782946
108
0.64153
588
0.158363
0
0
421
0.113385
0
0
550
0.148128
24605b6587afbc12049e73b54cb4418582146acb
37
py
Python
zhaquirks/bosch/__init__.py
WolfRevo/zha-device-handlers
0fa4ca1c03c611be0cf2c38c4fec2a197e3dd1d3
[ "Apache-2.0" ]
213
2020-04-16T10:48:31.000Z
2022-03-30T20:48:07.000Z
zhaquirks/bosch/__init__.py
WolfRevo/zha-device-handlers
0fa4ca1c03c611be0cf2c38c4fec2a197e3dd1d3
[ "Apache-2.0" ]
1,088
2020-04-03T13:23:29.000Z
2022-03-31T23:55:03.000Z
zhaquirks/bosch/__init__.py
WolfRevo/zha-device-handlers
0fa4ca1c03c611be0cf2c38c4fec2a197e3dd1d3
[ "Apache-2.0" ]
280
2020-04-24T08:44:27.000Z
2022-03-31T12:58:04.000Z
"""Bosch quirks.""" BOSCH = "Bosch"
9.25
19
0.567568
0
0
0
0
0
0
0
0
26
0.702703
2461451b3428279cbbc4968cdac79244d3d6001a
3,251
py
Python
djcookieauth/middleware.py
benoitc/dj-cookieauth
7397db7adf11e480f9954bf7518a3d522f5b28e5
[ "MIT" ]
3
2015-05-18T13:49:41.000Z
2020-01-21T11:12:08.000Z
djcookieauth/middleware.py
benoitc/dj-cookieauth
7397db7adf11e480f9954bf7518a3d522f5b28e5
[ "MIT" ]
null
null
null
djcookieauth/middleware.py
benoitc/dj-cookieauth
7397db7adf11e480f9954bf7518a3d522f5b28e5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This file is part of dj-cookieauth released under the Apache 2 license. # See the NOTICE for more information. import base64 import hmac import hashlib import time from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.contrib.auth.models import...
28.769912
88
0.569978
2,900
0.892033
0
0
0
0
0
0
351
0.107967
2461bf3779f8f53bfec6956001ecc2d3efe42214
1,225
py
Python
src/20.py
sroccaserra/aoc2021
a9024ac59fdbe519271d6fab937b9123095955e1
[ "BSD-3-Clause" ]
1
2021-12-16T13:25:38.000Z
2021-12-16T13:25:38.000Z
src/20.py
sroccaserra/aoc2021
a9024ac59fdbe519271d6fab937b9123095955e1
[ "BSD-3-Clause" ]
null
null
null
src/20.py
sroccaserra/aoc2021
a9024ac59fdbe519271d6fab937b9123095955e1
[ "BSD-3-Clause" ]
null
null
null
import sys import fileinput from collections import defaultdict from itertools import chain def solve(algo, grid, times): defaults = ['.', algo[0]] image = grid for i in range(times): image = enhance(algo, defaults[i%2], image) return sum(map(lambda c: c == '#', chain.from_iterable(image))) ...
25
95
0.513469
0
0
0
0
0
0
0
0
29
0.023673
24629d61c69e7cc1eb4d14dec1215374f034c8fe
981
py
Python
leetcode/_429.py
simonzhang0428/LeetCode
7daee7572d8235a34071aa831452ed5d0e93d947
[ "Apache-2.0" ]
2
2021-07-09T23:22:25.000Z
2021-07-27T23:15:52.000Z
leetcode/_429.py
simonzhang0428/LeetCode
7daee7572d8235a34071aa831452ed5d0e93d947
[ "Apache-2.0" ]
null
null
null
leetcode/_429.py
simonzhang0428/LeetCode
7daee7572d8235a34071aa831452ed5d0e93d947
[ "Apache-2.0" ]
null
null
null
# Definition for a Node. class Node: def __init__(self, val=None, children=None): self.val = val self.children = children """ 11:23 - 11:36 7/30 high level: BFS, level order traversal mid level: queue store cur level res, for the popped node, for its all children, add them to queue test: size = ...
24.525
98
0.538226
613
0.624873
0
0
0
0
0
0
341
0.347604
24636ddfa2e30b261c8803f61c052b071474bcda
926
py
Python
setup.py
reinbach/django-payfast-convert
20267f76252cc61eba582d06694ce8e24ed413f0
[ "MIT" ]
2
2017-11-16T16:47:55.000Z
2018-01-02T17:00:09.000Z
setup.py
reinbach/django-payfast-convert
20267f76252cc61eba582d06694ce8e24ed413f0
[ "MIT" ]
null
null
null
setup.py
reinbach/django-payfast-convert
20267f76252cc61eba582d06694ce8e24ed413f0
[ "MIT" ]
2
2019-08-06T11:57:35.000Z
2020-09-01T15:50:51.000Z
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-payfast', version='0.3.dev', author='Mikhail Korobov', author_email='[email protected]', maintainer='Piet Delport', maintainer_email='[email protected]', packages=find_packages(exclude=['payfast_tests']...
31.931034
95
0.656587
0
0
0
0
0
0
0
0
549
0.592873
246405a3df29d2d69c702ebd40ef421c5c95784b
12,036
py
Python
python/special.py
rodluger/starrynight
d3f015e466621189cb271d4d18b538430b14a557
[ "MIT" ]
5
2020-05-20T09:30:30.000Z
2021-06-27T14:17:33.000Z
python/special.py
rodluger/starrynight
d3f015e466621189cb271d4d18b538430b14a557
[ "MIT" ]
5
2020-05-16T18:49:42.000Z
2021-02-11T21:46:32.000Z
python/special.py
rodluger/starrynight
d3f015e466621189cb271d4d18b538430b14a557
[ "MIT" ]
1
2020-05-19T17:11:57.000Z
2020-05-19T17:11:57.000Z
from utils import * from mpmath import ellipe, ellipk, ellippi from scipy.integrate import quad import numpy as np C1 = 3.0 / 14.0 C2 = 1.0 / 3.0 C3 = 3.0 / 22.0 C4 = 3.0 / 26.0 def J(N, k2, kappa, gradient=False): # We'll need to solve this with gaussian quadrature func = ( lambda x: np.sin(x) ** (...
28.121495
88
0.465022
0
0
0
0
0
0
0
0
1,798
0.149385
24646d858bd45611b38521c81ad12d15324e8859
821
py
Python
capitalist/contrib/django/django_capitalist/validators.py
wit4er/python-capitalist
08f74ab80155b9a4a72c3a03bd1b13153fbdb891
[ "MIT" ]
null
null
null
capitalist/contrib/django/django_capitalist/validators.py
wit4er/python-capitalist
08f74ab80155b9a4a72c3a03bd1b13153fbdb891
[ "MIT" ]
null
null
null
capitalist/contrib/django/django_capitalist/validators.py
wit4er/python-capitalist
08f74ab80155b9a4a72c3a03bd1b13153fbdb891
[ "MIT" ]
3
2020-03-02T12:40:00.000Z
2021-12-24T12:04:36.000Z
from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.translation import gettext_lazy as _ @deconstructible class CapitalistAccountValidator: message = _('Invalid Capitalist account number.') code = 'invalid_capitalist_account' account_ty...
29.321429
64
0.644336
642
0.781973
0
0
659
0.80268
0
0
111
0.135201
2465cc873ed6feb0ba74d0cd8e91b52c64dfa6ff
130
py
Python
bolt_srl/__init__.py
Michael-Dyq/SRL-English
2187b692515fb00c8f78428fa007266129d1a6b8
[ "MIT" ]
null
null
null
bolt_srl/__init__.py
Michael-Dyq/SRL-English
2187b692515fb00c8f78428fa007266129d1a6b8
[ "MIT" ]
null
null
null
bolt_srl/__init__.py
Michael-Dyq/SRL-English
2187b692515fb00c8f78428fa007266129d1a6b8
[ "MIT" ]
null
null
null
from bolt_srl.model import BoltSRLModel from bolt_srl.predictor import BoltSRLPredictor from bolt_srl.reader import BoltSRLReader
32.5
47
0.884615
0
0
0
0
0
0
0
0
0
0
24669af442e48736ce23de6fe426df216d0af465
661
py
Python
sharedql/schema.py
akaytatsu/sharedql
ceeb3df2909bc90325c72f930fba35de6827ee74
[ "MIT" ]
null
null
null
sharedql/schema.py
akaytatsu/sharedql
ceeb3df2909bc90325c72f930fba35de6827ee74
[ "MIT" ]
null
null
null
sharedql/schema.py
akaytatsu/sharedql
ceeb3df2909bc90325c72f930fba35de6827ee74
[ "MIT" ]
null
null
null
from __future__ import print_function import sys import importlib from django.conf import settings import graphene from .base import sharedql for imports in settings.INSTALLED_APPS: imports = imports + ".schema" try: mod = importlib.import_module(imports + ".schema") except ImportError: ...
25.423077
81
0.715582
0
0
0
0
0
0
0
0
194
0.293495
246776056c54f30b3df5df01d66538e862fc551a
785
py
Python
numIslands.py
pflun/learningAlgorithms
3101e989488dfc8a56f1bf256a1c03a837fe7d97
[ "MIT" ]
null
null
null
numIslands.py
pflun/learningAlgorithms
3101e989488dfc8a56f1bf256a1c03a837fe7d97
[ "MIT" ]
null
null
null
numIslands.py
pflun/learningAlgorithms
3101e989488dfc8a56f1bf256a1c03a837fe7d97
[ "MIT" ]
null
null
null
class Solution(object): def numIslands(self, grid): if not grid: return 0 count = 0 for i in range(len(grid)): for j in range(len(grid[0])): if grid[i][j] == 1: self.dfs(grid, i, j) count += 1 return cou...
25.322581
84
0.426752
646
0.82293
0
0
0
0
0
0
24
0.030573
24685b6b4438884df1658a8b24d9222661482d53
279
py
Python
pyaudio_fix.py
cyberboysumanjay/VoiceAssistant
a8dcfe6bf5fdbbdbfc50cd2a20f646d8844d4297
[ "MIT" ]
11
2018-09-23T10:15:40.000Z
2022-02-13T19:49:59.000Z
pyaudio_fix.py
ALBINPRAVEEN/Jarvis-Assistant
4269088a484ac57b5adb3417efb5b78c7a7d89ed
[ "FSFAP" ]
null
null
null
pyaudio_fix.py
ALBINPRAVEEN/Jarvis-Assistant
4269088a484ac57b5adb3417efb5b78c7a7d89ed
[ "FSFAP" ]
3
2020-06-28T02:47:43.000Z
2021-08-16T19:03:12.000Z
""" import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()) print(p.get_device_info_by_index(i)) """ import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()): info = p.get_device_info_by_index(i) print(info['index'], info['name'])
21.461538
40
0.698925
0
0
0
0
0
0
0
0
135
0.483871
2469efb06c9e4b043a1091af06f2066f495a964d
4,847
py
Python
epytope/Data/pssms/arb/mat/A_0203_11.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
7
2021-02-01T18:11:28.000Z
2022-01-31T19:14:07.000Z
epytope/Data/pssms/arb/mat/A_0203_11.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
22
2021-01-02T15:25:23.000Z
2022-03-14T11:32:53.000Z
epytope/Data/pssms/arb/mat/A_0203_11.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
4
2021-05-28T08:50:38.000Z
2022-03-14T11:45:32.000Z
A_0203_11 = {0: {'A': -0.12570904708437197, 'C': -0.20260572185781892, 'E': -4.0, 'D': -4.0, 'G': -4.0, 'F': -4.0, 'I': 0.7830374415420228, 'H': -0.6847918068824875, 'K': -0.6847918068824875, 'M': 0.981018297402464, 'L': 1.1760718746127061, 'N': -0.09649609424570203, 'Q': 0.39410708558422325, 'P': -4.0, 'S': -0.2026057...
4,847
4,847
0.637095
0
0
0
0
0
0
0
0
678
0.13988
246a10b85099e22d96ea411de65b12bcd5947ba4
2,644
py
Python
src/query_spec.py
jdiaz/snorkel
d553480f3193f105d6f5befa04afb3656cd94d49
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
src/query_spec.py
jdiaz/snorkel
d553480f3193f105d6f5befa04afb3656cd94d49
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
src/query_spec.py
jdiaz/snorkel
d553480f3193f105d6f5befa04afb3656cd94d49
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
import werkzeug try: import dotmap except: dotmap = None try: import addict except: addict = None class QuerySpec(object): def __init__(self, query): # TODO: list all attributes of a query spec up front so others know what to expect md = werkzeug.MultiDict() for q in query...
22.991304
90
0.507943
2,526
0.955371
0
0
0
0
0
0
272
0.102874
246a759fd309fc3554f45bdaa503500c67764f46
595
py
Python
apps/organization/migrations/0003_auto_20190526_0042.py
zhangcw/mxonline
f9ccb5dbdc895e2c71e9426392de154d304f2b39
[ "Apache-2.0" ]
null
null
null
apps/organization/migrations/0003_auto_20190526_0042.py
zhangcw/mxonline
f9ccb5dbdc895e2c71e9426392de154d304f2b39
[ "Apache-2.0" ]
null
null
null
apps/organization/migrations/0003_auto_20190526_0042.py
zhangcw/mxonline
f9ccb5dbdc895e2c71e9426392de154d304f2b39
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.1 on 2019-05-26 00:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organization', '0002_courseorg_category'), ] operations = [ migrations.AddField( model_name='courseorg', name='cours...
24.791667
70
0.596639
518
0.847791
0
0
0
0
0
0
161
0.263502
246abb95d07b09fb5078b3e62e092f7a3e3e9fbc
349
py
Python
SRC/Chapter_03-Functions-And-Looping/05_password_checker.py
archeranimesh/tth-python-basics-3
accbc894324d084124ec001817edf4dc3afffa78
[ "MIT" ]
null
null
null
SRC/Chapter_03-Functions-And-Looping/05_password_checker.py
archeranimesh/tth-python-basics-3
accbc894324d084124ec001817edf4dc3afffa78
[ "MIT" ]
null
null
null
SRC/Chapter_03-Functions-And-Looping/05_password_checker.py
archeranimesh/tth-python-basics-3
accbc894324d084124ec001817edf4dc3afffa78
[ "MIT" ]
null
null
null
import sys MASTER_PASSWORD = "opensesame" password = input("Please enter the super secret password: ") attempt_count = 1 while password != MASTER_PASSWORD: if attempt_count > 3: sys.exit("Too many invalid password attempts") password = input("Invalid password, try again: ") attempt_count += 1 pri...
24.928571
60
0.713467
0
0
0
0
0
0
0
0
145
0.415473
246b0933b8c25cdde9aa707e3204fed16c23d116
5,984
py
Python
textgenrnn/run_utils.py
cosandr/textgenrnn
b2140c1a5704e866ff934fbfad4e14f3c827d439
[ "MIT" ]
null
null
null
textgenrnn/run_utils.py
cosandr/textgenrnn
b2140c1a5704e866ff934fbfad4e14f3c827d439
[ "MIT" ]
null
null
null
textgenrnn/run_utils.py
cosandr/textgenrnn
b2140c1a5704e866ff934fbfad4e14f3c827d439
[ "MIT" ]
null
null
null
import json import os from typing import Dict, Tuple, List import numpy as np import tensorflow as tf from keras import backend as K from textgenrnn.model import textgenrnn_model def rnn_generate(config_path: str, vocab_path: str, weights_path: str, min_words=50, temperature=0.5, start_char='\n', r...
39.893333
110
0.625501
0
0
0
0
0
0
0
0
1,452
0.242647
79e0e2d611865157c4511898cc3f7aa9623c7290
1,268
py
Python
mysite/note/management/commands/create_note.py
t2y/wagtail-app-sample
9c0592d80ccec3dd0d6f385f46372dccbcbd2a01
[ "Apache-2.0" ]
null
null
null
mysite/note/management/commands/create_note.py
t2y/wagtail-app-sample
9c0592d80ccec3dd0d6f385f46372dccbcbd2a01
[ "Apache-2.0" ]
null
null
null
mysite/note/management/commands/create_note.py
t2y/wagtail-app-sample
9c0592d80ccec3dd0d6f385f46372dccbcbd2a01
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, no_translations from note.models import NoteIndexPage from note.models import NotePage class Command(BaseCommand): help = 'Create note page' def add_arguments(self, parser): ...
30.926829
71
0.615142
1,046
0.824921
0
0
482
0.380126
0
0
192
0.15142
79e0f7cba7f4db860df1c6875bec34fdc21fc9f7
918
py
Python
organizations/migrations/0002_auto_20170316_1255.py
ourrevcambridge/orgcat
7c34cc52a6645c14650c8732a39f984dd02640d8
[ "MIT" ]
1
2017-04-12T15:37:26.000Z
2017-04-12T15:37:26.000Z
organizations/migrations/0002_auto_20170316_1255.py
ourrevcambridge/orgcat
7c34cc52a6645c14650c8732a39f984dd02640d8
[ "MIT" ]
15
2017-03-15T12:40:40.000Z
2017-03-19T16:54:21.000Z
organizations/migrations/0002_auto_20170316_1255.py
ourrevcambridge/orgcat
7c34cc52a6645c14650c8732a39f984dd02640d8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-16 12:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organizations', '0001_initial'), ] operations = [ migrations.RemoveField( ...
26.228571
63
0.577342
760
0.827887
0
0
0
0
0
0
193
0.21024
79e17f968ed936c3149f0f9aa97bfbf0ba74f0e1
780
py
Python
flask_unchained/bundles/controller/config.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
69
2018-10-10T01:59:11.000Z
2022-03-29T17:29:30.000Z
flask_unchained/bundles/controller/config.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
18
2018-11-17T12:42:02.000Z
2021-05-22T18:45:27.000Z
flask_unchained/bundles/controller/config.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
7
2018-10-12T16:20:25.000Z
2021-10-06T12:18:21.000Z
from flask_unchained import BundleConfig class Config(BundleConfig): """ Default configuration options for the controller bundle. """ FLASH_MESSAGES = True """ Whether or not to enable flash messages. NOTE: This only works for messages flashed using the :meth:`flask_unchained.Co...
24.375
85
0.671795
736
0.94359
0
0
0
0
0
0
564
0.723077
79e321fad4040ad4eb4cb794f188196f9be074b1
94
py
Python
selection/sampling/randomized/api.py
Xiaoying-Tian/selective-inference
a20c5ad3f527beb709d5b8d7301016640738b092
[ "BSD-3-Clause" ]
null
null
null
selection/sampling/randomized/api.py
Xiaoying-Tian/selective-inference
a20c5ad3f527beb709d5b8d7301016640738b092
[ "BSD-3-Clause" ]
null
null
null
selection/sampling/randomized/api.py
Xiaoying-Tian/selective-inference
a20c5ad3f527beb709d5b8d7301016640738b092
[ "BSD-3-Clause" ]
null
null
null
from .norms.api import * from .losses.api import * from .sampler import selective_sampler_MH
18.8
41
0.787234
0
0
0
0
0
0
0
0
0
0
79ea43854b99cd63bf78e9bb4cf3c7419c1987e4
1,731
py
Python
supplies/serializers.py
cupracer/family-tools
95a9f4d845fca4a00e2b666afc7eb791745121e7
[ "MIT" ]
null
null
null
supplies/serializers.py
cupracer/family-tools
95a9f4d845fca4a00e2b666afc7eb791745121e7
[ "MIT" ]
null
null
null
supplies/serializers.py
cupracer/family-tools
95a9f4d845fca4a00e2b666afc7eb791745121e7
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Category, Brand, Supply, Unit, SupplyItem, Packaging, Product class CategorySerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Category fields = ('id', 'name') class BrandSerializer(serializers.HyperlinkedModelSerial...
29.844828
142
0.696707
1,589
0.917966
0
0
0
0
0
0
242
0.139804
79ea60291f462e69652232c844088f03b0e274e0
2,077
py
Python
tests/auth/test_authentication.py
gems-uff/sms
01cfa84bd467617c58f58da04711c5097dd93fe6
[ "MIT" ]
null
null
null
tests/auth/test_authentication.py
gems-uff/sms
01cfa84bd467617c58f58da04711c5097dd93fe6
[ "MIT" ]
null
null
null
tests/auth/test_authentication.py
gems-uff/sms
01cfa84bd467617c58f58da04711c5097dd93fe6
[ "MIT" ]
null
null
null
from flask import url_for, request, current_app from app.auth.models import User, PreAllowedUser from app.extensions import db def test_register_and_login(client, database): # Register unconfirmed user response = client.post(url_for('auth.register'), data={ 'email': '[email protected]', 'password': 'a'...
38.462963
81
0.645161
0
0
0
0
0
0
0
0
1,070
0.514176
79ea9a1464ec72ae217a22521335fffd9916b5cc
6,241
py
Python
danceschool/discounts/admin.py
django-danceschool/django-danceschool
65ae09ffdcb0821e82df0e1f634fe13c0384a525
[ "BSD-3-Clause" ]
32
2017-09-12T04:25:25.000Z
2022-03-21T10:48:07.000Z
danceschool/discounts/admin.py
django-danceschool/django-danceschool
65ae09ffdcb0821e82df0e1f634fe13c0384a525
[ "BSD-3-Clause" ]
97
2017-09-01T02:43:08.000Z
2022-01-03T18:20:34.000Z
danceschool/discounts/admin.py
django-danceschool/django-danceschool
65ae09ffdcb0821e82df0e1f634fe13c0384a525
[ "BSD-3-Clause" ]
19
2017-09-26T13:34:46.000Z
2022-03-21T10:48:10.000Z
from django.forms import ModelForm, ModelChoiceField from django.contrib import admin from django.utils.translation import gettext_lazy as _ from dal import autocomplete from .models import ( DiscountCategory, DiscountCombo, DiscountComboComponent, PointGroup, PricingTierGroup, RegistrationDiscount, Custo...
32.170103
90
0.645089
5,359
0.858676
0
0
0
0
0
0
1,780
0.285211
79eaca1eab171f82b2698cf469eb4057caa27f84
9,666
py
Python
tools/create_cluster.py
cosh/compute-cassandra-python
2ae6454bbb86d00252afa415042a5e8b823c763d
[ "Apache-2.0" ]
1
2016-12-21T09:59:16.000Z
2016-12-21T09:59:16.000Z
tools/create_cluster.py
cosh/compute-cassandra-python
2ae6454bbb86d00252afa415042a5e8b823c763d
[ "Apache-2.0" ]
null
null
null
tools/create_cluster.py
cosh/compute-cassandra-python
2ae6454bbb86d00252afa415042a5e8b823c763d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
38.357143
78
0.61049
0
0
0
0
0
0
0
0
4,168
0.431202
79eb237c4bd2d1099cc8ababd7408be4112e4eb8
770
py
Python
lakey_finicity/models/connect/answered_mfa_question.py
jeremydeanlakey/lakey-finicity-python
f0b5ae6febb9337f0e28731f631b726fca940d2c
[ "MIT" ]
1
2021-02-09T14:44:55.000Z
2021-02-09T14:44:55.000Z
lakey_finicity/models/connect/answered_mfa_question.py
jeremydeanlakey/lakey-finicity-python
f0b5ae6febb9337f0e28731f631b726fca940d2c
[ "MIT" ]
null
null
null
lakey_finicity/models/connect/answered_mfa_question.py
jeremydeanlakey/lakey-finicity-python
f0b5ae6febb9337f0e28731f631b726fca940d2c
[ "MIT" ]
1
2022-01-26T18:09:33.000Z
2022-01-26T18:09:33.000Z
from dataclasses import dataclass # https://community.finicity.com/s/article/207505363-Multi-Factor-Authentication-MFA @dataclass class AnsweredMfaQuestion(object): text: str answer: str # Added by the partner for calls to the "MFA Answers" services _unused_fields: dict # this is for forward compatibili...
28.518519
84
0.623377
637
0.827273
0
0
648
0.841558
0
0
256
0.332468
79ebb38627cea4de632bbd11155e51f5abc082e1
3,829
py
Python
test/python/k8s/test_client_cert_inject.py
cyberark/conjur-openapi-spec
40f2f1a6b14fb3536facc628e63321a17667148c
[ "Apache-2.0" ]
6
2020-12-03T19:48:30.000Z
2021-07-19T08:36:43.000Z
test/python/k8s/test_client_cert_inject.py
cyberark/conjur-openapi-spec
40f2f1a6b14fb3536facc628e63321a17667148c
[ "Apache-2.0" ]
116
2020-11-24T21:56:49.000Z
2021-12-10T19:27:39.000Z
test/python/k8s/test_client_cert_inject.py
cyberark/conjur-openapi-spec
40f2f1a6b14fb3536facc628e63321a17667148c
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import base64 import os import pathlib import unittest import conjur from OpenSSL import crypto, SSL CERT_DIR = pathlib.Path('config/https') SSL_CERT_FILE = 'ca.crt' CONJUR_CERT_FILE = 'conjur.crt' CONJUR_KEY_FILE = 'conjur.key' def generateKey(type, bits): """Generates a...
30.632
103
0.641682
2,736
0.714547
0
0
0
0
0
0
1,167
0.304779
79ec797722a54ea4de53df3ee7b7d76d115a33ff
256
py
Python
alphaml/datasets/cls_dataset/banana.py
dingdian110/alpha-ml
d6a7a8a8a3452a7e3362bf0ef32b9ac5fe215fde
[ "BSD-3-Clause" ]
1
2021-09-06T20:21:15.000Z
2021-09-06T20:21:15.000Z
alphaml/datasets/cls_dataset/banana.py
dingdian110/alpha-ml
d6a7a8a8a3452a7e3362bf0ef32b9ac5fe215fde
[ "BSD-3-Clause" ]
null
null
null
alphaml/datasets/cls_dataset/banana.py
dingdian110/alpha-ml
d6a7a8a8a3452a7e3362bf0ef32b9ac5fe215fde
[ "BSD-3-Clause" ]
null
null
null
import os import pandas as pd def load_banana(): print(os.curdir) file_path = 'data/xgb_dataset/banana/banana.csv' data = pd.read_csv(file_path, delimiter=',',converters={2: lambda x:int(int(x) == 1)}).values return data[:, :2], data[:, 2]
32
97
0.664063
0
0
0
0
0
0
0
0
39
0.152344
79ecb3c7117dbfd7119dcd2c527e73deda680a91
2,909
py
Python
khl/websocket/net_client_websocket.py
hang333/khl.py
1d235541528b070a1206eaf31ccaded9eac52da1
[ "MIT" ]
null
null
null
khl/websocket/net_client_websocket.py
hang333/khl.py
1d235541528b070a1206eaf31ccaded9eac52da1
[ "MIT" ]
null
null
null
khl/websocket/net_client_websocket.py
hang333/khl.py
1d235541528b070a1206eaf31ccaded9eac52da1
[ "MIT" ]
null
null
null
import asyncio from asyncio.events import AbstractEventLoop import json import logging import zlib from aiohttp import ClientSession, ClientWebSocketResponse from ..cert import Cert from ..hardcoded import API_URL from ..net_client import BaseClient class WebsocketClient(BaseClient): """ implements BaseClie...
33.056818
77
0.562049
2,654
0.912341
0
0
0
0
1,549
0.532485
543
0.186662