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
1c268731defae5359687941c98aec3523e777887
5,708
py
Python
DE/DE.py
YiZhiXiaoGuLI/Differential-Evolution-Algorithm
9505c31963c499f878daaa6d02c44d2320b32ff4
[ "MIT" ]
null
null
null
DE/DE.py
YiZhiXiaoGuLI/Differential-Evolution-Algorithm
9505c31963c499f878daaa6d02c44d2320b32ff4
[ "MIT" ]
null
null
null
DE/DE.py
YiZhiXiaoGuLI/Differential-Evolution-Algorithm
9505c31963c499f878daaa6d02c44d2320b32ff4
[ "MIT" ]
null
null
null
import numpy as np from DEIndividual import DEIndividual import random import copy import matplotlib.pyplot as plt class DifferentialEvolutionAlgorithm: ''' The class for differential evolution algorithm ''' def __init__(self, sizepop, vardim, bound, MAXGEN, params): ''' ...
37.552632
120
0.550806
import numpy as np from DEIndividual import DEIndividual import random import copy import matplotlib.pyplot as plt class DifferentialEvolutionAlgorithm: def __init__(self, sizepop, vardim, bound, MAXGEN, params): self.sizepop = sizepop self.MAXGEN = MAXGEN self.vardim = vard...
true
true
1c268872e78a09a5d1c38514fd45595af0711cf5
3,014
py
Python
tests/vfs/encrypted_stream_file_system.py
dfrc-korea/dfvfs
7be70af72f56f4feadd50206e33b0f5024907473
[ "Apache-2.0" ]
1
2021-02-15T03:41:46.000Z
2021-02-15T03:41:46.000Z
tests/vfs/encrypted_stream_file_system.py
dfrc-korea/dfvfs
7be70af72f56f4feadd50206e33b0f5024907473
[ "Apache-2.0" ]
null
null
null
tests/vfs/encrypted_stream_file_system.py
dfrc-korea/dfvfs
7be70af72f56f4feadd50206e33b0f5024907473
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the encrypted stream file system implementation.""" import unittest from dfvfs.lib import definitions from dfvfs.path import encrypted_stream_path_spec from dfvfs.path import os_path_spec from dfvfs.resolver import context from dfvfs.resolver import resolver ...
31.072165
73
0.763106
import unittest from dfvfs.lib import definitions from dfvfs.path import encrypted_stream_path_spec from dfvfs.path import os_path_spec from dfvfs.resolver import context from dfvfs.resolver import resolver from dfvfs.vfs import encrypted_stream_file_system from tests import test_lib as shared_test_lib class Enc...
true
true
1c268a8de69930dc6da09033edd65e78e7a91c3e
13,804
py
Python
yt_dlp/chrome_versions.py
Wahyu213/ytdl-patched
b689465dd67b18f94d9b3f3336f54e742b51a258
[ "Unlicense" ]
1
2022-01-03T12:06:45.000Z
2022-01-03T12:06:45.000Z
yt_dlp/chrome_versions.py
Wahyu213/ytdl-patched
b689465dd67b18f94d9b3f3336f54e742b51a258
[ "Unlicense" ]
null
null
null
yt_dlp/chrome_versions.py
Wahyu213/ytdl-patched
b689465dd67b18f94d9b3f3336f54e742b51a258
[ "Unlicense" ]
null
null
null
# coding: utf-8 # AUTOMATICALLY GENERATED FILE. DO NOT EDIT. # Generated by ./devscripts/make_chrome_version_list.py # This list is created from git tags in https://chromium.googlesource.com/chromium/src from __future__ import unicode_literals versions = [ "96.0.4639.0", "96.0.4639.1", "96.0.4639.2", "...
19.442254
86
0.438351
from __future__ import unicode_literals versions = [ "96.0.4639.0", "96.0.4639.1", "96.0.4639.2", "96.0.4640.0", "96.0.4640.1", "96.0.4640.2", "96.0.4641.0", "96.0.4641.1", "96.0.4641.2", "96.0.4641.3", "96.0.4642.0", "96.0.4642.1", "96.0.4642.2", "96.0.4643....
true
true
1c268a9e0e610bd872f212e9f90933d6dbdafac7
3,808
py
Python
pype/hosts/maya/plugins/publish/extract_model.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/hosts/maya/plugins/publish/extract_model.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/hosts/maya/plugins/publish/extract_model.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Extract model as Maya Scene.""" import os from maya import cmds import avalon.maya import pype.api from pype.hosts.maya.api import lib class ExtractModel(pype.api.Extractor): """Extract as Model (Maya Scene). Only extracts contents based on the original "setMembers" data to ensur...
37.333333
109
0.512342
import os from maya import cmds import avalon.maya import pype.api from pype.hosts.maya.api import lib class ExtractModel(pype.api.Extractor): label = "Model (Maya Scene)" hosts = ["maya"] families = ["model"] scene_type = "ma" def process(self, instance): ext_mapping = ( ...
true
true
1c268c11c06558e95896179ade49c874d4f94b0a
7,409
py
Python
agents/dqn_agent.py
kantologist/multiagent-sac
212e04b19f2becf2e37d9270242b1c59542d8d9f
[ "MIT" ]
8
2021-04-18T08:12:48.000Z
2022-03-24T13:33:37.000Z
agents/dqn_agent.py
kantologist/multiagent-sac
212e04b19f2becf2e37d9270242b1c59542d8d9f
[ "MIT" ]
null
null
null
agents/dqn_agent.py
kantologist/multiagent-sac
212e04b19f2becf2e37d9270242b1c59542d8d9f
[ "MIT" ]
1
2021-09-07T13:44:34.000Z
2021-09-07T13:44:34.000Z
""" Packaged MASAC""" from typing import Dict, List, Tuple import matplotlib.pyplot as plt import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from unityagents import UnityEnvironment from buffers.buffer import ReplayBuffer from models.network import Network from torch.nn.utils....
33.075893
99
0.587664
from typing import Dict, List, Tuple import matplotlib.pyplot as plt import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from unityagents import UnityEnvironment from buffers.buffer import ReplayBuffer from models.network import Network from torch.nn.utils.clip_grad import clip_...
true
true
1c268c44cf0ce3286abf8d4d26cbbe290ec21236
4,614
py
Python
src/streamlink/plugins/n13tv.py
nickersk/streamlink-27
95c47866a741d32f6c4ca153b6eff908abadfbe4
[ "BSD-2-Clause" ]
5
2020-12-26T18:57:59.000Z
2022-03-09T15:10:39.000Z
src/streamlink/plugins/n13tv.py
nickersk/streamlink-27
95c47866a741d32f6c4ca153b6eff908abadfbe4
[ "BSD-2-Clause" ]
2
2021-06-09T14:13:58.000Z
2021-09-27T19:14:46.000Z
src/streamlink/plugins/n13tv.py
nickersk/streamlink-27
95c47866a741d32f6c4ca153b6eff908abadfbe4
[ "BSD-2-Clause" ]
6
2021-02-12T10:24:25.000Z
2022-01-01T13:08:49.000Z
import logging import re from streamlink.compat import urljoin, urlunparse from streamlink.plugin import Plugin, PluginError, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import HLSStream log = logging.getLogger(__name__) @pluginmatcher(re.compile( r"https?://(?:www\.)?13t...
32.041667
82
0.553749
import logging import re from streamlink.compat import urljoin, urlunparse from streamlink.plugin import Plugin, PluginError, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import HLSStream log = logging.getLogger(__name__) @pluginmatcher(re.compile( r"https?://(?:www\.)?13t...
true
true
1c268c7caada8180d891e07101292c11b474dfc9
1,660
py
Python
llcode/array_x.py
simple2source/roadkarma
7a6c6c49b1d42d1a3e244591d50f3993f28eaa05
[ "Unlicense" ]
null
null
null
llcode/array_x.py
simple2source/roadkarma
7a6c6c49b1d42d1a3e244591d50f3993f28eaa05
[ "Unlicense" ]
null
null
null
llcode/array_x.py
simple2source/roadkarma
7a6c6c49b1d42d1a3e244591d50f3993f28eaa05
[ "Unlicense" ]
null
null
null
# leetcode 53:Maximum Subarray # For example, given the array [−2,1,−3,4,−1,2,1,−5,4], # the contiguous subarray [4,−1,2,1] has the largest sum = 6. def max_sub_array_sum(array): if not array: return None max_num = 0 sum_num = 0 length = len(array) for i in range(length): if sum_nu...
23.714286
67
0.581325
def max_sub_array_sum(array): if not array: return None max_num = 0 sum_num = 0 length = len(array) for i in range(length): if sum_num < 0: sum_num = 0 sum_num += array[i] max_num = max(max_num, sum_num) return max_num print(max_sub_array_sum([...
true
true
1c268d665cec76f40d9d4f7a2d8943c6706bacb5
1,118
py
Python
CNN/trained_model_test.py
kun-1010/1
c7f251bd254c29e3cb53bb915e69f4e00f00cb30
[ "MulanPSL-1.0" ]
null
null
null
CNN/trained_model_test.py
kun-1010/1
c7f251bd254c29e3cb53bb915e69f4e00f00cb30
[ "MulanPSL-1.0" ]
null
null
null
CNN/trained_model_test.py
kun-1010/1
c7f251bd254c29e3cb53bb915e69f4e00f00cb30
[ "MulanPSL-1.0" ]
null
null
null
import torch from torchvision import transforms from torch.utils.data import DataLoader from model import CNN from my_dataset import MyMnistDataset transform = transforms.Compose([ transforms.Resize([28, 28]), transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,)) ]) # 载入自己的数据集 dataset = MyMnis...
27.268293
100
0.648479
import torch from torchvision import transforms from torch.utils.data import DataLoader from model import CNN from my_dataset import MyMnistDataset transform = transforms.Compose([ transforms.Resize([28, 28]), transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,)) ]) dataset = MyMnistDataset(r...
true
true
1c268d7087c4114c2680cb2a5728109295d8318b
555
py
Python
supriya/ugens/MouseButton.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/MouseButton.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/MouseButton.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
import collections from supriya import CalculationRate, SignalRange from supriya.synthdefs import UGen class MouseButton(UGen): """ A mouse-button tracker. :: >>> supriya.ugens.MouseButton.kr() MouseButton.kr() """ ### CLASS VARIABLES ### __documentation_section__ = "User...
19.137931
57
0.661261
import collections from supriya import CalculationRate, SignalRange from supriya.synthdefs import UGen class MouseButton(UGen): on UGens" _ordered_input_names = collections.OrderedDict( [("minimum", 0), ("maximum", 1), ("lag", 0.2)] ) _signal_range = SignalRange.UNIPOLAR _valid_calcul...
true
true
1c268d81a209276b21b82d09f96cafc573c11efb
2,774
py
Python
src/reader/reader_handler.py
JaimeCernuda/dlio_benchmark
d9cfbf76b4c7fb0d48a0dd43b8d2f2ea6ba75949
[ "MIT" ]
null
null
null
src/reader/reader_handler.py
JaimeCernuda/dlio_benchmark
d9cfbf76b4c7fb0d48a0dd43b8d2f2ea6ba75949
[ "MIT" ]
null
null
null
src/reader/reader_handler.py
JaimeCernuda/dlio_benchmark
d9cfbf76b4c7fb0d48a0dd43b8d2f2ea6ba75949
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from src.common.enumerations import Shuffle, FileAccess from src.utils.argument_parser import ArgumentParser import os import math from numpy import random class FormatReader(ABC): def __init__(self): self._arg_parser = ArgumentParser.get_instance() self.read_...
39.070423
110
0.656092
from abc import ABC, abstractmethod from src.common.enumerations import Shuffle, FileAccess from src.utils.argument_parser import ArgumentParser import os import math from numpy import random class FormatReader(ABC): def __init__(self): self._arg_parser = ArgumentParser.get_instance() self.read_...
true
true
1c268df4e0ec36936d7c7ea218cd4a9f854ce783
1,671
py
Python
musicoop/models/user.py
felipemaia02/musicoop
a6d1790236ffd17ba85414c688e4d30ecdeeec61
[ "MIT" ]
null
null
null
musicoop/models/user.py
felipemaia02/musicoop
a6d1790236ffd17ba85414c688e4d30ecdeeec61
[ "MIT" ]
null
null
null
musicoop/models/user.py
felipemaia02/musicoop
a6d1790236ffd17ba85414c688e4d30ecdeeec61
[ "MIT" ]
null
null
null
""" Model responsável por salvar usuários da aplicação """ from datetime import datetime from sqlalchemy import Column, Integer,String, DateTime from sqlalchemy.orm import relationship from musicoop.database import Base from musicoop.models.comment import Comment from musicoop.models.contribuition import Contribuition...
30.381818
76
0.643327
from datetime import datetime from sqlalchemy import Column, Integer,String, DateTime from sqlalchemy.orm import relationship from musicoop.database import Base from musicoop.models.comment import Comment from musicoop.models.contribuition import Contribuition from musicoop.models.post import Post from musicoop.models...
true
true
1c268e51076a1a89288f3287a8baa76bc364e4dc
95,575
py
Python
tools/bin/gpload.py
YangHao666666/hawq
10cff8350f1ba806c6fec64eb67e0e6f6f24786c
[ "Artistic-1.0-Perl", "ISC", "bzip2-1.0.5", "TCL", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "PostgreSQL", "BSD-3-Clause" ]
2
2018-03-25T02:24:12.000Z
2020-09-19T05:30:49.000Z
tools/bin/gpload.py
YangHao666666/hawq
10cff8350f1ba806c6fec64eb67e0e6f6f24786c
[ "Artistic-1.0-Perl", "ISC", "bzip2-1.0.5", "TCL", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "PostgreSQL", "BSD-3-Clause" ]
6
2018-07-25T10:54:30.000Z
2019-04-02T14:22:28.000Z
tools/bin/gpload.py
YangHao666666/hawq
10cff8350f1ba806c6fec64eb67e0e6f6f24786c
[ "Artistic-1.0-Perl", "ISC", "bzip2-1.0.5", "TCL", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "PostgreSQL", "BSD-3-Clause" ]
3
2019-02-22T07:44:56.000Z
2019-06-12T07:51:20.000Z
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
35.97102
174
0.543678
'''gpload [options] -f configuration file Options: -h hostname: host to connect to -p port: port to connect to -U username: user to connect as -d database: database to connect to -W: force password authentication -q: quiet mode -D: do not actually load data -v: verb...
false
true
1c268e82ba7eaeb4c4d53bc27d51f1aceaee9b1c
3,903
py
Python
server/external/youtube-dl/youtube_dl/extractor/tvc.py
yycc179/urlp
d272b74c4aed18f03ccada8817ecf5c572a1bf71
[ "MIT" ]
null
null
null
server/external/youtube-dl/youtube_dl/extractor/tvc.py
yycc179/urlp
d272b74c4aed18f03ccada8817ecf5c572a1bf71
[ "MIT" ]
null
null
null
server/external/youtube-dl/youtube_dl/extractor/tvc.py
yycc179/urlp
d272b74c4aed18f03ccada8817ecf5c572a1bf71
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( clean_html, int_or_none, ) class TVCIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tvc\.ru/video/iframe/id/(?P<id>\d+)' _TEST = { 'url': 'http://www....
35.481818
153
0.503715
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( clean_html, int_or_none, ) class TVCIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tvc\.ru/video/iframe/id/(?P<id>\d+)' _TEST = { 'url': 'http://www.tvc.ru/video/ifr...
true
true
1c268f089c39dc44989e5b3c5e803715613f956e
23,760
py
Python
src/PWCNet/PWCNet.py
laomao0/AIM_DAIN
8322569498d675d3b2c1f35475c1299cad580bde
[ "MIT" ]
3
2020-05-08T20:45:57.000Z
2021-01-18T11:32:38.000Z
src/PWCNet/PWCNet.py
laomao0/AIM_DAIN
8322569498d675d3b2c1f35475c1299cad580bde
[ "MIT" ]
null
null
null
src/PWCNet/PWCNet.py
laomao0/AIM_DAIN
8322569498d675d3b2c1f35475c1299cad580bde
[ "MIT" ]
null
null
null
""" implementation of the PWC-DC network for optical flow estimation by Sun et al., 2018 Jinwei Gu and Zhile Ren """ import torch import torch.nn as nn from torch.autograd import Variable import os os.environ['PYTHON_EGG_CACHE'] = 'tmp/' # a writable directory #from .correlation_package.modules.corr import Correlat...
42.053097
122
0.57037
import torch import torch.nn as nn from torch.autograd import Variable import os os.environ['PYTHON_EGG_CACHE'] = 'tmp/' ation_package_pytorch1_0.correlation import Correlation import numpy as np __all__ = [ 'pwc_dc_net', 'pwc_dc_net_old' ] def conv(in_planes, out_planes, kernel_size=3, stride=1, padd...
true
true
1c268f60603f16f92b4127e5cde8889e526ca9d7
1,260
py
Python
scripts/remove_meaningless_ids.py
probonas/pipeline
96f565f2d827498efd31a7e76b74e0394ef2abc1
[ "Apache-2.0" ]
5
2020-04-11T15:12:07.000Z
2021-09-13T04:15:47.000Z
scripts/remove_meaningless_ids.py
probonas/pipeline
96f565f2d827498efd31a7e76b74e0394ef2abc1
[ "Apache-2.0" ]
46
2019-04-22T20:36:40.000Z
2022-01-12T18:03:32.000Z
scripts/remove_meaningless_ids.py
probonas/pipeline
96f565f2d827498efd31a7e76b74e0394ef2abc1
[ "Apache-2.0" ]
2
2020-05-27T20:49:53.000Z
2021-03-17T04:21:38.000Z
#!/usr/bin/env python3 -B import os import sys import json import uuid import pprint import itertools from pathlib import Path from contextlib import suppress from settings import output_file_path from pipeline.util.rewriting import rewrite_output_files, JSONValueRewriter class JSONIDRemovalRewriter: def __init__(s...
21
75
0.675397
import os import sys import json import uuid import pprint import itertools from pathlib import Path from contextlib import suppress from settings import output_file_path from pipeline.util.rewriting import rewrite_output_files, JSONValueRewriter class JSONIDRemovalRewriter: def __init__(self): self.paths = { ...
true
true
1c2690be21715bd1894eedbc4b9c28debafa8d26
1,438
py
Python
setup.py
LeadPages/firechannel
19b5822005f7ef6bb842a183c807a8a9919433e6
[ "MIT" ]
4
2017-10-10T10:49:14.000Z
2022-01-31T18:33:29.000Z
setup.py
LeadPages/firechannel
19b5822005f7ef6bb842a183c807a8a9919433e6
[ "MIT" ]
4
2017-11-23T16:35:41.000Z
2021-02-02T21:13:59.000Z
setup.py
LeadPages/firechannel
19b5822005f7ef6bb842a183c807a8a9919433e6
[ "MIT" ]
null
null
null
from setuptools import setup with open("firechannel/__init__.py", "r") as f: version_marker = "__version__ = " for line in f: if line.startswith(version_marker): _, version = line.split(version_marker) version = version.strip().strip('"') break else: rais...
30.595745
89
0.638387
from setuptools import setup with open("firechannel/__init__.py", "r") as f: version_marker = "__version__ = " for line in f: if line.startswith(version_marker): _, version = line.split(version_marker) version = version.strip().strip('"') break else: rais...
true
true
1c2690c9f5637eaf72fa0a98e3225dfe6f0decb7
29
py
Python
__init__.py
vstadnytskyi/drivers
3d4dbc43dac7d13ddec25b179252ccea18792bc7
[ "MIT" ]
null
null
null
__init__.py
vstadnytskyi/drivers
3d4dbc43dac7d13ddec25b179252ccea18792bc7
[ "MIT" ]
null
null
null
__init__.py
vstadnytskyi/drivers
3d4dbc43dac7d13ddec25b179252ccea18792bc7
[ "MIT" ]
null
null
null
#!/bin/env python """ """
7.25
18
0.413793
true
true
1c269143a0ac2ba24f66ef69e2ca853576907f81
7,044
py
Python
readers/reader_text.py
jondy/mkepub
2a6209a6e6b49b0134d4cfa56232d26331fe2dae
[ "MIT" ]
null
null
null
readers/reader_text.py
jondy/mkepub
2a6209a6e6b49b0134d4cfa56232d26331fe2dae
[ "MIT" ]
null
null
null
readers/reader_text.py
jondy/mkepub
2a6209a6e6b49b0134d4cfa56232d26331fe2dae
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import chardet import os import re from ebooklib import epub from . import COVER_SUFFIX PAT_TITLE = r'^(#+)\s*(.*)\s*$' PAT_EMPTY = r'<p>\s*</p>' PAT_COMMENT = '!#' PAT_ALIGN_RIGHT = '#:' PAT_INLINE_IMAGE = r'!\[(.+)\]\((.+)\)' TEMPLATE_PARA = '<p>{0}<...
30.23176
100
0.46096
import chardet import os import re from ebooklib import epub from . import COVER_SUFFIX PAT_TITLE = r'^(#+)\s*(.*)\s*$' PAT_EMPTY = r'<p>\s*</p>' PAT_COMMENT = '!#' PAT_ALIGN_RIGHT = '#:' PAT_INLINE_IMAGE = r'!\[(.+)\]\((.+)\)' TEMPLATE_PARA = '<p>{0}</p>' TEMPLATE_INLINE_IMAGE = '<div class="pictu...
true
true
1c269179dfd00147315991efd6fb05c1acb6750c
70
py
Python
robot_controllers/robot_controllers/src/robot_controllers/init.py
565353780/multi-fetch-ros
3c27c90f491b2266f5010435e958d14b70ce49ff
[ "MIT" ]
53
2018-09-13T05:11:03.000Z
2022-02-28T04:09:58.000Z
robot_controllers/robot_controllers/src/robot_controllers/init.py
565353780/multi-fetch-ros
3c27c90f491b2266f5010435e958d14b70ce49ff
[ "MIT" ]
2
2018-09-30T08:32:22.000Z
2019-04-12T13:37:43.000Z
robot_controllers/robot_controllers/src/robot_controllers/init.py
565353780/multi-fetch-ros
3c27c90f491b2266f5010435e958d14b70ce49ff
[ "MIT" ]
31
2018-09-16T06:05:13.000Z
2021-09-10T18:10:37.000Z
""" Python wrapper for C++ library functions in robot_controllers """
35
69
0.742857
true
true
1c269281206725df527c08fa1113ba1c282ae8d9
800
py
Python
stdplugins/batch_upload.py
Deepumad77/CartoonBot
eff24f40043e41feadc70a63fa655353c1783ee0
[ "Apache-2.0" ]
2
2019-10-23T12:30:32.000Z
2019-10-23T20:33:26.000Z
stdplugins/batch_upload.py
Deepumad77/CartoonBot
eff24f40043e41feadc70a63fa655353c1783ee0
[ "Apache-2.0" ]
2
2020-05-22T14:59:05.000Z
2020-05-28T12:04:02.000Z
stdplugins/batch_upload.py
Deepumad77/CartoonBot
eff24f40043e41feadc70a63fa655353c1783ee0
[ "Apache-2.0" ]
12
2019-10-25T18:48:16.000Z
2020-04-26T11:31:21.000Z
""" Files Batch Uploader Plugin for userbot. usage:- .upb Note:- set TEMP_DIR in Your ENV Vars First. By:-@Zero_cool7870 """ import os import asyncio from uniborg.util import admin_cmd from telethon import events @borg.on(events.NewMessage(pattern=r"\.upb", outgoing=True)) async def batch_upload(event): if even...
22.222222
60
0.715
import os import asyncio from uniborg.util import admin_cmd from telethon import events @borg.on(events.NewMessage(pattern=r"\.upb", outgoing=True)) async def batch_upload(event): if event.fwd_from: return temp_dir = Config.TEMP_DIR if os.path.exists(temp_dir): files = os.listdir(temp_dir) files.so...
true
true
1c2692a7455f5ea3bd484cc3bb3ea4084af4fec3
786
py
Python
src/_cffi_src/build_commoncrypto.py
skeuomorf/cryptography
6e040cb7deb3ed16963f5185eeff7b44d7e8fac3
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/_cffi_src/build_commoncrypto.py
skeuomorf/cryptography
6e040cb7deb3ed16963f5185eeff7b44d7e8fac3
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/_cffi_src/build_commoncrypto.py
skeuomorf/cryptography
6e040cb7deb3ed16963f5185eeff7b44d7e8fac3
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from _cffi_src.utils import build_ffi_for_binding ffi = build_ffi_for_b...
26.2
79
0.655216
from __future__ import absolute_import, division, print_function from _cffi_src.utils import build_ffi_for_binding ffi = build_ffi_for_binding( module_name="_commoncrypto", module_prefix="_cffi_src.commoncrypto.", modules=[ "cf", "common_digest", "common_hmac", "common...
true
true
1c2692e067cee7cd3b7e85e4bd86897e903c72ac
8,308
py
Python
lib/ruyaml/composer.py
grahamgower/ruyaml
9623d0a57e745999c0ec816909868e844b6ef030
[ "MIT" ]
null
null
null
lib/ruyaml/composer.py
grahamgower/ruyaml
9623d0a57e745999c0ec816909868e844b6ef030
[ "MIT" ]
null
null
null
lib/ruyaml/composer.py
grahamgower/ruyaml
9623d0a57e745999c0ec816909868e844b6ef030
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import, print_function import warnings from typing import Any, Dict from ruyaml.compat import nprint, nprintf # NOQA from ruyaml.error import MarkedYAMLError, ReusedAnchorWarning from ruyaml.events import ( AliasEvent, MappingEndEvent, MappingStartEvent, ...
34.907563
92
0.581367
from __future__ import absolute_import, print_function import warnings from typing import Any, Dict from ruyaml.compat import nprint, nprintf from ruyaml.error import MarkedYAMLError, ReusedAnchorWarning from ruyaml.events import ( AliasEvent, MappingEndEvent, MappingStartEvent, ScalarEvent, S...
true
true
1c2693637298ec9b687b551fee6be9b141af47b2
8,929
py
Python
contrib/linearize/linearize-data.py
altcoin-forge/gravium
7688546d7868d8d18676ca31b018fadb1922d1a9
[ "MIT" ]
null
null
null
contrib/linearize/linearize-data.py
altcoin-forge/gravium
7688546d7868d8d18676ca31b018fadb1922d1a9
[ "MIT" ]
null
null
null
contrib/linearize/linearize-data.py
altcoin-forge/gravium
7688546d7868d8d18676ca31b018fadb1922d1a9
[ "MIT" ]
2
2018-05-23T17:49:56.000Z
2021-11-03T16:39:15.000Z
#!/usr/bin/python # # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import print_func...
29.179739
108
0.689439
from __future__ import print_function, division import json import struct import re import os import os.path import base64 import httplib import sys import hashlib import gravium_hash import datetime import time from collections import namedtuple settings = {} def uint32(x): return x & 0xffffffffL def byte...
false
true
1c2693f18798be4f4a5205c837354b1913e2899f
1,095
py
Python
retro_snake/serve.py
seblaz/retro-snake
ea4977cb743a86164942dbd981443fe3c3c62b10
[ "MIT" ]
null
null
null
retro_snake/serve.py
seblaz/retro-snake
ea4977cb743a86164942dbd981443fe3c3c62b10
[ "MIT" ]
null
null
null
retro_snake/serve.py
seblaz/retro-snake
ea4977cb743a86164942dbd981443fe3c3c62b10
[ "MIT" ]
null
null
null
import threading from flask import Flask from flask import render_template from flask import jsonify from retro_snake.snake import Snake app = Flask(__name__) @app.route('/') def hello(): return render_template('hello_world.html') @app.route('/snake') def snake(): return render_template('snake.html', sc...
18.25
79
0.66758
import threading from flask import Flask from flask import render_template from flask import jsonify from retro_snake.snake import Snake app = Flask(__name__) @app.route('/') def hello(): return render_template('hello_world.html') @app.route('/snake') def snake(): return render_template('snake.html', sc...
true
true
1c2695048a3567e6aeafd547f61be63922592230
123
py
Python
app/cloudtrail/admin.py
marjamis/informant
b7639f7cdab79320952beb3f5d07875d0b34a4c4
[ "MIT" ]
1
2022-02-28T03:27:56.000Z
2022-02-28T03:27:56.000Z
app/cloudtrail/admin.py
marjamis/informant
b7639f7cdab79320952beb3f5d07875d0b34a4c4
[ "MIT" ]
null
null
null
app/cloudtrail/admin.py
marjamis/informant
b7639f7cdab79320952beb3f5d07875d0b34a4c4
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Searches # Register your models here. admin.site.register(Searches)
17.571429
32
0.804878
from django.contrib import admin from .models import Searches admin.site.register(Searches)
true
true
1c269590cfcb63eb4eec3f64ea2cc1d282a97888
170
py
Python
configs/fp16/hv_pointpillars_secfpn_sbn-all_fp16_2x8_2x_nus-3d.py
lliuz/mmdetection3d
c84285dafd1d6bb53b9d51e697e6de680219891e
[ "Apache-2.0" ]
null
null
null
configs/fp16/hv_pointpillars_secfpn_sbn-all_fp16_2x8_2x_nus-3d.py
lliuz/mmdetection3d
c84285dafd1d6bb53b9d51e697e6de680219891e
[ "Apache-2.0" ]
null
null
null
configs/fp16/hv_pointpillars_secfpn_sbn-all_fp16_2x8_2x_nus-3d.py
lliuz/mmdetection3d
c84285dafd1d6bb53b9d51e697e6de680219891e
[ "Apache-2.0" ]
1
2021-11-22T12:15:37.000Z
2021-11-22T12:15:37.000Z
_base_ = '../pointpillars/hv_pointpillars_secfpn_sbn-all_4x8_2x_nus-3d.py' data = dict(samples_per_gpu=2, workers_per_gpu=2) # fp16 settings fp16 = dict(loss_scale=512.)
34
74
0.794118
_base_ = '../pointpillars/hv_pointpillars_secfpn_sbn-all_4x8_2x_nus-3d.py' data = dict(samples_per_gpu=2, workers_per_gpu=2) fp16 = dict(loss_scale=512.)
true
true
1c26968bba58424c63f919d49c1cd2cdf31e3481
1,538
py
Python
demos/instance_occlsegm/examples/instance_occlsegm/instance_occlusion_segmentation/summarize_logs.py
pazeshun/jsk_apc
0ff42000ad5992f8a31e719a5360a39cf4fa1fde
[ "BSD-3-Clause" ]
null
null
null
demos/instance_occlsegm/examples/instance_occlsegm/instance_occlusion_segmentation/summarize_logs.py
pazeshun/jsk_apc
0ff42000ad5992f8a31e719a5360a39cf4fa1fde
[ "BSD-3-Clause" ]
2
2019-04-11T05:36:23.000Z
2019-08-19T12:58:10.000Z
demos/instance_occlsegm/examples/instance_occlsegm/instance_occlusion_segmentation/summarize_logs.py
pazeshun/jsk_apc
0ff42000ad5992f8a31e719a5360a39cf4fa1fde
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import argparse import os.path as osp import instance_occlsegm_lib if __name__ == '__main__': here = osp.dirname(osp.abspath(__file__)) default_logs_dir = osp.join(here, 'logs') parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter) p...
27.464286
78
0.579324
import argparse import os.path as osp import instance_occlsegm_lib if __name__ == '__main__': here = osp.dirname(osp.abspath(__file__)) default_logs_dir = osp.join(here, 'logs') parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('l...
true
true
1c26970a385bffc1ec8a9529936381a1182e5320
4,472
py
Python
pybo/pipeline/pipelinebase.py
evanyerburgh/pybo
d26bb298992276949227b8c4c596f2c209cbb507
[ "Apache-2.0" ]
null
null
null
pybo/pipeline/pipelinebase.py
evanyerburgh/pybo
d26bb298992276949227b8c4c596f2c209cbb507
[ "Apache-2.0" ]
null
null
null
pybo/pipeline/pipelinebase.py
evanyerburgh/pybo
d26bb298992276949227b8c4c596f2c209cbb507
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from pathlib import Path from ..config import Config class PipelineBase: def __init__(self, profile, pipes=None): self.pipes = pipes self.prep = None self.tok = None self.mod = None self.form = None self.left = 5 self.right = 5 sel...
36.357724
121
0.55814
from pathlib import Path from ..config import Config class PipelineBase: def __init__(self, profile, pipes=None): self.pipes = pipes self.prep = None self.tok = None self.mod = None self.form = None self.left = 5 self.right = 5 self.prof = None ...
true
true
1c2697194aa7ba228914a616fa68881021b0eb11
5,753
py
Python
dexbot/config.py
LocalCoinIS/DEXBot
aa45ae880faf0a54ca9a92dddd87b73a0d94150c
[ "MIT" ]
null
null
null
dexbot/config.py
LocalCoinIS/DEXBot
aa45ae880faf0a54ca9a92dddd87b73a0d94150c
[ "MIT" ]
null
null
null
dexbot/config.py
LocalCoinIS/DEXBot
aa45ae880faf0a54ca9a92dddd87b73a0d94150c
[ "MIT" ]
null
null
null
import os import pathlib from dexbot import APP_NAME, AUTHOR from dexbot.node_manager import get_sorted_nodelist import appdirs from ruamel import yaml from collections import OrderedDict DEFAULT_CONFIG_DIR = appdirs.user_config_dir(APP_NAME, appauthor=AUTHOR) DEFAULT_CONFIG_FILE = os.path.join(DEFAULT_CONFIG_DIR, ...
32.320225
86
0.628715
import os import pathlib from dexbot import APP_NAME, AUTHOR from dexbot.node_manager import get_sorted_nodelist import appdirs from ruamel import yaml from collections import OrderedDict DEFAULT_CONFIG_DIR = appdirs.user_config_dir(APP_NAME, appauthor=AUTHOR) DEFAULT_CONFIG_FILE = os.path.join(DEFAULT_CONFIG_DIR, ...
true
true
1c26981c6b35f9373d64f9b23b9257ea75c8212c
19,755
py
Python
test/discover_coverage.py
mathandy/functorch
8d82eb3bb963e6d83d62df2f17b91ab6381dc1f0
[ "BSD-3-Clause" ]
null
null
null
test/discover_coverage.py
mathandy/functorch
8d82eb3bb963e6d83d62df2f17b91ab6381dc1f0
[ "BSD-3-Clause" ]
null
null
null
test/discover_coverage.py
mathandy/functorch
8d82eb3bb963e6d83d62df2f17b91ab6381dc1f0
[ "BSD-3-Clause" ]
null
null
null
import torch import copy from torch.testing._internal.common_methods_invocations import op_db from enum import Enum import functorch._src.top_operators_github_usage as top_ops import pprint import unittest # Importing these files make modifications to the op_db that we need import test_ops # noqa: F401 import test_vm...
33.769231
100
0.675677
import torch import copy from torch.testing._internal.common_methods_invocations import op_db from enum import Enum import functorch._src.top_operators_github_usage as top_ops import pprint import unittest import test_ops import test_vmap all_overridable = list(torch.overrides.get_testing_overrides().keys()) pu...
true
true
1c26982139639680b640d48344efdd75f8eaecc7
5,941
py
Python
utz/use.py
ryan-williams/jupyter-rc
362d9d758498de317976006ce7dfc65e2bce2c57
[ "MIT" ]
null
null
null
utz/use.py
ryan-williams/jupyter-rc
362d9d758498de317976006ce7dfc65e2bce2c57
[ "MIT" ]
2
2020-11-18T15:36:35.000Z
2021-06-25T18:21:32.000Z
utz/use.py
runsascoded/utz
362d9d758498de317976006ce7dfc65e2bce2c57
[ "MIT" ]
1
2020-06-10T23:14:00.000Z
2020-06-10T23:14:00.000Z
from contextlib import contextmanager from ctypes import pythonapi, py_object, c_int from inspect import stack from sys import stderr from .methods import Methods IVAR_KWARG_NAME = 'ivars' METHOD_KWARG_NAME = 'methods' CMETHOD_KWARG_NAMES = ['cmethods','classmethods'] SMETHOD_KWARG_NAMES = ['smethods','staticmethods...
40.141892
122
0.523818
from contextlib import contextmanager from ctypes import pythonapi, py_object, c_int from inspect import stack from sys import stderr from .methods import Methods IVAR_KWARG_NAME = 'ivars' METHOD_KWARG_NAME = 'methods' CMETHOD_KWARG_NAMES = ['cmethods','classmethods'] SMETHOD_KWARG_NAMES = ['smethods','staticmethods...
true
true
1c26987ec2cb105cc52e1945895392eb38f5e455
219
py
Python
wikis/files.py
mouradmourafiq/django-wikis
211438675b9ae63aa15c19f3d0a8c08582028557
[ "BSD-2-Clause" ]
1
2017-04-27T07:27:12.000Z
2017-04-27T07:27:12.000Z
wikis/files.py
mouradmourafiq/django-wikis
211438675b9ae63aa15c19f3d0a8c08582028557
[ "BSD-2-Clause" ]
null
null
null
wikis/files.py
mouradmourafiq/django-wikis
211438675b9ae63aa15c19f3d0a8c08582028557
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- def get_attachment_path(instance, filename): """Store file, appending new extension for added security""" dir = "uploads/%s/%s" % (instance.event.get_url()[:32], filename) return dir
36.5
69
0.6621
def get_attachment_path(instance, filename): dir = "uploads/%s/%s" % (instance.event.get_url()[:32], filename) return dir
true
true
1c269ac33247b0421046caaecab7dbe60d45c064
3,782
py
Python
services/grafanads/annotations.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
services/grafanads/annotations.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
services/grafanads/annotations.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
#!./bin/python # --------------------------------------------------------------------- # annotations handler # --------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------...
35.679245
95
0.44606
import operator from time import mktime import tornado.web import orjson import dateutil.parser from dateutil import tz from noc.sa.models.managedobject import ManagedObject from noc.fm.models.activealarm import ActiveAlarm from noc.fm.models.archivedalarm import ArchivedAlarm from noc.fm.models.alarmclass...
true
true
1c269c0fae920f7b555167cc1098cf53f93814e2
3,366
py
Python
lib/logger.py
borovik135/VisSatSatelliteStereo
e591e8753c48e231d2c5cce74d37df2252c4ed93
[ "BSD-3-Clause" ]
37
2019-11-22T14:55:36.000Z
2022-03-27T07:52:18.000Z
lib/logger.py
borovik135/VisSatSatelliteStereo
e591e8753c48e231d2c5cce74d37df2252c4ed93
[ "BSD-3-Clause" ]
11
2020-02-10T16:23:25.000Z
2022-03-12T00:47:32.000Z
lib/logger.py
borovik135/VisSatSatelliteStereo
e591e8753c48e231d2c5cce74d37df2252c4ed93
[ "BSD-3-Clause" ]
14
2020-03-19T06:19:06.000Z
2022-02-16T07:59:38.000Z
# =============================================================================================================== # Copyright (c) 2019, Cornell University. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that # the following conditions...
47.408451
115
0.684492
import logging import sys class GlobalLogger(object): def __init__(self): logging.root.setLevel(logging.INFO) self.file_handler = None self.stream_handler = None def set_log_file(self, log_file): if self.file_handler is not None: ...
true
true
1c269c339b5e41567b3429099468bb031e4e246e
5,942
py
Python
tests/test_export.py
Mozin/d6tflow
e332e2244d5d98362eb7d15b4c7800a14a4a56e5
[ "MIT" ]
1,004
2019-01-11T09:59:26.000Z
2022-03-31T17:48:50.000Z
tests/test_export.py
Mozin/d6tflow
e332e2244d5d98362eb7d15b4c7800a14a4a56e5
[ "MIT" ]
27
2019-03-28T02:29:40.000Z
2022-02-07T12:38:17.000Z
tests/test_export.py
Mozin/d6tflow
e332e2244d5d98362eb7d15b4c7800a14a4a56e5
[ "MIT" ]
73
2019-02-27T03:13:15.000Z
2021-08-29T06:10:25.000Z
#************************************************** # setup #************************************************** import d6tflow import luigi import pandas as pd df = pd.DataFrame({'a': range(10)}) class Task1A0(d6tflow.tasks.TaskCache): pass class Task1A(Task1A0): persist=['df','df2'] idx=luigi.IntParamet...
30.787565
148
0.695557
import d6tflow import luigi import pandas as pd df = pd.DataFrame({'a': range(10)}) class Task1A0(d6tflow.tasks.TaskCache): pass class Task1A(Task1A0): persist=['df','df2'] idx=luigi.IntParameter(default=1) idx2=luigi.Parameter(default='test') def run(self): self.save({'df':df,'df2':df...
true
true
1c269c3d658b64ddabf29cf233f4383f5f0bbbcc
1,906
py
Python
mayan/apps/document_signatures/urls.py
edsonbin/maxacali
1fd3ac99543788f77f1a7795981179b2cc8c4421
[ "Apache-2.0" ]
1
2020-07-15T02:56:02.000Z
2020-07-15T02:56:02.000Z
mayan/apps/document_signatures/urls.py
kyper999/mayan-edms
ca7b8301a1f68548e8e718d42a728a500d67286e
[ "Apache-2.0" ]
null
null
null
mayan/apps/document_signatures/urls.py
kyper999/mayan-edms
ca7b8301a1f68548e8e718d42a728a500d67286e
[ "Apache-2.0" ]
2
2020-02-24T21:02:31.000Z
2021-01-05T23:52:01.000Z
from __future__ import unicode_literals from django.conf.urls import patterns, url from .views import ( AllDocumentSignatureVerifyView, DocumentVersionDetachedSignatureCreateView, DocumentVersionEmbeddedSignatureCreateView, DocumentVersionSignatureDeleteView, DocumentVersionSignatureDetailView, Docume...
34.035714
79
0.698321
from __future__ import unicode_literals from django.conf.urls import patterns, url from .views import ( AllDocumentSignatureVerifyView, DocumentVersionDetachedSignatureCreateView, DocumentVersionEmbeddedSignatureCreateView, DocumentVersionSignatureDeleteView, DocumentVersionSignatureDetailView, Docume...
true
true
1c269c7221ff786545ac97e06aa22600e04d0072
4,499
py
Python
pyvisgraph/shortest_path.py
TaipanRex/oceanspp
9472e0df7ca7bfa5f45932ca348222bdc1f7e688
[ "MIT" ]
181
2016-10-16T14:06:01.000Z
2022-02-02T02:47:37.000Z
pyvisgraph/shortest_path.py
TaipanRex/oceanspp
9472e0df7ca7bfa5f45932ca348222bdc1f7e688
[ "MIT" ]
51
2016-10-16T12:26:21.000Z
2022-01-20T08:23:03.000Z
pyvisgraph/shortest_path.py
TaipanRex/oceanspp
9472e0df7ca7bfa5f45932ca348222bdc1f7e688
[ "MIT" ]
56
2016-10-20T22:26:35.000Z
2021-08-04T22:10:18.000Z
""" The MIT License (MIT) Copyright (c) 2016 Christian August Reksten-Monsen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
32.601449
80
0.615915
from heapq import heapify, heappush, heappop from pyvisgraph.visible_vertices import edge_distance try: dict.iteritems except AttributeError: def iteritems(d): return iter(d.items()) else: def iteritems(d): return d.iteritems() def dijkstra(graph, origin, destinatio...
true
true
1c269cc95c4c76cc7ddceb621a5807776d9946c8
1,048
py
Python
tools/print_config.py
zhyever/Monocular-Depth-Estimation-Toolbox
c591b9711321450387ffa7322ec1db9a340347c2
[ "Apache-2.0" ]
21
2022-03-12T01:42:05.000Z
2022-03-31T17:01:45.000Z
tools/print_config.py
zhyever/Monocular-Depth-Estimation-Toolbox
c591b9711321450387ffa7322ec1db9a340347c2
[ "Apache-2.0" ]
2
2022-03-29T10:50:33.000Z
2022-03-30T10:40:53.000Z
tools/print_config.py
zhyever/Monocular-Depth-Estimation-Toolbox
c591b9711321450387ffa7322ec1db9a340347c2
[ "Apache-2.0" ]
3
2022-03-26T11:52:44.000Z
2022-03-30T21:24:16.000Z
# Copyright (c) OpenMMLab. All rights reserved. import argparse from mmcv import Config, DictAction from depth.apis import init_depther def parse_args(): parser = argparse.ArgumentParser(description='Print the whole config') parser.add_argument('config', help='config file path') parser.add_argument( ...
26.2
76
0.656489
import argparse from mmcv import Config, DictAction from depth.apis import init_depther def parse_args(): parser = argparse.ArgumentParser(description='Print the whole config') parser.add_argument('config', help='config file path') parser.add_argument( '--graph', action='store_true', help='prin...
true
true
1c269f29d4f3f1576c663cfdffab09a3da09a075
6,131
py
Python
loldib/getratings/models/NA/na_zed/na_zed_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_zed/na_zed_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_zed/na_zed_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings class NA_Zed_Mid_Aatrox(Ratings): pass class NA_Zed_Mid_Ahri(Ratings): pass class NA_Zed_Mid_Akali(Ratings): pass class NA_Zed_Mid_Alistar(Ratings): pass class NA_Zed_Mid_Amumu(Ratings): pass class NA_Zed_Mid_Anivia(Ratings): pass class NA_Z...
14.702638
46
0.750938
from getratings.models.ratings import Ratings class NA_Zed_Mid_Aatrox(Ratings): pass class NA_Zed_Mid_Ahri(Ratings): pass class NA_Zed_Mid_Akali(Ratings): pass class NA_Zed_Mid_Alistar(Ratings): pass class NA_Zed_Mid_Amumu(Ratings): pass class NA_Zed_Mid_Anivia(Ratings): pass class NA_Z...
true
true
1c26a09e5725a15be08cc7b008ec2b027b5b6810
3,717
py
Python
openrec/tf2/recommenders/dlrm.py
pbaiz/openrec
a00de2345844858194ef43ab6845342114a5be93
[ "Apache-2.0" ]
399
2018-01-04T15:24:02.000Z
2022-03-31T09:39:05.000Z
openrec/tf2/recommenders/dlrm.py
pbaiz/openrec
a00de2345844858194ef43ab6845342114a5be93
[ "Apache-2.0" ]
26
2018-01-14T04:01:28.000Z
2022-02-09T23:36:32.000Z
openrec/tf2/recommenders/dlrm.py
pbaiz/openrec
a00de2345844858194ef43ab6845342114a5be93
[ "Apache-2.0" ]
97
2017-12-22T07:07:35.000Z
2022-01-24T19:04:02.000Z
import sys import tensorflow as tf from tensorflow.keras import Model from openrec.tf2.modules import LatentFactor, SecondOrderFeatureInteraction, MLP class DLRM(Model): def __init__( self, m_spa, ln_emb, ln_bot, ln_top, arch_interaction_op='dot', arch_...
36.80198
104
0.540221
import sys import tensorflow as tf from tensorflow.keras import Model from openrec.tf2.modules import LatentFactor, SecondOrderFeatureInteraction, MLP class DLRM(Model): def __init__( self, m_spa, ln_emb, ln_bot, ln_top, arch_interaction_op='dot', arch_...
true
true
1c26a0b8f74b1a3eeeca72f2eac6d9d7bf20dd98
2,113
py
Python
app/main/views/choose_account.py
TechforgoodCAST/notifications-admin
0a9e06aafd79d0fbe50c26a85bf757aaeaa59340
[ "MIT" ]
null
null
null
app/main/views/choose_account.py
TechforgoodCAST/notifications-admin
0a9e06aafd79d0fbe50c26a85bf757aaeaa59340
[ "MIT" ]
1
2021-10-19T13:34:15.000Z
2021-10-19T13:34:15.000Z
app/main/views/choose_account.py
TechforgoodCAST/notifications-admin
0a9e06aafd79d0fbe50c26a85bf757aaeaa59340
[ "MIT" ]
1
2021-03-05T13:18:44.000Z
2021-03-05T13:18:44.000Z
from flask import redirect, render_template, session, url_for from flask_login import current_user from app import status_api_client from app.main import main from app.models.organisation import Organisations from app.utils import PermanentRedirect from app.utils.user import user_is_logged_in @main.route("/services"...
35.813559
114
0.76053
from flask import redirect, render_template, session, url_for from flask_login import current_user from app import status_api_client from app.main import main from app.models.organisation import Organisations from app.utils import PermanentRedirect from app.utils.user import user_is_logged_in @main.route("/services"...
true
true
1c26a1399008ffd03690c070fe2b8edcf6d79992
14,398
py
Python
azurelinuxagent/common/event.py
sundaxi/WALinuxAgent
416b8b10b27a4cb0d4988834d26af7aae6836d84
[ "Apache-2.0" ]
null
null
null
azurelinuxagent/common/event.py
sundaxi/WALinuxAgent
416b8b10b27a4cb0d4988834d26af7aae6836d84
[ "Apache-2.0" ]
null
null
null
azurelinuxagent/common/event.py
sundaxi/WALinuxAgent
416b8b10b27a4cb0d4988834d26af7aae6836d84
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
34.946602
107
0.658078
import atexit import datetime import json import os import sys import time import traceback from datetime import datetime import azurelinuxagent.common.conf as conf import azurelinuxagent.common.logger as logger from azurelinuxagent.common.exception import EventError from azurelinuxagent.common.futu...
true
true
1c26a1e7d4e60041b96901cf674be16d3b20ced3
7,975
py
Python
venv/lib/python3.9/site-packages/pendulum/interval.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
224
2020-01-02T10:46:37.000Z
2022-03-02T13:54:08.000Z
venv/lib/python3.9/site-packages/pendulum/interval.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
16
2020-03-11T09:37:58.000Z
2022-01-26T10:22:08.000Z
venv/lib/python3.9/site-packages/pendulum/interval.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
24
2020-03-24T13:53:50.000Z
2022-03-22T11:55:18.000Z
# -*- coding: utf-8 -*- from datetime import timedelta from .mixins.interval import ( WordableIntervalMixin ) from .constants import ( SECONDS_PER_DAY, SECONDS_PER_HOUR, SECONDS_PER_MINUTE ) def _divide_and_round(a, b): """divide a by b and round result to the nearest integer When the ratio is...
25.725806
91
0.594608
from datetime import timedelta from .mixins.interval import ( WordableIntervalMixin ) from .constants import ( SECONDS_PER_DAY, SECONDS_PER_HOUR, SECONDS_PER_MINUTE ) def _divide_and_round(a, b): q, r = divmod(a, b) r *= 2 greater_than_half = r > b if b > 0 else r ...
true
true
1c26a238f0862503bc3b20597bc4155c950ca142
5,364
py
Python
lib/gui/_config.py
aaman123/faceswap
a5825c3457b062c1824ef3f8b02e4f3fa4c2217f
[ "MIT" ]
2
2021-11-11T08:29:01.000Z
2021-11-11T08:34:50.000Z
lib/gui/_config.py
aaman123/faceswap
a5825c3457b062c1824ef3f8b02e4f3fa4c2217f
[ "MIT" ]
null
null
null
lib/gui/_config.py
aaman123/faceswap
a5825c3457b062c1824ef3f8b02e4f3fa4c2217f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Default configurations for models """ import logging import sys import os from tkinter import font as tk_font from matplotlib import font_manager from lib.config import FaceswapConfig logger = logging.getLogger(__name__) # pylint: disable=invalid-name class Config(FaceswapConfig): "...
44.7
98
0.613162
import logging import sys import os from tkinter import font as tk_font from matplotlib import font_manager from lib.config import FaceswapConfig logger = logging.getLogger(__name__) class Config(FaceswapConfig): def set_defaults(self): logger.debug("Setting defaults") self.set_globals(...
true
true
1c26a271102b80513952d8aa7be025f618f64efe
9,607
py
Python
models/SRGAN.py
AvivSham/SRGAN-Keras_Implementation
f4a9dc15d34575245e28b693ac5db9faf7b6aa08
[ "MIT" ]
28
2019-03-06T10:13:39.000Z
2021-09-19T12:14:36.000Z
models/SRGAN.py
AvivSham/SRGAN-Keras_Implementation
f4a9dc15d34575245e28b693ac5db9faf7b6aa08
[ "MIT" ]
9
2019-06-10T20:56:43.000Z
2022-01-04T13:59:50.000Z
models/SRGAN.py
AvivSham/SRGAN-Keras_Implementation
f4a9dc15d34575245e28b693ac5db9faf7b6aa08
[ "MIT" ]
30
2019-03-03T07:17:18.000Z
2022-02-23T14:50:45.000Z
from tqdm import tqdm as tqdm import numpy as np import matplotlib.pyplot as plt from keras.models import Input, Model from keras.layers import BatchNormalization, LeakyReLU, Conv2D, Dense, \ Flatten, Add, PReLU, Conv2DTranspose, Lambda, UpSampling2D from keras.optimizers import Adam from keras.applications import ...
39.372951
104
0.618507
from tqdm import tqdm as tqdm import numpy as np import matplotlib.pyplot as plt from keras.models import Input, Model from keras.layers import BatchNormalization, LeakyReLU, Conv2D, Dense, \ Flatten, Add, PReLU, Conv2DTranspose, Lambda, UpSampling2D from keras.optimizers import Adam from keras.applications import ...
true
true
1c26a2cf9f59d102e6ad075179f8fed4188eb237
8,283
py
Python
train_mlm.py
JosephineRabbit/MLMSNet
755e07afd1c19797b02cf88b7bbb195112ffec77
[ "MIT" ]
61
2019-04-23T15:17:36.000Z
2021-08-20T15:48:11.000Z
train_mlm.py
zhuxinang/MLMSNet
a824a70fa37aeb4536bc72d8032e871328c687e8
[ "MIT" ]
8
2019-05-04T04:38:26.000Z
2020-08-16T15:15:15.000Z
train_mlm.py
JosephineRabbit/MLMSNet
755e07afd1c19797b02cf88b7bbb195112ffec77
[ "MIT" ]
7
2019-06-12T07:02:06.000Z
2020-09-20T02:37:36.000Z
from mlm_model import * from collections import OrderedDict from data_mlm import * import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" def process_data_dir(data_dir): files = os.listdir(data_dir) files = map(lambda x: os.path.join(data_dir, x), files) return sorted(files) TR_sal_dirs = [ ("/home/arche...
30.01087
131
0.646384
from mlm_model import * from collections import OrderedDict from data_mlm import * import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" def process_data_dir(data_dir): files = os.listdir(data_dir) files = map(lambda x: os.path.join(data_dir, x), files) return sorted(files) TR_sal_dirs = [ ("/home/arche...
true
true
1c26a3c6daa7ce4327d20ddeb6cdfaf1242b4bee
8,082
py
Python
spark_fhir_schemas/r4/complex_types/humanname.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
spark_fhir_schemas/r4/complex_types/humanname.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
spark_fhir_schemas/r4/complex_types/humanname.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
from typing import Union, List, Optional from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType # This file is auto-generated by generate_schema so do not edit it manually # noinspection PyPep8Naming class HumanNameSchema: """ A human's name with the ability to identify parts ...
46.988372
96
0.573868
from typing import Union, List, Optional from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType class HumanNameSchema: @staticmethod def get_schema( max_nesting_depth: Optional[int] = 6, nesting_depth: int = 0, nesting_list: List[str] = [], ...
true
true
1c26a515fdee3160b883b6864aafb8e5c517f76b
25,710
py
Python
venv/lib/python3.8/site-packages/keras/layers/preprocessing/text_vectorization.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
1
2021-05-24T10:08:51.000Z
2021-05-24T10:08:51.000Z
venv/lib/python3.8/site-packages/keras/layers/preprocessing/text_vectorization.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/keras/layers/preprocessing/text_vectorization.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44.558059
101
0.687087
import tensorflow.compat.v2 as tf import numpy as np from keras import backend from keras.engine import base_preprocessing_layer from keras.layers.preprocessing import index_lookup from keras.layers.preprocessing import string_lookup from keras.utils import layer_utils from keras.utils import tf_utils ...
true
true
1c26a54caa7d9ad07b9adb27c3dd06150aab1de0
71
py
Python
helpers/jwtmanager.py
firmanJS/boilerplate-flask
113bdb342860289642528dac9b89cc080f001992
[ "MIT" ]
2
2021-02-01T08:00:59.000Z
2021-11-01T07:19:50.000Z
helpers/jwtmanager.py
firmanJS/boilerplate-flask
113bdb342860289642528dac9b89cc080f001992
[ "MIT" ]
null
null
null
helpers/jwtmanager.py
firmanJS/boilerplate-flask
113bdb342860289642528dac9b89cc080f001992
[ "MIT" ]
null
null
null
from flask_jwt_extended import (JWTManager) jwtmanager = JWTManager()
17.75
43
0.816901
from flask_jwt_extended import (JWTManager) jwtmanager = JWTManager()
true
true
1c26a5869f8df9920b4f684355fcaf27bf0dfe21
150
py
Python
test/itest.py
Bauble/bauble.api
183c97fda076ea870e21e70ecf89a2a94a7f5722
[ "BSD-3-Clause" ]
1
2018-06-12T12:03:00.000Z
2018-06-12T12:03:00.000Z
test/itest.py
Bauble/bauble.webapp
4a174d031db420aacdd267068712a114964900c2
[ "BSD-3-Clause" ]
1
2015-02-05T13:15:00.000Z
2015-02-05T13:15:00.000Z
test/itest.py
Bauble/bauble.api
183c97fda076ea870e21e70ecf89a2a94a7f5722
[ "BSD-3-Clause" ]
null
null
null
# This is used to setup an ipython session for interactive testing # import bauble.model as model import sqlalchemy as sa import sqlalchemy.orm as orm
30
66
0.813333
import bauble.model as model import sqlalchemy as sa import sqlalchemy.orm as orm
true
true
1c26a6006538ca9bb08afcbc27b838122d4a0149
4,791
py
Python
contrib/Matting/predict.py
632652101/PaddleSeg
6b68b0a766710e49c6e20b255b9de347b168188e
[ "Apache-2.0" ]
1
2021-11-15T02:53:36.000Z
2021-11-15T02:53:36.000Z
contrib/Matting/predict.py
wwwgzr/PaddleSeg
47073a2cf1d1172cbfe09d5fa869c7d11be3e6dd
[ "Apache-2.0" ]
null
null
null
contrib/Matting/predict.py
wwwgzr/PaddleSeg
47073a2cf1d1172cbfe09d5fa869c7d11be3e6dd
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
31.94
111
0.607806
import argparse import os from paddleseg.cvlibs import manager, Config from paddleseg.utils import get_sys_env, logger from core import predict from model import * from dataset import MattingDataset def parse_args(): parser = argparse.ArgumentParser(description='Model training') parser.add_arg...
true
true
1c26a643d2257823c07aa74b6ccf9e4c35d88639
2,221
py
Python
src/pytorch_retinanet/model_dpn.py
dendisuhubdy/kaggle-rsna
4b690b2ce0e5d4b324d757e8a808accd15c951aa
[ "MIT" ]
120
2020-01-03T17:13:57.000Z
2021-12-29T13:23:10.000Z
src/pytorch_retinanet/model_dpn.py
dendisuhubdy/kaggle-rsna
4b690b2ce0e5d4b324d757e8a808accd15c951aa
[ "MIT" ]
6
2020-06-09T13:03:26.000Z
2021-12-14T12:32:40.000Z
src/pytorch_retinanet/model_dpn.py
dendisuhubdy/kaggle-rsna
4b690b2ce0e5d4b324d757e8a808accd15c951aa
[ "MIT" ]
23
2020-03-22T14:17:02.000Z
2022-01-31T19:14:09.000Z
from collections import OrderedDict import torch.nn as nn import torch import torch.utils.model_zoo as model_zoo from pretrainedmodels.models import dpn from .model import RetinaNet, RetinaNetEncoder class DPNEncoder(RetinaNetEncoder): def __init__(self, **kwargs): super().__init__() self.encode...
30.424658
102
0.598829
from collections import OrderedDict import torch.nn as nn import torch import torch.utils.model_zoo as model_zoo from pretrainedmodels.models import dpn from .model import RetinaNet, RetinaNetEncoder class DPNEncoder(RetinaNetEncoder): def __init__(self, **kwargs): super().__init__() self.encode...
true
true
1c26a78fce0a7f9df10ca53686d128434d95ea82
26,455
py
Python
aiogram/dispatcher/filters/builtin.py
muhammedfurkan/aiogram
692c1340b4dda556da640e5f9ea2200848c06840
[ "MIT" ]
null
null
null
aiogram/dispatcher/filters/builtin.py
muhammedfurkan/aiogram
692c1340b4dda556da640e5f9ea2200848c06840
[ "MIT" ]
4
2020-11-04T15:55:55.000Z
2020-11-08T21:36:02.000Z
aiogram/dispatcher/filters/builtin.py
muhammedfurkan/aiogram
692c1340b4dda556da640e5f9ea2200848c06840
[ "MIT" ]
null
null
null
import inspect import re import typing import warnings from contextvars import ContextVar from dataclasses import dataclass, field from typing import Any, Dict, Iterable, Optional, Union from babel.support import LazyProxy from aiogram import types from aiogram.dispatcher.filters.filters import BoundFilter, Filter fr...
30.548499
137
0.584729
import inspect import re import typing import warnings from contextvars import ContextVar from dataclasses import dataclass, field from typing import Any, Dict, Iterable, Optional, Union from babel.support import LazyProxy from aiogram import types from aiogram.dispatcher.filters.filters import BoundFilter, Filter fr...
true
true
1c26a7defab317eb224ad28f1c688c75b6768236
36,500
py
Python
manim/scene/scene.py
huguesdevimeux/trytravis-manim
40498759efc089246b6c46717223e55757488d03
[ "MIT" ]
null
null
null
manim/scene/scene.py
huguesdevimeux/trytravis-manim
40498759efc089246b6c46717223e55757488d03
[ "MIT" ]
null
null
null
manim/scene/scene.py
huguesdevimeux/trytravis-manim
40498759efc089246b6c46717223e55757488d03
[ "MIT" ]
1
2020-06-11T22:40:34.000Z
2020-06-11T22:40:34.000Z
import inspect import random import warnings import platform from tqdm import tqdm as ProgressDisplay import numpy as np from ..animation.animation import Animation from ..animation.transform import MoveToTarget, ApplyMethod from ..camera.camera import Camera from ..constants import * from ..config import camera_conf...
31.06383
99
0.580055
import inspect import random import warnings import platform from tqdm import tqdm as ProgressDisplay import numpy as np from ..animation.animation import Animation from ..animation.transform import MoveToTarget, ApplyMethod from ..camera.camera import Camera from ..constants import * from ..config import camera_conf...
true
true
1c26a7ed1bd9d58e03a4e797cbb4b524afe61ba5
440
py
Python
pacote download/lista-exercicios/ex035.py
GiseleViedenhelfen/ExerciciosPython
b616b97a15484aac4980968197955702bd7aaa6d
[ "MIT" ]
null
null
null
pacote download/lista-exercicios/ex035.py
GiseleViedenhelfen/ExerciciosPython
b616b97a15484aac4980968197955702bd7aaa6d
[ "MIT" ]
null
null
null
pacote download/lista-exercicios/ex035.py
GiseleViedenhelfen/ExerciciosPython
b616b97a15484aac4980968197955702bd7aaa6d
[ "MIT" ]
null
null
null
#Para construir um triângulo é necessário que a medida de qualquer um dos lados seja menor que a soma das medidas #dos outros dois reta1 = float(input('Primeira reta:')) reta2 = float(input('Segunda reta:')) reta3 = float(input('Terceira reta:')) if reta1 < reta3 + reta2 and reta2 < reta3 + reta1 and reta3 < reta1 + re...
44
113
0.725
reta1 = float(input('Primeira reta:')) reta2 = float(input('Segunda reta:')) reta3 = float(input('Terceira reta:')) if reta1 < reta3 + reta2 and reta2 < reta3 + reta1 and reta3 < reta1 + reta2: print('É possível formar triângulo com essas 3 retas!') else: print('Não é possível formar um triângulo!')
true
true
1c26a8dd38bdb5688e1fcf4952ad570e017d4948
3,105
py
Python
tests/test_oauth2/test_password.py
PCMan/flask-oauthlib
3735210211ac0e50c4d32b887bbd61722dd175c7
[ "BSD-3-Clause" ]
1,292
2015-01-04T03:20:35.000Z
2022-03-23T11:08:15.000Z
tests/test_oauth2/test_password.py
PCMan/flask-oauthlib
3735210211ac0e50c4d32b887bbd61722dd175c7
[ "BSD-3-Clause" ]
217
2015-01-05T09:51:41.000Z
2020-09-05T04:41:52.000Z
tests/test_oauth2/test_password.py
PCMan/flask-oauthlib
3735210211ac0e50c4d32b887bbd61722dd175c7
[ "BSD-3-Clause" ]
496
2015-01-04T03:20:35.000Z
2022-03-19T08:31:42.000Z
# coding: utf-8 from .base import TestCase from .base import create_server, sqlalchemy_provider, cache_provider from .base import db, Client, User class TestDefaultProvider(TestCase): def create_server(self): create_server(self.app) def prepare_data(self): self.create_server() oauth...
32.010309
77
0.597101
from .base import TestCase from .base import create_server, sqlalchemy_provider, cache_provider from .base import db, Client, User class TestDefaultProvider(TestCase): def create_server(self): create_server(self.app) def prepare_data(self): self.create_server() oauth_client = Clien...
true
true
1c26aa802e2bca86c5d755be80cbf28b50441470
1,066
py
Python
day/day9part1.py
swemoney/adventofcode2020
94c3c032e68b182881dc545771a79fd884b7cf93
[ "MIT" ]
1
2020-12-07T13:18:09.000Z
2020-12-07T13:18:09.000Z
day/day9part1.py
swemoney/adventofcode2020
94c3c032e68b182881dc545771a79fd884b7cf93
[ "MIT" ]
null
null
null
day/day9part1.py
swemoney/adventofcode2020
94c3c032e68b182881dc545771a79fd884b7cf93
[ "MIT" ]
null
null
null
from functools import cached_property from puzzle import Puzzle # pylint: disable=import-error from dataclasses import dataclass @dataclass class Result: x: int y: int sum_requested: int class Day9Part1: puzzle = None def run(self): self.decode(self.parsed_input, 25) def decode(self,...
28.810811
68
0.595685
from functools import cached_property from puzzle import Puzzle from dataclasses import dataclass @dataclass class Result: x: int y: int sum_requested: int class Day9Part1: puzzle = None def run(self): self.decode(self.parsed_input, 25) def decode(self, data, preamble): for ...
true
true
1c26ab45a23c322a787d4258cfbc3720eaa84313
4,794
py
Python
venv/lib/python3.6/site-packages/ansible_collections/community/network/tests/unit/plugins/modules/network/icx/test_icx_lldp.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/network/tests/unit/plugins/modules/network/icx/test_icx_lldp.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/network/tests/unit/plugins/modules/network/icx/test_icx_lldp.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.network.tests.unit.compat.mock import patch from ansible_collecti...
47.94
137
0.677305
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.network.tests.unit.compat.mock import patch from ansible_collections.community.network.plugins.modules.network.icx import icx_lldp from ansible_collections.community.network.tests.unit.plugins.mo...
true
true
1c26abe8e585135cdc38cb76dc6f47e7e4e8b61f
1,569
py
Python
normalization_metrics.py
VijayReddy119/small_obstacle_discovery
0f1324c7591e433a7ffc69832c4421f4cc9a77ad
[ "MIT" ]
4
2021-04-07T03:41:04.000Z
2022-01-28T14:10:56.000Z
normalization_metrics.py
VijayReddy119/small_obstacle_discovery
0f1324c7591e433a7ffc69832c4421f4cc9a77ad
[ "MIT" ]
2
2022-02-11T02:11:26.000Z
2022-02-14T03:22:38.000Z
normalization_metrics.py
VijayReddy119/small_obstacle_discovery
0f1324c7591e433a7ffc69832c4421f4cc9a77ad
[ "MIT" ]
2
2021-04-06T08:43:36.000Z
2021-04-24T13:27:19.000Z
import sys import numpy as np from tqdm import tqdm from torch.utils.data import DataLoader import utils.helpers as HLP from mypath import Path dataset = 'lnf' train_imgs, train_disp, train_labels = HLP.get_ImagesAndLabels_mergenet(Path.db_root_dir(dataset)) test_imgs, test_disp, test_labels = HLP.get_ImagesAndLabels_...
40.230769
98
0.66348
import sys import numpy as np from tqdm import tqdm from torch.utils.data import DataLoader import utils.helpers as HLP from mypath import Path dataset = 'lnf' train_imgs, train_disp, train_labels = HLP.get_ImagesAndLabels_mergenet(Path.db_root_dir(dataset)) test_imgs, test_disp, test_labels = HLP.get_ImagesAndLabels_...
true
true
1c26ac16070a5bc4f7c007d686f8ae52097db44e
604
py
Python
Assessments 1-8/Ass6/Q1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
1
2020-05-17T03:28:17.000Z
2020-05-17T03:28:17.000Z
Assessments 1-8/Ass6/Q1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
null
null
null
Assessments 1-8/Ass6/Q1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
null
null
null
def main(): # user inputs start, end = eval(input('Please enter a starting number and an ending number: ')) column, space = eval(input("Please enter the number of numbers printed on a row and the number of spaces per item: ")) # outputs print(40*"-") print("\nYour print-out of nu...
37.75
144
0.581126
def main(): start, end = eval(input('Please enter a starting number and an ending number: ')) column, space = eval(input("Please enter the number of numbers printed on a row and the number of spaces per item: ")) print(40*"-") print("\nYour print-out of numbers {0:0}-{1:0} using ...
true
true
1c26ac3c0771d8ba65433a426deca7d5f33fe601
13,760
py
Python
models/auditevent.py
elementechemlyn/CareConnectBuilder
c004fa94c1af64d636ee25de8f13e34fe723b5f3
[ "MIT" ]
39
2017-10-13T19:16:27.000Z
2021-09-24T16:58:21.000Z
models/auditevent.py
elementechemlyn/CareConnectBuilder
c004fa94c1af64d636ee25de8f13e34fe723b5f3
[ "MIT" ]
312
2017-09-08T15:42:13.000Z
2022-03-23T18:21:40.000Z
models/auditevent.py
elementechemlyn/CareConnectBuilder
c004fa94c1af64d636ee25de8f13e34fe723b5f3
[ "MIT" ]
19
2017-09-15T13:58:00.000Z
2022-02-07T18:33:20.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/AuditEvent) on 2017-03-22. # 2017, SMART Health IT. from . import domainresource class AuditEvent(domainresource.DomainResource): """ Event record kept for security purposes. A re...
36.595745
138
0.59811
from . import domainresource class AuditEvent(domainresource.DomainResource): resource_type = "AuditEvent" def __init__(self, jsondict=None, strict=True): self.action = None self.agent = None self.entity = None self.outcome = ...
true
true
1c26ac470ec36f7fb48d089aa518a50c34976912
10,334
py
Python
utils/prep_data.py
anva-kn/ramanflow
0a8852a0a8d57d97e5ccd011bc6bc8659ecd666c
[ "MIT" ]
null
null
null
utils/prep_data.py
anva-kn/ramanflow
0a8852a0a8d57d97e5ccd011bc6bc8659ecd666c
[ "MIT" ]
1
2021-12-05T06:40:27.000Z
2021-12-07T07:18:18.000Z
utils/prep_data.py
anva-kn/ramanflow
0a8852a0a8d57d97e5ccd011bc6bc8659ecd666c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import numpy as np from scipy.optimize import minimize import scipy.interpolate as si import matplotlib.pyplot as plt from tools.ramanflow.loss_functions import pos_mse_loss, positive_mse, poly4, reg_pos_mse_loss, reg_positive_mse, \ reg_pos_loss, mse_loss from scipy import interpolate as si fr...
31.410334
115
0.655603
import numpy as np from scipy.optimize import minimize import scipy.interpolate as si import matplotlib.pyplot as plt from tools.ramanflow.loss_functions import pos_mse_loss, positive_mse, poly4, reg_pos_mse_loss, reg_positive_mse, \ reg_pos_loss, mse_loss from scipy import interpolate as si from itertools import ta...
true
true
1c26ad8d1191ad5790fd40b9920d833d3ccacde8
4,632
py
Python
test/load_data.py
tzhern/COMP30027-Project-2
c8a9a1d216dae6b7b7b30bb8e53a2a084db73b36
[ "MIT" ]
null
null
null
test/load_data.py
tzhern/COMP30027-Project-2
c8a9a1d216dae6b7b7b30bb8e53a2a084db73b36
[ "MIT" ]
null
null
null
test/load_data.py
tzhern/COMP30027-Project-2
c8a9a1d216dae6b7b7b30bb8e53a2a084db73b36
[ "MIT" ]
1
2021-08-23T09:32:32.000Z
2021-08-23T09:32:32.000Z
import pandas as pd import scipy import pickle # load csv files """ name, n_steps, n_ingredients, steps, ingredients """ df_train = pd.read_csv("datasets/recipe_train.csv") df_test = pd.read_csv("datasets/recipe_test.csv") """ # load CountVectorizer (pkl) files """ #This file contains the CountVectorizer extracted us...
61.76
159
0.799655
import pandas as pd import scipy import pickle df_train = pd.read_csv("datasets/recipe_train.csv") df_test = pd.read_csv("datasets/recipe_test.csv")
true
true
1c26ad945ff46b5e24f2b2131fd366fe6f6c1db9
3,282
py
Python
nad.py
TheNetAdmin/NaDict
366f17194067e692fa27298758fd58c92ed0bdd3
[ "MIT" ]
null
null
null
nad.py
TheNetAdmin/NaDict
366f17194067e692fa27298758fd58c92ed0bdd3
[ "MIT" ]
null
null
null
nad.py
TheNetAdmin/NaDict
366f17194067e692fa27298758fd58c92ed0bdd3
[ "MIT" ]
null
null
null
"""NaDict: Not a Dictionary""" import argparse import logging from Config.version import __version__ from DictUtils.Prep import Prep from DictUtils.Translator import Translator from DictUtils.LatexProducer import LatexProducer from DictUtils.Loggers import logging_setup from DictUtils.Dict import Dictionary from DictU...
39.071429
90
0.617002
import argparse import logging from Config.version import __version__ from DictUtils.Prep import Prep from DictUtils.Translator import Translator from DictUtils.LatexProducer import LatexProducer from DictUtils.Loggers import logging_setup from DictUtils.Dict import Dictionary from DictUtils.MarkdownProducer import Ma...
true
true
1c26aee4c097b776b143c859d96b23801b4a477d
17,766
py
Python
tests/models/validators/v2_1_2/jsd_d7a6392845e8969d.py
oboehmer/dnacentersdk
25c4e99900640deee91a56aa886874d9cb0ca960
[ "MIT" ]
32
2019-09-05T05:16:56.000Z
2022-03-22T09:50:38.000Z
tests/models/validators/v2_1_2/jsd_d7a6392845e8969d.py
oboehmer/dnacentersdk
25c4e99900640deee91a56aa886874d9cb0ca960
[ "MIT" ]
35
2019-09-07T18:58:54.000Z
2022-03-24T19:29:36.000Z
tests/models/validators/v2_1_2/jsd_d7a6392845e8969d.py
oboehmer/dnacentersdk
25c4e99900640deee91a56aa886874d9cb0ca960
[ "MIT" ]
18
2019-09-09T11:07:21.000Z
2022-03-25T08:49:59.000Z
# -*- coding: utf-8 -*- """Cisco DNA Center Get User Enrichment Details data model. Copyright (c) 2019-2021 Cisco Systems. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, inc...
25.599424
78
0.242429
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import fastjsonschema import json from dnacentersdk.exceptions import MalformedRequest from builtins import * class JSONSchemaValidatorD7A6392845E8969D(object): def __init__(self): super(JSONSchema...
true
true
1c26af3d324daea01bd010e26bc282c7ce17f9b9
120
py
Python
info/modules/profile/__init__.py
ChenJinGit/info
2e75e2f0aeb974aaadd480bb7e63c1325099b84e
[ "MIT" ]
null
null
null
info/modules/profile/__init__.py
ChenJinGit/info
2e75e2f0aeb974aaadd480bb7e63c1325099b84e
[ "MIT" ]
null
null
null
info/modules/profile/__init__.py
ChenJinGit/info
2e75e2f0aeb974aaadd480bb7e63c1325099b84e
[ "MIT" ]
null
null
null
from flask import Blueprint profile_blue = Blueprint('profile_blue', __name__, url_prefix='/user') from . import views
24
70
0.783333
from flask import Blueprint profile_blue = Blueprint('profile_blue', __name__, url_prefix='/user') from . import views
true
true
1c26af563fa3619980a91a3387d28668e74c2e23
4,853
py
Python
openmdao/components/demux_comp.py
lamkina/OpenMDAO
280bea25449ce2e64637e45b9b4f9f872796afec
[ "Apache-2.0" ]
null
null
null
openmdao/components/demux_comp.py
lamkina/OpenMDAO
280bea25449ce2e64637e45b9b4f9f872796afec
[ "Apache-2.0" ]
null
null
null
openmdao/components/demux_comp.py
lamkina/OpenMDAO
280bea25449ce2e64637e45b9b4f9f872796afec
[ "Apache-2.0" ]
null
null
null
"""Definition of the Demux Component.""" import numpy as np from openmdao.core.explicitcomponent import ExplicitComponent from openmdao.warnings import warn_deprecation class DemuxComp(ExplicitComponent): """ Demux one or more inputs along a given axis. Attributes ---------- _vars : dict ...
35.683824
99
0.561508
import numpy as np from openmdao.core.explicitcomponent import ExplicitComponent from openmdao.warnings import warn_deprecation class DemuxComp(ExplicitComponent): def __init__(self, **kwargs): super().__init__(**kwargs) self._vars = {} self._output_names = {} self._no_check_...
true
true
1c26b06fe25c0b7eb315ca66574100503666e1cd
3,629
py
Python
src/miniboa/xterm.py
Tizen/miniboa
247b608fd22e859c077c3f67032d7b9a3a498fba
[ "Apache-2.0" ]
48
2016-01-18T17:56:48.000Z
2022-01-29T01:11:09.000Z
src/miniboa/xterm.py
Tizen/miniboa
247b608fd22e859c077c3f67032d7b9a3a498fba
[ "Apache-2.0" ]
19
2016-01-20T02:03:03.000Z
2020-06-23T22:44:03.000Z
src/miniboa/xterm.py
Tizen/miniboa
247b608fd22e859c077c3f67032d7b9a3a498fba
[ "Apache-2.0" ]
17
2016-07-04T06:42:48.000Z
2021-05-03T03:08:27.000Z
# -*- coding: utf-8 -*- """ Support for color and formatting for Xterm style clients. """ import re _PARA_BREAK = re.compile(r"(\n\s*\n)", re.MULTILINE) # Caret contants for users to use. BLACK = '^k' BLACK_BACKGROUND = '^0' BRIGHT_BLACK = '^K' BLUE = '^b' BLUE_BACKGROUND = '^4' BRIGHT_BLUE = '^B' CYAN = '^c' CYAN...
25.921429
71
0.51612
import re _PARA_BREAK = re.compile(r"(\n\s*\n)", re.MULTILINE) BLACK = '^k' BLACK_BACKGROUND = '^0' BRIGHT_BLACK = '^K' BLUE = '^b' BLUE_BACKGROUND = '^4' BRIGHT_BLUE = '^B' CYAN = '^c' CYAN_BACKGROUND = '^6' BRIGHT_CYAN = '^C' DEFAULT = '^d' GREEN = '^g' GREEN_BACKGROUND = '^2' BRIGHT_GREEN = '^G' MAGENTA = ...
true
true
1c26b0a3c9eceaea39bf338f27d790c81583b223
1,301
py
Python
examples/signal_bkg_mass_extended_fit.py
simonthor/zfit
97a18cd6cf14240be2cf52185681d0132f866179
[ "BSD-3-Clause" ]
null
null
null
examples/signal_bkg_mass_extended_fit.py
simonthor/zfit
97a18cd6cf14240be2cf52185681d0132f866179
[ "BSD-3-Clause" ]
null
null
null
examples/signal_bkg_mass_extended_fit.py
simonthor/zfit
97a18cd6cf14240be2cf52185681d0132f866179
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021 zfit import matplotlib.pyplot as plt import numpy as np import zfit n_bins = 50 # create space obs = zfit.Space("x", limits=(-10, 10)) # parameters mu = zfit.Parameter("mu", 1., -4, 6) sigma = zfit.Parameter("sigma", 1., 0.1, 10) lambd = zfit.Parameter("lambda", -0.06, -1, -0.01) # model bui...
26.02
92
0.736357
import matplotlib.pyplot as plt import numpy as np import zfit n_bins = 50 obs = zfit.Space("x", limits=(-10, 10)) mu = zfit.Parameter("mu", 1., -4, 6) sigma = zfit.Parameter("sigma", 1., 0.1, 10) lambd = zfit.Parameter("lambda", -0.06, -1, -0.01) gauss = zfit.pdf.Gauss(mu=mu, sigma=sigma, obs=obs) exponentia...
true
true
1c26b1942456489bfa3226ee354a029e6517a66c
1,651
py
Python
app/models.py
dancan-sandys/pitch_project
f039ecebfaab0f7fd67e4c35dabc163f406ea2c8
[ "MIT" ]
null
null
null
app/models.py
dancan-sandys/pitch_project
f039ecebfaab0f7fd67e4c35dabc163f406ea2c8
[ "MIT" ]
null
null
null
app/models.py
dancan-sandys/pitch_project
f039ecebfaab0f7fd67e4c35dabc163f406ea2c8
[ "MIT" ]
null
null
null
from . import db from flask_login import UserMixin from datetime import datetime from. import login_manager class Pitch(db.Model): __tablename__ = 'pitches' pitch_id = db.Column(db.Integer, primary_key = True) category = db.Column(db.String) Pitch = db.Column(db.String) Posting = db.Column(db.Dat...
27.983051
76
0.669897
from . import db from flask_login import UserMixin from datetime import datetime from. import login_manager class Pitch(db.Model): __tablename__ = 'pitches' pitch_id = db.Column(db.Integer, primary_key = True) category = db.Column(db.String) Pitch = db.Column(db.String) Posting = db.Column(db.Dat...
true
true
1c26b1b4cd6d1882c2123dabf2bf1409399320bb
43
py
Python
pynet_ansible/subdir/my.py
joeyb182/pynet_ansible
b8221ebf23937838e0ecf5c71277cb042f408698
[ "Apache-2.0" ]
null
null
null
pynet_ansible/subdir/my.py
joeyb182/pynet_ansible
b8221ebf23937838e0ecf5c71277cb042f408698
[ "Apache-2.0" ]
null
null
null
pynet_ansible/subdir/my.py
joeyb182/pynet_ansible
b8221ebf23937838e0ecf5c71277cb042f408698
[ "Apache-2.0" ]
null
null
null
def print_hello(): print 'hello, world!'
10.75
22
0.674419
def print_hello(): print 'hello, world!'
false
true
1c26b1d48f54834f2436fa6a1df3e0a6622f0e1c
2,732
py
Python
util/rooms/kevins_rooms.py
Polygon-MUD/mud_build
efe18e20545748065d57f9db816be1e4303b5ce9
[ "MIT" ]
null
null
null
util/rooms/kevins_rooms.py
Polygon-MUD/mud_build
efe18e20545748065d57f9db816be1e4303b5ce9
[ "MIT" ]
9
2020-01-07T16:49:07.000Z
2021-09-22T18:24:59.000Z
util/rooms/kevins_rooms.py
Polygon-MUD/mud_build
efe18e20545748065d57f9db816be1e4303b5ce9
[ "MIT" ]
1
2020-01-06T20:22:41.000Z
2020-01-06T20:22:41.000Z
from django.contrib.auth.models import User from adventure.models import Player, Room r_gardner = Room(title="Gardners Garden", description="""This garden has grown the most lavish fruits and vegetables on the planet, look around you for fruits and vegetables.""") r_tomb = Room(title="The Kings Tomb", description=...
46.305085
153
0.763177
from django.contrib.auth.models import User from adventure.models import Player, Room r_gardner = Room(title="Gardners Garden", description="""This garden has grown the most lavish fruits and vegetables on the planet, look around you for fruits and vegetables.""") r_tomb = Room(title="The Kings Tomb", description=...
true
true
1c26b1f4d1c02fbe1bc0db876348892d07a59f91
2,867
py
Python
cms/tests/test_pages.py
DBonbon/pythoneatstail
3f9e8ddd07f891653c82aa396a96709914113f3a
[ "MIT" ]
4
2021-06-18T10:26:24.000Z
2021-11-06T03:50:04.000Z
cms/tests/test_pages.py
DBonbon/pythoneatstail
3f9e8ddd07f891653c82aa396a96709914113f3a
[ "MIT" ]
10
2020-06-03T01:48:21.000Z
2021-09-22T19:02:14.000Z
cms/tests/test_pages.py
DBonbon/pythoneatstail
3f9e8ddd07f891653c82aa396a96709914113f3a
[ "MIT" ]
2
2020-12-06T08:49:36.000Z
2021-02-28T23:19:20.000Z
from .factories import HomePageFactory, ThemeFactory, ThemePageFactory, ArticlePageFactory, \ ThemeIndexPageFactory, ArticleIndexPageFactory from django.test import TestCase, RequestFactory from wagtail.core.models import Page, Site class TestPageModels(TestCase): @classmethod def setUpTestData(cls): ...
54.09434
141
0.755145
from .factories import HomePageFactory, ThemeFactory, ThemePageFactory, ArticlePageFactory, \ ThemeIndexPageFactory, ArticleIndexPageFactory from django.test import TestCase, RequestFactory from wagtail.core.models import Page, Site class TestPageModels(TestCase): @classmethod def setUpTestData(cls): ...
true
true
1c26b29bcf5ef75baf65820b707e95dd7f0c93f7
1,281
py
Python
leopusher/serializers.py
hosseinmoghimi/phoenix2
7ace62969c364f691595f6d230676fd4a35dea44
[ "MIT" ]
null
null
null
leopusher/serializers.py
hosseinmoghimi/phoenix2
7ace62969c364f691595f6d230676fd4a35dea44
[ "MIT" ]
null
null
null
leopusher/serializers.py
hosseinmoghimi/phoenix2
7ace62969c364f691595f6d230676fd4a35dea44
[ "MIT" ]
1
2020-11-12T23:57:20.000Z
2020-11-12T23:57:20.000Z
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import Message,ProfileChannelEvent,PusherChannel,PusherBeam,PusherChannelEvent from authentication.serializers import ProfileSerializer class MessageSerializer(serializers.ModelSerializer): profile=ProfileSerial...
37.676471
91
0.750976
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import Message,ProfileChannelEvent,PusherChannel,PusherBeam,PusherChannelEvent from authentication.serializers import ProfileSerializer class MessageSerializer(serializers.ModelSerializer): profile=ProfileSerial...
true
true
1c26b2ca04713a52525a9eb880605a99cc951dcb
147
py
Python
keylight/types.py
andornaut/keylight
e03d7b66724b0a50cdef56a8354cd1f478e6de0c
[ "MIT" ]
4
2021-02-05T02:55:33.000Z
2022-02-02T23:21:19.000Z
keylight/types.py
andornaut/keylight
e03d7b66724b0a50cdef56a8354cd1f478e6de0c
[ "MIT" ]
null
null
null
keylight/types.py
andornaut/keylight
e03d7b66724b0a50cdef56a8354cd1f478e6de0c
[ "MIT" ]
null
null
null
import dataclasses @dataclasses.dataclass class Flags: brightness: int color: int host: str off: bool on: bool port: int
12.25
22
0.646259
import dataclasses @dataclasses.dataclass class Flags: brightness: int color: int host: str off: bool on: bool port: int
true
true
1c26b2cffbfb2125a0cf2540475359ee25e89576
227
py
Python
like_system/admin.py
dcontm/django-like-systems
30347b00b320bcb22efcce70a6c2f04fd825baa7
[ "MIT" ]
4
2021-01-07T17:37:28.000Z
2021-06-24T12:33:29.000Z
like_system/admin.py
dcontm/django-like-systems
30347b00b320bcb22efcce70a6c2f04fd825baa7
[ "MIT" ]
null
null
null
like_system/admin.py
dcontm/django-like-systems
30347b00b320bcb22efcce70a6c2f04fd825baa7
[ "MIT" ]
null
null
null
from django.contrib import admin from . models import LikeSystem # Register your models here. class LikeSystemAdmin(admin.ModelAdmin): list_display = ("action", "user") admin.site.register(LikeSystem, LikeSystemAdmin)
18.916667
48
0.770925
from django.contrib import admin from . models import LikeSystem class LikeSystemAdmin(admin.ModelAdmin): list_display = ("action", "user") admin.site.register(LikeSystem, LikeSystemAdmin)
true
true
1c26b3476a237d6da8428ceec5266dd7ecec7f42
1,220
py
Python
tests/docx/content_types_xml_tests.py
JoshBarr/python-mammoth
e24c3d90fee2bcc4c2c3ad47e38c0cbba42945d8
[ "BSD-2-Clause" ]
1
2015-08-15T21:53:03.000Z
2015-08-15T21:53:03.000Z
tests/docx/content_types_xml_tests.py
JoshBarr/python-mammoth
e24c3d90fee2bcc4c2c3ad47e38c0cbba42945d8
[ "BSD-2-Clause" ]
null
null
null
tests/docx/content_types_xml_tests.py
JoshBarr/python-mammoth
e24c3d90fee2bcc4c2c3ad47e38c0cbba42945d8
[ "BSD-2-Clause" ]
null
null
null
from nose.tools import istest, assert_equal from mammoth.docx.xmlparser import element as xml_element from mammoth.docx.content_types_xml import read_content_types_xml_element @istest def content_type_is_based_on_default_for_extension_if_there_is_no_override(): element = xml_element("content-types:Types", {}, [ ...
31.282051
77
0.662295
from nose.tools import istest, assert_equal from mammoth.docx.xmlparser import element as xml_element from mammoth.docx.content_types_xml import read_content_types_xml_element @istest def content_type_is_based_on_default_for_extension_if_there_is_no_override(): element = xml_element("content-types:Types", {}, [ ...
true
true
1c26b3cd75eaed13862c22803422ada90505af41
2,384
py
Python
checkov/common/bridgecrew/vulnerability_scanning/integrations/docker_image_scanning.py
vangundy-jason-pfg/checkov
2fb50908f62390c98dda665f1fa94fe24806b654
[ "Apache-2.0" ]
1
2021-02-13T15:24:42.000Z
2021-02-13T15:24:42.000Z
checkov/common/bridgecrew/vulnerability_scanning/integrations/docker_image_scanning.py
vangundy-jason-pfg/checkov
2fb50908f62390c98dda665f1fa94fe24806b654
[ "Apache-2.0" ]
7
2021-04-12T06:54:07.000Z
2022-03-21T14:04:14.000Z
checkov/common/bridgecrew/vulnerability_scanning/integrations/docker_image_scanning.py
vangundy-jason-pfg/checkov
2fb50908f62390c98dda665f1fa94fe24806b654
[ "Apache-2.0" ]
1
2021-12-16T03:09:55.000Z
2021-12-16T03:09:55.000Z
import os from pathlib import Path from typing import Dict, Any from datetime import datetime, timedelta from checkov.common.bridgecrew.platform_integration import bc_integration, BcPlatformIntegration from checkov.common.bridgecrew.vulnerability_scanning.integrations.twistcli import TwistcliIntegration from checkov.c...
36.676923
102
0.605285
import os from pathlib import Path from typing import Dict, Any from datetime import datetime, timedelta from checkov.common.bridgecrew.platform_integration import bc_integration, BcPlatformIntegration from checkov.common.bridgecrew.vulnerability_scanning.integrations.twistcli import TwistcliIntegration from checkov.c...
true
true
1c26b45d52a7ee4bff1c4ab8dc5dd77b37343238
8,351
py
Python
test/functional/feature_proxy.py
noblegascoin/noblegascoin
a2226860968084f889d879b824957d634896b96d
[ "MIT" ]
null
null
null
test/functional/feature_proxy.py
noblegascoin/noblegascoin
a2226860968084f889d879b824957d634896b96d
[ "MIT" ]
null
null
null
test/functional/feature_proxy.py
noblegascoin/noblegascoin
a2226860968084f889d879b824957d634896b96d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test monacoind with different proxy configuration. Test plan: - Start monacoind's with different proxy...
41.341584
121
0.625075
import socket import os from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( PORT_MIN, PORT_RANGE, assert_equal, ) from test_framework.netutil import test_ipv6_lo...
true
true
1c26b4d91c978e3ef1372564731faf8958f8fb42
5,852
py
Python
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/tables/scripts/ptdump.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
4
2018-07-04T17:20:12.000Z
2019-07-14T18:07:25.000Z
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/tables/scripts/ptdump.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
null
null
null
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/tables/scripts/ptdump.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
1
2018-09-03T03:02:06.000Z
2018-09-03T03:02:06.000Z
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: February 10, 2004 # Author: Francesc Alted - faltet@pytables.com # # $Id$ # ######################################################################## """This utility lets you look into the data...
29.705584
79
0.571087
true
true
1c26b61770b660ffed14210ffd552ddb3ac7964d
260
py
Python
web/manage_dev.py
kbarnes3/BaseDjangoSite
34be562d2a3f18cb852f2c655a23002271d6fbce
[ "BSD-2-Clause" ]
1
2022-03-15T11:51:12.000Z
2022-03-15T11:51:12.000Z
web/manage_dev.py
kbarnes3/BaseDjangoSite
34be562d2a3f18cb852f2c655a23002271d6fbce
[ "BSD-2-Clause" ]
10
2019-10-07T17:29:11.000Z
2022-03-25T17:38:54.000Z
web/manage_dev.py
kbarnes3/BaseDjangoSite
34be562d2a3f18cb852f2c655a23002271d6fbce
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "newdjangosite.settings_dev") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
23.636364
81
0.780769
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "newdjangosite.settings_dev") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
1c26b6d3a61bbbd7677d675cef2cc56e68c55d33
1,671
py
Python
fastapi_iam/initialize.py
jordic/fastapi_iam
aab1815dcb8b93f303fd9a83d85660ac3f92b7af
[ "MIT" ]
1
2021-03-18T22:11:52.000Z
2021-03-18T22:11:52.000Z
fastapi_iam/initialize.py
jordic/fastapi_iam
aab1815dcb8b93f303fd9a83d85660ac3f92b7af
[ "MIT" ]
null
null
null
fastapi_iam/initialize.py
jordic/fastapi_iam
aab1815dcb8b93f303fd9a83d85660ac3f92b7af
[ "MIT" ]
null
null
null
from pathlib import Path import asyncpg import glob import logging import typing logger = logging.getLogger("fastapi_iam") _current = Path(__file__).parent def get_migrations_path() -> Path: return _current / "schema" def load_migration(name: str): file = get_migrations_path() / name with file.open()...
27.393443
79
0.614602
from pathlib import Path import asyncpg import glob import logging import typing logger = logging.getLogger("fastapi_iam") _current = Path(__file__).parent def get_migrations_path() -> Path: return _current / "schema" def load_migration(name: str): file = get_migrations_path() / name with file.open()...
true
true
1c26b8432cdb387ec1f6ce1b14ea7d2d0528808a
384
py
Python
terrascript/data/ncloud.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/data/ncloud.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/data/ncloud.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/data/ncloud.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:22:04 UTC) # # For imports without namespace, e.g. # # >>> import terrascript.data.ncloud # # instead of # # >>> import terrascript.data.NaverCloudPlatform.ncloud # # This is only available for 'official' and 'partner' provi...
25.6
73
0.747396
from terrascript.data.NaverCloudPlatform.ncloud import *
true
true
1c26b88a746b3aa5ca4d703e0cac23edbfc0eb55
29,227
py
Python
addons/blender_mmd_tools-main/mmd_tools/m17n.py
V-Sekai/V-Sekai-Blender-tools
3473ad4abb737756290a9007273519460742960d
[ "MIT" ]
2
2021-12-21T16:38:58.000Z
2022-01-08T00:56:35.000Z
addons/blender_mmd_tools-main/mmd_tools/m17n.py
V-Sekai/V-Sekai-Blender-game-tools
3473ad4abb737756290a9007273519460742960d
[ "MIT" ]
1
2022-01-29T05:46:50.000Z
2022-01-29T05:46:50.000Z
addons/blender_mmd_tools-main/mmd_tools/m17n.py
V-Sekai/V-Sekai-Blender-game-tools
3473ad4abb737756290a9007273519460742960d
[ "MIT" ]
1
2021-11-07T19:41:34.000Z
2021-11-07T19:41:34.000Z
# -*- coding: utf-8 -*- translation_dict = { "ja_JP": { # Preferences ("*", "View3D > Sidebar > MMD Tools Panel"): "3Dビュー > サイドバー > MMD Toolsパネル", ("*", "Utility tools for MMD model editing. (UuuNyaa's forked version)"): "MMDモデル編集用のユーティリティーツールです。(UuuNyaaのフォーク版)", ("*", "Enable MMD M...
42.053237
128
0.484176
translation_dict = { "ja_JP": { ("*", "View3D > Sidebar > MMD Tools Panel"): "3Dビュー > サイドバー > MMD Toolsパネル", ("*", "Utility tools for MMD model editing. (UuuNyaa's forked version)"): "MMDモデル編集用のユーティリティーツールです。(UuuNyaaのフォーク版)", ("*", "Enable MMD Model Production Features"): "MMDモデル製...
true
true
1c26b9f82922ad01bfe8c6b46804b2823e761f22
7,166
py
Python
rst2pdf/tests/input/sphinx-issue187/conf.py
michilu/rst2pdf
c7f3b9e317e8c5a6dd843936f084e628f09d8698
[ "MIT" ]
null
null
null
rst2pdf/tests/input/sphinx-issue187/conf.py
michilu/rst2pdf
c7f3b9e317e8c5a6dd843936f084e628f09d8698
[ "MIT" ]
null
null
null
rst2pdf/tests/input/sphinx-issue187/conf.py
michilu/rst2pdf
c7f3b9e317e8c5a6dd843936f084e628f09d8698
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # issue162 documentation build configuration file, created by # sphinx-quickstart on Tue Aug 18 22:54:33 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
31.429825
80
0.719509
import sys, os extensions = ['rst2pdf.pdfbuilder'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'issue187' copyright = u'2009, RA' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X....
true
true
1c26badfc75c5c03687456155a03c200ce10fc31
7,198
py
Python
addons/cats-blender-plugin-0-19-0/extern_tools/mmd_tools_local/properties/material.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
725
2020-06-30T00:12:35.000Z
2021-11-07T03:10:44.000Z
addons/cats-blender-plugin-0-19-0/extern_tools/mmd_tools_local/properties/material.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
144
2017-12-27T20:57:07.000Z
2020-06-27T13:58:40.000Z
addons/cats-blender-plugin-0-19-0/extern_tools/mmd_tools_local/properties/material.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
106
2020-07-04T02:56:27.000Z
2021-11-07T08:54:11.000Z
# -*- coding: utf-8 -*- import bpy from bpy.types import PropertyGroup from bpy.props import BoolProperty, EnumProperty, FloatProperty, FloatVectorProperty, IntProperty, StringProperty from mmd_tools_local import register_wrap from mmd_tools_local.core import material from mmd_tools_local.core.material import FnMater...
27.368821
163
0.615032
import bpy from bpy.types import PropertyGroup from bpy.props import BoolProperty, EnumProperty, FloatProperty, FloatVectorProperty, IntProperty, StringProperty from mmd_tools_local import register_wrap from mmd_tools_local.core import material from mmd_tools_local.core.material import FnMaterial from mmd_tools_loca...
true
true
1c26bba83abc010d5f03b14888551c634511189b
849
py
Python
activity/activity_PingWorker.py
elifesciences/elife-bot
d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9
[ "MIT" ]
17
2015-02-10T07:10:29.000Z
2021-05-14T22:24:45.000Z
activity/activity_PingWorker.py
elifesciences/elife-bot
d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9
[ "MIT" ]
459
2015-03-31T18:24:23.000Z
2022-03-30T19:44:40.000Z
activity/activity_PingWorker.py
elifesciences/elife-bot
d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9
[ "MIT" ]
9
2015-04-18T16:57:31.000Z
2020-10-30T11:49:13.000Z
from activity.objects import Activity """ PingWorker activity """ class activity_PingWorker(Activity): def __init__(self, settings, logger, conn=None, token=None, activity_task=None): super(activity_PingWorker, self).__init__( settings, logger, conn, token, activity_task ) se...
29.275862
84
0.658422
from activity.objects import Activity class activity_PingWorker(Activity): def __init__(self, settings, logger, conn=None, token=None, activity_task=None): super(activity_PingWorker, self).__init__( settings, logger, conn, token, activity_task ) self.name = "PingWorker" ...
true
true
1c26bce1477ff9feb9bfd97e7279b3374f1957dc
227
py
Python
Testes/teste6.py
EaMS1234/learning-python
b0b143960ed0e2b2660617e1314c55814b05fbb2
[ "MIT" ]
null
null
null
Testes/teste6.py
EaMS1234/learning-python
b0b143960ed0e2b2660617e1314c55814b05fbb2
[ "MIT" ]
null
null
null
Testes/teste6.py
EaMS1234/learning-python
b0b143960ed0e2b2660617e1314c55814b05fbb2
[ "MIT" ]
null
null
null
# Programa que calcula e gera uma lista contendo N valores da sequência de fibonacci n1 = int(input('Digite um número: ')) seq = [0, 1] for c in range(0, n1): if c > 1: seq.append((seq[-1] + seq[-2])) print(seq)
20.636364
84
0.621145
n1 = int(input('Digite um número: ')) seq = [0, 1] for c in range(0, n1): if c > 1: seq.append((seq[-1] + seq[-2])) print(seq)
true
true
1c26bd2e212429f4869668b81dfcb8edb6c01b4a
2,396
py
Python
a3c_pytorch/common/basic_memory.py
jacekplocharczyk/a3c-pytorch
bec7dc5ffb9081d79080e77e3cbdd1ad9380d72f
[ "MIT" ]
null
null
null
a3c_pytorch/common/basic_memory.py
jacekplocharczyk/a3c-pytorch
bec7dc5ffb9081d79080e77e3cbdd1ad9380d72f
[ "MIT" ]
null
null
null
a3c_pytorch/common/basic_memory.py
jacekplocharczyk/a3c-pytorch
bec7dc5ffb9081d79080e77e3cbdd1ad9380d72f
[ "MIT" ]
null
null
null
from typing import Union import torch class Memory: def __init__(self, gamma: float, batch_size: int = 64): self.actions = [] self.action_logprobs = [] self.state_values = [] self.returns = None self.rewards = None self.is_terminals = None self.batch = 0 ...
29.95
82
0.630634
from typing import Union import torch class Memory: def __init__(self, gamma: float, batch_size: int = 64): self.actions = [] self.action_logprobs = [] self.state_values = [] self.returns = None self.rewards = None self.is_terminals = None self.batch = 0 ...
true
true
1c26bd532265b9bf6caf8402f00f69e2c174c237
773
py
Python
main.py
fossabot/scaling_umbrella
b494f821722bf0e7257b0cf7af31a34a6d90ed37
[ "MIT" ]
null
null
null
main.py
fossabot/scaling_umbrella
b494f821722bf0e7257b0cf7af31a34a6d90ed37
[ "MIT" ]
null
null
null
main.py
fossabot/scaling_umbrella
b494f821722bf0e7257b0cf7af31a34a6d90ed37
[ "MIT" ]
null
null
null
import argparse from io import FileIO from lxml import etree parser = argparse.ArgumentParser() def print_hi(name): print(f'Hi, {name}') return name def load_dtd(): dtd = etree.DTD(FileIO('schema/coverage-04.dtd')) print(dtd) return dtd def xml_from_file(file_path): tree = etree.parse(fil...
20.342105
61
0.686934
import argparse from io import FileIO from lxml import etree parser = argparse.ArgumentParser() def print_hi(name): print(f'Hi, {name}') return name def load_dtd(): dtd = etree.DTD(FileIO('schema/coverage-04.dtd')) print(dtd) return dtd def xml_from_file(file_path): tree = etree.parse(fil...
true
true
1c26be1d615b30e28c0e581abed62fb8f12904eb
8,306
py
Python
docs/conf.py
bergercookie/Pump3000
cbe35cd44a32ed9db57dea0d6a16ac0725dfc71b
[ "BSD-2-Clause" ]
8
2016-05-15T10:41:58.000Z
2019-05-09T20:11:06.000Z
docs/conf.py
bergercookie/Pump3000
cbe35cd44a32ed9db57dea0d6a16ac0725dfc71b
[ "BSD-2-Clause" ]
1
2021-01-21T02:56:59.000Z
2021-01-22T07:26:50.000Z
docs/conf.py
bergercookie/Pump3000
cbe35cd44a32ed9db57dea0d6a16ac0725dfc71b
[ "BSD-2-Clause" ]
1
2017-05-21T20:24:12.000Z
2017-05-21T20:24:12.000Z
# -*- coding: utf-8 -*- # # Cavro XP3000 GUI documentation build configuration file, created by # sphinx-quickstart on Fri Jul 11 01:09:52 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
31.581749
79
0.718276
import sys import os sys.path.insert(0, os.path.abspath('../python_code')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.viewcode', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Cavro XP3000 GUI' copyrigh...
true
true
1c26bf0470890a8a00c2045b8c0f680d194ae0e0
3,310
py
Python
scrapy/oerhoernchenscrapy/settings.py
programmieraffe/oerhoernchen20
3610c3ec80ff6cec7b34d63aed6510f09bc367a0
[ "CC0-1.0" ]
2
2019-09-09T11:49:59.000Z
2020-01-14T09:50:59.000Z
scrapy/oerhoernchenscrapy/settings.py
programmieraffe/oerhoernchen20
3610c3ec80ff6cec7b34d63aed6510f09bc367a0
[ "CC0-1.0" ]
10
2019-08-23T12:33:23.000Z
2019-09-14T11:52:53.000Z
scrapy/oerhoernchenscrapy/settings.py
programmieraffe/oerhoernchen20
3610c3ec80ff6cec7b34d63aed6510f09bc367a0
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for oerhoernchenscrapy project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://doc.scrapy.org/en/latest/topics/settings.html # https://doc.scrapy.org/en/l...
34.123711
102
0.781571
BOT_NAME = 'oerhoernchenscrapy' SPIDER_MODULES = ['oerhoernchenscrapy.spiders'] NEWSPIDER_MODULE = 'oerhoernchenscrapy.spiders' ROBOTSTXT_OBEY = True CONCURRENT_REQUESTS = 1 Y = 5 ITEM_PIPELINES = { 'oerhoernchenscrapy.pipelines.JsonWriterPipeline': 30...
true
true
1c26bf16614d64576418613801d33d7b83366c4a
9,577
py
Python
mmdet/models/necks/fpn_dcn_nocat.py
firmamentqj/AlignPS
4aa8e4d200eea19269048c4382def8c4990001f4
[ "Apache-2.0" ]
144
2021-03-22T07:29:51.000Z
2022-03-30T03:04:09.000Z
mmdet/models/necks/fpn_dcn_nocat.py
firmamentqj/AlignPS
4aa8e4d200eea19269048c4382def8c4990001f4
[ "Apache-2.0" ]
27
2021-03-27T13:57:20.000Z
2022-03-29T09:31:55.000Z
mmdet/models/necks/fpn_dcn_nocat.py
firmamentqj/AlignPS
4aa8e4d200eea19269048c4382def8c4990001f4
[ "Apache-2.0" ]
31
2021-03-24T09:04:18.000Z
2022-02-02T13:18:47.000Z
from mmdet.models.necks.fpn_dcn import FPNDcn import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, xavier_init from mmcv.ops import DeformConv2dPack from mmdet.core import auto_fp16 from ..builder import NECKS @NECKS.register_module() class FPNDcnNocat(nn.Module): r"""Feature Py...
42.189427
79
0.567192
from mmdet.models.necks.fpn_dcn import FPNDcn import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, xavier_init from mmcv.ops import DeformConv2dPack from mmdet.core import auto_fp16 from ..builder import NECKS @NECKS.register_module() class FPNDcnNocat(nn.Module): def __init__(...
true
true
1c26bf61cbe8cd13e9f35836b8799201307b519e
9,034
py
Python
src/python/pants/backend/jvm/tasks/ivy_resolve.py
arloherrine/pants
5f98f7734590eb21a2992a4c28415f838a2e6927
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/jvm/tasks/ivy_resolve.py
arloherrine/pants
5f98f7734590eb21a2992a4c28415f838a2e6927
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/jvm/tasks/ivy_resolve.py
arloherrine/pants
5f98f7734590eb21a2992a4c28415f838a2e6927
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import shu...
40.877828
98
0.675227
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import shutil import time from collections import defaultdict from twitter.common.collections import OrderedSet from pants import binary_util from pant...
true
true
1c26c05c221af355f9a06973f6d776871abf3e7c
3,776
py
Python
huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/delete_application_configuration_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/delete_application_configuration_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/delete_application_configuration_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class DeleteApplicationConfigurationRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name ...
27.764706
96
0.594015
import pprint import re import six class DeleteApplicationConfigurationRequest: sensitive_list = [] openapi_types = { 'application_id': 'str', 'environment_id': 'str' } attribute_map = { 'application_id': 'application_id', 'environment_id': 'environment_id' ...
true
true
1c26c19ce59737cf7e494f0e8ce2bdfb50632375
5,983
py
Python
router.py
gdantaas/hackaton-technee-safra
f5e0c0628e80ab44f22e62a77444202d0053b025
[ "MIT" ]
1
2020-09-14T23:29:09.000Z
2020-09-14T23:29:09.000Z
router.py
gdantaas/hackaton-technee-safra
f5e0c0628e80ab44f22e62a77444202d0053b025
[ "MIT" ]
null
null
null
router.py
gdantaas/hackaton-technee-safra
f5e0c0628e80ab44f22e62a77444202d0053b025
[ "MIT" ]
null
null
null
from flask import Flask, request from flask_cors import CORS from APIS import APIRequest import os import getDbData import json from APIS import APIRequest app = Flask(__name__) app._static_folder = os.path.abspath('APIS/') CORS(app) @app.route('/', methods=['GET']) def isUp(): """localhost:8080/""" session...
31.324607
135
0.567943
from flask import Flask, request from flask_cors import CORS from APIS import APIRequest import os import getDbData import json from APIS import APIRequest app = Flask(__name__) app._static_folder = os.path.abspath('APIS/') CORS(app) @app.route('/', methods=['GET']) def isUp(): session = APIRequest.WebServiceSa...
true
true
1c26c1a653ad9a95896960e71bb7940e6ab0e1f7
5,071
py
Python
isitfit/tests/cost/redshift/test_cloudwatchman_ec2.py
autofitcloud/isitf
6ffc0c67c00140120f5d5ad8dfe11c8f0f7dacc1
[ "Apache-2.0" ]
82
2019-09-04T17:39:10.000Z
2021-08-10T14:59:18.000Z
isitfit/tests/cost/redshift/test_cloudwatchman_ec2.py
autofitcloud/isitf
6ffc0c67c00140120f5d5ad8dfe11c8f0f7dacc1
[ "Apache-2.0" ]
11
2019-09-10T03:54:19.000Z
2020-02-21T22:58:44.000Z
isitfit/tests/cost/redshift/test_cloudwatchman_ec2.py
autofitcloud/isitf
6ffc0c67c00140120f5d5ad8dfe11c8f0f7dacc1
[ "Apache-2.0" ]
9
2019-09-13T15:57:42.000Z
2021-02-13T15:56:40.000Z
# Mostly a copy of test_iterator_redshift # Need to convert the latter to class # and inherit here to avoid code redundancy from isitfit.cost.metrics_cloudwatch import CloudwatchEc2, NoCloudwatchException import pytest def test_init(): rpi = CloudwatchEc2() assert True # no exception # cannot use mock_cloudwat...
28.488764
102
0.717807
from isitfit.cost.metrics_cloudwatch import CloudwatchEc2, NoCloudwatchException import pytest def test_init(): rpi = CloudwatchEc2() assert True def test_handleCluster_notFound(mocker): mockreturn = lambda *args, **kwargs: [] mockee = 'isitfit.cost.cloudwatchman.CloudwatchEc2._metrics_filter' m...
true
true
1c26c1bc9f0826b04da28c548f10d0cc21ad2d36
1,335
py
Python
cal.py
J-CIC/Tianchi_permutation
0b95491a249b407a15adfb75930d36e45bca9156
[ "MIT" ]
1
2018-02-11T07:27:52.000Z
2018-02-11T07:27:52.000Z
cal.py
J-CIC/Tianchi_permutation
0b95491a249b407a15adfb75930d36e45bca9156
[ "MIT" ]
null
null
null
cal.py
J-CIC/Tianchi_permutation
0b95491a249b407a15adfb75930d36e45bca9156
[ "MIT" ]
null
null
null
import itertools import pandas as pd a = [450, 450, 410, 320, 320, 300, 280, 260, 259, 110] total = pd.DataFrame(list(itertools.permutations(a,10)))#全排列 #第一种红包分布方法中各个红包是否大于1100,1个赏金的红包不可能超过 total.loc[(total[0]+total[1]+total[2])>1100,"type1_1"] = 1 total.loc[(total[3]+total[4]+total[5])>1100,"type1_2"] = 1 total.loc[(t...
44.5
102
0.69588
import itertools import pandas as pd a = [450, 450, 410, 320, 320, 300, 280, 260, 259, 110] total = pd.DataFrame(list(itertools.permutations(a,10))) total.loc[(total[0]+total[1]+total[2])>1100,"type1_1"] = 1 total.loc[(total[3]+total[4]+total[5])>1100,"type1_2"] = 1 total.loc[(total[6]+total[7]+total[8])>1100,"type1_3...
true
true
1c26c26ae85931a2839161f7084b3e7fd46d8422
863
py
Python
field_permissions/forms.py
Sleepy105/django-field-permissions
d5ce8a64cb95927a73368e80eb3251fb5ccfbca1
[ "MIT" ]
null
null
null
field_permissions/forms.py
Sleepy105/django-field-permissions
d5ce8a64cb95927a73368e80eb3251fb5ccfbca1
[ "MIT" ]
null
null
null
field_permissions/forms.py
Sleepy105/django-field-permissions
d5ce8a64cb95927a73368e80eb3251fb5ccfbca1
[ "MIT" ]
1
2020-05-14T14:24:30.000Z
2020-05-14T14:24:30.000Z
from django import forms class FieldPermissionFormMixin: """ ModelForm logic for removing fields when a user is found not to have change permissions. """ def __init__(self, *args, **kwargs): super(FieldPermissionFormMixin, self).__init__(*args, **kwargs) model = self.Meta.model ...
34.52
191
0.698725
from django import forms class FieldPermissionFormMixin: def __init__(self, *args, **kwargs): super(FieldPermissionFormMixin, self).__init__(*args, **kwargs) model = self.Meta.model model_field_names = [f.name for f in model._meta.get_fields()] for name in model_field_na...
true
true
1c26c29a0c131c8dfc8adda07a48dbfc9462ce01
399
py
Python
src/enjdatabasechecker.py
adam-phelps/enjambre
2877ae6722648419520380744f8bfc986ec406e5
[ "MIT" ]
null
null
null
src/enjdatabasechecker.py
adam-phelps/enjambre
2877ae6722648419520380744f8bfc986ec406e5
[ "MIT" ]
5
2020-07-03T00:02:43.000Z
2020-07-07T00:03:23.000Z
src/enjdatabasechecker.py
adam-phelps/enjambre
2877ae6722648419520380744f8bfc986ec406e5
[ "MIT" ]
null
null
null
# Contains DDB health check class & methods # Adam Phelps 7/04/2020 import boto3 class EnjDatabaseChecker: ''' Offload database health checking from other classes. ''' def __init__(self): pass def dbcheck_for_duplicates(self): pass def dbcheck_for_status(self): ddbc = boto3.c...
23.470588
64
0.669173
import boto3 class EnjDatabaseChecker: def __init__(self): pass def dbcheck_for_duplicates(self): pass def dbcheck_for_status(self): ddbc = boto3.client('dynamodb') response = ddbc.list_tables() return response
true
true