hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
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
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
972
max_forks_repo_name
stringlengths
6
130
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
01586a8e48501a99332952b101bb9904f96125ad
620
py
Python
Leetcode/82. Remove Duplicates from Sorted List II/solution1.py
asanoviskhak/Outtalent
c500e8ad498f76d57eb87a9776a04af7bdda913d
[ "MIT" ]
51
2020-07-12T21:27:47.000Z
2022-02-11T19:25:36.000Z
Leetcode/82. Remove Duplicates from Sorted List II/solution1.py
CrazySquirrel/Outtalent
8a10b23335d8e9f080e5c39715b38bcc2916ff00
[ "MIT" ]
null
null
null
Leetcode/82. Remove Duplicates from Sorted List II/solution1.py
CrazySquirrel/Outtalent
8a10b23335d8e9f080e5c39715b38bcc2916ff00
[ "MIT" ]
32
2020-07-27T13:54:24.000Z
2021-12-25T18:12:50.000Z
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def deleteDuplicates(self, head: ListNode) -> ListNode: dummy = prev = ListNode(None) prev.next = head while head and head.ne...
34.444444
62
0.55
fabda086bb5285574c1b406576d684cbce69bb86
9,996
py
Python
python/pyarrow/tests/test_types.py
richardjgowers/arrow
5e6c773ab8e68e8769a59d37f58f122ebf17a21c
[ "Apache-2.0" ]
null
null
null
python/pyarrow/tests/test_types.py
richardjgowers/arrow
5e6c773ab8e68e8769a59d37f58f122ebf17a21c
[ "Apache-2.0" ]
1
2021-01-21T01:33:30.000Z
2021-01-21T01:33:30.000Z
python/pyarrow/tests/test_types.py
danielchalef/arrow
c64deb51cd5152a04db59cdd523d44203073427f
[ "Apache-2.0", "CC0-1.0" ]
1
2019-11-17T00:46:32.000Z
2019-11-17T00:46:32.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
30.018018
76
0.614546
54a2bad4358495b47632790ac05fde84064ac547
2,714
py
Python
files/serializers.py
mlsploit/mlsploit-rest-api
b7e5208ab4946f95713e2026748643657b3596f3
[ "BSD-3-Clause" ]
15
2019-03-26T14:19:09.000Z
2019-05-03T17:31:00.000Z
files/serializers.py
mlsploit/mlsploit-rest-api
b7e5208ab4946f95713e2026748643657b3596f3
[ "BSD-3-Clause" ]
6
2021-03-18T21:31:12.000Z
2022-02-10T09:11:49.000Z
files/serializers.py
mlsploit/mlsploit-rest-api
b7e5208ab4946f95713e2026748643657b3596f3
[ "BSD-3-Clause" ]
2
2019-09-30T01:02:55.000Z
2020-01-07T19:14:05.000Z
import json import os from rest_framework.serializers import FileField, SerializerMethodField, ValidationError from api.settings import MEDIA_DIR, MEDIA_URL from files.models import File from users.serializers import OwnedHyperlinkedModelSerializer class FileSerializer(OwnedHyperlinkedModelSerializer): blob = F...
27.693878
88
0.577008
1894a0e6f9fe82df61ec04f9ae15989c44ab1624
362
py
Python
frozen_dir.py
sundayong/yyy-2.0
06426bddd5feb8706e964d140ad42a518c120eb7
[ "MIT" ]
1
2019-05-25T03:02:29.000Z
2019-05-25T03:02:29.000Z
frozen_dir.py
sundayong/yyy-2.0
06426bddd5feb8706e964d140ad42a518c120eb7
[ "MIT" ]
null
null
null
frozen_dir.py
sundayong/yyy-2.0
06426bddd5feb8706e964d140ad42a518c120eb7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Aug 25 22:41:09 2018 frozen dir @author: yanhua """ import sys import os def app_path(): """Returns the base application path.""" print(sys.executable) if hasattr(sys, 'yyy-2.0'): # Handles PyInstaller print(1) return os.path.dirname(sys.e...
18.1
46
0.621547
644b4b6e3fdc10f2274edbc3cfa2caa91c28d01e
7,615
py
Python
src/ibbtest.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
4
2015-04-09T17:24:58.000Z
2019-07-02T12:05:56.000Z
src/ibbtest.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
null
null
null
src/ibbtest.py
chadaustin/ibb
ea1e25cc53a1ad7c302a12d95fc704c443924dff
[ "MIT" ]
1
2019-11-08T15:38:29.000Z
2019-11-08T15:38:29.000Z
import os import shutil import string import tempfile import unittest import queue import threading import ibb class TestCase(unittest.TestCase): pass class FlattenTests(TestCase): def test_flatten(self): self.assertEqual([], ibb.flatten([])) self.assertEqual([], ibb.flatten([[]])) se...
35.092166
87
0.589363
c706a79862123623a257e4bfc584536970d7291f
3,437
py
Python
tests/test_logging.py
timpal0l/transformers
d86d57faa3b6511c6e4d9139535d77b695b9af8a
[ "Apache-2.0" ]
2
2020-11-28T12:51:07.000Z
2020-11-28T12:52:14.000Z
tests/test_logging.py
timpal0l/transformers
d86d57faa3b6511c6e4d9139535d77b695b9af8a
[ "Apache-2.0" ]
3
2021-06-08T23:15:29.000Z
2022-01-13T03:40:10.000Z
tests/test_logging.py
timpal0l/transformers
d86d57faa3b6511c6e4d9139535d77b695b9af8a
[ "Apache-2.0" ]
1
2020-03-19T06:01:53.000Z
2020-03-19T06:01:53.000Z
import os import unittest import transformers.models.bart.tokenization_bart from transformers import logging from transformers.testing_utils import CaptureLogger, mockenv class HfArgumentParserTest(unittest.TestCase): def test_set_level(self): logger = logging.get_logger() # the current default ...
37.358696
109
0.683445
fb18036cdf6ba27c11461ef26460783fa1079c68
5,272
py
Python
examples/chart_data_tools.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
examples/chart_data_tools.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
examples/chart_data_tools.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
####################################################################### # # A demo of an various Excel chart data tools that are available via # an XlsxWriter chart. # # These include, Trendlines, Data Labels, Error Bars, Drop Lines, # High-Low Lines and Up-Down Bars. # # Copyright 2013-2016, John McNamara, jmcnamara@c...
26.492462
71
0.586305
ae29f76fa852918634d8ced5731bdd9775c935e2
2,943
py
Python
mt940_tests/test_processors.py
bdabelow/mt940
bbbcdaa9b208071951e1b09b6ead9c1762a4b18e
[ "BSD-3-Clause" ]
null
null
null
mt940_tests/test_processors.py
bdabelow/mt940
bbbcdaa9b208071951e1b09b6ead9c1762a4b18e
[ "BSD-3-Clause" ]
null
null
null
mt940_tests/test_processors.py
bdabelow/mt940
bbbcdaa9b208071951e1b09b6ead9c1762a4b18e
[ "BSD-3-Clause" ]
null
null
null
import pytest import mt940 @pytest.fixture def sta_data(): with open('mt940_tests/jejik/abnamro.sta') as fh: return fh.read() @pytest.fixture def february_30_data(): with open('mt940_tests/self-provided/february_30.sta') as fh: return fh.read() def test_date_fixup_pre_processor(february_30...
28.028571
78
0.703364
40b6276d5670cf3529a5daec7041809105f01409
515
py
Python
h/migrations/versions/46a22db075d5_add_organization_id_to_group_table.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
1
2020-06-19T01:49:39.000Z
2020-06-19T01:49:39.000Z
h/migrations/versions/46a22db075d5_add_organization_id_to_group_table.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
5
2019-10-31T14:23:18.000Z
2019-11-15T19:24:27.000Z
h/migrations/versions/46a22db075d5_add_organization_id_to_group_table.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
null
null
null
""" Add organization_id to group table Revision ID: 46a22db075d5 Revises: 628c53b07 Create Date: 2018-03-21 09:47:47.642578 """ import sqlalchemy as sa from alembic import op revision = "46a22db075d5" down_revision = "628c53b07" def upgrade(): op.add_column( "group", sa.Column( "org...
17.166667
46
0.623301
33c87607144fc27d7dbace8da0c0d3ef723090f8
1,919
py
Python
_apicheck/apicheck/core/generator/open_api_strategy.py
sundayayandele/apicheck
ab91f567d67547b92b8e94824a29dcd5993b769e
[ "Apache-2.0" ]
2
2019-05-31T09:56:59.000Z
2019-05-31T11:28:50.000Z
_apicheck/apicheck/core/generator/open_api_strategy.py
sundayayandele/apicheck
ab91f567d67547b92b8e94824a29dcd5993b769e
[ "Apache-2.0" ]
3
2022-02-07T03:37:37.000Z
2022-03-02T03:38:13.000Z
_apicheck/apicheck/core/generator/open_api_strategy.py
sundayayandele/apicheck
ab91f567d67547b92b8e94824a29dcd5993b769e
[ "Apache-2.0" ]
1
2021-07-18T15:01:22.000Z
2021-07-18T15:01:22.000Z
from itertools import repeat import random import sys from typing import Any, Callable, Dict, Iterator, List, Tuple, TypeVar, Union from . import AbsentValue, Definition, Properties, _type_matcher, generator import apicheck.core.generator.metadata.openapi3 as m import apicheck.core.generator.processor as p Strategy...
27.028169
77
0.693069
5729b8448fdb2bf5e72301e848d3696d3735c9b9
262
py
Python
WatchDogs_Mongo_wrapper/setup.py
krishnachaitanya9/WatchDogs_BigData-Project
01ff53e3b67b3fa7c8ea8fd69b93a0a8428672e6
[ "Apache-2.0" ]
4
2020-02-05T11:26:47.000Z
2021-05-26T07:48:46.000Z
WatchDogs_Mongo_wrapper/setup.py
krishnachaitanya9/WatchDogs_BigData-Project
01ff53e3b67b3fa7c8ea8fd69b93a0a8428672e6
[ "Apache-2.0" ]
null
null
null
WatchDogs_Mongo_wrapper/setup.py
krishnachaitanya9/WatchDogs_BigData-Project
01ff53e3b67b3fa7c8ea8fd69b93a0a8428672e6
[ "Apache-2.0" ]
null
null
null
from setuptools import setup setup( name='WatchDogs_MongoWrapper', # This is the name of your PyPI-package. packages=['WatchDogs_MongoWrapper'], install_requires=[ 'pymongo', 'textblob', 'pandas', 'python-logstash' ], version='2.0', )
18.714286
75
0.671756
2f4b570feca142a5b09aefc1bb543e1126765f3f
2,069
py
Python
internal/notes/builtin-SAVE/packages/libszip/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
1
2019-01-17T20:07:19.000Z
2019-01-17T20:07:19.000Z
internal/notes/builtin-SAVE/packages/libszip/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
null
null
null
internal/notes/builtin-SAVE/packages/libszip/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
2
2019-08-06T18:13:57.000Z
2021-11-05T18:19:49.000Z
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
39.037736
95
0.660222
7af02f423edf234f664127645f162f24e86a587d
805
py
Python
soma_hiptenusas.py
renarfreitas/Coursera
64b766175eb26aef4a4a68b7d25309c7aa0f136b
[ "MIT" ]
null
null
null
soma_hiptenusas.py
renarfreitas/Coursera
64b766175eb26aef4a4a68b7d25309c7aa0f136b
[ "MIT" ]
null
null
null
soma_hiptenusas.py
renarfreitas/Coursera
64b766175eb26aef4a4a68b7d25309c7aa0f136b
[ "MIT" ]
null
null
null
'''def é_hipotenusa(a): cateto1 = 0 cateto2 = 0 for i in range(1, a): for j in range(1, a): if i ** 2 + j ** 2 == a ** 2: cateto1 = i cateto2 = j break if cateto1 != 0 and cateto2 != 0: return True else: ...
25.967742
112
0.464596
65bfb63dba2e8e9f26524541accc6d3d6132a47f
195
py
Python
fastapi-example/blog/hashing.py
Gozeon/code-collections
7304e2b9c4c91a809125198d22cf40dcbb45a23b
[ "MIT" ]
null
null
null
fastapi-example/blog/hashing.py
Gozeon/code-collections
7304e2b9c4c91a809125198d22cf40dcbb45a23b
[ "MIT" ]
1
2020-07-17T09:25:42.000Z
2020-07-17T09:25:42.000Z
fastapi-example/blog/hashing.py
Gozeon/code-collections
7304e2b9c4c91a809125198d22cf40dcbb45a23b
[ "MIT" ]
null
null
null
from passlib.context import CryptContext pwd_cxt = CryptContext(schemes=["bcrypt"], deprecated="auto") class Hash(): def bcrypt(self, password: str): return pwd_cxt.hash(password)
21.666667
61
0.717949
a6c33a740f259c567afab0700e498be3764fc167
560
py
Python
tools/management/commands/test_tools.py
adelsonllima/djangoplus
a4ce50bf8231a0d9a4a40751f0d076c2e9931f44
[ "BSD-3-Clause" ]
21
2017-10-08T23:19:47.000Z
2020-01-16T20:02:08.000Z
tools/management/commands/test_tools.py
adelsonllima/djangoplus
a4ce50bf8231a0d9a4a40751f0d076c2e9931f44
[ "BSD-3-Clause" ]
6
2020-06-03T05:30:52.000Z
2022-01-13T00:44:26.000Z
tools/management/commands/test_tools.py
adelsonllima/djangoplus
a4ce50bf8231a0d9a4a40751f0d076c2e9931f44
[ "BSD-3-Clause" ]
9
2017-10-09T22:58:31.000Z
2021-11-20T15:20:18.000Z
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from djangoplus.tools.video import VideoRecorder from djangoplus.tools.subtitle import Subtitle from djangoplus.tools.browser import Browser class Command(BaseCommand): def handle(self, *args, **options): recorder = VideoRecorder...
29.473684
51
0.671429
cb9952ff687c11aa8c8163956bc14f48f9955ca4
751
py
Python
dice.py
yarnoiser/PyDungeon
c37ad314605065194732202539db50eef94ea3da
[ "BSD-3-Clause" ]
1
2018-05-15T01:26:04.000Z
2018-05-15T01:26:04.000Z
dice.py
yarnoiser/PyDungeon
c37ad314605065194732202539db50eef94ea3da
[ "BSD-3-Clause" ]
null
null
null
dice.py
yarnoiser/PyDungeon
c37ad314605065194732202539db50eef94ea3da
[ "BSD-3-Clause" ]
null
null
null
# Implementation of randbelow from python 3.6's secrets module # Copyright © 2001-2017 Python Software Foundation; All Rights Reserved from random import SystemRandom _sysrand = SystemRandom() def randbelow(exclusive_upper_bound): """Return a random int in the range [0, n).""" if exclusive_upper_bound <= 0: r...
25.033333
71
0.651132
ac1d757b6a7bd7dc2aada40255be67274bcc016d
3,195
py
Python
COS120/HOMEWORK/H3.py
thejayhaykid/Python
641c33b94762f0cace203dcf4cc121571625ab02
[ "MIT" ]
null
null
null
COS120/HOMEWORK/H3.py
thejayhaykid/Python
641c33b94762f0cace203dcf4cc121571625ab02
[ "MIT" ]
null
null
null
COS120/HOMEWORK/H3.py
thejayhaykid/Python
641c33b94762f0cace203dcf4cc121571625ab02
[ "MIT" ]
null
null
null
#Homework 3 for Jake Hayes from math import * import random #2.18 def wallis(pairs): acc=1.0 num=2.0 for apair in range(pairs): leftterm=num/(num-1) rightterm=num/(num+1) acc=acc*leftterm*rightterm num=num+2 pi=acc*2 return pi print(wallis(10000)) print(wallis(100000)...
21.587838
80
0.597809
96bf025fbce81b1aafafd0069b2c194d9c9457d5
3,229
py
Python
stereo/image/tissue_cut/tissueCut_utils/tissue_seg_utils.py
nilsmechtel/stereopy
cd8f34b45ae6667043611e5d02ea46f8ca3f0c7b
[ "MIT" ]
null
null
null
stereo/image/tissue_cut/tissueCut_utils/tissue_seg_utils.py
nilsmechtel/stereopy
cd8f34b45ae6667043611e5d02ea46f8ca3f0c7b
[ "MIT" ]
null
null
null
stereo/image/tissue_cut/tissueCut_utils/tissue_seg_utils.py
nilsmechtel/stereopy
cd8f34b45ae6667043611e5d02ea46f8ca3f0c7b
[ "MIT" ]
null
null
null
import torch import numpy as np from PIL import Image import cv2 class ToTensor(object): ''' mean and std should be of the channel order 'bgr' ''' def __init__(self, mean=(0, 0, 0), std=(1., 1., 1.)): self.mean = mean self.std = std def __call__(self, im_lb): ...
30.752381
112
0.610406
d428b2d54bfcd77facc6019555b1643389d4bf97
7,434
py
Python
src/train.py
zhenduow/PreSumm
c466f7544184cd708008e2f4144723e0c2cde6b6
[ "MIT" ]
null
null
null
src/train.py
zhenduow/PreSumm
c466f7544184cd708008e2f4144723e0c2cde6b6
[ "MIT" ]
null
null
null
src/train.py
zhenduow/PreSumm
c466f7544184cd708008e2f4144723e0c2cde6b6
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Main training workflow """ from __future__ import division import argparse import os from others.logging import init_logger from train_abstractive import validate_abs, train_abs, baseline, test_abs, test_text_abs from train_extractive import train_ext, validate_ext, test_ext model_flags ...
44.783133
109
0.652811
07cd0b5db7cbf5279a49b0711561df6a423d0fd6
5,340
py
Python
examples/python/using_qiskit_core_level_1.py
christians94/qiskit-sdk-py
5c1c68a5aa3dcccdf5c10f9eb307383ebb40826b
[ "Apache-2.0" ]
null
null
null
examples/python/using_qiskit_core_level_1.py
christians94/qiskit-sdk-py
5c1c68a5aa3dcccdf5c10f9eb307383ebb40826b
[ "Apache-2.0" ]
1
2018-08-08T17:56:06.000Z
2018-08-08T17:56:06.000Z
examples/python/using_qiskit_core_level_1.py
christians94/qiskit-sdk-py
5c1c68a5aa3dcccdf5c10f9eb307383ebb40826b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018 IBM RESEARCH. 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 requ...
36.081081
94
0.678464
1d378d8545ee7beab539f6ec40fc15b0b44f7694
921
py
Python
metadata-integration/java/spark-lineage/spark-smoke-test/python-spark-lineage-test/HdfsIn2HdfsOut2.py
bskim45/datahub
c10456d2bcc0f41d4b8361768e1e07ad0eb79f37
[ "Apache-2.0" ]
1,603
2016-03-03T17:21:03.000Z
2020-01-22T22:12:02.000Z
metadata-integration/java/spark-lineage/spark-smoke-test/python-spark-lineage-test/HdfsIn2HdfsOut2.py
bskim45/datahub
c10456d2bcc0f41d4b8361768e1e07ad0eb79f37
[ "Apache-2.0" ]
1,157
2016-03-03T19:29:22.000Z
2020-01-20T14:41:59.000Z
metadata-integration/java/spark-lineage/spark-smoke-test/python-spark-lineage-test/HdfsIn2HdfsOut2.py
bskim45/datahub
c10456d2bcc0f41d4b8361768e1e07ad0eb79f37
[ "Apache-2.0" ]
570
2016-03-03T17:21:05.000Z
2020-01-21T06:54:10.000Z
from pyspark.sql import SparkSession DATA_DIR = "../resources/data" TEST_CASE_NAME = "PythonHdfsIn2HdfsOut2" spark = SparkSession \ .builder \ .appName(TEST_CASE_NAME) \ .enableHiveSupport() \ .getOrCreate() df1 = spark.read.option("header", "true").csv(DATA_DIR + "/in1.csv") df2 = spark.read.option(...
27.909091
110
0.702497
bad13f8f63b0072156385987650b42009781b0e0
2,683
py
Python
foundation.examples/spark_demo/modules/test_display.py
PowerRocker/rpi_spark_examples
bc264cbc780ef1640f9caa59ad1e6e2a30c59ceb
[ "MIT" ]
1
2018-11-18T03:07:50.000Z
2018-11-18T03:07:50.000Z
foundation.examples/spark_demo/modules/test_display.py
PowerRocker/rpi_spark_examples
bc264cbc780ef1640f9caa59ad1e6e2a30c59ceb
[ "MIT" ]
1
2020-12-25T16:30:54.000Z
2020-12-25T16:31:50.000Z
foundation.examples/spark_demo/modules/test_display.py
mobinrg/rpi_spark_examples
bc264cbc780ef1640f9caa59ad1e6e2a30c59ceb
[ "MIT" ]
null
null
null
# RPiSpark Testting Menu List # # Author: Kunpeng Zhang # 2018.4.11 # # See LICENSE for details. import random import os.path from PIL import Image from time import sleep from JMRPiFoundations.Skeleton.RPiSparkModule import RPiSparkModule class TestDisplay(RPiSparkModule): mySCREEN = None myDSP = None ...
24.390909
82
0.463287
83425ab6c2b932a1d9e1b8bfe8b8769588092fa9
745
py
Python
nytram_box2d/collisions/collision_registration.py
cloew/NytramBox2D
0c01bd592322fcfa8bbf6fc9374e4958edc69f0b
[ "MIT" ]
null
null
null
nytram_box2d/collisions/collision_registration.py
cloew/NytramBox2D
0c01bd592322fcfa8bbf6fc9374e4958edc69f0b
[ "MIT" ]
null
null
null
nytram_box2d/collisions/collision_registration.py
cloew/NytramBox2D
0c01bd592322fcfa8bbf6fc9374e4958edc69f0b
[ "MIT" ]
null
null
null
from .collidable_pair import CollidablePair from kao_decorators import proxy_for class CollisionRegistration: """ Represents a collider's registration with a collision """ def __init__(self, first, second, *, actsAs): """ Initialize the registration with the collidables in collision and t...
39.210526
125
0.649664
1466c30015e3ffcfec3b17dcf60ebb52d998f900
4,133
py
Python
apps/timeslot/tests/fixtures.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
2
2015-04-06T15:20:29.000Z
2016-12-30T12:25:11.000Z
apps/timeslot/tests/fixtures.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
2
2019-02-17T17:38:02.000Z
2019-03-28T03:49:16.000Z
apps/timeslot/tests/fixtures.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
1
2019-03-28T03:49:18.000Z
2019-03-28T03:49:18.000Z
from datetime import datetime, timedelta from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType from timeslot.models import Release, TimeSlot from challenges.models import (Submission, Phase, Challenge, Category, Project, PhaseR...
30.843284
78
0.640455
3ec4e684636e9e437a31bd54ef4564c7218b277a
1,665
py
Python
studies/reliability/determine_ds.py
denavit/PyPonding
f3e354cf6225abfb1aa2182d716be618eadf7010
[ "MIT" ]
null
null
null
studies/reliability/determine_ds.py
denavit/PyPonding
f3e354cf6225abfb1aa2182d716be618eadf7010
[ "MIT" ]
null
null
null
studies/reliability/determine_ds.py
denavit/PyPonding
f3e354cf6225abfb1aa2182d716be618eadf7010
[ "MIT" ]
null
null
null
from math import pi,cos,cosh,ceil,sqrt import numpy as np import matplotlib.pyplot as plt from wide_flange import wf,wf_shapes from PyPonding import FE # Define units inch = 1.0 kip = 1.0 sec = 1.0 lb = kip/1000.0 ft = 12.0*inch in_per_ft = inch/ft ksi = kip/inch**2 psf = lb/ft**2 pcf = psf/ft hour = 60*60*sec...
20.555556
50
0.637838
e7f279dcd03b7efc22d3df3d12265c40679fb1d5
24,433
py
Python
Recycled/data_update_ui.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
138
2018-01-03T03:32:49.000Z
2022-03-12T02:57:46.000Z
Recycled/data_update_ui.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
9
2018-01-01T03:16:24.000Z
2021-05-27T09:57:24.000Z
Recycled/data_update_ui.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
50
2019-08-05T01:02:30.000Z
2022-03-07T00:52:14.000Z
#!usr/bin/env python #-*- coding:utf-8 _*- """ @version: author:Sleepy @time: 2017/08/08 @file: data_update.py @function: @modify: """ import copy import traceback import threading from PyQt5.QtCore import QTimer, pyqtSignal from PyQt5.QtWidgets import QHeaderView from concurrent.futures import ThreadPoolExecutor, Pro...
40.252059
120
0.596529
202aa41945834a7958e8847f95f44adc45fc8f92
2,445
py
Python
semantic_release/history/parser_angular.py
nraw/python-semantic-release
79893bb098abe1d0dfe19540790e15caa291d2df
[ "MIT" ]
2
2022-01-02T00:27:08.000Z
2022-01-02T00:27:33.000Z
semantic_release/history/parser_angular.py
hongqn/python-semantic-release
540d1530dee22706914750d154a453fd24255cc8
[ "MIT" ]
null
null
null
semantic_release/history/parser_angular.py
hongqn/python-semantic-release
540d1530dee22706914750d154a453fd24255cc8
[ "MIT" ]
null
null
null
""" Angular commit style parser https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines """ import logging import re from ..errors import UnknownCommitMessageStyleError from ..helpers import LoggedFunction from .parser_helpers import ParsedCommit, parse_paragraphs, re_breaking logge...
26.290323
99
0.639264
293f3d9d939c9ca6da48788ab5e6be8377890cfb
17,105
py
Python
LigParGenPSP/BOSSReader.py
Ramprasad-Group/PSP
6f0df0a052898c8f44a58ef9ab0578731455c4a3
[ "MIT" ]
11
2022-02-24T00:29:46.000Z
2022-03-30T08:07:00.000Z
LigParGenPSP/BOSSReader.py
Ramprasad-Group/PSP
6f0df0a052898c8f44a58ef9ab0578731455c4a3
[ "MIT" ]
null
null
null
LigParGenPSP/BOSSReader.py
Ramprasad-Group/PSP
6f0df0a052898c8f44a58ef9ab0578731455c4a3
[ "MIT" ]
1
2022-03-05T01:49:48.000Z
2022-03-05T01:49:48.000Z
from __future__ import print_function import os import numpy as np from LigParGenPSP.mol_boss import new_mol_info import pandas as pd from collections import OrderedDict from LigParGenPSP.fepzmat import BCC_file2zmat import warnings warnings.simplefilter(action='ignore', category=FutureWarning) def VerifyMolandSave...
31.270567
110
0.470506
3389bf3b3c528d43f6c931bc8f8614a70a79afba
11,954
py
Python
news_reel_monitor.py
nacitar/proxitar
7e065183f040773fc6e3199b26c0aeb2a77df05c
[ "MIT" ]
null
null
null
news_reel_monitor.py
nacitar/proxitar
7e065183f040773fc6e3199b26c0aeb2a77df05c
[ "MIT" ]
null
null
null
news_reel_monitor.py
nacitar/proxitar
7e065183f040773fc6e3199b26c0aeb2a77df05c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import api_client import re MONITORED_CATEGORIES = [api_client.NewsReelFilter.PROXIMITY, api_client.NewsReelFilter.RESOURCES] # TODO: do we really want to store all the offsets/player_hits... or do we JUST want the last_hit? # TODO: allow separate connections for resources and proximity? ...
51.748918
158
0.551698
64d6be2475f8da87e2c9b04c322a520857ee81d7
4,862
py
Python
tempest/lib/common/utils/linux/remote_client.py
TeamXgrid/xgrid-tempest
4411b2992c4f093ddc893e2e8149b2277d35c137
[ "Apache-2.0" ]
1
2018-06-03T13:49:58.000Z
2018-06-03T13:49:58.000Z
tempest/lib/common/utils/linux/remote_client.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
null
null
null
tempest/lib/common/utils/linux/remote_client.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
41.20339
78
0.610243
5e851005882feb913c1bc202ef2ac9cdd48aebf1
1,706
py
Python
cont_skillspace_test/visualization_fun/env_viz_render.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
null
null
null
cont_skillspace_test/visualization_fun/env_viz_render.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
6
2021-02-02T23:00:02.000Z
2022-01-13T03:13:51.000Z
cont_skillspace_test/visualization_fun/env_viz_render.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
null
null
null
import time from cont_skillspace_test.visualization_fun.env_viz_base import \ EnvVisualizationGuidedBase, EnvVisualizationHduvaeBase class EnvVisualizationRenderGuided(EnvVisualizationGuidedBase): def __init__(self, *args, render_dt=0.008, **kwargs ...
27.516129
65
0.531653
ba707db59d91bcaec74334b46a997b55c8e3d8d5
5,313
py
Python
src/datadog_api_client/v1/model/synthetics_private_location_secrets_config_decryption.py
DataDog/datadog-api-client-python
de2fc57dbde9acf4b8c8eef94ac29911227a62a2
[ "Apache-2.0" ]
32
2021-01-07T15:09:56.000Z
2022-01-30T05:49:23.000Z
src/datadog_api_client/v1/model/synthetics_private_location_secrets_config_decryption.py
DataDog/datadog-api-client-python
de2fc57dbde9acf4b8c8eef94ac29911227a62a2
[ "Apache-2.0" ]
228
2020-09-03T14:03:54.000Z
2022-03-31T20:16:12.000Z
src/datadog_api_client/v1/model/synthetics_private_location_secrets_config_decryption.py
DataDog/datadog-api-client-python
de2fc57dbde9acf4b8c8eef94ac29911227a62a2
[ "Apache-2.0" ]
12
2020-09-15T21:36:03.000Z
2022-03-31T17:13:17.000Z
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. from datadog_api_client.v1.model_utils import ( # noqa: F401 ApiTypeError, Mo...
40.869231
108
0.594956
6583c3ceedeec512652ee783a61f527b20fb4f41
2,190
py
Python
src/kedro_devops/pipelines/data_engineering/pipeline.py
jmalovera10/kedro-devops
eef44126109195fd518a3efc644b8eb1dd1c93a6
[ "MIT" ]
null
null
null
src/kedro_devops/pipelines/data_engineering/pipeline.py
jmalovera10/kedro-devops
eef44126109195fd518a3efc644b8eb1dd1c93a6
[ "MIT" ]
null
null
null
src/kedro_devops/pipelines/data_engineering/pipeline.py
jmalovera10/kedro-devops
eef44126109195fd518a3efc644b8eb1dd1c93a6
[ "MIT" ]
4
2021-10-15T13:36:53.000Z
2021-11-12T16:16:50.000Z
# Copyright 2021 QuantumBlack Visual Analytics Limited # # 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 # # THE SOFTWARE IS PROVIDED "AS IS",...
37.118644
79
0.730594
022b4437bff767d44f83d60d3051de8461a091cf
2,621
py
Python
src/tests/test_csf.py
CodeBizarre/cutesnowflakes
87158f34d0c79362bab07cd4f6e7aeeb79498f57
[ "MIT" ]
null
null
null
src/tests/test_csf.py
CodeBizarre/cutesnowflakes
87158f34d0c79362bab07cd4f6e7aeeb79498f57
[ "MIT" ]
null
null
null
src/tests/test_csf.py
CodeBizarre/cutesnowflakes
87158f34d0c79362bab07cd4f6e7aeeb79498f57
[ "MIT" ]
null
null
null
import os import logging import pytest from PIL.PngImagePlugin import PngImageFile from cutesnowflakes.cutesnowflakes import Color, ColorError, encode, decode LOGGER = logging.getLogger(__name__) uid_17 = "00000000000010001" uid_18 = "674438327927308358" uid_19 = "1315158838627233792" uid_20 = "0118999881999119725...
22.791304
83
0.665395
54375cce350264453f15f3e880d345b0a8f351e5
2,025
py
Python
stockviewer/stockviewer/db/dbmanager.py
vyacheslav-bezborodov/skt
58551eed497687adec5b56336037613a78cc5b2d
[ "MIT" ]
null
null
null
stockviewer/stockviewer/db/dbmanager.py
vyacheslav-bezborodov/skt
58551eed497687adec5b56336037613a78cc5b2d
[ "MIT" ]
null
null
null
stockviewer/stockviewer/db/dbmanager.py
vyacheslav-bezborodov/skt
58551eed497687adec5b56336037613a78cc5b2d
[ "MIT" ]
null
null
null
import os import logging import stockviewer.settings from provider import provider_factory class dbmanager(): def __init__(self, config): logging.debug('Db manager init: config {}'.format(config)) self.__config = config factory = provider_factory(self.__config.find('provider_factory')) self.__provider = fa...
33.196721
105
0.700247
1bcbea23a303ece76c8dd274486f956a316a7f31
759
py
Python
blog/views.py
swiftype/swiftype-django-example
9ca9427deb8fe84748448f828eef325a0df29e17
[ "MIT" ]
1
2020-03-19T02:11:53.000Z
2020-03-19T02:11:53.000Z
blog/views.py
swiftype/swiftype-django-example
9ca9427deb8fe84748448f828eef325a0df29e17
[ "MIT" ]
null
null
null
blog/views.py
swiftype/swiftype-django-example
9ca9427deb8fe84748448f828eef325a0df29e17
[ "MIT" ]
null
null
null
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render, get_object_or_404 from django.conf import settings from blog.models import Post def index(request): all_posts = Post.objects.all() paginator = Paginator(all_posts, 5) page = request.GET.get('page'...
33
116
0.71805
0251126662d4c1426a5bb457c6bdef94840d42c5
11,307
py
Python
tests/test_google_connect.py
Lisafiluz/calendar
a88e34f7ab9dd25753ca041461e56d20a7f9fd1e
[ "Apache-2.0" ]
35
2021-01-07T12:37:39.000Z
2021-11-10T15:43:04.000Z
tests/test_google_connect.py
Lisafiluz/calendar
a88e34f7ab9dd25753ca041461e56d20a7f9fd1e
[ "Apache-2.0" ]
275
2021-01-06T20:53:21.000Z
2021-04-22T14:03:09.000Z
tests/test_google_connect.py
Lisafiluz/calendar
a88e34f7ab9dd25753ca041461e56d20a7f9fd1e
[ "Apache-2.0" ]
61
2021-01-07T08:19:27.000Z
2021-02-24T10:18:43.000Z
from datetime import datetime import pytest from loguru import logger import app.internal.google_connect as google_connect from app.routers.event import create_event from app.database.models import OAuthCredentials from app.routers.user import create_user from google.oauth2.credentials import Credentials from googlea...
30.809264
79
0.556912
276dbd0f4f9a78668169a2b5c133af9f2dae5ccd
6,186
py
Python
color_transforms.py
NirajKunnumma/CarND-Advanced-Lane-Lines
a6abde23019ebaf72485fe77d04784b2bac9a20d
[ "MIT" ]
null
null
null
color_transforms.py
NirajKunnumma/CarND-Advanced-Lane-Lines
a6abde23019ebaf72485fe77d04784b2bac9a20d
[ "MIT" ]
null
null
null
color_transforms.py
NirajKunnumma/CarND-Advanced-Lane-Lines
a6abde23019ebaf72485fe77d04784b2bac9a20d
[ "MIT" ]
null
null
null
import os import cv2 import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg def abs_sobel_thresh(img, orient='x', sobel_kernel=3, thresh=(0, 255)): # 1) Convert to grayscale gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) # 2) Take the derivative in x or y given orient = 'x' or...
40.697368
121
0.672325
b5222eea3d9cc7a930de63a2766f89a71398dd61
1,730
py
Python
test_projects/unbind_wheel_event_all_from_document/main.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
16
2021-04-16T02:01:29.000Z
2022-01-01T08:53:49.000Z
test_projects/unbind_wheel_event_all_from_document/main.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
613
2021-03-24T03:37:38.000Z
2022-03-26T10:58:37.000Z
test_projects/unbind_wheel_event_all_from_document/main.py
simon-ritchie/apyscript
c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279
[ "MIT" ]
2
2021-06-20T07:32:58.000Z
2021-12-26T08:22:11.000Z
"""Test project for unbind_wheel_event_all_from_document interface. Command examples: $ python test_projects/unbind_wheel_event_all_from_document/main.py """ import sys sys.path.append('./') import os from types import ModuleType import apysc as ap from apysc._file import file_util this_module: M...
23.378378
68
0.656647
b382c918977dcf2283a8301b7397d6fd720b14e2
6,167
py
Python
snake_game copy.py
zsquare12/snake_game
6ad62f6124f2ec4ce1a6f060c6640e6b8e6f4dd0
[ "MIT" ]
1
2021-04-24T10:47:41.000Z
2021-04-24T10:47:41.000Z
snake_game copy.py
zsquare12/snake_game
6ad62f6124f2ec4ce1a6f060c6640e6b8e6f4dd0
[ "MIT" ]
null
null
null
snake_game copy.py
zsquare12/snake_game
6ad62f6124f2ec4ce1a6f060c6640e6b8e6f4dd0
[ "MIT" ]
null
null
null
import pygame import random pygame.init() pygame.mixer.init() # Define colors green = (1,50,32) red = (228, 0, 0) snkClr = (25, 25, 25) white = (0, 0, 0) w_x = 450 w_y = 600 #make display window = pygame.display.set_mode((w_x, w_y)) pygame.display.set_caption("this is my first game") image = pygame.image.load("grass...
31.78866
96
0.473488
fe3c769bce795c9206b30510a2425c09434e06e6
2,469
py
Python
models/sent140/erm_log_reg.py
krishnap25/simplicial-fl
fda4350b5c06d89ae29c8c26dcf3317db2ecdd7e
[ "BSD-2-Clause" ]
15
2020-02-27T06:42:45.000Z
2022-03-09T14:22:02.000Z
models/sent140/erm_log_reg.py
yangkun199711/simplicial-fl
859869edd5f189fc92625858640ee405ff4b2b3e
[ "BSD-2-Clause" ]
1
2020-10-27T21:08:30.000Z
2020-11-17T16:47:11.000Z
models/sent140/erm_log_reg.py
yangkun199711/simplicial-fl
859869edd5f189fc92625858640ee405ff4b2b3e
[ "BSD-2-Clause" ]
7
2020-04-19T09:36:09.000Z
2022-03-15T15:14:18.000Z
from model import Model, Optimizer import numpy as np class ClientModel(Model): def __init__(self, lr, num_classes, max_batch_size=None, seed=None, optimizer=None): self.num_classes = num_classes super(ClientModel, self).__init__(lr, seed, max_batch_size, optimizer=ErmOptimizer()) class ErmOpt...
30.481481
112
0.585257
526d586f1c37333e1808ffdc2e278d966fffc85f
40,670
py
Python
python/paddle/distributed/fleet/launch_utils.py
mls1999725/Paddle
597897e3aeff05f6ee5061a4e516c33d4b9d068c
[ "Apache-2.0" ]
1
2021-03-11T13:16:50.000Z
2021-03-11T13:16:50.000Z
python/paddle/distributed/fleet/launch_utils.py
mls1999725/Paddle
597897e3aeff05f6ee5061a4e516c33d4b9d068c
[ "Apache-2.0" ]
null
null
null
python/paddle/distributed/fleet/launch_utils.py
mls1999725/Paddle
597897e3aeff05f6ee5061a4e516c33d4b9d068c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
35.895852
240
0.555274
298217da03ef7fc2150661f85ff775e4fce5fc03
1,897
py
Python
cloudrail/knowledge/context/aws/kms/kms_key.py
my-devops-info/cloudrail-knowledge
b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e
[ "MIT" ]
null
null
null
cloudrail/knowledge/context/aws/kms/kms_key.py
my-devops-info/cloudrail-knowledge
b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e
[ "MIT" ]
null
null
null
cloudrail/knowledge/context/aws/kms/kms_key.py
my-devops-info/cloudrail-knowledge
b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e
[ "MIT" ]
null
null
null
from typing import List from cloudrail.knowledge.context.aws.kms.kms_alias import KmsAlias from cloudrail.knowledge.context.aws.kms.kms_key_manager import KeyManager from cloudrail.knowledge.context.aws.kms.kms_key_policy import KmsKeyPolicy from cloudrail.knowledge.context.aws.service_name import AwsServiceName from ...
34.490909
75
0.619399
37fa0ccc97de2e6b046d56ef796bdfc2e81e8232
3,693
py
Python
Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie_with_crf/evaluate.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-12T06:52:43.000Z
2022-01-12T06:52:43.000Z
Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie_with_crf/evaluate.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
null
null
null
Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie_with_crf/evaluate.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.46875
146
0.727864
e5fa9ff59c5a477c58454e1df418ea68d41b0664
17,000
py
Python
sd_maskrcnn/envs/state_spaces.py
PingCheng-Wei/SD-MaskRCNN
8995945c38f510333cdcbdd409a189e1ad742ee2
[ "MIT" ]
183
2018-10-12T05:16:56.000Z
2022-03-17T13:56:56.000Z
sd_maskrcnn/envs/state_spaces.py
PingCheng-Wei/SD-MaskRCNN
8995945c38f510333cdcbdd409a189e1ad742ee2
[ "MIT" ]
46
2018-10-25T06:50:43.000Z
2022-03-19T08:51:35.000Z
sd_maskrcnn/envs/state_spaces.py
PingCheng-Wei/SD-MaskRCNN
8995945c38f510333cdcbdd409a189e1ad742ee2
[ "MIT" ]
63
2018-10-27T10:01:50.000Z
2022-03-31T14:56:29.000Z
""" Copyright ©2019. The Regents of the University of California (Regents). All Rights Reserved. Permission to use, copy, modify, and distribute this software and its documentation for educational, research, and not-for-profit purposes, without fee and without a signed licensing agreement, is hereby granted, provided t...
35.343035
103
0.583529
95c27827ca0689489aca732ed2659051f7c75f21
1,559
py
Python
models/pl_transfer_vggface2.py
liusida/face-with-subsets
3c020ddc81914abc2c34009ccd83517f38497860
[ "MIT" ]
2
2021-05-27T06:36:49.000Z
2022-01-14T21:40:19.000Z
models/pl_transfer_vggface2.py
liusida/face-with-subsets
3c020ddc81914abc2c34009ccd83517f38497860
[ "MIT" ]
null
null
null
models/pl_transfer_vggface2.py
liusida/face-with-subsets
3c020ddc81914abc2c34009ccd83517f38497860
[ "MIT" ]
null
null
null
import torch from torch import nn import torch.nn.functional as F from facenet_pytorch import InceptionResnetV1 import torchmetrics import pytorch_lightning as pl class LitImageClassifier(pl.LightningModule): def __init__(self, output_dim=10): # input_dim = [3, 256, 256] super().__init__() self....
29.980769
71
0.627967
05331b6dc3401aaadaa1e18d1ed15289dc1f7657
944
py
Python
mnist/predict.py
jacky10001/tf2-serving
f1db47fdee783de7da8f8365048f411257017ba1
[ "MIT" ]
null
null
null
mnist/predict.py
jacky10001/tf2-serving
f1db47fdee783de7da8f8365048f411257017ba1
[ "MIT" ]
null
null
null
mnist/predict.py
jacky10001/tf2-serving
f1db47fdee783de7da8f8365048f411257017ba1
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import requests import base64 import json import numpy as np from tensorflow.keras.datasets.mnist import load_data #load MNIST dataset (_, _), (x_test, y_test) = load_data() # reshape data to have a single channel x_test = x_test.reshape((x_test.shape[0], x_test.shape[1], x_test.shape[2...
33.714286
92
0.743644
06bcb15be9c441e2480c4292fae782bc5c776be7
1,799
py
Python
selfservice-api/src/selfservice_api/models/enums/technical.py
bcgov/BCSC-BPS
3bfe09c100a0f5b98d61228324336d5f45ad93ad
[ "Apache-2.0" ]
2
2020-07-03T18:18:34.000Z
2021-03-08T10:25:50.000Z
selfservice-api/src/selfservice_api/models/enums/technical.py
bcgov/BCSC-BPS
3bfe09c100a0f5b98d61228324336d5f45ad93ad
[ "Apache-2.0" ]
312
2020-01-10T23:00:08.000Z
2022-03-29T22:07:00.000Z
selfservice-api/src/selfservice_api/models/enums/technical.py
bcgov/BCSC-BPS
3bfe09c100a0f5b98d61228324336d5f45ad93ad
[ "Apache-2.0" ]
2
2020-03-26T05:10:20.000Z
2021-02-05T19:22:56.000Z
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
29.491803
86
0.703724
fc35ea19edf6a68b2e59d32544821f496c4866e5
1,322
py
Python
modoboa_dmarc/forms.py
tschuettler/modoboa-dmarc
84e46306686da71f216de3f757e2eabd4bd54769
[ "MIT" ]
14
2016-06-07T08:11:20.000Z
2021-10-12T15:05:26.000Z
modoboa_dmarc/forms.py
tschuettler/modoboa-dmarc
84e46306686da71f216de3f757e2eabd4bd54769
[ "MIT" ]
54
2016-02-26T18:53:07.000Z
2022-03-01T22:17:51.000Z
modoboa_dmarc/forms.py
tschuettler/modoboa-dmarc
84e46306686da71f216de3f757e2eabd4bd54769
[ "MIT" ]
12
2016-08-11T07:42:15.000Z
2021-10-15T19:45:41.000Z
"""Custom forms.""" from django import forms from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ReportOptionsForm(forms.Form): """Report display options.""" current_year = for...
30.045455
76
0.673979
ce0c4385c260c7050f46c8adc97536b7df24478d
46,808
py
Python
pypy/interpreter/test/test_gateway.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/interpreter/test/test_gateway.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/interpreter/test/test_gateway.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division, print_function # for test_app2interp_future from pypy.interpreter import gateway, argument from pypy.interpreter.gateway import ObjSpace, W_Root, WrappedDefault from pypy.interpreter.signature import Signature from pypy.interpreter.error import OperationError i...
38.588623
130
0.54668
24de8d069929296faf52aecec031b3013f57e1ea
12,763
py
Python
ontask/core/decorators.py
LucasFranciscoCorreia/ontask_b
5473e9faa24c71a2a1102d47ebc2cbf27608e42a
[ "MIT" ]
null
null
null
ontask/core/decorators.py
LucasFranciscoCorreia/ontask_b
5473e9faa24c71a2a1102d47ebc2cbf27608e42a
[ "MIT" ]
null
null
null
ontask/core/decorators.py
LucasFranciscoCorreia/ontask_b
5473e9faa24c71a2a1102d47ebc2cbf27608e42a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Decorators for functions in OnTask.""" from functools import wraps from django.contrib import messages from django.db.models import Q from django.http import HttpResponseBadRequest, JsonResponse from django.shortcuts import redirect from django.urls import reverse from django.utils.transla...
33.586842
79
0.520176
ce2a4bd4f9c6222b4079435a15ada2d4fe2af502
315
py
Python
agents/admin.py
vnkbrand/nownow
fb47fd6dce1720d73d5514ddd4940d9047f8b645
[ "MIT" ]
null
null
null
agents/admin.py
vnkbrand/nownow
fb47fd6dce1720d73d5514ddd4940d9047f8b645
[ "MIT" ]
7
2020-02-11T23:30:56.000Z
2022-03-11T23:35:49.000Z
agents/admin.py
vnkbrand/nownow
fb47fd6dce1720d73d5514ddd4940d9047f8b645
[ "MIT" ]
null
null
null
from django.contrib import admin # Agents - bring in Listing model from .models import Agent class AgentAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'email', 'hire_date') list_display_links = ('id', 'name') search_fields = ( 'name',) list_per_page = 25 admin.site.register(Agent, AgentAdmin)
21
53
0.711111
1779cacba5555a984c7f5d653436313905dabe1d
1,395
py
Python
benchmarking/platforms/platform_util_base.py
virtan/FAI-PEP
8641a54b2328c343ab0470f195a42da1021d1392
[ "Apache-2.0" ]
1
2022-03-21T06:39:38.000Z
2022-03-21T06:39:38.000Z
benchmarking/platforms/platform_util_base.py
virtan/FAI-PEP
8641a54b2328c343ab0470f195a42da1021d1392
[ "Apache-2.0" ]
null
null
null
benchmarking/platforms/platform_util_base.py
virtan/FAI-PEP
8641a54b2328c343ab0470f195a42da1021d1392
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ############################################################################## # Copyright 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. ################################...
28.469388
78
0.589247
c608a092ed0f8afd9d5255a5dc5680cccb6c7722
674
py
Python
notify/by_desktop.py
Cedric0303/Vaccination-Notifier
167d3acfb35a904bbf2b1f49451c2cb32a606c96
[ "MIT" ]
2
2021-07-02T05:03:34.000Z
2021-07-06T10:32:24.000Z
notify/by_desktop.py
Cedric0303/Vaccination-Notifier
167d3acfb35a904bbf2b1f49451c2cb32a606c96
[ "MIT" ]
null
null
null
notify/by_desktop.py
Cedric0303/Vaccination-Notifier
167d3acfb35a904bbf2b1f49451c2cb32a606c96
[ "MIT" ]
null
null
null
""" notify2-based desktop alert notifier :author: josephsurin """ import notify2 class DesktopNotifier: """ Sends a desktop notification using the notify2 python library https://pypi.org/project/notify2/ """ def __init__(self) -> None: print("Configuring Desktop Notifier...") not...
24.962963
65
0.648368
286bf6472cb1b1dabbd20ae3c452aaae57c76af3
2,040
py
Python
fresh_tomatillos/media.py
noahbrenner/fresh_tomatillos
2da123063458462b368acf2b268776bcf68b5750
[ "MIT" ]
null
null
null
fresh_tomatillos/media.py
noahbrenner/fresh_tomatillos
2da123063458462b368acf2b268776bcf68b5750
[ "MIT" ]
null
null
null
fresh_tomatillos/media.py
noahbrenner/fresh_tomatillos
2da123063458462b368acf2b268776bcf68b5750
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ fresh_tomatillos.media ~~~~~~~~~~~~~~~~~~~~~~ Defines the Movie class at the heart of fresh_tomatillos. """ from __future__ import unicode_literals class Movie(object): """Class for representing movie data. Constructor Args: title (str): The title of the movie. s...
34
79
0.620588
ab0f2ebf58586893788b97c6115042577d69d65f
383
py
Python
homie/node/property/property_contact.py
dresber/HomieV3
05115f59f4e78230d09ca4e9bd7a12589a638a81
[ "MIT" ]
4
2019-06-10T01:18:06.000Z
2021-12-28T03:00:48.000Z
homie/node/property/property_contact.py
dresber/HomieV3
05115f59f4e78230d09ca4e9bd7a12589a638a81
[ "MIT" ]
9
2019-05-02T20:03:42.000Z
2020-01-15T03:41:38.000Z
homie/node/property/property_contact.py
dresber/HomieV3
05115f59f4e78230d09ca4e9bd7a12589a638a81
[ "MIT" ]
7
2019-05-05T15:37:49.000Z
2020-04-02T10:33:50.000Z
from .property_enum import Property_Enum class Property_Contact(Property_Enum): def __init__(self, node, id='contact', name='Contact', settable=False, retained=False, qos=1, unit=None, data_type='enum', data_format='OPEN,CLOSED', value=None, set_value=None): super().__init__(node, id,name,settabl...
34.818182
182
0.738903
8b58eeddfca7408ab696054fa67aecdf1ac9940e
5,454
py
Python
site_scons/daos_build.py
berserk-fury/daos
e0a3249aa886962cef2345135b907b45f7109cae
[ "BSD-2-Clause-Patent" ]
null
null
null
site_scons/daos_build.py
berserk-fury/daos
e0a3249aa886962cef2345135b907b45f7109cae
[ "BSD-2-Clause-Patent" ]
null
null
null
site_scons/daos_build.py
berserk-fury/daos
e0a3249aa886962cef2345135b907b45f7109cae
[ "BSD-2-Clause-Patent" ]
1
2021-11-03T05:00:42.000Z
2021-11-03T05:00:42.000Z
"""Common DAOS build functions""" from SCons.Subst import Literal from SCons.Script import GetOption from env_modules import load_mpi from distutils.spawn import find_executable import os # pylint: disable=too-few-public-methods class DaosLiteral(Literal): """A wrapper for a Literal.""" def __hash__(self): ...
33.875776
77
0.576274
5b931d7c1c42863b69f89a22a9743475c59efcdb
90
py
Python
notebooks/_solutions/05-spatial-operations-overlays13.py
jorisvandenbossche/DS-python-geospatial
893a12edc5c203a75815f6dcb5f1e18c577c8cd5
[ "BSD-3-Clause" ]
58
2020-10-09T10:10:59.000Z
2022-03-07T14:58:07.000Z
notebooks/_solutions/05-spatial-operations-overlays13.py
amitkb3/DS-python-geospatial
5f156ebff67e06d59b2a7ef446d1fed746ce0650
[ "BSD-3-Clause" ]
24
2020-09-30T19:57:14.000Z
2021-10-05T07:21:09.000Z
notebooks/_solutions/05-spatial-operations-overlays13.py
amitkb3/DS-python-geospatial
5f156ebff67e06d59b2a7ef446d1fed746ce0650
[ "BSD-3-Clause" ]
19
2020-10-05T09:32:18.000Z
2022-03-20T00:09:14.000Z
# Remove the empty geometries land_use_muette = land_use_muette[~land_use_muette.is_empty]
45
60
0.855556
f5ce2bcbc48449245a429776c6a38694e184d492
2,697
py
Python
setup.py
HOKOTATE-pzw/maysics
59c38089c51db74948e3e2133c0a860880dcf0eb
[ "MIT" ]
4
2021-06-14T01:47:22.000Z
2022-03-20T07:55:32.000Z
setup.py
HOKOTATE-pzw/maysics
59c38089c51db74948e3e2133c0a860880dcf0eb
[ "MIT" ]
1
2022-01-20T04:30:42.000Z
2022-01-20T04:30:42.000Z
setup.py
HOKOTATE-pzw/maysics
59c38089c51db74948e3e2133c0a860880dcf0eb
[ "MIT" ]
1
2022-03-20T07:58:24.000Z
2022-03-20T07:58:24.000Z
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command NAME = 'maysics' DESCRIPTION = 'A framework for calculating and modeling' URL = 'https://github.com/HOKOTATE-pzw/maysics.git' EMAIL = 'pangzewei2010@foxmail.com' AUTHOR = 'HOKOTATE' REQUIRES_PYTHON = '>=3.6.0...
26.97
86
0.632555
2cfc67d46623b91ca9681a303da92ef922e4a901
9,441
py
Python
tests/test_graph.py
qingpeng/khmer
b71158beccedafd5e0b8daf21108cf9da727fef6
[ "BSD-3-Clause" ]
null
null
null
tests/test_graph.py
qingpeng/khmer
b71158beccedafd5e0b8daf21108cf9da727fef6
[ "BSD-3-Clause" ]
null
null
null
tests/test_graph.py
qingpeng/khmer
b71158beccedafd5e0b8daf21108cf9da727fef6
[ "BSD-3-Clause" ]
null
null
null
# # This file is part of khmer, http://github.com/ged-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2013. It is licensed under # the three-clause BSD license; see doc/LICENSE.txt. # Contact: khmer-project@idyll.org # import khmer import screed import khmer_tst_utils as utils from nose.plugins.att...
26.745042
74
0.595488
6e2a5c913a57a9351afa6d1cba9426045cc73cbb
5,229
py
Python
neutronclient/neutron/v2_0/networkprofile.py
yatinkumbhare/python-neutronclient
c1310f32fbb6dfa958bb31152ee5b492b177c6cb
[ "Apache-2.0" ]
null
null
null
neutronclient/neutron/v2_0/networkprofile.py
yatinkumbhare/python-neutronclient
c1310f32fbb6dfa958bb31152ee5b492b177c6cb
[ "Apache-2.0" ]
null
null
null
neutronclient/neutron/v2_0/networkprofile.py
yatinkumbhare/python-neutronclient
c1310f32fbb6dfa958bb31152ee5b492b177c6cb
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
39.613636
78
0.59476
f57a89e378fed55620b3fb09e0bdd6e012d25c91
3,602
py
Python
Back-End/Python/Basics/Part -3- Hash Maps/05- Specialized Dictionaries/_03_OrderDict_vs_dict.py
ASHISHKUMAR2411/Programming-CookBook
9c60655d64d21985ccb4196360858d98344701f9
[ "MIT" ]
25
2021-04-28T02:51:26.000Z
2022-03-24T13:58:04.000Z
Back-End/Python/Basics/Part -3- Hash Maps/05- Specialized Dictionaries/_03_OrderDict_vs_dict.py
ASHISHKUMAR2411/Programming-CookBook
9c60655d64d21985ccb4196360858d98344701f9
[ "MIT" ]
1
2022-03-03T23:33:41.000Z
2022-03-03T23:35:41.000Z
Back-End/Python/Basics/Part -3- Hash Maps/05- Specialized Dictionaries/_03_OrderDict_vs_dict.py
ASHISHKUMAR2411/Programming-CookBook
9c60655d64d21985ccb4196360858d98344701f9
[ "MIT" ]
15
2021-05-30T01:35:20.000Z
2022-03-25T12:38:25.000Z
from collections import OrderedDict from timeit import timeit d1 = OrderedDict(a=1, b=2, c=3, d=4) d2 = dict(a=1, b=2, c=3, d=4) print(d1) print(d2) OrderedDict([('a', 1), ('b', 2), ('c', 3), ('d', 4)]) {'a': 1, 'b': 2, 'c': 3, 'd': 4} for k in reversed(d1): print(k) for k in reversed(list(d2.keys())): ...
17.570732
77
0.516935
654de2a5067e39533666412a9cfffbb77276958d
1,375
py
Python
setup.py
alexliberzonlab/pompy
8bba8138c43800e22ddc23107f10b06e5df69860
[ "MIT" ]
12
2016-03-10T13:52:07.000Z
2021-03-09T17:22:28.000Z
setup.py
alexliberzonlab/pompy
8bba8138c43800e22ddc23107f10b06e5df69860
[ "MIT" ]
1
2018-11-13T12:35:10.000Z
2018-11-14T09:35:15.000Z
setup.py
alexliberzonlab/pompy
8bba8138c43800e22ddc23107f10b06e5df69860
[ "MIT" ]
7
2016-03-10T13:52:36.000Z
2021-05-09T15:26:39.000Z
# -*- coding: utf-8 -*- """Setup script for pompy package.""" from setuptools import setup from os import path from io import open here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'docs', 'description.rst'), encoding='utf-8') as fh: long_description = fh.read() setup( name='pompy', ...
31.25
78
0.632727
3ea0efccd42bc96928a4484c27bfb8c8540cb44e
2,838
py
Python
utils.py
mlapierre/arxiv-sanity-preserver
ccbe6a8c576ad62d6c1dcf3491bf1b2a0536c981
[ "MIT" ]
6
2018-08-22T12:58:09.000Z
2021-05-28T17:33:29.000Z
utils.py
mlapierre/arxiv-sanity-preserver
ccbe6a8c576ad62d6c1dcf3491bf1b2a0536c981
[ "MIT" ]
null
null
null
utils.py
mlapierre/arxiv-sanity-preserver
ccbe6a8c576ad62d6c1dcf3491bf1b2a0536c981
[ "MIT" ]
1
2020-08-19T08:34:28.000Z
2020-08-19T08:34:28.000Z
from contextlib import contextmanager import os import re import pickle import tempfile # global settings # ----------------------------------------------------------------------------- class Config(object): # main paper information repo file db_path = 'db.p' # intermediate processing folders pdf_dir ...
27.823529
86
0.593376
4f10fde366482d4c618c6595c79cb1a814840a62
37,629
py
Python
music21/alpha/analysis/fixer.py
cuthbertLab/music21
1be16c255460107c10d7b4bc8eb77f0d115b5eac
[ "MIT" ]
1,449
2015-01-09T15:53:56.000Z
2022-03-31T18:24:46.000Z
music21/alpha/analysis/fixer.py
cuthbertLab/music21
1be16c255460107c10d7b4bc8eb77f0d115b5eac
[ "MIT" ]
1,179
2015-01-07T17:07:54.000Z
2022-03-31T16:46:02.000Z
music21/alpha/analysis/fixer.py
cuthbertLab/music21
1be16c255460107c10d7b4bc8eb77f0d115b5eac
[ "MIT" ]
393
2015-01-03T20:38:16.000Z
2022-03-25T16:51:22.000Z
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Name: alpha/analysis/fixer.py # Purpose: Fixes two streams given a list of changes between them # # Authors: Emily Zhang # # Copyright: Copyright © 2016 Michael Scott Cuthbert and the music21 ...
38.20203
100
0.595365
0007572b285b328ab300e51a63bc191728a12ad9
14,987
py
Python
v1.0.0.test/toontown/quest/QuestManagerAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-01T15:46:43.000Z
2021-07-23T16:26:48.000Z
v1.0.0.test/toontown/quest/QuestManagerAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
1
2019-06-29T03:40:05.000Z
2021-06-13T01:15:16.000Z
v1.0.0.test/toontown/quest/QuestManagerAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-28T21:18:46.000Z
2021-02-25T06:37:25.000Z
from direct.directnotify import DirectNotifyGlobal from toontown.quest import Quests from toontown.toonbase import ToontownBattleGlobals as TTBG class QuestManagerAI: notify = DirectNotifyGlobal.directNotify.newCategory('QuestManagerAI') def __init__(self, air): self.air = air def toonPlayedMinig...
46.981191
286
0.576967
7b7ed4d5c4c25959895b0ccb09ee0aa1da242d1a
6,655
py
Python
scripts/utils.py
m-zayan/latex-resources
05297a218ea45e867d031c3be3d12a281691e324
[ "MIT" ]
null
null
null
scripts/utils.py
m-zayan/latex-resources
05297a218ea45e867d031c3be3d12a281691e324
[ "MIT" ]
null
null
null
scripts/utils.py
m-zayan/latex-resources
05297a218ea45e867d031c3be3d12a281691e324
[ "MIT" ]
1
2022-03-17T17:52:46.000Z
2022-03-17T17:52:46.000Z
# -*- coding: utf-8 -*- import re import os import shutil class Static: namespace = set() def def_namespace(path: str, newpath: str) -> bool: if path in Static.namespace: return False Static.namespace.add(newpath) return True def is_valid_path(*args, **kwargs) -> bool: for path ...
19.068768
120
0.505935
4e7a729a79e0120ea36d2ea1b8c0f1c0eb74cd59
327
py
Python
news/templatetags/isavailable.py
kapsiry/Torvi
a40d930aa4e1859944d279c1956f7b3bd915f8a4
[ "MIT" ]
null
null
null
news/templatetags/isavailable.py
kapsiry/Torvi
a40d930aa4e1859944d279c1956f7b3bd915f8a4
[ "MIT" ]
3
2020-02-11T22:12:29.000Z
2021-04-30T20:34:52.000Z
news/templatetags/isavailable.py
kapsiry/Torvi
a40d930aa4e1859944d279c1956f7b3bd915f8a4
[ "MIT" ]
2
2015-11-08T20:51:47.000Z
2017-04-22T11:55:35.000Z
from django import template register = template.Library() from news.models import Twitter_available, Facebook_available def Fb_available(context): return Facebook_available() def Tw_available(context): return Twitter_available() register.filter('fbavail', Fb_available) register.filter('twavail', Tw_ava...
23.357143
61
0.792049
868eac36340e7f66abc0a6741fbbd974713c4a00
1,480
py
Python
numba_dppy/tests/test_parfor_lower_message.py
1e-to/numba-dppy
70bd9d6621b1e93819ee3d9c107a60314043bf6f
[ "Apache-2.0" ]
null
null
null
numba_dppy/tests/test_parfor_lower_message.py
1e-to/numba-dppy
70bd9d6621b1e93819ee3d9c107a60314043bf6f
[ "Apache-2.0" ]
11
2021-11-24T12:21:02.000Z
2022-02-07T12:05:59.000Z
numba_dppy/tests/test_parfor_lower_message.py
1e-to/numba-dppy
70bd9d6621b1e93819ee3d9c107a60314043bf6f
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
27.924528
74
0.683784
34f496e0727679fcae5938d7582570965cb3e863
2,247
py
Python
h5py/tests/test_errors.py
ramonaoptics/h5py
c36c7acfbd99bb1f64d2950d58391ad05be9bd9c
[ "BSD-3-Clause" ]
1,657
2015-01-07T15:17:44.000Z
2022-03-30T13:11:55.000Z
h5py/tests/test_errors.py
ramonaoptics/h5py
c36c7acfbd99bb1f64d2950d58391ad05be9bd9c
[ "BSD-3-Clause" ]
1,531
2015-01-05T21:58:02.000Z
2022-03-31T12:34:02.000Z
h5py/tests/test_errors.py
ramonaoptics/h5py
c36c7acfbd99bb1f64d2950d58391ad05be9bd9c
[ "BSD-3-Clause" ]
503
2015-01-08T07:14:27.000Z
2022-03-23T21:09:41.000Z
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ Tests the h5py.File object. """ import thre...
26.435294
79
0.64219
229b62eeb2d28b47257c65348978a20022a7b019
3,841
py
Python
exercises/fit_gaussian_estimators.py
ttomn/IML.HUJI
9b8d7acc5102e79d5f9e2135e0672a2277adf0c5
[ "MIT" ]
null
null
null
exercises/fit_gaussian_estimators.py
ttomn/IML.HUJI
9b8d7acc5102e79d5f9e2135e0672a2277adf0c5
[ "MIT" ]
null
null
null
exercises/fit_gaussian_estimators.py
ttomn/IML.HUJI
9b8d7acc5102e79d5f9e2135e0672a2277adf0c5
[ "MIT" ]
null
null
null
from plotly.subplots import make_subplots from IMLearn.learners import UnivariateGaussian, MultivariateGaussian from numpy import unravel_index import numpy as np import plotly.graph_objects as go import plotly.io as pio import plotly.express as px pio.templates.default = "simple_white" SAMPLES_AMOUNT = 1000 TRUE_EX...
46.277108
110
0.710492
d1d263d34eef05b0ce68bc0b5cebb62ffb07eed1
2,874
py
Python
tests/unit/bokeh/document/test_locking.py
daledali/bokeh
c4f0debe7bd230d7e1aa8500716e8e997c04f528
[ "BSD-3-Clause" ]
1
2020-01-19T03:17:18.000Z
2020-01-19T03:17:18.000Z
tests/unit/bokeh/document/test_locking.py
daledali/bokeh
c4f0debe7bd230d7e1aa8500716e8e997c04f528
[ "BSD-3-Clause" ]
1
2021-05-12T10:14:45.000Z
2021-05-12T10:14:45.000Z
tests/unit/bokeh/document/test_locking.py
daledali/bokeh
c4f0debe7bd230d7e1aa8500716e8e997c04f528
[ "BSD-3-Clause" ]
1
2020-01-21T12:03:58.000Z
2020-01-21T12:03:58.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
36.846154
78
0.416145
8120537cc94bedc3586c45b8c7f8f5319c61d946
3,628
py
Python
day4.py
Siliconrob/advent2021
29085e41bbaca6ea1783c09641418b649ff9e026
[ "MIT" ]
null
null
null
day4.py
Siliconrob/advent2021
29085e41bbaca6ea1783c09641418b649ff9e026
[ "MIT" ]
null
null
null
day4.py
Siliconrob/advent2021
29085e41bbaca6ea1783c09641418b649ff9e026
[ "MIT" ]
null
null
null
import itertools import numpy as np import pandas import pandas as pd from aocd import get_data from parse import parse def create_bingo_card(input_rows: str) -> pandas.DataFrame: input_matrix = [] card_rows = [row for row in input_rows.split('\n')] for row_data in card_rows: input_matrix.append([...
33.284404
127
0.640022
28cfb8885073cc97b238402e89fd44c76660fc49
359
py
Python
wireless/__init__.py
LouSalaun/wireless-suite
d521508998a6256b5749ad93bb66c4f9a5998b6c
[ "BSD-3-Clause" ]
1
2021-01-08T17:55:04.000Z
2021-01-08T17:55:04.000Z
wireless/__init__.py
BaptCav/wireless-suite
21641523e98c3cd0d692ba5cc96287a109993ee0
[ "BSD-3-Clause" ]
null
null
null
wireless/__init__.py
BaptCav/wireless-suite
21641523e98c3cd0d692ba5cc96287a109993ee0
[ "BSD-3-Clause" ]
1
2021-01-09T14:36:32.000Z
2021-01-09T14:36:32.000Z
from gym.envs.registration import register register( id='TimeFreqResourceAllocation-v0', entry_point='wireless.envs.time_freq_resource_allocation_v0:TimeFreqResourceAllocationV0', ) register( id='NomaULTimeFreqResourceAllocation-v0', entry_point='wireless.envs.noma_ul_time_freq_resource_allocation_v0:...
29.916667
108
0.832869
26694d2e13ded90acbe4f340842b5155dbf98674
839
py
Python
xlsx/jython/read/xlsx_read.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
3
2015-05-12T16:44:27.000Z
2021-02-09T00:39:24.000Z
xlsx/jython/read/xlsx_read.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
null
null
null
xlsx/jython/read/xlsx_read.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
null
null
null
#! /usr/bin/jython # -*- coding: utf-8 -*- # # xlsx_read.py # Jul/20/2015 # # ---------------------------------------------------------------- import sys # # ---------------------------------------------------------------- sys.path.append ('/var/www/data_base/common/python_common') sys.path.append ('/var/www/data_b...
28.931034
66
0.511323
7b91b502d342a77ec3fc0a9c3355d71af93dbdd1
2,049
py
Python
tile_loader.py
juangallostra/roguelike-tutorial
f0c4929f0ec16131a2a00cc48567196ea235a39c
[ "MIT" ]
null
null
null
tile_loader.py
juangallostra/roguelike-tutorial
f0c4929f0ec16131a2a00cc48567196ea235a39c
[ "MIT" ]
null
null
null
tile_loader.py
juangallostra/roguelike-tutorial
f0c4929f0ec16131a2a00cc48567196ea235a39c
[ "MIT" ]
null
null
null
import libtcodpy as tcod from collections import namedtuple FONT_PATH = 'static/test_font.png' FONT_FLAGS = tcod.FONT_TYPE_GREYSCALE | tcod.FONT_LAYOUT_TCOD # Tiles source image TILES_SOURCE = 'static/complete_tileset.png' TILES_ROWS = 20 TILES_COLS = 32 TILE_BEGINING_ROW = 5 TILE_END_ROW = 15 # The index of the fir...
33.048387
128
0.691557
5c3fb93ca57609e09c451485c0397085e421655c
19,298
py
Python
test/functional/test_framework/util.py
cryptonexii/murfcoin
2d3054cec5e7e65c7d29fb91e3fee1e8759339b0
[ "MIT" ]
2
2018-02-02T17:34:07.000Z
2020-07-06T16:11:25.000Z
test/functional/test_framework/util.py
cryptonexii/murfcoin
2d3054cec5e7e65c7d29fb91e3fee1e8759339b0
[ "MIT" ]
null
null
null
test/functional/test_framework/util.py
cryptonexii/murfcoin
2d3054cec5e7e65c7d29fb91e3fee1e8759339b0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Helpful routines for regression testing.""" from base64 import b64encode from binascii import hexlify,...
38.289683
119
0.650534
7e242d61fe66c2affa6f01f9bc921e006af78819
9,935
py
Python
raspi_lora/lora.py
mpRegalado/raspi-lora
7348fa3049d7920036f3b9c18c24504789167c88
[ "MIT" ]
null
null
null
raspi_lora/lora.py
mpRegalado/raspi-lora
7348fa3049d7920036f3b9c18c24504789167c88
[ "MIT" ]
null
null
null
raspi_lora/lora.py
mpRegalado/raspi-lora
7348fa3049d7920036f3b9c18c24504789167c88
[ "MIT" ]
null
null
null
import time from enum import Enum import math from collections import namedtuple from random import random import RPi.GPIO as GPIO import spidev from .constants import * class ModemConfig(Enum): Bw125Cr45Sf128 = (0x72, 0x74, 0x04) Bw500Cr45Sf128 = (0x92, 0x74, 0x04) Bw31_25Cr48Sf512 = (0x48, 0x94, 0x04)...
33.116667
123
0.594363
dbc6dea68d8d9d9574d75f2560ed4e4c6552c18c
15,599
py
Python
yocto/poky/bitbake/lib/bb/data.py
libreswitch/libreswitch
1bb99e4bbc55aff46048453e28a1466b08d338aa
[ "Apache-2.0" ]
16
2017-01-17T15:20:43.000Z
2021-03-19T05:45:14.000Z
yocto/poky/bitbake/lib/bb/data.py
libreswitch/libreswitch
1bb99e4bbc55aff46048453e28a1466b08d338aa
[ "Apache-2.0" ]
415
2016-12-20T17:20:45.000Z
2018-09-23T07:59:23.000Z
yocto/poky/bitbake/lib/bb/data.py
libreswitch/libreswitch
1bb99e4bbc55aff46048453e28a1466b08d338aa
[ "Apache-2.0" ]
10
2016-12-20T13:24:50.000Z
2021-03-19T05:46:43.000Z
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake 'Data' implementations Functions for interacting with the data structure used by the BitBake build tools. The expandKeys and update_data are the most expensive operations. At night the cookie monster came by and sugge...
34.741648
158
0.59523
3c90e926c8ae53289a44a231d9db5b1859df723b
9,203
py
Python
StageI/bert_predict.py
cobisLab/YTLR
588cafdeddf9129e0faa36d3be645bc532d09432
[ "Apache-2.0" ]
null
null
null
StageI/bert_predict.py
cobisLab/YTLR
588cafdeddf9129e0faa36d3be645bc532d09432
[ "Apache-2.0" ]
null
null
null
StageI/bert_predict.py
cobisLab/YTLR
588cafdeddf9129e0faa36d3be645bc532d09432
[ "Apache-2.0" ]
null
null
null
# encoding='utf-8' import torch import numpy as np import pandas as pd import argparse import contextlib import sys from torch.utils.data import DataLoader, TensorDataset from sklearn.metrics import roc_curve, roc_auc_score from Models import BertClassifier from utils import set_seeds, load_checkpoint, create_mini_batc...
35.125954
170
0.563077
41b84e69009ea66b558a465eaa6d7e3ac1593568
2,674
py
Python
0-notes/job-search/Cracking_the_Coding_Interview/C07ObjectOrientedDesign/python/7.3-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking_the_Coding_Interview/C07ObjectOrientedDesign/python/7.3-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking_the_Coding_Interview/C07ObjectOrientedDesign/python/7.3-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
# 7.3 Jukebox # Design a musical jukebox using object-oriented principles. # In what format is the music in the jukebox? # Does it take money or is it free? # Which currency? # Does it deliver change? # Computer sim that mirrors physical jukeboxes and is free # Basic System Components (object) # Jukebox, CD, Song, A...
22.661017
70
0.593119
4b500b7b07484df0fbe0802d69b739582e14c68a
547
py
Python
excel/editing_cells_test.py
DaviNakamuraCardoso/Projeto-ATMCP
ac4bbde04294681091d916e83c20c27be67c623a
[ "MIT" ]
null
null
null
excel/editing_cells_test.py
DaviNakamuraCardoso/Projeto-ATMCP
ac4bbde04294681091d916e83c20c27be67c623a
[ "MIT" ]
null
null
null
excel/editing_cells_test.py
DaviNakamuraCardoso/Projeto-ATMCP
ac4bbde04294681091d916e83c20c27be67c623a
[ "MIT" ]
null
null
null
import openpyxl from openpyxl.styles import Font wb_formulas = openpyxl.load_workbook('redefined_file.xlsx') sheet = wb_formulas.active print(sheet.max_row) new_wb = openpyxl.Workbook() new_sheet = new_wb.active new_sheet['A1'] = 'Tall row' new_sheet['B2'] = 'Wide column' new_sheet.row_dimensions[1].height = 70 new_sh...
28.789474
59
0.767824
89bbe856de8578919cdac3b1be05fb4037c9f90f
248
py
Python
Chapter07/plotly_flask_demo1/template.py
allen-zqh/plotly
bcaf0930901e77db07245b63bff049eb75893416
[ "MIT" ]
null
null
null
Chapter07/plotly_flask_demo1/template.py
allen-zqh/plotly
bcaf0930901e77db07245b63bff049eb75893416
[ "MIT" ]
null
null
null
Chapter07/plotly_flask_demo1/template.py
allen-zqh/plotly
bcaf0930901e77db07245b63bff049eb75893416
[ "MIT" ]
1
2021-02-04T06:56:18.000Z
2021-02-04T06:56:18.000Z
from flask import render_template from flask import Flask app = Flask(__name__) @app.route('/hello/') @app.route('/hello/<name>') def hello(name=None): return render_template('index.html', name=name) if __name__ == '__main__': app.run()
19.076923
51
0.701613
01c556941bb2cc26a99349fa4dfcfc0e5292395b
57
py
Python
bkgmodel/tests/test_version.py
cta-observatory/pybkgmodel
22852a76c113f9dea3f5669b70bee4db0175be03
[ "BSD-3-Clause" ]
1
2021-05-31T09:26:55.000Z
2021-05-31T09:26:55.000Z
bkgmodel/tests/test_version.py
cta-observatory/pybkgmodel
22852a76c113f9dea3f5669b70bee4db0175be03
[ "BSD-3-Clause" ]
null
null
null
bkgmodel/tests/test_version.py
cta-observatory/pybkgmodel
22852a76c113f9dea3f5669b70bee4db0175be03
[ "BSD-3-Clause" ]
null
null
null
def test_version(): from bkgmodel import __version__
19
36
0.77193
aa1648536c97f80a1d08ac29f73fa84fced71220
2,398
py
Python
setup.py
dhanainme/sagemaker-inference-toolkit
388bede354e66be9c2f237ee3f00d95ac91df24d
[ "Apache-2.0" ]
null
null
null
setup.py
dhanainme/sagemaker-inference-toolkit
388bede354e66be9c2f237ee3f00d95ac91df24d
[ "Apache-2.0" ]
null
null
null
setup.py
dhanainme/sagemaker-inference-toolkit
388bede354e66be9c2f237ee3f00d95ac91df24d
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 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 the 'license' fil...
31.552632
104
0.683486
cfde7b31df287cecb4ed8c71cf11a1e8a5bc6b1e
2,701
py
Python
tests/test_doImport.py
ktlim/utils
3afcb0f245807a502f1e73dac4782a1b239bb3e0
[ "BSD-3-Clause" ]
null
null
null
tests/test_doImport.py
ktlim/utils
3afcb0f245807a502f1e73dac4782a1b239bb3e0
[ "BSD-3-Clause" ]
1
2021-09-15T15:13:34.000Z
2021-09-15T15:13:34.000Z
tests/test_doImport.py
ktlim/utils
3afcb0f245807a502f1e73dac4782a1b239bb3e0
[ "BSD-3-Clause" ]
null
null
null
# This file is part of utils. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # Use of this source code is governed by a...
31.406977
78
0.661237
bf5e37caef9ca0d8711f3fbe0f4bb6ff76edf021
66,712
py
Python
test/integration/component/test_escalations_volumes.py
disller/cloudstack
794ee6929d078fd919842f2c1f55156f133d7934
[ "Apache-2.0" ]
1
2015-02-06T04:17:11.000Z
2015-02-06T04:17:11.000Z
test/integration/component/test_escalations_volumes.py
disller/cloudstack
794ee6929d078fd919842f2c1f55156f133d7934
[ "Apache-2.0" ]
null
null
null
test/integration/component/test_escalations_volumes.py
disller/cloudstack
794ee6929d078fd919842f2c1f55156f133d7934
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.636752
116
0.593551
39cac5928ea8e70d3fb6ab973b53c546aaa76f82
574
py
Python
array_ops/tf.tile.py
Asurada2015/TFAPI_translation
1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf
[ "Apache-2.0" ]
7
2017-10-19T13:59:24.000Z
2019-11-26T03:40:08.000Z
array_ops/tf.tile.py
Asurada2015/TFAPI_translation
1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf
[ "Apache-2.0" ]
null
null
null
array_ops/tf.tile.py
Asurada2015/TFAPI_translation
1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf
[ "Apache-2.0" ]
5
2018-08-22T02:57:03.000Z
2020-03-05T07:14:21.000Z
"""tf.tile(input, multm iples, name = None) 解释:这个函数的作用是通过给定的tensor去构造一个新的tensor。 所使用的方法是将input复制multiples次,输出的tensor的第i维有input.dims(i) * multiples[i]个元素, input中的元素被复制multiples[i]次。比如,input = [a b c d], multiples = [2], 那么tile(input, multiples) = [a b c d a b c d]。""" import tensorflow as tf sess = tf.Session() data =...
30.210526
72
0.69338
be7d6ef8cd61b26bce0ad0a5f708f1315af46e0a
3,177
py
Python
src/solutions/common/bizz/location_data_import.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/solutions/common/bizz/location_data_import.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/solutions/common/bizz/location_data_import.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
38.743902
116
0.679572
814d9db9d131da71f6f89b1227084af948a401ca
7,876
py
Python
tests/serialization_test.py
isabella232/flax
39a04e82d6f97ef90c59425599018f2b9df8b6ea
[ "Apache-2.0" ]
null
null
null
tests/serialization_test.py
isabella232/flax
39a04e82d6f97ef90c59425599018f2b9df8b6ea
[ "Apache-2.0" ]
null
null
null
tests/serialization_test.py
isabella232/flax
39a04e82d6f97ef90c59425599018f2b9df8b6ea
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The Flax 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 applicable law or agreed to in wri...
36.976526
78
0.619858
d7d3fa7aacee65b80991d3e8cf3ef140f4858133
1,450
py
Python
0x07-Session_authentication/api/v1/auth/session_exp_auth.py
JoseAVallejo12/holbertonschool-web_back_end
eb514784772352b8e4873d1f648726815ab69592
[ "MIT" ]
null
null
null
0x07-Session_authentication/api/v1/auth/session_exp_auth.py
JoseAVallejo12/holbertonschool-web_back_end
eb514784772352b8e4873d1f648726815ab69592
[ "MIT" ]
null
null
null
0x07-Session_authentication/api/v1/auth/session_exp_auth.py
JoseAVallejo12/holbertonschool-web_back_end
eb514784772352b8e4873d1f648726815ab69592
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ SessionExpAuth class to manage API authentication """ from api.v1.auth.session_auth import SessionAuth from os import getenv from datetime import datetime, timedelta class SessionExpAuth(SessionAuth): """SessionExpAuth class to manage API authentication """ def __init__(self): ...
30.851064
75
0.631724
16bf1572d056580d4d1038794cdd9694241d9631
7,195
py
Python
src/se3_distributions/eval/evaluate_base_distance.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
1
2021-09-19T18:35:42.000Z
2021-09-19T18:35:42.000Z
src/se3_distributions/eval/evaluate_base_distance.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
null
null
null
src/se3_distributions/eval/evaluate_base_distance.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
3
2021-11-07T12:51:20.000Z
2022-01-07T10:37:07.000Z
# -*- coding: utf-8 -*- """ Created on Tue Nov 21 17:35:53 2017 @author: bokorn """ from model_renderer.pose_renderer import BpyRenderer print('\n'*5) import sys from IPython.core import ultratb sys.excepthook = ultratb.FormattedTB(mode='Verbose', color_scheme='Linux', call_pdb=1) import numpy as np im...
40.421348
172
0.647116
0a2a0ecfe6ea0617f2bada5772c70eb366cb7571
3,195
py
Python
tests/python/signals_test.py
karpierz/jtypes.py4j
1bf48c022357c558da4d0df45fe4a0100df99a99
[ "BSD-3-Clause" ]
null
null
null
tests/python/signals_test.py
karpierz/jtypes.py4j
1bf48c022357c558da4d0df45fe4a0100df99a99
[ "BSD-3-Clause" ]
null
null
null
tests/python/signals_test.py
karpierz/jtypes.py4j
1bf48c022357c558da4d0df45fe4a0100df99a99
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- from __future__ import unicode_literals, absolute_import from unittest import TestCase from jt.py4j.signals import Signal class SignalTest(TestCase): def setUp(self): self.called = [0] self.called_kwargs = [] self.instance1 = object() self.instance2 = obj...
32.602041
79
0.623474
a7d4542e2d066b584d9d8deb24212348113fb8a9
7,815
py
Python
Prediction methods/MPS/ranker_and_evaluator/Evaluator.py
spxuw/PPI-Prediction-Project
e947b134eafd2e4fb43dba5e4bdfd4d582534ec9
[ "MIT" ]
null
null
null
Prediction methods/MPS/ranker_and_evaluator/Evaluator.py
spxuw/PPI-Prediction-Project
e947b134eafd2e4fb43dba5e4bdfd4d582534ec9
[ "MIT" ]
null
null
null
Prediction methods/MPS/ranker_and_evaluator/Evaluator.py
spxuw/PPI-Prediction-Project
e947b134eafd2e4fb43dba5e4bdfd4d582534ec9
[ "MIT" ]
null
null
null
import math import csv import pprint as pp from sklearn import metrics class Evaluator(): def __init__(self, file_name_of_all_node_id_couples_belonging_to_the_validation_set): self.file_name_of_all_node_id_couples_belonging_to_the_validation_set = file_name_of_all_node_id_couples_belonging_to_the_validat...
44.403409
195
0.653359
bad722d71c6cc70ea674e07801f2c3904c0ee812
391
py
Python
bongaapp/migrations/0003_alter_image_image.py
kipsang01/bonga-app
4d6c07cea97b0ce8a7df00526f37b758a982906f
[ "MIT" ]
null
null
null
bongaapp/migrations/0003_alter_image_image.py
kipsang01/bonga-app
4d6c07cea97b0ce8a7df00526f37b758a982906f
[ "MIT" ]
null
null
null
bongaapp/migrations/0003_alter_image_image.py
kipsang01/bonga-app
4d6c07cea97b0ce8a7df00526f37b758a982906f
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-12-04 10:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bongaapp', '0002_auto_20211204_1121'), ] operations = [ migrations.AlterField( model_name='image', name='image', ...
20.578947
56
0.595908
c95f7b2eb191e5d1c9abba0605f820568aa3225c
3,336
py
Python
tensorflow/python/data/experimental/kernel_tests/optimization/map_parallelization_test.py
gehring/tensorflow
e6d171a2afcf0b7a1f77f125751727232480edbe
[ "Apache-2.0" ]
52
2018-11-12T06:39:35.000Z
2022-03-08T05:31:27.000Z
tensorflow/python/data/experimental/kernel_tests/optimization/map_parallelization_test.py
apeforest/tensorflow
07da23bfa2a9ca10cd7c1dd6bea0f85d981c013e
[ "Apache-2.0" ]
2
2018-12-04T08:35:40.000Z
2020-10-22T16:17:39.000Z
tensorflow/python/data/experimental/kernel_tests/optimization/map_parallelization_test.py
apeforest/tensorflow
07da23bfa2a9ca10cd7c1dd6bea0f85d981c013e
[ "Apache-2.0" ]
17
2019-03-11T01:17:16.000Z
2022-02-21T00:44:47.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.066667
80
0.696942
49c416b436c77dcc9e10c01719749a029480baa2
12,038
py
Python
tfx/orchestration/experimental/core/async_pipeline_task_gen_test.py
stjordanis/tfx
4749388de03230361f2b7b733a657b3bc18b4152
[ "Apache-2.0" ]
1
2022-03-02T05:39:45.000Z
2022-03-02T05:39:45.000Z
tfx/orchestration/experimental/core/async_pipeline_task_gen_test.py
stjordanis/tfx
4749388de03230361f2b7b733a657b3bc18b4152
[ "Apache-2.0" ]
null
null
null
tfx/orchestration/experimental/core/async_pipeline_task_gen_test.py
stjordanis/tfx
4749388de03230361f2b7b733a657b3bc18b4152
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
38.832258
89
0.717312
a13c0896c4b39a7087b3db3dd36e23d0afec1528
8,937
py
Python
trainer.py
przybyszewskiw/DeepSpeech2
5d74ac6e1df9dd509cda9cebd00eac52e200767b
[ "MIT" ]
null
null
null
trainer.py
przybyszewskiw/DeepSpeech2
5d74ac6e1df9dd509cda9cebd00eac52e200767b
[ "MIT" ]
1
2021-03-19T03:46:16.000Z
2021-03-19T03:46:16.000Z
trainer.py
przybyszewskiw/DeepSpeech2
5d74ac6e1df9dd509cda9cebd00eac52e200767b
[ "MIT" ]
null
null
null
import datetime import math import os import sys import time import torch import torch.optim as optim import torch.nn as nn import dataload as dl from model import DeepSpeech import lrpolicy as lrp try: import apex from apex import amp from apex.parallel import DistributedDataParallel as DDP except ImportE...
37.708861
102
0.545821
1548cc9add1864718238fd22384e66a1c070d26b
21,911
py
Python
st2client/tests/unit/test_auth.py
ekhavana/st2
2b47b0e317a2dfd7d92d63ec6dcf706493148890
[ "Apache-2.0" ]
null
null
null
st2client/tests/unit/test_auth.py
ekhavana/st2
2b47b0e317a2dfd7d92d63ec6dcf706493148890
[ "Apache-2.0" ]
null
null
null
st2client/tests/unit/test_auth.py
ekhavana/st2
2b47b0e317a2dfd7d92d63ec6dcf706493148890
[ "Apache-2.0" ]
null
null
null
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
35.743883
98
0.614349
5c3b5cdd9f1977b2ca11c3ccb0c0c261d08060e0
663
py
Python
List/maxSubArray.py
beforeuwait/myLintCode
db4ebc51f6f4a3d7c8d4fa5a6174547642b8de0b
[ "MIT" ]
null
null
null
List/maxSubArray.py
beforeuwait/myLintCode
db4ebc51f6f4a3d7c8d4fa5a6174547642b8de0b
[ "MIT" ]
null
null
null
List/maxSubArray.py
beforeuwait/myLintCode
db4ebc51f6f4a3d7c8d4fa5a6174547642b8de0b
[ "MIT" ]
null
null
null
# coding=utf-8 """ 最大子数组 说实话我一开始并没有想出这个方法 想的是老老实实计算和比较 这题值得反复体会 当前解法的意义在于,遍历过程中,一直加,对于让count < 0的元素,然后从那个点重新开始 input: -2 2 -3 4 -1 2 1 -5 3 t 0 2 0 4 3 5 6 1 4 s 0 2 2 4 4 5 6 6 6 t 记录从0开始加的最大子数列的和 整体必须大于0 s 记录t从0->0过程中产生的最大数 """ class Solution: """ ...
19.5
55
0.506787