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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f76ceb9fa98cc8a8fa243e56b909b40ec00a15aa
5,049
py
Python
createPix2Pix (facial)/createTeeth2Dataset.py
vutuanhai237/Braces2TeethUtilities
6dd480edb09d05ac9d6f48a013649f92796549aa
[ "MIT" ]
1
2021-02-28T09:44:56.000Z
2021-02-28T09:44:56.000Z
createPix2Pix (facial)/createTeeth2Dataset.py
vutuanhai237/Braces2TeethUtilities
6dd480edb09d05ac9d6f48a013649f92796549aa
[ "MIT" ]
null
null
null
createPix2Pix (facial)/createTeeth2Dataset.py
vutuanhai237/Braces2TeethUtilities
6dd480edb09d05ac9d6f48a013649f92796549aa
[ "MIT" ]
1
2021-06-23T17:31:48.000Z
2021-06-23T17:31:48.000Z
from imutils import face_utils import numpy as np import argparse import imutils import dlib import cv2 import copy import colorsys import math import os import shutil import collections from convexHull import convexHull, convexRectangle from processBar import progressbar from genTeethColor import findTeethColor, rea...
38.838462
120
0.621113
from imutils import face_utils import numpy as np import argparse import imutils import dlib import cv2 import copy import colorsys import math import os import shutil import collections from convexHull import convexHull, convexRectangle from processBar import progressbar from genTeethColor import findTeethColor, rea...
true
true
f76cec9c3e2eb3e6426d438c8aaaff1e26127b69
18,412
py
Python
tests/test_serializer.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
1
2017-03-28T15:31:28.000Z
2017-03-28T15:31:28.000Z
tests/test_serializer.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
1
2021-02-24T04:38:23.000Z
2021-02-24T04:38:23.000Z
tests/test_serializer.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
5
2016-01-04T19:03:35.000Z
2017-12-21T23:42:54.000Z
# coding: utf-8 from __future__ import unicode_literals import inspect import pickle import re import unittest from collections import Mapping import pytest from django.db import models from rest_framework import fields, relations, serializers from rest_framework.compat import unicode_repr from rest_framework.fields...
35.272031
131
0.62128
from __future__ import unicode_literals import inspect import pickle import re import unittest from collections import Mapping import pytest from django.db import models from rest_framework import fields, relations, serializers from rest_framework.compat import unicode_repr from rest_framework.fields import Field f...
true
true
f76cee2f454c632036ca095258433ccd62e37af8
3,528
py
Python
spider_demo/pa_douban_demo.py
bestwishfang/fang
a4c48e242f6b46f1557ba92ce9ca5728c9381fed
[ "MIT" ]
1
2021-01-13T13:22:03.000Z
2021-01-13T13:22:03.000Z
spider_demo/pa_douban_demo.py
bestwishfang/PerDemo
a4c48e242f6b46f1557ba92ce9ca5728c9381fed
[ "MIT" ]
null
null
null
spider_demo/pa_douban_demo.py
bestwishfang/PerDemo
a4c48e242f6b46f1557ba92ce9ca5728c9381fed
[ "MIT" ]
1
2019-08-22T06:12:19.000Z
2019-08-22T06:12:19.000Z
import json import random import requests # url = 'https://movie.douban.com/j/chart/top_list?type=24&interval_id=100%3A90&action=&start=0&limit=491' # headers = { # 'User-Agent': 'jdskajdjjkjvd', # } # data_list = requests.get(url, headers=headers).json() # with open('douban.txt', mode='a+', encoding='utf-8') a...
37.935484
148
0.634921
import json import random import requests def random_str(): string = 'abcdefghigklmnopqrstuvwxyz' ret = '' for i in range(10): ret += random.choice(string) return ret data = [] for t in range(1, 32): for i in range(1, 11): id_str = '{}%3A{}'.format(i * 10, (i - 1) * 10) ...
true
true
f76cee3994f813e9ae4b03fd6efd297eae22bd33
4,274
py
Python
multimachine-json/config/inventory.py
darkn3rd/vagrant-simple
947388ec969c2110a61f3fcae16dc9b37b27f7c3
[ "MIT" ]
3
2018-04-04T12:35:46.000Z
2019-11-18T15:59:29.000Z
multimachine-json/config/inventory.py
darkn3rd/vagrant-simple
947388ec969c2110a61f3fcae16dc9b37b27f7c3
[ "MIT" ]
null
null
null
multimachine-json/config/inventory.py
darkn3rd/vagrant-simple
947388ec969c2110a61f3fcae16dc9b37b27f7c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Vagrant external inventory script. Automatically finds the IP of the configured vagrant vm(s), and returns it under the host group 'vagrant' Example Vagrant configuration using this script: config.vm.provision :ansible do |ansible| ansible.playbook = "./provision/your_playbook.yml"...
32.876923
98
0.649275
import sys import os from optparse import OptionParser from collections import defaultdict try: import json except: import simplejson as json _script_home = os.path.dirname(os.path.realpath(__file__)) _config = os.environ.get('VAGRANT_CONFIG') or '{}/global.json'.format(_script_home) _group = 'vagrant' _s...
true
true
f76cee8f385dedd197a4faabc5fa96a135f7c8d7
3,946
py
Python
examples/ar.py
lukemerrick/pytorch-forecasting
000ea41bea4ab7a47a0e610841d4fd88fdfead1e
[ "MIT" ]
1,852
2020-08-20T13:51:57.000Z
2022-03-30T20:11:56.000Z
examples/ar.py
lukemerrick/pytorch-forecasting
000ea41bea4ab7a47a0e610841d4fd88fdfead1e
[ "MIT" ]
777
2020-08-20T19:05:00.000Z
2022-03-31T19:33:59.000Z
examples/ar.py
lukemerrick/pytorch-forecasting
000ea41bea4ab7a47a0e610841d4fd88fdfead1e
[ "MIT" ]
310
2020-09-20T06:57:31.000Z
2022-03-31T09:46:37.000Z
from pathlib import Path import pickle import warnings import numpy as np import pandas as pd from pandas.core.common import SettingWithCopyWarning import pytorch_lightning as pl from pytorch_lightning.callbacks import EarlyStopping, LearningRateMonitor from pytorch_lightning.loggers import TensorBoardLogger import to...
32.081301
110
0.769387
from pathlib import Path import pickle import warnings import numpy as np import pandas as pd from pandas.core.common import SettingWithCopyWarning import pytorch_lightning as pl from pytorch_lightning.callbacks import EarlyStopping, LearningRateMonitor from pytorch_lightning.loggers import TensorBoardLogger import to...
true
true
f76cef22438d517fdeac1d898115a9e31fcbbfff
6,428
py
Python
lib/utils/help.py
yanxp/ASM-Pytorch
4eec5caea13320d2502007015e032d76d59eefc4
[ "MIT" ]
18
2018-06-29T08:04:07.000Z
2021-05-07T07:30:15.000Z
lib/utils/help.py
yanxp/ASM-Pytorch
4eec5caea13320d2502007015e032d76d59eefc4
[ "MIT" ]
1
2018-08-27T09:30:39.000Z
2018-08-31T07:44:58.000Z
lib/utils/help.py
yanxp/ASM-Pytorch
4eec5caea13320d2502007015e032d76d59eefc4
[ "MIT" ]
2
2020-02-21T08:48:53.000Z
2021-05-17T15:56:40.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths from model.config import cfg from model.test import im_detect from model.nms_wrapper import nms from utils.timer import Timer import matplotlib.pyplot as plt import numpy as np import os, cv...
32.301508
115
0.528002
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths from model.config import cfg from model.test import im_detect from model.nms_wrapper import nms from utils.timer import Timer import matplotlib.pyplot as plt import numpy as np import os, cv...
true
true
f76cf0b4962f05e96ca6ebeb9d0de3c6da90d91f
1,654
py
Python
taxonomic-annotation/reconcile.py
luispedro/Coelho2021_GMGCv1_analysis
5f1a62844631121cc11f8ac5a776d25baca56ff7
[ "MIT" ]
6
2021-12-16T09:20:28.000Z
2022-03-29T03:21:48.000Z
taxonomic-annotation/reconcile.py
luispedro/Coelho2021_GMGCv1_analysis
5f1a62844631121cc11f8ac5a776d25baca56ff7
[ "MIT" ]
1
2022-02-18T01:56:56.000Z
2022-02-22T14:39:48.000Z
taxonomic-annotation/reconcile.py
luispedro/Coelho2021_GMGCv1_analysis
5f1a62844631121cc11f8ac5a776d25baca56ff7
[ "MIT" ]
8
2021-12-17T02:14:50.000Z
2022-03-21T06:40:59.000Z
import pandas as pd from taxonomic import ncbi n = ncbi.NCBI() taxonomic = pd.read_table('/g/bork1/coelho/DD_DeCaF/genecats.cold/GMGC10.taxonomic.map', index_col=0, engine='c') species = pd.read_table('/g/bork1/coelho/DD_DeCaF/genecats.cold/GMGC10.species.match.map', header=None, usecols=[1,2], index_col=0, squeeze=Tr...
34.458333
183
0.666264
import pandas as pd from taxonomic import ncbi n = ncbi.NCBI() taxonomic = pd.read_table('/g/bork1/coelho/DD_DeCaF/genecats.cold/GMGC10.taxonomic.map', index_col=0, engine='c') species = pd.read_table('/g/bork1/coelho/DD_DeCaF/genecats.cold/GMGC10.species.match.map', header=None, usecols=[1,2], index_col=0, squeeze=Tr...
true
true
f76cf0c5dbe566efae1786e0869e53e297d220c3
17,086
py
Python
nemo/collections/nlp/models/machine_translation/mt_enc_dec_bottleneck_model.py
Embodimentgeniuslm3/NeMo
5f5a9a0a1d0bcf28675841af3df9b08b56ae3203
[ "Apache-2.0" ]
null
null
null
nemo/collections/nlp/models/machine_translation/mt_enc_dec_bottleneck_model.py
Embodimentgeniuslm3/NeMo
5f5a9a0a1d0bcf28675841af3df9b08b56ae3203
[ "Apache-2.0" ]
null
null
null
nemo/collections/nlp/models/machine_translation/mt_enc_dec_bottleneck_model.py
Embodimentgeniuslm3/NeMo
5f5a9a0a1d0bcf28675841af3df9b08b56ae3203
[ "Apache-2.0" ]
1
2021-10-01T06:32:55.000Z
2021-10-01T06:32:55.000Z
# Copyright (c) 2020, NVIDIA CORPORATION. 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...
40.202353
142
0.631979
import itertools import json import random from multiprocessing import Value from pathlib import Path from typing import Dict, List, Optional, Union import numpy as np import torch import torch.distributed as dist import torch.utils.data as pt_data from omegaconf import DictConfig, ListConfig, OmegaConf from pytorch_...
true
true
f76cf0e195df48abfebbf166c9be025122887d55
1,325
py
Python
xwing/network/inbound.py
victorpoluceno/xwing
a6d2b9ddfa1bdf383cbf52d4dc81035222ebeefa
[ "ISC" ]
12
2016-10-15T16:46:24.000Z
2018-12-04T16:57:48.000Z
xwing/network/inbound.py
victorpoluceno/xwing
a6d2b9ddfa1bdf383cbf52d4dc81035222ebeefa
[ "ISC" ]
44
2016-04-21T21:59:37.000Z
2016-10-22T16:16:09.000Z
xwing/network/inbound.py
victorpoluceno/xwing
a6d2b9ddfa1bdf383cbf52d4dc81035222ebeefa
[ "ISC" ]
2
2016-08-22T04:25:21.000Z
2020-12-03T20:55:30.000Z
import asyncio import logging log = logging.getLogger(__name__) class Inbound: def __init__(self, loop, settings): self.loop = loop self.settings = settings self.inbox = asyncio.Queue(loop=self.loop) self.stop_event = asyncio.Event() def stop(self): self.stop_event.se...
31.547619
78
0.6
import asyncio import logging log = logging.getLogger(__name__) class Inbound: def __init__(self, loop, settings): self.loop = loop self.settings = settings self.inbox = asyncio.Queue(loop=self.loop) self.stop_event = asyncio.Event() def stop(self): self.stop_event.se...
true
true
f76cf134730ce5f2334d7bfa7a98846803daedcd
9,717
py
Python
megatron/model/gpt_model.py
stas00/Megatron-DeepSpeed
48dcee4a4dc07da855c35d3c563f8c2eec14c737
[ "MIT" ]
null
null
null
megatron/model/gpt_model.py
stas00/Megatron-DeepSpeed
48dcee4a4dc07da855c35d3c563f8c2eec14c737
[ "MIT" ]
1
2021-08-08T01:48:54.000Z
2021-08-08T16:43:31.000Z
megatron/model/gpt_model.py
stas00/Megatron-DeepSpeed
48dcee4a4dc07da855c35d3c563f8c2eec14c737
[ "MIT" ]
null
null
null
# coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
37.517375
100
0.61377
from functools import partial import torch from megatron import get_args from megatron import mpu from megatron.enums import AttnMaskType from .module import MegatronModule, fp32_to_float16 from .language_model import parallel_lm_logits from .language_model import get_language_model from .utils import init_method_n...
true
true
f76cf172be2fae768c6eb618a0e1aabf3cf5c239
130
py
Python
init_args_serializer/__init__.py
famura/init-args-serializer
e6ff3a852f261e9681a959fc35d12267c49e818a
[ "MIT" ]
1
2018-08-17T13:34:39.000Z
2018-08-17T13:34:39.000Z
init_args_serializer/__init__.py
famura/init-args-serializer
e6ff3a852f261e9681a959fc35d12267c49e818a
[ "MIT" ]
1
2021-05-16T18:15:19.000Z
2021-05-16T18:15:19.000Z
init_args_serializer/__init__.py
famura/init-args-serializer
e6ff3a852f261e9681a959fc35d12267c49e818a
[ "MIT" ]
1
2021-01-07T08:21:04.000Z
2021-01-07T08:21:04.000Z
from .function_arg_capture import capture_args from .serializable import Serializable __all__ = ["capture_args", "Serializable"]
26
46
0.823077
from .function_arg_capture import capture_args from .serializable import Serializable __all__ = ["capture_args", "Serializable"]
true
true
f76cf2a9852c7d5ee4f9f1a34c2eefee41c5c236
620
py
Python
release/datafiles/prvicons_update.py
mmendio/blender_test
194b44b361bba929ff86f2f65127c6ffd1666ddf
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/datafiles/prvicons_update.py
mmendio/blender_test
194b44b361bba929ff86f2f65127c6ffd1666ddf
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/datafiles/prvicons_update.py
mmendio/blender_test
194b44b361bba929ff86f2f65127c6ffd1666ddf
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2019-09-05T05:11:15.000Z
2019-09-05T05:11:15.000Z
#!/usr/bin/env python3 # This script updates icons from the SVG file import os import subprocess import sys BASEDIR = os.path.abspath(os.path.dirname(__file__)) inkscape_path = 'inkscape' if sys.platform == 'darwin': inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script' if os.path.exist...
23.846154
78
0.7
import os import subprocess import sys BASEDIR = os.path.abspath(os.path.dirname(__file__)) inkscape_path = 'inkscape' if sys.platform == 'darwin': inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script' if os.path.exists(inkscape_app_path): inkscape_path = inkscape_app_path cmd ...
true
true
f76cf328c7410e3373b3ccab0e82ac8f590579d4
6,426
py
Python
venv/lib/python3.6/site-packages/cachelib/memcached.py
gabrielhicks/flask-online-store
43b96522126c84ecb4c646ce7282ddd7f7d933fa
[ "MIT" ]
25
2020-10-03T07:18:44.000Z
2022-03-24T06:22:19.000Z
venv/lib/python3.8/site-packages/cachelib/memcached.py
alemux/flaskcms
2cc9660d6f65570e3c3732e1f2fb3a5faaba24c9
[ "MIT" ]
14
2020-10-03T07:24:50.000Z
2021-04-11T14:45:31.000Z
venv/lib/python3.8/site-packages/cachelib/memcached.py
alemux/flaskcms
2cc9660d6f65570e3c3732e1f2fb3a5faaba24c9
[ "MIT" ]
20
2020-10-03T09:49:24.000Z
2021-11-25T08:48:30.000Z
# -*- coding: utf-8 -*- import re from time import time from cachelib._compat import iteritems, to_native from cachelib.base import BaseCache, _items _test_memcached_key = re.compile(r'[^\x00-\x21\xff]{1,250}$').match class MemcachedCache(BaseCache): """A cache that uses memcached as backend. The first a...
34.363636
79
0.60831
import re from time import time from cachelib._compat import iteritems, to_native from cachelib.base import BaseCache, _items _test_memcached_key = re.compile(r'[^\x00-\x21\xff]{1,250}$').match class MemcachedCache(BaseCache): def __init__(self, servers=None, default_timeout=300, key_prefix=None): Ba...
true
true
f76cf3bb56d08d5909e64f6d907835a2f64a6b56
4,635
py
Python
examples/heightmap_terrain.py
szabolcsdombi/zengl
2c9c26784285f2f049fb5d6fc9da0ad65d32d52f
[ "MIT" ]
116
2021-10-31T17:24:18.000Z
2022-02-01T05:47:18.000Z
examples/heightmap_terrain.py
szabolcsdombi/zengl
2c9c26784285f2f049fb5d6fc9da0ad65d32d52f
[ "MIT" ]
9
2021-11-12T19:21:33.000Z
2022-01-20T09:48:31.000Z
examples/heightmap_terrain.py
szabolcsdombi/zengl
2c9c26784285f2f049fb5d6fc9da0ad65d32d52f
[ "MIT" ]
3
2021-11-12T18:55:05.000Z
2022-01-19T13:58:26.000Z
import imageio import numpy as np import zengl from skimage.filters import gaussian import assets from window import Window imageio.plugins.freeimage.download() img = imageio.imread(assets.get('Terrain002.exr')) # https://ambientcg.com/view?id=Terrain002 normals = np.zeros((512, 512, 3)) normals[:, 1:-1, 0] = img[:...
28.090909
102
0.548004
import imageio import numpy as np import zengl from skimage.filters import gaussian import assets from window import Window imageio.plugins.freeimage.download() img = imageio.imread(assets.get('Terrain002.exr')) normals = np.zeros((512, 512, 3)) normals[:, 1:-1, 0] = img[:, :-2, 0] - img[:, 2:, 0] normals[1:-1, :, ...
true
true
f76cf3e9cbe2a31002ffc94845274b53e9b7c42b
10,006
py
Python
src/sage/combinat/root_system/type_A.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
1
2021-03-15T21:45:56.000Z
2021-03-15T21:45:56.000Z
src/sage/combinat/root_system/type_A.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/root_system/type_A.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
null
null
null
""" Root system data for type A """ #***************************************************************************** # Copyright (C) 2008-2009 Daniel Bump # Copyright (C) 2008-2009 Justin Walker # Copyright (C) 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>, # # Distributed under the terms of th...
29.343109
124
0.487208
from sage.rings.all import ZZ from sage.combinat.root_system.root_lattice_realizations import RootLatticeRealizations from . import ambient_space class AmbientSpace(ambient_space.AmbientSpace): @classmethod def smallest_base_ring(cls, cartan_type=None): return ZZ def dimension(self): retu...
true
true
f76cf48878502b5a452d30628dfb8dc780d831d4
954
py
Python
tests/test_corpus_word_count.py
igormorgado/litcorpt
669c1852d42231f563fe0cdcf315f4fd66cf719b
[ "MIT" ]
null
null
null
tests/test_corpus_word_count.py
igormorgado/litcorpt
669c1852d42231f563fe0cdcf315f4fd66cf719b
[ "MIT" ]
null
null
null
tests/test_corpus_word_count.py
igormorgado/litcorpt
669c1852d42231f563fe0cdcf315f4fd66cf719b
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Some corpus statistics""" import random import litcorpt corpusdb = litcorpt.corpus_load() corpus = litcorpt.corpus(corpusdb) # Naive counting corpus_documents = len(corpus) # Expected: 5222 (in version 0.0.6) corpus_words = sum(True for document in corpus for word in document.split()) # E...
29.8125
88
0.615304
import random import litcorpt corpusdb = litcorpt.corpus_load() corpus = litcorpt.corpus(corpusdb) corpus_documents = len(corpus) corpus_words = sum(True for document in corpus for word in document.split()) corpus_unique_words = len(set(word for document in corpus for word in document.split())) books_all_entrie...
true
true
f76cf4bf436300f30d9ef08ebb0ef70f1027fe4b
13,008
py
Python
salt/states/pkgrepo.py
bbinet/salt
b525e65d18b3ed734cea9792878df235c9aba36f
[ "Apache-2.0" ]
null
null
null
salt/states/pkgrepo.py
bbinet/salt
b525e65d18b3ed734cea9792878df235c9aba36f
[ "Apache-2.0" ]
null
null
null
salt/states/pkgrepo.py
bbinet/salt
b525e65d18b3ed734cea9792878df235c9aba36f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Management of package repos =========================== Package repositories can be managed with the pkgrepo state: .. code-block:: yaml base: pkgrepo.managed: - humanname: CentOS-$releasever - Base - mirrorlist: http://mirrorlist.centos.org/?release=$releasever&...
35.736264
94
0.595403
from salt.modules.apt import _strip_uri from salt.state import STATE_INTERNAL_KEYWORDS as _STATE_INTERNAL_KEYWORDS def __virtual__(): return 'pkgrepo' if 'pkg.mod_repo' in __salt__ else False def managed(name, **kwargs): ret = {'name': name, 'changes': {}, 'result': None, '...
true
true
f76cf4c56b279b1f479a9a5cbfa772671537050d
2,141
py
Python
pgoapi/protos/POGOProtos/Enums/Platform_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
pgoapi/protos/POGOProtos/Enums/Platform_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
pgoapi/protos/POGOProtos/Enums/Platform_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Enums/Platform.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.prot...
29.328767
250
0.720224
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.pro...
true
true
f76cf4e7ed843b769dc9b6fd3337cf6abc59a410
690
py
Python
openprocurement/tender/cfaselectionua/adapters/serializable/value.py
tarasvaskiv/openprocurement.tender.cfaselectionua
6c4e1bcff13fd582e745d394c4f5fb0ffd76929e
[ "Apache-2.0" ]
null
null
null
openprocurement/tender/cfaselectionua/adapters/serializable/value.py
tarasvaskiv/openprocurement.tender.cfaselectionua
6c4e1bcff13fd582e745d394c4f5fb0ffd76929e
[ "Apache-2.0" ]
3
2019-02-06T14:19:42.000Z
2019-03-25T15:05:52.000Z
openprocurement/tender/cfaselectionua/adapters/serializable/value.py
tarasvaskiv/openprocurement.tender.cfaselectionua
6c4e1bcff13fd582e745d394c4f5fb0ffd76929e
[ "Apache-2.0" ]
1
2019-03-25T14:53:12.000Z
2019-03-25T14:53:12.000Z
# src/openprocurement.tender.belowthreshold/openprocurement/tender/belowthreshold/models.py:246 from openprocurement.api.adapters import Serializable class SerializableTenderMultilotValue(Serializable): serialized_name = "value" serialize_when_none = False def __call__(self, obj, *args, **kwargs): ...
46
126
0.669565
from openprocurement.api.adapters import Serializable class SerializableTenderMultilotValue(Serializable): serialized_name = "value" serialize_when_none = False def __call__(self, obj, *args, **kwargs): if all([i.value for i in obj.lots]): value_class = obj._fields['value'] ...
true
true
f76cf52d5db04c3d299e522d1f9e21a6726824f2
2,346
py
Python
pontoon/terminology/views.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
1,145
2015-05-15T01:08:16.000Z
2022-03-31T14:23:45.000Z
pontoon/terminology/views.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
1,365
2015-05-04T21:54:18.000Z
2022-03-30T16:53:49.000Z
pontoon/terminology/views.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
667
2015-05-04T21:33:45.000Z
2022-03-30T10:25:33.000Z
from django.http import JsonResponse, StreamingHttpResponse from django.shortcuts import get_object_or_404 from django.utils.datastructures import MultiValueDictKeyError from django.utils.decorators import method_decorator from django.views.decorators.http import condition from django.views.generic import ListView fro...
36.092308
87
0.711424
from django.http import JsonResponse, StreamingHttpResponse from django.shortcuts import get_object_or_404 from django.utils.datastructures import MultiValueDictKeyError from django.utils.decorators import method_decorator from django.views.decorators.http import condition from django.views.generic import ListView fro...
true
true
f76cf5ce5a5654399c5f97dc2ea6ee51bd51a737
51,280
py
Python
sphinx/builders/html.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
sphinx/builders/html.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
sphinx/builders/html.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
""" sphinx.builders.html ~~~~~~~~~~~~~~~~~~~~ Several HTML builders. :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import html import posixpath import re import sys import warnings from hashlib import md5 from os import path from typi...
41.861224
116
0.600254
import html import posixpath import re import sys import warnings from hashlib import md5 from os import path from typing import Any, Dict, IO, Iterable, Iterator, List, Set, Tuple from docutils import nodes from docutils.core import publish_parts from docutils.frontend import OptionParser from docutils.io import Doc...
true
true
f76cf5db4edae82a2499ab527cd39fcf695702d8
4,120
py
Python
python-rrmngmnt-1/rrmngmnt/storage.py
evy972/bug-hunter
07b130f5f7a02b72abc1783c3edcebd2e561aa19
[ "Apache-2.0" ]
null
null
null
python-rrmngmnt-1/rrmngmnt/storage.py
evy972/bug-hunter
07b130f5f7a02b72abc1783c3edcebd2e561aa19
[ "Apache-2.0" ]
null
null
null
python-rrmngmnt-1/rrmngmnt/storage.py
evy972/bug-hunter
07b130f5f7a02b72abc1783c3edcebd2e561aa19
[ "Apache-2.0" ]
null
null
null
import logging import shlex from rrmngmnt.service import Service logger = logging.getLogger(__name__) LV_CHANGE_CMD = 'lvchange -a %s %s/%s' class NFSService(Service): """ Storage management class to maintain NFS services """ def mount(self, source, target=None, opts=None): """ Moun...
31.937984
79
0.563592
import logging import shlex from rrmngmnt.service import Service logger = logging.getLogger(__name__) LV_CHANGE_CMD = 'lvchange -a %s %s/%s' class NFSService(Service): def mount(self, source, target=None, opts=None): target = '/tmp/mnt_point' if target is None else target cmd = ['mkdir', '-p', ...
true
true
f76cf5fdc8b65714f0db11d40e2a60b62cc19363
6,798
py
Python
tests/test_template_fetcher.py
oazmon/sceptre-template-fetcher
ff40fea4dcdb7b785b90b70426758475a8d09634
[ "Apache-2.0" ]
null
null
null
tests/test_template_fetcher.py
oazmon/sceptre-template-fetcher
ff40fea4dcdb7b785b90b70426758475a8d09634
[ "Apache-2.0" ]
null
null
null
tests/test_template_fetcher.py
oazmon/sceptre-template-fetcher
ff40fea4dcdb7b785b90b70426758475a8d09634
[ "Apache-2.0" ]
null
null
null
from mock import patch import pytest import yaml # When switch to new version change EnvironmentPathNotFoundError to: # from sceptre.exceptions import InvalidSceptreDirectoryError from sceptre.exceptions import EnvironmentPathNotFoundError from sceptre_template_fetcher.template_fetcher import TemplateFetcher class...
39.754386
71
0.684319
from mock import patch import pytest import yaml from sceptre.exceptions import EnvironmentPathNotFoundError from sceptre_template_fetcher.template_fetcher import TemplateFetcher class TestTemplateFetcher___init__(object): @patch("sceptre_template_fetcher.template_fetcher.FetcherMap") @patch("sceptre_temp...
true
true
f76cf631335bebcb4d6669d0e5ec35b381ede8d1
7,457
py
Python
app/controllers.py
Dragonite/CITS3403-Project
06b988caae25539fc513d137d8ebbd9a230177d4
[ "MIT" ]
1
2019-08-13T16:06:43.000Z
2019-08-13T16:06:43.000Z
app/controllers.py
Dragonite/CITS3403-Project
06b988caae25539fc513d137d8ebbd9a230177d4
[ "MIT" ]
null
null
null
app/controllers.py
Dragonite/CITS3403-Project
06b988caae25539fc513d137d8ebbd9a230177d4
[ "MIT" ]
2
2020-05-21T16:49:49.000Z
2020-05-25T08:22:27.000Z
from app.models import User, Poll from app import db from flask import render_template, flash, redirect, url_for, Markup, current_app from flask_login import login_required, current_user, login_user, logout_user from sqlalchemy.orm.attributes import flag_modified import sys from datetime import datetime import operator...
32.85022
106
0.587636
from app.models import User, Poll from app import db from flask import render_template, flash, redirect, url_for, Markup, current_app from flask_login import login_required, current_user, login_user, logout_user from sqlalchemy.orm.attributes import flag_modified import sys from datetime import datetime import operator...
true
true
f76cf798e2a378c1cb55bfc6e9024a6ea3b3984c
4,292
py
Python
chicksexer/api.py
funeconomist/chicksexer
b3f30f788ab602f5822539e4762d5a6329cb57c3
[ "MIT" ]
78
2017-05-25T01:29:20.000Z
2022-01-28T21:26:07.000Z
chicksexer/api.py
funeconomist/chicksexer
b3f30f788ab602f5822539e4762d5a6329cb57c3
[ "MIT" ]
13
2017-06-01T17:53:43.000Z
2021-08-25T14:50:32.000Z
chicksexer/api.py
funeconomist/chicksexer
b3f30f788ab602f5822539e4762d5a6329cb57c3
[ "MIT" ]
24
2018-05-17T22:11:57.000Z
2021-09-01T09:20:04.000Z
# -*- coding: UTF-8 -*- """ Define public APIs that are used by users here. """ import os import warnings from copy import copy from typing import Union import regex from chicksexer import PACKAGE_ROOT from ._encoder import UnseenCharacterException from .constant import POSITIVE_CLASS, NEGATIVE_CLASS, NEUTRAL_CLASS, ...
35.471074
100
0.704334
import os import warnings from copy import copy from typing import Union import regex from chicksexer import PACKAGE_ROOT from ._encoder import UnseenCharacterException from .constant import POSITIVE_CLASS, NEGATIVE_CLASS, NEUTRAL_CLASS, CLASS2DEFAULT_CUTOFF from .classifier import CharLSTM from .util import get_logg...
true
true
f76cf97d1f8c9f27764c4f267cde8e81931cdab6
18,514
py
Python
app_common/apptools/license_manager.py
KBIbiopharma/app_common
bd913e24741fb070aad058a0f90cbb2c64d8b106
[ "MIT" ]
2
2020-02-12T17:51:13.000Z
2021-05-03T05:36:15.000Z
app_common/apptools/license_manager.py
KBIbiopharma/app_common
bd913e24741fb070aad058a0f90cbb2c64d8b106
[ "MIT" ]
30
2020-02-04T21:38:58.000Z
2021-05-25T20:55:01.000Z
app_common/apptools/license_manager.py
KBIbiopharma/app_common
bd913e24741fb070aad058a0f90cbb2c64d8b106
[ "MIT" ]
null
null
null
""" License manager module. Define a license key and a license manager classes. """ from __future__ import print_function import datetime import hashlib from os.path import isfile, join import logging from six import PY3 from six import string_types from traits.api import Any, Bool, Date, HasStrictTraits, Instance, L...
36.301961
79
0.592417
from __future__ import print_function import datetime import hashlib from os.path import isfile, join import logging from six import PY3 from six import string_types from traits.api import Any, Bool, Date, HasStrictTraits, Instance, List, \ on_trait_change, Property, Str from traitsui.api import Item, Label, OKCa...
true
true
f76cf9c6cf588b9965f414f657d29a15fe159bc8
4,413
py
Python
docs/machine-example.py
ilil01/qdt
2921fb121f8c6e8cd29bd82fc4b591cb92abab78
[ "BSD-3-Clause" ]
29
2017-12-22T17:25:56.000Z
2022-03-03T08:27:01.000Z
docs/machine-example.py
ilil01/qdt
2921fb121f8c6e8cd29bd82fc4b591cb92abab78
[ "BSD-3-Clause" ]
33
2019-11-26T17:21:14.000Z
2021-08-23T03:28:12.000Z
docs/machine-example.py
ilil01/qdt
2921fb121f8c6e8cd29bd82fc4b591cb92abab78
[ "BSD-3-Clause" ]
7
2017-12-22T17:14:59.000Z
2022-01-30T19:52:03.000Z
obj0 = SystemBusNode() obj1 = SystemBusDeviceNode( qom_type = "TYPE_INTERRUPT_CONTROLLER", system_bus = obj0, var_base = "interrupt_controller" ) obj2 = SystemBusDeviceNode( qom_type = "TYPE_UART", system_bus = obj0, var_base = "uart" ) obj3 = DeviceNode( qom_type = "TYPE_CPU", var_ba...
18.012245
43
0.491956
obj0 = SystemBusNode() obj1 = SystemBusDeviceNode( qom_type = "TYPE_INTERRUPT_CONTROLLER", system_bus = obj0, var_base = "interrupt_controller" ) obj2 = SystemBusDeviceNode( qom_type = "TYPE_UART", system_bus = obj0, var_base = "uart" ) obj3 = DeviceNode( qom_type = "TYPE_CPU", var_ba...
true
true
f76cfa66082c3a323f3ed8f22684de277f273a67
2,028
py
Python
tensorflow/python/keras/__init__.py
ashuven63/tf_audio
bc561b81069001da01a1c7df4c16f6b9ba9a400b
[ "Apache-2.0" ]
1
2018-05-30T00:34:05.000Z
2018-05-30T00:34:05.000Z
tensorflow/python/keras/__init__.py
timctho/tensorflow
015c72eac3f4e448dd8ab852843e902771496532
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/__init__.py
timctho/tensorflow
015c72eac3f4e448dd8ab852843e902771496532
[ "Apache-2.0" ]
1
2021-11-16T19:59:48.000Z
2021-11-16T19:59:48.000Z
# -*- coding: utf-8 -*- # Copyright 2015 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 # # Un...
40.56
80
0.787475
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.keras import activations from tensorflow.python.keras import applications from tensorflow.python.keras import backend from tensorflow.python.keras import callbacks from tensorflow.python....
true
true
f76cfcf2a7770481790c320acc6995c11713792a
2,747
py
Python
tests/data_sources/gsp/test_gsp_pvlive.py
rohancalum/nowcasting_dataset
b88e31f4b381d97bb06274f357992108472a3f07
[ "MIT" ]
null
null
null
tests/data_sources/gsp/test_gsp_pvlive.py
rohancalum/nowcasting_dataset
b88e31f4b381d97bb06274f357992108472a3f07
[ "MIT" ]
null
null
null
tests/data_sources/gsp/test_gsp_pvlive.py
rohancalum/nowcasting_dataset
b88e31f4b381d97bb06274f357992108472a3f07
[ "MIT" ]
null
null
null
from datetime import datetime import pandas as pd import pytz from nowcasting_dataset.data_sources.gsp.pvlive import ( get_installed_capacity, load_pv_gsp_raw_data_from_pvlive, ) def test_load_gsp_raw_data_from_pvlive_one_gsp_one_day(): """ Test that one gsp system data can be loaded, just for one d...
30.865169
94
0.721878
from datetime import datetime import pandas as pd import pytz from nowcasting_dataset.data_sources.gsp.pvlive import ( get_installed_capacity, load_pv_gsp_raw_data_from_pvlive, ) def test_load_gsp_raw_data_from_pvlive_one_gsp_one_day(): start = datetime(2019, 1, 1, tzinfo=pytz.utc) end = datetime(2...
true
true
f76cfcf790e85cb06a80e8f7692cc4a38b36064c
16,479
py
Python
packages/python/plotly/plotly/validators/_volume.py
adehad/plotly.py
bca292530c400c61e8b7f8a6571262a9dde43ee3
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/_volume.py
adehad/plotly.py
bca292530c400c61e8b7f8a6571262a9dde43ee3
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/_volume.py
adehad/plotly.py
bca292530c400c61e8b7f8a6571262a9dde43ee3
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class VolumeValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="volume", parent_name="", **kwargs): super(VolumeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_c...
48.754438
71
0.545361
import _plotly_utils.basevalidators class VolumeValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="volume", parent_name="", **kwargs): super(VolumeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_c...
true
true
f76cfe2410ae1fe67e51bb4af0d6350ed980d402
2,340
py
Python
app/models/org.py
digitalsirkeith/lets-studEEE
ad7d8b29f5084bc13c3e46c6a1b4676077f747a7
[ "MIT" ]
null
null
null
app/models/org.py
digitalsirkeith/lets-studEEE
ad7d8b29f5084bc13c3e46c6a1b4676077f747a7
[ "MIT" ]
22
2020-04-01T08:16:06.000Z
2020-09-24T21:33:56.000Z
app/models/org.py
digitalsirkeith/lets-studEEE
ad7d8b29f5084bc13c3e46c6a1b4676077f747a7
[ "MIT" ]
null
null
null
import enum from app import db from app.models.user import User class OrganizationRank(enum.Enum): owner = 1 admin = 2 active_member = 3 inactive_member = 4 applicant = 5 class OrganizationStatus(enum.Enum): pending = 1 approved = 2 denied = 3 unverified = 4 class OrganizationUser...
32.5
116
0.686325
import enum from app import db from app.models.user import User class OrganizationRank(enum.Enum): owner = 1 admin = 2 active_member = 3 inactive_member = 4 applicant = 5 class OrganizationStatus(enum.Enum): pending = 1 approved = 2 denied = 3 unverified = 4 class OrganizationUser...
true
true
f76cfe95147a2c7d8db56428ab4fc9e3fc99167f
498
py
Python
src/collective/solr/tests/test_flare.py
IMIO/collective.solr
844219eb3968b34d2b83a7bd5f59340d676d149e
[ "ZPL-1.1" ]
15
2015-04-13T14:54:47.000Z
2022-01-17T09:18:00.000Z
src/collective/solr/tests/test_flare.py
IMIO/collective.solr
844219eb3968b34d2b83a7bd5f59340d676d149e
[ "ZPL-1.1" ]
198
2015-01-30T15:29:32.000Z
2022-03-22T10:39:31.000Z
src/collective/solr/tests/test_flare.py
adrianschulz/collective.solr
2d76fe01a02174d383fdc335d38ee52afa8bfa27
[ "ZPL-1.1" ]
34
2015-02-24T09:23:31.000Z
2022-03-01T02:31:39.000Z
from unittest import TestCase from collective.solr.parser import SolrFlare from collective.solr.flare import PloneFlare class FlareTests(TestCase): def testRelevanceFormatting(self): def score(**kw): return PloneFlare(SolrFlare(**kw)).data_record_normalized_score_ self.assertEqual(sc...
31.125
76
0.684739
from unittest import TestCase from collective.solr.parser import SolrFlare from collective.solr.flare import PloneFlare class FlareTests(TestCase): def testRelevanceFormatting(self): def score(**kw): return PloneFlare(SolrFlare(**kw)).data_record_normalized_score_ self.assertEqual(sc...
true
true
f76cfee417afad1e8c3b6624a7526b25acb2a888
988
py
Python
documents/math-minimal-distance-to-cubic-function/calcMinDist.py
RalfGuder/LaTeX-examples
a1bf9fe422969be1ca4674394ebd2170c07f7693
[ "MIT" ]
1,231
2015-01-07T04:04:25.000Z
2022-03-31T17:43:29.000Z
documents/math-minimal-distance-to-cubic-function/calcMinDist.py
DoubleL61/LaTeX-examples
cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c
[ "MIT" ]
5
2015-05-10T13:10:47.000Z
2021-05-02T21:28:49.000Z
documents/math-minimal-distance-to-cubic-function/calcMinDist.py
DoubleL61/LaTeX-examples
cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c
[ "MIT" ]
400
2015-01-05T06:22:18.000Z
2022-03-19T04:07:59.000Z
#!/usr/bin/env python import numpy class Point: """Represents a point in 2D.""" def __init__(self, x, y): self.x = x self.y = y def euclidean_dist(p1, p2): """Euclidean distance of two 2D points.""" from math import sqrt return sqrt((p1.x-p2.x)**2 + (p1.y-p2.y)**2) def get_min...
26
79
0.604251
import numpy class Point: def __init__(self, x, y): self.x = x self.y = y def euclidean_dist(p1, p2): from math import sqrt return sqrt((p1.x-p2.x)**2 + (p1.y-p2.y)**2) def get_min_dist(p1, precision=0.001, start_x=0, end_x=3): min_dist = -1 for x in numpy.arange(start_x, end_...
true
true
f76cffb5f55dde25823e3c13b663ef224566dd2a
2,580
py
Python
tests/test_tojunit.py
johng42/junit2html
b02601bf49baf781cf699205b2d9024250f96038
[ "MIT" ]
null
null
null
tests/test_tojunit.py
johng42/junit2html
b02601bf49baf781cf699205b2d9024250f96038
[ "MIT" ]
null
null
null
tests/test_tojunit.py
johng42/junit2html
b02601bf49baf781cf699205b2d9024250f96038
[ "MIT" ]
2
2020-02-03T05:20:54.000Z
2020-11-23T03:12:15.000Z
""" Tests for emitting junit xml """ from junit2htmlreport import parser, merge def test_case_tojunit_failed(): """ Test coverting a failed case to xml :return: """ testclass = parser.Class() testclass.name = "myclass" testcase = parser.Case() testcase.name = "mytest" testcase.tes...
28.988764
70
0.620155
from junit2htmlreport import parser, merge def test_case_tojunit_failed(): testclass = parser.Class() testclass.name = "myclass" testcase = parser.Case() testcase.name = "mytest" testcase.testclass = testclass testcase.failure = "bad" testcase.failure_msg = "failed message" result = ...
true
true
f76d0094398edc599157434ec50f89baba0f4aa5
7,861
py
Python
akshare/qhkc_web/qhkc_index.py
lisong996/akshare
1ee414cdecc2a492f2bb2f40d326a627c46dae2b
[ "MIT" ]
4,202
2019-10-01T08:55:03.000Z
2021-09-21T07:15:57.000Z
akshare/qhkc_web/qhkc_index.py
lisong996/akshare
1ee414cdecc2a492f2bb2f40d326a627c46dae2b
[ "MIT" ]
290
2019-11-21T06:23:30.000Z
2021-09-21T08:29:02.000Z
akshare/qhkc_web/qhkc_index.py
lisong996/akshare
1ee414cdecc2a492f2bb2f40d326a627c46dae2b
[ "MIT" ]
894
2019-10-09T08:14:01.000Z
2021-09-20T02:51:54.000Z
# -*- coding:utf-8 -*- #!/usr/bin/env python """ Date: 2019/9/30 13:58 Desc: 奇货可查网站目前已经商业化运营, 特提供奇货可查-指数数据接口, 方便您程序化调用 注:期货价格为收盘价; 现货价格来自网络; 基差=现货价格-期货价格; 基差率=(现货价格-期货价格)/现货价格 * 100 %. """ from typing import AnyStr import pandas as pd import requests from akshare.futures.cons import ( QHKC_INDEX_URL, QHKC_IND...
40.312821
106
0.559216
from typing import AnyStr import pandas as pd import requests from akshare.futures.cons import ( QHKC_INDEX_URL, QHKC_INDEX_TREND_URL, QHKC_INDEX_PROFIT_LOSS_URL, ) def get_qhkc_index(name: AnyStr = "奇货商品", url: AnyStr = QHKC_INDEX_URL): name_id_dict = {} qhkc_index_url = "https://qhkch.com/ajax...
true
true
f76d02e15035d37baae298244a9ce1e8ef0dc45f
314
py
Python
pylox/parser/scanner_test.py
sharadmv/pylox
55de867067be108ad833b8ceb5d470febc55e8b1
[ "MIT" ]
null
null
null
pylox/parser/scanner_test.py
sharadmv/pylox
55de867067be108ad833b8ceb5d470febc55e8b1
[ "MIT" ]
null
null
null
pylox/parser/scanner_test.py
sharadmv/pylox
55de867067be108ad833b8ceb5d470febc55e8b1
[ "MIT" ]
null
null
null
from absl.testing import absltest from pylox.parser import scanner Token = scanner.Token TokenType = scanner.TokenType scan = scanner.scan class ScannerTest(absltest.TestCase): def test_eof(self): assert list(scan('')) == [Token(TokenType.EOF, '', None, 1)] if __name__ == '__main__': absltest.main()
19.625
64
0.72293
from absl.testing import absltest from pylox.parser import scanner Token = scanner.Token TokenType = scanner.TokenType scan = scanner.scan class ScannerTest(absltest.TestCase): def test_eof(self): assert list(scan('')) == [Token(TokenType.EOF, '', None, 1)] if __name__ == '__main__': absltest.main()
true
true
f76d03733c096a949259cb322d9df64cd183abd1
2,413
py
Python
cuda_op/fused_act.py
AK391/anycost-gan
a827390a77d6360ed6902511de447a503584c63f
[ "MIT" ]
692
2021-03-05T02:05:40.000Z
2022-03-30T19:09:32.000Z
cuda_op/fused_act.py
AK391/anycost-gan
a827390a77d6360ed6902511de447a503584c63f
[ "MIT" ]
22
2021-03-11T02:56:59.000Z
2022-03-31T13:59:39.000Z
cuda_op/fused_act.py
AK391/anycost-gan
a827390a77d6360ed6902511de447a503584c63f
[ "MIT" ]
81
2021-03-05T06:03:39.000Z
2022-03-28T09:33:50.000Z
import os import torch from torch import nn from torch.autograd import Function from torch.utils.cpp_extension import load module_path = os.path.dirname(__file__) fused = load( 'fused', sources=[ os.path.join(module_path, 'fused_bias_act.cpp'), os.path.join(module_path, 'fused_bias_act_kernel...
27.735632
99
0.664318
import os import torch from torch import nn from torch.autograd import Function from torch.utils.cpp_extension import load module_path = os.path.dirname(__file__) fused = load( 'fused', sources=[ os.path.join(module_path, 'fused_bias_act.cpp'), os.path.join(module_path, 'fused_bias_act_kernel...
true
true
f76d03f0a8e1e5af5b25cbe471b2db8755a4d1df
88
py
Python
lib/solutions/SUM/sum_solution.py
DPNT-Sourcecode/CHK-quow01
12c02299738299975c8dfb9bcd916d16e109cf3a
[ "Apache-2.0" ]
null
null
null
lib/solutions/SUM/sum_solution.py
DPNT-Sourcecode/CHK-quow01
12c02299738299975c8dfb9bcd916d16e109cf3a
[ "Apache-2.0" ]
null
null
null
lib/solutions/SUM/sum_solution.py
DPNT-Sourcecode/CHK-quow01
12c02299738299975c8dfb9bcd916d16e109cf3a
[ "Apache-2.0" ]
null
null
null
# noinspection PyShadowingBuiltins,PyUnusedLocal def compute(x, y): return x + y
12.571429
48
0.727273
def compute(x, y): return x + y
true
true
f76d04071312ee96fbb5cf34eaffa3dc28919e8d
319,640
py
Python
torch/testing/_internal/common_methods_invocations.py
guolinke/pytorch
ad4b2571b605d2c2a7e288585469a06e79738eb9
[ "Intel" ]
null
null
null
torch/testing/_internal/common_methods_invocations.py
guolinke/pytorch
ad4b2571b605d2c2a7e288585469a06e79738eb9
[ "Intel" ]
null
null
null
torch/testing/_internal/common_methods_invocations.py
guolinke/pytorch
ad4b2571b605d2c2a7e288585469a06e79738eb9
[ "Intel" ]
null
null
null
from functools import reduce, wraps, partial from itertools import product from operator import mul import collections import operator import random import torch import numpy as np from torch._six import inf from torch.autograd import Variable import collections.abc from typing import List, Sequence, Tuple, Dict, Any...
47.878969
130
0.586219
from functools import reduce, wraps, partial from itertools import product from operator import mul import collections import operator import random import torch import numpy as np from torch._six import inf from torch.autograd import Variable import collections.abc from typing import List, Sequence, Tuple, Dict, Any...
true
true
f76d049fb7e358a2f4ddcb5e041658f96f09ad44
1,231
py
Python
zeeguu/core/test/rules/text_rule.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
8
2018-02-06T15:47:55.000Z
2021-05-26T15:24:49.000Z
zeeguu/core/test/rules/text_rule.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
57
2018-02-02T19:54:38.000Z
2021-07-15T15:45:15.000Z
zeeguu/core/test/rules/text_rule.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
13
2017-10-12T09:05:19.000Z
2020-02-19T09:38:01.000Z
from zeeguu.core.test.rules.article_rule import ArticleRule from zeeguu.core.test.rules.base_rule import BaseRule from zeeguu.core.test.rules.language_rule import LanguageRule from zeeguu.core.test.rules.url_rule import UrlRule from zeeguu.core.model.text import Text class TextRule(BaseRule): """A Rule testing cl...
29.309524
81
0.705118
from zeeguu.core.test.rules.article_rule import ArticleRule from zeeguu.core.test.rules.base_rule import BaseRule from zeeguu.core.test.rules.language_rule import LanguageRule from zeeguu.core.test.rules.url_rule import UrlRule from zeeguu.core.model.text import Text class TextRule(BaseRule): def __init__(self, ...
true
true
f76d0516c20a2b32ed351bba2a9eb22c93d8b412
4,833
py
Python
code/jetson/ComArduino2.py
manavjain99/oscar_buggy
b5dab0848f8667c9515bcfb078730cd0c4060000
[ "MIT" ]
null
null
null
code/jetson/ComArduino2.py
manavjain99/oscar_buggy
b5dab0848f8667c9515bcfb078730cd0c4060000
[ "MIT" ]
null
null
null
code/jetson/ComArduino2.py
manavjain99/oscar_buggy
b5dab0848f8667c9515bcfb078730cd0c4060000
[ "MIT" ]
null
null
null
# 19 July 2014 # in case any of this upsets Python purists it has been converted from an equivalent JRuby program # this is designed to work with ... ArduinoPC2.ino ... # the purpose of this program and the associated Arduino program is to demonstrate a system for sending # and receiving data between a PC and an ...
27.305085
109
0.624043
import logging def sendToArduino(sendStr): ser.write(sendStr) def recvFromArduino(): global startMarker, endMarker ck = "" x = "z" byteCount = -1 while ord(x) != startMarker: x = ser.read() while ord(x) != endMarker: if ord(x) != startMarker: ck = ck + (x.d...
true
true
f76d06263efa2cacbaea31d18d134e19b9a73c24
397
py
Python
epixdeploy/wsgi.py
koneb71/epixdeploy
910e34c7d86df3680885cfcf4647534d5eb72d95
[ "MIT" ]
null
null
null
epixdeploy/wsgi.py
koneb71/epixdeploy
910e34c7d86df3680885cfcf4647534d5eb72d95
[ "MIT" ]
null
null
null
epixdeploy/wsgi.py
koneb71/epixdeploy
910e34c7d86df3680885cfcf4647534d5eb72d95
[ "MIT" ]
null
null
null
""" WSGI config for epixdeploy project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'epixdeploy.settings') application = get_wsgi_application()
true
true
f76d06a070ffa9582d332380fb689ddb5d1ef491
37,248
py
Python
wiimote/nodes/wiimote_node.py
carlosvquezada/lg_ros_nodes
7560e99272d06ef5c80a5444131dad72c078a718
[ "Apache-2.0" ]
17
2020-03-13T00:10:28.000Z
2021-09-06T17:13:17.000Z
src/joystick_drivers/wiimote/nodes/wiimote_node.py
iamrajee/ros_catkin_ws
9ba11e14ceb7b20f886d8c90892b7f09b07e88d1
[ "MIT" ]
1
2020-03-12T08:10:07.000Z
2020-03-12T08:10:07.000Z
src/joystick_drivers/wiimote/nodes/wiimote_node.py
iamrajee/ros_catkin_ws
9ba11e14ceb7b20f886d8c90892b7f09b07e88d1
[ "MIT" ]
2
2020-03-13T09:05:32.000Z
2021-08-13T08:28:14.000Z
#!/usr/bin/python ################################################################################ # # File: wiimode_node.py # RCS: $Header: $ # Description: Top level ROS node that publishes Wiimote data # and allows Wiimote rumble/LED setting. # Author: Andreas Paepcke # Created:...
44.931242
251
0.593401
"""The wiimote_node broadcasts four topics, and listens to messages that control the Wiimote stick's rumble (vibration) and LEDs. Transmitted topics (@100Hz): o wiijoy Messages contain the accelerometer and gyro axis data, and all button states. o imu/data Messages contain the accelerometer ...
false
true
f76d0895e934dcb96a0c6f82cffd35ddd673783d
17,797
py
Python
src/connection-monitor-preview/azext_connection_monitor_preview/vendored_sdks/v2019_06_01/v2019_06_01/operations/_express_route_circuit_peerings_operations.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/connection-monitor-preview/azext_connection_monitor_preview/vendored_sdks/v2019_06_01/v2019_06_01/operations/_express_route_circuit_peerings_operations.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/connection-monitor-preview/azext_connection_monitor_preview/vendored_sdks/v2019_06_01/v2019_06_01/operations/_express_route_circuit_peerings_operations.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "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 ...
47.841398
195
0.676519
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling from .. import models class ExpressRouteCircuitPeeringsOperations(object): models = models de...
true
true
f76d0971e92739c4367e93c5f2cbc0b0d617c8ea
14,730
py
Python
st2common/tests/unit/test_virtualenvs.py
meghasfdc/st2
7079635e94942e7b44ae74daa6a7378a00e518d9
[ "Apache-2.0" ]
1
2020-10-26T03:26:17.000Z
2020-10-26T03:26:17.000Z
st2common/tests/unit/test_virtualenvs.py
meghasfdc/st2
7079635e94942e7b44ae74daa6a7378a00e518d9
[ "Apache-2.0" ]
1
2022-03-31T03:53:22.000Z
2022-03-31T03:53:22.000Z
st2common/tests/unit/test_virtualenvs.py
meghasfdc/st2
7079635e94942e7b44ae74daa6a7378a00e518d9
[ "Apache-2.0" ]
1
2019-10-11T14:42:28.000Z
2019-10-11T14:42:28.000Z
# Copyright 2019 Extreme Networks, Inc. # # 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 i...
42.819767
95
0.645214
from __future__ import absolute_import import os import tempfile import six import mock from oslo_config import cfg from st2tests import config from st2tests.base import CleanFilesTestCase import st2common.util.virtualenvs as virtualenvs from st2common.util.virtualenvs import install_requirement from st2common.util...
true
true
f76d0977ef2e30165de292c78e69b61f7a9daf6f
1,861
py
Python
prophyle/prophyle_assembler/tools/verify_output.py
karel-brinda/prophyle
6cc5b788380af57574ee1f08afdea18504dbdb30
[ "MIT" ]
16
2017-04-12T22:52:31.000Z
2017-11-24T00:06:24.000Z
prophyle/prophyle_assembler/tools/verify_output.py
karel-brinda/ProPhyle
6cc5b788380af57574ee1f08afdea18504dbdb30
[ "MIT" ]
89
2017-04-12T22:32:23.000Z
2017-12-11T15:23:09.000Z
prophyle/prophyle_assembler/tools/verify_output.py
karel-brinda/ProPhyle
6cc5b788380af57574ee1f08afdea18504dbdb30
[ "MIT" ]
2
2018-01-15T17:42:50.000Z
2021-02-07T07:53:43.000Z
#! /usr/bin/env python3 """A program to verify output of prophyle-assembler. Author: Karel Brinda <kbrinda@hsph.harvard.edu> Licence: MIT """ import sys import re from Bio import SeqIO in1_fn = sys.argv[1] in2_fn = sys.argv[2] out1_fn = sys.argv[3] out2_fn = sys.argv[4] inter_fn = sys.argv[5] k = int(sys.argv[6]) ...
24.813333
68
0.655562
import sys import re from Bio import SeqIO in1_fn = sys.argv[1] in2_fn = sys.argv[2] out1_fn = sys.argv[3] out2_fn = sys.argv[4] inter_fn = sys.argv[5] k = int(sys.argv[6]) reg_splitting = re.compile("[^ACGT]") comp_dict = { "A": "T", "C": "G", "G": "C", "T": "A", } def reverse_complement_str(dna)...
true
true
f76d097adb7a1aa9400c31ae022a9ed6b59d119e
4,611
py
Python
src/lib/datasets/dataset/fir.py
WJ-Lai/CenterNet-CentralNet
d28a8c2438244782ccdd6805e555558b2c01ff46
[ "MIT" ]
6
2019-12-24T07:13:18.000Z
2021-06-12T17:06:36.000Z
src/lib/datasets/dataset/fir.py
WJ-Lai/CenterNet-CentralNet
d28a8c2438244782ccdd6805e555558b2c01ff46
[ "MIT" ]
null
null
null
src/lib/datasets/dataset/fir.py
WJ-Lai/CenterNet-CentralNet
d28a8c2438244782ccdd6805e555558b2c01ff46
[ "MIT" ]
1
2021-03-15T02:38:44.000Z
2021-03-15T02:38:44.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pycocotools.coco as coco from pycocotools.cocoeval import COCOeval import numpy as np import json import os import torch.utils.data as data import src.config as cf sensor = 'fir' class FIR(data.Datase...
34.931818
78
0.615051
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pycocotools.coco as coco from pycocotools.cocoeval import COCOeval import numpy as np import json import os import torch.utils.data as data import src.config as cf sensor = 'fir' class FIR(data.Datase...
true
true
f76d0c53f680dc5c347158dd74800d5247414e98
12,308
py
Python
cgi-bin/hy/models.py
kloimhardt/bb-web
043493450c73620bc277cb0f93e08b897d45fbf5
[ "MIT" ]
67
2020-09-09T14:48:53.000Z
2022-03-17T02:00:24.000Z
cgi-bin/hy/models.py
kloimhardt/bb-web
043493450c73620bc277cb0f93e08b897d45fbf5
[ "MIT" ]
1
2020-09-29T07:19:48.000Z
2020-09-29T13:39:53.000Z
cgi-bin/hy/models.py
kloimhardt/bb-web
043493450c73620bc277cb0f93e08b897d45fbf5
[ "MIT" ]
null
null
null
# Copyright 2021 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. from __future__ import unicode_literals from contextlib import contextmanager from math import isnan, isinf from hy import _initialize_env_var from hy.errors import HyWrapperError from f...
28.757009
119
0.59766
from __future__ import unicode_literals from contextlib import contextmanager from math import isnan, isinf from hy import _initialize_env_var from hy.errors import HyWrapperError from fractions import Fraction from colorama import Fore PRETTY = True COLORED = _initialize_env_var('HY_COLORED_AST_OBJECTS', False) @c...
true
true
f76d0c76968bcbe88fe2b487f8d613ee5d34044c
5,919
py
Python
core/load_modules.py
sthagen/OWASP-Nettacker
a55edb310031ff12f6b1606b5457d263f83a0e41
[ "Apache-2.0" ]
1
2021-08-29T05:34:02.000Z
2021-08-29T05:34:02.000Z
core/load_modules.py
zer0x0/Nettacker
52c5e39a3fd0ab9842c7cf1a8be2de9f560c5d53
[ "Apache-2.0" ]
null
null
null
core/load_modules.py
zer0x0/Nettacker
52c5e39a3fd0ab9842c7cf1a8be2de9f560c5d53
[ "Apache-2.0" ]
1
2021-07-23T23:38:19.000Z
2021-07-23T23:38:19.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import lib import api import inspect from glob import glob from core.alert import messages from core.alert import info from core.alert import warn from core._die import __die_failure from core.compatible import is_windows from core.config import _core_...
33.822857
109
0.597905
import sys import os import lib import api import inspect from glob import glob from core.alert import messages from core.alert import info from core.alert import warn from core._die import __die_failure from core.compatible import is_windows from core.config import _core_config from core.config_builder import _core_d...
true
true
f76d0dff181a7744254015c5b0a6b012eeeca478
4,349
py
Python
git_map.py
bingoli/depot_tools
ac3e5e2deec4e487822f0b5f3d4774db885dc35a
[ "BSD-3-Clause" ]
1
2019-12-03T03:03:48.000Z
2019-12-03T03:03:48.000Z
git_map.py
bingoli/depot_tools
ac3e5e2deec4e487822f0b5f3d4774db885dc35a
[ "BSD-3-Clause" ]
null
null
null
git_map.py
bingoli/depot_tools
ac3e5e2deec4e487822f0b5f3d4774db885dc35a
[ "BSD-3-Clause" ]
1
2020-03-07T16:07:25.000Z
2020-03-07T16:07:25.000Z
#!/usr/bin/env python # 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. """ Enhances `git log --graph` view with information on commit branches + tags that point to them. Items are colorized as follows: *...
29.993103
80
0.610945
import sys import subprocess2 from git_common import current_branch, branches, tags, get_config_list, GIT_EXE from git_common import get_or_create_merge_base, root from third_party import colorama CYAN = colorama.Fore.CYAN GREEN = colorama.Fore.GREEN MAGENTA = colorama.Fore.MAGENTA RED = colorama.Fore.RED WHITE =...
true
true
f76d0e33e7dce6f8d4c705d09914695bc610b60d
2,863
py
Python
tests/python/gpu/test_extensions_gpu.py
GuyRobot/incubator-mxnet
9dcf71d8fe33f77ed316a95fcffaf1f7f883ff70
[ "Apache-2.0" ]
1
2017-09-14T09:25:16.000Z
2017-09-14T09:25:16.000Z
tests/python/gpu/test_extensions_gpu.py
GuyRobot/incubator-mxnet
9dcf71d8fe33f77ed316a95fcffaf1f7f883ff70
[ "Apache-2.0" ]
null
null
null
tests/python/gpu/test_extensions_gpu.py
GuyRobot/incubator-mxnet
9dcf71d8fe33f77ed316a95fcffaf1f7f883ff70
[ "Apache-2.0" ]
1
2021-11-11T23:06:42.000Z
2021-11-11T23:06:42.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.173333
94
0.68285
import os import platform import unittest import mxnet as mx import numpy as np from mxnet import nd from mxnet.gluon import nn from mxnet.base import MXNetError from mxnet.test_utils import download, is_cd_run, assert_almost_equal, default_context def check_platform(): return platform.machine() not in ['x86_64'...
true
true
f76d0e806c6dbdf8ddefe2008bc149b524697bd5
14,027
py
Python
onmt/tests/test_random_sampling.py
Linohong/OpenNMT_dialog
4a9e598afca780723d354d599815c320706af937
[ "MIT" ]
null
null
null
onmt/tests/test_random_sampling.py
Linohong/OpenNMT_dialog
4a9e598afca780723d354d599815c320706af937
[ "MIT" ]
null
null
null
onmt/tests/test_random_sampling.py
Linohong/OpenNMT_dialog
4a9e598afca780723d354d599815c320706af937
[ "MIT" ]
null
null
null
import unittest from onmt.translate.random_sampling import RandomSampling import torch class TestRandomSampling(unittest.TestCase): BATCH_SZ = 3 INP_SEQ_LEN = 53 DEAD_SCORE = -1e20 BLOCKED_SCORE = -10e20 def test_advance_with_repeats_gets_blocked(self): n_words = 100 ...
44.671975
80
0.461467
import unittest from onmt.translate.random_sampling import RandomSampling import torch class TestRandomSampling(unittest.TestCase): BATCH_SZ = 3 INP_SEQ_LEN = 53 DEAD_SCORE = -1e20 BLOCKED_SCORE = -10e20 def test_advance_with_repeats_gets_blocked(self): n_words = 100 ...
true
true
f76d0ee2a2effe0d71ba0f71a898534e1a433e3e
40,112
py
Python
tests/functional/test_package.py
nimboya/chalice
05b9ef226cc3134f92108134fc9f9e72127f3a65
[ "Apache-2.0" ]
null
null
null
tests/functional/test_package.py
nimboya/chalice
05b9ef226cc3134f92108134fc9f9e72127f3a65
[ "Apache-2.0" ]
null
null
null
tests/functional/test_package.py
nimboya/chalice
05b9ef226cc3134f92108134fc9f9e72127f3a65
[ "Apache-2.0" ]
null
null
null
import os import zipfile import tarfile import io from collections import defaultdict, namedtuple import pytest import mock from chalice.config import Config from chalice import Chalice from chalice import package from chalice.deploy.packager import PipRunner from chalice.deploy.packager import DependencyBuilder from...
39.095517
79
0.602887
import os import zipfile import tarfile import io from collections import defaultdict, namedtuple import pytest import mock from chalice.config import Config from chalice import Chalice from chalice import package from chalice.deploy.packager import PipRunner from chalice.deploy.packager import DependencyBuilder from...
true
true
f76d1025d8973b18d72039c712b327ab6ea2f3b0
127
py
Python
setup.py
SmartDataAnalytics/Bio-KEEN
680dffb6cd170b0f79ea09f0f730f0baa9ce73d4
[ "MIT" ]
38
2018-11-13T18:38:46.000Z
2021-12-14T12:32:48.000Z
setup.py
SmartDataAnalytics/Bio-KEEN
680dffb6cd170b0f79ea09f0f730f0baa9ce73d4
[ "MIT" ]
27
2018-10-08T09:01:59.000Z
2021-02-07T20:43:31.000Z
setup.py
SmartDataAnalytics/Bio-KEEN
680dffb6cd170b0f79ea09f0f730f0baa9ce73d4
[ "MIT" ]
2
2019-12-04T19:49:06.000Z
2020-07-03T01:25:09.000Z
# -*- coding: utf-8 -*- """Setup module for BioKEEN.""" import setuptools if __name__ == '__main__': setuptools.setup()
14.111111
31
0.629921
import setuptools if __name__ == '__main__': setuptools.setup()
true
true
f76d1036efb960696ca4193f6b4d1440b9fec1ae
6,704
py
Python
pointnet2/modules/feature_propagation.py
ltriess/pointnet2_keras
29be56161c8c772442b85b8fda300d10ff7fe7b3
[ "MIT" ]
2
2022-02-06T23:12:15.000Z
2022-03-28T06:48:52.000Z
pointnet2/modules/feature_propagation.py
ltriess/pointnet2_keras
29be56161c8c772442b85b8fda300d10ff7fe7b3
[ "MIT" ]
null
null
null
pointnet2/modules/feature_propagation.py
ltriess/pointnet2_keras
29be56161c8c772442b85b8fda300d10ff7fe7b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Larissa Triess" __email__ = "mail@triess.eu" from typing import List import tensorflow as tf from my_tf_ops.knn_op import k_nearest_neighbor_op as get_knn from ..layers.sample_and_group import group class FeaturePropagationModule(tf.keras.models.Model)...
38.090909
89
0.566527
__author__ = "Larissa Triess" __email__ = "mail@triess.eu" from typing import List import tensorflow as tf from my_tf_ops.knn_op import k_nearest_neighbor_op as get_knn from ..layers.sample_and_group import group class FeaturePropagationModule(tf.keras.models.Model): def __init__( self, mlp_units: L...
true
true
f76d10508d51335d71c018c4f307a10ea380f675
547
py
Python
model/complex_res_gate.py
ajyl/MIME
213729c934a2a06d2392113165e637cd32d328e1
[ "MIT" ]
28
2020-10-04T07:24:40.000Z
2022-02-26T08:23:48.000Z
model/complex_res_gate.py
suhasagg/MIME
7c34f3ae6dc8f8b9e6fb89b5bfa016fbaa445018
[ "MIT" ]
5
2020-12-06T15:12:22.000Z
2021-11-19T16:41:15.000Z
model/complex_res_gate.py
suhasagg/MIME
7c34f3ae6dc8f8b9e6fb89b5bfa016fbaa445018
[ "MIT" ]
10
2020-10-05T03:36:51.000Z
2022-02-20T23:11:54.000Z
import torch import torch.nn as nn class ComplexResGate(nn.Module): def __init__(self, embedding_size): super(ComplexResGate, self).__init__() self.fc1 = nn.Linear(2*embedding_size, 2*embedding_size) self.fc2 = nn.Linear(2*embedding_size, embedding_size) self.sigmoid = nn.Sigmoid()...
28.789474
64
0.621572
import torch import torch.nn as nn class ComplexResGate(nn.Module): def __init__(self, embedding_size): super(ComplexResGate, self).__init__() self.fc1 = nn.Linear(2*embedding_size, 2*embedding_size) self.fc2 = nn.Linear(2*embedding_size, embedding_size) self.sigmoid = nn.Sigmoid()...
true
true
f76d113c89ba67f31777c71161dd3f2a6c1b88ba
2,359
py
Python
reingold_actual.py
MrWater98/pymag-trees
9b4fba4fca09f7489f6cb1844d2db256377a4af9
[ "WTFPL" ]
149
2015-01-18T14:26:41.000Z
2022-03-27T12:39:38.000Z
src/treelayout/reingold_actual.py
EvanED/treelayout
a1250381ccbab005890f58ac4bfc28e2a1933433
[ "WTFPL" ]
5
2015-05-23T04:14:46.000Z
2021-11-04T14:19:06.000Z
src/treelayout/reingold_actual.py
EvanED/treelayout
a1250381ccbab005890f58ac4bfc28e2a1933433
[ "WTFPL" ]
33
2015-06-06T04:38:55.000Z
2022-01-11T19:56:14.000Z
class DrawTree(object): def __init__(self, tree, depth=-1): self.x = -1 self.y = depth self.tree = tree self.children = [DrawTree(t) for t in tree] self.thread = None self.offset = 0 def left(self): return self.thread or len(self.children) and self.child...
24.831579
75
0.509538
class DrawTree(object): def __init__(self, tree, depth=-1): self.x = -1 self.y = depth self.tree = tree self.children = [DrawTree(t) for t in tree] self.thread = None self.offset = 0 def left(self): return self.thread or len(self.children) and self.child...
true
true
f76d1319c1879cc46a77487f570f672aa936adab
295
py
Python
src/User/Presentation/Requests/UserAssignRoleRequest.py
DigiChanges/python-experience
3332d2c4d922a5eb302fa151582a4f63c668a570
[ "MIT" ]
null
null
null
src/User/Presentation/Requests/UserAssignRoleRequest.py
DigiChanges/python-experience
3332d2c4d922a5eb302fa151582a4f63c668a570
[ "MIT" ]
null
null
null
src/User/Presentation/Requests/UserAssignRoleRequest.py
DigiChanges/python-experience
3332d2c4d922a5eb302fa151582a4f63c668a570
[ "MIT" ]
null
null
null
from pydantic import BaseModel from src.User.InterfaceAdapters.Payloads.UserAssignRolePayload import UserAssignRolePayload from typing import List class UserAssignRoleRequest(UserAssignRolePayload, BaseModel): rolesId: List[str] = [] def getRolesId(self): return self.rolesId
26.818182
91
0.79661
from pydantic import BaseModel from src.User.InterfaceAdapters.Payloads.UserAssignRolePayload import UserAssignRolePayload from typing import List class UserAssignRoleRequest(UserAssignRolePayload, BaseModel): rolesId: List[str] = [] def getRolesId(self): return self.rolesId
true
true
f76d1372624fb8d6461fa8195c9effaf0a3ad6e1
6,475
py
Python
lte/gateway/python/integ_tests/s1aptests/test_no_attach_complete_with_mme_restart.py
Aitend/magma
74fe7b437335728219dfbe54733955bdd652eb60
[ "BSD-3-Clause" ]
849
2020-07-17T09:15:03.000Z
2022-03-31T17:11:52.000Z
lte/gateway/python/integ_tests/s1aptests/test_no_attach_complete_with_mme_restart.py
Aitend/magma
74fe7b437335728219dfbe54733955bdd652eb60
[ "BSD-3-Clause" ]
8,386
2020-06-23T23:35:30.000Z
2022-03-31T23:31:28.000Z
lte/gateway/python/integ_tests/s1aptests/test_no_attach_complete_with_mme_restart.py
Aitend/magma
74fe7b437335728219dfbe54733955bdd652eb60
[ "BSD-3-Clause" ]
406
2020-06-28T17:02:35.000Z
2022-03-31T22:03:55.000Z
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
35.576923
80
0.64
import time import unittest import s1ap_types import s1ap_wrapper from s1ap_utils import MagmadUtil class TestNoAttachCompleteWithMmeRestart(unittest.TestCase): def setUp(self): self._s1ap_wrapper = s1ap_wrapper.TestWrapper( stateless_mode=MagmadUtil.stateless_cmds.ENABLE, ) ...
true
true
f76d1378229e5c3d63194840aaba74d402c2833e
4,829
py
Python
keystone/tests/test_v3_os_revoke.py
raildo/keystone-1
2b26e45b72e03e64d18dc55cff7db24b7d1b4d5f
[ "Apache-2.0" ]
null
null
null
keystone/tests/test_v3_os_revoke.py
raildo/keystone-1
2b26e45b72e03e64d18dc55cff7db24b7d1b4d5f
[ "Apache-2.0" ]
null
null
null
keystone/tests/test_v3_os_revoke.py
raildo/keystone-1
2b26e45b72e03e64d18dc55cff7db24b7d1b4d5f
[ "Apache-2.0" ]
1
2021-08-29T16:53:06.000Z
2021-08-29T16:53:06.000Z
# 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 # distributed under t...
38.632
79
0.670946
import datetime import uuid import six from keystone.common import dependency from keystone.contrib.revoke import model from keystone.openstack.common import timeutils from keystone.tests import test_v3 from keystone import token def _future_time_string(): expire_delta = datetime.timedelta(seconds=1000) fu...
true
true
f76d148120cb5591805a41bee47e10020f741547
1,575
py
Python
venv/Lib/site-packages/keystoneauth1/tests/unit/extras/kerberos/base.py
prasoon-uta/IBM-coud-storage
82a6876316715efbd0b492d0d467dde0ab26a56b
[ "Apache-2.0" ]
48
2015-05-02T16:19:10.000Z
2021-12-17T19:01:17.000Z
venv/Lib/site-packages/keystoneauth1/tests/unit/extras/kerberos/base.py
prasoon-uta/IBM-coud-storage
82a6876316715efbd0b492d0d467dde0ab26a56b
[ "Apache-2.0" ]
1
2019-12-04T13:48:10.000Z
2019-12-04T13:48:10.000Z
venv/Lib/site-packages/keystoneauth1/tests/unit/extras/kerberos/base.py
prasoon-uta/IBM-coud-storage
82a6876316715efbd0b492d0d467dde0ab26a56b
[ "Apache-2.0" ]
46
2015-05-23T14:04:35.000Z
2022-02-17T12:33:50.000Z
# Copyright 2010-2011 OpenStack Foundation # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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/licens...
35
79
0.687619
from keystoneauth1.tests.unit.extras.kerberos import utils from keystoneauth1.tests.unit import utils as test_utils REQUEST = {'auth': {'identity': {'methods': ['kerberos'], 'kerberos': {}}}} class TestCase(test_utils.TestCase): TEST_V3_URL = test_utils.TestCase.TEST_ROOT_URL ...
true
true
f76d14a2f3c36c3e099c6f3a61837b5a77e14a59
3,208
py
Python
_pytest/pastebin.py
nicoddemus/repo-test
42e745678046ab65e4126dde20dd52ce82bd2c06
[ "MIT" ]
null
null
null
_pytest/pastebin.py
nicoddemus/repo-test
42e745678046ab65e4126dde20dd52ce82bd2c06
[ "MIT" ]
null
null
null
_pytest/pastebin.py
nicoddemus/repo-test
42e745678046ab65e4126dde20dd52ce82bd2c06
[ "MIT" ]
null
null
null
""" submit failure or test session information to a pastebin service. """ import pytest import py, sys import tempfile def pytest_addoption(parser): group = parser.getgroup("terminal reporting") group._addoption('--pastebin', metavar="mode", action='store', dest="pastebin", default=None, choic...
36.454545
79
0.628741
import pytest import py, sys import tempfile def pytest_addoption(parser): group = parser.getgroup("terminal reporting") group._addoption('--pastebin', metavar="mode", action='store', dest="pastebin", default=None, choices=['failed', 'all'], help="send failed|all info to bpaste.net pas...
true
true
f76d17b6168a6ba0b2eceabc0fe4d3adc2f34145
1,571
py
Python
DQN/ibp.py
rohitsanjay/radial_rl
5daa30ec57319db8d0dd6bee10cf0f41832ef0f3
[ "Apache-2.0" ]
null
null
null
DQN/ibp.py
rohitsanjay/radial_rl
5daa30ec57319db8d0dd6bee10cf0f41832ef0f3
[ "Apache-2.0" ]
null
null
null
DQN/ibp.py
rohitsanjay/radial_rl
5daa30ec57319db8d0dd6bee10cf0f41832ef0f3
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F def initial_bounds(x0, epsilon): ''' x0 = input, b x c x h x w ''' upper = x0+epsilon lower = x0-epsilon return upper, lower def weighted_bound(layer, prev_upper, prev_lower): prev_mu = (prev_upper + prev_lower)/2 prev_...
31.42
97
0.645449
import torch import torch.nn as nn import torch.nn.functional as F def initial_bounds(x0, epsilon): upper = x0+epsilon lower = x0-epsilon return upper, lower def weighted_bound(layer, prev_upper, prev_lower): prev_mu = (prev_upper + prev_lower)/2 prev_r = (prev_upper - prev_lower)/2 mu = layer...
true
true
f76d17b7c45419aedc9ac5df6fb5d6bea4b33cf4
26,707
py
Python
genepi/tools/randomized_l1.py
dn070017/GenEpi
e6ee35e0b024408b80b75c25dd0b63c77a6e0339
[ "MIT" ]
21
2018-08-06T07:09:12.000Z
2021-11-25T18:03:10.000Z
genepi/tools/randomized_l1.py
dn070017/GenEpi
e6ee35e0b024408b80b75c25dd0b63c77a6e0339
[ "MIT" ]
7
2019-03-25T14:40:28.000Z
2022-02-20T01:54:49.000Z
genepi/tools/randomized_l1.py
dn070017/GenEpi
e6ee35e0b024408b80b75c25dd0b63c77a6e0339
[ "MIT" ]
10
2018-08-06T07:09:14.000Z
2021-11-28T03:09:48.000Z
""" Note: This script is imported from scikit-learn 0.20.X, because scikit-learn 0.21.0 is no longer supported these functions """ """ Randomized Lasso/Logistic: feature selection based on Lasso and sparse Logistic Regression """ # Author: Gael Varoquaux, Alexandre Gramfort # # License: BSD 3 clause import itertools...
43.355519
96
0.630621
import itertools from abc import ABCMeta, abstractmethod import numpy as np from scipy.sparse import issparse from scipy import sparse from scipy.interpolate import interp1d from sklearn.linear_model.base import _preprocess_data from sklearn.base import BaseEstimator from sklearn.utils import Memory, Parallel, del...
true
true
f76d18222417865251f159ad29b4f7fd83de4885
5,217
py
Python
repos/system_upgrade/common/actors/rpmscanner/libraries/rpmscanner.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
21
2018-11-20T15:58:39.000Z
2022-03-15T19:57:24.000Z
repos/system_upgrade/common/actors/rpmscanner/libraries/rpmscanner.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
732
2018-11-21T18:33:26.000Z
2022-03-31T16:16:24.000Z
repos/system_upgrade/common/actors/rpmscanner/libraries/rpmscanner.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
85
2018-11-20T17:55:00.000Z
2022-03-29T09:40:31.000Z
import warnings from leapp.exceptions import StopActorExecutionError from leapp.libraries.stdlib import api from leapp.libraries.common import rpms from leapp.models import InstalledRPM, RPM no_yum = False no_yum_warning_msg = "package `yum` is unavailable" try: import yum except ImportError: no_yum = True ...
33.658065
91
0.646157
import warnings from leapp.exceptions import StopActorExecutionError from leapp.libraries.stdlib import api from leapp.libraries.common import rpms from leapp.models import InstalledRPM, RPM no_yum = False no_yum_warning_msg = "package `yum` is unavailable" try: import yum except ImportError: no_yum = True ...
true
true
f76d187aa60e6dddfa35ed201a1bb95d2307bdf0
27,074
py
Python
Binance Detect Moonings.py
JeganathanK/Binance-volatility-trading-bot
a3326612daeecd986a0b8face34c540573849e0c
[ "MIT" ]
6
2021-05-30T04:53:13.000Z
2021-06-08T12:02:43.000Z
Binance Detect Moonings.py
JeganathanK/Binance-volatility-trading-bot
a3326612daeecd986a0b8face34c540573849e0c
[ "MIT" ]
3
2021-06-05T13:25:01.000Z
2021-06-05T13:42:05.000Z
Binance Detect Moonings.py
JeganathanK/Binance-volatility-trading-bot
a3326612daeecd986a0b8face34c540573849e0c
[ "MIT" ]
5
2021-05-29T16:38:37.000Z
2021-06-03T20:01:55.000Z
""" Disclaimer All investment strategies and investments involve risk of loss. Nothing contained in this program, scripts, code or repositoy should be construed as investment advice.Any reference to an investment's past or potential performance is not, and should not be construed as, a recommendation or as a guarantee...
38.294201
333
0.65188
import os import sys import threading import importlib import glob from colorama import init init() from binance.client import Client from binance.exceptions import BinanceAPIException from datetime import date, datetime, timedelta import time from itertools import count import json from helpers.parameters i...
true
true
f76d189e44206ae6654cdf22855cb2ddb47034a8
1,009
py
Python
har2lilua/tests/tests.py
Griatch/har2lilua
a5313ddfcc15efa19e58aa327a8c78b8b808e940
[ "BSD-2-Clause" ]
null
null
null
har2lilua/tests/tests.py
Griatch/har2lilua
a5313ddfcc15efa19e58aa327a8c78b8b808e940
[ "BSD-2-Clause" ]
null
null
null
har2lilua/tests/tests.py
Griatch/har2lilua
a5313ddfcc15efa19e58aa327a8c78b8b808e940
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ har2lilua Tests """ from __future__ import unicode_literals from io import open import unittest from har2lilua import har2lilua def _read_testfiles(): with open("test.har", "r", encoding="utf-8") as fil: harstring = fil.read() with open("test.lua", "r", encoding="utf-8") as...
30.575758
70
0.631318
from __future__ import unicode_literals from io import open import unittest from har2lilua import har2lilua def _read_testfiles(): with open("test.har", "r", encoding="utf-8") as fil: harstring = fil.read() with open("test.lua", "r", encoding="utf-8") as fil: luastring = fil.read() return ...
true
true
f76d195c5ed26710294f1f11cceb84c069c30bde
4,254
py
Python
snafu/oslat_wrapper/trigger_oslat.py
kdvalin/benchmark-wrapper
a47ddabb4a5793d3061c74e18427133697263d77
[ "Apache-2.0" ]
null
null
null
snafu/oslat_wrapper/trigger_oslat.py
kdvalin/benchmark-wrapper
a47ddabb4a5793d3061c74e18427133697263d77
[ "Apache-2.0" ]
null
null
null
snafu/oslat_wrapper/trigger_oslat.py
kdvalin/benchmark-wrapper
a47ddabb4a5793d3061c74e18427133697263d77
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # 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, sof...
39.757009
104
0.592149
import os import re import subprocess import datetime import logging logger = logging.getLogger("snafu") class Trigger_oslat: def __init__(self, args): self.uuid = args.uuid self.user = args.user self.path = args.path self.samples = args.samples self.duration = args.dura...
true
true
f76d1a6d5f8e70c0b6a120113b1c8d803b9b64d1
1,819
py
Python
models/fedsp/mnist/MNIST.py
tdye24/LightningFL
48bb4a452082411e051cdb3a2e98ede6bbc91bbf
[ "Apache-2.0" ]
null
null
null
models/fedsp/mnist/MNIST.py
tdye24/LightningFL
48bb4a452082411e051cdb3a2e98ede6bbc91bbf
[ "Apache-2.0" ]
null
null
null
models/fedsp/mnist/MNIST.py
tdye24/LightningFL
48bb4a452082411e051cdb3a2e98ede6bbc91bbf
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn class MNIST(nn.Module): def __init__(self): super(MNIST, self).__init__() self.shared_encoder = torch.nn.Sequential( nn.Conv2d(in_channels=1, out_channels=32, kernel_size=5, padding=2), nn.ReLU(inplace=True), nn.MaxPo...
33.072727
87
0.560748
import torch import torch.nn as nn class MNIST(nn.Module): def __init__(self): super(MNIST, self).__init__() self.shared_encoder = torch.nn.Sequential( nn.Conv2d(in_channels=1, out_channels=32, kernel_size=5, padding=2), nn.ReLU(inplace=True), nn.MaxPo...
true
true
f76d1b5db59d80de21a47d04624aeec4780a7922
10,818
py
Python
idcmanager_sdk/api/idcrack/idcrack_client.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
idcmanager_sdk/api/idcrack/idcrack_client.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
idcmanager_sdk/api/idcrack/idcrack_client.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import idcmanager_sdk.model.idcmanager.user_setting_pb2 import google.protobuf.empty_pb2 import idcmanager_sdk.api.idcrack.list_pb2 import idcmanager_sdk.api.idcrack.list_device_type_pb2 import idcmanager_sdk.api.idcrack.list_user_setting_pb2 import idcmanager_sdk.api...
38.361702
180
0.630246
import os import sys import idcmanager_sdk.model.idcmanager.user_setting_pb2 import google.protobuf.empty_pb2 import idcmanager_sdk.api.idcrack.list_pb2 import idcmanager_sdk.api.idcrack.list_device_type_pb2 import idcmanager_sdk.api.idcrack.list_user_setting_pb2 import idcmanager_sdk.api.idcrack.list_v2_pb2 im...
true
true
f76d1b79c86262eb5c452c2932cdece1c25460e6
7,593
py
Python
rustici_software_cloud_v2/models/user_invitation_schema.py
RusticiSoftware/scormcloud-api-v2-client-python
04e2cce304a336caf492c3330c706840815c4abe
[ "Apache-2.0" ]
2
2020-07-21T10:33:39.000Z
2021-08-17T21:40:13.000Z
rustici_software_cloud_v2/models/user_invitation_schema.py
RusticiSoftware/scormcloud-api-v2-client-python
04e2cce304a336caf492c3330c706840815c4abe
[ "Apache-2.0" ]
2
2020-10-22T20:58:19.000Z
2020-10-27T17:25:28.000Z
rustici_software_cloud_v2/models/user_invitation_schema.py
RusticiSoftware/scormcloud-api-v2-client-python
04e2cce304a336caf492c3330c706840815c4abe
[ "Apache-2.0" ]
1
2020-10-15T17:11:15.000Z
2020-10-15T17:11:15.000Z
# coding: utf-8 """ SCORM Cloud Rest API REST API used for SCORM Cloud integrations. # noqa: E501 OpenAPI spec version: 2.0 Contact: systems@rusticisoftware.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class UserIn...
30.372
138
0.608323
import pprint import re import six class UserInvitationSchema(object): swagger_types = { 'email': 'str', 'url': 'str', 'is_started': 'bool', 'updated': 'datetime', 'registration_id': 'str', 'registration_report': 'UserInvitationSchemaRegistrationReport' } ...
true
true
f76d1e9ce751d5ab6c655fef4427108b0c686650
4,515
py
Python
src/utils/bleu_score.py
viewsetting/GPT2
0ee3b5c327ccbbb306899c3f3f5d258c259c348e
[ "Apache-2.0" ]
4
2021-01-02T09:42:42.000Z
2021-01-11T12:24:34.000Z
src/utils/bleu_score.py
viewsetting/MindSpore-GPT2
0ee3b5c327ccbbb306899c3f3f5d258c259c348e
[ "Apache-2.0" ]
null
null
null
src/utils/bleu_score.py
viewsetting/MindSpore-GPT2
0ee3b5c327ccbbb306899c3f3f5d258c259c348e
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37.008197
103
0.66711
import collections import math def _get_ngrams(segment, max_order): ngram_counts = collections.Counter() for order in range(1, max_order + 1): for i in range(0, len(segment) - order + 1): ngram = tuple(segment[i:i+order]) ngram_counts[ngram] += 1 return ngram_counts de...
true
true
f76d1f62dd29892e9ddc9aca123c1b03884dc3b3
682
py
Python
src/dispatch/alembic/versions/85bff3e51dc4_.py
mclueppers/dispatch
b9e524ca10e5b2e95490b388db61c58e79e975e2
[ "Apache-2.0" ]
1
2022-02-23T02:42:10.000Z
2022-02-23T02:42:10.000Z
src/dispatch/alembic/versions/85bff3e51dc4_.py
mclueppers/dispatch
b9e524ca10e5b2e95490b388db61c58e79e975e2
[ "Apache-2.0" ]
1
2021-04-08T10:03:36.000Z
2021-04-08T10:03:36.000Z
src/dispatch/alembic/versions/85bff3e51dc4_.py
AlexaKelley/dispatch
b46d8416a0e4ec9badb76f6f3d1765c6093203f8
[ "Apache-2.0" ]
1
2021-04-08T10:02:57.000Z
2021-04-08T10:02:57.000Z
"""Adds a discoverable field to terms. Revision ID: 85bff3e51dc4 Revises: ab9879051d6c Create Date: 2020-07-09 09:54:09.343487 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "85bff3e51dc4" down_revision = "ab9879051d6c" branch_labels = None depends_on = None ...
23.517241
81
0.696481
from alembic import op import sqlalchemy as sa revision = "85bff3e51dc4" down_revision = "ab9879051d6c" branch_labels = None depends_on = None def upgrade(): op.add_column("term", sa.Column("discoverable", sa.Boolean(), nullable=True)) def downgrade(): op.drop_column("term", "discoverable") ...
true
true
f76d1f9600724da05ba49a5206185d8bdda27852
89,814
py
Python
sekoia.io/lib/stix2patterns/v21/grammars/STIXPatternParser.py
cdc-eba/SEKOIA.IO-for-Splunk
329fefe08bba6c90a90dcfaa3ab5d9c4d1c8670f
[ "Apache-2.0" ]
3
2021-01-06T06:14:56.000Z
2021-01-29T16:01:20.000Z
sekoia.io/lib/stix2patterns/v21/grammars/STIXPatternParser.py
cdc-eba/SEKOIA.IO-for-Splunk
329fefe08bba6c90a90dcfaa3ab5d9c4d1c8670f
[ "Apache-2.0" ]
3
2021-06-10T15:05:26.000Z
2021-11-10T11:31:08.000Z
sekoia.io/lib/stix2patterns/v21/grammars/STIXPatternParser.py
cdc-eba/SEKOIA.IO-for-Splunk
329fefe08bba6c90a90dcfaa3ab5d9c4d1c8670f
[ "Apache-2.0" ]
1
2021-06-22T12:25:05.000Z
2021-06-22T12:25:05.000Z
# Generated from STIXPattern.g4 by ANTLR 4.8 # encoding: utf-8 from __future__ import print_function from antlr4 import * from io import StringIO import sys def serializedATN(): with StringIO() as buf: buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3") buf.write(u"8\u00eb\4\2\t\2\4...
39.461336
399
0.606041
from __future__ import print_function from antlr4 import * from io import StringIO import sys def serializedATN(): with StringIO() as buf: buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3") buf.write(u"8\u00eb\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t") buf.write(u"\7\4...
true
true
f76d20392cacdd8b5dce012a65c5806bdd000ef1
403
py
Python
danniesMovies/asgi.py
beedev-services/danniesMovies
15a3b3729fc243574126a2dd6ef9acf549ad0581
[ "MIT" ]
null
null
null
danniesMovies/asgi.py
beedev-services/danniesMovies
15a3b3729fc243574126a2dd6ef9acf549ad0581
[ "MIT" ]
null
null
null
danniesMovies/asgi.py
beedev-services/danniesMovies
15a3b3729fc243574126a2dd6ef9acf549ad0581
[ "MIT" ]
null
null
null
""" ASGI config for danniesMovies project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO...
23.705882
78
0.791563
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'danniesMovies.settings') application = get_asgi_application()
true
true
f76d20e23b7d8e7e33418c7b1135ad54ea35df8b
35,049
py
Python
cars/steps/rasterization.py
fchapoton/cars
c145e12c8b984d5c496c29cff474628044f6216e
[ "Apache-2.0" ]
null
null
null
cars/steps/rasterization.py
fchapoton/cars
c145e12c8b984d5c496c29cff474628044f6216e
[ "Apache-2.0" ]
null
null
null
cars/steps/rasterization.py
fchapoton/cars
c145e12c8b984d5c496c29cff474628044f6216e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf8 # # Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES). # # This file is part of CARS # (see https://github.com/CNES/cars). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
32.971778
80
0.65377
# # This file is part of CARS # (see https://github.com/CNES/cars). # # 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 a...
true
true
f76d2152eec2691c649d0850422fb3d9ea729a0b
4,777
py
Python
rllab/algos/vpg.py
ICRA-2018/gcg
b1027f7e65660d3782f927119f6a75394c30cc47
[ "MIT" ]
1,838
2017-08-10T04:19:28.000Z
2022-03-29T07:41:19.000Z
rllab/algos/vpg.py
ICRA-2018/gcg
b1027f7e65660d3782f927119f6a75394c30cc47
[ "MIT" ]
120
2016-10-05T09:16:16.000Z
2017-07-27T22:57:31.000Z
rllab/algos/vpg.py
ICRA-2018/gcg
b1027f7e65660d3782f927119f6a75394c30cc47
[ "MIT" ]
498
2017-08-16T03:34:28.000Z
2022-03-31T04:41:32.000Z
import theano.tensor as TT import theano from rllab.misc import logger from rllab.misc.overrides import overrides from rllab.misc import ext from rllab.algos.batch_polopt import BatchPolopt from rllab.optimizers.first_order_optimizer import FirstOrderOptimizer from rllab.core.serializable import Serializable class VP...
34.121429
90
0.601423
import theano.tensor as TT import theano from rllab.misc import logger from rllab.misc.overrides import overrides from rllab.misc import ext from rllab.algos.batch_polopt import BatchPolopt from rllab.optimizers.first_order_optimizer import FirstOrderOptimizer from rllab.core.serializable import Serializable class VP...
true
true
f76d2179be46597200adc649a3296be5cf3735c2
1,943
py
Python
data_structures/Project_Show_me_Data_Structures/active_directory.py
severian5it/udacity_dsa
e47f27b0179961d6107fe46a236ac7d887fe6816
[ "MIT" ]
null
null
null
data_structures/Project_Show_me_Data_Structures/active_directory.py
severian5it/udacity_dsa
e47f27b0179961d6107fe46a236ac7d887fe6816
[ "MIT" ]
null
null
null
data_structures/Project_Show_me_Data_Structures/active_directory.py
severian5it/udacity_dsa
e47f27b0179961d6107fe46a236ac7d887fe6816
[ "MIT" ]
null
null
null
class Group(object): def __init__(self, _name): self.name = _name self.groups = [] self.users = [] def add_group(self, group): self.groups.append(group) def add_user(self, user): self.users.append(user) def get_groups(self): return self.groups def ...
29
116
0.65157
class Group(object): def __init__(self, _name): self.name = _name self.groups = [] self.users = [] def add_group(self, group): self.groups.append(group) def add_user(self, user): self.users.append(user) def get_groups(self): return self.groups def ...
true
true
f76d2223cd5059f592b20d010e99107af21df7c5
1,912
py
Python
contrib/devtools/check-doc.py
CryptoLover705/x6coin
37d3905de53424ac6cc5c1ab930f70a7e14b9e9f
[ "MIT" ]
1
2019-07-10T22:15:31.000Z
2019-07-10T22:15:31.000Z
contrib/devtools/check-doc.py
CryptoLover705/x6coin
37d3905de53424ac6cc5c1ab930f70a7e14b9e9f
[ "MIT" ]
null
null
null
contrib/devtools/check-doc.py
CryptoLover705/x6coin
37d3905de53424ac6cc5c1ab930f70a7e14b9e9f
[ "MIT" ]
1
2020-01-31T08:59:57.000Z
2020-01-31T08:59:57.000Z
#!/usr/bin/env python # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' This checks if all command line args are documented. Return value is 0 to indicate no error. Author: @...
42.488889
301
0.690377
''' This checks if all command line args are documented. Return value is 0 to indicate no error. Author: @MarcoFalke ''' from subprocess import check_output import re FOLDER_GREP = 'src' FOLDER_TEST = 'src/test/' CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/%s' % FOLDER_GREP CMD_GREP_ARGS = r"egrep -r -I '(map(Mu...
false
true
f76d22b8282a929f909b3c8b8358ef2b1e0d0dad
456
py
Python
notification/migrations/0004_notifications_tweet_time.py
jkube38/twitterclone
f25f2cdd81dcb0e2f12e8511c31f46cd0f1ea40f
[ "MIT" ]
null
null
null
notification/migrations/0004_notifications_tweet_time.py
jkube38/twitterclone
f25f2cdd81dcb0e2f12e8511c31f46cd0f1ea40f
[ "MIT" ]
null
null
null
notification/migrations/0004_notifications_tweet_time.py
jkube38/twitterclone
f25f2cdd81dcb0e2f12e8511c31f46cd0f1ea40f
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-04 07:55 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('notification', '0003_notifications_tweeter'), ] operations = [ migrations.AddField( model_name='not...
22.8
74
0.644737
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('notification', '0003_notifications_tweeter'), ] operations = [ migrations.AddField( model_name='notifications', name='tweet_time', ...
true
true
f76d233c32d1175a2cf21f82d8801b4dc872df58
22,277
py
Python
pipeline.py
theofpa/failing-loudly
da5498babf39bdd9ba534265d67bed77b290e5b4
[ "MIT" ]
60
2019-02-23T02:11:29.000Z
2022-03-27T08:58:31.000Z
pipeline.py
theofpa/failing-loudly
da5498babf39bdd9ba534265d67bed77b290e5b4
[ "MIT" ]
17
2019-09-19T08:27:44.000Z
2022-03-12T00:19:57.000Z
pipeline.py
theofpa/failing-loudly
da5498babf39bdd9ba534265d67bed77b290e5b4
[ "MIT" ]
15
2020-01-15T00:07:57.000Z
2021-12-16T02:38:59.000Z
# ------------------------------------------------- # IMPORTS # ------------------------------------------------- import numpy as np from tensorflow import set_random_seed seed = 1 np.random.seed(seed) set_random_seed(seed) import keras import tempfile import keras.models from keras import backend as K from shift_d...
40.503636
267
0.569691
import numpy as np from tensorflow import set_random_seed seed = 1 np.random.seed(seed) set_random_seed(seed) import keras import tempfile import keras.models from keras import backend as K from shift_detector import * from shift_locator import * from shift_applicator import * from data_utils import * from shared_u...
true
true
f76d26adcf822bad0a2d2f6511dae49be3b65f88
278
py
Python
remtime.py
Neutrino3316/First-Impression
00b7cebe8391c7c30b36de9c4ce5d9732daaf34d
[ "MIT" ]
24
2018-12-07T13:53:37.000Z
2022-01-11T11:54:34.000Z
remtime.py
THEFASHIONGEEK/First-Impression
0d321b1562af92bf49ef602c4a6037c46d6b065a
[ "MIT" ]
6
2018-02-27T09:28:57.000Z
2020-09-08T15:37:56.000Z
remtime.py
THEFASHIONGEEK/First-Impression
0d321b1562af92bf49ef602c4a6037c46d6b065a
[ "MIT" ]
21
2018-05-25T10:56:44.000Z
2022-02-24T08:06:24.000Z
def printTime(remtime): hrs = int(remtime)/3600 mins = int((remtime/60-hrs*60)) secs = int(remtime-mins*60-hrs*3600) timedisp="Time remaining : " if hrs>0: timedisp+=str(hrs)+"Hrs " if mins>0: timedisp+=str(mins)+"Mins " timedisp += str(secs)+"Secs" print(timedisp)
23.166667
37
0.669065
def printTime(remtime): hrs = int(remtime)/3600 mins = int((remtime/60-hrs*60)) secs = int(remtime-mins*60-hrs*3600) timedisp="Time remaining : " if hrs>0: timedisp+=str(hrs)+"Hrs " if mins>0: timedisp+=str(mins)+"Mins " timedisp += str(secs)+"Secs" print(timedisp)
true
true
f76d28c262a26a69e9cc785802766555ce5dabc6
9,712
py
Python
examples/celeb_age.py
lc0/autokeras
413508a5f6aaa38ee7aba719aadb057c0b029591
[ "Apache-2.0" ]
2
2021-05-17T08:02:03.000Z
2021-06-17T09:52:45.000Z
examples/celeb_age.py
lc0/autokeras
413508a5f6aaa38ee7aba719aadb057c0b029591
[ "Apache-2.0" ]
2
2020-03-11T04:22:39.000Z
2020-03-12T18:26:11.000Z
examples/celeb_age.py
lc0/autokeras
413508a5f6aaa38ee7aba719aadb057c0b029591
[ "Apache-2.0" ]
null
null
null
""" Regression tasks estimate a numeric variable, such as the price of a house or voter turnout. This example is adapted from a [notebook](https://gist.github.com/mapmeld/98d1e9839f2d1f9c4ee197953661ed07) which estimates a person's age from their image, trained on the [IMDB-WIKI](https://data.vision.ee.ethz.ch/cvl/rro...
28.150725
88
0.7118
import os from datetime import datetime from datetime import timedelta import numpy as np import pandas as pd import tensorflow as tf from google.colab import drive from PIL import Image from scipy.io import loadmat from tensorflow.python.keras.utils.data_utils import Sequence import autokeras as ak drive.mount("/co...
true
true
f76d28c9c03654d4b06f47aa822163431a6c017b
512
py
Python
gallery/line2d.py
Sillte/figpptx
bf5539b09eeef4e6a17bb4483f62f29d286138b2
[ "MIT" ]
null
null
null
gallery/line2d.py
Sillte/figpptx
bf5539b09eeef4e6a17bb4483f62f29d286138b2
[ "MIT" ]
null
null
null
gallery/line2d.py
Sillte/figpptx
bf5539b09eeef4e6a17bb4483f62f29d286138b2
[ "MIT" ]
null
null
null
"""Check behaviors of ``Line2D``. """ import numpy as np import matplotlib.pyplot as plt from figpptx.comparer import Comparer class Line2DCheck: """Line2DCheck. """ @classmethod def run(cls, ax): cls.various_line2d(ax) Comparer().compare(ax.figure) @classmethod def various_l...
18.962963
37
0.597656
import numpy as np import matplotlib.pyplot as plt from figpptx.comparer import Comparer class Line2DCheck: @classmethod def run(cls, ax): cls.various_line2d(ax) Comparer().compare(ax.figure) @classmethod def various_line2d(cls, ax): ax.plot([0, 1], [0, 1]) ax.plot([0,...
true
true
f76d28df717e212b5276a4855d52867ec3319d11
1,433
py
Python
tests/Parser/560clean_SWAT_test.py
Bas-Man/TVShowFile
2f341c97dcbe52eee0c0e71752173c9e9442450c
[ "MIT" ]
null
null
null
tests/Parser/560clean_SWAT_test.py
Bas-Man/TVShowFile
2f341c97dcbe52eee0c0e71752173c9e9442450c
[ "MIT" ]
null
null
null
tests/Parser/560clean_SWAT_test.py
Bas-Man/TVShowFile
2f341c97dcbe52eee0c0e71752173c9e9442450c
[ "MIT" ]
null
null
null
import unittest from context import parser class TVShowFileParserTests(unittest.TestCase): def setUp(self): self.filename = parser.Parser("S.W.A.T.s01E01.1080p.avi") def tearDown(self): self.filename = None def testObjValuesSet(self): self.assertEqual(self.filename._showName, "S...
35.825
69
0.666434
import unittest from context import parser class TVShowFileParserTests(unittest.TestCase): def setUp(self): self.filename = parser.Parser("S.W.A.T.s01E01.1080p.avi") def tearDown(self): self.filename = None def testObjValuesSet(self): self.assertEqual(self.filename._showName, "S...
true
true
f76d2b8be887bd84025e4e9e4b4c048a3bb5d723
32,743
py
Python
niakrelease/process.py
SIMEXP/release_tools
c879b799c133d11e5cc9b716c4ef6c8c31b5b424
[ "MIT" ]
null
null
null
niakrelease/process.py
SIMEXP/release_tools
c879b799c133d11e5cc9b716c4ef6c8c31b5b424
[ "MIT" ]
null
null
null
niakrelease/process.py
SIMEXP/release_tools
c879b799c133d11e5cc9b716c4ef6c8c31b5b424
[ "MIT" ]
null
null
null
""" This module runs octave modules copyright (c) P-O Quirion Centre de recherche de l'institut de Gériatrie de Montréal Université de Montréal, 2015-2016 Maintainer : poq@criugm.qc.ca Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (th...
36.381111
125
0.600434
__author__ = 'Pierre-Olivier Quirion <poq@criugm.qc.ca>' import io import logging import os import queue import re import shutil import signal import subprocess import sys import tempfile import threading import time import urllib.request import zipfile import requests import simplejson as json try: import psuti...
true
true
f76d2c3c5742e84a7683548bdc381cdca2a5f90c
16,811
py
Python
src/fakeformat/__init__.py
roelandschoukens/fake-format-ml
88ace75b300a5291a1536175cee47b7f44a1d3ef
[ "MIT" ]
null
null
null
src/fakeformat/__init__.py
roelandschoukens/fake-format-ml
88ace75b300a5291a1536175cee47b7f44a1d3ef
[ "MIT" ]
null
null
null
src/fakeformat/__init__.py
roelandschoukens/fake-format-ml
88ace75b300a5291a1536175cee47b7f44a1d3ef
[ "MIT" ]
null
null
null
# tagging those table rows in new-north-shore-network.md still doesn't work # warn for single space indent in a few places (generic block and tag) from . import regexshim as _re from . import errors from .blocks import FakeFormatStdBlocks from .elements import * from .lineparser import * _IN_PARAGRAPH = Sentinel("I...
34.099391
143
0.577479
# warn for single space indent in a few places (generic block and tag) from . import regexshim as _re from . import errors from .blocks import FakeFormatStdBlocks from .elements import * from .lineparser import * _IN_PARAGRAPH = Sentinel("In paragraph") class FakeFormatBase: def __init__(self, sink, error_sin...
true
true
f76d2c9292a69c88c0bfdc2c252300602357b57b
18,857
py
Python
tests/projects/test_projects.py
sifanLV/mlflow
38f06827172de4c323efd0085b99be756d0ac3be
[ "Apache-2.0" ]
3
2019-10-07T01:12:25.000Z
2020-07-06T04:27:51.000Z
tests/projects/test_projects.py
sifanLV/mlflow
38f06827172de4c323efd0085b99be756d0ac3be
[ "Apache-2.0" ]
15
2019-10-07T01:11:46.000Z
2022-03-08T23:33:53.000Z
tests/projects/test_projects.py
tsocial/mlflow
22805100b91943f8c2964a38ac9e2975b5735882
[ "Apache-2.0" ]
1
2019-08-19T02:27:25.000Z
2019-08-19T02:27:25.000Z
import os import git import shutil import tempfile import yaml from distutils import dir_util import mock import pytest import mlflow from mlflow.entities import RunStatus, ViewType, Experiment, SourceType from mlflow.exceptions import ExecutionException, MlflowException from mlflow.store.file_store import FileStor...
44.161593
100
0.713263
import os import git import shutil import tempfile import yaml from distutils import dir_util import mock import pytest import mlflow from mlflow.entities import RunStatus, ViewType, Experiment, SourceType from mlflow.exceptions import ExecutionException, MlflowException from mlflow.store.file_store import FileStor...
true
true
f76d2d3d01eda05ee1e4c80fcc404880c956205d
19,188
py
Python
PhysicsTools/PatAlgos/python/tools/helpers.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
PhysicsTools/PatAlgos/python/tools/helpers.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
PhysicsTools/PatAlgos/python/tools/helpers.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
from __future__ import print_function import FWCore.ParameterSet.Config as cms import sys import six ## Helpers to perform some technically boring tasks like looking for all modules with a given parameter ## and replacing that to a given value # Next two lines are for backward compatibility, the imported functions an...
43.908467
227
0.629247
from __future__ import print_function import FWCore.ParameterSet.Config as cms import sys import six from FWCore.ParameterSet.MassReplace import massSearchReplaceAnyInputTag, MassSearchReplaceAnyInputTagVisitor from FWCore.ParameterSet.MassReplace import massSearchReplaceParam, MassSearchParamVisitor, MassSearchRepla...
true
true
f76d2dd3cdd15112cb4f8b1f0d3ba81f73cc3f43
2,412
py
Python
Python/old/main2.py
nishi10000/NY_Laser_Project
2392f70633d052cea0b901bf78c7815589043121
[ "MIT" ]
null
null
null
Python/old/main2.py
nishi10000/NY_Laser_Project
2392f70633d052cea0b901bf78c7815589043121
[ "MIT" ]
29
2020-03-03T09:38:15.000Z
2020-04-23T12:08:10.000Z
Python/old/main2.py
nishi10000/NY_Laser_Project
2392f70633d052cea0b901bf78c7815589043121
[ "MIT" ]
null
null
null
import numpy as np import cv2 import socket #define #Curryのしきい値 Edge_min = 100 Edge_max = 200 lazer_on_message='lazer_on' lazer_off_message='lazer_off' frame_start_message='frame_start' def send_udp_message(message): try: udp.sendto(message.encode(), address) #文字列をバイトデータに変換してaddress宛に送信 except Keyboard...
26.8
89
0.605721
import numpy as np import cv2 import socket Edge_min = 100 Edge_max = 200 lazer_on_message='lazer_on' lazer_off_message='lazer_off' frame_start_message='frame_start' def send_udp_message(message): try: udp.sendto(message.encode(), address) except KeyboardInterrupt: udp.close() def my_len(l): ...
true
true
f76d2e0056052565ab445ea15b54678921f50b8d
2,162
py
Python
examples/files.py
vamshi091211/pyinfra
6e14b039422e00ebc68110eabbc6a3a543c96279
[ "MIT" ]
1
2022-03-24T05:44:45.000Z
2022-03-24T05:44:45.000Z
examples/files.py
marinakravchenko21/pyinfra
6e14b039422e00ebc68110eabbc6a3a543c96279
[ "MIT" ]
null
null
null
examples/files.py
marinakravchenko21/pyinfra
6e14b039422e00ebc68110eabbc6a3a543c96279
[ "MIT" ]
1
2021-11-12T18:36:01.000Z
2021-11-12T18:36:01.000Z
from pyinfra import host from pyinfra.operations import files # Note: This requires files in the files/ directory. SUDO = True if host.fact.linux_name in ['CentOS', 'RedHat']: files.download( {'Download the Docker repo file'}, 'https://download.docker.com/linux/centos/docker-ce.repo', '/e...
21.838384
74
0.633673
from pyinfra import host from pyinfra.operations import files SUDO = True if host.fact.linux_name in ['CentOS', 'RedHat']: files.download( {'Download the Docker repo file'}, 'https://download.docker.com/linux/centos/docker-ce.repo', '/etc/yum.repos.d/docker-ce.repo', ) files.put( ...
true
true
f76d2e9331271b4e0996d445f3ca2af876fd669d
11,923
py
Python
seq2avg_data_generation.py
manluow/d3p
23a33195d6fc4c0db60b24f3f871094a1f2cf8ab
[ "MIT" ]
3
2021-04-20T13:22:45.000Z
2021-04-27T09:46:28.000Z
seq2avg_data_generation.py
manluow/d3p
23a33195d6fc4c0db60b24f3f871094a1f2cf8ab
[ "MIT" ]
null
null
null
seq2avg_data_generation.py
manluow/d3p
23a33195d6fc4c0db60b24f3f871094a1f2cf8ab
[ "MIT" ]
1
2021-04-22T15:22:13.000Z
2021-04-22T15:22:13.000Z
# -*- coding: utf-8 -*- import os import json import pickle from datetime import datetime, timedelta import numpy as np import pandas as pd from utils import day_of_month def is_first_day(shop_timeline, seq, dt): '''Jude whether a day is the first day of the sequence ''' timeline = shop_timeline[seq] ...
31.710106
99
0.552042
import os import json import pickle from datetime import datetime, timedelta import numpy as np import pandas as pd from utils import day_of_month def is_first_day(shop_timeline, seq, dt): timeline = shop_timeline[seq] for tl in timeline: if tl[0] <= dt < tl[1] and tl[0] == dt: return T...
true
true
f76d2f5fa2678e7e8493785014fea55b7043d5da
12,597
py
Python
source/vcf_func.py
sushma-4/NEAT
cb7394597acf1cd5824fcdc3b83308eaffbbe916
[ "RSA-MD" ]
null
null
null
source/vcf_func.py
sushma-4/NEAT
cb7394597acf1cd5824fcdc3b83308eaffbbe916
[ "RSA-MD" ]
null
null
null
source/vcf_func.py
sushma-4/NEAT
cb7394597acf1cd5824fcdc3b83308eaffbbe916
[ "RSA-MD" ]
null
null
null
import io import sys import time import gzip import random import pandas as pd def parse_vcf(vcf_path: str, tumor_normal: bool = False, ploidy: int = 2, include_homs: bool = False, include_fail: bool = False, debug: bool = False, choose_random_ploid_if_no_gt_found: bool = True): tt = ...
51.627049
115
0.55029
import io import sys import time import gzip import random import pandas as pd def parse_vcf(vcf_path: str, tumor_normal: bool = False, ploidy: int = 2, include_homs: bool = False, include_fail: bool = False, debug: bool = False, choose_random_ploid_if_no_gt_found: bool = True): tt = ...
true
true
f76d309270b65408f28aca1d882df683f36464b4
625
py
Python
manage.py
linuxbaz/djangoPrgGit
ef715162f968b1d0872cdf57e6dc9c869894b01b
[ "MIT" ]
null
null
null
manage.py
linuxbaz/djangoPrgGit
ef715162f968b1d0872cdf57e6dc9c869894b01b
[ "MIT" ]
null
null
null
manage.py
linuxbaz/djangoPrgGit
ef715162f968b1d0872cdf57e6dc9c869894b01b
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mylib.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportEr...
28.409091
73
0.6816
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mylib.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f76d3102ff16e0cafcdfb747bf2d156e4b478012
5,771
py
Python
jas1101finalproject/utils.py
nstarman/jas1101_project
f54620b715eb2f7dbe7bd39d4a1e21e50bc06541
[ "BSD-3-Clause" ]
1
2020-11-20T18:27:20.000Z
2020-11-20T18:27:20.000Z
jas1101finalproject/utils.py
nstarman/jas1101_project
f54620b715eb2f7dbe7bd39d4a1e21e50bc06541
[ "BSD-3-Clause" ]
1
2021-12-20T00:15:40.000Z
2021-12-20T00:16:27.000Z
jas1101finalproject/utils.py
nstarman/jas1101_project
f54620b715eb2f7dbe7bd39d4a1e21e50bc06541
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """**DOCSTRING**. description Routing Listings ---------------- """ ############################################################################### # IMPORTS # GENERAL import numpy as np import astropy.units as u import matplotlib.pyplot as plt from matplotlib import rcParams import seab...
23.176707
123
0.484491
import numpy as np import astropy.units as u import matplotlib.pyplot as plt from matplotlib import rcParams import seaborn as sns rcParams.update({"figure.figsize": [7, 5]}) rcParams.update({"xtick.major.pad": "5.0"}) rcParams.update({"xtick.major.size": "4"}) rcParams.update({"xtick.major.width": "1."}) rc...
true
true
f76d3148b742d94312ddbfffbadfdb3320c932d3
5,507
py
Python
util/repomirror/api.py
rafiu007/quay
3efa2096975c3119803dee81d9db1c0b6200f4a9
[ "Apache-2.0" ]
null
null
null
util/repomirror/api.py
rafiu007/quay
3efa2096975c3119803dee81d9db1c0b6200f4a9
[ "Apache-2.0" ]
null
null
null
util/repomirror/api.py
rafiu007/quay
3efa2096975c3119803dee81d9db1c0b6200f4a9
[ "Apache-2.0" ]
null
null
null
import os import logging from abc import ABCMeta, abstractmethod from six import add_metaclass import requests from util.abchelpers import nooper from util.repomirror.validator import RepoMirrorConfigValidator from _init import CONF_DIR TOKEN_VALIDITY_LIFETIME_S = 60 # Amount of time the repo mirror has to call the...
29.767568
100
0.662066
import os import logging from abc import ABCMeta, abstractmethod from six import add_metaclass import requests from util.abchelpers import nooper from util.repomirror.validator import RepoMirrorConfigValidator from _init import CONF_DIR TOKEN_VALIDITY_LIFETIME_S = 60 MITM_CERT_PATH = os.path.join(CONF_DIR, "mitm.c...
true
true
f76d32043777bc203203064403bdaeb24e4e43a4
2,749
py
Python
tools/process_IP_results.py
vincentkslim/IPC
eb702ead6f23a1dc0be39c9f5a0fd62c80abeb98
[ "MIT" ]
344
2020-07-03T14:08:27.000Z
2022-03-30T14:01:11.000Z
tools/process_IP_results.py
vincentkslim/IPC
eb702ead6f23a1dc0be39c9f5a0fd62c80abeb98
[ "MIT" ]
25
2020-07-05T15:56:24.000Z
2022-03-30T20:56:39.000Z
tools/process_IP_results.py
vincentkslim/IPC
eb702ead6f23a1dc0be39c9f5a0fd62c80abeb98
[ "MIT" ]
46
2020-07-04T05:04:39.000Z
2022-03-25T02:09:23.000Z
"""Process simulation results.""" import sys import os import pathlib import mmap import numpy import pandas timesteps = (1e-2, 1e-3, 1e-4, 1e-5) def save_results_csv(results): """Save results to seperate CSV files.""" with open("results-IP.csv", "w", newline="") as f: scene_names = sorted(list(res...
31.597701
87
0.593307
import sys import os import pathlib import mmap import numpy import pandas timesteps = (1e-2, 1e-3, 1e-4, 1e-5) def save_results_csv(results): with open("results-IP.csv", "w", newline="") as f: scene_names = sorted(list(results.keys())) for scene_name in scene_names: f.write(f"{scen...
true
true
f76d32a5293d9d388b22e7bbae2d23ba9c41bffe
2,589
py
Python
app.py
qhduan/ocr-web
f7a0830545064178ed3b12a7d94c3bb0e46d4423
[ "Apache-2.0" ]
null
null
null
app.py
qhduan/ocr-web
f7a0830545064178ed3b12a7d94c3bb0e46d4423
[ "Apache-2.0" ]
5
2021-03-10T07:08:10.000Z
2022-02-26T23:28:13.000Z
app.py
qhduan/ocr-web
f7a0830545064178ed3b12a7d94c3bb0e46d4423
[ "Apache-2.0" ]
null
null
null
import os import uuid import base64 import multiprocessing import traceback import tr from flask import Flask, request, jsonify from flask_cors import CORS app = Flask(__name__) CORS(app) def tr_run(path, return_dict): try: return_dict['ret'] = tr.run(path) except: return_dict['ret'] = None...
27.252632
114
0.608343
import os import uuid import base64 import multiprocessing import traceback import tr from flask import Flask, request, jsonify from flask_cors import CORS app = Flask(__name__) CORS(app) def tr_run(path, return_dict): try: return_dict['ret'] = tr.run(path) except: return_dict['ret'] = None...
true
true
f76d3346c47937091abf2acfa01603ac2f15961a
3,431
py
Python
aiida/orm/nodes/process/workflow/workflow.py
PercivalN/aiida-core
b215ed5a7ce9342bb7f671b67e95c1f474cc5940
[ "BSD-2-Clause" ]
1
2019-07-31T04:08:13.000Z
2019-07-31T04:08:13.000Z
aiida/orm/nodes/process/workflow/workflow.py
PercivalN/aiida-core
b215ed5a7ce9342bb7f671b67e95c1f474cc5940
[ "BSD-2-Clause" ]
null
null
null
aiida/orm/nodes/process/workflow/workflow.py
PercivalN/aiida-core
b215ed5a7ce9342bb7f671b67e95c1f474cc5940
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
47
118
0.645584
from __future__ import division from __future__ import print_function from __future__ import absolute_import from aiida.common.links import LinkType from aiida.orm.utils.managers import NodeLinksManager from ..process import ProcessNode __all__ = ('WorkflowNode',) class WorkflowNode(ProcessNode): _storabl...
true
true
f76d3542e3032d8b266318c52fd8ff2692c15a26
822
py
Python
tracopt/versioncontrol/git/tests/__init__.py
clubturbo/Trac-1.4.2
254ce54a3c2fb86b4f31810ddeabbd4ff8b54a78
[ "BSD-3-Clause" ]
null
null
null
tracopt/versioncontrol/git/tests/__init__.py
clubturbo/Trac-1.4.2
254ce54a3c2fb86b4f31810ddeabbd4ff8b54a78
[ "BSD-3-Clause" ]
null
null
null
tracopt/versioncontrol/git/tests/__init__.py
clubturbo/Trac-1.4.2
254ce54a3c2fb86b4f31810ddeabbd4ff8b54a78
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2020 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://trac.edgewall.org/wiki/TracLicense. # # This soft...
29.357143
68
0.722628
import unittest from tracopt.versioncontrol.git.tests import PyGIT, git_fs def test_suite(): suite = unittest.TestSuite() suite.addTest(PyGIT.test_suite()) suite.addTest(git_fs.test_suite()) return suite if __name__ == '__main__': unittest.main(defaultTest='test_suite')
true
true