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
f733ade0ac2b4da6d93a86e4d6ac33ca25862d9f
4,522
py
Python
mms/service.py
andrewfayres/mxnet-model-server
ef4edfef4cfe5234887bf834ec7b82676a36ba02
[ "Apache-2.0" ]
1
2019-01-30T02:57:31.000Z
2019-01-30T02:57:31.000Z
mms/service.py
DrSnowbird/mxnet-model-server
a0bfd712350545dceb21c8e0b0b21dfa0c9918a7
[ "Apache-2.0" ]
null
null
null
mms/service.py
DrSnowbird/mxnet-model-server
a0bfd712350545dceb21c8e0b0b21dfa0c9918a7
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # http://www.apache.org/licenses/LICENSE-2.0 # or in the "license" file...
33.746269
104
0.644847
import logging import time from builtins import str import mms from mms.context import Context, RequestProcessor from mms.metrics.metrics_store import MetricsStore from mms.protocol.otf_message_handler import create_predict_response PREDICTION_METRIC = 'PredictionTime' logger = logging.getLogger(__name__) ...
true
true
f733b1ee76956d5a39af334e2f55ee1e03c4f971
1,089
py
Python
colab/grr_colab/_api.py
certxlm/grr
c2a442a27f656fb18dfa3bce098847e5c5b849d7
[ "Apache-2.0" ]
null
null
null
colab/grr_colab/_api.py
certxlm/grr
c2a442a27f656fb18dfa3bce098847e5c5b849d7
[ "Apache-2.0" ]
null
null
null
colab/grr_colab/_api.py
certxlm/grr
c2a442a27f656fb18dfa3bce098847e5c5b849d7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """A module for lazy instantiation of the GRR's Python API.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from grr_api_client import api from grr_colab import flags FLAGS = flags.FLAGS _...
25.325581
78
0.742883
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from grr_api_client import api from grr_colab import flags FLAGS = flags.FLAGS _API = None def get(): global _API if _API is None: if not FLAGS.grr_ht...
true
true
f733b20de7ac1766743c519b7f3c51c553df48ad
1,196
py
Python
src/datasets/main.py
ErikKratzCth/Deep-SVDD
f77209b85f654aa68d29ab636ecb422207f437e1
[ "MIT" ]
3
2019-06-14T09:26:38.000Z
2019-09-06T11:51:47.000Z
src/datasets/main.py
KratzErik/Deep-SVDD
f77209b85f654aa68d29ab636ecb422207f437e1
[ "MIT" ]
14
2021-02-02T21:53:37.000Z
2022-03-11T23:39:13.000Z
src/datasets/main.py
KratzErik/Deep-SVDD
f77209b85f654aa68d29ab636ecb422207f437e1
[ "MIT" ]
1
2020-07-15T03:21:48.000Z
2020-07-15T03:21:48.000Z
from datasets.__local__ import implemented_datasets from datasets.mnist import MNIST_DataLoader from datasets.cifar10 import CIFAR_10_DataLoader from datasets.GTSRB import GTSRB_DataLoader from datasets.bdd100k import BDD100K_DataLoader from datasets.dreyeve import DREYEVE_DataLoader from datasets.prosivic import PROSI...
29.9
65
0.758361
from datasets.__local__ import implemented_datasets from datasets.mnist import MNIST_DataLoader from datasets.cifar10 import CIFAR_10_DataLoader from datasets.GTSRB import GTSRB_DataLoader from datasets.bdd100k import BDD100K_DataLoader from datasets.dreyeve import DREYEVE_DataLoader from datasets.prosivic import PROSI...
true
true
f733b236b54a57311064af65e938c72f6a407051
1,837
py
Python
connect_four/evaluation/incremental_victor/graph/graph_manager_add_solution_profile.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
connect_four/evaluation/incremental_victor/graph/graph_manager_add_solution_profile.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
connect_four/evaluation/incremental_victor/graph/graph_manager_add_solution_profile.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
import cProfile import gym import numpy as np from connect_four.evaluation.incremental_victor.graph.graph_manager import GraphManager from connect_four.evaluation.incremental_victor.solution.victor_solution_manager import VictorSolutionManager from connect_four.problem import ConnectFourGroupManager env = gym.make(...
29.15873
109
0.653783
import cProfile import gym import numpy as np from connect_four.evaluation.incremental_victor.graph.graph_manager import GraphManager from connect_four.evaluation.incremental_victor.solution.victor_solution_manager import VictorSolutionManager from connect_four.problem import ConnectFourGroupManager env = gym.make(...
true
true
f733b3d4e0f215224c3aa2f0fd4a080eb67cd88f
205
py
Python
mongodb_server_test.py
fatihdq/vans-product-on-e-commerce
0e55cb6c7841eba8a2c95ddc03821830e97593da
[ "MIT" ]
null
null
null
mongodb_server_test.py
fatihdq/vans-product-on-e-commerce
0e55cb6c7841eba8a2c95ddc03821830e97593da
[ "MIT" ]
null
null
null
mongodb_server_test.py
fatihdq/vans-product-on-e-commerce
0e55cb6c7841eba8a2c95ddc03821830e97593da
[ "MIT" ]
null
null
null
from pymongo import MongoClient import json from pprint import pprint client = MongoClient('localhost:27017') db = client.admin serverStatusResult = db.command("serverStatus") pprint(serverStatusResult)
20.5
47
0.814634
from pymongo import MongoClient import json from pprint import pprint client = MongoClient('localhost:27017') db = client.admin serverStatusResult = db.command("serverStatus") pprint(serverStatusResult)
true
true
f733b435bce83c1b53aeaf765c901f14b8fb4fa4
2,171
py
Python
slgnn/data_processing/jakfp_dataset.py
thomasly/slgnn
caa1e7814498da41ad025b4e62c569fe511848ff
[ "MIT" ]
2
2020-08-31T00:55:31.000Z
2020-09-01T19:59:30.000Z
slgnn/data_processing/jakfp_dataset.py
thomasly/slgnn
caa1e7814498da41ad025b4e62c569fe511848ff
[ "MIT" ]
null
null
null
slgnn/data_processing/jakfp_dataset.py
thomasly/slgnn
caa1e7814498da41ad025b4e62c569fe511848ff
[ "MIT" ]
null
null
null
import os import pandas as pd from chemreader.writers import GraphWriter from chemreader.readers import Smiles from rdkit.Chem import MolFromSmiles from slgnn.models.gcn.utils import get_filtered_fingerprint from tqdm import tqdm def _is_active(value): if value < 1000: return 1 elif value >= 10000: ...
31.014286
88
0.628282
import os import pandas as pd from chemreader.writers import GraphWriter from chemreader.readers import Smiles from rdkit.Chem import MolFromSmiles from slgnn.models.gcn.utils import get_filtered_fingerprint from tqdm import tqdm def _is_active(value): if value < 1000: return 1 elif value >= 10000: ...
true
true
f733b50a33b0c1735ad7d299299f19c1dac4fcbb
4,060
py
Python
blackbird/test/test_configread/test_global/test_include.py
JumpeiArashi/blackbird
1acd40c40c9626df68f252e6265b722d1a8da64b
[ "WTFPL" ]
null
null
null
blackbird/test/test_configread/test_global/test_include.py
JumpeiArashi/blackbird
1acd40c40c9626df68f252e6265b722d1a8da64b
[ "WTFPL" ]
null
null
null
blackbird/test/test_configread/test_global/test_include.py
JumpeiArashi/blackbird
1acd40c40c9626df68f252e6265b722d1a8da64b
[ "WTFPL" ]
null
null
null
# -*- coding: utf-8 -*- import os import glob import shutil import nose.tools import blackbird.utils.configread import blackbird.utils.error class TestConfigReaderGetGlobalIncludeAbsPath(object): def __init__(self): infile = ( '[global]', 'user = nobody', 'group = n...
26.363636
67
0.556897
import os import glob import shutil import nose.tools import blackbird.utils.configread import blackbird.utils.error class TestConfigReaderGetGlobalIncludeAbsPath(object): def __init__(self): infile = ( '[global]', 'user = nobody', 'group = nobody' ) ...
true
true
f733b52982b45837ee3bed7113eab733edeaa179
59
py
Python
geoana/em/__init__.py
simpeg/geoana
417e23a0a689da19112e5fd361f823a2abd8785a
[ "MIT" ]
11
2017-11-14T12:29:42.000Z
2022-01-17T18:36:28.000Z
geoana/em/__init__.py
simpeg/geoana
417e23a0a689da19112e5fd361f823a2abd8785a
[ "MIT" ]
28
2016-09-02T02:44:32.000Z
2022-03-31T22:41:33.000Z
geoana/em/__init__.py
simpeg/geoana
417e23a0a689da19112e5fd361f823a2abd8785a
[ "MIT" ]
4
2017-03-07T22:07:15.000Z
2021-05-14T20:08:33.000Z
from . import static from . import fdem from . import tdem
14.75
20
0.745763
from . import static from . import fdem from . import tdem
true
true
f733b5d2b190a4fb5a237b202ec640a7b9402391
68,794
py
Python
test/test_utils.py
sokolx1/youtube-dlc
2e5e4f74bfbf5628974de345d4c12f06ca3494c7
[ "Unlicense" ]
null
null
null
test/test_utils.py
sokolx1/youtube-dlc
2e5e4f74bfbf5628974de345d4c12f06ca3494c7
[ "Unlicense" ]
null
null
null
test/test_utils.py
sokolx1/youtube-dlc
2e5e4f74bfbf5628974de345d4c12f06ca3494c7
[ "Unlicense" ]
1
2021-10-30T16:42:36.000Z
2021-10-30T16:42:36.000Z
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # Various small unit tests import io import json import xml.etree.ElementTree from youtube_dlc....
46.451047
382
0.60514
from __future__ import unicode_literals import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import io import json import xml.etree.ElementTree from youtube_dlc.utils import ( age_restricted, args_to_str, encode_base_n, caesar, ...
true
true
f733b6ccde55f9cb79d205da7c3b84dd6fb0217b
3,542
py
Python
scripts/utils/resort_bam_karyotype.py
a113n/bcbio-nextgen
1d4afef27ad2e84a4ecb6145ccc5058f2abb4616
[ "MIT" ]
339
2015-01-04T13:23:04.000Z
2022-03-25T23:09:09.000Z
scripts/utils/resort_bam_karyotype.py
a113n/bcbio-nextgen
1d4afef27ad2e84a4ecb6145ccc5058f2abb4616
[ "MIT" ]
39
2015-01-14T21:31:09.000Z
2021-11-18T15:15:33.000Z
scripts/utils/resort_bam_karyotype.py
a113n/bcbio-nextgen
1d4afef27ad2e84a4ecb6145ccc5058f2abb4616
[ "MIT" ]
176
2015-01-10T17:40:44.000Z
2022-03-25T05:14:21.000Z
#!/usr/bin/env python """Resort a BAM file karyotypically to match GATK's preferred file order. Broad's GATK and associated resources prefer BAM files sorted as: chr1, chr2... chr10, chr11... chrX instead of the simple alphabetic sort: chr1, chr10, chr2 ... This takes a sorted BAM files with an alternative...
30.273504
78
0.640034
import os import sys import pysam def main(ref_file, *in_bams): ref = pysam.Samfile(ref_file, "r") sorter = SortByHeader(ref.header) for bam in in_bams: sort_bam(bam, sorter.header_cmp, sorter.to_include) def sort_bam(in_bam, sort_fn, to_include=None): out_file = "%s-ksort%s" % os.path.split...
true
true
f733b77946c83379d75bb1a55541de68f72301a8
6,831
py
Python
tests/test_utilities.py
ashwinvin/Tanjun
e16e28a3be7b809762e2cdc583ae9fe9edf8a0ab
[ "BSD-3-Clause" ]
null
null
null
tests/test_utilities.py
ashwinvin/Tanjun
e16e28a3be7b809762e2cdc583ae9fe9edf8a0ab
[ "BSD-3-Clause" ]
null
null
null
tests/test_utilities.py
ashwinvin/Tanjun
e16e28a3be7b809762e2cdc583ae9fe9edf8a0ab
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # cython: language_level=3 # BSD 3-Clause License # # Copyright (c) 2020-2021, Faster Speeding # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of sour...
28.111111
111
0.743083
import typing from collections import abc as collections from unittest import mock import pytest import tanjun from tanjun import utilities _T = typing.TypeVar("_T") def async_iter_mock(*values: _T) -> collections.AsyncIterable[_T]: return mock.Mock(__aiter__=mock.Mock(return...
true
true
f733b7c0c0c9f572e92bab90f1e7680ae03f0e5f
17,807
py
Python
pororo/tasks/constituency_parsing.py
jayten42/pororo
0b02e6a633b9a32ec4241b8ed96745e6592db317
[ "Apache-2.0" ]
1,137
2021-02-02T02:09:06.000Z
2022-03-29T03:10:40.000Z
pororo/tasks/constituency_parsing.py
jayten42/pororo
0b02e6a633b9a32ec4241b8ed96745e6592db317
[ "Apache-2.0" ]
57
2021-02-02T03:29:54.000Z
2022-03-31T16:20:00.000Z
pororo/tasks/constituency_parsing.py
jayten42/pororo
0b02e6a633b9a32ec4241b8ed96745e6592db317
[ "Apache-2.0" ]
216
2021-02-02T02:49:02.000Z
2022-03-28T01:19:58.000Z
"""Constituency Parsing related modeling class""" import re from typing import List, Optional, Tuple from lxml import etree from pororo.tasks.utils.base import PororoFactoryBase, PororoTaskBase from pororo.tasks.utils.download_utils import download_or_load class PororoConstFactory(PororoFactoryBase): """ C...
26.617339
95
0.461167
import re from typing import List, Optional, Tuple from lxml import etree from pororo.tasks.utils.base import PororoFactoryBase, PororoTaskBase from pororo.tasks.utils.download_utils import download_or_load class PororoConstFactory(PororoFactoryBase): def __init__(self, task: str, lang: str, model: Optional[s...
true
true
f733b84cfac911bd5dbd39f81e8c042070fb2d3f
4,370
py
Python
musica3.py
Oliviaffc/BOMusic
e272c50f93892f20b6210d1fa06ba1c6f44d0a62
[ "MIT" ]
1
2021-07-08T14:27:37.000Z
2021-07-08T14:27:37.000Z
musica3.py
Oliviaffc/BOMusic
e272c50f93892f20b6210d1fa06ba1c6f44d0a62
[ "MIT" ]
null
null
null
musica3.py
Oliviaffc/BOMusic
e272c50f93892f20b6210d1fa06ba1c6f44d0a62
[ "MIT" ]
null
null
null
'''BOMusic''' from tkinter import * import pygame class App3(Toplevel): cor1 = '#171717' cor2 = '#58009D' cor3 = '#efefef' def __init__(self, original): self.frame_original = original Toplevel.__init__(self) self.config() self.frames()...
22.879581
71
0.422197
from tkinter import * import pygame class App3(Toplevel): cor1 = '#171717' cor2 = '#58009D' cor3 = '#efefef' def __init__(self, original): self.frame_original = original Toplevel.__init__(self) self.config() self.frames() self....
true
true
f733b8a006818fdb403ccfa922ba9f3b43ed2efe
3,297
py
Python
cs_tools/tools/rtql/const.py
thoughtspot/cs_tools
7b516476be94adf7f121645b7c3fc7206fdae4ca
[ "MIT" ]
1
2022-03-14T19:04:53.000Z
2022-03-14T19:04:53.000Z
cs_tools/tools/rtql/const.py
thoughtspot/cs_tools
7b516476be94adf7f121645b7c3fc7206fdae4ca
[ "MIT" ]
10
2021-06-01T14:34:52.000Z
2022-03-24T00:47:47.000Z
cs_tools/tools/rtql/const.py
thoughtspot/cs_tools
7b516476be94adf7f121645b7c3fc7206fdae4ca
[ "MIT" ]
null
null
null
TQL_HELP = """ Commands can optionally be multi-line. Few common commands ----------------------- show databases; -> list all available databases use db; -> switches context to specified database 'db' this must be done if queries do not use full nam...
48.485294
63
0.506824
TQL_HELP = """ Commands can optionally be multi-line. Few common commands ----------------------- show databases; -> list all available databases use db; -> switches context to specified database 'db' this must be done if queries do not use full nam...
true
true
f733ba9f177b5d7b058338a61d67df96d228937e
1,884
py
Python
uproot/const.py
ryuwd/uproot4
20d8575e941c32559c7b5e62b0ed5f92bc4927d0
[ "BSD-3-Clause" ]
null
null
null
uproot/const.py
ryuwd/uproot4
20d8575e941c32559c7b5e62b0ed5f92bc4927d0
[ "BSD-3-Clause" ]
null
null
null
uproot/const.py
ryuwd/uproot4
20d8575e941c32559c7b5e62b0ed5f92bc4927d0
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/main/LICENSE """ This module defines integer constants used by serialization and deserialization routines. """ from __future__ import absolute_import import numpy # used in unmarshaling kByteCountMask = numpy.int64(0x40000000) kByteCountVMask = ...
16.526316
89
0.722399
from __future__ import absolute_import import numpy kByteCountMask = numpy.int64(0x40000000) kByteCountVMask = numpy.int64(0x4000) kClassMask = numpy.int64(0x80000000) kNewClassTag = numpy.int64(0xFFFFFFFF) kIsOnHeap = numpy.uint32(0x01000000) kIsReferenced = numpy.uint32(1 << 4) kMapOffset = 2 kNullTag = 0 k...
true
true
f733bd046f29b564247a1e27481442b8e98ac1dd
9,526
py
Python
pysnmp-with-texts/CISCOSB-PHY-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CISCOSB-PHY-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CISCOSB-PHY-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCOSB-PHY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-PHY-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:23:02 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27...
144.333333
877
0.757401
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuild...
true
true
f733bd9a6eef5c6c113449021854e09351067ad5
857
py
Python
cartographer/field_types/date_attribute.py
Patreon/cartographer
fe5c03decf01c9f7894bb9cf1f839af435143527
[ "Apache-2.0" ]
29
2016-03-30T00:53:42.000Z
2022-03-02T23:45:12.000Z
cartographer/field_types/date_attribute.py
Patreon/cartographer
fe5c03decf01c9f7894bb9cf1f839af435143527
[ "Apache-2.0" ]
20
2016-04-19T18:34:05.000Z
2022-02-14T14:18:33.000Z
cartographer/field_types/date_attribute.py
Patreon/cartographer
fe5c03decf01c9f7894bb9cf1f839af435143527
[ "Apache-2.0" ]
5
2016-04-28T00:44:24.000Z
2019-10-26T08:09:17.000Z
import ciso8601 import dateutil.parser from cartographer.field_types import SchemaAttribute from cartographer.utils.datetime import as_utc, make_naive class DateAttribute(SchemaAttribute): @classmethod def format_value_for_json(cls, value): return as_utc(value).isoformat() def from_json(self, s...
32.961538
115
0.71762
import ciso8601 import dateutil.parser from cartographer.field_types import SchemaAttribute from cartographer.utils.datetime import as_utc, make_naive class DateAttribute(SchemaAttribute): @classmethod def format_value_for_json(cls, value): return as_utc(value).isoformat() def from_json(self, s...
true
true
f733be7ac9647ed984d090af8a46970329966652
747
py
Python
apps/sushi/migrations/0015_help_text.py
techlib/celus
f32a7a22be5f4613dcac10b8e02c5c5a9bc297cb
[ "MIT" ]
7
2020-02-20T13:24:40.000Z
2022-01-28T19:36:04.000Z
apps/sushi/migrations/0015_help_text.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
15
2020-04-28T13:09:02.000Z
2021-11-03T15:21:24.000Z
apps/sushi/migrations/0015_help_text.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
4
2020-02-20T13:48:30.000Z
2021-03-19T00:33:34.000Z
# Generated by Django 2.2.4 on 2019-09-02 07:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sushi', '0014_sushifetchattempt_processing_success'), ] operations = [ migrations.AlterField( model_name='sushifetchattempt', ...
28.730769
99
0.62249
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sushi', '0014_sushifetchattempt_processing_success'), ] operations = [ migrations.AlterField( model_name='sushifetchattempt', name='download_success', ...
true
true
f733bfb438d40a8a18f025df4f707cd21176ab8d
1,888
py
Python
app/core/tests/test_models.py
Adamakk10/recepie-app-api
f0a989e571e8e9de8eed81768be3c11bff949832
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
Adamakk10/recepie-app-api
f0a989e571e8e9de8eed81768be3c11bff949832
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
Adamakk10/recepie-app-api
f0a989e571e8e9de8eed81768be3c11bff949832
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@gmail.com', password='test1234'): return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_create_user_with_email_successful(self): ...
24.842105
70
0.631886
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@gmail.com', password='test1234'): return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_create_user_with_email_successful(self): ...
true
true
f733bfe0e81565b3822d50f9e385174c31a40427
47,558
py
Python
sdk/python/pulumi_azure_native/network/v20210201/virtual_network_gateway_connection.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20210201/virtual_network_gateway_connection.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20210201/virtual_network_gateway_connection.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
55.3
6,521
0.705055
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['VirtualNetworkGatewayConnectionArgs', 'VirtualNetworkGatewayConnection'] @pulumi.input_...
true
true
f733c151669c48589cccb6f5acb4d5b2e3e2031e
1,309
py
Python
src/prostatex/normalization.py
piotrsobecki/PCa-CNNs2
01504db2037c67dc6832c2c8aaf4b3d5e4f2808f
[ "MIT" ]
1
2022-03-05T06:05:53.000Z
2022-03-05T06:05:53.000Z
src/prostatex/normalization.py
piotrsobecki/PCa-CNNs2
01504db2037c67dc6832c2c8aaf4b3d5e4f2808f
[ "MIT" ]
1
2021-01-03T02:25:31.000Z
2021-01-03T02:25:31.000Z
src/prostatex/normalization.py
piotrsobecki/PCa-CNNs
01504db2037c67dc6832c2c8aaf4b3d5e4f2808f
[ "MIT" ]
null
null
null
import numpy # Normalization functions class NormalizationNo(): def normalize(self, img, settings=None): if settings is None: settings = {} return img class NormalizationMean(NormalizationNo): def normalize(self, img, settings=None): if settings is None: setti...
26.18
73
0.574484
import numpy class NormalizationNo(): def normalize(self, img, settings=None): if settings is None: settings = {} return img class NormalizationMean(NormalizationNo): def normalize(self, img, settings=None): if settings is None: settings = {} if img.s...
true
true
f733c3024f5de2da9f1a4e167beb1c1d4d8b6c34
3,845
py
Python
src/api/datamanage/tests/lifecycle/lifecycle_metric/test_lifecycle_trend.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/api/datamanage/tests/lifecycle/lifecycle_metric/test_lifecycle_trend.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/api/datamanage/tests/lifecycle/lifecycle_metric/test_lifecycle_trend.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ---------------------------------------------...
43.202247
111
0.671001
from django.test import TestCase from rest_framework.reverse import reverse from tests.utils import UnittestClient class TestLifecycleTrend(TestCase): def setUp(self): pass def test_asset_value_trend(self): params = {"dataset_id": "591_durant1115", "dataset_type": "result_table"} ...
true
true
f733c5a465faf703b08dcc3e28497c53a696bb95
1,657
py
Python
pp/import_phidl_component.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
8
2020-08-25T11:25:18.000Z
2022-03-27T11:32:11.000Z
pp/import_phidl_component.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
null
null
null
pp/import_phidl_component.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
1
2022-03-04T07:03:29.000Z
2022-03-04T07:03:29.000Z
import copy from phidl.device_layout import Device from pp.cell import cell from pp.component import Component, ComponentReference, Port from pp.config import call_if_func @cell def import_phidl_component(component: Device, **kwargs) -> Component: """ returns a gdsfactory Component from a phidl Device or functi...
26.301587
70
0.598672
import copy from phidl.device_layout import Device from pp.cell import cell from pp.component import Component, ComponentReference, Port from pp.config import call_if_func @cell def import_phidl_component(component: Device, **kwargs) -> Component: D = call_if_func(component, **kwargs) D_copy = Component(nam...
true
true
f733c5f9917b7f270a25970745b6764b9b5fd752
773
py
Python
ocdskingfisherviews/cli/commands/field_counts.py
CDSPY/kingfisher-views
f6d7d4896f5ab714376ff819db71f90ed2ba5488
[ "BSD-3-Clause" ]
null
null
null
ocdskingfisherviews/cli/commands/field_counts.py
CDSPY/kingfisher-views
f6d7d4896f5ab714376ff819db71f90ed2ba5488
[ "BSD-3-Clause" ]
null
null
null
ocdskingfisherviews/cli/commands/field_counts.py
CDSPY/kingfisher-views
f6d7d4896f5ab714376ff819db71f90ed2ba5488
[ "BSD-3-Clause" ]
null
null
null
import sqlalchemy as sa import ocdskingfisherviews.cli.commands.base from ocdskingfisherviews.field_counts import FieldCounts class FieldCountsCommand(ocdskingfisherviews.cli.commands.base.CLICommand): command = 'field-counts' def configure_subparser(self, subparser): subparser.add_argument("viewnam...
36.809524
101
0.746442
import sqlalchemy as sa import ocdskingfisherviews.cli.commands.base from ocdskingfisherviews.field_counts import FieldCounts class FieldCountsCommand(ocdskingfisherviews.cli.commands.base.CLICommand): command = 'field-counts' def configure_subparser(self, subparser): subparser.add_argument("viewnam...
true
true
f733c6c6ec7585e4d981a7ead7cb6497d1fbd585
1,947
py
Python
tests/mail.py
freifunkh/ansible
ff2f734a033d37d9a602b659e57d3e5f4c0d21a8
[ "MIT" ]
5
2017-03-01T06:41:02.000Z
2021-12-10T15:44:57.000Z
tests/mail.py
freifunkh/ansible
ff2f734a033d37d9a602b659e57d3e5f4c0d21a8
[ "MIT" ]
213
2017-01-29T01:23:50.000Z
2022-03-12T08:18:44.000Z
tests/mail.py
freifunkh/ansible
ff2f734a033d37d9a602b659e57d3e5f4c0d21a8
[ "MIT" ]
10
2017-01-22T17:53:14.000Z
2021-12-18T15:46:22.000Z
#!/usr/bin/env python3 import datetime import pytz import smtplib, ssl import re from email.utils import make_msgid from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.header import Header from email.charset import Charset, QP import os import sys sys.path.insert(0, os.path....
29.5
88
0.69132
import datetime import pytz import smtplib, ssl import re from email.utils import make_msgid from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.header import Header from email.charset import Charset, QP import os import sys sys.path.insert(0, os.path.dirname(__file__)) fro...
true
true
f733c6cdb0d4908cc999ae0ed1d9aa2b5cc89bd9
5,951
py
Python
flaskblog/routesapi.py
phamtho123/Project_python
9ce442ed0ba100420e1a9d903d94a922f06abd47
[ "MIT" ]
null
null
null
flaskblog/routesapi.py
phamtho123/Project_python
9ce442ed0ba100420e1a9d903d94a922f06abd47
[ "MIT" ]
null
null
null
flaskblog/routesapi.py
phamtho123/Project_python
9ce442ed0ba100420e1a9d903d94a922f06abd47
[ "MIT" ]
null
null
null
import sys from flask import request, jsonify, abort from flaskblog import app, db, bcrypt from flaskblog.models import Token, Post, User import datetime # method used to create a token that can be used for some time defined by the delta @app.route('/api/token/public', methods=['POST']) def get_token(): data = reque...
34.80117
103
0.715678
import sys from flask import request, jsonify, abort from flaskblog import app, db, bcrypt from flaskblog.models import Token, Post, User import datetime @app.route('/api/token/public', methods=['POST']) def get_token(): data = request.form if 'email' not in data or 'password' not in data: return abort(400...
true
true
f733c7a98385296b9a9f7f67eb769d4bebef7170
15,880
py
Python
lib/googlecloudsdk/api_lib/compute/base_classes_resource_registry.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/api_lib/compute/base_classes_resource_registry.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/api_lib/compute/base_classes_resource_registry.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
29.626866
84
0.518577
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.core.resource import resource_info RESOURCE_REGISTRY = { 'compute.addresses': resource_info.ResourceInfo( cache_command='compute addresses list', ...
true
true
f733c7ea5059279ce6cab52793d4cf2eae1e4752
12,355
py
Python
tests/testflows/rbac/tests/syntax/create_row_policy.py
lizhichao/ClickHouse
3f5dc37095ccca18de490fab162d6e3cb99756aa
[ "Apache-2.0" ]
8
2019-06-04T02:50:13.000Z
2022-02-10T06:46:51.000Z
tests/testflows/rbac/tests/syntax/create_row_policy.py
lizhichao/ClickHouse
3f5dc37095ccca18de490fab162d6e3cb99756aa
[ "Apache-2.0" ]
16
2021-06-07T21:32:30.000Z
2022-03-31T21:08:29.000Z
tests/testflows/rbac/tests/syntax/create_row_policy.py
lizhichao/ClickHouse
3f5dc37095ccca18de490fab162d6e3cb99756aa
[ "Apache-2.0" ]
null
null
null
from contextlib import contextmanager from testflows.core import * from rbac.requirements import * import rbac.tests.errors as errors @TestFeature @Name("create row policy") @Args(format_description=False) def feature(self, node="clickhouse1"): """Check create row policy query syntax. ```sql CREATE [ROW...
54.911111
136
0.615055
from contextlib import contextmanager from testflows.core import * from rbac.requirements import * import rbac.tests.errors as errors @TestFeature @Name("create row policy") @Args(format_description=False) def feature(self, node="clickhouse1"): node = self.context.cluster.node(node) @contextmanager def ...
true
true
f733c7fa71b298ed03e3a73c484f00bb55bfbbc1
1,602
py
Python
config/urls.py
manuelen12/test_sale
1d199fcfca8361edf704e0bb138a07e7d924f327
[ "MIT" ]
null
null
null
config/urls.py
manuelen12/test_sale
1d199fcfca8361edf704e0bb138a07e7d924f327
[ "MIT" ]
null
null
null
config/urls.py
manuelen12/test_sale
1d199fcfca8361edf704e0bb138a07e7d924f327
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views from test_venta.sales.v0.urls import router as sales from django.views.g...
39.073171
110
0.717228
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views from test_venta.sales.v0.urls import router as sales from django.views.g...
true
true
f733ca4ff17ab22da60d82f75c1251396d4c316f
1,180
py
Python
ai/monitoring/cleanup_dd.py
jolibrain/recognition
5ad2cc7b94f65e72f68c11eb3b7e1066ef907cbe
[ "Apache-2.0" ]
6
2018-03-16T15:27:22.000Z
2020-07-16T09:45:24.000Z
ai/monitoring/cleanup_dd.py
jolibrain/recognition
5ad2cc7b94f65e72f68c11eb3b7e1066ef907cbe
[ "Apache-2.0" ]
null
null
null
ai/monitoring/cleanup_dd.py
jolibrain/recognition
5ad2cc7b94f65e72f68c11eb3b7e1066ef907cbe
[ "Apache-2.0" ]
1
2020-12-24T20:05:35.000Z
2020-12-24T20:05:35.000Z
""" Copyright 2016 Fabric S.P.A, Emmanuel Benazera, Alexandre Girard 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 ...
28.780488
64
0.769492
from dd_client import DD HOST = 'localhost' PORT = 8080 dd = DD(HOST,PORT) dd.set_return_format(dd.RETURN_PYTHON) def delete_dd_service(sname): dd.delete_service(sname,clear='') info = dd.info() for s in info['head']['services']: sname = s['name'] delete_dd_service(sname)
true
true
f733ca75c9d6e2276134f106b397b8a95855ffff
18,336
py
Python
environment/lib/python3.8/site-packages/sklearn/decomposition/tests/test_dict_learning.py
123972/PCA-nutricion
aff3c51a71c887c3fa367dbf9d599be5915c80cc
[ "MIT" ]
1
2021-05-23T16:07:49.000Z
2021-05-23T16:07:49.000Z
environment/lib/python3.8/site-packages/sklearn/decomposition/tests/test_dict_learning.py
123972/PCA-nutricion
aff3c51a71c887c3fa367dbf9d599be5915c80cc
[ "MIT" ]
2
2021-06-08T22:19:17.000Z
2021-09-08T02:27:57.000Z
environment/lib/python3.8/site-packages/sklearn/decomposition/tests/test_dict_learning.py
123972/PCA-nutricion
aff3c51a71c887c3fa367dbf9d599be5915c80cc
[ "MIT" ]
1
2021-10-02T07:23:08.000Z
2021-10-02T07:23:08.000Z
import pytest import numpy as np import itertools from sklearn.exceptions import ConvergenceWarning from sklearn.utils import check_array from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import ignore_warnings from sklearn...
36.16568
79
0.650305
import pytest import numpy as np import itertools from sklearn.exceptions import ConvergenceWarning from sklearn.utils import check_array from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import ignore_warnings from sklearn...
true
true
f733ca883ab59016f210e4e497aed74a462493ca
3,486
py
Python
tools/generate_taint_models/tests/get_graphql_sources_test.py
MedRedha/pyre-check
1e1aaceb1bfd98de5fabe67d3839e20e5ed0cd31
[ "MIT" ]
1
2019-12-31T01:08:13.000Z
2019-12-31T01:08:13.000Z
tools/generate_taint_models/tests/get_graphql_sources_test.py
MedRedha/pyre-check
1e1aaceb1bfd98de5fabe67d3839e20e5ed0cd31
[ "MIT" ]
null
null
null
tools/generate_taint_models/tests/get_graphql_sources_test.py
MedRedha/pyre-check
1e1aaceb1bfd98de5fabe67d3839e20e5ed0cd31
[ "MIT" ]
null
null
null
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-unsafe import os # noqa import unittest from typing import Callable from unittest.mock import patch from graphql.type import ( GraphQL...
35.938144
91
0.697361
import os import unittest from typing import Callable from unittest.mock import patch from graphql.type import ( GraphQLBoolean, GraphQLField, GraphQLID, GraphQLNonNull, GraphQLObjectType, ) from graphql.type.definition import GraphQLType from tools.pyre.tools.generate_taint_models import ...
true
true
f733cc1d46074ff7e7976f96027b8df60d1a9565
1,177
py
Python
application/routes/leads/views.py
dejbug/full-stack-python-test-1
c5256e24d33ef5f8e1cc9dc9330507c15421f944
[ "MIT" ]
null
null
null
application/routes/leads/views.py
dejbug/full-stack-python-test-1
c5256e24d33ef5f8e1cc9dc9330507c15421f944
[ "MIT" ]
null
null
null
application/routes/leads/views.py
dejbug/full-stack-python-test-1
c5256e24d33ef5f8e1cc9dc9330507c15421f944
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template, redirect, url_for, flash, jsonify from sqlalchemy import exc from application import db from application.routes.leads.models import Lead from application.routes.leads.forms import AddLeadForm leads = Blueprint("leads", __name__) @leads.route("/") def inde...
24.020408
120
0.682243
from flask import Blueprint, render_template, redirect, url_for, flash, jsonify from sqlalchemy import exc from application import db from application.routes.leads.models import Lead from application.routes.leads.forms import AddLeadForm leads = Blueprint("leads", __name__) @leads.route("/") def inde...
true
true
f733cc585e3bd598315b5ed42c06657f598db3ad
13,520
py
Python
struct2tensor/expression_impl/map_prensor.py
jay90099/struct2tensor
47d651757efa27586bf75f991b2174d8173a750b
[ "Apache-2.0" ]
30
2019-10-07T21:31:44.000Z
2022-03-30T17:11:44.000Z
struct2tensor/expression_impl/map_prensor.py
jay90099/struct2tensor
47d651757efa27586bf75f991b2174d8173a750b
[ "Apache-2.0" ]
2
2020-03-23T20:48:14.000Z
2021-04-16T15:05:33.000Z
struct2tensor/expression_impl/map_prensor.py
jay90099/struct2tensor
47d651757efa27586bf75f991b2174d8173a750b
[ "Apache-2.0" ]
30
2019-07-16T13:01:53.000Z
2022-03-01T22:04:36.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.246649
80
0.678624
from typing import Callable, FrozenSet, Optional, Sequence, Tuple from struct2tensor import calculate_options from struct2tensor import expression from struct2tensor import expression_add from struct2tensor import path from struct2tensor import prensor from struct2tensor.expression_impl import project im...
true
true
f733cd5cd7b26eff24b7f0922e58c6c60946ddc8
3,642
py
Python
scripts/bitcoin/mlp_bitcoin_wf.py
Judene/fts_predictors
de018526579d7bce9f6619cf18fa2a634f29bede
[ "MIT" ]
null
null
null
scripts/bitcoin/mlp_bitcoin_wf.py
Judene/fts_predictors
de018526579d7bce9f6619cf18fa2a634f29bede
[ "MIT" ]
null
null
null
scripts/bitcoin/mlp_bitcoin_wf.py
Judene/fts_predictors
de018526579d7bce9f6619cf18fa2a634f29bede
[ "MIT" ]
null
null
null
import os import pathlib import pandas as pd import matplotlib.pyplot as plt from src.models.walk_forward_predictor import WalkForwardPredictor from src.models.mlp import MultiLayerPerceptron from src.utils import series_to_supervised # TODO: Add description! Mention datasources # Get data path or create a directo...
33.722222
105
0.699341
import os import pathlib import pandas as pd import matplotlib.pyplot as plt from src.models.walk_forward_predictor import WalkForwardPredictor from src.models.mlp import MultiLayerPerceptron from src.utils import series_to_supervised pathlib.Path(os.path.join(os.path.dirname(os.getcwd()), "..", "data")).mkdir(...
true
true
f733cdb1fe4c88202198e12d0be40c4756cf2983
10,104
py
Python
ddi_search_engine/Bio/MultiProc/copen.py
dbmi-pitt/DIKB-Evidence-analytics
9ffd629db30c41ced224ff2afdf132ce9276ae3f
[ "MIT" ]
3
2015-06-08T17:58:54.000Z
2022-03-10T18:49:44.000Z
ddi_search_engine/Bio/MultiProc/copen.py
dbmi-pitt/DIKB-Evidence-analytics
9ffd629db30c41ced224ff2afdf132ce9276ae3f
[ "MIT" ]
null
null
null
ddi_search_engine/Bio/MultiProc/copen.py
dbmi-pitt/DIKB-Evidence-analytics
9ffd629db30c41ced224ff2afdf132ce9276ae3f
[ "MIT" ]
null
null
null
""" This implements a set of classes that wraps a file object interface around code that executes in another process. This allows you fork many different commands and let the run concurrently. Functions: copen_sys Open a file-like pipe to a system command. copen_fn Open a file-like pipe to a python function....
30.899083
212
0.584818
""" This implements a set of classes that wraps a file object interface around code that executes in another process. This allows you fork many different commands and let the run concurrently. Functions: copen_sys Open a file-like pipe to a system command. copen_fn Open a file-like pipe to a python function....
false
true
f733ce30454b45b5468fa20788bec4378abc6679
20,309
py
Python
test/merge_sharding.py
paralin/vitess
7b048c5442679ce6cf48773cf17a184c1ce91295
[ "Apache-2.0" ]
8
2017-08-14T15:19:04.000Z
2021-06-07T10:36:52.000Z
test/merge_sharding.py
paralin/vitess
7b048c5442679ce6cf48773cf17a184c1ce91295
[ "Apache-2.0" ]
19
2020-09-25T15:41:41.000Z
2022-03-25T23:06:54.000Z
test/merge_sharding.py
paralin/vitess
7b048c5442679ce6cf48773cf17a184c1ce91295
[ "Apache-2.0" ]
7
2021-03-07T03:24:39.000Z
2022-02-16T06:46:10.000Z
#!/usr/bin/env python # # Copyright 2019 The Vitess Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
43.581545
80
0.639766
import logging import unittest from vtdb import keyrange_constants import base_sharding import environment import tablet import utils shard_0_master = tablet.Tablet() shard_0_replica = tablet.Tablet() shard_0_rdonly = tablet.Tablet() shard_1_master = tablet.Tablet() shard_1_replica = tablet.Tabl...
true
true
f733cec75b8c2ac115c69e7f96db4eb07a055e76
1,348
py
Python
CPL/__main__.py
Krzem5/Python-Launguage
92f6cf9a331b5d52c5507eac291f1f51b9e97f3b
[ "BSD-3-Clause" ]
null
null
null
CPL/__main__.py
Krzem5/Python-Launguage
92f6cf9a331b5d52c5507eac291f1f51b9e97f3b
[ "BSD-3-Clause" ]
null
null
null
CPL/__main__.py
Krzem5/Python-Launguage
92f6cf9a331b5d52c5507eac291f1f51b9e97f3b
[ "BSD-3-Clause" ]
null
null
null
from .compiler import Compiler import colorama import ctypes import glob import os import sys colorama.init() def write(t): print("\033[22;37m"+t,end="") def write_warn(w): print("\033[2;33m"+w,end="") def write_error(e): print("\033[2;31m"+e,end="") if ("--compile" in sys.argv): sys.argv=sys.argv[1:] D=(...
22.466667
81
0.629822
from .compiler import Compiler import colorama import ctypes import glob import os import sys colorama.init() def write(t): print("\033[22;37m"+t,end="") def write_warn(w): print("\033[2;33m"+w,end="") def write_error(e): print("\033[2;31m"+e,end="") if ("--compile" in sys.argv): sys.argv=sys.argv[1:] D=(...
true
true
f733d08bbbf58ea5f8b9e29fdcb3d39f309b195d
7,029
py
Python
pruning/cifar10_fbnet/supernet_main_file.py
sunghern/Auto-Compression
7c1123e5ffb63b0c34bef2db40dbfb560cb25c2e
[ "MIT" ]
11
2019-11-26T04:33:31.000Z
2022-03-28T11:35:54.000Z
pruning/cifar10_fbnet/supernet_main_file.py
sunghern/Auto-Compression
7c1123e5ffb63b0c34bef2db40dbfb560cb25c2e
[ "MIT" ]
22
2019-11-26T06:48:07.000Z
2021-12-20T12:50:16.000Z
pruning/cifar10_fbnet/supernet_main_file.py
sunghern/Auto-Compression
7c1123e5ffb63b0c34bef2db40dbfb560cb25c2e
[ "MIT" ]
10
2019-11-26T04:33:57.000Z
2021-10-12T04:30:48.000Z
import numpy as np import torch from torch import nn from tensorboardX import SummaryWriter from scipy.special import softmax import argparse from general_functions.dataloaders import get_loaders, get_test_loader from general_functions.utils import get_logger, weights_init, load, create_directories_from_list, \ ...
52.849624
131
0.683454
import numpy as np import torch from torch import nn from tensorboardX import SummaryWriter from scipy.special import softmax import argparse from general_functions.dataloaders import get_loaders, get_test_loader from general_functions.utils import get_logger, weights_init, load, create_directories_from_list, \ ...
true
true
f733d0a6b325a0935dd9642c3cc568d46f001f7a
2,823
py
Python
main/test.py
levishai/3DMPPE_POSENET_RELEASE
e364053b5a4e51f4a84eb50abb26026094931d90
[ "MIT" ]
608
2019-07-28T11:58:51.000Z
2022-03-31T03:34:24.000Z
main/test.py
levishai/3DMPPE_POSENET_RELEASE
e364053b5a4e51f4a84eb50abb26026094931d90
[ "MIT" ]
111
2019-07-31T08:58:22.000Z
2022-03-07T08:00:00.000Z
main/test.py
levishai/3DMPPE_POSENET_RELEASE
e364053b5a4e51f4a84eb50abb26026094931d90
[ "MIT" ]
142
2019-08-05T14:34:59.000Z
2022-03-31T03:34:25.000Z
import argparse from tqdm import tqdm import numpy as np import cv2 from config import cfg import torch from base import Tester from utils.vis import vis_keypoints from utils.pose_utils import flip import torch.backends.cudnn as cudnn def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--...
34.012048
171
0.588735
import argparse from tqdm import tqdm import numpy as np import cv2 from config import cfg import torch from base import Tester from utils.vis import vis_keypoints from utils.pose_utils import flip import torch.backends.cudnn as cudnn def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--...
true
true
f733d0e522fb8b9cb4cf1725290ec7f8123a4c29
12,842
py
Python
test/test_public_bindings.py
jaketae/pytorch
5654e6339879e438efb7cf50e88e356472eb0545
[ "Intel" ]
null
null
null
test/test_public_bindings.py
jaketae/pytorch
5654e6339879e438efb7cf50e88e356472eb0545
[ "Intel" ]
null
null
null
test/test_public_bindings.py
jaketae/pytorch
5654e6339879e438efb7cf50e88e356472eb0545
[ "Intel" ]
null
null
null
# -*- coding: utf-8 -*- # Owner(s): ["module: autograd"] from torch.testing._internal.common_utils import TestCase, run_tests, IS_WINDOWS import pkgutil import torch import sys from typing import Callable import inspect import json import os import unittest class TestPublicBindings(TestCase): def test_no_new_bind...
36.276836
125
0.548746
from torch.testing._internal.common_utils import TestCase, run_tests, IS_WINDOWS import pkgutil import torch import sys from typing import Callable import inspect import json import os import unittest class TestPublicBindings(TestCase): def test_no_new_bindings(self): ...
true
true
f733d1a2aac450996bfafba7f201d147ff23592a
56,410
py
Python
silx/math/fit/fittheories.py
sanjaymsh/silx
50c2b4820d4786abcce866645b1d3c138891a25f
[ "CC0-1.0", "MIT" ]
2
2020-03-09T15:50:17.000Z
2020-03-09T15:50:23.000Z
silx/math/fit/fittheories.py
sanjaymsh/silx
50c2b4820d4786abcce866645b1d3c138891a25f
[ "CC0-1.0", "MIT" ]
1
2020-03-12T13:11:59.000Z
2020-03-12T13:53:55.000Z
silx/math/fit/fittheories.py
JuliusHarald/silx
3f9bcda88c074438fdb30cde29fec314d26f471c
[ "CC0-1.0", "MIT" ]
null
null
null
# coding: utf-8 #/*########################################################################## # # Copyright (c) 2004-2020 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to de...
41.025455
99
0.537192
y'] = 1 npoints = len(y) peaks = self.peak_search(y, fwhm=search_fwhm, sensitivity=search_sens) if not len(peaks): forcepeak = int(float(self.config.get('ForcePeakPresence', 0))) if forcepeak: ...
true
true
f733d1aa834e2b814bc2040bb2f67d5110cbe269
7,083
py
Python
Maquina_Virtual/lectura.py
alegayndra/KillerQueen
87dd65597cbc6e0a678a5beadff5013f66dd919a
[ "MIT" ]
null
null
null
Maquina_Virtual/lectura.py
alegayndra/KillerQueen
87dd65597cbc6e0a678a5beadff5013f66dd919a
[ "MIT" ]
1
2021-06-02T16:00:49.000Z
2021-06-02T16:00:49.000Z
Maquina_Virtual/lectura.py
alegayndra/KillerQueen
87dd65597cbc6e0a678a5beadff5013f66dd919a
[ "MIT" ]
null
null
null
from os import DirEntry, read, getcwd from pathlib import Path import io import sys from globales import * # Función que lee los cuadruplo def leerCuadruplos(txt_cuadruplos): readStr = 0 while readStr < len(txt_cuadruplos): cantidades = txt_cuadruplos[ readStr:txt_cuadruplos.find( '\n', readStr ) ] operado...
42.413174
114
0.690809
from os import DirEntry, read, getcwd from pathlib import Path import io import sys from globales import * def leerCuadruplos(txt_cuadruplos): readStr = 0 while readStr < len(txt_cuadruplos): cantidades = txt_cuadruplos[ readStr:txt_cuadruplos.find( '\n', readStr ) ] operador = int( cantidades[ 1:cantidad...
true
true
f733d2a80a87cc7d115bb5c9f11d55731f8b4819
417
py
Python
solutions/python/2017/arrayElementsProduct.py
lucifer1198/Codesignal
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
[ "MIT" ]
2
2020-12-21T22:09:26.000Z
2021-01-01T15:40:01.000Z
solutions/python/2017/arrayElementsProduct.py
nsu1210/Codesignal
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
[ "MIT" ]
null
null
null
solutions/python/2017/arrayElementsProduct.py
nsu1210/Codesignal
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
[ "MIT" ]
1
2021-01-28T18:15:02.000Z
2021-01-28T18:15:02.000Z
#Question: https://python.web.id/blog/given-an-array-of-integers-cf/ def arrayElementsProduct(inputArray): product = 1 for numb in inputArray: product *= numb return product ''' >>> inputArray = [1, 3, 2, 10] >>> arrayElementsProduct(inputArray) 60 >>> >>> inputArray = [2, 4, 10, 1] >>> arrayEleme...
18.954545
68
0.654676
def arrayElementsProduct(inputArray): product = 1 for numb in inputArray: product *= numb return product
true
true
f733d33ac1d65a98c426fa5e37840a72560da8e6
1,415
py
Python
agent/src/agent/modules/constants.py
eacherkan-aternity/daria
7c77a2f52c09c852017b16949a848fa51f0fb579
[ "Apache-2.0" ]
null
null
null
agent/src/agent/modules/constants.py
eacherkan-aternity/daria
7c77a2f52c09c852017b16949a848fa51f0fb579
[ "Apache-2.0" ]
null
null
null
agent/src/agent/modules/constants.py
eacherkan-aternity/daria
7c77a2f52c09c852017b16949a848fa51f0fb579
[ "Apache-2.0" ]
null
null
null
import os ANODOT_API_URL = os.environ.get('ANODOT_API_URL', 'https://api.anodot.com') ENV_PROD = True if os.environ.get('ENV_PROD') == 'true' else False HOSTNAME = os.environ.get('HOSTNAME', 'agent') STREAMSETS_PREVIEW_TIMEOUT = os.environ.get('STREAMSETS_PREVIEW_TIMEOUT', 30000) VALIDATION_ENABLED = os.environ.get...
45.645161
108
0.763958
import os ANODOT_API_URL = os.environ.get('ANODOT_API_URL', 'https://api.anodot.com') ENV_PROD = True if os.environ.get('ENV_PROD') == 'true' else False HOSTNAME = os.environ.get('HOSTNAME', 'agent') STREAMSETS_PREVIEW_TIMEOUT = os.environ.get('STREAMSETS_PREVIEW_TIMEOUT', 30000) VALIDATION_ENABLED = os.environ.get...
true
true
f733d370c880ad82c68efc8ae724bfeb7fc4f204
6,819
py
Python
starcheck/pcad_att_check.py
sot/starcheck
33d9e4976c815ca0dca59bcdcb1bad61bcf7f023
[ "BSD-3-Clause" ]
2
2021-12-20T16:28:32.000Z
2021-12-20T16:28:34.000Z
starcheck/pcad_att_check.py
sot/starcheck
33d9e4976c815ca0dca59bcdcb1bad61bcf7f023
[ "BSD-3-Clause" ]
245
2015-02-19T16:19:44.000Z
2022-02-03T18:25:18.000Z
starcheck/pcad_att_check.py
sot/starcheck
33d9e4976c815ca0dca59bcdcb1bad61bcf7f023
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import re from astropy.table import Table import Quaternion from parse_cm import read_backstop, read_or_list from Chandra.Time import DateTime import hopper def check_characteristics_date(ofls_characteristics_file, ref_date=None): # de_bytetring the...
41.327273
92
0.600088
import re from astropy.table import Table import Quaternion from parse_cm import read_backstop, read_or_list from Chandra.Time import DateTime import hopper def check_characteristics_date(ofls_characteristics_file, ref_date=None): ofls_characteristics_file = ofls_characteristics_file.decode() if ref_da...
true
true
f733d3850979941ec7e3cd0e71b8be674b67dd74
2,415
py
Python
tests/test_hydrothermal_venture.py
walshification/advent-of-code-2021
84c604d6f1468bc789515b767a1317e173feb43f
[ "MIT" ]
null
null
null
tests/test_hydrothermal_venture.py
walshification/advent-of-code-2021
84c604d6f1468bc789515b767a1317e173feb43f
[ "MIT" ]
null
null
null
tests/test_hydrothermal_venture.py
walshification/advent-of-code-2021
84c604d6f1468bc789515b767a1317e173feb43f
[ "MIT" ]
null
null
null
from solutions.hydrothermal_venture import Grid, Line, Point def test_lines_from_strings(): """Given a string of a certain format, lines can be made.""" line = Line.from_string("0,9 -> 3,9") assert line.points == [Point(0, 9), Point(1, 9), Point(2, 9), Point(3, 9)] def test_line_can_draw_horizontally_wi...
25.421053
78
0.556522
from solutions.hydrothermal_venture import Grid, Line, Point def test_lines_from_strings(): line = Line.from_string("0,9 -> 3,9") assert line.points == [Point(0, 9), Point(1, 9), Point(2, 9), Point(3, 9)] def test_line_can_draw_horizontally_with_points(): start = Point(0, 0) end = Point(2, 0) li...
true
true
f733d3a946b4798fdaaed5bc828c68039904194f
5,124
py
Python
assets/paint/image.py
quantumjim/Ganymede
2e3285f397ef43c356f634539aa1a89009cc624d
[ "Apache-2.0" ]
null
null
null
assets/paint/image.py
quantumjim/Ganymede
2e3285f397ef43c356f634539aa1a89009cc624d
[ "Apache-2.0" ]
null
null
null
assets/paint/image.py
quantumjim/Ganymede
2e3285f397ef43c356f634539aa1a89009cc624d
[ "Apache-2.0" ]
null
null
null
{(0, 0): [4, False], (0, 1): [4, False], (0, 2): [4, False], (0, 3): [4, False], (0, 4): [4, False], (0, 5): [4, False], (0, 6): [4, False], (0, 7): [4, False], (0, 8): [4, False], (0, 9): [4, False], (0, 10): [4, False], (0, 11): [4, False], (0, 12): [4, False], (0, 13): [4, False], (0, 14): [4, False], (0, 15): [4, F...
5,124
5,124
0.400468
{(0, 0): [4, False], (0, 1): [4, False], (0, 2): [4, False], (0, 3): [4, False], (0, 4): [4, False], (0, 5): [4, False], (0, 6): [4, False], (0, 7): [4, False], (0, 8): [4, False], (0, 9): [4, False], (0, 10): [4, False], (0, 11): [4, False], (0, 12): [4, False], (0, 13): [4, False], (0, 14): [4, False], (0, 15): [4, F...
true
true
f733d541460afe07e06a1c4f8b9587fb29f3d90e
2,447
py
Python
images/images_cal/markers/test_threshold.py
richban/behavioral.neuroevolution
bb850bda919a772538dc86a9624a6e86623f9b80
[ "Apache-2.0" ]
null
null
null
images/images_cal/markers/test_threshold.py
richban/behavioral.neuroevolution
bb850bda919a772538dc86a9624a6e86623f9b80
[ "Apache-2.0" ]
2
2020-03-31T01:45:13.000Z
2020-09-25T23:39:43.000Z
images/images_cal/markers/test_threshold.py
richban/behavioral.neuroevolution
bb850bda919a772538dc86a9624a6e86623f9b80
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python # To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. __author__ = "anfv" __date__ = "$16-May-2016 10:43:47$" import vision import cv2 import time def test_threshold(): ...
26.89011
145
0.541071
__author__ = "anfv" __date__ = "$16-May-2016 10:43:47$" import vision import cv2 import time def test_threshold(): totalMarkers = 0 maxMarkers = 0 for i in range(20): name = str( i) + '.jpg' print "processing image ", name frame = cv2.imread(name,cv2.IM...
false
true
f733d5c48341e5e6cf202789ac858a4546fd80c5
4,855
py
Python
verificator/Maps.py
jwallnoefer/multisat_qrepeater_sim_archive
69b4c242fb760cf195871f38b3172d4dfd26c01a
[ "MIT" ]
null
null
null
verificator/Maps.py
jwallnoefer/multisat_qrepeater_sim_archive
69b4c242fb760cf195871f38b3172d4dfd26c01a
[ "MIT" ]
null
null
null
verificator/Maps.py
jwallnoefer/multisat_qrepeater_sim_archive
69b4c242fb760cf195871f38b3172d4dfd26c01a
[ "MIT" ]
null
null
null
""" The maps that model the different processes in the QKD return for input that is diagonal in Bell-basis a diagonal output. To reduce calculations I determined in the scipt "How many numbers for state" the effect of the maps on the diagonal elements """ import numpy as np import functools """These are some helper fu...
35.698529
128
0.547065
import numpy as np import functools z_rot = lambda a, b, c, d: np.array([b, a, d, c]) y_rot = lambda a, b, c, d: np.array([d, c, b, a]) perf_dist = lambda a, b, c, d, e, f, g, h: np.array( [a * e, d * h, a * g, d * f, d * e, a * h, d * g, a * f, c * g, b * f, c * e, b * h, b * g, c * f, b * e, c * h]) dc0 = lamb...
true
true
f733d6092e2e51d54d4bfc79178097397b2a12b8
3,849
py
Python
insights/parsers/zdump_v.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
121
2017-05-30T20:23:25.000Z
2022-03-23T12:52:15.000Z
insights/parsers/zdump_v.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
1,977
2017-05-26T14:36:03.000Z
2022-03-31T10:38:53.000Z
insights/parsers/zdump_v.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
244
2017-05-30T20:22:57.000Z
2022-03-26T10:09:39.000Z
""" ZdumpV - command ``/usr/sbin/zdump -v /etc/localtime -c 2019,2039`` =================================================================== The ``/usr/sbin/zdump -v /etc/localtime -c 2019,2039`` command provides information about 'Daylight Saving Time' in file /etc/localtime from 2019 to 2039. Sample content from com...
34.675676
103
0.600935
from datetime import datetime from insights.specs import Specs from insights.parsers import SkipException from insights import parser, CommandParser def str2datetime(timestamp, tz=False): time, time_string = None, timestamp.strip() # has the corresponding TimeZone where strptime will raise ValueError. ...
true
true
f733d650885dd636e6fa4c71fac7eeffbd094e0f
3,147
py
Python
ai/domain_adaptation/utils/vis.py
aayushkafle/implicit_alignment
4835a8a5acc4b30daf7e1c95195f160e76306cd1
[ "Apache-2.0" ]
null
null
null
ai/domain_adaptation/utils/vis.py
aayushkafle/implicit_alignment
4835a8a5acc4b30daf7e1c95195f160e76306cd1
[ "Apache-2.0" ]
null
null
null
ai/domain_adaptation/utils/vis.py
aayushkafle/implicit_alignment
4835a8a5acc4b30daf7e1c95195f160e76306cd1
[ "Apache-2.0" ]
1
2021-04-15T13:29:34.000Z
2021-04-15T13:29:34.000Z
import numpy as np from ai.domain_adaptation.datasets import image_index from ai.domain_adaptation.utils import np_utils from IPython.display import display, Image import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix def load_data_for_vis(prob_path, target_domain_file, dataset_dir): domain...
37.464286
104
0.668891
import numpy as np from ai.domain_adaptation.datasets import image_index from ai.domain_adaptation.utils import np_utils from IPython.display import display, Image import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix def load_data_for_vis(prob_path, target_domain_file, dataset_dir): domain...
true
true
f733d723ad0fc3dc2db8276b1a146d59c01444bc
7,116
py
Python
tests/test_debug.py
LoveIsGrief/coveragepy
fdadbe8d442a0957d15b4e14035b73d9321cbdff
[ "Apache-2.0" ]
null
null
null
tests/test_debug.py
LoveIsGrief/coveragepy
fdadbe8d442a0957d15b4e14035b73d9321cbdff
[ "Apache-2.0" ]
null
null
null
tests/test_debug.py
LoveIsGrief/coveragepy
fdadbe8d442a0957d15b4e14035b73d9321cbdff
[ "Apache-2.0" ]
2
2018-02-27T08:56:41.000Z
2020-12-22T22:10:38.000Z
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Tests of coverage/debug.py""" import os import pytest import coverage from coverage.backward import StringIO from coverage.debug import filter_text, info_form...
34.047847
96
0.590219
import os import pytest import coverage from coverage.backward import StringIO from coverage.debug import filter_text, info_formatter, info_header, short_id, short_stack from tests.coveragetest import CoverageTest from tests.helpers import re_lines class InfoFormatterTest(CoverageTest): run_in_temp_dir = ...
true
true
f733d82bc3f183b9585071a3be6b935d974669d6
2,620
py
Python
hacks/stepper-mover-1-curses.py
joadavis/rpi-coding
ea60e393e0595dac03ef2594ad5aa4077718d28e
[ "MIT" ]
null
null
null
hacks/stepper-mover-1-curses.py
joadavis/rpi-coding
ea60e393e0595dac03ef2594ad5aa4077718d28e
[ "MIT" ]
null
null
null
hacks/stepper-mover-1-curses.py
joadavis/rpi-coding
ea60e393e0595dac03ef2594ad5aa4077718d28e
[ "MIT" ]
null
null
null
#!/usr/bin/python # from raspberrypi-spy.co.uk import sys import time import RPi.GPIO as GPIO import curses # set up curses stdscr = curses.initscr() #curses.noecho() curses.cbreak() stdscr.keypad(1) # use BCM GPIO refs GPIO.setmode(GPIO.BCM) # define pins #StepPins = [17, 22, 23, 24] #StepPins = [35, 36, 37, 38]...
19.552239
83
0.607634
import sys import time import RPi.GPIO as GPIO import curses stdscr = curses.initscr() curses.cbreak() stdscr.keypad(1) GPIO.setmode(GPIO.BCM) pin in StepPins: stdscr.addstr(2,2, "Setup pins " + str(pin)) GPIO.setup(pin, GPIO.OUT) GPIO.output(pin, False) HalfSeq = [[1,0,0,1], [1,0,0,0], ...
true
true
f733d91ed50f389a2ee0c114720533cf52534fac
12,497
py
Python
configure.py
luvit/ninja
62d3b116bb93360bc13600e2ab972504a958d476
[ "Apache-2.0" ]
1
2017-09-07T01:22:05.000Z
2017-09-07T01:22:05.000Z
configure.py
luvit/ninja
62d3b116bb93360bc13600e2ab972504a958d476
[ "Apache-2.0" ]
null
null
null
configure.py
luvit/ninja
62d3b116bb93360bc13600e2ab972504a958d476
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2001 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
32.886842
78
0.599664
"""Script that generates the build.ninja for ninja itself. Projects that use ninja themselves should either write a similar script or use a meta-build system that supports Ninja output.""" from optparse import OptionParser import os import sys sys.path.insert(0, 'misc') import ninja_syntax parser = ...
false
true
f733d99d59edf672ec3ad0db376c6ee54adec6c2
2,405
py
Python
examples/stream-job-examples/in-progress.py
prernaagarwal/cs6235Project
9e7c5717ea2afdb5f1afef9f9b632b5a765fce4e
[ "Apache-2.0" ]
3
2020-10-04T22:40:27.000Z
2021-12-14T14:28:11.000Z
examples/stream-job-examples/in-progress.py
prernaagarwal/cs6235Project
9e7c5717ea2afdb5f1afef9f9b632b5a765fce4e
[ "Apache-2.0" ]
1
2020-10-22T19:58:53.000Z
2020-10-22T19:58:53.000Z
examples/stream-job-examples/in-progress.py
prernaagarwal/cs6235Project
9e7c5717ea2afdb5f1afef9f9b632b5a765fce4e
[ "Apache-2.0" ]
4
2020-10-15T03:12:52.000Z
2021-03-25T20:03:54.000Z
from edna.core.execution.context import StreamingContext from edna.api import StreamBuilder from edna.ingest.streaming import SimulatedIngest from edna.serializers.EmptySerializer import EmptyStringSerializer from edna.process.map import JsonToObject from edna.process.filter import KeyedFilter from edna.emit import ...
51.170213
199
0.707692
from edna.core.execution.context import StreamingContext from edna.api import StreamBuilder from edna.ingest.streaming import SimulatedIngest from edna.serializers.EmptySerializer import EmptyStringSerializer from edna.process.map import JsonToObject from edna.process.filter import KeyedFilter from edna.emit import ...
true
true
f733da9b2e6fd7da239b30ca0de5545ee2e75c94
7,971
py
Python
docs/conf.py
SohilaBogdadyNagdy/HitchHikerDemo
d0f0e1607d87d8eefc32688adf680ee0c45a8b42
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
SohilaBogdadyNagdy/HitchHikerDemo
d0f0e1607d87d8eefc32688adf680ee0c45a8b42
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
SohilaBogdadyNagdy/HitchHikerDemo
d0f0e1607d87d8eefc32688adf680ee0c45a8b42
[ "BSD-3-Clause" ]
null
null
null
# HitchHikerDemo documentation build configuration file, created by # sphinx-quickstart. # # 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. # # All configuration values have a default; values th...
31.136719
80
0.697152
import os import sys extensions = [] templates_path = ["_templates"] source_suffix = ".rst" master_doc = "index" project = "HitchHikerDemo" copyright = """2018, Sohila Boghdady""" # |version| and |release|, also used in various other places throughout the # built documents. # # The ...
true
true
f733dc4b28b73d47b83d1891bc852c4f90a2c57a
20,221
py
Python
numpy/distutils/command/scons.py
efiring/numpy-work
f873f11f3b96ff859debdc91a2c172a6b476f7db
[ "BSD-3-Clause" ]
1
2016-11-11T17:55:13.000Z
2016-11-11T17:55:13.000Z
numpy/distutils/command/scons.py
efiring/numpy-work
f873f11f3b96ff859debdc91a2c172a6b476f7db
[ "BSD-3-Clause" ]
null
null
null
numpy/distutils/command/scons.py
efiring/numpy-work
f873f11f3b96ff859debdc91a2c172a6b476f7db
[ "BSD-3-Clause" ]
null
null
null
import os import os.path from os.path import join as pjoin, dirname as pdirname from distutils.errors import DistutilsPlatformError from distutils.errors import DistutilsExecError, DistutilsSetupError from numpy.distutils.command.build_ext import build_ext as old_build_ext from numpy.distutils.ccompiler import CCompi...
43.299786
101
0.612977
import os import os.path from os.path import join as pjoin, dirname as pdirname from distutils.errors import DistutilsPlatformError from distutils.errors import DistutilsExecError, DistutilsSetupError from numpy.distutils.command.build_ext import build_ext as old_build_ext from numpy.distutils.ccompiler import CCompi...
false
true
f733de1fcaee1027767be7d22688fda17296c23d
4,896
py
Python
tests/src/smiley/smiley/tests/test_db_linecache.py
incognitoRepo/hdlogger
c738161ef3144469ba0f47caf89770613031e96e
[ "BSD-2-Clause" ]
null
null
null
tests/src/smiley/smiley/tests/test_db_linecache.py
incognitoRepo/hdlogger
c738161ef3144469ba0f47caf89770613031e96e
[ "BSD-2-Clause" ]
null
null
null
tests/src/smiley/smiley/tests/test_db_linecache.py
incognitoRepo/hdlogger
c738161ef3144469ba0f47caf89770613031e96e
[ "BSD-2-Clause" ]
null
null
null
import fixtures import testtools from smiley import db from smiley import db_linecache class DBFileCacheTest(testtools.TestCase): def setUp(self): super(DBFileCacheTest, self).setUp() self.useFixture(fixtures.FakeLogger()) self.db = db.DB(':memory:') self.db.start_run( ...
34.237762
75
0.542892
import fixtures import testtools from smiley import db from smiley import db_linecache class DBFileCacheTest(testtools.TestCase): def setUp(self): super(DBFileCacheTest, self).setUp() self.useFixture(fixtures.FakeLogger()) self.db = db.DB(':memory:') self.db.start_run( ...
true
true
f733df3416c3f4e79a3c542d6f4d715b01756f38
123,058
py
Python
salt/cloud/clouds/ec2.py
DoubleNegativeVisualEffects/salt
91b963274a46829454f19c729a56799573654807
[ "Apache-2.0" ]
1
2015-05-20T16:55:50.000Z
2015-05-20T16:55:50.000Z
salt/cloud/clouds/ec2.py
DoubleNegativeVisualEffects/salt
91b963274a46829454f19c729a56799573654807
[ "Apache-2.0" ]
null
null
null
salt/cloud/clouds/ec2.py
DoubleNegativeVisualEffects/salt
91b963274a46829454f19c729a56799573654807
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' The EC2 Cloud Module ==================== The EC2 cloud module is used to interact with the Amazon Elastic Cloud Computing. To use the EC2 cloud module, set up the cloud configuration at ``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/ec2.conf``: .. code-block:: yaml ...
31.312468
139
0.548961
from __future__ import absolute_import import os import sys import stat import time import uuid import pprint import logging import yaml import requests import salt.ext.six as six from salt.ext.six.moves import map, range, zip from salt.ext.six.moves.urllib.parse import urlparse as _urlparse, urlencode as _url...
true
true
f733e262f12794cbbfcbebe1b731b2f9cfb8f27d
3,875
py
Python
pmedian/views.py
ibadkureshi/tnk-locationallocation
b06abcb7bf8675b13e4c2e4fe419afb5ee11018f
[ "MIT" ]
1
2021-02-07T10:37:52.000Z
2021-02-07T10:37:52.000Z
pmedian/views.py
panosprotopapas/tnk-locationallocation
b06abcb7bf8675b13e4c2e4fe419afb5ee11018f
[ "MIT" ]
null
null
null
pmedian/views.py
panosprotopapas/tnk-locationallocation
b06abcb7bf8675b13e4c2e4fe419afb5ee11018f
[ "MIT" ]
2
2020-10-23T13:14:53.000Z
2020-11-13T12:01:44.000Z
from django.shortcuts import render from pmedian.tasks import * from pandas import errors from pmedapp.common.utilities import * import json import pandas as pd from django.views.decorators.csrf import csrf_exempt from django.utils.datastructures import MultiValueDictKeyError import glob import os.path @csrf_exempt d...
33.405172
120
0.640774
from django.shortcuts import render from pmedian.tasks import * from pandas import errors from pmedapp.common.utilities import * import json import pandas as pd from django.views.decorators.csrf import csrf_exempt from django.utils.datastructures import MultiValueDictKeyError import glob import os.path @csrf_exempt d...
true
true
f733e2d93da63ebc16c6d046ab094edab6f9499e
648
py
Python
armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_data_processing_register/thumb_miscellaneous_operations/rev16_t2.py
matan1008/armulator
04d24dcec6ab42326018f5e09331e5b4738d6b52
[ "MIT" ]
16
2018-01-22T14:36:49.000Z
2021-12-17T15:39:52.000Z
armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_data_processing_register/thumb_miscellaneous_operations/rev16_t2.py
AhmedMounir/armulator
04d24dcec6ab42326018f5e09331e5b4738d6b52
[ "MIT" ]
3
2019-02-19T17:51:47.000Z
2022-03-31T20:45:21.000Z
armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_data_processing_register/thumb_miscellaneous_operations/rev16_t2.py
AhmedMounir/armulator
04d24dcec6ab42326018f5e09331e5b4738d6b52
[ "MIT" ]
4
2020-06-18T23:51:03.000Z
2022-02-09T17:43:13.000Z
from armulator.armv6.opcodes.abstract_opcodes.rev16 import Rev16 from armulator.armv6.opcodes.opcode import Opcode class Rev16T2(Rev16, Opcode): def __init__(self, instruction, m, d): Opcode.__init__(self, instruction) Rev16.__init__(self, m, d) def is_pc_changing_opcode(self): return...
29.454545
67
0.621914
from armulator.armv6.opcodes.abstract_opcodes.rev16 import Rev16 from armulator.armv6.opcodes.opcode import Opcode class Rev16T2(Rev16, Opcode): def __init__(self, instruction, m, d): Opcode.__init__(self, instruction) Rev16.__init__(self, m, d) def is_pc_changing_opcode(self): return...
false
true
f733e2f0e15fdb2e869d8fb86904ba81a2ca84d5
5,020
py
Python
sdk/AsposeEmailCloudSdk/models/ai_name_formatted.py
aspose-email-cloud/aspose-email-cloud-python
c5c13839cbbbfa5b6617bd1aedf3cf30cd664227
[ "MIT" ]
1
2020-02-26T13:19:06.000Z
2020-02-26T13:19:06.000Z
sdk/AsposeEmailCloudSdk/models/ai_name_formatted.py
aspose-email-cloud/aspose-email-cloud-python
c5c13839cbbbfa5b6617bd1aedf3cf30cd664227
[ "MIT" ]
null
null
null
sdk/AsposeEmailCloudSdk/models/ai_name_formatted.py
aspose-email-cloud/aspose-email-cloud-python
c5c13839cbbbfa5b6617bd1aedf3cf30cd664227
[ "MIT" ]
null
null
null
# coding: utf-8 # ---------------------------------------------------------------------------- # <copyright company="Aspose" file="AiNameFormatted.py"> # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved. # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtai...
32.387097
131
0.569124
import pprint import re import six from typing import List, Set, Dict, Tuple, Optional from datetime import datetime class AiNameFormatted(object): swagger_types = { 'name': 'str', 'comments': 'str' } attribute_map = { 'name': 'name', 'comments':...
true
true
f733e3763f40a4b5dfcc0e785f7d49d28810498c
22,832
py
Python
mspray/apps/main/tasks.py
onaio/mspray
b3e0f4b5855abbf0298de6b66f2e9f472f2bf838
[ "Apache-2.0" ]
null
null
null
mspray/apps/main/tasks.py
onaio/mspray
b3e0f4b5855abbf0298de6b66f2e9f472f2bf838
[ "Apache-2.0" ]
76
2018-03-15T09:37:56.000Z
2019-05-15T12:45:51.000Z
mspray/apps/main/tasks.py
onaio/mspray
b3e0f4b5855abbf0298de6b66f2e9f472f2bf838
[ "Apache-2.0" ]
1
2020-10-31T07:15:22.000Z
2020-10-31T07:15:22.000Z
# -*- coding: utf-8 -*- """Mspray task module.""" from __future__ import absolute_import import gc import logging import os from datetime import timedelta from django.conf import settings from django.contrib.gis.geos import Point from django.contrib.gis.geos.polygon import Polygon from django.db.models import Q, Sum,...
30.081686
78
0.63411
from __future__ import absolute_import import gc import logging import os from datetime import timedelta from django.conf import settings from django.contrib.gis.geos import Point from django.contrib.gis.geos.polygon import Polygon from django.db.models import Q, Sum, Value from django.db.models.functions import Coa...
true
true
f733e3db1a4d26f03d87a4c1a4615c27ffe99363
676
py
Python
Home/migrations/0010_auto_20200722_1738.py
varunofficial2509/HMS-1
d1b618575d038cd432e5b8742cdebdae82d34d30
[ "MIT" ]
4
2021-06-13T13:52:37.000Z
2021-09-16T16:54:11.000Z
Home/migrations/0010_auto_20200722_1738.py
varunofficial2509/HMS-1
d1b618575d038cd432e5b8742cdebdae82d34d30
[ "MIT" ]
5
2021-07-10T10:37:06.000Z
2022-03-12T00:58:24.000Z
Home/migrations/0010_auto_20200722_1738.py
varunofficial2509/HMS-1
d1b618575d038cd432e5b8742cdebdae82d34d30
[ "MIT" ]
2
2021-06-13T08:16:15.000Z
2021-07-27T13:47:00.000Z
# Generated by Django 3.0.8 on 2020-07-22 12:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Home', '0009_auto_20200722_1734'), ] operations = [ migrations.AlterField( model_name='student', name='branch', ...
28.166667
152
0.568047
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Home', '0009_auto_20200722_1734'), ] operations = [ migrations.AlterField( model_name='student', name='branch', field=models.CharField(choices=[('CSE',...
true
true
f733e44f09e96e0d059abab74c2b3a65b40eaaad
314
py
Python
simple_fun_#182_happy_g.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
simple_fun_#182_happy_g.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
simple_fun_#182_happy_g.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Simple Fun #182: Happy "g" #Problem level: 7 kyu def happy_g(s): for i in range(len(s)): if s[i]=='g': if i==0 and s[i+1]!='g': return False if s[i-1]!='g' and s[i+1]!='g': return False return True
22.428571
41
0.506369
s): for i in range(len(s)): if s[i]=='g': if i==0 and s[i+1]!='g': return False if s[i-1]!='g' and s[i+1]!='g': return False return True
true
true
f733e51a8d8a7a793aceab829d65c5be4e73c9eb
2,306
py
Python
crossmodal/door_models/layers.py
brentyi/multimodalfilter
210b0e241120e0fbbeaef5e478bab36ffe1e159d
[ "MIT" ]
21
2020-10-25T21:31:41.000Z
2022-03-12T17:46:20.000Z
crossmodal/door_models/layers.py
brentyi/multimodalfilter
210b0e241120e0fbbeaef5e478bab36ffe1e159d
[ "MIT" ]
2
2020-11-19T00:46:06.000Z
2021-02-17T21:57:42.000Z
crossmodal/door_models/layers.py
brentyi/multimodalfilter
210b0e241120e0fbbeaef5e478bab36ffe1e159d
[ "MIT" ]
6
2020-11-04T22:21:23.000Z
2021-12-13T04:46:51.000Z
import torch import torch.nn as nn from fannypack.nn import resblocks state_dim = 3 control_dim = 7 obs_pos_dim = 3 obs_sensors_dim = 7 def state_layers(units: int) -> nn.Module: """Create a state encoder block. Args: units (int): # of hidden units in network layers. Returns: nn.Module:...
24.020833
77
0.61752
import torch import torch.nn as nn from fannypack.nn import resblocks state_dim = 3 control_dim = 7 obs_pos_dim = 3 obs_sensors_dim = 7 def state_layers(units: int) -> nn.Module: return nn.Sequential( nn.Linear(state_dim, units), nn.ReLU(inplace=True), resblocks.Linear(units), ) def...
true
true
f733e56203d598956174c7eeca876e297e5be2f6
13,100
py
Python
kws_streaming/train/model_train_eval.py
ojInc/google-research
9929c88b664800a25b8716c22068dd77d80bd5ee
[ "Apache-2.0" ]
2
2020-11-09T08:04:33.000Z
2020-11-09T08:04:57.000Z
kws_streaming/train/model_train_eval.py
ArturHD/google-research
650580cbf928aa640bf39897c5758ddb71b68a51
[ "Apache-2.0" ]
null
null
null
kws_streaming/train/model_train_eval.py
ArturHD/google-research
650580cbf928aa640bf39897c5758ddb71b68a51
[ "Apache-2.0" ]
1
2020-12-14T08:24:59.000Z
2020-12-14T08:24:59.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
36.088154
86
0.736336
import json import os import sys from absl import logging import tensorflow.compat.v1 as tf from kws_streaming.layers import modes import kws_streaming.models.att_mh_rnn as att_mh_rnn import kws_streaming.models.att_rnn as att_rnn import kws_streaming.models.cnn as cnn import kws_streaming.models.crnn as...
true
true
f733e70177c69899d221879f527ec02a98e6dc62
864
py
Python
api/accounts/admin.py
DamianKocjan/YoutubeClone
f3e27378f0ab9ad015590e5c4358696843bf332f
[ "MIT" ]
2
2021-05-19T14:29:58.000Z
2021-05-19T14:30:05.000Z
api/accounts/admin.py
DamianKocjan/YoutubeClone
f3e27378f0ab9ad015590e5c4358696843bf332f
[ "MIT" ]
10
2021-05-04T18:00:30.000Z
2022-03-12T00:57:37.000Z
api/accounts/admin.py
DamianKocjan/YoutubeClone
f3e27378f0ab9ad015590e5c4358696843bf332f
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.utils.translation import gettext_lazy as _ from .models import User, Subscription @admin.register(User) class UserAdmin(UserAdmin): fieldsets = ( (None, {'fields': ('username', 'avatar', 'background', 'p...
29.793103
94
0.585648
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.utils.translation import gettext_lazy as _ from .models import User, Subscription @admin.register(User) class UserAdmin(UserAdmin): fieldsets = ( (None, {'fields': ('username', 'avatar', 'background', 'p...
true
true
f733e7a2ce115df321a102cf8ddb156c6a27bf83
1,606
py
Python
src/server/traffic-forwarder.py
hxhwing/Nitro-Enclave-Demo
f0683fcf843b6728fee221f31e6600a124ab793b
[ "Apache-2.0" ]
4
2021-07-12T08:24:03.000Z
2022-03-28T16:02:17.000Z
src/server/traffic-forwarder.py
hxhwing/Nitro-Enclave-Demo
f0683fcf843b6728fee221f31e6600a124ab793b
[ "Apache-2.0" ]
null
null
null
src/server/traffic-forwarder.py
hxhwing/Nitro-Enclave-Demo
f0683fcf843b6728fee221f31e6600a124ab793b
[ "Apache-2.0" ]
1
2021-07-12T09:18:24.000Z
2021-07-12T09:18:24.000Z
### Full credit for this file goes to Richard Fan @ https://github.com/richardfan1126/nitro-enclave-python-demo import socket import sys import threading import time def server(local_port, remote_cid, remote_port): try: dock_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) dock_socket.bi...
29.740741
111
0.653176
cal_port)) dock_socket.listen(5) while True: client_socket = dock_socket.accept()[0] server_socket = socket.socket(socket.AF_VSOCK, socket.SOCK_STREAM) server_socket.connect((remote_cid, remote_port)) outgoing_thread = threading.Thread(target = forward,...
true
true
f733e8389cf5d5002c75aba6aa101b9e2cd40e86
121
py
Python
src/ukbsearch/conf.py
danielmsk/ukbsearch
23748d4af7dac7cfc418a6f779ac4e1c90e2523c
[ "MIT" ]
null
null
null
src/ukbsearch/conf.py
danielmsk/ukbsearch
23748d4af7dac7cfc418a6f779ac4e1c90e2523c
[ "MIT" ]
null
null
null
src/ukbsearch/conf.py
danielmsk/ukbsearch
23748d4af7dac7cfc418a6f779ac4e1c90e2523c
[ "MIT" ]
null
null
null
COLNAMES = ["Column", "UDI", "Count", "Type", "Description"] COL_JUSTIFY = ["right", "left", "right", "center", "left"]
30.25
60
0.595041
COLNAMES = ["Column", "UDI", "Count", "Type", "Description"] COL_JUSTIFY = ["right", "left", "right", "center", "left"]
true
true
f733e877803c1cc436dbe25bda10070ff0ff2fc3
18,217
py
Python
src/cart/test/util/cart_logparse.py
vatelzh/daos
3aca9ae033946ca24179ba0a180c0b8422cd2738
[ "Apache-2.0" ]
1
2019-11-28T07:26:38.000Z
2019-11-28T07:26:38.000Z
src/cart/test/util/cart_logparse.py
vatelzh/daos
3aca9ae033946ca24179ba0a180c0b8422cd2738
[ "Apache-2.0" ]
52
2019-12-04T05:47:10.000Z
2020-06-09T03:26:12.000Z
src/cart/test/util/cart_logparse.py
vatelzh/daos
3aca9ae033946ca24179ba0a180c0b8422cd2738
[ "Apache-2.0" ]
8
2019-12-04T08:26:00.000Z
2020-06-09T07:40:11.000Z
#!/usr/bin/env python3 # Copyright (C) 2018-2019 Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted for any purpose (including commercial purposes) # provided that the following conditions are met: # # 1. Redistributions of sourc...
33.182149
80
0.567108
import os import re class InvalidPid(Exception): pass class InvalidLogFile(Exception): pass LOG_LEVELS = {'FATAL' :1, 'EMRG' :2, 'CRIT' :3, 'ERR' :4, 'WARN' :5, 'NOTE' :6, 'INFO' :...
true
true
f733e90ee56443a9aa248c1c44b6e19205ec6c64
2,806
py
Python
production/src/components/wallet.py
baptistedesarnauts81/trading_project
47627c732f4a00702d5aadb1b088d17cce2ecc3d
[ "MIT" ]
null
null
null
production/src/components/wallet.py
baptistedesarnauts81/trading_project
47627c732f4a00702d5aadb1b088d17cce2ecc3d
[ "MIT" ]
null
null
null
production/src/components/wallet.py
baptistedesarnauts81/trading_project
47627c732f4a00702d5aadb1b088d17cce2ecc3d
[ "MIT" ]
null
null
null
class Wallet: def __init__(self, stocks, initial_account=3000): self.stocks_amount = 0 for stock in stocks: self.stocks_amount += stock.getCostPrice() self.available_cash = initial_account - \ self.stocks_amount # argent disponible en cash self.virtual_acco...
47.559322
164
0.664647
class Wallet: def __init__(self, stocks, initial_account=3000): self.stocks_amount = 0 for stock in stocks: self.stocks_amount += stock.getCostPrice() self.available_cash = initial_account - \ self.stocks_amount self.virtual_account = initial_account ...
true
true
f733e9ab3db62124be970edbed846b82f67d10ae
1,525
py
Python
RecoMuon/L2MuonProducer/python/L2Muons_cff.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
RecoMuon/L2MuonProducer/python/L2Muons_cff.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
7
2016-07-17T02:34:54.000Z
2019-08-13T07:58:37.000Z
RecoMuon/L2MuonProducer/python/L2Muons_cff.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
import FWCore.ParameterSet.Config as cms # Magnetic Field # Geometries # from Geometry.CommonDetUnit.bareGlobalTrackingGeometry_cfi import * # from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import * import TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi EstimatorForSTA = TrackingTools.KalmanUpdators.Chi2Me...
50.833333
109
0.882623
import FWCore.ParameterSet.Config as cms import TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi EstimatorForSTA = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone() import TrackingTools.TrackFitters.KFTrajectoryFitter_cfi KFTrajectoryFitterForSTA = TrackingTools.Tr...
true
true
f733eb779760bdac56af2ae2248f27730e3608e9
2,639
py
Python
corpusdiagnostics.py
MarissaSkud/Wordsworth
a807603d7f34c908621a807f305c540a287d5b90
[ "MIT" ]
7
2019-06-18T03:11:54.000Z
2020-10-22T03:45:46.000Z
corpusdiagnostics.py
MarissaSkud/Anachronism-Finder
a807603d7f34c908621a807f305c540a287d5b90
[ "MIT" ]
12
2019-06-17T04:29:44.000Z
2020-09-22T04:53:40.000Z
corpusdiagnostics.py
MarissaSkud/Anachronism-Finder
a807603d7f34c908621a807f305c540a287d5b90
[ "MIT" ]
null
null
null
from server import app, format_decades from model import Decade, Country, Book, connect_to_db, db from textprocessor import unpickle_data from random import sample from collections import Counter def measure_and_sample_corpus(data_type, want_sample): with app.app_context(): decades = format_decades() ...
35.186667
118
0.608185
from server import app, format_decades from model import Decade, Country, Book, connect_to_db, db from textprocessor import unpickle_data from random import sample from collections import Counter def measure_and_sample_corpus(data_type, want_sample): with app.app_context(): decades = format_decades() ...
true
true
f733ec6d4d3d880d44c82f50d338939e9099b4ca
7,745
py
Python
docs/conf.py
YPlan/gargoyle
005c400ae0a4b29f646507b4d0b01c79d5c62f28
[ "Apache-2.0" ]
138
2016-01-08T13:37:53.000Z
2022-03-25T10:41:06.000Z
docs/conf.py
YPlan/gargoyle
005c400ae0a4b29f646507b4d0b01c79d5c62f28
[ "Apache-2.0" ]
39
2015-12-28T23:16:17.000Z
2018-05-26T09:30:29.000Z
docs/conf.py
YPlan/gargoyle
005c400ae0a4b29f646507b4d0b01c79d5c62f28
[ "Apache-2.0" ]
11
2015-12-28T20:20:57.000Z
2019-03-12T23:49:45.000Z
# -*- coding: utf-8 -*- # # Gargoyle documentation build configuration file, created by # sphinx-quickstart on Fri May 6 11:47:36 2011. # # 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...
32.004132
80
0.720207
from __future__ import unicode_literals import os import sys cwd = os.getcwd() project_root = os.path.dirname(cwd) sys.path.insert(0, project_root) import django from django.conf import settings settings.configure() django.setup() import gargoyle extensions = ['sphinx.ext.autodoc'...
true
true
f733eca74173829e6a2e510354c46a221abb2241
4,385
py
Python
maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_predictors.py
RyanXLi/OneshotDet
77f629978d9d1739787b08de8cccea81341507bf
[ "BSD-2-Clause" ]
16
2020-09-07T15:28:57.000Z
2022-03-03T02:52:25.000Z
maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_predictors.py
RyanXLi/OneshotDet
77f629978d9d1739787b08de8cccea81341507bf
[ "BSD-2-Clause" ]
3
2021-01-06T12:02:54.000Z
2021-03-14T14:08:57.000Z
maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_predictors.py
RyanXLi/OneshotDet
77f629978d9d1739787b08de8cccea81341507bf
[ "BSD-2-Clause" ]
4
2020-11-13T09:21:36.000Z
2021-05-27T02:12:19.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from maskrcnn_benchmark.modeling import registry from torch import nn @registry.ROI_BOX_PREDICTOR.register("FastRCNNPredictor") class FastRCNNPredictor(nn.Module): def __init__(self, config, in_channels): super(FastRCNNPredictor, self...
41.761905
109
0.65382
from maskrcnn_benchmark.modeling import registry from torch import nn @registry.ROI_BOX_PREDICTOR.register("FastRCNNPredictor") class FastRCNNPredictor(nn.Module): def __init__(self, config, in_channels): super(FastRCNNPredictor, self).__init__() assert in_channels is not None num_inputs...
true
true
f733ed70d8b010ed8e84d41a51af894639aa1809
5,417
py
Python
sdk/python/pulumi_azure_nextgen/recoveryservices/latest/replication_policy.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/recoveryservices/latest/replication_policy.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/recoveryservices/latest/replication_policy.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
41.351145
299
0.65036
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['ReplicationPolicy'] class ReplicationPolicy(pulumi.CustomResource): def __init__(__self__, ...
true
true
f733ed9e26d85e77b4d34f3a5aeb5fedf27bb359
4,515
py
Python
tests/fixtures/hello/hello.py
akretion/xsdata
3bedb4ac3e0e6eb6a1cdbad54a3356f46e3ab90e
[ "MIT" ]
null
null
null
tests/fixtures/hello/hello.py
akretion/xsdata
3bedb4ac3e0e6eb6a1cdbad54a3356f46e3ab90e
[ "MIT" ]
null
null
null
tests/fixtures/hello/hello.py
akretion/xsdata
3bedb4ac3e0e6eb6a1cdbad54a3356f46e3ab90e
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import Optional __NAMESPACE__ = "http://hello/" @dataclass class HelloByeError: class Meta: namespace = "http://hello/" message: Optional[str] = field( default=None, metadata={ "type": "Element", "namespace"...
24.944751
86
0.461573
from dataclasses import dataclass, field from typing import Optional __NAMESPACE__ = "http://hello/" @dataclass class HelloByeError: class Meta: namespace = "http://hello/" message: Optional[str] = field( default=None, metadata={ "type": "Element", "namespace"...
true
true
f733ee3a1c748aebb772e1649de2677004587126
15,205
py
Python
watsonv3_connector.py
splunk-soar-connectors/ibmwatsonv3
2038974d2db4172c555272d725b81815e416b638
[ "Apache-2.0" ]
null
null
null
watsonv3_connector.py
splunk-soar-connectors/ibmwatsonv3
2038974d2db4172c555272d725b81815e416b638
[ "Apache-2.0" ]
1
2022-01-26T23:20:53.000Z
2022-01-26T23:20:53.000Z
watsonv3_connector.py
splunk-soar-connectors/ibmwatsonv3
2038974d2db4172c555272d725b81815e416b638
[ "Apache-2.0" ]
null
null
null
# File: watsonv3_connector.py # # Copyright (c) 2021-2022 Splunk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
36.202381
140
0.652549
import json import phantom.app as phantom import requests from bs4 import BeautifulSoup from phantom.action_result import ActionResult from phantom.base_connector import BaseConnector import watsonv3_consts as consts class RetVal(tuple): def __new__(cls, val1, val2=None): return tuple...
true
true
f733ee46ee0e2b9ada989eb2579719cfcb6c3e4d
4,563
py
Python
advancedmovieselection/src/Source/MovieDB/tmdb3/cache.py
builder08/enigma2-plugins
45583c69b807ce26d756a51973c81d877afe3694
[ "OLDAP-2.3" ]
null
null
null
advancedmovieselection/src/Source/MovieDB/tmdb3/cache.py
builder08/enigma2-plugins
45583c69b807ce26d756a51973c81d877afe3694
[ "OLDAP-2.3" ]
null
null
null
advancedmovieselection/src/Source/MovieDB/tmdb3/cache.py
builder08/enigma2-plugins
45583c69b807ce26d756a51973c81d877afe3694
[ "OLDAP-2.3" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------- # Name: cache.py # Python Library # Author: Raymond Wagner # Purpose: Caching framework to store TMDb API results #----------------------- from __future__ import absolute_import import time import os from .tmdb_exceptions import * from .cache_engi...
36.214286
83
0.55183
from __future__ import absolute_import import time import os from .tmdb_exceptions import * from .cache_engine import Engines from . import cache_null from . import cache_file class Cache( object ): def __init__(self, engine=None, *args, **kwargs): self._engine = None self._data = {} ...
true
true
f733ee7fc8179183522c57191edd20618ec63c97
4,012
py
Python
spinup/rewards/cvar_utils.py
jerryzhucs21/spinningup
2992e6a8163d78c3f82a3d92c5235fda0527c398
[ "MIT" ]
2
2021-06-21T05:19:01.000Z
2021-07-02T14:51:16.000Z
spinup/rewards/cvar_utils.py
zaynahjaved/pg-broil
2992e6a8163d78c3f82a3d92c5235fda0527c398
[ "MIT" ]
null
null
null
spinup/rewards/cvar_utils.py
zaynahjaved/pg-broil
2992e6a8163d78c3f82a3d92c5235fda0527c398
[ "MIT" ]
null
null
null
import numpy as np def relu(x): if x > 0: return x else: return 0.0 def cvar_fn_val(sigma, exp_ret_rs, prob_rs, alpha): fn_val_relu_part = 0.0 for i,ret in enumerate(exp_ret_rs): fn_val_relu_part += prob_rs[i] * relu(sigma - ret) fn_val = sigma - 1.0 / (1.0 - alpha) *...
32.885246
118
0.619641
import numpy as np def relu(x): if x > 0: return x else: return 0.0 def cvar_fn_val(sigma, exp_ret_rs, prob_rs, alpha): fn_val_relu_part = 0.0 for i,ret in enumerate(exp_ret_rs): fn_val_relu_part += prob_rs[i] * relu(sigma - ret) fn_val = sigma - 1.0 / (1.0 - alpha) *...
true
true
f733eef4fc41f2dcbe6fd75f6aa36f1dead325c5
1,816
py
Python
library/migrations/0002_auto_20201017_1322.py
himasnhu1/example
27db7941c5f7bd16ffb407654818012e43d82f7e
[ "MIT" ]
null
null
null
library/migrations/0002_auto_20201017_1322.py
himasnhu1/example
27db7941c5f7bd16ffb407654818012e43d82f7e
[ "MIT" ]
null
null
null
library/migrations/0002_auto_20201017_1322.py
himasnhu1/example
27db7941c5f7bd16ffb407654818012e43d82f7e
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-10-17 07:52 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('student', '0001_initial'), ('core', '0001_initial'), ('library', '0001_initial'), ] ...
33.62963
126
0.605727
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('student', '0001_initial'), ('core', '0001_initial'), ('library', '0001_initial'), ] operations = [ migrations.AddField...
true
true
f733ef14b6391cad0c7d651b0efd1ecac874f994
663
py
Python
manage.py
Abdihakim-Muhumed/phogram
314e3b9149de6022ca79172c55ce0c55439813ed
[ "Unlicense" ]
null
null
null
manage.py
Abdihakim-Muhumed/phogram
314e3b9149de6022ca79172c55ce0c55439813ed
[ "Unlicense" ]
null
null
null
manage.py
Abdihakim-Muhumed/phogram
314e3b9149de6022ca79172c55ce0c55439813ed
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'phogram.settings') try: from django.core.management import execute_from_command_line except Impo...
28.826087
73
0.678733
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'phogram.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f733efe9187ce166c7679c03c87756eb028fd98f
56
py
Python
api/v1/urls.py
Osca-M/django-oauth2
15bdd5c39e013c9f390eb586e64367e98ff59c4c
[ "MIT" ]
null
null
null
api/v1/urls.py
Osca-M/django-oauth2
15bdd5c39e013c9f390eb586e64367e98ff59c4c
[ "MIT" ]
null
null
null
api/v1/urls.py
Osca-M/django-oauth2
15bdd5c39e013c9f390eb586e64367e98ff59c4c
[ "MIT" ]
null
null
null
from django.urls import path, include urlpatterns = []
14
37
0.75
from django.urls import path, include urlpatterns = []
true
true
f733efea09cb36caa25e04787c3aa703d3e64396
95,690
py
Python
Lib/typing.py
y0urself/cpython
39dec1c09c9f5ddf951bed5b875f837735a06733
[ "0BSD" ]
null
null
null
Lib/typing.py
y0urself/cpython
39dec1c09c9f5ddf951bed5b875f837735a06733
[ "0BSD" ]
null
null
null
Lib/typing.py
y0urself/cpython
39dec1c09c9f5ddf951bed5b875f837735a06733
[ "0BSD" ]
null
null
null
""" The typing module: Support for gradual typing as defined by PEP 484. At large scale, the structure of the module is following: * Imports and exports, all public names should be explicitly added to __all__. * Internal helper functions: these should never be used in code outside this module. * _SpecialForm and its i...
34.458048
100
0.630358
from abc import abstractmethod, ABCMeta import collections import collections.abc import contextlib import functools import operator import re as stdlib_re import sys import types import warnings from types import WrapperDescriptorType, MethodWrapperType, MethodDescriptorType, GenericAlias try: from _typing im...
true
true
f733f0215f9234ea817c6a0b1d3d49541dae3c9f
30,863
py
Python
resolwe_bio/tests/processes/test_expression.py
HudoGriz/resolwe-bio
4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea
[ "Apache-2.0" ]
null
null
null
resolwe_bio/tests/processes/test_expression.py
HudoGriz/resolwe-bio
4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea
[ "Apache-2.0" ]
null
null
null
resolwe_bio/tests/processes/test_expression.py
HudoGriz/resolwe-bio
4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea
[ "Apache-2.0" ]
null
null
null
# pylint: disable=missing-docstring import os from resolwe.flow.models import Data, Collection, Relation from resolwe.flow.models.entity import RelationPartition, RelationType from resolwe.test import tag_process, with_resolwe_host from resolwe_bio.expression_filters.relation import replicate_groups from resolwe_bio...
39.926261
114
0.559764
import os from resolwe.flow.models import Data, Collection, Relation from resolwe.flow.models.entity import RelationPartition, RelationType from resolwe.test import tag_process, with_resolwe_host from resolwe_bio.expression_filters.relation import replicate_groups from resolwe_bio.utils.test import KBBioProcessTest...
true
true
f733f220cc226a31cd237cf27b93840a2d886f4f
2,213
py
Python
pyscreenshot/plugins/mac_quartz.py
robocorp/pyscreenshot
7cf03b23f4bdf1e4a2e3df1893de598e852dd346
[ "BSD-2-Clause" ]
1
2021-03-17T17:02:28.000Z
2021-03-17T17:02:28.000Z
pyscreenshot/plugins/mac_quartz.py
robocorp/rpaframework-screenshot
7cf03b23f4bdf1e4a2e3df1893de598e852dd346
[ "BSD-2-Clause" ]
null
null
null
pyscreenshot/plugins/mac_quartz.py
robocorp/rpaframework-screenshot
7cf03b23f4bdf1e4a2e3df1893de598e852dd346
[ "BSD-2-Clause" ]
null
null
null
# Javier Escalada Gomez # # from: # https://stackoverflow.com/questions/4524723/take-screenshot-in-python-on-mac-os-x from pyscreenshot.plugins.backend import CBackend from pyscreenshot.tempexport import read_func_img class MacQuartzWrapper(CBackend): name = "mac_quartz" childprocess = False def __init_...
29.118421
158
0.635337
from pyscreenshot.plugins.backend import CBackend from pyscreenshot.tempexport import read_func_img class MacQuartzWrapper(CBackend): name = "mac_quartz" childprocess = False def __init__(self): pass def grab(self, bbox=None): im = read_func_img(self._grab_to_file, bbox) ...
true
true
f733f2a1784395f7f9f4f6cf9fedb6cc76d32a56
1,568
py
Python
src/third_party/skia/tools/infra/go.py
rhencke/engine
1016db292c4e73374a0a11536b18303c9522a224
[ "BSD-3-Clause" ]
6,304
2015-01-05T23:45:12.000Z
2022-03-31T09:48:13.000Z
src/third_party/skia/tools/infra/go.py
rhencke/engine
1016db292c4e73374a0a11536b18303c9522a224
[ "BSD-3-Clause" ]
67
2016-04-18T13:30:02.000Z
2022-03-31T23:06:55.000Z
src/third_party/skia/tools/infra/go.py
rhencke/engine
1016db292c4e73374a0a11536b18303c9522a224
[ "BSD-3-Clause" ]
1,231
2015-01-05T03:17:39.000Z
2022-03-31T22:54:58.000Z
#!/usr/bin/env python # # Copyright 2019 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys INFRA_GO = 'go.skia.org/infra' WHICH = 'where' if sys.platform == 'win32' else 'which' def check(): '''Verify that g...
24.888889
77
0.655612
import os import subprocess import sys INFRA_GO = 'go.skia.org/infra' WHICH = 'where' if sys.platform == 'win32' else 'which' def check(): def _fail(msg): print >> sys.stderr, msg sys.exit(1) try: go_exe = subprocess.check_output([WHICH, 'go']) except (subprocess.CalledProcessError, OSErr...
true
true
f733f2bf14d68ca46e6e18dcb2d86e9062767d53
86
py
Python
config.py
klazich/FSND-01-movie-website
6a0dd8c74ed96c955b417794f1a4d84bfae9d190
[ "Unlicense" ]
null
null
null
config.py
klazich/FSND-01-movie-website
6a0dd8c74ed96c955b417794f1a4d84bfae9d190
[ "Unlicense" ]
null
null
null
config.py
klazich/FSND-01-movie-website
6a0dd8c74ed96c955b417794f1a4d84bfae9d190
[ "Unlicense" ]
null
null
null
OMDB_API_KEY = 'df397f1b' YOUTUBE_API_KEY = 'AIzaSyBlr3kG98VwGz5D3QufXG2dqXgj6HDnwpQ'
28.666667
59
0.860465
OMDB_API_KEY = 'df397f1b' YOUTUBE_API_KEY = 'AIzaSyBlr3kG98VwGz5D3QufXG2dqXgj6HDnwpQ'
true
true
f733f301e8dc0dbd2b145c5d08b9b4cc8f6f5df8
22,533
py
Python
utils/tests_fetcher.py
marshmellow77/transformers
215e0681e4c3f6ade6e219d022a5e640b42fcb76
[ "Apache-2.0" ]
8,028
2018-11-05T15:19:44.000Z
2019-07-16T09:14:59.000Z
utils/tests_fetcher.py
marshmellow77/transformers
215e0681e4c3f6ade6e219d022a5e640b42fcb76
[ "Apache-2.0" ]
731
2018-11-05T21:35:52.000Z
2019-07-16T09:51:26.000Z
utils/tests_fetcher.py
marshmellow77/transformers
215e0681e4c3f6ade6e219d022a5e640b42fcb76
[ "Apache-2.0" ]
2,106
2018-11-05T15:29:15.000Z
2019-07-16T08:51:57.000Z
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # 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...
41.805195
117
0.66143
import argparse import collections import os import re from contextlib import contextmanager from pathlib import Path from git import Repo PATH_TO_TRANFORMERS = "." @contextmanager def checkout_commit(repo, commit_id): current_head = repo.head.commit if repo.head.is_detached else repo.head.ref ...
true
true
f733f33c99191ec0f9f1a9d033ef9fe1a55561f0
4,472
py
Python
test/test.py
leovandriel/ramachandran
1be7fc5268621fc45a7c5c95cedbf483f383b6d7
[ "MIT" ]
2
2020-03-24T00:03:31.000Z
2020-07-28T17:34:47.000Z
test/test.py
leonardvandriel/ramachandran
1be7fc5268621fc45a7c5c95cedbf483f383b6d7
[ "MIT" ]
null
null
null
test/test.py
leonardvandriel/ramachandran
1be7fc5268621fc45a7c5c95cedbf483f383b6d7
[ "MIT" ]
null
null
null
import unittest import math import random from src.util.point import Point from src.core.translate import Translator from src.core.parse import Parser from src.util.amino import Amino class TestPoint(unittest.TestCase): def test_add(self): p = Point(1, 2, 3) + Point(2, 4, 6) self.assertEqual(p, Po...
32.882353
79
0.538462
import unittest import math import random from src.util.point import Point from src.core.translate import Translator from src.core.parse import Parser from src.util.amino import Amino class TestPoint(unittest.TestCase): def test_add(self): p = Point(1, 2, 3) + Point(2, 4, 6) self.assertEqual(p, Po...
true
true
f733f3ffc26b3265e56173b7c18db7ac2cc062c7
17,926
py
Python
brawlcord/utils/club.py
LenCoding/brawlcord
f17b01a49546321917cb5e2eb87ce6ff5a469c66
[ "MIT" ]
6
2020-11-27T15:47:31.000Z
2022-01-22T11:28:54.000Z
brawlcord/utils/club.py
LenCoding/brawlcord
f17b01a49546321917cb5e2eb87ce6ff5a469c66
[ "MIT" ]
1
2020-11-30T10:10:01.000Z
2020-11-30T10:10:01.000Z
brawlcord/utils/club.py
LenCoding/brawlcord
f17b01a49546321917cb5e2eb87ce6ff5a469c66
[ "MIT" ]
3
2020-11-27T15:00:38.000Z
2021-12-16T14:26:21.000Z
import random import string from typing import Callable, List, Optional import discord from redbot.core import Config from redbot.core.commands import Context from redbot.core.bot import Red from redbot.core.utils.menus import start_adding_reactions from redbot.core.utils.predicates import MessagePredicate, ReactionPr...
35.852
98
0.563093
import random import string from typing import Callable, List, Optional import discord from redbot.core import Config from redbot.core.commands import Context from redbot.core.bot import Red from redbot.core.utils.menus import start_adding_reactions from redbot.core.utils.predicates import MessagePredicate, ReactionPr...
true
true
f733f4092a476f843a89ad62d76a322b2386d5f2
3,586
py
Python
gui/qt/qrcodewidget.py
namuyan/electrum-fjc
1a5c4a582f0fcdbaeca2b721ee729f43cd7915a2
[ "MIT" ]
1
2017-07-06T03:03:25.000Z
2017-07-06T03:03:25.000Z
gui/qt/qrcodewidget.py
namuyan/electrum-fjc
1a5c4a582f0fcdbaeca2b721ee729f43cd7915a2
[ "MIT" ]
null
null
null
gui/qt/qrcodewidget.py
namuyan/electrum-fjc
1a5c4a582f0fcdbaeca2b721ee729f43cd7915a2
[ "MIT" ]
null
null
null
from PyQt4.QtGui import * from PyQt4.QtCore import * import PyQt4.QtGui as QtGui import os import qrcode import electrum_ltc from electrum_ltc.i18n import _ from util import WindowModalDialog class QRCodeWidget(QWidget): def __init__(self, data = None, fixedSize=False): QWidget.__init__(self) s...
27.374046
88
0.53932
from PyQt4.QtGui import * from PyQt4.QtCore import * import PyQt4.QtGui as QtGui import os import qrcode import electrum_ltc from electrum_ltc.i18n import _ from util import WindowModalDialog class QRCodeWidget(QWidget): def __init__(self, data = None, fixedSize=False): QWidget.__init__(self) s...
true
true
f733f4bccad2803286b6d1cfa79643e6b4b2f217
505
py
Python
squeezenet/squeezenet.py
sbmalik/pytorchx
938ba5855cfb72b0dbce91af8c0a6d0e3943f122
[ "MIT" ]
133
2020-03-09T03:13:27.000Z
2022-03-28T12:24:31.000Z
squeezenet/squeezenet.py
sbmalik/pytorchx
938ba5855cfb72b0dbce91af8c0a6d0e3943f122
[ "MIT" ]
6
2020-06-17T08:17:17.000Z
2022-01-06T05:40:06.000Z
squeezenet/squeezenet.py
sbmalik/pytorchx
938ba5855cfb72b0dbce91af8c0a6d0e3943f122
[ "MIT" ]
54
2020-02-27T09:04:01.000Z
2022-03-23T08:18:24.000Z
import torch from torch import nn from torch.nn import functional as F import torchvision def main(): print('cuda device count: ', torch.cuda.device_count()) net = torchvision.models.squeezenet1_1(pretrained=True) #net.fc = nn.Linear(512, 2) net = net.eval() net = net.to('cuda:0') print(net) ...
24.047619
59
0.647525
import torch from torch import nn from torch.nn import functional as F import torchvision def main(): print('cuda device count: ', torch.cuda.device_count()) net = torchvision.models.squeezenet1_1(pretrained=True) net = net.eval() net = net.to('cuda:0') print(net) tmp = torch.ones(2, 3, 22...
true
true
f733f543c9317810d0f46d56dde0668916ac6e64
3,643
py
Python
tests/util/test_replace_phi.py
bbieniek/deidentify
7021bf0540e0a7f931e65544d12a2909c79a14eb
[ "MIT" ]
64
2020-01-16T16:20:47.000Z
2022-03-31T12:59:19.000Z
tests/util/test_replace_phi.py
HabibMrad/deidentify
d8960a74c852a71b29a6ee0fd6a3cf7f946a5f60
[ "MIT" ]
14
2020-01-28T08:47:06.000Z
2022-02-12T08:32:12.000Z
tests/util/test_replace_phi.py
HabibMrad/deidentify
d8960a74c852a71b29a6ee0fd6a3cf7f946a5f60
[ "MIT" ]
12
2020-01-21T07:54:04.000Z
2022-02-19T06:42:53.000Z
import re import pytest from deidentify.base import Annotation, Document from deidentify.util import mask_annotations, surrogate_annotations def test_mask_annotations(): text = "De patient J. Jansen (e: j.jnsen@email.com, t: 06-12345678)" annotations = [ Annotation(text='J. Jansen', start=11, end=20...
39.597826
100
0.660719
import re import pytest from deidentify.base import Annotation, Document from deidentify.util import mask_annotations, surrogate_annotations def test_mask_annotations(): text = "De patient J. Jansen (e: j.jnsen@email.com, t: 06-12345678)" annotations = [ Annotation(text='J. Jansen', start=11, end=20...
true
true
f733f59c0942b1f69c38aa28dc8969d66b50fa36
2,324
py
Python
money_transfer/money_transfer/doctype/transfer_from_vault/transfer_from_vault.py
staumoepeau/money_transfer
c66a2852b4851c25b41ae214f6cfb39823487add
[ "MIT" ]
null
null
null
money_transfer/money_transfer/doctype/transfer_from_vault/transfer_from_vault.py
staumoepeau/money_transfer
c66a2852b4851c25b41ae214f6cfb39823487add
[ "MIT" ]
1
2016-11-03T01:06:46.000Z
2016-11-03T01:06:46.000Z
money_transfer/money_transfer/doctype/transfer_from_vault/transfer_from_vault.py
staumoepeau/money_transfer
c66a2852b4851c25b41ae214f6cfb39823487add
[ "MIT" ]
3
2017-05-11T06:51:56.000Z
2020-12-14T21:38:33.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2015, Caitlah Technology and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from erpnext.controllers.accounts_controller import AccountsController class Transferfrom...
30.578947
70
0.670396
from __future__ import unicode_literals import frappe from frappe.model.document import Document from erpnext.controllers.accounts_controller import AccountsController class TransferfromVault(Document): def validate(self): if not self.title: self.title = self.doctype def on_submit(self): self.make_trxn_...
true
true
f733f59f80c320d1a8315825e6c848f0cc1b0218
30,408
py
Python
geniesp/sp_config.py
Sage-Bionetworks/GENIE-Sponsored-Projects
e34be3ece96144aa525c7281738736d3c5ef93cb
[ "MIT" ]
1
2022-03-10T21:45:53.000Z
2022-03-10T21:45:53.000Z
geniesp/sp_config.py
Sage-Bionetworks/GENIE-Sponsored-Projects
e34be3ece96144aa525c7281738736d3c5ef93cb
[ "MIT" ]
36
2020-09-23T18:16:29.000Z
2022-03-30T20:56:45.000Z
geniesp/sp_config.py
Sage-Bionetworks/GENIE-Sponsored-Projects
e34be3ece96144aa525c7281738736d3c5ef93cb
[ "MIT" ]
null
null
null
""" Sponsored project configuration classes USAGE: git clone https://github.com/cBioPortal/cbioportal.git python runSP.py AKT1 ../cbioportal/ --staging """ import os import random import string import pandas as pd import synapseclient from . import new_redcap_export_mapping from . import sp_redcap_export_mapping c...
56.103321
272
0.67331
import os import random import string import pandas as pd import synapseclient from . import new_redcap_export_mapping from . import sp_redcap_export_mapping class Akt1(sp_redcap_export_mapping.SponsoredProjectRunner): _SPONSORED_PROJECT = "AKT1" _DATES = ["death_date_int","follow_up_date_int","primary_dx_d...
true
true
f733f64503456306ed934e0680bde4bebc9a1936
6,334
py
Python
Steg_Tool/steg.py
Affanmir/Awesome-Python-Scripts
bba0512e1c580d605205744ece878da13f2c7661
[ "MIT" ]
1,026
2018-10-02T18:51:12.000Z
2022-03-31T13:45:14.000Z
Steg_Tool/steg.py
Affanmir/Awesome-Python-Scripts
bba0512e1c580d605205744ece878da13f2c7661
[ "MIT" ]
164
2018-10-02T18:37:40.000Z
2021-11-18T13:29:54.000Z
Steg_Tool/steg.py
Affanmir/Awesome-Python-Scripts
bba0512e1c580d605205744ece878da13f2c7661
[ "MIT" ]
521
2018-10-02T18:15:40.000Z
2022-03-26T12:10:15.000Z
#Image Stego using LSB import cv2 def encode(input_image_name, output_image_name, file_name): input_image = cv2.imread(input_image_name) height, width, nbchannels = input_image.shape size = width*height current_width = 0 current_height = 0 current_channel = 0 maskonevalues = [1, 2, 4, 8, ...
36.194286
81
0.516577
import cv2 def encode(input_image_name, output_image_name, file_name): input_image = cv2.imread(input_image_name) height, width, nbchannels = input_image.shape size = width*height current_width = 0 current_height = 0 current_channel = 0 maskonevalues = [1, 2, 4, 8, 16, 32, 64, 128] m...
true
true
f733f78971c1ba1f408c03fb103c080dae470649
4,752
py
Python
conll_extract/jackknifing/jackknife.py
utahnlp/structured_tuning_for_srl
9d315575ddf929c1bc31252fd78dc85ba7319251
[ "Apache-2.0" ]
354
2017-06-01T03:35:56.000Z
2022-03-16T02:50:27.000Z
conll_extract/jackknifing/jackknife.py
utahnlp/structured_tuning_for_srl
9d315575ddf929c1bc31252fd78dc85ba7319251
[ "Apache-2.0" ]
30
2017-10-15T05:48:57.000Z
2021-12-22T18:50:55.000Z
conll_extract/jackknifing/jackknife.py
utahnlp/structured_tuning_for_srl
9d315575ddf929c1bc31252fd78dc85ba7319251
[ "Apache-2.0" ]
96
2017-06-16T10:05:04.000Z
2022-03-16T13:02:36.000Z
# Random shuffle by sentences instead of samples (predicates). import math import os import random import sys from os.path import join def get_sent_to_samples(input_file): num_samples = 0 sent2samples = [] fin = open(input_file, 'r') prev_words = "" prev_predicate = -1 for line in fin: line = line.str...
31.058824
99
0.657197
import math import os import random import sys from os.path import join def get_sent_to_samples(input_file): num_samples = 0 sent2samples = [] fin = open(input_file, 'r') prev_words = "" prev_predicate = -1 for line in fin: line = line.strip() line_left = line.split('|||')[0] pred_id = int(li...
false
true