hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c4a20e25214c64f1fee4492086b179d9de887ea
5,520
py
Python
imsngpy/gpwatch.py
SilverRon/imsngpy
e9e55a73403bef4c73dcc242735efc28d79a3066
[ "MIT" ]
1
2021-12-22T08:58:47.000Z
2021-12-22T08:58:47.000Z
imsngpy/gpwatch.py
SilverRon/imsngpy
e9e55a73403bef4c73dcc242735efc28d79a3066
[ "MIT" ]
null
null
null
imsngpy/gpwatch.py
SilverRon/imsngpy
e9e55a73403bef4c73dcc242735efc28d79a3066
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #============================================================ # Module #------------------------------------------------------------ import os import sys import time # IMSNGpy modules sys.path.append('/home/paek/imsngpy') from misc import * # Astropy from astropy.io import...
27.6
108
0.509058
import os import sys import time sys.path.append('/home/paek/imsngpy') from misc import * from astropy.io import ascii def get_size(start_path = '.'): total_size = 0 for dirpath, dirnames, filenames in os.walk(start_path): for f in filenames: fp = os.path.join(dirpath, f) if not os.path.islink(f...
true
true
1c4a210a93526f7ae8c560a788759b5ed53c5f6f
21,306
py
Python
src/briefcase/commands/base.py
chuckyQ/briefcase
06e84e7b1c3af016c828a5a640d277809de6644b
[ "BSD-3-Clause" ]
3
2020-10-20T00:59:22.000Z
2021-02-22T09:22:00.000Z
src/briefcase/commands/base.py
chuckyQ/briefcase
06e84e7b1c3af016c828a5a640d277809de6644b
[ "BSD-3-Clause" ]
null
null
null
src/briefcase/commands/base.py
chuckyQ/briefcase
06e84e7b1c3af016c828a5a640d277809de6644b
[ "BSD-3-Clause" ]
null
null
null
import argparse import importlib import inspect import os import platform import shutil import sys from abc import ABC, abstractmethod from cgi import parse_header from pathlib import Path from urllib.parse import urlparse import requests import toml from cookiecutter.main import cookiecutter from cookiecutter.reposi...
36.797927
107
0.597766
import argparse import importlib import inspect import os import platform import shutil import sys from abc import ABC, abstractmethod from cgi import parse_header from pathlib import Path from urllib.parse import urlparse import requests import toml from cookiecutter.main import cookiecutter from cookiecutter.reposi...
true
true
1c4a21aabd3ae6db6ff20f418f668c968e995202
1,966
py
Python
utils/setup.py
david8862/keras-CenterNet
e74b933f6dd5ffac04f2de3eb0d887742be8490f
[ "Apache-2.0" ]
null
null
null
utils/setup.py
david8862/keras-CenterNet
e74b933f6dd5ffac04f2de3eb0d887742be8490f
[ "Apache-2.0" ]
null
null
null
utils/setup.py
david8862/keras-CenterNet
e74b933f6dd5ffac04f2de3eb0d887742be8490f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools from setuptools.extension import Extension from distutils.command.build_ext import build_ext as DistUtilsBuildExt class BuildExtension(setuptools.Command): description = DistUtilsBuildExt.description user_options = DistUtilsBuildExt.user_...
32.229508
80
0.660224
import setuptools from setuptools.extension import Extension from distutils.command.build_ext import build_ext as DistUtilsBuildExt class BuildExtension(setuptools.Command): description = DistUtilsBuildExt.description user_options = DistUtilsBuildExt.user_options boolean_options = DistUtilsBuildE...
true
true
1c4a21e7724b1a0546fadafe66916377d6168f66
6,287
py
Python
engine/trainer/train.py
7eta/udk_labeler
8cd8a86bc1a78647c0aaf81ca78e6e518fb86ceb
[ "Apache-2.0" ]
2
2021-03-08T02:29:09.000Z
2021-03-08T02:29:11.000Z
engine/trainer/train.py
7eta/udk_labeler
8cd8a86bc1a78647c0aaf81ca78e6e518fb86ceb
[ "Apache-2.0" ]
null
null
null
engine/trainer/train.py
7eta/udk_labeler
8cd8a86bc1a78647c0aaf81ca78e6e518fb86ceb
[ "Apache-2.0" ]
null
null
null
import os import argparse import numpy as np import torch import torch.optim as optim from engine.dataloader import get_dataloader from engine.retinanet import model from engine.retinanet import coco_eval from engine.log.saver import Saver from tqdm import tqdm from collections import deque from engine.log import logge...
41.091503
119
0.585335
import os import argparse import numpy as np import torch import torch.optim as optim from engine.dataloader import get_dataloader from engine.retinanet import model from engine.retinanet import coco_eval from engine.log.saver import Saver from tqdm import tqdm from collections import deque from engine.log import logge...
true
true
1c4a245d2bb97a1c4a9d4c44fe206db1ec8eb500
1,617
py
Python
venv/Lib/site-packages/keystoneclient/tests/unit/v3/test_simple_cert.py
prasoon-uta/IBM-coud-storage
82a6876316715efbd0b492d0d467dde0ab26a56b
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/keystoneclient/tests/unit/v3/test_simple_cert.py
prasoon-uta/IBM-coud-storage
82a6876316715efbd0b492d0d467dde0ab26a56b
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/keystoneclient/tests/unit/v3/test_simple_cert.py
prasoon-uta/IBM-coud-storage
82a6876316715efbd0b492d0d467dde0ab26a56b
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 IBM Corp. # 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...
39.439024
77
0.713667
import testresources from keystoneclient.tests.unit import client_fixtures from keystoneclient.tests.unit.v3 import utils class SimpleCertTests(utils.ClientTestCase, testresources.ResourcedTestCase): resources = [('examples', client_fixtures.EXAMPLES_RESOURCE)] def test_get_ca_certificate(self...
true
true
1c4a24828c826c88606ac6a3b6cd095dfec7005a
15,703
py
Python
tests/chainer_tests/test_optimizer.py
toshihikoyanase/chainer
65b34a19d28f60f732c7069163ca23c710a309f4
[ "MIT" ]
null
null
null
tests/chainer_tests/test_optimizer.py
toshihikoyanase/chainer
65b34a19d28f60f732c7069163ca23c710a309f4
[ "MIT" ]
2
2018-01-09T23:05:30.000Z
2018-01-19T01:19:34.000Z
tests/chainer_tests/test_optimizer.py
bkvogel/chainer
894cd5d008f11eccdf6e1d7106f5b8bfff9ce005
[ "MIT" ]
null
null
null
import copy import unittest import warnings import mock import numpy as np import chainer from chainer import backend from chainer.backends import cuda from chainer import optimizer from chainer import optimizers from chainer import testing from chainer.testing import attr class TestHyperparameter(unittest.TestCase...
32.244353
79
0.650513
import copy import unittest import warnings import mock import numpy as np import chainer from chainer import backend from chainer.backends import cuda from chainer import optimizer from chainer import optimizers from chainer import testing from chainer.testing import attr class TestHyperparameter(unittest.TestCase...
true
true
1c4a24cc773c14d0bd1e71136945beaa0f74f406
880
py
Python
algorithms/sorting/bubble_sort.py
FatiahBalo/python-ds
9eb88425822b6da4d7bd673a124c13fbe6f17523
[ "MIT" ]
1,723
2019-07-30T07:06:22.000Z
2022-03-31T15:22:22.000Z
algorithms/sorting/bubble_sort.py
FatiahBalo/python-ds
9eb88425822b6da4d7bd673a124c13fbe6f17523
[ "MIT" ]
213
2019-10-06T08:07:47.000Z
2021-10-04T15:38:36.000Z
algorithms/sorting/bubble_sort.py
FatiahBalo/python-ds
9eb88425822b6da4d7bd673a124c13fbe6f17523
[ "MIT" ]
628
2019-10-06T10:26:25.000Z
2022-03-31T01:41:00.000Z
""" Bubble Sort worst time complexity occurs when array is reverse sorted - O(n^2) Best time scenario is when array is already sorted - O(n) """ def bubble_sort(array): n = len(array) for i in range(n): for j in range(0, n-i-1): if array[j] > array[j+1]: array[j], array[j+1]...
28.387097
78
0.590909
def bubble_sort(array): n = len(array) for i in range(n): for j in range(0, n-i-1): if array[j] > array[j+1]: array[j], array[j+1] = array[j+1], array[j] return array def bubble_sort_optimized(array): has_swapped = True num_of_iterations = 0 while has_sw...
true
true
1c4a25bdb5c01fe4151a35fa9ee19f84f4205240
59,338
py
Python
sdks/python/apache_beam/runners/common.py
rehmanmuradali/beam
de8ff705145cbbc41bea7750a0a5d3553924ab3a
[ "Apache-2.0" ]
1
2022-01-24T22:07:52.000Z
2022-01-24T22:07:52.000Z
sdks/python/apache_beam/runners/common.py
rehmanmuradali/beam
de8ff705145cbbc41bea7750a0a5d3553924ab3a
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/runners/common.py
rehmanmuradali/beam
de8ff705145cbbc41bea7750a0a5d3553924ab3a
[ "Apache-2.0" ]
1
2019-05-21T11:30:31.000Z
2019-05-21T11:30:31.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 us...
39.985175
112
0.695473
from __future__ import absolute_import from __future__ import division import threading import traceback from builtins import next from builtins import object from builtins import round from builtins import zip from typing import TYPE_CHECKING from typing import Any from typing import Dict from ty...
true
true
1c4a26ec5b0edc44879d37cfc3b85a407c83e08a
9,618
py
Python
src/python/pants/reporting/plaintext_reporter.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "Apache-2.0" ]
null
null
null
src/python/pants/reporting/plaintext_reporter.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "Apache-2.0" ]
null
null
null
src/python/pants/reporting/plaintext_reporter.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "Apache-2.0" ]
1
2019-06-10T17:24:34.000Z
2019-06-10T17:24:34.000Z
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from collections imp...
39.580247
109
0.694843
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from collections import namedtuple import six from colors import cyan, green, red, yellow from pants.base.workunit import WorkUnit, WorkUnitLabel from pants.repo...
true
true
1c4a285a311b988d2b7f90c24434d040cd54642a
3,886
py
Python
setup.py
herrkaefer/psycopgr
376e8511ac591d32533118b5006135458cb5f27f
[ "MIT" ]
23
2017-12-01T03:47:23.000Z
2022-01-06T23:36:56.000Z
setup.py
herrkaefer/psycopgr
376e8511ac591d32533118b5006135458cb5f27f
[ "MIT" ]
9
2017-11-10T00:33:50.000Z
2021-06-06T01:27:20.000Z
setup.py
herrkaefer/psycopgr
376e8511ac591d32533118b5006135458cb5f27f
[ "MIT" ]
9
2017-11-09T13:38:10.000Z
2022-02-17T16:08:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Ackownledgement: # This file is modified from https://github.com/kennethreitz/setup.py # # Note: To use the 'upload' functionality of this file, you must: # $ pipenv install twine --dev import io import os import sys from shutil import rmtree from setuptools impor...
28.785185
90
0.643592
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command NAME = 'psycopgr' DESCRIPTION = 'A Python wrapper of pgRouting for routing from nodes to nodes on real map.' URL = 'https://github.com/herrkaefer/psycopgr' EMAIL = 'gloolar@gmail.com' AUTHOR = 'Yang...
true
true
1c4a2fa84a2670f568ddc2052bf3b41997f3a6af
7,462
py
Python
tests/components/media_player/test_async_helpers.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
4
2019-01-10T14:47:54.000Z
2021-04-22T02:06:27.000Z
tests/components/media_player/test_async_helpers.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
6
2021-02-08T21:02:40.000Z
2022-03-12T00:52:16.000Z
tests/components/media_player/test_async_helpers.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
3
2018-08-29T19:26:20.000Z
2020-01-19T11:58:22.000Z
"""The tests for the Async Media player helper functions.""" import unittest import asyncio import homeassistant.components.media_player as mp from homeassistant.const import ( STATE_PLAYING, STATE_PAUSED, STATE_ON, STATE_OFF, STATE_IDLE) from homeassistant.util.async_ import run_coroutine_threadsafe from tests.c...
33.3125
77
0.641785
import unittest import asyncio import homeassistant.components.media_player as mp from homeassistant.const import ( STATE_PLAYING, STATE_PAUSED, STATE_ON, STATE_OFF, STATE_IDLE) from homeassistant.util.async_ import run_coroutine_threadsafe from tests.common import get_test_home_assistant class AsyncMediaPlayer...
true
true
1c4a2fb0bc1d5a5a20808b69120dab5af1370e7c
1,850
py
Python
main.py
qianqianjun/DCGAN
4e2d37f1d785e592e59334b91d197ef0475c1c99
[ "MIT" ]
null
null
null
main.py
qianqianjun/DCGAN
4e2d37f1d785e592e59334b91d197ef0475c1c99
[ "MIT" ]
null
null
null
main.py
qianqianjun/DCGAN
4e2d37f1d785e592e59334b91d197ef0475c1c99
[ "MIT" ]
null
null
null
""" write by qianqianjun 2019.12.20 运行GAN进行训练的入口文件。 """ import os import tensorflow as tf from train_argparse import hps from dataset_loader import train_images from data_provider import MnistData from DCGAN import DCGAN from utils import combine_imgs # 创建生成结果目录 output_dir='./out' if not os.path.exists(output_dir): ...
30.327869
95
0.675676
import os import tensorflow as tf from train_argparse import hps from dataset_loader import train_images from data_provider import MnistData from DCGAN import DCGAN from utils import combine_imgs output_dir='./out' if not os.path.exists(output_dir): os.mkdir(output_dir) dcgan=DCGAN(hps) mnist_data=MnistData(tr...
true
true
1c4a30464aa70d1e27bbeb964001a464d4795d36
11,724
py
Python
shellbot/listener.py
bernard357/shellbot
daf64fbab4085d1591bf9a1aecd06b4fc615d132
[ "Apache-2.0" ]
11
2017-04-30T18:10:27.000Z
2021-11-07T16:59:29.000Z
shellbot/listener.py
DataCraft-AI/shellbot
daf64fbab4085d1591bf9a1aecd06b4fc615d132
[ "Apache-2.0" ]
38
2017-04-20T17:33:05.000Z
2017-11-10T20:19:07.000Z
shellbot/listener.py
DataCraft-AI/shellbot
daf64fbab4085d1591bf9a1aecd06b4fc615d132
[ "Apache-2.0" ]
3
2017-04-21T21:14:53.000Z
2021-07-27T22:01:21.000Z
# -*- coding: utf-8 -*- # 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 "Li...
33.212465
81
0.598601
import json import logging from multiprocessing import Process import random from six import string_types import time import yaml from .events import Event, Message, Join, Leave class Listener(Process): DEFER_DURATION = 2.0 EMPTY_DELAY = 0.005 FRESH_DURATION = 0.5 def __ini...
true
true
1c4a30519feee2e48d05593d11019103cfebb776
469
py
Python
src/Edge.py
ZacharyJohnson1/python-graph-theory
885096f9066e22b477d0c58d9cec5db2a62571c1
[ "MIT" ]
null
null
null
src/Edge.py
ZacharyJohnson1/python-graph-theory
885096f9066e22b477d0c58d9cec5db2a62571c1
[ "MIT" ]
null
null
null
src/Edge.py
ZacharyJohnson1/python-graph-theory
885096f9066e22b477d0c58d9cec5db2a62571c1
[ "MIT" ]
null
null
null
class Edge: def __init__(self, u, v, w): self.u = u self.v = v self.w = w def __eq__(self, edge): if self.u.id == edge.u.id and self.v.id == edge.v.id: return True return False def __ge__(self, v): return True if self.w > v.w else F...
15.129032
61
0.503198
class Edge: def __init__(self, u, v, w): self.u = u self.v = v self.w = w def __eq__(self, edge): if self.u.id == edge.u.id and self.v.id == edge.v.id: return True return False def __ge__(self, v): return True if self.w > v.w else F...
true
true
1c4a3097d9a65dce695cc13d39c358f32e52ebdc
81
py
Python
abc/161/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
abc/161/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
abc/161/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
X, Y, Z = map(int, input().split()) X, Y = Y, X X, Z = Z, X print(f'{X} {Y} {Z}')
20.25
35
0.444444
X, Y, Z = map(int, input().split()) X, Y = Y, X X, Z = Z, X print(f'{X} {Y} {Z}')
true
true
1c4a30bb90b9f5879da24bf6517fa49b6226eb8b
73,574
py
Python
user_agent_parser/constants.py
Purushot14/user-agent-parser
5b6a3cb0d024ce1a2822a617e5a18b45806f8d1b
[ "MIT" ]
null
null
null
user_agent_parser/constants.py
Purushot14/user-agent-parser
5b6a3cb0d024ce1a2822a617e5a18b45806f8d1b
[ "MIT" ]
null
null
null
user_agent_parser/constants.py
Purushot14/user-agent-parser
5b6a3cb0d024ce1a2822a617e5a18b45806f8d1b
[ "MIT" ]
null
null
null
""" Created by prakash at 02/03/22 """ __author__ = 'Prakash14' class OS: WINDOWS = "Windows" WINDOWS_PHONE = "Windows Phone" ANDROID = "Android" MAC_OS = "Mac Os" LINUX = "Linux" IOS = "iOS" CHROME_OS = "Chrome OS" class DEVICE_TYPE: COMPUTER = "Computer" MOBILE = "Mobile" ...
36.676969
69
0.58378
__author__ = 'Prakash14' class OS: WINDOWS = "Windows" WINDOWS_PHONE = "Windows Phone" ANDROID = "Android" MAC_OS = "Mac Os" LINUX = "Linux" IOS = "iOS" CHROME_OS = "Chrome OS" class DEVICE_TYPE: COMPUTER = "Computer" MOBILE = "Mobile" SERVER = "Server" BOT = "Bot" clas...
true
true
1c4a31324e044f38931eecf708b21caa5af9f43f
1,130
py
Python
Esophagus/genMaskedImg.py
mintanwei/artificial-intelligence-for-classification-and-segmentation-of-esophagus-precancerous-lesions
bb7bdc06f2426e99fb16f17bc081993e55db9a81
[ "Apache-2.0" ]
null
null
null
Esophagus/genMaskedImg.py
mintanwei/artificial-intelligence-for-classification-and-segmentation-of-esophagus-precancerous-lesions
bb7bdc06f2426e99fb16f17bc081993e55db9a81
[ "Apache-2.0" ]
null
null
null
Esophagus/genMaskedImg.py
mintanwei/artificial-intelligence-for-classification-and-segmentation-of-esophagus-precancerous-lesions
bb7bdc06f2426e99fb16f17bc081993e55db9a81
[ "Apache-2.0" ]
null
null
null
import skimage.io import os import numpy as np import cv2 input_img_dir = './dataset/endoscope/val/img' input_mask_dir = './result/multi_task_99/mask_dialated3_6_1/128.0' output_dir = './128.0_output' T = 0.5 L = '_2' if not os.path.exists(output_dir): os.mkdir(output_dir) overlay_color_mask = [255, ...
34.242424
119
0.69646
import skimage.io import os import numpy as np import cv2 input_img_dir = './dataset/endoscope/val/img' input_mask_dir = './result/multi_task_99/mask_dialated3_6_1/128.0' output_dir = './128.0_output' T = 0.5 L = '_2' if not os.path.exists(output_dir): os.mkdir(output_dir) overlay_color_mask = [255, ...
true
true
1c4a321cc9d033f7439e19db2a7247d1847aba3d
3,334
py
Python
api/group.py
D3AdCa7/CTF-Platform
1b4b66f3a5f25f69dcd53d233718276607bed8ac
[ "MIT" ]
4
2016-03-15T14:29:13.000Z
2019-03-26T09:39:19.000Z
api/group.py
D3AdCa7/CTF-Platform
1b4b66f3a5f25f69dcd53d233718276607bed8ac
[ "MIT" ]
null
null
null
api/group.py
D3AdCa7/CTF-Platform
1b4b66f3a5f25f69dcd53d233718276607bed8ac
[ "MIT" ]
3
2016-03-15T14:28:32.000Z
2019-01-28T06:05:56.000Z
__author__ = "Collin Petty" __copyright__ = "Carnegie Mellon University" __license__ = "MIT" __maintainer__ = ["Collin Petty", "Peter Chapman"] __credits__ = ["David Brumely", "Collin Petty", "Peter Chapman", "Tyler Nighswander", "Garrett Barboza"] __email__ = ["collin@cmu.edu", "peter@cmu.edu"] __status__ = "Productio...
43.868421
119
0.595081
__author__ = "Collin Petty" __copyright__ = "Carnegie Mellon University" __license__ = "MIT" __maintainer__ = ["Collin Petty", "Peter Chapman"] __credits__ = ["David Brumely", "Collin Petty", "Peter Chapman", "Tyler Nighswander", "Garrett Barboza"] __email__ = ["collin@cmu.edu", "peter@cmu.edu"] __status__ = "Productio...
true
true
1c4a353f8eb312454c2ccc0840d0e804a826813f
1,475
py
Python
tests/stores/test_ssh_tunnel.py
materialsproject/maggflow
9f8d7a0865ec13212a3fd00d5edebd3cb7b40e7d
[ "BSD-3-Clause-LBNL" ]
15
2017-06-15T16:35:23.000Z
2022-03-05T09:57:02.000Z
tests/stores/test_ssh_tunnel.py
materialsproject/maggflow
9f8d7a0865ec13212a3fd00d5edebd3cb7b40e7d
[ "BSD-3-Clause-LBNL" ]
573
2017-06-14T15:54:27.000Z
2022-03-31T23:20:55.000Z
tests/stores/test_ssh_tunnel.py
rkingsbury/maggma
53def068df1cb410bfe91e7045903997813e173a
[ "BSD-3-Clause-LBNL" ]
28
2017-06-14T20:50:26.000Z
2022-03-04T16:56:40.000Z
import asyncio import paramiko import pymongo import pytest from monty.serialization import dumpfn, loadfn from paramiko.ssh_exception import ( AuthenticationException, NoValidConnectionsError, SSHException, ) from maggma.stores.mongolike import MongoStore, SSHTunnel @pytest.fixture def ssh_server_avail...
27.314815
76
0.721356
import asyncio import paramiko import pymongo import pytest from monty.serialization import dumpfn, loadfn from paramiko.ssh_exception import ( AuthenticationException, NoValidConnectionsError, SSHException, ) from maggma.stores.mongolike import MongoStore, SSHTunnel @pytest.fixture def ssh_server_avail...
true
true
1c4a35ff9382304504947b41d126b9b2e6bc6f14
4,332
py
Python
ray_exp.py
vakker/spg-experiments
4824861c3ac66387078023c14ead47ba9a9e6c72
[ "MIT" ]
null
null
null
ray_exp.py
vakker/spg-experiments
4824861c3ac66387078023c14ead47ba9a9e6c72
[ "MIT" ]
null
null
null
ray_exp.py
vakker/spg-experiments
4824861c3ac66387078023c14ead47ba9a9e6c72
[ "MIT" ]
2
2021-02-15T11:12:27.000Z
2021-04-20T17:15:10.000Z
import argparse from datetime import datetime import ray from ray import tune from ray.tune import CLIReporter from ray.tune.suggest.variant_generator import grid_search from spg_experiments import models from spg_experiments.gym_env import PlaygroundEnv def exp_name(prefix): return prefix + '.' + datetime.now(...
32.328358
76
0.557248
import argparse from datetime import datetime import ray from ray import tune from ray.tune import CLIReporter from ray.tune.suggest.variant_generator import grid_search from spg_experiments import models from spg_experiments.gym_env import PlaygroundEnv def exp_name(prefix): return prefix + '.' + datetime.now(...
true
true
1c4a375ec65d60b933b68a9c2cccd74c1d4c9d3c
2,168
py
Python
test_scripts/B3_VanillaBSM_tests.py
Abhi1588/PricingToolBox
2c0bded1a6374c481113c972c819101df043d9f2
[ "MIT" ]
null
null
null
test_scripts/B3_VanillaBSM_tests.py
Abhi1588/PricingToolBox
2c0bded1a6374c481113c972c819101df043d9f2
[ "MIT" ]
null
null
null
test_scripts/B3_VanillaBSM_tests.py
Abhi1588/PricingToolBox
2c0bded1a6374c481113c972c819101df043d9f2
[ "MIT" ]
null
null
null
def main(): spot = 100 strike = 100 maturity = 1 rate = 0.02 dividend = 0 vol = .05 # Put Call Parity put = europeanPutOptionPrice(spot,strike,maturity,rate,dividend,vol) call = europeanCallOptionPrice(spot,strike,maturity,rate,dividend,vol) fwd = forwardPrice(spot,strike,matu...
30.971429
98
0.642528
def main(): spot = 100 strike = 100 maturity = 1 rate = 0.02 dividend = 0 vol = .05 put = europeanPutOptionPrice(spot,strike,maturity,rate,dividend,vol) call = europeanCallOptionPrice(spot,strike,maturity,rate,dividend,vol) fwd = forwardPrice(spot,strike,maturity,rate,dividen...
true
true
1c4a3ad80df40d707d4b56018ddf73806353244b
1,790
py
Python
config/settings/test.py
iamjdcollins/districtwebsite
89e2aea47ca3d221665bc23586a4374421be5800
[ "MIT" ]
null
null
null
config/settings/test.py
iamjdcollins/districtwebsite
89e2aea47ca3d221665bc23586a4374421be5800
[ "MIT" ]
null
null
null
config/settings/test.py
iamjdcollins/districtwebsite
89e2aea47ca3d221665bc23586a4374421be5800
[ "MIT" ]
null
null
null
from .base import * ENVIRONMENT_MODE = 'test' ALLOWED_HOSTS += [ 'backman-test.slcschools.org', 'beaconheights-test.slcschools.org', 'bennion-test.slcschools.org', 'bonneville-test.slcschools.org', 'bryant-test.slcschools.org', 'clayton-test.slcschools.org', 'dilworth-test.slcschools.org',...
31.964286
66
0.698324
from .base import * ENVIRONMENT_MODE = 'test' ALLOWED_HOSTS += [ 'backman-test.slcschools.org', 'beaconheights-test.slcschools.org', 'bennion-test.slcschools.org', 'bonneville-test.slcschools.org', 'bryant-test.slcschools.org', 'clayton-test.slcschools.org', 'dilworth-test.slcschools.org',...
true
true
1c4a3b9240115b8c64d64f4014238d4942020122
3,525
py
Python
textbox/model/Seq2Seq/t5.py
StevenTang1998/TextBox
acd8298c7e6618384d585146f799d02cc475520c
[ "MIT" ]
347
2021-01-09T07:55:55.000Z
2022-03-27T00:46:36.000Z
textbox/model/Seq2Seq/t5.py
StevenTang1998/TextBox
acd8298c7e6618384d585146f799d02cc475520c
[ "MIT" ]
18
2021-01-12T07:37:06.000Z
2022-01-11T02:26:49.000Z
textbox/model/Seq2Seq/t5.py
StevenTang1998/TextBox
acd8298c7e6618384d585146f799d02cc475520c
[ "MIT" ]
67
2021-01-09T07:23:52.000Z
2022-03-27T12:02:12.000Z
# @Time : 2021/3/15 # @Author : Zhuohao Yu # @Email : zhuohao@ruc.edu.cn r""" T5 ################################################ Reference: Colin et al. "Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer" at JMLR 2020. """ import torch import torch.nn as nn import torch.functio...
38.736264
118
0.680284
import torch import torch.nn as nn import torch.functional as F from textbox.model.abstract_generator import Seq2SeqGenerator from transformers import T5Tokenizer, T5ForConditionalGeneration, T5Config class T5(Seq2SeqGenerator): def __init__(self, config, dataset): super(T5, self).__init__(config, ...
true
true
1c4a3c1daeaf23bbe73948eea1a5de1332e04d05
2,766
py
Python
examples/complex/karman.py
david-moravec/classy_examples
f57e8b77db6f3e536a5367fb00ec850c6d901333
[ "MIT" ]
null
null
null
examples/complex/karman.py
david-moravec/classy_examples
f57e8b77db6f3e536a5367fb00ec850c6d901333
[ "MIT" ]
null
null
null
examples/complex/karman.py
david-moravec/classy_examples
f57e8b77db6f3e536a5367fb00ec850c6d901333
[ "MIT" ]
null
null
null
from classy_blocks.classes.mesh import Mesh from classy_blocks.classes.shapes import ExtrudedRing, Box def get_mesh(): cylinder_diameter = 20e-3 # [m] ring_thickness = 5e-3 # [m] # domain size domain_height = 0.05 # [m] (increase for "proper" simulation) upstream_length = 0.03 # [m] downstream...
27.117647
79
0.58026
from classy_blocks.classes.mesh import Mesh from classy_blocks.classes.shapes import ExtrudedRing, Box def get_mesh(): cylinder_diameter = 20e-3 ring_thickness = 5e-3 domain_height = 0.05 upstream_length = 0.03 downstream_length = 0.05 cell_size = 0.3*ring_thickness bl_thic...
true
true
1c4a3cc7dcf16ecf0590cb9b2204ae30f0f7f58c
32,215
py
Python
arcade/tilemap/tilemap.py
EnlNovius/arcade
020d3aafecb6c202dd76cfdf1dbd576117a608c2
[ "MIT" ]
null
null
null
arcade/tilemap/tilemap.py
EnlNovius/arcade
020d3aafecb6c202dd76cfdf1dbd576117a608c2
[ "MIT" ]
null
null
null
arcade/tilemap/tilemap.py
EnlNovius/arcade
020d3aafecb6c202dd76cfdf1dbd576117a608c2
[ "MIT" ]
null
null
null
""" This module provides functionality to load in JSON map files from the Tiled Map Editor. This is achieved using the pytiled-parser library. For more info on Tiled see: https://www.mapeditor.org/ For more info on pytiled-parser see: https://github.com/Beefy-Swain/pytiled_parser """ import copy import math import o...
38.673469
120
0.556418
import copy import math import os from collections import OrderedDict from pathlib import Path from typing import Any, Dict, List, Optional, OrderedDict, Tuple, Union, cast import pytiled_parser import pytiled_parser.tiled_object from arcade import ( AnimatedTimeBasedSprite, AnimationKeyframe, Sprite, ...
true
true
1c4a3d45e3fd189c77bba8dbb394542a0543752f
303
py
Python
Achive/rpyc_MyService.py
rscd27p/DockerTest
aee56356f7cdaded1c6ef787e6cdf8415308c8c3
[ "MIT" ]
1
2021-08-30T14:22:15.000Z
2021-08-30T14:22:15.000Z
Achive/rpyc_MyService.py
rscd27p/DockerTest
aee56356f7cdaded1c6ef787e6cdf8415308c8c3
[ "MIT" ]
null
null
null
Achive/rpyc_MyService.py
rscd27p/DockerTest
aee56356f7cdaded1c6ef787e6cdf8415308c8c3
[ "MIT" ]
null
null
null
import rpyc import nidmm class MyService(rpyc.Service): exposed_nidmm = nidmm if __name__ == "__main__": from rpyc.utils.server import ThreadedServer t = ThreadedServer(MyService, port = 18861, protocol_config = {"allow_public_attrs" : True, "allow_all_attrs" : True}) t.start()
27.545455
122
0.712871
import rpyc import nidmm class MyService(rpyc.Service): exposed_nidmm = nidmm if __name__ == "__main__": from rpyc.utils.server import ThreadedServer t = ThreadedServer(MyService, port = 18861, protocol_config = {"allow_public_attrs" : True, "allow_all_attrs" : True}) t.start()
true
true
1c4a3d7c38a7fb4505e3308b90c0223962601a64
8,701
py
Python
test/test.py
ahcorde/srdfdom
1fb929e4aab58f5fe889d4bf2b4e330423605632
[ "BSD-3-Clause" ]
null
null
null
test/test.py
ahcorde/srdfdom
1fb929e4aab58f5fe889d4bf2b4e330423605632
[ "BSD-3-Clause" ]
1
2020-01-13T15:58:39.000Z
2020-01-13T16:32:08.000Z
test/test.py
ahcorde/srdfdom
1fb929e4aab58f5fe889d4bf2b4e330423605632
[ "BSD-3-Clause" ]
1
2019-12-31T16:07:31.000Z
2019-12-31T16:07:31.000Z
#!/usr/bin/env python PKG = 'srdfdom' import sys import rospkg import unittest from srdfdom.srdf import SRDF from xml.dom.minidom import parseString import xml.dom # xml match code from test_xacro.py # by Stuart Glaser and William Woodall def first_child_element(elt): c = elt.firstChild while c: if c.nodeT...
38.5
120
0.635329
PKG = 'srdfdom' import sys import rospkg import unittest from srdfdom.srdf import SRDF from xml.dom.minidom import parseString import xml.dom def first_child_element(elt): c = elt.firstChild while c: if c.nodeType == xml.dom.Node.ELEMENT_NODE: return c c = c.nextSibling return None def next...
true
true
1c4a3e0601d9a72176eb416461930fed869c830b
1,543
py
Python
zvt/domain/fundamental/valuation.py
aaron8tang/zvt
568cf0d42577eb05b96e1a07ec512aed34245b2d
[ "MIT" ]
null
null
null
zvt/domain/fundamental/valuation.py
aaron8tang/zvt
568cf0d42577eb05b96e1a07ec512aed34245b2d
[ "MIT" ]
null
null
null
zvt/domain/fundamental/valuation.py
aaron8tang/zvt
568cf0d42577eb05b96e1a07ec512aed34245b2d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from sqlalchemy import Column, String, Float from sqlalchemy.orm import declarative_base from zvt.contract import Mixin from zvt.contract.register import register_schema ValuationBase = declarative_base() class StockValuation(ValuationBase, Mixin): """ 股票估值相关的数据,比如PE、市净率等。 """ ...
21.732394
109
0.644848
from sqlalchemy import Column, String, Float from sqlalchemy.orm import declarative_base from zvt.contract import Mixin from zvt.contract.register import register_schema ValuationBase = declarative_base() class StockValuation(ValuationBase, Mixin): __tablename__ = 'stock_valuation' code = Column(String(le...
true
true
1c4a3e27ced94a73850bd98d2b3abc4188cff8f8
42
py
Python
frappe/public/hello.py
process-success/frappeModifyed
17031bdf5bb81d335d47aa3028a36be288bd9a1a
[ "MIT" ]
null
null
null
frappe/public/hello.py
process-success/frappeModifyed
17031bdf5bb81d335d47aa3028a36be288bd9a1a
[ "MIT" ]
null
null
null
frappe/public/hello.py
process-success/frappeModifyed
17031bdf5bb81d335d47aa3028a36be288bd9a1a
[ "MIT" ]
1
2018-03-21T18:34:08.000Z
2018-03-21T18:34:08.000Z
#!/usr/bin/python2.7 print("Hello world")
21
21
0.690476
print("Hello world")
true
true
1c4a3fee5a6e45dc07ce48fd0fa054883c373055
144
py
Python
main.py
alwye/snake-game
dd35388576a4e44b0426cac67b08fed4cada7aa2
[ "MIT" ]
null
null
null
main.py
alwye/snake-game
dd35388576a4e44b0426cac67b08fed4cada7aa2
[ "MIT" ]
null
null
null
main.py
alwye/snake-game
dd35388576a4e44b0426cac67b08fed4cada7aa2
[ "MIT" ]
null
null
null
""" Famous snake game """ from settings import * from game import SnakeGame if __name__ == "__main__": game = SnakeGame() game.run()
12
26
0.652778
from settings import * from game import SnakeGame if __name__ == "__main__": game = SnakeGame() game.run()
true
true
1c4a41169b1b0f2b1b6e98f644def8bec59c8f6f
616
py
Python
tests/test_replace_intensity.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
64
2020-03-18T12:11:22.000Z
2022-03-31T08:19:18.000Z
tests/test_replace_intensity.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
148
2020-05-14T06:14:11.000Z
2022-03-26T15:02:31.000Z
tests/test_replace_intensity.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
16
2020-05-31T00:53:44.000Z
2022-03-23T13:20:57.000Z
import pyclesperanto_prototype as cle import numpy as np def test_replace_intensity(): test1 = cle.push(np.asarray([ [0, 0, 0, 0, 0], [0, 1, 2, 3, 0], [0, 2, 3, 4, 0], [0, 4, 4, 5, 0], [0, 0, 0, 0, 0] ])) reference = cle.push(np.asarray([ [0, 0, 0, 0, 0], ...
20.533333
46
0.465909
import pyclesperanto_prototype as cle import numpy as np def test_replace_intensity(): test1 = cle.push(np.asarray([ [0, 0, 0, 0, 0], [0, 1, 2, 3, 0], [0, 2, 3, 4, 0], [0, 4, 4, 5, 0], [0, 0, 0, 0, 0] ])) reference = cle.push(np.asarray([ [0, 0, 0, 0, 0], ...
true
true
1c4a42653316a4744277d052b7656cb48a32dd27
6,951
py
Python
api/batch_processing/postprocessing/combine_api_outputs.py
alsnothome/CameraTraps
fddd64d5e1a941bb46557bec09af7091da334cf4
[ "MIT" ]
null
null
null
api/batch_processing/postprocessing/combine_api_outputs.py
alsnothome/CameraTraps
fddd64d5e1a941bb46557bec09af7091da334cf4
[ "MIT" ]
1
2021-02-24T00:17:21.000Z
2021-02-24T00:17:21.000Z
api/batch_processing/postprocessing/combine_api_outputs.py
isabella232/CameraTraps
8a01a191cd061deac3aa8ab9edf89b210a89a0be
[ "MIT" ]
null
null
null
""" Merges two or more .json files in batch API output format, optionally writing the results to another .json file. - Concatenates image lists, erroring if images are not unique. - Errors if class lists are conflicting; errors on unrecognized fields. - Checks compatibility in info structs, within reason. File format:...
35.464286
108
0.630269
import argparse import json from typing import Any, Dict, Iterable, Mapping, List, Optional def combine_api_output_files(input_files: List[str], output_file: Optional[str] = None, require_uniqueness: bool = True ) -> Dict[str, ...
true
true
1c4a43254129f6dce18adb2aab2ca72a6cf10471
3,836
py
Python
tests/core/contracts/test_contract_method_to_argument_matching.py
y19818/web3.py
32a85a287ab63220d1e0c06d77be74de595ff02f
[ "MIT" ]
null
null
null
tests/core/contracts/test_contract_method_to_argument_matching.py
y19818/web3.py
32a85a287ab63220d1e0c06d77be74de595ff02f
[ "MIT" ]
null
null
null
tests/core/contracts/test_contract_method_to_argument_matching.py
y19818/web3.py
32a85a287ab63220d1e0c06d77be74de595ff02f
[ "MIT" ]
null
null
null
import json import pytest from web3._utils.abi import ( get_abi_input_types, ) from web3._utils.function_identifiers import ( FallbackFn, ) from web3.exceptions import ( ValidationError, ) SINGLE_FN_NO_ARGS = json.loads('[{"constant":false,"inputs":[],"name":"a","outputs":[],"type":"function"...
25.403974
294
0.539103
import json import pytest from web3._utils.abi import ( get_abi_input_types, ) from web3._utils.function_identifiers import ( FallbackFn, ) from web3.exceptions import ( ValidationError, ) SINGLE_FN_NO_ARGS = json.loads('[{"constant":false,"inputs":[],"name":"a","outputs":[],"type":"function"...
true
true
1c4a437b86d7bfb9b1e7b2ed2f1ba8e9cb370973
754
py
Python
setup.py
aaalgo/calign
7e96f4c0df85200dec260e603711172486107f23
[ "MIT" ]
null
null
null
setup.py
aaalgo/calign
7e96f4c0df85200dec260e603711172486107f23
[ "MIT" ]
null
null
null
setup.py
aaalgo/calign
7e96f4c0df85200dec260e603711172486107f23
[ "MIT" ]
null
null
null
from distutils.core import setup, Extension picpac = Extension('_calign', language = 'c++', extra_compile_args = ['-O3', '-std=c++1y'], include_dirs = ['/usr/local/include'], libraries = ['opencv_highgui', 'opencv_core', 'boost_filesystem', 'boost_system', 'boost_python'], libr...
34.272727
106
0.570292
from distutils.core import setup, Extension picpac = Extension('_calign', language = 'c++', extra_compile_args = ['-O3', '-std=c++1y'], include_dirs = ['/usr/local/include'], libraries = ['opencv_highgui', 'opencv_core', 'boost_filesystem', 'boost_system', 'boost_python'], libr...
true
true
1c4a43914b6834384b739b37fc8cbf4a1fededbb
25,191
py
Python
faker/providers/job/da_DK/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
null
null
null
faker/providers/job/da_DK/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
4
2022-02-04T17:24:59.000Z
2022-03-29T20:02:57.000Z
faker/providers/job/da_DK/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
null
null
null
from .. import Provider as BaseProvider class Provider(BaseProvider): """ Source: https://star.dk/it/saadan-arbejder-vi-med-it-i-styrelsen/oversigt-over-stillingsbetegnelser-og-kvalifikationer/. # NOQA """ jobs = [ "Lastvognsmekanikerlærling", "Knallertmekaniker", "Møbelarkit...
26.158879
132
0.534596
from .. import Provider as BaseProvider class Provider(BaseProvider): jobs = [ "Lastvognsmekanikerlærling", "Knallertmekaniker", "Møbelarkitekt", "Forsyningsoperatørelev", "Hospitalsfysiker", "Økonomicontroller", "Revisor", "Skatterevisor", ...
true
true
1c4a43a62d1b0c7b36182ef5fdb89f137fc4a846
11,479
py
Python
onmt/translate/greedy_search.py
comydream/OpenNMT-py
2f3c810069ca03b752d9886782648e576b39a06d
[ "MIT" ]
1
2021-10-01T15:03:35.000Z
2021-10-01T15:03:35.000Z
onmt/translate/greedy_search.py
urialon/OpenNMT-py
bdca05a3fac8f864b21c86a8ad03c09895212e70
[ "MIT" ]
null
null
null
onmt/translate/greedy_search.py
urialon/OpenNMT-py
bdca05a3fac8f864b21c86a8ad03c09895212e70
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F from onmt.translate.decode_strategy import DecodeStrategy def sample_topp(logits, keep_topp): sorted_logits, sorted_indices = torch.sort(logits, descending=True, dim=1) ...
40.996429
79
0.623748
import torch import torch.nn.functional as F from onmt.translate.decode_strategy import DecodeStrategy def sample_topp(logits, keep_topp): sorted_logits, sorted_indices = torch.sort(logits, descending=True, dim=1) ...
true
true
1c4a44bbf72471eab126ed6a6523fab4eb11bffa
1,995
py
Python
efm_example.py
xurong-liang/cornac
6e0a58b3c99de8c1bd685086c8a63b29aef66e28
[ "Apache-2.0" ]
null
null
null
efm_example.py
xurong-liang/cornac
6e0a58b3c99de8c1bd685086c8a63b29aef66e28
[ "Apache-2.0" ]
null
null
null
efm_example.py
xurong-liang/cornac
6e0a58b3c99de8c1bd685086c8a63b29aef66e28
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Cornac Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
28.098592
92
0.717293
import cornac from cornac.datasets import amazon_toy from cornac.data import SentimentModality from cornac.eval_methods import RatioSplit rating = amazon_toy.load_feedback() sentiment = amazon_toy.load_sentiment() md = SentimentModality(data=sentiment) split_data = RatioSplit( data=rating, ...
true
true
1c4a45973be19ede8307caaba8c7bcb5c4ecdae9
994
py
Python
config/urls.py
lawiz22/PLOUC-Backend-master
b93fa2fea8d45df9f19c3c58037e59dad4981921
[ "MIT" ]
null
null
null
config/urls.py
lawiz22/PLOUC-Backend-master
b93fa2fea8d45df9f19c3c58037e59dad4981921
[ "MIT" ]
3
2020-06-05T21:24:34.000Z
2022-03-11T23:50:26.000Z
config/urls.py
lawiz22/PLOUC-Backend-master
b93fa2fea8d45df9f19c3c58037e59dad4981921
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from rest_framework.documentation import include_docs_urls urlpatterns = [ # API (v1) url(r'^', include('v1.accounts.urls')), url(r'^', include('v1.credit...
28.4
78
0.677062
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from rest_framework.documentation import include_docs_urls urlpatterns = [ url(r'^', include('v1.accounts.urls')), url(r'^', include('v1.credits.urls')),...
true
true
1c4a45acae68baad54b3c997b9a3965d7f7d11af
13,496
py
Python
arch/models/model.py
bigphoton/arch
95a197d6b89bc2316b0d88b2b1345cbbb90088ec
[ "Unlicense" ]
null
null
null
arch/models/model.py
bigphoton/arch
95a197d6b89bc2316b0d88b2b1345cbbb90088ec
[ "Unlicense" ]
null
null
null
arch/models/model.py
bigphoton/arch
95a197d6b89bc2316b0d88b2b1345cbbb90088ec
[ "Unlicense" ]
null
null
null
""" Functions and objects describing optical components. """ import abc import sympy from ..connectivity import Connectivity import arch.port as port import numpy as np import math class Model(abc.ABC): """ Model base class. One of `block` or `ports` must be defined. name: name of this model for indexing, stri...
28.116667
102
0.680498
import abc import sympy from ..connectivity import Connectivity import arch.port as port import numpy as np import math class Model(abc.ABC): def __init__(self, name, block=None, ports=None, **kwargs): self.name = name if block is not None and ports is None: self.ports = list(block.ports) elif ports ...
true
true
1c4a46e3681387e261c445f0fe0ee20614d7a18e
26,847
py
Python
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/aio/operations/_nat_gateways_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/aio/operations/_nat_gateways_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/aio/operations/_nat_gateways_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.080439
191
0.665139
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
1c4a47a2ef218891b453fdd516b5d165a1dedf97
6,511
py
Python
FACTScontrol.py
amahoro12/anne
9b68c71c491bde4f57c2cbbf78a377239a9026d8
[ "MIT" ]
null
null
null
FACTScontrol.py
amahoro12/anne
9b68c71c491bde4f57c2cbbf78a377239a9026d8
[ "MIT" ]
null
null
null
FACTScontrol.py
amahoro12/anne
9b68c71c491bde4f57c2cbbf78a377239a9026d8
[ "MIT" ]
null
null
null
import pandapower.control as ct ## Creates custom PI-controllers for the shunt and series FACTS device used in the test network. # SHUNT CONTROLLER class ShuntFACTS(ct.basic_controller.Controller): def __init__(self, net, busVoltageInd, convLim, shuntIndex=0, q_mvar_rating=50, max_iter=30, in_service=True, ...
43.993243
121
0.657196
import pandapower.control as ct convLim, shuntIndex=0, q_mvar_rating=50, max_iter=30, in_service=True, recycle=False, order=0, level=0, **kwargs): super().__init__(net, in_service=in_service, recycle=recycle, order=order, level=level, initial_powerflow=True, *...
true
true
1c4a482bb9e01f84eb19da55a5549ca75bbd457d
128,109
py
Python
tests/arm_tests.py
SantiagoRomani/gdb_arm
9e3c2eec2c41337b2a88222a87ad0b2f418111c7
[ "MIT" ]
2
2021-05-20T09:30:31.000Z
2022-02-23T03:34:51.000Z
tests/arm_tests.py
SantiagoRomani/gdb_arm
9e3c2eec2c41337b2a88222a87ad0b2f418111c7
[ "MIT" ]
null
null
null
tests/arm_tests.py
SantiagoRomani/gdb_arm
9e3c2eec2c41337b2a88222a87ad0b2f418111c7
[ "MIT" ]
null
null
null
""" Groups of tests for gdb_arm """ from num_analyzer import NumberAnalyzer from string_analyzer import CharAnalyzer from string_analyzer import StringAnalyzer from data_analyzer import DataAnalyzer from adr_analyzer import AddressAnalyzer from reg_analyzer import RegisterAnalyzer from reg_analyzer import RegisterBitsA...
92.899927
120
0.498529
from num_analyzer import NumberAnalyzer from string_analyzer import CharAnalyzer from string_analyzer import StringAnalyzer from data_analyzer import DataAnalyzer from adr_analyzer import AddressAnalyzer from reg_analyzer import RegisterAnalyzer from reg_analyzer import RegisterBitsAnalyzer from reg_analyzer import Reg...
true
true
1c4a4a032bbb9e6042445ab08cd24531a80ce7bd
2,275
py
Python
docs/source/conf.py
Gemicai/Gemicai
1ce3be768979acc7251b4108a59292cba99624d1
[ "MIT" ]
5
2020-11-16T11:06:51.000Z
2021-02-23T04:54:30.000Z
docs/source/conf.py
Gemicai/Gemicai
1ce3be768979acc7251b4108a59292cba99624d1
[ "MIT" ]
1
2021-08-24T16:21:30.000Z
2021-08-24T16:21:30.000Z
docs/source/conf.py
Gemicai/Gemicai
1ce3be768979acc7251b4108a59292cba99624d1
[ "MIT" ]
1
2021-02-23T04:54:31.000Z
2021-02-23T04:54:31.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
37.295082
88
0.665495
import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))) project = 'Gemicai' copyright = '2020, Kevin Alberts, Niek Heinen, Mateusz Jaworski, Sieta de Jong' author = 'Kevin Alberts, Niek Heinen, Mateusz Jaworski, Sieta de Jong' release = '0.5.0' ...
true
true
1c4a4bffc43ac8052868c75e692429c7af2a1d60
3,508
py
Python
testproject/testproject/settings.py
io-ma/django-groups-manager
5ab1e098ac44b319b166b529e7a46c6a83e5ddac
[ "MIT" ]
1
2020-08-20T00:25:26.000Z
2020-08-20T00:25:26.000Z
testproject/testproject/settings.py
dpineiden/django-groups-manager
d02361e6f2825c174410db676ec3fb28c54e0256
[ "MIT" ]
null
null
null
testproject/testproject/settings.py
dpineiden/django-groups-manager
d02361e6f2825c174410db676ec3fb28c54e0256
[ "MIT" ]
null
null
null
""" Django settings for testproject project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ import os import django try: import guardian has_guardian = T...
23.386667
82
0.686431
import os import django try: import guardian has_guardian = True except ImportError: has_guardian = False BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = '9vg3q-kbo(p^zpom4!*o8*%tfu-14o=3++txo+sxwto)2@=qd=' DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Applicatio...
true
true
1c4a4c5663dcdc3e1fe9bb9a01798918c54fc1ba
1,609
py
Python
dataset/dataset_inspect.py
Lsplastic/Tensorflow_ssd
f2935079fb8d2cd2288ef5f7a415749243f34542
[ "Apache-2.0" ]
null
null
null
dataset/dataset_inspect.py
Lsplastic/Tensorflow_ssd
f2935079fb8d2cd2288ef5f7a415749243f34542
[ "Apache-2.0" ]
null
null
null
dataset/dataset_inspect.py
Lsplastic/Tensorflow_ssd
f2935079fb8d2cd2288ef5f7a415749243f34542
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Changan Wang # 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...
44.694444
129
0.698571
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf def count_split_examples(split_path, file_prefix='.tfrecord'): num_samples = 0 tfrecords_to_count = tf.gfile.Glob(os.path.join(split_p...
true
true
1c4a4c7893d539bc2653916b6c930594e9f82081
466
py
Python
data/scripts/templates/object/tangible/ship/attachment/booster/shared_ywing_booster_s01.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/ship/attachment/booster/shared_ywing_booster_s01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/ship/attachment/booster/shared_ywing_booster_s01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/attachment/booster/shared_ywing_booster_s01.iff" result.attrib...
27.411765
89
0.736052
true
true
1c4a4ca689afea9e81b98745e6c04f99db6d9b09
148
py
Python
app/rockband/apps.py
solattila/rock-band-api
1521b2913b75c53310ba1b71d77d599966237483
[ "MIT" ]
null
null
null
app/rockband/apps.py
solattila/rock-band-api
1521b2913b75c53310ba1b71d77d599966237483
[ "MIT" ]
null
null
null
app/rockband/apps.py
solattila/rock-band-api
1521b2913b75c53310ba1b71d77d599966237483
[ "MIT" ]
null
null
null
from django.apps import AppConfig class RockbandConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'rockband'
21.142857
56
0.763514
from django.apps import AppConfig class RockbandConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'rockband'
true
true
1c4a4df4c0837afb763b5667c2f4dc1f6cf6ab1e
1,129
py
Python
python/meas_smag.py
dkkim1005/Neural_Network_Quantum_State
7e94929c5ef65ce87f63bf20c81acaa524adca82
[ "Unlicense" ]
null
null
null
python/meas_smag.py
dkkim1005/Neural_Network_Quantum_State
7e94929c5ef65ce87f63bf20c81acaa524adca82
[ "Unlicense" ]
null
null
null
python/meas_smag.py
dkkim1005/Neural_Network_Quantum_State
7e94929c5ef65ce87f63bf20c81acaa524adca82
[ "Unlicense" ]
1
2022-01-26T05:13:38.000Z
2022-01-26T05:13:38.000Z
#!/usr/bin/env python3 import numpy as np from pynqs import sampler floatType = 'float32' symmType = 'tr' # hyper parameter sets of rbm and MCMC sampler kwargs = { 'nInputs' : 16, 'nHiddens' : 4, 'nChains' : 1000, 'seedNumber' : 0, 'seedDistance' : 123456789, 'init_mcmc_steps' : 300 } # transverse-field st...
27.536585
66
0.662533
import numpy as np from pynqs import sampler floatType = 'float32' symmType = 'tr' kwargs = { 'nInputs' : 16, 'nHiddens' : 4, 'nChains' : 1000, 'seedNumber' : 0, 'seedDistance' : 123456789, 'init_mcmc_steps' : 300 } hfield = '-1.1' filepath = './temp/build/RBMTrSymmCH-N%dA%dH%sV1'\ %(kwargs...
true
true
1c4a4f10c49f9126358b074d166c4bcbaae00b6b
6,641
py
Python
pysph/sph/tests/test_linalg.py
nauaneed/pysph
9cb9a859934939307c65a25cbf73e4ecc83fea4a
[ "BSD-3-Clause" ]
293
2017-05-26T14:41:15.000Z
2022-03-28T09:56:16.000Z
pysph/sph/tests/test_linalg.py
nauaneed/pysph
9cb9a859934939307c65a25cbf73e4ecc83fea4a
[ "BSD-3-Clause" ]
217
2017-05-29T15:48:14.000Z
2022-03-24T16:16:55.000Z
pysph/sph/tests/test_linalg.py
nauaneed/pysph
9cb9a859934939307c65a25cbf73e4ecc83fea4a
[ "BSD-3-Clause" ]
126
2017-05-25T19:17:32.000Z
2022-03-25T11:23:24.000Z
from pysph.sph.wc.linalg import ( augmented_matrix, gj_solve, mat_mult, mat_vec_mult ) import numpy as np import unittest def gj_solve_helper(a, b, n): m = np.zeros((n, n+1)).ravel().tolist() augmented_matrix(a, b, n, 1, n, m) result = [0.0]*n is_singular = gj_solve(m, n, 1, result) return is_...
32.237864
73
0.512573
from pysph.sph.wc.linalg import ( augmented_matrix, gj_solve, mat_mult, mat_vec_mult ) import numpy as np import unittest def gj_solve_helper(a, b, n): m = np.zeros((n, n+1)).ravel().tolist() augmented_matrix(a, b, n, 1, n, m) result = [0.0]*n is_singular = gj_solve(m, n, 1, result) return is_...
true
true
1c4a4fe749a6730b16f54520019eb9f262e581a6
13,887
py
Python
cvxpy/reductions/solvers/conic_solvers/conic_solver.py
QiuWJX/cvxpy
fd1c225b0cdf541618e292cae1a4c7ea25ddc934
[ "ECL-2.0", "Apache-2.0" ]
556
2021-04-20T03:19:49.000Z
2022-03-30T12:31:38.000Z
cvxpy/reductions/solvers/conic_solvers/conic_solver.py
QiuWJX/cvxpy
fd1c225b0cdf541618e292cae1a4c7ea25ddc934
[ "ECL-2.0", "Apache-2.0" ]
358
2021-04-20T08:17:49.000Z
2022-03-31T21:16:28.000Z
cvxpy/reductions/solvers/conic_solvers/conic_solver.py
phschiele/cvxpy
a43aed7447b87f6d0fbc6f71ae5c7b84183f3369
[ "ECL-2.0", "Apache-2.0" ]
131
2021-04-21T09:00:12.000Z
2022-03-29T04:43:51.000Z
""" Copyright 2017 Robin Verschueren, 2017 Akshay Agrawal 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...
40.605263
93
0.585728
from typing import Tuple import numpy as np import scipy.sparse as sp import cvxpy.settings as s from cvxpy.constraints import PSD, SOC, ExpCone, NonNeg, PowCone3D, Zero from cvxpy.reductions.cvx_attr2constr import convex_attributes from cvxpy.reductions.dcp2cone.cone_matrix_stuffing import ParamConeProg from cvxpy.r...
true
true
1c4a4ffc7df2bbba0362421473040901614f36f3
4,959
py
Python
projects/RAMADDA_publish/sphinx/source/conf.py
Unidata/drilsdown
55aca7168fb390f31c36729605401564e9b82c56
[ "MIT" ]
3
2018-05-25T00:19:12.000Z
2021-01-08T15:54:36.000Z
projects/RAMADDA_publish/sphinx/source/conf.py
suvarchal/drilsdown
e82f58396f640fef847353caf1bd4b2bf016c7a6
[ "MIT" ]
11
2017-10-31T20:15:24.000Z
2019-12-16T21:01:55.000Z
projects/RAMADDA_publish/sphinx/source/conf.py
suvarchal/drilsdown
e82f58396f640fef847353caf1bd4b2bf016c7a6
[ "MIT" ]
10
2018-02-08T22:23:28.000Z
2019-09-29T23:25:19.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
30.423313
79
0.654971
project = 'RAMADDA Publish' copyright = '' author = 'Suvarchal' version = '' release = '1.3' extensions = [ 'sphinx.ext.githubpages', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' language = None exclude_patterns = [] pygments_s...
true
true
1c4a51c816367f7be461f80db74b01f5bb2fc407
124
py
Python
model/group.py
Den21rus/barancev_training
892cd38ffde0954278ea2cebe72379b9db55a29c
[ "Apache-2.0" ]
null
null
null
model/group.py
Den21rus/barancev_training
892cd38ffde0954278ea2cebe72379b9db55a29c
[ "Apache-2.0" ]
null
null
null
model/group.py
Den21rus/barancev_training
892cd38ffde0954278ea2cebe72379b9db55a29c
[ "Apache-2.0" ]
null
null
null
class Group: def __init__(self, username, password): self.username = username self.password = password
20.666667
43
0.653226
class Group: def __init__(self, username, password): self.username = username self.password = password
true
true
1c4a522a10fa8856197c75ae296fd1e45edb4dc0
5,150
py
Python
official/vision/detection/executor/detection_executor.py
Silas-Asamoah/models
833e6939acb42f695b0ae3765f98fe494f06115c
[ "Apache-2.0" ]
2
2019-11-30T03:43:50.000Z
2019-11-30T03:43:55.000Z
official/vision/detection/executor/detection_executor.py
utpal0401/models
426b2c6e894c22ffb17f32581305ea87c3b8b377
[ "Apache-2.0" ]
1
2021-03-31T21:30:38.000Z
2021-03-31T21:30:38.000Z
official/vision/detection/executor/detection_executor.py
utpal0401/models
426b2c6e894c22ffb17f32581305ea87c3b8b377
[ "Apache-2.0" ]
2
2019-11-10T07:48:51.000Z
2020-02-04T04:17:41.000Z
# Copyright 2019 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.867647
80
0.66
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import logging import os import json import tensorflow.compat.v2 as tf from official.modeling.training import distributed_executor as executor class DetectionDistributedExecutor(exe...
true
true
1c4a52e6f133e6c9b67ce57eaeec57e4ff28a9dd
2,392
py
Python
tests/wallet/test_wallet_interested_store.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
tests/wallet/test_wallet_interested_store.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
tests/wallet/test_wallet_interested_store.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
from pathlib import Path from secrets import token_bytes import aiosqlite import pytest from chinilla.types.blockchain_format.coin import Coin from chinilla.util.db_wrapper import DBWrapper from chinilla.util.ints import uint64 from chinilla.wallet.wallet_interested_store import WalletInterestedStore class TestWall...
45.132075
95
0.695234
from pathlib import Path from secrets import token_bytes import aiosqlite import pytest from chinilla.types.blockchain_format.coin import Coin from chinilla.util.db_wrapper import DBWrapper from chinilla.util.ints import uint64 from chinilla.wallet.wallet_interested_store import WalletInterestedStore class TestWall...
true
true
1c4a530ffc5d9d6be0b083b255751a4622ff6ed6
645
py
Python
teal_algos/bubble.py
Taneristique/TEAL
e8860741be02a98b2562d36da46864e7bdc9594b
[ "MIT" ]
null
null
null
teal_algos/bubble.py
Taneristique/TEAL
e8860741be02a98b2562d36da46864e7bdc9594b
[ "MIT" ]
null
null
null
teal_algos/bubble.py
Taneristique/TEAL
e8860741be02a98b2562d36da46864e7bdc9594b
[ "MIT" ]
null
null
null
import time start=time.time() def bubble(x): """Function takes list element x as parameter which is consist of numbers""" for i in range(len(x)-1): #number of the loops for j in range(1,len(x)): #number of the comperations if x[j-1]>x[j]: #swap i[j] with i[j-1] chg=x[j] ...
40.3125
122
0.542636
import time start=time.time() def bubble(x): for i in range(len(x)-1): for j in range(1,len(x)): if x[j-1]>x[j]: chg=x[j] x[j]=x[j-1] x[j-1]=chg if x[j-1]==x[j] or x[j-1]<x[j]: pass print('step...
true
true
1c4a5380b287324f5ee930287fd0199210559d6b
4,852
py
Python
bin/additem.py
CakeLancelot/UnityPackFF
ee3368b16aec3c6b95c70778105dfcbf7379647f
[ "MIT" ]
6
2020-11-03T13:23:40.000Z
2021-10-06T15:25:29.000Z
bin/additem.py
CakeLancelot/UnityPackFF
ee3368b16aec3c6b95c70778105dfcbf7379647f
[ "MIT" ]
1
2021-02-15T20:16:40.000Z
2021-02-15T20:16:40.000Z
bin/additem.py
CakeLancelot/UnityPackFF
ee3368b16aec3c6b95c70778105dfcbf7379647f
[ "MIT" ]
10
2020-11-03T15:08:10.000Z
2022-02-13T07:32:52.000Z
#!/usr/bin/env python3 # Adds a (retextured) item into the game. Will need to be modified slightly # to add items other than armor. Remember to use dumpxdt.py (and make it read # the generated _new TableData!) so your server allows you to spawn the # new items. Will also need to be modified to work with girls' or unis...
32.783784
87
0.739489
from unitypack.asset import Asset from unitypack.object import FFOrderedDict from unitypack.modding import import_texture # asset bundles TABLEDATA_PATH = 'CustomAssetBundle-1dca92eecee4742d985b799d8226666d' CHARTEX_PATH = 'CustomAssetBundle-aa120043d3c634fe9adfb5cbe08e6970' ICONS_PATH = 'CustomAssetBundle-784f...
true
true
1c4a540b90827e76c2c1079b89be91800a5d28c8
126
py
Python
vit/formatter/wait_epoch.py
kinifwyne/vit
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
[ "MIT" ]
179
2020-07-28T08:21:51.000Z
2022-03-30T21:39:37.000Z
vit/formatter/wait_epoch.py
kinifwyne/vit
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
[ "MIT" ]
255
2017-02-01T11:49:12.000Z
2020-07-26T22:31:25.000Z
vit/formatter/wait_epoch.py
kinifwyne/vit
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
[ "MIT" ]
26
2017-01-17T20:31:13.000Z
2020-06-17T13:09:01.000Z
from vit.formatter.wait import Wait class WaitEpoch(Wait): def format(self, wait, task): return self.epoch(wait)
21
35
0.698413
from vit.formatter.wait import Wait class WaitEpoch(Wait): def format(self, wait, task): return self.epoch(wait)
true
true
1c4a549672ab2b68bbe9ad8488637c7d44891b43
2,819
py
Python
test/lint/check-doc.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
test/lint/check-doc.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
test/lint/check-doc.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Vadercoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' This checks if all command line args are documented. Return value is 0 to indicate no error. Autho...
42.074627
130
0.723306
from subprocess import check_output import re FOLDER_GREP = 'src' FOLDER_TEST = 'src/test/' REGEX_ARG = r'(?:ForceSet|SoftSet|Get|Is)(?:Bool)?Args?(?:Set)?\("(-[^"]+)"' REGEX_DOC = r'AddArg\("(-[^"=]+?)(?:=|")' CMD_ROOT_DIR = '$(git rev-parse --show-toplevel)/{}'.format(FOLDER_GREP) CMD_GREP_ARGS = r"git grep --...
true
true
1c4a564f9a4cae704bf503183576b795d60fbbf4
142
py
Python
playrcc/src/gui/__init__.py
Gloryness/playrcc
3816a935f19c786db59ba5a46a98cc527053cc29
[ "MIT" ]
4
2020-09-24T14:25:01.000Z
2020-11-02T22:18:12.000Z
playrcc/src/gui/__init__.py
Gloryness/playrcc
3816a935f19c786db59ba5a46a98cc527053cc29
[ "MIT" ]
null
null
null
playrcc/src/gui/__init__.py
Gloryness/playrcc
3816a935f19c786db59ba5a46a98cc527053cc29
[ "MIT" ]
null
null
null
from .mainwindow import SecretCodeWindow __title__ = 'gui' __author__ = 'Goryness' __license__ = 'MIT License' __all__ = ['SecretCodeWindow']
23.666667
40
0.774648
from .mainwindow import SecretCodeWindow __title__ = 'gui' __author__ = 'Goryness' __license__ = 'MIT License' __all__ = ['SecretCodeWindow']
true
true
1c4a5693a9652bf3ef6a37798165c3bbc52518da
4,605
py
Python
melodic/src/ros_comm/rospy/src/rospy/__init__.py
disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA
3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0
[ "BSD-3-Clause" ]
2
2021-07-14T12:33:55.000Z
2021-11-21T07:14:13.000Z
melodic/src/ros_comm/rospy/src/rospy/__init__.py
disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA
3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0
[ "BSD-3-Clause" ]
null
null
null
melodic/src/ros_comm/rospy/src/rospy/__init__.py
disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA
3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0
[ "BSD-3-Clause" ]
null
null
null
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
33.860294
146
0.728339
# yet from std_msgs.msg import Header from .client import spin, myargv, init_node, \ get_published_topics, \ wait_for_message, \ get_master, \ on_shutdown, \ get_param, get_param_cached, get_param_names, set_param, delete_param, has_param, search_param,\ ...
true
true
1c4a56aeca55d753088ec0ac5ef51be958e3e1da
823
py
Python
packages/__init__.py
fetchai/agents-yoti
d71d57508079e5cd3854037bc3c473e24915af6f
[ "Apache-2.0" ]
4
2021-01-19T17:53:58.000Z
2021-09-08T05:28:58.000Z
packages/__init__.py
fetchai/agents-yoti
d71d57508079e5cd3854037bc3c473e24915af6f
[ "Apache-2.0" ]
null
null
null
packages/__init__.py
fetchai/agents-yoti
d71d57508079e5cd3854037bc3c473e24915af6f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI 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 ...
39.190476
80
0.575942
true
true
1c4a571b018141a2957d2b7a89a4c12fd814a302
286
py
Python
frappe/patches/v12_0/remove_deprecated_fields_from_doctype.py
jimmyrianto/frappe
40051410436b11e0415c8c8f0a8335bdd572ce6e
[ "MIT" ]
5
2017-09-12T15:56:31.000Z
2022-03-09T13:50:21.000Z
frappe/patches/v12_0/remove_deprecated_fields_from_doctype.py
alexbow2008/frappe
ce592a40b4c5e80a9c6cbdc541105218bf98c966
[ "MIT" ]
212
2017-08-16T13:03:18.000Z
2020-10-06T12:26:21.000Z
frappe/patches/v12_0/remove_deprecated_fields_from_doctype.py
alexbow2008/frappe
ce592a40b4c5e80a9c6cbdc541105218bf98c966
[ "MIT" ]
14
2020-11-04T11:22:44.000Z
2022-02-01T20:59:37.000Z
import frappe def execute(): frappe.reload_doc('core', 'doctype', 'doctype') frappe.model.delete_fields({ 'DocType': ['hide_heading', 'image_view', 'read_only_onload'] }, delete=1) frappe.db.sql(''' DELETE from `tabProperty Setter` WHERE property = 'read_only_onload' ''')
22
63
0.695804
import frappe def execute(): frappe.reload_doc('core', 'doctype', 'doctype') frappe.model.delete_fields({ 'DocType': ['hide_heading', 'image_view', 'read_only_onload'] }, delete=1) frappe.db.sql(''' DELETE from `tabProperty Setter` WHERE property = 'read_only_onload' ''')
true
true
1c4a57858093aea769da74e5245781bdca0980dc
44,092
py
Python
sdk/python/pulumi_azure_native/network/v20190501/_inputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/network/v20190501/_inputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/network/v20190501/_inputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
43.698712
399
0.673909
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from ._enums import * __all__ = [ 'BackendArgs', 'BackendPoolArgs', 'BackendPoolsSettingsArgs', 'CacheConfigurationArgs', 'ForwardingConfigurationAr...
true
true
1c4a57868ba829a1a46f4c3661d4ed036f1ad5f9
1,295
py
Python
src/tengi/telegram/telegram_api_utils.py
luckybots/tengi
1eef42596fb59035a43d6e1fa7b2aa552b52dffc
[ "Apache-2.0" ]
2
2021-08-09T18:02:59.000Z
2022-01-15T15:11:02.000Z
src/tengi/telegram/telegram_api_utils.py
luckybots/tengi
1eef42596fb59035a43d6e1fa7b2aa552b52dffc
[ "Apache-2.0" ]
null
null
null
src/tengi/telegram/telegram_api_utils.py
luckybots/tengi
1eef42596fb59035a43d6e1fa7b2aa552b52dffc
[ "Apache-2.0" ]
null
null
null
from typing import Iterable from telebot import types as bot_types from telethon.tl import types as api_types def api_to_bot_markup(api_markup: api_types.ReplyInlineMarkup) -> bot_types.InlineKeyboardMarkup: bot_markup = bot_types.InlineKeyboardMarkup() if api_markup is not None: for api_r in api_mark...
43.166667
109
0.601544
from typing import Iterable from telebot import types as bot_types from telethon.tl import types as api_types def api_to_bot_markup(api_markup: api_types.ReplyInlineMarkup) -> bot_types.InlineKeyboardMarkup: bot_markup = bot_types.InlineKeyboardMarkup() if api_markup is not None: for api_r in api_mark...
true
true
1c4a582f3f25a8a9a114c1133dfd741294ed8ca5
5,628
py
Python
src/game/visualisation/visualise_step.py
IvanRoblesMunoz/hungry_geese_game
806454bbd1178f214ceae51ea9724faffbb13396
[ "MIT" ]
1
2021-12-04T13:11:07.000Z
2021-12-04T13:11:07.000Z
src/game/visualisation/visualise_step.py
IvanRoblesMunoz/hungry_geese_game
806454bbd1178f214ceae51ea9724faffbb13396
[ "MIT" ]
null
null
null
src/game/visualisation/visualise_step.py
IvanRoblesMunoz/hungry_geese_game
806454bbd1178f214ceae51ea9724faffbb13396
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Nov 28 18:03:25 2021 @author: roblesi This module makes the visuals for the game. """ # pylint: disable=E0401 # ============================================================================= # Imports # =================================================...
29.621053
79
0.559168
import os from pathlib import Path from typing import Tuple import pygame from pygame import display from src.game.visualisation.visualisation_statics import ( START_HEIGHT, START_WIDTH, WIDTH_STEP, HEIGHT_STEP, ) REPO_PATH = Path(os.getcwd()) ASSETS_PATH = REPO_PATH / "src/game/assets" BA...
true
true
1c4a583ce9a5a25fca06dd78ceeeadaabb85e3d8
16,466
py
Python
electrumsv/util/__init__.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
136
2019-01-10T15:49:09.000Z
2022-02-20T04:46:39.000Z
electrumsv/util/__init__.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
790
2019-01-07T01:53:35.000Z
2022-03-30T23:04:28.000Z
electrumsv/util/__init__.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
65
2019-01-10T23:55:30.000Z
2021-12-19T06:47:13.000Z
# ElectrumSV - lightweight Bitcoin SV client # Copyright (C) 2019-2020 The ElectrumSV Developers # Copyright (C) 2011 Thomas Voegtlin # # 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...
34.665263
99
0.649034
from collections import defaultdict from decimal import Decimal from datetime import datetime, timedelta, tzinfo import json import hmac import os import stat import sys import threading import time import types from typing import Any, Callable, cast, Dict, Iterable, List, Optional, Sequence, Se...
true
true
1c4a5a1c7c070e81fc5736a95a9baebb21c9b24b
896
py
Python
unused/py3_tf2_wide_deep/python_v2/lib/utils/image_preprocessing.py
WenqiJiang/FPGA-Accelerator-for-Recommender-Systems
6c3031487cd1447b7f5362483c14b108177387bb
[ "MIT" ]
4
2020-03-03T12:51:05.000Z
2021-06-19T17:34:45.000Z
unused/tf2_wide_deep/python/lib/utils/image_preprocessing.py
WenqiJiang/FPGA-Accelerator-for-Recommender-Systems
6c3031487cd1447b7f5362483c14b108177387bb
[ "MIT" ]
null
null
null
unused/tf2_wide_deep/python/lib/utils/image_preprocessing.py
WenqiJiang/FPGA-Accelerator-for-Recommender-Systems
6c3031487cd1447b7f5362483c14b108177387bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: lapis-hong # @Date : 2018/3/5 """Provides custom function to preprocess images. TODO: custom preprocess for CTR task """ import tensorflow as tf def preprocess_image(image, is_training, height, width, depth): """Preprocess a single image of layout [height...
35.84
69
0.679688
import tensorflow as tf def preprocess_image(image, is_training, height, width, depth): if is_training: image = tf.image.resize_with_crop_or_pad( image, height + 8, width + 8) image = tf.image.random_crop(image, [height, width, depth]) image = tf...
true
true
1c4a5a3252aa102f145f995b3c7e86bbde65c4e8
455
py
Python
WebSite/PrayerWall/bookings/tests.py
Tinka8ell/Prayer-Wall
e9e6f3b94a88fc68f26a660b7abc5a781bad8f71
[ "Apache-2.0" ]
null
null
null
WebSite/PrayerWall/bookings/tests.py
Tinka8ell/Prayer-Wall
e9e6f3b94a88fc68f26a660b7abc5a781bad8f71
[ "Apache-2.0" ]
null
null
null
WebSite/PrayerWall/bookings/tests.py
Tinka8ell/Prayer-Wall
e9e6f3b94a88fc68f26a660b7abc5a781bad8f71
[ "Apache-2.0" ]
null
null
null
from django.test import TestCase # for management command testing from io import StringIO from django.core.management import call_command # Create your tests for bookings here. class StartEventTest(TestCase): def test_command_output(self): out = StringIO() call_command("startevent 'My New Event'...
30.333333
98
0.723077
from django.test import TestCase from io import StringIO from django.core.management import call_command class StartEventTest(TestCase): def test_command_output(self): out = StringIO() call_command("startevent 'My New Event' 2020/11/27-20 ('online',) ('104', 2)", stdout=out) self.asser...
true
true
1c4a5a4d9077dba1b07057603efd5ddf4d638abb
10,165
py
Python
isi_sdk_8_2_2/isi_sdk_8_2_2/models/event_channel_extended_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_2/isi_sdk_8_2_2/models/event_channel_extended_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_2/isi_sdk_8_2_2/models/event_channel_extended_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 9 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_2_2.models.event_c...
31.085627
153
0.600787
import pprint import re import six from isi_sdk_8_2_2.models.event_channel_parameters import EventChannelParameters class EventChannelExtendedExtended(object): swagger_types = { 'allowed_nodes': 'list[int]', 'enabled': 'bool', 'excluded_nodes': 'list[int]', 'id': 'int', ...
true
true
1c4a5cf471c60ef2a56210e6cc5aeab54a57bcce
4,028
py
Python
configs/top_down/resnetv1d/coco/resnetv1d152_coco_256x192.py
jcwon0/BlurHPE
c97a57e92a8a7f171b0403aee640222a32513562
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnetv1d/coco/resnetv1d152_coco_256x192.py
jcwon0/BlurHPE
c97a57e92a8a7f171b0403aee640222a32513562
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnetv1d/coco/resnetv1d152_coco_256x192.py
jcwon0/BlurHPE
c97a57e92a8a7f171b0403aee640222a32513562
[ "Apache-2.0" ]
null
null
null
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None...
28.771429
80
0.606504
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None...
true
true
1c4a5d624386288eaed2cfbb319df3274578f578
28,100
py
Python
paddlenlp/datasets/dataset.py
JunnYu/ConvBERT-Prod
a1351e1e7f9400cb8c71d0a15d23629b4cb055d4
[ "Apache-2.0" ]
11
2022-01-06T07:39:47.000Z
2022-03-22T06:18:40.000Z
paddlenlp/datasets/dataset.py
JunnYu/ConvBERT-Prod
a1351e1e7f9400cb8c71d0a15d23629b4cb055d4
[ "Apache-2.0" ]
null
null
null
paddlenlp/datasets/dataset.py
JunnYu/ConvBERT-Prod
a1351e1e7f9400cb8c71d0a15d23629b4cb055d4
[ "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.865837
138
0.574698
import atexit import collections import io import math import os import warnings import sys import inspect from multiprocess import Pool, RLock import time import paddle.distributed as dist from paddle.io import Dataset, IterableDataset from paddle.dataset.common import md5file from paddle.utils.download...
true
true
1c4a5d83d36d2e8c948aeb0969a624af35d58159
6,949
py
Python
simple_python_profiler/main.py
jeshan/simple-python-profiler
a3d3a709781b5aaff38b55389c93efd132274344
[ "MIT" ]
null
null
null
simple_python_profiler/main.py
jeshan/simple-python-profiler
a3d3a709781b5aaff38b55389c93efd132274344
[ "MIT" ]
1
2021-06-02T00:57:36.000Z
2021-06-02T00:57:36.000Z
simple_python_profiler/main.py
jeshan/simple-python-profiler
a3d3a709781b5aaff38b55389c93efd132274344
[ "MIT" ]
null
null
null
import functools import inspect import sys from time import perf_counter_ns from typing import List, Dict from loguru import logger from recursive_decorator import recursive_decorator def fn_description(f): return f'{f.__module__}.{f.__qualname__}' def sort_fn(invocation): return invocation.end - invocatio...
27.466403
121
0.647287
import functools import inspect import sys from time import perf_counter_ns from typing import List, Dict from loguru import logger from recursive_decorator import recursive_decorator def fn_description(f): return f'{f.__module__}.{f.__qualname__}' def sort_fn(invocation): return invocation.end - invocatio...
true
true
1c4a610aebca605ce60f6577184339a699daaaa0
470
py
Python
tests/performance/conftest.py
rspadim/aiocache
bf675ae912173bee25cc1d8c22b77f57de34375d
[ "BSD-3-Clause" ]
213
2020-11-02T14:29:46.000Z
2022-03-24T23:12:32.000Z
tests/performance/conftest.py
rspadim/aiocache
bf675ae912173bee25cc1d8c22b77f57de34375d
[ "BSD-3-Clause" ]
48
2020-11-02T11:17:13.000Z
2022-03-24T17:55:31.000Z
tests/performance/conftest.py
rspadim/aiocache
bf675ae912173bee25cc1d8c22b77f57de34375d
[ "BSD-3-Clause" ]
49
2020-11-13T07:41:37.000Z
2022-03-25T12:24:49.000Z
import pytest from aiocache import Cache from aiocache.backends.redis import RedisBackend @pytest.fixture def redis_cache(event_loop): cache = Cache(Cache.REDIS, namespace="test", pool_max_size=1) yield cache for _, pool in RedisBackend.pools.items(): pool.close() event_loop.run_until_co...
22.380952
65
0.731915
import pytest from aiocache import Cache from aiocache.backends.redis import RedisBackend @pytest.fixture def redis_cache(event_loop): cache = Cache(Cache.REDIS, namespace="test", pool_max_size=1) yield cache for _, pool in RedisBackend.pools.items(): pool.close() event_loop.run_until_co...
true
true
1c4a624f74d426cc722ed45176fcf417a5aa38db
2,970
py
Python
spacy_crfsuite/tokenizer.py
lusterck/spacy_crfsuite
21acb6431b8c3c98528d6994880ca7bb3b69f499
[ "MIT" ]
12
2020-07-29T17:08:06.000Z
2022-03-28T10:39:39.000Z
spacy_crfsuite/tokenizer.py
marzi-heidari/spacy_crfsuite
b9f31aac9e727245791197aed4245f03a57a89ba
[ "MIT" ]
5
2020-07-29T17:08:03.000Z
2022-03-28T07:16:19.000Z
spacy_crfsuite/tokenizer.py
marzi-heidari/spacy_crfsuite
b9f31aac9e727245791197aed4245f03a57a89ba
[ "MIT" ]
7
2020-08-06T11:08:30.000Z
2022-01-20T14:25:19.000Z
import numpy as np import spacy from abc import ABCMeta, abstractmethod from typing import Text, Optional, Any, Dict, Union class Token: def __init__( self, text: Text, start: int, end: Optional[int] = None, data: Optional[Dict[Text, Any]] = None, lemma: Optional[T...
27.5
76
0.550168
import numpy as np import spacy from abc import ABCMeta, abstractmethod from typing import Text, Optional, Any, Dict, Union class Token: def __init__( self, text: Text, start: int, end: Optional[int] = None, data: Optional[Dict[Text, Any]] = None, lemma: Optional[T...
true
true
1c4a6340c5d62211f6a45bfb0967b64e8ecde7eb
1,355
py
Python
src/slim_train.py
limxuanyu127/seesawfacenet_pytorch
d975f12cb48b53508ca7ea42c5b0b459eb73a2bc
[ "MIT" ]
null
null
null
src/slim_train.py
limxuanyu127/seesawfacenet_pytorch
d975f12cb48b53508ca7ea42c5b0b459eb73a2bc
[ "MIT" ]
null
null
null
src/slim_train.py
limxuanyu127/seesawfacenet_pytorch
d975f12cb48b53508ca7ea42c5b0b459eb73a2bc
[ "MIT" ]
null
null
null
from config import get_config from slim_Learner import face_learner import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description='for face verification') parser.add_argument("-e", "--epochs", help="training epochs", default=16, type=int) parser.add_argument("-net", "--net_mode", ...
43.709677
143
0.687823
from config import get_config from slim_Learner import face_learner import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description='for face verification') parser.add_argument("-e", "--epochs", help="training epochs", default=16, type=int) parser.add_argument("-net", "--net_mode", ...
true
true
1c4a64081f8217ebdf60f72541839ad38a6f2848
890
py
Python
release/scripts/modules/bl_keymap_utils/__init__.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
365
2015-02-10T15:10:55.000Z
2022-03-03T15:50:51.000Z
release/scripts/modules/bl_keymap_utils/__init__.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
45
2015-01-09T15:34:20.000Z
2021-10-05T14:44:23.000Z
release/scripts/modules/bl_keymap_utils/__init__.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
172
2015-01-25T15:16:53.000Z
2022-01-31T08:25:36.000Z
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
34.230769
74
0.716854
true
true
1c4a65bb65df12ad239c522acfad3662a7231d1a
15,278
py
Python
cortex/dataset/views.py
mvdoc/pycortex
bc8a93cac9518e3c1cd89650c703f9f3814e805b
[ "BSD-2-Clause" ]
423
2015-01-06T02:46:46.000Z
2022-03-23T17:20:38.000Z
cortex/dataset/views.py
mvdoc/pycortex
bc8a93cac9518e3c1cd89650c703f9f3814e805b
[ "BSD-2-Clause" ]
243
2015-01-03T02:10:03.000Z
2022-03-31T19:29:48.000Z
cortex/dataset/views.py
mvdoc/pycortex
bc8a93cac9518e3c1cd89650c703f9f3814e805b
[ "BSD-2-Clause" ]
136
2015-03-23T20:35:59.000Z
2022-03-09T13:39:10.000Z
import json import h5py import numpy as np from six import string_types from .. import options from .braindata import BrainData, VolumeData, VertexData default_cmap = options.config.get("basic", "default_cmap") def normalize(data): if isinstance(data, tuple): if len(data) == 3: if data[0].dt...
39.074169
115
0.582668
import json import h5py import numpy as np from six import string_types from .. import options from .braindata import BrainData, VolumeData, VertexData default_cmap = options.config.get("basic", "default_cmap") def normalize(data): if isinstance(data, tuple): if len(data) == 3: if data[0].dt...
true
true
1c4a676f27ed3a73245add251cc9aa1a30f369df
374
py
Python
_ctfs/wargamesmy-19/babypwn/xpl.py
daniellimws/daniellimws.github.io
464548e058ca423548cbe95c4ee38f856f9185c2
[ "MIT" ]
1
2019-01-31T16:50:12.000Z
2019-01-31T16:50:12.000Z
_ctfs/wargamesmy-19/babypwn/xpl.py
daniellimws/daniellimws.github.io
464548e058ca423548cbe95c4ee38f856f9185c2
[ "MIT" ]
null
null
null
_ctfs/wargamesmy-19/babypwn/xpl.py
daniellimws/daniellimws.github.io
464548e058ca423548cbe95c4ee38f856f9185c2
[ "MIT" ]
3
2019-03-04T12:46:18.000Z
2021-05-18T16:10:44.000Z
from pwn import * # r = process("./babypwn") r = remote("45.76.161.20", 19509) leak = u32(r.recv(4)) libc_base = leak - 0xd80 - 0x1d8000 log.info("Leaked: " + hex(libc_base)) sh = libc_base + 0x3d0d5 log.info("Shell: " + hex(sh)) sh = -(2**32 - sh) if sh > 0x7fffffff else sh # pause() r.sendline(str(sh)) # pause() r.i...
23.375
45
0.660428
from pwn import * r = remote("45.76.161.20", 19509) leak = u32(r.recv(4)) libc_base = leak - 0xd80 - 0x1d8000 log.info("Leaked: " + hex(libc_base)) sh = libc_base + 0x3d0d5 log.info("Shell: " + hex(sh)) sh = -(2**32 - sh) if sh > 0x7fffffff else sh r.sendline(str(sh)) r.interactive()
true
true
1c4a6843d62ed680a7b0c55c9e80f25fddaa013a
47
py
Python
Taekwon/Python/baseGrammar/codeup040.py
sonnysorry/codingtest
478e0168e3209eb97b6b16910027bf12ccc3ccd0
[ "MIT" ]
2
2021-09-27T19:10:36.000Z
2021-11-09T05:40:39.000Z
Taekwon/Python/baseGrammar/codeup040.py
sonnysorry/codingtest
478e0168e3209eb97b6b16910027bf12ccc3ccd0
[ "MIT" ]
1
2021-11-15T14:56:54.000Z
2021-11-15T14:56:54.000Z
Taekwon/Python/baseGrammar/codeup040.py
sonnysorry/codingtest
478e0168e3209eb97b6b16910027bf12ccc3ccd0
[ "MIT" ]
null
null
null
a, b = input().split() print(int(a) // int(b))
15.666667
23
0.531915
a, b = input().split() print(int(a) // int(b))
true
true
1c4a6896ce6f6954c7f299bc77e2b3cfe6d96de7
2,983
py
Python
huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/untag_device_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/untag_device_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/untag_device_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class UntagDeviceResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
26.39823
79
0.546095
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class UntagDeviceResponse(SdkResponse): sensitive_list = [] openapi_types = { 'body': 'str' } attribute_map = { 'body': 'body...
true
true
1c4a68ab2bfe23ff9552b1c0fd938fc479058e3b
3,557
py
Python
blocks/find_delta/pyspark/lib.py
datayoga-io/datayoga
d88b23d21d49d60d14b3c72d54e11e5034f6c1f3
[ "Apache-2.0" ]
16
2022-01-24T07:45:16.000Z
2022-03-07T08:27:13.000Z
blocks/find_delta/pyspark/lib.py
datayoga-io/datayoga
d88b23d21d49d60d14b3c72d54e11e5034f6c1f3
[ "Apache-2.0" ]
null
null
null
blocks/find_delta/pyspark/lib.py
datayoga-io/datayoga
d88b23d21d49d60d14b3c72d54e11e5034f6c1f3
[ "Apache-2.0" ]
2
2022-01-19T07:46:16.000Z
2022-01-24T12:25:09.000Z
import pyspark.sql import pyspark.sql.functions as F import pyspark.sql.types as T import logging import collections from typing import List import functools import operator logger = logging.getLogger("dy_runner") Delta = collections.namedtuple('Delta', 'insert update delete exclude') def find_delta( df_existin...
33.556604
126
0.648299
import pyspark.sql import pyspark.sql.functions as F import pyspark.sql.types as T import logging import collections from typing import List import functools import operator logger = logging.getLogger("dy_runner") Delta = collections.namedtuple('Delta', 'insert update delete exclude') def find_delta( df_existin...
true
true
1c4a68f1c5b6a23e89d1c5fd877e88f0987b2ccf
2,069
py
Python
common/utils.py
Spearis666/SARA
99f4d70053faaf15c89bdb5a6ef6b624853b1f9f
[ "MIT" ]
null
null
null
common/utils.py
Spearis666/SARA
99f4d70053faaf15c89bdb5a6ef6b624853b1f9f
[ "MIT" ]
null
null
null
common/utils.py
Spearis666/SARA
99f4d70053faaf15c89bdb5a6ef6b624853b1f9f
[ "MIT" ]
null
null
null
import os, sys # Check if folder exist, and try to create it if not def checkFolder(path): if os.path.exists(path): return True else: try: os.makedirs(path) return True except OSError: return False # List files in directory with specific extensions def getFilesIn(directory, extension...
26.87013
71
0.61189
import os, sys def checkFolder(path): if os.path.exists(path): return True else: try: os.makedirs(path) return True except OSError: return False def getFilesIn(directory, extensions, subdir=False): filePaths = [] for root, directories, files in os.walk(directory): i...
true
true
1c4a6920c0679fbb93d994ae2d9852889fe7d1aa
2,118
py
Python
tests/test_read_ltxt.py
l-johnston/toolbag
1bd6ca61bfaf5856e5de320926d5593291e39e9c
[ "MIT" ]
null
null
null
tests/test_read_ltxt.py
l-johnston/toolbag
1bd6ca61bfaf5856e5de320926d5593291e39e9c
[ "MIT" ]
null
null
null
tests/test_read_ltxt.py
l-johnston/toolbag
1bd6ca61bfaf5856e5de320926d5593291e39e9c
[ "MIT" ]
null
null
null
"""Test read_ltxt""" from tempfile import TemporaryFile from unyt import unyt_array from unyt.testing import allclose_units from toolbag import read_ltxt # pylint: disable=missing-function-docstring # pylint: disable=invalid-name def test_time(): with TemporaryFile(mode="w+t", encoding="utf-8") as file: f...
34.721311
66
0.626062
from tempfile import TemporaryFile from unyt import unyt_array from unyt.testing import allclose_units from toolbag import read_ltxt def test_time(): with TemporaryFile(mode="w+t", encoding="utf-8") as file: file.write("time\tV(out)\n0.0e+0\t1.0e+0\n1.0e+0\t2.0e+0") file.seek(0) data = r...
true
true
1c4a6a7fe13f1d334ea7b780e192d677da6eed5f
570
py
Python
textflow/model/__init__.py
ysenarath/textflow
ebb86cbedaf6ba7ed62a9f811a7d7d1818d938ac
[ "MIT" ]
4
2020-12-10T19:38:15.000Z
2021-08-02T02:00:46.000Z
textflow/model/__init__.py
ysenarath/textflow
ebb86cbedaf6ba7ed62a9f811a7d7d1818d938ac
[ "MIT" ]
2
2021-01-08T18:35:04.000Z
2021-02-07T04:25:56.000Z
textflow/model/__init__.py
ysenarath/textflow
ebb86cbedaf6ba7ed62a9f811a7d7d1818d938ac
[ "MIT" ]
1
2021-04-04T19:21:40.000Z
2021-04-04T19:21:40.000Z
""" Model """ from textflow.model.annotation import AnnotationSet, Annotation, AnnotationSpan from textflow.model.dataset import Dataset, datasets from textflow.model.document import Document from textflow.model.label import Label from textflow.model.estimator import estimators from textflow.model.project import Projec...
24.782609
79
0.72807
from textflow.model.annotation import AnnotationSet, Annotation, AnnotationSpan from textflow.model.dataset import Dataset, datasets from textflow.model.document import Document from textflow.model.label import Label from textflow.model.estimator import estimators from textflow.model.project import Project from textflo...
true
true
1c4a6aa6a00384fc6746c01b52b7972d18f38e00
679
py
Python
src/leetcode/Coding_Interviews/number_of_1.py
highing666/leaving
c121ee2f61e45472bb71e2770d0697e902279a64
[ "MIT" ]
null
null
null
src/leetcode/Coding_Interviews/number_of_1.py
highing666/leaving
c121ee2f61e45472bb71e2770d0697e902279a64
[ "MIT" ]
null
null
null
src/leetcode/Coding_Interviews/number_of_1.py
highing666/leaving
c121ee2f61e45472bb71e2770d0697e902279a64
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class Solution: def countDigitOne(self, n: int) -> int: digit, result = 1, 0 high, cur, low = n // 10, n % 10, 0 while high != 0 or cur != 0: if cur == 0: result += high * digit elif cur == 1: result += high *...
23.413793
48
0.427099
class Solution: def countDigitOne(self, n: int) -> int: digit, result = 1, 0 high, cur, low = n // 10, n % 10, 0 while high != 0 or cur != 0: if cur == 0: result += high * digit elif cur == 1: result += high * digit + low + 1 ...
true
true
1c4a6b229d3ab0ade8a6a29420ac282ec48469e8
2,616
py
Python
analytics/urls.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
2
2019-04-24T15:22:52.000Z
2020-01-18T11:01:31.000Z
analytics/urls.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
10
2019-02-26T11:10:42.000Z
2019-02-26T14:30:24.000Z
analytics/urls.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
1
2020-01-07T15:49:54.000Z
2020-01-07T15:49:54.000Z
from django.conf.urls import include, url import analytics.views from zerver.lib.rest import rest_dispatch i18n_urlpatterns = [ # Server admin (user_profile.is_staff) visible stats pages url(r'^activity$', analytics.views.get_activity, name='analytics.views.get_activity'), url(r'^realm_activity/(?...
43.6
102
0.706804
from django.conf.urls import include, url import analytics.views from zerver.lib.rest import rest_dispatch i18n_urlpatterns = [ url(r'^activity$', analytics.views.get_activity, name='analytics.views.get_activity'), url(r'^realm_activity/(?P<realm_str>[\S]+)/$', analytics.views.get_realm_activity,...
true
true
1c4a6b3c9898b1cd500e1c9204c8490401f0ca8f
18,701
py
Python
python_modules/dagster-graphql/dagster_graphql/schema/roots/query.py
ibelikov/dagster
6781eaadd33ecfb0b48d7c2c7d8e193efbda4209
[ "Apache-2.0" ]
null
null
null
python_modules/dagster-graphql/dagster_graphql/schema/roots/query.py
ibelikov/dagster
6781eaadd33ecfb0b48d7c2c7d8e193efbda4209
[ "Apache-2.0" ]
null
null
null
python_modules/dagster-graphql/dagster_graphql/schema/roots/query.py
ibelikov/dagster
6781eaadd33ecfb0b48d7c2c7d8e193efbda4209
[ "Apache-2.0" ]
1
2021-11-25T11:06:39.000Z
2021-11-25T11:06:39.000Z
import graphene from dagster import check from dagster.core.definitions.events import AssetKey from dagster.core.execution.backfill import BulkActionStatus from dagster.core.host_representation import ( InstigationSelector, RepositorySelector, ScheduleSelector, SensorSelector, ) from dagster.core.schedu...
38.087576
100
0.71825
import graphene from dagster import check from dagster.core.definitions.events import AssetKey from dagster.core.execution.backfill import BulkActionStatus from dagster.core.host_representation import ( InstigationSelector, RepositorySelector, ScheduleSelector, SensorSelector, ) from dagster.core.schedu...
true
true
1c4a6b7f9a2cd7b57e29cb5f2d14e1917bfc20b7
3,448
py
Python
tutorial/settings.py
cyndi088/tutorial
4a1e373554b827fce1719fe49e1e49412eaa7af5
[ "MIT" ]
null
null
null
tutorial/settings.py
cyndi088/tutorial
4a1e373554b827fce1719fe49e1e49412eaa7af5
[ "MIT" ]
2
2020-01-09T07:58:53.000Z
2020-02-12T14:57:46.000Z
tutorial/settings.py
cyndi088/tutorial
4a1e373554b827fce1719fe49e1e49412eaa7af5
[ "MIT" ]
null
null
null
""" Django settings for tutorial project. Generated by 'django-admin startproject' using Django 2.2.7. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os i...
25.540741
91
0.697506
import os import sys BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.join(BASE_DIR, 'tutorial')) SECRET_KEY = '5nrnq$kj)nxh9@u-v#n83(9d4@x1r-vk%+%_5)!6$1smwy2-y&' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.cont...
true
true
1c4a6d92ab4a6582c87d304e6fe65c32e55535a7
17,478
py
Python
google/cloud/iap/v1/iap-v1-py/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/transports/grpc_asyncio.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/iap/v1/iap-v1-py/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/transports/grpc_asyncio.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/iap/v1/iap-v1-py/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/transports/grpc_asyncio.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
46.360743
98
0.639318
import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union from google.api_core import gapic_v1 from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials from google.auth.transport.grpc import S...
true
true
1c4a6da9e32f2fa4fbbdec55c0b23a5795f8a579
9,407
py
Python
tools/telemetry/telemetry/timeline/thread.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-11-28T10:46:52.000Z
2019-11-28T10:46:52.000Z
tools/telemetry/telemetry/timeline/thread.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/telemetry/telemetry/timeline/thread.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-27T11:15:39.000Z
2016-08-17T14:19:56.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import telemetry.timeline.async_slice as async_slice_module import telemetry.timeline.event_container as event_container import telemetry.timeline.flow_event ...
35.90458
80
0.672691
import telemetry.timeline.async_slice as async_slice_module import telemetry.timeline.event_container as event_container import telemetry.timeline.flow_event as flow_event_module import telemetry.timeline.sample as sample_module import telemetry.timeline.slice as slice_module class Thread(event_container.TimelineE...
true
true
1c4a6de9d76149804cfadbfe3dc687ed9ec8343a
1,570
py
Python
src/runners/utils.py
timfletch/SnowAlert
7736ae4e7e1c8d3d4be34f8e360eddea53c49d2c
[ "Apache-2.0" ]
null
null
null
src/runners/utils.py
timfletch/SnowAlert
7736ae4e7e1c8d3d4be34f8e360eddea53c49d2c
[ "Apache-2.0" ]
null
null
null
src/runners/utils.py
timfletch/SnowAlert
7736ae4e7e1c8d3d4be34f8e360eddea53c49d2c
[ "Apache-2.0" ]
null
null
null
from datetime import date, datetime import inspect from itertools import zip_longest import json import traceback from types import GeneratorType NO_FILL = object() def groups_of(n, iterable, fillvalue=NO_FILL): args = [iter(iterable)] * n rets = zip_longest(*args, fillvalue=fillvalue) return (tuple(l fo...
27.068966
76
0.642675
from datetime import date, datetime import inspect from itertools import zip_longest import json import traceback from types import GeneratorType NO_FILL = object() def groups_of(n, iterable, fillvalue=NO_FILL): args = [iter(iterable)] * n rets = zip_longest(*args, fillvalue=fillvalue) return (tuple(l fo...
true
true
1c4a7040f025b55e78f539572f49045fceb53255
11,790
py
Python
pyleecan/Classes/CondType12.py
jgdedamas/pyleecan
52ca00b36bbf1a1ba24ae722cf72c5e8e8e16395
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/CondType12.py
jgdedamas/pyleecan
52ca00b36bbf1a1ba24ae722cf72c5e8e8e16395
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/CondType12.py
jgdedamas/pyleecan
52ca00b36bbf1a1ba24ae722cf72c5e8e8e16395
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Machine/CondType12.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Machine/CondType12 """ from os import linesep from sys import getsizeof fro...
32.125341
249
0.609669
from os import linesep from sys import getsizeof from logging import getLogger from ._check import check_var, raise_ from ..Functions.get_logger import get_logger from ..Functions.save import save from ..Functions.copy import copy from ..Functions.load import load_init_dict from ..Functions.Load.import_class import...
true
true
1c4a704defde2f07302fed79149db9bb0af194e7
4,779
py
Python
test/functional/interface_http.py
kyancoin/KYAN
39174bd5add8a41a82ca53e5f1372e4c0a58f447
[ "MIT" ]
6
2020-09-17T04:29:33.000Z
2021-08-08T16:39:10.000Z
test/functional/interface_http.py
sapphire-pt/KYAN
0c534d9a10a8d07d3707c74e6ea93477857b5ec7
[ "MIT" ]
22
2020-07-31T20:01:16.000Z
2020-08-13T09:58:21.000Z
test/functional/interface_http.py
kyancoin/KYAN
39174bd5add8a41a82ca53e5f1372e4c0a58f447
[ "MIT" ]
4
2020-09-17T22:32:25.000Z
2022-01-12T20:49:24.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the RPC HTTP basics.""" from test_framework.test_framework import PivxTestFramework from test_fra...
43.844037
108
0.632768
from test_framework.test_framework import PivxTestFramework from test_framework.util import * import http.client import urllib.parse class HTTPBasicsTest (PivxTestFramework): def set_test_params(self): self.num_nodes = 3 def setup_network(self): self.setup_nodes() def run_test(self)...
true
true
1c4a70cf289dd3128b34f541efdf029286cbd0d2
1,070
py
Python
data/migrations/0012_auto_20191005_0731.py
SIXMON/peps
48c09a951a0193ada7b91c8bb6efc4b1232c3520
[ "MIT" ]
5
2019-08-29T13:55:47.000Z
2021-11-15T08:30:33.000Z
data/migrations/0012_auto_20191005_0731.py
SIXMON/peps
48c09a951a0193ada7b91c8bb6efc4b1232c3520
[ "MIT" ]
295
2019-08-19T12:40:29.000Z
2022-01-24T14:03:20.000Z
data/migrations/0012_auto_20191005_0731.py
SIXMON/peps
48c09a951a0193ada7b91c8bb6efc4b1232c3520
[ "MIT" ]
7
2020-05-27T06:28:48.000Z
2021-11-17T10:00:54.000Z
# Generated by Django 2.2.4 on 2019-10-05 07:31 import django.contrib.postgres.fields import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('data', '0011_auto_20191004_1505'), ] operations = [ migrations.Rem...
31.470588
155
0.636449
import django.contrib.postgres.fields import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('data', '0011_auto_20191004_1505'), ] operations = [ migrations.RemoveField( model_name='practice', ...
true
true
1c4a70d44d91648b29f794c7eba76c2e8bd1c7fa
7,104
py
Python
bsp_tool/branches/valve/orange_box.py
snake-biscuits/bsp_tool
f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773
[ "MIT" ]
44
2018-07-06T04:44:02.000Z
2022-03-27T02:18:37.000Z
bsp_tool/branches/valve/orange_box.py
snake-biscuits/bsp_tool
f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773
[ "MIT" ]
18
2018-07-25T23:19:17.000Z
2022-03-16T23:59:36.000Z
bsp_tool/branches/valve/orange_box.py
snake-biscuits/bsp_tool
f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773
[ "MIT" ]
12
2019-09-13T21:52:51.000Z
2022-03-22T18:04:21.000Z
# https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/public/bspfile.h import enum import io import struct from typing import List from .. import base from . import source FILE_MAGIC = b"VBSP" BSP_VERSION = 20 # NOTE: v20 Source BSPs differ widely, since many forks are of this version GAME_PATHS =...
36.060914
106
0.657517
import enum import io import struct from typing import List from .. import base from . import source FILE_MAGIC = b"VBSP" BSP_VERSION = 20 GAME_PATHS = ["Day of Defeat: Source", "G String", "Garry's Mod", "Half-Life 2: Episode 2", "Half-Life 2 Update", ...
true
true
1c4a711bd8237da25790895bd0df02e797b5f2e6
5,306
py
Python
benchmark/networks/centralized_ac.py
HONGcalmJIN/SMARTS
0e2249a3bc985ee9279512d6154ce32732065835
[ "MIT" ]
null
null
null
benchmark/networks/centralized_ac.py
HONGcalmJIN/SMARTS
0e2249a3bc985ee9279512d6154ce32732065835
[ "MIT" ]
null
null
null
benchmark/networks/centralized_ac.py
HONGcalmJIN/SMARTS
0e2249a3bc985ee9279512d6154ce32732065835
[ "MIT" ]
1
2022-03-31T02:14:09.000Z
2022-03-31T02:14:09.000Z
import numpy as np from collections import OrderedDict from typing import List, Dict from gym import spaces from ray.rllib.utils.framework import try_import_tf, get_activation_fn from ray.rllib.utils.annotations import override from ray.rllib.utils.types import ModelConfigDict, TensorType from ray.rllib.models import...
35.851351
87
0.613456
import numpy as np from collections import OrderedDict from typing import List, Dict from gym import spaces from ray.rllib.utils.framework import try_import_tf, get_activation_fn from ray.rllib.utils.annotations import override from ray.rllib.utils.types import ModelConfigDict, TensorType from ray.rllib.models import...
true
true
1c4a7170b0fa8e60f08719c553b8346bac8ea857
525
py
Python
src/asymmetric_jwt_auth/migrations/0002_publickey_comment.py
crgwbr/asymmetric-jwt-auth
e4b7889a893dcc57eab20a2ed7265b6e9f44d4b9
[ "0BSD" ]
18
2017-08-12T06:57:27.000Z
2022-03-17T18:55:04.000Z
src/asymmetric_jwt_auth/migrations/0002_publickey_comment.py
crgwbr/asymmetric-jwt-auth
e4b7889a893dcc57eab20a2ed7265b6e9f44d4b9
[ "0BSD" ]
18
2017-03-25T04:39:23.000Z
2021-07-07T13:18:38.000Z
src/asymmetric_jwt_auth/migrations/0002_publickey_comment.py
crgwbr/asymmetric-jwt-auth
e4b7889a893dcc57eab20a2ed7265b6e9f44d4b9
[ "0BSD" ]
8
2017-03-02T14:00:02.000Z
2020-03-21T08:29:17.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("asymmetric_jwt_auth", "0001_initial"), ] operations = [ migrations.AddField( model_name="publickey", ...
22.826087
83
0.586667
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("asymmetric_jwt_auth", "0001_initial"), ] operations = [ migrations.AddField( model_name="publickey", name="comment", ...
true
true
1c4a7192efc324ef4cc55befd164bd83b94f86a8
342
py
Python
python/p026.py
Martin-Gong/euler
dc29cb99c0e5f9916428de624edc375d9d5b4543
[ "MIT" ]
null
null
null
python/p026.py
Martin-Gong/euler
dc29cb99c0e5f9916428de624edc375d9d5b4543
[ "MIT" ]
null
null
null
python/p026.py
Martin-Gong/euler
dc29cb99c0e5f9916428de624edc375d9d5b4543
[ "MIT" ]
null
null
null
# 26 def getRecurLen(n): seq = {} rem = 1 % n i = 1 while(rem not in seq): seq[rem] = i rem = (10 * rem) % n if rem == 0: return 0 i += 1 return len(seq) - seq[rem] + 1 rec = 0 for d in range(1, 1000): n = getRecurLen(d) if n > rec: ...
13.68
34
0.421053
def getRecurLen(n): seq = {} rem = 1 % n i = 1 while(rem not in seq): seq[rem] = i rem = (10 * rem) % n if rem == 0: return 0 i += 1 return len(seq) - seq[rem] + 1 rec = 0 for d in range(1, 1000): n = getRecurLen(d) if n > rec: re...
true
true
1c4a71fe54c3b911852677cd9a5459e70d22fa8e
7,860
py
Python
stonesoup/types/multihypothesis.py
0sm1um/Stone-Soup
aaa895b54383e9a9b9c9f9ff746291bf60242aab
[ "MIT" ]
1
2021-12-02T00:17:21.000Z
2021-12-02T00:17:21.000Z
stonesoup/types/multihypothesis.py
0sm1um/Stone-Soup
aaa895b54383e9a9b9c9f9ff746291bf60242aab
[ "MIT" ]
null
null
null
stonesoup/types/multihypothesis.py
0sm1um/Stone-Soup
aaa895b54383e9a9b9c9f9ff746291bf60242aab
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from collections.abc import Sized, Iterable, Container from typing import Sequence from .detection import MissedDetection from .numeric import Probability from ..base import Property from ..types import Type from ..types.detection import Detection from ..types.hypothesis import SingleHypothesis...
38.719212
99
0.663232
from collections.abc import Sized, Iterable, Container from typing import Sequence from .detection import MissedDetection from .numeric import Probability from ..base import Property from ..types import Type from ..types.detection import Detection from ..types.hypothesis import SingleHypothesis, CompositeHypothesis f...
true
true
1c4a72bba58f35607b720e9dfaa0b6d738ef6fd0
26,738
py
Python
tests/test_invariant.py
kklein/icontract
718ef1733cc2cce6d3c8f59a5a37de96f8be6664
[ "MIT" ]
244
2018-08-15T22:58:58.000Z
2022-03-12T16:10:39.000Z
tests/test_invariant.py
kklein/icontract
718ef1733cc2cce6d3c8f59a5a37de96f8be6664
[ "MIT" ]
157
2018-08-29T21:36:47.000Z
2022-02-14T19:30:24.000Z
tests/test_invariant.py
kklein/icontract
718ef1733cc2cce6d3c8f59a5a37de96f8be6664
[ "MIT" ]
23
2019-04-24T11:09:10.000Z
2022-02-14T15:56:26.000Z
# pylint: disable=missing-docstring # pylint: disable=invalid-name # pylint: disable=unused-argument import textwrap import time import unittest from typing import Dict, Iterator, Mapping, Optional, Any, NamedTuple # pylint: disable=unused-import import icontract import tests.error import tests.mock class TestOK(un...
32.214458
117
0.559803
import textwrap import time import unittest from typing import Dict, Iterator, Mapping, Optional, Any, NamedTuple import icontract import tests.error import tests.mock class TestOK(unittest.TestCase): def test_init(self) -> None: @icontract.invariant(lambda self: self.x > 0) class SomeClass:...
true
true