hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f729e94618f3fc85023f8d1fd03c604f683d234c
409
py
Python
sort/insert_sort.py
GetDarren/leetcode-vanilla
d00b307a85a9f1cf329739c1f660b7357667cd58
[ "MIT" ]
null
null
null
sort/insert_sort.py
GetDarren/leetcode-vanilla
d00b307a85a9f1cf329739c1f660b7357667cd58
[ "MIT" ]
null
null
null
sort/insert_sort.py
GetDarren/leetcode-vanilla
d00b307a85a9f1cf329739c1f660b7357667cd58
[ "MIT" ]
null
null
null
""" 循环不变式 就是 : A[0, j-1] """ from random_array import random def insert_sort(arr): if len(arr) < 2: raise Exception("array is too short to sort") for j in range(1, len(arr)): pivot = arr[j] i = j - 1 while i >= 0 and arr[i] > pivot: arr[i+1] = arr[i] i -= 1 arr[i+1] = pivot return...
18.590909
49
0.555012
from random_array import random def insert_sort(arr): if len(arr) < 2: raise Exception("array is too short to sort") for j in range(1, len(arr)): pivot = arr[j] i = j - 1 while i >= 0 and arr[i] > pivot: arr[i+1] = arr[i] i -= 1 arr[i+1] = pivot return arr if __name__ == '__main_...
true
true
f729e94fef7fdd7139406d699760c860a32fcf34
20,680
py
Python
third_party/blink/tools/blinkpy/common/pretty_diff.py
Yannic/chromium
ab32e8aacb08c9fce0dc4bf09eec456ba46e3710
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
76
2020-09-02T03:05:41.000Z
2022-03-30T04:40:55.000Z
third_party/blink/tools/blinkpy/common/pretty_diff.py
blueboxd/chromium-legacy
07223bc94bd97499909c9ed3c3f5769d718fe2e0
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
45
2020-09-02T03:21:37.000Z
2022-03-31T22:19:45.000Z
third_party/blink/tools/blinkpy/common/pretty_diff.py
Yannic/chromium
ab32e8aacb08c9fce0dc4bf09eec456ba46e3710
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
8
2020-07-22T18:49:18.000Z
2022-02-08T10:27:16.000Z
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Prettifies 'git diff' output. prettify_diff() takes a diff string, and returns an HTML string decorating the diff. This code doesn't support other diff c...
37.944954
105
0.562234
import base64 import difflib import mimetypes import re import six import zlib if six.PY2: import cgi else: import html as cgi from blinkpy.common.base85 import decode_base85 _LEADING_HTML = """<!DOCTYPE html> <meta charset="UTF-8"> <style> body { background: white; font-family: "Roboto Mono", Menlo...
true
true
f729eae915a3f96d01c2d8dbee3cd29b73654f13
7,571
py
Python
fhirclient/models/composition_tests.py
carolinarsm/client-py
db1b6e3e28036dee11da75412003c7d90e591c6d
[ "Apache-2.0" ]
418
2015-07-01T08:23:16.000Z
2022-03-31T14:02:30.000Z
fhirclient/models/composition_tests.py
carolinarsm/client-py
db1b6e3e28036dee11da75412003c7d90e591c6d
[ "Apache-2.0" ]
312
2017-09-08T15:42:13.000Z
2022-03-23T18:21:40.000Z
fhirclient/models/composition_tests.py
carolinarsm/client-py
db1b6e3e28036dee11da75412003c7d90e591c6d
[ "Apache-2.0" ]
185
2015-03-30T20:23:16.000Z
2022-03-30T14:39:26.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07. # 2019, SMART Health IT. import os import io import unittest import json from . import composition from .fhirdate import FHIRDate class CompositionTests(unittest.TestCase): def instantiate_from(self, filename...
59.614173
129
0.683133
import os import io import unittest import json from . import composition from .fhirdate import FHIRDate class CompositionTests(unittest.TestCase): def instantiate_from(self, filename): datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or '' with io.open(os.path.join(datadir, filename), 'r'...
true
true
f729eaee359cb5f980f37f19c2c502894bfeb4e4
16,157
py
Python
tests/quick_test.py
panchiittp/pyross
d5a455ae36a61e2fba29b30f1da774f1b284f1e2
[ "MIT" ]
null
null
null
tests/quick_test.py
panchiittp/pyross
d5a455ae36a61e2fba29b30f1da774f1b284f1e2
[ "MIT" ]
null
null
null
tests/quick_test.py
panchiittp/pyross
d5a455ae36a61e2fba29b30f1da774f1b284f1e2
[ "MIT" ]
null
null
null
#!python """Unittesting for the pyross module. Run as python -m unittest pyross.test.""" import sys #remove pwd from path that tries to import .pyx files for i in sys.path: if 'pyross' in i or i == '': sys.path.remove(i) # print(sys.path) import pyross import unittest import inspect import numpy as np impor...
43.432796
108
0.518351
import sys for i in sys.path: if 'pyross' in i or i == '': sys.path.remove(i) import pyross import unittest import inspect import numpy as np import scipy as sp class DeterministicTest(unittest.TestCase): N = np.asarray([10000], dtype=np.float64) M = 1 alpha = 0 beta = 0.0071 gIa = ...
true
true
f729ebdbc441f606cce6d4823d02a249f2b77337
1,260
py
Python
test/metrics/android_startup_powrails.py
nicomazz/perfetto
fb875c61cf00ded88a3f46cb562ab943129cb7af
[ "Apache-2.0" ]
3
2021-03-07T19:52:29.000Z
2021-11-25T01:57:25.000Z
test/metrics/android_startup_powrails.py
nicomazz/perfetto
fb875c61cf00ded88a3f46cb562ab943129cb7af
[ "Apache-2.0" ]
9
2019-12-30T02:56:16.000Z
2020-12-22T07:05:04.000Z
test/metrics/android_startup_powrails.py
nicomazz/perfetto
fb875c61cf00ded88a3f46cb562ab943129cb7af
[ "Apache-2.0" ]
15
2018-09-17T18:30:47.000Z
2021-11-25T01:57:19.000Z
#!/usr/bin/python # Copyright (C) 2018 The Android Open Source Project # # 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 ...
31.5
74
0.761905
from os import sys, path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) import synth_common trace = synth_common.create_trace() trace.add_packet() trace.add_power_rails_desc(1, 'PR_1') trace.add_power_rails_desc(2, 'PR_2') trace.add_power_rails_desc(3, 'PR_3') trace.add_power_r...
true
true
f729ed17f785ba9a429071f6f20dbd6ca0f95643
3,316
py
Python
test6.py
rscinto/WeatherStation
df11d550f54e0a2a3964915f13482f76379f0c24
[ "MIT" ]
null
null
null
test6.py
rscinto/WeatherStation
df11d550f54e0a2a3964915f13482f76379f0c24
[ "MIT" ]
null
null
null
test6.py
rscinto/WeatherStation
df11d550f54e0a2a3964915f13482f76379f0c24
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import time import Adafruit_GPIO.SPI as SPI import Adafruit_SSD1306 # import RPi.GPIO as GPIO from signal import pause #import dht11 import math # from PIL import Image from PIL import ImageDraw from PIL import ImageFont #import subprocess # #import sys import board imp...
25.312977
103
0.646261
import time import Adafruit_GPIO.SPI as SPI import Adafruit_SSD1306 import RPi.GPIO as GPIO from signal import pause import math from PIL import Image from PIL import ImageDraw from PIL import ImageFont import board import pigpio import DHT import time import datetime RST = None ...
true
true
f729ed6fd28f976514f79ff059bea5c9cde24f99
956
py
Python
tests/test.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
1
2021-07-11T03:20:10.000Z
2021-07-11T03:20:10.000Z
tests/test.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
39
2021-07-10T05:21:09.000Z
2021-12-15T06:10:12.000Z
tests/test.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
null
null
null
import functools import typing class Accumulate: @staticmethod def __call__( func: typing.Callable, identity: int, ): def fn( a: typing.Iterable[int], ) -> int: return functools.reduce( func, a, ident...
18.384615
50
0.520921
import functools import typing class Accumulate: @staticmethod def __call__( func: typing.Callable, identity: int, ): def fn( a: typing.Iterable[int], ) -> int: return functools.reduce( func, a, ident...
true
true
f729eda38e362c9c696acc7c2d04703e773df310
3,391
py
Python
plugins/alexBot.py
convell/HiBotImAlex
14fd0f2599ca259e18d407bd0a0585fce9e48430
[ "MIT" ]
null
null
null
plugins/alexBot.py
convell/HiBotImAlex
14fd0f2599ca259e18d407bd0a0585fce9e48430
[ "MIT" ]
null
null
null
plugins/alexBot.py
convell/HiBotImAlex
14fd0f2599ca259e18d407bd0a0585fce9e48430
[ "MIT" ]
null
null
null
#vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 from disco.bot import Plugin import re import random import datetime class TutorialPlugin(Plugin): tags = {} lastTimeSpoke = datetime.datetime.now() + datetime.timedelta(minutes = -240) @Plugin.listen('MessageCreate') def on_message_create(self, ev...
39.430233
118
0.55028
from disco.bot import Plugin import re import random import datetime class TutorialPlugin(Plugin): tags = {} lastTimeSpoke = datetime.datetime.now() + datetime.timedelta(minutes = -240) @Plugin.listen('MessageCreate') def on_message_create(self, event): triggerWords = ["im a", "i am a", "i'm...
false
true
f729ee85fe98cf94b4dbc20ab1851bdb837e4c73
1,083
py
Python
Configuration/Generator/python/PhotonJet_Pt_10_14TeV_TuneCUETP8M1_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
Configuration/Generator/python/PhotonJet_Pt_10_14TeV_TuneCUETP8M1_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
Configuration/Generator/python/PhotonJet_Pt_10_14TeV_TuneCUETP8M1_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * generator = cms.EDFilter("Pythia8GeneratorFilter", pythiaHepMCVerbosity = cms.untracked.bool(False), ...
45.125
74
0.54386
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * generator = cms.EDFilter("Pythia8GeneratorFilter", pythiaHepMCVerbosity = cms.untracked.bool(False), ...
true
true
f729ef58649691ca9cf4d55e3e30024b565a869a
1,897
py
Python
dummy_2d_features.py
jhong93/vpd
1ed3e8631c46e078ecb9a7756dba1f1c14aead5b
[ "BSD-3-Clause" ]
7
2021-11-26T01:15:23.000Z
2022-03-15T10:51:47.000Z
dummy_2d_features.py
jhong93/vpd
1ed3e8631c46e078ecb9a7756dba1f1c14aead5b
[ "BSD-3-Clause" ]
4
2022-01-15T09:46:00.000Z
2022-02-05T07:10:18.000Z
dummy_2d_features.py
jhong93/vpd
1ed3e8631c46e078ecb9a7756dba1f1c14aead5b
[ "BSD-3-Clause" ]
1
2021-09-18T16:50:14.000Z
2021-09-18T16:50:14.000Z
#!/usr/bin/env python3 """ Convert COCO17 2D poses to dummy embeddings for 2D-VPD. """ import os import argparse import numpy as np from tqdm import tqdm from util.io import store_pickle, load_gz_json from vipe_dataset.dataset_base import normalize_2d_skeleton def get_args(): parser = argparse.ArgumentParser()...
32.706897
83
0.614128
import os import argparse import numpy as np from tqdm import tqdm from util.io import store_pickle, load_gz_json from vipe_dataset.dataset_base import normalize_2d_skeleton def get_args(): parser = argparse.ArgumentParser() parser.add_argument('pose_dir', type=str) parser.add_argument('-o', '--out_di...
true
true
f729ef5be0ca6d131bb95c8b19e87d2238010156
3,299
py
Python
dump-roasts.py
jglogan/roastime-data
cfd7bc7b85435225e9316d0aa00bf490b2f4b66f
[ "MIT" ]
1
2021-12-14T21:24:47.000Z
2021-12-14T21:24:47.000Z
dump-roasts.py
jglogan/roastime-data
cfd7bc7b85435225e9316d0aa00bf490b2f4b66f
[ "MIT" ]
null
null
null
dump-roasts.py
jglogan/roastime-data
cfd7bc7b85435225e9316d0aa00bf490b2f4b66f
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import argparse import csv import datetime import json import os import sys roast_fields = [ 'dateTime', 'uid', 'roastNumber', 'roastName', 'beanId', 'rating', 'serialNumber', 'firmware', 'hardware', {'fields': ['ambient', 'ambientTemp'], 'mapped_field...
33.323232
121
0.658381
import argparse import csv import datetime import json import os import sys roast_fields = [ 'dateTime', 'uid', 'roastNumber', 'roastName', 'beanId', 'rating', 'serialNumber', 'firmware', 'hardware', {'fields': ['ambient', 'ambientTemp'], 'mapped_field': 'ambient', 'type': f...
true
true
f729ef60b68c40e555be435faed97dbc1fd4116d
12,824
py
Python
owtf/plugin/plugin_params.py
alienus/owtf
b6d81fac83c324c2b8c6fe2a974c036881c1fcd0
[ "BSD-3-Clause" ]
null
null
null
owtf/plugin/plugin_params.py
alienus/owtf
b6d81fac83c324c2b8c6fe2a974c036881c1fcd0
[ "BSD-3-Clause" ]
null
null
null
owtf/plugin/plugin_params.py
alienus/owtf
b6d81fac83c324c2b8c6fe2a974c036881c1fcd0
[ "BSD-3-Clause" ]
null
null
null
""" owtf.plugin.plugin_params.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Manage parameters to the plugins """ import logging from collections import defaultdict from owtf.config import config_handler from owtf.db.database import get_scoped_session from owtf.managers.error import add_error from owtf.utils.error import abort_fram...
37.497076
122
0.592171
import logging from collections import defaultdict from owtf.config import config_handler from owtf.db.database import get_scoped_session from owtf.managers.error import add_error from owtf.utils.error import abort_framework from owtf.utils.logger import logger from owtf.utils.strings import merge_dicts class Plugin...
true
true
f729ef684ba87ce3a349558d7e959d1f2d28e025
9,264
py
Python
stonesoup/simulator/simple.py
JPompeus/Stone-Soup
030c60aaf5ff92d7bb53f06e350c0bf58c9af037
[ "MIT" ]
null
null
null
stonesoup/simulator/simple.py
JPompeus/Stone-Soup
030c60aaf5ff92d7bb53f06e350c0bf58c9af037
[ "MIT" ]
4
2020-03-10T13:51:00.000Z
2020-03-23T12:38:24.000Z
stonesoup/simulator/simple.py
JPompeus/Stone-Soup
030c60aaf5ff92d7bb53f06e350c0bf58c9af037
[ "MIT" ]
1
2019-12-09T14:33:09.000Z
2019-12-09T14:33:09.000Z
# -*- coding: utf-8 -*- import datetime import numpy as np from ..base import Property from ..models.measurement import MeasurementModel from ..models.transition import TransitionModel from ..reader import GroundTruthReader from ..types.detection import TrueDetection, Clutter from ..types.groundtruth import GroundTru...
40.454148
78
0.655117
import datetime import numpy as np from ..base import Property from ..models.measurement import MeasurementModel from ..models.transition import TransitionModel from ..reader import GroundTruthReader from ..types.detection import TrueDetection, Clutter from ..types.groundtruth import GroundTruthPath, GroundTruthStat...
true
true
f729f12176ee792d4c983261f3ac3717876984d3
1,212
py
Python
eta/t/test_parser.py
lewismj/eta
a07a9c078f8e2c9e166febea0ee61351c25caaa8
[ "BSD-2-Clause" ]
null
null
null
eta/t/test_parser.py
lewismj/eta
a07a9c078f8e2c9e166febea0ee61351c25caaa8
[ "BSD-2-Clause" ]
null
null
null
eta/t/test_parser.py
lewismj/eta
a07a9c078f8e2c9e166febea0ee61351c25caaa8
[ "BSD-2-Clause" ]
null
null
null
""" Basic unit tests for the parser class. """ import unittest from eta.parser import parser from eta.types import Symbol from lark.visitors import VisitError class ParserTest(unittest.TestCase): def test_basic_expressions(self): try: parser.parse("(defun (foo x y) (+ x y))") pars...
27.545455
59
0.584158
import unittest from eta.parser import parser from eta.types import Symbol from lark.visitors import VisitError class ParserTest(unittest.TestCase): def test_basic_expressions(self): try: parser.parse("(defun (foo x y) (+ x y))") parser.parse("(+ 21 35 12 7)") parser....
true
true
f729f1284ac97c73e57672805869326a3657d65a
2,949
py
Python
bc/search/tests/test_synonyms.py
Buckinghamshire-Digital-Service/buckinghamshire-council
bbbdb52b515bcdfc79a2bd9198dfa4828405370e
[ "BSD-3-Clause" ]
1
2021-02-27T07:27:17.000Z
2021-02-27T07:27:17.000Z
bc/search/tests/test_synonyms.py
Buckinghamshire-Digital-Service/buckinghamshire-council
bbbdb52b515bcdfc79a2bd9198dfa4828405370e
[ "BSD-3-Clause" ]
null
null
null
bc/search/tests/test_synonyms.py
Buckinghamshire-Digital-Service/buckinghamshire-council
bbbdb52b515bcdfc79a2bd9198dfa4828405370e
[ "BSD-3-Clause" ]
1
2021-06-09T15:56:54.000Z
2021-06-09T15:56:54.000Z
from unittest.mock import patch from django.test import TestCase from bc.search.tests.fixtures import TermFactory from bc.search.utils import SYNONYMS_CACHE_KEY, cache, get_synonyms class SynonymTest(TestCase): def test_basic(self): TermFactory(canonical_term="foo", synonyms=["soup", "potatoes"]) ...
39.32
88
0.656833
from unittest.mock import patch from django.test import TestCase from bc.search.tests.fixtures import TermFactory from bc.search.utils import SYNONYMS_CACHE_KEY, cache, get_synonyms class SynonymTest(TestCase): def test_basic(self): TermFactory(canonical_term="foo", synonyms=["soup", "potatoes"]) ...
true
true
f729f150a9457bcfb66b694ad7626c679afc605a
3,103
py
Python
ucsmsdk/mometa/bios/BiosSettingRef.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/bios/BiosSettingRef.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/bios/BiosSettingRef.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for BiosSettingRef ManagedObject.""" import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class BiosSettingRefConsts(): IS_DEFAULT_NO = "no" IS_DEFAULT_YES = "yes" ...
51.716667
248
0.636481
import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class BiosSettingRefConsts(): IS_DEFAULT_NO = "no" IS_DEFAULT_YES = "yes" IS_SUPPORTED_NO = "no" IS_SUPPORTED_YES = "yes" class BiosSettingRef(ManagedOb...
true
true
f729f26ea4e35c38ddbe2c84c2bc600c4af7bd30
1,110
py
Python
body/test/test_dxl_comms.py
hello-ag/stretch_body
4d9a1f10617b8f7155b8498c5333821818ce24ab
[ "RSA-MD" ]
null
null
null
body/test/test_dxl_comms.py
hello-ag/stretch_body
4d9a1f10617b8f7155b8498c5333821818ce24ab
[ "RSA-MD" ]
1
2021-08-29T21:42:17.000Z
2021-08-30T05:58:15.000Z
body/test/test_dxl_comms.py
hello-ag/stretch_body
4d9a1f10617b8f7155b8498c5333821818ce24ab
[ "RSA-MD" ]
3
2021-08-20T22:51:57.000Z
2021-09-02T17:05:25.000Z
# Logging level must be set before importing any stretch_body class import stretch_body.robot_params #stretch_body.robot_params.RobotParams.set_logging_level("DEBUG") import unittest import stretch_body.device import stretch_body.robot as robot import numpy as np class TestTimingStats(unittest.TestCase): def test...
39.642857
81
0.692793
import stretch_body.robot_params import unittest import stretch_body.device import stretch_body.robot as robot import numpy as np class TestTimingStats(unittest.TestCase): def test_thread_starvation_group_sync_read(self): robot = stretch_body.robot.Robot() robot.end_of_arm.params['use_group_sync...
true
true
f729f2fd022c7e13fb4bc572acfc2350bc58e2f3
403
py
Python
app/emails.py
JoyWambui/write-a-way
2b535406f5c62722d478db8c186562009cf50e65
[ "MIT" ]
null
null
null
app/emails.py
JoyWambui/write-a-way
2b535406f5c62722d478db8c186562009cf50e65
[ "MIT" ]
null
null
null
app/emails.py
JoyWambui/write-a-way
2b535406f5c62722d478db8c186562009cf50e65
[ "MIT" ]
null
null
null
import os from flask_mail import Message from flask import render_template from . import mail def mail_message(subject,template,to,**kwargs): sender_email =os.environ.get("MAIL_USERNAME") email = Message(subject, sender=sender_email, recipients=[to]) email.body= render_template(template + ".txt",**kwargs)...
33.583333
66
0.741935
import os from flask_mail import Message from flask import render_template from . import mail def mail_message(subject,template,to,**kwargs): sender_email =os.environ.get("MAIL_USERNAME") email = Message(subject, sender=sender_email, recipients=[to]) email.body= render_template(template + ".txt",**kwargs)...
true
true
f729f311d8ca65272c4d0f7490c02839068e71a4
833
py
Python
examples/trio_example.py
leanprover-community/lean-client-python
efeb257b7e672d02c1005a6624251ad6dd392451
[ "Apache-2.0" ]
13
2020-05-03T21:32:14.000Z
2021-06-01T10:32:11.000Z
examples/trio_example.py
leanprover-community/lean-client-python
efeb257b7e672d02c1005a6624251ad6dd392451
[ "Apache-2.0" ]
22
2020-04-25T12:18:12.000Z
2021-07-22T19:39:19.000Z
examples/trio_example.py
leanprover-community/lean-client-python
efeb257b7e672d02c1005a6624251ad6dd392451
[ "Apache-2.0" ]
2
2020-05-06T07:58:33.000Z
2020-11-03T22:11:54.000Z
#!/usr/bin/env python from pathlib import Path import trio # type: ignore from lean_client.trio_server import TrioLeanServer async def main(): lines = Path('test.lean').read_text().split('\n') async with trio.open_nursery() as nursery: server = TrioLeanServer(nursery, debug=False) await serv...
28.724138
67
0.59904
from pathlib import Path import trio from lean_client.trio_server import TrioLeanServer async def main(): lines = Path('test.lean').read_text().split('\n') async with trio.open_nursery() as nursery: server = TrioLeanServer(nursery, debug=False) await server.start() await server.ful...
true
true
f729f3ba1a2a0c58defbcfe07cea84dae747f8f4
868
py
Python
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_projects/tests/test_drf_urls.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
176
2019-07-03T00:20:15.000Z
2022-03-14T07:51:22.000Z
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_projects/tests/test_drf_urls.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
121
2019-06-24T20:47:27.000Z
2022-03-28T02:16:18.000Z
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_projects/tests/test_drf_urls.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
144
2019-06-18T18:48:43.000Z
2022-03-31T12:14:46.000Z
"""App drf url tests. """ from unittest import mock import pytest from django.urls import resolve, reverse from .factories import ProjectFactory pytestmark = pytest.mark.django_db @pytest.mark.fast @mock.patch( "vision_on_edge.azure_projects.models.Project.validate", mock.MagicMock(return_value=True), ) d...
22.842105
83
0.684332
from unittest import mock import pytest from django.urls import resolve, reverse from .factories import ProjectFactory pytestmark = pytest.mark.django_db @pytest.mark.fast @mock.patch( "vision_on_edge.azure_projects.models.Project.validate", mock.MagicMock(return_value=True), ) def test_project_detail(): ...
true
true
f729f4a05df40e49a35b4c3c584b696d124c3396
7,632
py
Python
salt/log/handlers/sentry_mod.py
andrew-vant/salt
26fd2bc89e0faaff0fd0176a9896500660204cd5
[ "Apache-2.0" ]
null
null
null
salt/log/handlers/sentry_mod.py
andrew-vant/salt
26fd2bc89e0faaff0fd0176a9896500660204cd5
[ "Apache-2.0" ]
1
2015-09-02T12:49:48.000Z
2015-09-02T19:22:58.000Z
salt/log/handlers/sentry_mod.py
andrew-vant/salt
26fd2bc89e0faaff0fd0176a9896500660204cd5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Sentry Logging Handler ====================== .. versionadded:: 0.17.0 This module provides a `Sentry`_ logging handler. .. admonition:: Note The `Raven`_ library needs to be installed on the system for this logging handler to be available. Config...
34.378378
111
0.643082
from __future__ import absolute_import import logging import salt.loader from salt.log import LOG_LEVELS try: import raven from raven.handlers.logging import SentryHandler HAS_RAVEN = True except ImportError: HAS_RAVEN = False log = logging.getLogger(__name__) __grains__ = {} __salt__ = {} __v...
true
true
f729f5a7091e28863cdde678afbd7609e9b5fc64
1,244
py
Python
tests/syosetsu/fixtures.py
julot/sphinxcontrib-translation-assistant
44ba6b81efdc77b6ce0b2ee46097ed7ac0c9bbc9
[ "MIT" ]
1
2017-10-21T07:54:57.000Z
2017-10-21T07:54:57.000Z
tests/syosetsu/fixtures.py
julot/sphinxcontrib-translation-assistant
44ba6b81efdc77b6ce0b2ee46097ed7ac0c9bbc9
[ "MIT" ]
null
null
null
tests/syosetsu/fixtures.py
julot/sphinxcontrib-translation-assistant
44ba6b81efdc77b6ce0b2ee46097ed7ac0c9bbc9
[ "MIT" ]
null
null
null
JAPANESE = { 'title': '%プロローグ', 'contents': [ '% |本須 麗乃(もとすうらの)、22歳。', '% わたしは本が好きだ。', '$大好きだ。', '% 三度のご飯より愛してる。', '%「うっ……」', ], 'notes': { 'pre': [ '%蒼枝と申します。', '%長編を書くのは初めてです。', ], 'post': [ '%とうとう始めてしまいま...
20.064516
51
0.434887
JAPANESE = { 'title': '%プロローグ', 'contents': [ '% |本須 麗乃(もとすうらの)、22歳。', '% わたしは本が好きだ。', '$大好きだ。', '% 三度のご飯より愛してる。', '%「うっ……」', ], 'notes': { 'pre': [ '%蒼枝と申します。', '%長編を書くのは初めてです。', ], 'post': [ '%とうとう始めてしまいま...
true
true
f729f6695b2e009749a202fe5cfeba04073f23f7
4,126
py
Python
spinqkit/compiler/translator/qiskit_to_spinq.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
2
2021-12-20T05:19:44.000Z
2021-12-20T05:21:48.000Z
spinqkit/compiler/translator/qiskit_to_spinq.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
null
null
null
spinqkit/compiler/translator/qiskit_to_spinq.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
1
2021-12-20T05:20:35.000Z
2021-12-20T05:20:35.000Z
# Copyright 2021 SpinQ Technology Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
40.45098
213
0.579738
from typing import Dict, List, Tuple, Optional from math import pi import qiskit.circuit as qqc from spinqkit.model.gates import * from spinqkit.model import Circuit, UnsupportedQiskitInstructionError basis_map = {'id': I, 'h': H, 'x': X, 'y': Y, 'z': Z, 'rx': Rx, 'ry': Ry, 'rz': Rz, 't': T, 'tdg': Td, ...
true
true
f729f681eda6168bd03f4dd8f947ad2edae46e87
5,047
py
Python
polaris/polaris/tests/commands/test_watch_transactions.py
yuriescl/django-polaris
8806d0e4e8baaddbffbceb3609786d2436b8abe1
[ "Apache-2.0" ]
81
2019-11-16T21:47:22.000Z
2022-02-17T07:35:02.000Z
polaris/polaris/tests/commands/test_watch_transactions.py
yuriescl/django-polaris
8806d0e4e8baaddbffbceb3609786d2436b8abe1
[ "Apache-2.0" ]
491
2019-11-10T23:44:30.000Z
2022-03-20T00:25:02.000Z
polaris/polaris/tests/commands/test_watch_transactions.py
yuriescl/django-polaris
8806d0e4e8baaddbffbceb3609786d2436b8abe1
[ "Apache-2.0" ]
89
2019-11-18T21:31:01.000Z
2022-03-28T13:47:41.000Z
import pytest from copy import deepcopy from stellar_sdk.keypair import Keypair from asgiref.sync import async_to_sync from polaris.models import Transaction, Asset from polaris.management.commands.watch_transactions import Command test_module = "polaris.management.commands.watch_transactions" SUCCESS_PAYMENT_TRANSA...
44.663717
455
0.799881
import pytest from copy import deepcopy from stellar_sdk.keypair import Keypair from asgiref.sync import async_to_sync from polaris.models import Transaction, Asset from polaris.management.commands.watch_transactions import Command test_module = "polaris.management.commands.watch_transactions" SUCCESS_PAYMENT_TRANSA...
true
true
f729f7025003e41e6ac53ba5dfc94c8f2008dbff
2,865
py
Python
src/ggrc/models/category.py
sriharshakappala/ggrc-core
7561ce27cd987d73468a44df5b6e2b7425f050ef
[ "ECL-2.0", "Apache-2.0" ]
1
2019-04-21T12:21:17.000Z
2019-04-21T12:21:17.000Z
src/ggrc/models/category.py
sriharshakappala/ggrc-core
7561ce27cd987d73468a44df5b6e2b7425f050ef
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc/models/category.py
sriharshakappala/ggrc-core
7561ce27cd987d73468a44df5b6e2b7425f050ef
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: # Maintained By: from ggrc import db from sqlalchemy.ext.associationproxy import association_proxy from .categorization import Categorization from...
31.483516
78
0.681675
from ggrc import db from sqlalchemy.ext.associationproxy import association_proxy from .categorization import Categorization from .mixins import deferred, Base, Hierarchical class CategorizedPublishable(object): def __init__(self, attr_name, type_name): self.attr_name = attr_name self.type_name = type_...
true
true
f729f79dcce70336521e1975dfaa2420b22bc995
2,167
py
Python
benchmarks/operator_benchmark/pt/qbatchnorm_test.py
jsun94/nimble
e5c899a69677818b1becc58100577441e15ede13
[ "BSD-3-Clause" ]
206
2020-11-28T22:56:38.000Z
2022-03-27T02:33:04.000Z
benchmarks/operator_benchmark/pt/qbatchnorm_test.py
jsun94/nimble
e5c899a69677818b1becc58100577441e15ede13
[ "BSD-3-Clause" ]
19
2020-12-09T23:13:14.000Z
2022-01-24T23:24:08.000Z
benchmarks/operator_benchmark/pt/qbatchnorm_test.py
jsun94/nimble
e5c899a69677818b1becc58100577441e15ede13
[ "BSD-3-Clause" ]
28
2020-11-29T15:25:12.000Z
2022-01-20T02:16:27.000Z
import operator_benchmark as op_bench import torch """Microbenchmarks for quantized batchnorm operator.""" batchnorm_configs_short = op_bench.config_list( attr_names=["M", "N", "K"], attrs=[ [1, 256, 3136], ], cross_product_configs={ 'device': ['cpu'], 'dtype': (torch.qint8,)...
30.097222
93
0.653438
import operator_benchmark as op_bench import torch batchnorm_configs_short = op_bench.config_list( attr_names=["M", "N", "K"], attrs=[ [1, 256, 3136], ], cross_product_configs={ 'device': ['cpu'], 'dtype': (torch.qint8,), }, tags=["short"] ) class QBatchNormBenchmar...
true
true
f729f7dcdbbe095d24e280d9ce242d54664e518e
1,146
py
Python
2 - data2graph/evaluateData/changeNames.py
Tocha4/HSM-Solubility
8a83c1270d739f0c7fbb7decf6202e90e6ebc083
[ "MIT" ]
null
null
null
2 - data2graph/evaluateData/changeNames.py
Tocha4/HSM-Solubility
8a83c1270d739f0c7fbb7decf6202e90e6ebc083
[ "MIT" ]
null
null
null
2 - data2graph/evaluateData/changeNames.py
Tocha4/HSM-Solubility
8a83c1270d739f0c7fbb7decf6202e90e6ebc083
[ "MIT" ]
null
null
null
import Anton as aen import numpy as np import matplotlib.pyplot as plt import os from scipy.stats import linregress def changeCelsius(path): files = aen.searchfiles(path, '.npy') files.sort() for i in files: fname,name = os.path.split(i) if 'Celsius' in name: nm = name.split('C...
19.1
130
0.558464
import Anton as aen import numpy as np import matplotlib.pyplot as plt import os from scipy.stats import linregress def changeCelsius(path): files = aen.searchfiles(path, '.npy') files.sort() for i in files: fname,name = os.path.split(i) if 'Celsius' in name: nm = name.split('C...
true
true
f729f8438327633fc7d4f11f24f1136b21b56cd5
2,045
py
Python
{{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name }}/due.py
gpnlab/cookiecutter-gpnlab
dd6e949fe2a203c77f6ea30e84c95f0306c7b64e
[ "MIT" ]
213
2015-06-22T09:23:32.000Z
2022-03-17T02:01:53.000Z
{{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name }}/due.py
gpnlab/cookiecutter-gpnlab
dd6e949fe2a203c77f6ea30e84c95f0306c7b64e
[ "MIT" ]
165
2015-06-14T23:23:15.000Z
2021-09-30T20:06:15.000Z
{{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name }}/due.py
gpnlab/cookiecutter-gpnlab
dd6e949fe2a203c77f6ea30e84c95f0306c7b64e
[ "MIT" ]
29
2015-06-12T20:37:43.000Z
2021-04-13T12:23:55.000Z
# emacs: at the end of the file # ex: set sts=4 ts=4 sw=4 et: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # """ Stub file for a guaranteed safe import of duecredit constructs: if duecredit is not available. To use it, place it into your project codebase to be imported, e.g. copy as ...
27.266667
80
0.642543
true
true
f729f8abc8999e421fa1f8940589e2a205788fd1
6,256
py
Python
custom_components/aarlo/sensor.py
PysX/home-assistant-conf
614c5a67314b6c7b8af4237a918a437b79ab460d
[ "MIT" ]
28
2019-05-31T12:30:15.000Z
2022-03-10T18:54:57.000Z
custom_components/aarlo/sensor.py
PysX/home-assistant-conf
614c5a67314b6c7b8af4237a918a437b79ab460d
[ "MIT" ]
5
2020-08-14T17:43:48.000Z
2021-01-08T21:12:45.000Z
custom_components/aarlo/sensor.py
PysX/home-assistant-config
614c5a67314b6c7b8af4237a918a437b79ab460d
[ "MIT" ]
2
2021-03-31T08:27:19.000Z
2021-04-30T15:13:24.000Z
""" This component provides HA sensor for Netgear Arlo IP cameras. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.arlo/ """ import logging import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant.const impo...
33.634409
88
0.638427
import logging import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_MONITORED_CONDITIONS, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, ) from homeassistant.core import callback from homeassistant.hel...
true
true
f729f97ebd39e6806075207fe6b3f0af5ed7b553
2,783
py
Python
openstates/openstates-master/openstates/pa/committees.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
openstates/openstates-master/openstates/pa/committees.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
openstates/openstates-master/openstates/pa/committees.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
import re from billy.scrape.committees import CommitteeScraper, Committee import lxml.html class CommitteeDict(dict): def __missing__(self, key): (chamber, committee_name, subcommittee_name) = key committee = Committee(chamber, committee_name) if subcommittee_name: committee...
36.618421
77
0.537909
import re from billy.scrape.committees import CommitteeScraper, Committee import lxml.html class CommitteeDict(dict): def __missing__(self, key): (chamber, committee_name, subcommittee_name) = key committee = Committee(chamber, committee_name) if subcommittee_name: committee...
true
true
f729f9f23dfeec7bda100bb4d12668df62d6b044
460
py
Python
output/models/nist_data/list_pkg/any_uri/schema_instance/nistschema_sv_iv_list_any_uri_length_2_xsd/nistschema_sv_iv_list_any_uri_length_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/list_pkg/any_uri/schema_instance/nistschema_sv_iv_list_any_uri_length_2_xsd/nistschema_sv_iv_list_any_uri_length_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/list_pkg/any_uri/schema_instance/nistschema_sv_iv_list_any_uri_length_2_xsd/nistschema_sv_iv_list_any_uri_length_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import List __NAMESPACE__ = "NISTSchema-SV-IV-list-anyURI-length-2-NS" @dataclass class NistschemaSvIvListAnyUriLength2: class Meta: name = "NISTSchema-SV-IV-list-anyURI-length-2" namespace = "NISTSchema-SV-IV-list-anyURI-length-2-NS" valu...
23
62
0.636957
from dataclasses import dataclass, field from typing import List __NAMESPACE__ = "NISTSchema-SV-IV-list-anyURI-length-2-NS" @dataclass class NistschemaSvIvListAnyUriLength2: class Meta: name = "NISTSchema-SV-IV-list-anyURI-length-2" namespace = "NISTSchema-SV-IV-list-anyURI-length-2-NS" valu...
true
true
f729fa6181d9109b928cc1ef1836cc6217b4d5fe
8,853
py
Python
commands/settings.py
FunTa3y/sfuakefzu1
63cec021bc8e1b1321568c711388095837b81ec1
[ "Apache-2.0" ]
1
2022-03-06T05:40:59.000Z
2022-03-06T05:40:59.000Z
commands/settings.py
FunTa3y/sfuakefzu1
63cec021bc8e1b1321568c711388095837b81ec1
[ "Apache-2.0" ]
null
null
null
commands/settings.py
FunTa3y/sfuakefzu1
63cec021bc8e1b1321568c711388095837b81ec1
[ "Apache-2.0" ]
null
null
null
""" Здесь собраны все команды настроек """ import json from vkbottle.user import Blueprint, Message from utils.edit_msg import edit_msg from utils.emojis import ENABLED, DISABLED, ERROR from filters import ForEveryoneRule bp = Blueprint("Settings command") @bp.on.message(ForEveryoneRule("settings"), ...
32.788889
80
0.544448
import json from vkbottle.user import Blueprint, Message from utils.edit_msg import edit_msg from utils.emojis import ENABLED, DISABLED, ERROR from filters import ForEveryoneRule bp = Blueprint("Settings command") @bp.on.message(ForEveryoneRule("settings"), text="<prefix>для всех <command>") async def ...
true
true
f729fb1ebee6b643883c68219d68f5f7837e9319
1,636
py
Python
api_client/python/grr_api_client/types.py
isabella232/grr
db43c7df6eccd6696a5ad3ba8a338088b289d8b1
[ "Apache-2.0" ]
null
null
null
api_client/python/grr_api_client/types.py
isabella232/grr
db43c7df6eccd6696a5ad3ba8a338088b289d8b1
[ "Apache-2.0" ]
1
2021-02-23T10:13:00.000Z
2021-02-23T10:13:00.000Z
api_client/python/grr_api_client/types.py
isabella232/grr
db43c7df6eccd6696a5ad3ba8a338088b289d8b1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Types-related part of GRR API client library.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from typing import Any from grr_api_client import errors from grr_api_client import utils from grr_response_proto import flows_pb2 ...
27.728814
73
0.732885
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from typing import Any from grr_api_client import errors from grr_api_client import utils from grr_response_proto import flows_pb2 class UnknownFlowName(errors.Error): pass class Types(object): de...
true
true
f729fb524e45739cedf45c1e9fd71ddbe6b08b2b
15,311
py
Python
configs/example/arm/devices.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
19
2018-07-20T15:08:50.000Z
2022-03-26T16:15:59.000Z
configs/example/arm/devices.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
148
2018-07-20T00:58:36.000Z
2021-11-16T01:52:33.000Z
configs/example/arm/devices.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
10
2019-01-10T03:01:30.000Z
2022-01-21T18:36:18.000Z
# Copyright (c) 2016-2017, 2019, 2021 Arm Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of t...
35.689977
79
0.640585
import m5 from m5.objects import * m5.util.addToPath('../../') from common.Caches import * from common import ObjectList have_kvm = "ArmV8KvmCPU" in ObjectList.cpu_list.get_names() have_fastmodel = "FastModelCortexA76" in ObjectList.cpu_list.get_names() class L1I(L1_ICache): t...
true
true
f729fc3eb1ab171fa0021b34ddb3f3124a367be7
3,634
py
Python
azure-mgmt-network/azure/mgmt/network/v2015_06_15/models/network_interface_ip_configuration.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-network/azure/mgmt/network/v2015_06_15/models/network_interface_ip_configuration.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-network/azure/mgmt/network/v2015_06_15/models/network_interface_ip_configuration.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
49.108108
133
0.686021
from .sub_resource import SubResource class NetworkInterfaceIPConfiguration(SubResource): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, 'load_b...
true
true
f729fca17167c275820d551d107bd174590db42d
6,921
py
Python
backend/aptitude_32653/settings.py
crowdbotics-apps/aptitude-32653
381e5da874f4dd461c90bc9705d6bb4be7adfd0e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/aptitude_32653/settings.py
crowdbotics-apps/aptitude-32653
381e5da874f4dd461c90bc9705d6bb4be7adfd0e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/aptitude_32653/settings.py
crowdbotics-apps/aptitude-32653
381e5da874f4dd461c90bc9705d6bb4be7adfd0e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for aptitude_32653 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
29.576923
112
0.730675
import os import environ import logging from modules.manifest import get_modules env = environ.Env() DEBUG = env.bool("DEBUG", default=False) # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development se...
true
true
f729fd1d7a671f40e92ec81c3f4592cf5c2c7299
2,125
py
Python
code-samples/canonical-samples/python/long-running-operation/speech_transcribe_async.py
tswast/gapic-docs-samples
16976b148fb6eb53a8a685d475dcdb713ceb9e60
[ "Apache-2.0" ]
null
null
null
code-samples/canonical-samples/python/long-running-operation/speech_transcribe_async.py
tswast/gapic-docs-samples
16976b148fb6eb53a8a685d475dcdb713ceb9e60
[ "Apache-2.0" ]
null
null
null
code-samples/canonical-samples/python/long-running-operation/speech_transcribe_async.py
tswast/gapic-docs-samples
16976b148fb6eb53a8a685d475dcdb713ceb9e60
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2019 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...
37.280702
76
0.720941
from google.cloud import speech from google.cloud.speech import enums from google.cloud.speech import types def long_running_recognize_gcs( gcs_uri='gs://cloud-sample-data/speech/brooklyn.raw', language_code='en-US' ): client = speech.SpeechClient() audio = types.Recognit...
true
true
f729fe054a7c675d4141710bc2b5a4e5decab527
1,812
py
Python
folders_arranger/folders_arranger.py
devded/Automation-scripts
e3b7e623d5fa20496f98a61f896d54ed8a30b8c4
[ "MIT" ]
null
null
null
folders_arranger/folders_arranger.py
devded/Automation-scripts
e3b7e623d5fa20496f98a61f896d54ed8a30b8c4
[ "MIT" ]
null
null
null
folders_arranger/folders_arranger.py
devded/Automation-scripts
e3b7e623d5fa20496f98a61f896d54ed8a30b8c4
[ "MIT" ]
null
null
null
import shutil import os import string class ArrangeScripts: def __init__(self, path_to_folder): self.folders = ['a_e', 'f_j', 'k_o', 'p_t', 'u_z'] self.folder_mapping = {} for alphabet in list(string.ascii_lowercase): if alphabet in list('abcde'): self.folder_ma...
32.945455
97
0.616446
import shutil import os import string class ArrangeScripts: def __init__(self, path_to_folder): self.folders = ['a_e', 'f_j', 'k_o', 'p_t', 'u_z'] self.folder_mapping = {} for alphabet in list(string.ascii_lowercase): if alphabet in list('abcde'): self.folder_ma...
true
true
f729fedf70edfac479931ac38e0c12163c8ee92f
25,493
py
Python
nltk/corpus/reader/childes.py
PhanatosZou/nltk
750e488569b6f80c72ae6ca74eff90eae55e6c4e
[ "Apache-2.0" ]
null
null
null
nltk/corpus/reader/childes.py
PhanatosZou/nltk
750e488569b6f80c72ae6ca74eff90eae55e6c4e
[ "Apache-2.0" ]
null
null
null
nltk/corpus/reader/childes.py
PhanatosZou/nltk
750e488569b6f80c72ae6ca74eff90eae55e6c4e
[ "Apache-2.0" ]
null
null
null
# CHILDES XML Corpus Reader # Copyright (C) 2001-2019 NLTK Project # Author: Tomonori Nagano <tnagano@gc.cuny.edu> # Alexis Dimitriadis <A.Dimitriadis@uu.nl> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Corpus reader for the XML version of the CHILDES corpus. """ __docformat__ = "...
40.337025
103
0.484839
__docformat__ = "epytext en" import re from collections import defaultdict from nltk.util import flatten, LazyMap, LazyConcatenation from nltk.corpus.reader.util import concat from nltk.corpus.reader.xmldocs import XMLCorpusReader, ElementTree NS = "http://www.talkbank.org/ns/talkbank" class CHILDESCorp...
true
true
f72a01337fef4faaba288b693e58d4c5ca437e37
31,822
py
Python
TCFC/eval/bert_eval_acc.py
silverriver/Stylized_Dialog
559dd97c4ec9c91e94deb048f789684ef3f1f9fa
[ "MIT" ]
21
2020-12-16T08:53:38.000Z
2022-01-21T09:08:55.000Z
TCFC/eval/bert_eval_acc.py
silverriver/Stylized_Dialog
559dd97c4ec9c91e94deb048f789684ef3f1f9fa
[ "MIT" ]
1
2020-12-27T07:56:01.000Z
2020-12-30T05:13:11.000Z
TCFC/eval/bert_eval_acc.py
silverriver/Stylized_Dialog
559dd97c4ec9c91e94deb048f789684ef3f1f9fa
[ "MIT" ]
1
2022-02-28T12:19:19.000Z
2022-02-28T12:19:19.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
42.829071
150
0.639683
import argparse import glob import json import logging import os import random import shutil import numpy as np import torch from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset from torch.utils.data.distributed import DistributedSampler from tqdm import tqdm, trang...
true
true
f72a01605237507418ed31df2bec474d55d68fe7
1,246
py
Python
apm/step05/thinker.py
l0k0ms/TrainingEnvironment
f51837cdaf71c6ec41980b8bd1d28275d26a563b
[ "BSD-3-Clause" ]
6
2018-07-27T15:54:49.000Z
2020-02-08T01:39:05.000Z
apm/step05/thinker.py
l0k0ms/TrainingEnvironment
f51837cdaf71c6ec41980b8bd1d28275d26a563b
[ "BSD-3-Clause" ]
1
2018-10-18T12:20:04.000Z
2018-12-10T19:50:36.000Z
apm/step05/thinker.py
l0k0ms/TrainingEnvironment
f51837cdaf71c6ec41980b8bd1d28275d26a563b
[ "BSD-3-Clause" ]
5
2018-09-28T11:40:55.000Z
2021-02-23T11:25:42.000Z
import requests from flask import Flask, Response, jsonify from flask import request as flask_request from flask_caching import Cache from ddtrace import tracer, patch from ddtrace.contrib.flask import TraceMiddleware from bootstrap import create_app from models import Thought from time import sleep patch(redis=T...
27.086957
99
0.724719
import requests from flask import Flask, Response, jsonify from flask import request as flask_request from flask_caching import Cache from ddtrace import tracer, patch from ddtrace.contrib.flask import TraceMiddleware from bootstrap import create_app from models import Thought from time import sleep patch(redis=T...
true
true
f72a02cc49ea1d37ac8dfd0596d8c565b17bf8e3
8,315
py
Python
f1tenth-RL/f1tenth-rl/car/car_control.py
SidSong01/Deep_Reinforcement_Learning_on_F1_10th
cd869d52ada91d114fd0a905d47ce2a6982e061e
[ "MIT" ]
null
null
null
f1tenth-RL/f1tenth-rl/car/car_control.py
SidSong01/Deep_Reinforcement_Learning_on_F1_10th
cd869d52ada91d114fd0a905d47ce2a6982e061e
[ "MIT" ]
null
null
null
f1tenth-RL/f1tenth-rl/car/car_control.py
SidSong01/Deep_Reinforcement_Learning_on_F1_10th
cd869d52ada91d114fd0a905d47ce2a6982e061e
[ "MIT" ]
3
2020-12-12T21:31:33.000Z
2021-03-18T12:40:44.000Z
import rospy from ackermann_msgs.msg import AckermannDriveStamped from threading import Thread import time import argparse import numpy as np try: from geometry_msgs.msg import PoseStamped except ImportError: pass try: from car.sensors import Sensors except ImportError: from sensors import Sensors P...
35.233051
131
0.626218
import rospy from ackermann_msgs.msg import AckermannDriveStamped from threading import Thread import time import argparse import numpy as np try: from geometry_msgs.msg import PoseStamped except ImportError: pass try: from car.sensors import Sensors except ImportError: from sensors import Sensors P...
true
true
f72a03452c1744c5931873010c359c8d1fbc0c34
2,940
py
Python
oboe/Note.py
dapatil211/oboe
cd7047c8d71b1a488f7f732cab4beadfe82b26b7
[ "MIT" ]
89
2020-08-17T23:20:12.000Z
2021-01-13T15:12:43.000Z
oboe/Note.py
dapatil211/oboe
cd7047c8d71b1a488f7f732cab4beadfe82b26b7
[ "MIT" ]
23
2020-10-01T00:51:29.000Z
2021-01-15T10:44:06.000Z
oboe/Note.py
dapatil211/oboe
cd7047c8d71b1a488f7f732cab4beadfe82b26b7
[ "MIT" ]
14
2020-09-21T17:55:15.000Z
2021-01-03T20:44:21.000Z
import os import sys import regex as re from oboe.utils import slug_case, md_link, render_markdown, find_tags from oboe.format import ( format_tags, format_blockrefs, format_highlights, format_links, format_code_blocks ) from oboe.Link import Link from oboe import LOG from oboe import GLOBAL import copy class Not...
31.956522
112
0.626531
import os import sys import regex as re from oboe.utils import slug_case, md_link, render_markdown, find_tags from oboe.format import ( format_tags, format_blockrefs, format_highlights, format_links, format_code_blocks ) from oboe.Link import Link from oboe import LOG from oboe import GLOBAL import copy class Not...
true
true
f72a0347ed4a8c5b147fbe4acb6b6a3b266add9d
52,525
py
Python
IRIS_data_download/IRIS_download_support/obspy/clients/fdsn/mass_downloader/download_helpers.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-03-05T01:03:01.000Z
2020-12-17T05:04:07.000Z
IRIS_data_download/IRIS_download_support/obspy/clients/fdsn/mass_downloader/download_helpers.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
4
2021-03-31T19:25:55.000Z
2021-12-13T20:32:46.000Z
IRIS_data_download/IRIS_download_support/obspy/clients/fdsn/mass_downloader/download_helpers.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-09-08T19:33:40.000Z
2021-04-05T09:47:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Helpers for the mass downloader. Intended to simplify and stabilize the logic of the mass downloader and make it understandable in the first place. :copyright: Lion Krischer (krischer@geophysik.uni-muenchen.de), 2014-2015 :license: GNU Lesser General Public Li...
42.256637
79
0.563351
from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * import collections import copy import fnmatch import itertools import sys from multiprocessing.pool import ThreadPool import os import time import timeit if sys.version_info.m...
true
true
f72a03a0654ac8bf69ab756f2589b9ba01baa853
270
py
Python
com/web/web_app.py
Alex-Ryj/amazon_backend
96bdd8aacf2bdb545e430fd9f38298a42714e44a
[ "MIT" ]
2
2019-08-29T17:38:32.000Z
2020-01-05T04:57:17.000Z
com/web/web_app.py
Alex-Ryj/amazon_backend
96bdd8aacf2bdb545e430fd9f38298a42714e44a
[ "MIT" ]
6
2021-03-19T03:01:52.000Z
2022-01-13T01:32:51.000Z
com/web/web_app.py
Alex-Ryj/python_backend
96bdd8aacf2bdb545e430fd9f38298a42714e44a
[ "MIT" ]
null
null
null
from flask import Flask import log_config app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" @app.route('/post/<int:post_id>') def show_post(post_id): # show the post with the given id, the id is an integer return 'Post %d' % post_id
20.769231
59
0.681481
from flask import Flask import log_config app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" @app.route('/post/<int:post_id>') def show_post(post_id): return 'Post %d' % post_id
true
true
f72a0425cee32a9448bd24310af17396dd221dd4
5,716
py
Python
nuplan/planning/metrics/metric_result.py
MCZhi/nuplan-devkit
3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c
[ "Apache-2.0" ]
null
null
null
nuplan/planning/metrics/metric_result.py
MCZhi/nuplan-devkit
3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c
[ "Apache-2.0" ]
null
null
null
nuplan/planning/metrics/metric_result.py
MCZhi/nuplan-devkit
3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from abc import ABC from dataclasses import dataclass from enum import Enum from typing import Any, Dict, List, Optional class MetricStatisticsType(Enum): MAX: str = 'MAX' MIN: str = 'MIN' P90: str = 'P90' MEAN: str = 'MEAN' COUNT: str = 'COUNT' VALUE: str =...
31.58011
107
0.609692
from __future__ import annotations from abc import ABC from dataclasses import dataclass from enum import Enum from typing import Any, Dict, List, Optional class MetricStatisticsType(Enum): MAX: str = 'MAX' MIN: str = 'MIN' P90: str = 'P90' MEAN: str = 'MEAN' COUNT: str = 'COUNT' VALUE: str =...
true
true
f72a07a60d7b9b98104ca5e01aff73e0b860b04e
8,431
py
Python
deepvoice3_pytorch/modules.py
tripzero/deepvoice3_pytorch
6aef4c817745c58fe2fb56d36b533b86bd137fa3
[ "MIT" ]
6
2019-05-14T09:30:49.000Z
2020-04-20T07:24:41.000Z
deepvoice3_pytorch/modules.py
theFong/deepvoice3_pytorch
90027d27dab2889d856f9db9ffaf39d4f70b3067
[ "MIT" ]
null
null
null
deepvoice3_pytorch/modules.py
theFong/deepvoice3_pytorch
90027d27dab2889d856f9db9ffaf39d4f70b3067
[ "MIT" ]
2
2021-07-14T09:04:19.000Z
2021-10-13T05:27:32.000Z
# coding: utf-8 import torch from torch import nn import math import numpy as np from torch.nn import functional as F def position_encoding_init(n_position, d_pos_vec, position_rate=1.0, sinusoidal=True): ''' Init the sinusoid position encoding table ''' # keep dim 0 for padding t...
34.838843
99
0.582493
import torch from torch import nn import math import numpy as np from torch.nn import functional as F def position_encoding_init(n_position, d_pos_vec, position_rate=1.0, sinusoidal=True): position_enc = np.array([ [position_rate * pos / np.power(10000, 2 * (i // 2) / d_...
true
true
f72a081d8e8207ed9ff9da9bb124d0d211ba5629
28,886
py
Python
python/base_agent/ttad/back_translation/modeling_gpt2.py
boldsort/craftassist
8058d115a250e30deb60d969b7b1a5fefd6e974c
[ "MIT" ]
626
2019-07-18T18:40:44.000Z
2022-03-29T17:34:43.000Z
python/base_agent/ttad/back_translation/modeling_gpt2.py
boldsort/craftassist
8058d115a250e30deb60d969b7b1a5fefd6e974c
[ "MIT" ]
42
2019-07-27T11:04:15.000Z
2021-02-23T03:15:14.000Z
python/base_agent/ttad/back_translation/modeling_gpt2.py
boldsort/craftassist
8058d115a250e30deb60d969b7b1a5fefd6e974c
[ "MIT" ]
89
2019-07-19T15:07:39.000Z
2022-02-15T18:44:24.000Z
# coding=utf-8 # Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License...
38.669344
149
0.616562
import logging import os import warnings import torch import torch.nn as nn from torch.nn import CrossEntropyLoss from transformers.modeling_gpt2 import PreTrainedModel, GPT2Config from transformers.modeling_outputs import ( BaseModelOutputWithPast, CausalLMOutputWithPast, GPT2DoubleHeadsMo...
true
true
f72a08a72a1888f212ceb3df79de2a45c4365d09
6,475
py
Python
test/functional/rpc_bind.py
WFLSCoin/wflscoin
794eb115845c3e7d6b75cf40031568bf5329ee25
[ "MIT" ]
null
null
null
test/functional/rpc_bind.py
WFLSCoin/wflscoin
794eb115845c3e7d6b75cf40031568bf5329ee25
[ "MIT" ]
null
null
null
test/functional/rpc_bind.py
WFLSCoin/wflscoin
794eb115845c3e7d6b75cf40031568bf5329ee25
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Wflscoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running wflscoind with the -rpcbind and -rpcallowip options.""" import sys from test_framework....
49.427481
172
0.633514
import sys from test_framework.netutil import all_interfaces, addr_to_hex, get_bind_addrs, test_ipv6_local from test_framework.test_framework import WflscoinTestFramework, SkipTest from test_framework.util import assert_equal, assert_raises_rpc_error, get_rpc_proxy, rpc_port, rpc_url class RPCBindTest(WflscoinTe...
true
true
f72a08a78c04b21dcfa96e85e65cc6f2f670bc47
811
py
Python
tests/test_signed_div.py
Kyle-Kyle/angr
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
[ "BSD-2-Clause" ]
6,132
2015-08-06T23:24:47.000Z
2022-03-31T21:49:34.000Z
tests/test_signed_div.py
Kyle-Kyle/angr
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
[ "BSD-2-Clause" ]
2,272
2015-08-10T08:40:07.000Z
2022-03-31T23:46:44.000Z
tests/test_signed_div.py
Kyle-Kyle/angr
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
[ "BSD-2-Clause" ]
1,155
2015-08-06T23:37:39.000Z
2022-03-31T05:54:11.000Z
import nose import angr import subprocess import sys import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = os.path.dirname(os.path.realpath(__file__)) def test_signed_div(): if not sys.platform.startswith('linux'): raise nose.SkipTest() # this is not technically ...
27.965517
104
0.713933
import nose import angr import subprocess import sys import logging l = logging.getLogger('angr.tests.test_signed_div') import os test_location = os.path.dirname(os.path.realpath(__file__)) def test_signed_div(): if not sys.platform.startswith('linux'): raise nose.SkipTest() test_bin = os.path.jo...
true
true
f72a08f672564050206b34774a4683b486883a04
1,134
py
Python
ocrd_anybaseocr/cli/cli.py
syedsaqibbukhari/docanalysis
dfbafa582fb652dffa30fb188190cb98f26116a3
[ "Apache-2.0" ]
13
2018-11-06T10:18:09.000Z
2021-12-14T08:14:09.000Z
ocrd_anybaseocr/cli/cli.py
syedsaqibbukhari/docanalysis
dfbafa582fb652dffa30fb188190cb98f26116a3
[ "Apache-2.0" ]
34
2018-11-06T11:30:21.000Z
2019-07-31T17:18:30.000Z
ocrd_anybaseocr/cli/cli.py
syedsaqibbukhari/docanalysis
dfbafa582fb652dffa30fb188190cb98f26116a3
[ "Apache-2.0" ]
7
2018-11-06T11:30:23.000Z
2021-12-14T08:14:13.000Z
import click from ocrd.decorators import ocrd_cli_options, ocrd_cli_wrap_processor from ocrd_anybaseocr.cli.ocrd_anybaseocr_cropping import OcrdAnybaseocrCropper from ocrd_anybaseocr.cli.ocrd_anybaseocr_deskew import OcrdAnybaseocrDeskewer from ocrd_anybaseocr.cli.ocrd_anybaseocr_binarize import OcrdAnybaseocrBinarize...
34.363636
97
0.826279
import click from ocrd.decorators import ocrd_cli_options, ocrd_cli_wrap_processor from ocrd_anybaseocr.cli.ocrd_anybaseocr_cropping import OcrdAnybaseocrCropper from ocrd_anybaseocr.cli.ocrd_anybaseocr_deskew import OcrdAnybaseocrDeskewer from ocrd_anybaseocr.cli.ocrd_anybaseocr_binarize import OcrdAnybaseocrBinarize...
true
true
f72a0a6137a9d63eef214277f2b6c20c57c75e5e
23,003
py
Python
sdks/python/client/argo_workflows/model/github_com_argoproj_labs_argo_dataflow_api_v1alpha1_abstract_volume_source.py
parallel-domain/argo-workflows
c055b48b6e216dcdeb1c9840f14199a72329bdaf
[ "Apache-2.0" ]
1
2022-02-24T01:45:03.000Z
2022-02-24T01:45:03.000Z
sdks/python/client/argo_workflows/model/github_com_argoproj_labs_argo_dataflow_api_v1alpha1_abstract_volume_source.py
parallel-domain/argo-workflows
c055b48b6e216dcdeb1c9840f14199a72329bdaf
[ "Apache-2.0" ]
18
2022-02-01T23:09:58.000Z
2022-03-31T23:28:41.000Z
sdks/python/client/argo_workflows/model/github_com_argoproj_labs_argo_dataflow_api_v1alpha1_abstract_volume_source.py
parallel-domain/argo-workflows
c055b48b6e216dcdeb1c9840f14199a72329bdaf
[ "Apache-2.0" ]
null
null
null
""" Argo Workflows API Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/ # noqa: E501 The version of the OpenAPI document: VERSION Generated by: https://openapi-g...
53.495349
206
0.638221
import re import sys from argo_workflows.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) fro...
true
true
f72a0ab6ac97478fa1a78bb583dacb7f9f8e3690
1,317
py
Python
python/network/Foundations-of-Python-Network-Programming/foundations-of-python-network-programming/foundations-of-python-network-programming/python3/13/ehlo.py
bosserbosser/codetest
987563900d912e891b53eeda8e2cf36f3c769430
[ "Apache-2.0" ]
1
2018-01-15T08:38:09.000Z
2018-01-15T08:38:09.000Z
python/network/Foundations-of-Python-Network-Programming/foundations-of-python-network-programming/foundations-of-python-network-programming/python3/13/ehlo.py
bosserbosser/codetest
987563900d912e891b53eeda8e2cf36f3c769430
[ "Apache-2.0" ]
null
null
null
python/network/Foundations-of-Python-Network-Programming/foundations-of-python-network-programming/foundations-of-python-network-programming/python3/13/ehlo.py
bosserbosser/codetest
987563900d912e891b53eeda8e2cf36f3c769430
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # SMTP transmission with manual EHLO - Chapter 13 - ehlo.py import sys, smtplib, socket if len(sys.argv) < 4: print("usage: %s server fromaddr toaddr [toaddr...]" % sys.argv[0]) sys.exit(2) server, fromaddr, toaddrs = sys.argv[1], sys.argv[2], sys.argv[3:] message = """To: %s From: %s ...
28.021277
72
0.626424
import sys, smtplib, socket if len(sys.argv) < 4: print("usage: %s server fromaddr toaddr [toaddr...]" % sys.argv[0]) sys.exit(2) server, fromaddr, toaddrs = sys.argv[1], sys.argv[2], sys.argv[3:] message = """To: %s From: %s Subject: Test Message from simple.py Hello, This is a test message sent to you...
true
true
f72a0bad6b85d668e5c4ae43b5b676d8ca9196fc
1,556
py
Python
setup.py
teakfi/imodels
0144698c5c9b919b2640cb8e2caac3a9124a2a0e
[ "MIT" ]
null
null
null
setup.py
teakfi/imodels
0144698c5c9b919b2640cb8e2caac3a9124a2a0e
[ "MIT" ]
null
null
null
setup.py
teakfi/imodels
0144698c5c9b919b2640cb8e2caac3a9124a2a0e
[ "MIT" ]
null
null
null
import setuptools from os import path path_to_repo = path.abspath(path.dirname(__file__)) with open(path.join(path_to_repo, 'readme.md'), encoding='utf-8') as f: long_description = f.read() required_pypi = [ 'corels==1.1.29', # we only provide a basic wrapper around corels # optionally requires cvxpy for...
28.290909
71
0.595116
import setuptools from os import path path_to_repo = path.abspath(path.dirname(__file__)) with open(path.join(path_to_repo, 'readme.md'), encoding='utf-8') as f: long_description = f.read() required_pypi = [ 'corels==1.1.29', 'mlxtend>=0.18.0', 'numpy', 'pandas', 'scipy', 'sc...
true
true
f72a0be1d879b2f7d828562e7d4742f9459fae21
1,120
py
Python
test/test_website_group.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
test/test_website_group.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
test/test_website_group.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ LogicMonitor REST API LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account...
27.317073
304
0.738393
from __future__ import absolute_import import unittest import logicmonitor_sdk from logicmonitor_sdk.models.website_group import WebsiteGroup from logicmonitor_sdk.rest import ApiException class TestWebsiteGroup(unittest.TestCase): def setUp(self): pass def tearDown(self): pass ...
true
true
f72a0c82f7cfe696f88c2b9b07cb2123643e2f08
22,572
py
Python
scripts/pl_sequence_train.py
louis2889184/sg2im
6df2095bf58703c7d6d74bf47535a7cf45690bc0
[ "Apache-2.0" ]
null
null
null
scripts/pl_sequence_train.py
louis2889184/sg2im
6df2095bf58703c7d6d74bf47535a7cf45690bc0
[ "Apache-2.0" ]
null
null
null
scripts/pl_sequence_train.py
louis2889184/sg2im
6df2095bf58703c7d6d74bf47535a7cf45690bc0
[ "Apache-2.0" ]
null
null
null
import os import json import argparse import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from collections import OrderedDict from sg2im.utils import timeit, bool_flag, LossManager from sg2im.utils import int_tuple, float_tuple, str_tuple from sg2im.data.vg import...
37.557404
112
0.659357
import os import json import argparse import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from collections import OrderedDict from sg2im.utils import timeit, bool_flag, LossManager from sg2im.utils import int_tuple, float_tuple, str_tuple from sg2im.data.vg import...
true
true
f72a0d6bcf92b77baa2667e637dcc710db7ab205
2,534
py
Python
douban/washSecond.py
david-woody/SpiderDouBan
172dc0d6283117f562dc85df80d8c18525355745
[ "Apache-2.0" ]
null
null
null
douban/washSecond.py
david-woody/SpiderDouBan
172dc0d6283117f562dc85df80d8c18525355745
[ "Apache-2.0" ]
null
null
null
douban/washSecond.py
david-woody/SpiderDouBan
172dc0d6283117f562dc85df80d8c18525355745
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 import os import xlwt from xlrd import open_workbook from xlutils.copy import copy tittle_style = xlwt.easyxf( 'font: height 240, name Arial Black, colour_index black, bold on; align: wrap on, vert centre, horiz center;') normal_style = xlwt.easyxf( 'font: height 240, name Arial, colour_inde...
38.984615
114
0.615233
import os import xlwt from xlrd import open_workbook from xlutils.copy import copy tittle_style = xlwt.easyxf( 'font: height 240, name Arial Black, colour_index black, bold on; align: wrap on, vert centre, horiz center;') normal_style = xlwt.easyxf( 'font: height 240, name Arial, colour_index black, bold off...
false
true
f72a0dd1e2be9b0b1602963b8427cf6c4cd7c37c
10,533
py
Python
src/thorax/affine/niftireg/tools/utils.py
MASILab/registration_tutorial
8e6763fe0a49ae53211c62be113fcc13185f2b19
[ "MIT" ]
1
2021-07-25T16:24:27.000Z
2021-07-25T16:24:27.000Z
src/thorax/affine/niftireg/tools/utils.py
MASILab/registration_tutorial
8e6763fe0a49ae53211c62be113fcc13185f2b19
[ "MIT" ]
null
null
null
src/thorax/affine/niftireg/tools/utils.py
MASILab/registration_tutorial
8e6763fe0a49ae53211c62be113fcc13185f2b19
[ "MIT" ]
null
null
null
import os import errno import math import shutil def get_range_paral_chunk(total_num_item, chunk_pair): num_item_each_chunk = int(math.ceil(float(total_num_item) / float(chunk_pair[1]))) range_lower = num_item_each_chunk * (chunk_pair[0] - 1) # range_upper = num_item_each_chunk * chunk_pair[0] - 1 ran...
43.168033
189
0.690686
import os import errno import math import shutil def get_range_paral_chunk(total_num_item, chunk_pair): num_item_each_chunk = int(math.ceil(float(total_num_item) / float(chunk_pair[1]))) range_lower = num_item_each_chunk * (chunk_pair[0] - 1) range_upper = num_item_each_chunk * chunk_pair[0] if r...
true
true
f72a0ecb61686900af2bb5227449d8a70ca7b103
104
py
Python
src/lib/models/fastreid/utils/__init__.py
wisematch/KDMOT
03be0a148fc5d5a43c13a0427c429305b92e6838
[ "MIT" ]
null
null
null
src/lib/models/fastreid/utils/__init__.py
wisematch/KDMOT
03be0a148fc5d5a43c13a0427c429305b92e6838
[ "MIT" ]
null
null
null
src/lib/models/fastreid/utils/__init__.py
wisematch/KDMOT
03be0a148fc5d5a43c13a0427c429305b92e6838
[ "MIT" ]
null
null
null
# encoding: utf-8 """ @author: sherlock @contact: sherlockliao01@gmail.com """ from .registry import *
14.857143
34
0.701923
from .registry import *
true
true
f72a0f17a8dcbb9af0ab216980c0570646e12b4d
17,842
py
Python
plaso/cli/log2timeline_tool.py
infosecjosh/plaso
7b5fc33591c60e89afc231a451449d40e02d8985
[ "Apache-2.0" ]
null
null
null
plaso/cli/log2timeline_tool.py
infosecjosh/plaso
7b5fc33591c60e89afc231a451449d40e02d8985
[ "Apache-2.0" ]
null
null
null
plaso/cli/log2timeline_tool.py
infosecjosh/plaso
7b5fc33591c60e89afc231a451449d40e02d8985
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """The log2timeline CLI tool.""" from __future__ import unicode_literals import argparse import os import sys import time import textwrap from dfvfs.lib import definitions as dfvfs_definitions import plaso # The following import makes sure the output modules are registered. from plaso impor...
38.123932
80
0.729403
from __future__ import unicode_literals import argparse import os import sys import time import textwrap from dfvfs.lib import definitions as dfvfs_definitions import plaso from plaso import output from plaso.analyzers.hashers import manager as hashers_manager from plaso.cli import extraction_tool from plaso....
true
true
f72a117fd491be4a83bc01b0a9c8a1fe778df379
1,630
py
Python
stanCode Projects/campy_projects/bouncing_ball.py
ruby-pan/Stanford-Coding-Projects
c3e5ddb53d2742a745eba22f70b8fb0d24d787e8
[ "MIT" ]
null
null
null
stanCode Projects/campy_projects/bouncing_ball.py
ruby-pan/Stanford-Coding-Projects
c3e5ddb53d2742a745eba22f70b8fb0d24d787e8
[ "MIT" ]
null
null
null
stanCode Projects/campy_projects/bouncing_ball.py
ruby-pan/Stanford-Coding-Projects
c3e5ddb53d2742a745eba22f70b8fb0d24d787e8
[ "MIT" ]
null
null
null
""" File: bouncing_ball.py Name: Ruby ------------------------- This file uses campy module to simulate ball bouncing on a GWindow object """ from campy.graphics.gobjects import GOval from campy.graphics.gwindow import GWindow from campy.gui.events.timer import pause from campy.gui.events.mouse import onmou...
25.46875
105
0.566258
from campy.graphics.gobjects import GOval from campy.graphics.gwindow import GWindow from campy.gui.events.timer import pause from campy.gui.events.mouse import onmouseclicked VX = 5 DELAY = 10 GRAVITY = 1 SIZE = 20 REDUCE = 0.9 START_X = 30 START_Y = 40 window = GWindow(800, 500, title='bouncing_ball....
true
true
f72a12b58edcb73c4679ecca5af53b3f3cb22bd2
6,980
py
Python
pandas/__init__.py
katieyounglove/pandas
8841969eea43fa34c84c9cdc2d7f286fcc5e76e5
[ "BSD-3-Clause" ]
null
null
null
pandas/__init__.py
katieyounglove/pandas
8841969eea43fa34c84c9cdc2d7f286fcc5e76e5
[ "BSD-3-Clause" ]
null
null
null
pandas/__init__.py
katieyounglove/pandas
8841969eea43fa34c84c9cdc2d7f286fcc5e76e5
[ "BSD-3-Clause" ]
null
null
null
# flake8: noqa __docformat__ = "restructuredtext" # Let users know if they're missing any of our hard dependencies hard_dependencies = ("numpy", "pytz", "dateutil") missing_dependencies = [] for dependency in hard_dependencies: try: __import__(dependency) except ImportError as e: missing_depe...
24.751773
85
0.669198
__docformat__ = "restructuredtext" hard_dependencies = ("numpy", "pytz", "dateutil") missing_dependencies = [] for dependency in hard_dependencies: try: __import__(dependency) except ImportError as e: missing_dependencies.append("{0}: {1}".format(dependency, str(e))) if missing_dependencie...
true
true
f72a12f058bc37d00289a2d8e5e7ef554d3aedf9
2,337
py
Python
kabutobashi/domain/page/page.py
gsy0911/kabutobashi
0be36a41333c3fd0cb59b1d35edee7db4de4a989
[ "MIT" ]
null
null
null
kabutobashi/domain/page/page.py
gsy0911/kabutobashi
0be36a41333c3fd0cb59b1d35edee7db4de4a989
[ "MIT" ]
65
2020-06-20T00:33:12.000Z
2022-03-30T14:41:50.000Z
kabutobashi/domain/page/page.py
gsy0911/kabutobashi
0be36a41333c3fd0cb59b1d35edee7db4de4a989
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod from dataclasses import dataclass from datetime import datetime, timedelta, timezone from functools import reduce from typing import List, Optional, Union import requests # type: ignore from bs4 import BeautifulSoup from kabutobashi.errors import KabutobashiPageError from .us...
26.556818
65
0.619598
from abc import ABCMeta, abstractmethod from dataclasses import dataclass from datetime import datetime, timedelta, timezone from functools import reduce from typing import List, Optional, Union import requests from bs4 import BeautifulSoup from kabutobashi.errors import KabutobashiPageError from .user_agent impor...
true
true
f72a1341533fa491da11994db53cb8af254063e9
8,189
py
Python
Web_Server/run/bemoss_server.py
Entek-Technical-Services/BEMOSS3.5
581a205b4129530474a5ceee93cb36ef62992d4c
[ "BSD-3-Clause" ]
73
2017-07-11T21:46:41.000Z
2022-03-11T03:35:25.000Z
Web_Server/run/bemoss_server.py
Entek-Technical-Services/BEMOSS3.5
581a205b4129530474a5ceee93cb36ef62992d4c
[ "BSD-3-Clause" ]
19
2017-10-10T22:06:15.000Z
2022-03-28T21:03:33.000Z
Web_Server/run/bemoss_server.py
Entek-Technical-Services/BEMOSS3.5
581a205b4129530474a5ceee93cb36ef62992d4c
[ "BSD-3-Clause" ]
36
2017-06-24T00:17:03.000Z
2022-03-31T13:58:36.000Z
# -*- coding: utf-8 -*- ''' Copyright (c) 2016, Virginia Tech All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condi...
36.887387
118
0.689584
''' Copyright (c) 2016, Virginia Tech All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following...
false
true
f72a1413848ce1eae8308309d1a389688e408204
7,059
py
Python
tests/test_util.py
sthagen/pantsbuild-pex
bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309
[ "Apache-2.0" ]
null
null
null
tests/test_util.py
sthagen/pantsbuild-pex
bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309
[ "Apache-2.0" ]
null
null
null
tests/test_util.py
sthagen/pantsbuild-pex
bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import subprocess from hashlib import sha1 from textwrap import dedent from pex.common import safe_mkdir, safe_open, temporary_dir, touch from pex.compatibility import to_bytes ...
35.832487
93
0.632243
import os import subprocess from hashlib import sha1 from textwrap import dedent from pex.common import safe_mkdir, safe_open, temporary_dir, touch from pex.compatibility import to_bytes from pex.pex import PEX from pex.pex_builder import PEXBuilder from pex.typing import TYPE_CHECKING, cast from pex.util import Ca...
true
true
f72a1466c5c327c241f566cd6b2993fbe8a7d9b2
2,373
py
Python
test/eval_fingerprint.py
arthurtofani/footprint
572401d4cba3299ae9915fca2a7d08ea1a3a9bc4
[ "MIT" ]
null
null
null
test/eval_fingerprint.py
arthurtofani/footprint
572401d4cba3299ae9915fca2a7d08ea1a3a9bc4
[ "MIT" ]
null
null
null
test/eval_fingerprint.py
arthurtofani/footprint
572401d4cba3299ae9915fca2a7d08ea1a3a9bc4
[ "MIT" ]
null
null
null
import unittest import logging from footprint.models import Audio from footprint.models import Project import footprint.clients as db import os import random import footprint.tokenizers as tokenizers import footprint.evaluators as evaluators import librosa class TestEvalFingerprintDummy(unittest.TestCase): ''' Tes...
32.958333
140
0.747577
import unittest import logging from footprint.models import Audio from footprint.models import Project import footprint.clients as db import os import random import footprint.tokenizers as tokenizers import footprint.evaluators as evaluators import librosa class TestEvalFingerprintDummy(unittest.TestCase): def test...
true
true
f72a14cfa2d25b558ea211b3bf08c71152c5cdcc
8,959
py
Python
src/sage/knots/knot.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
src/sage/knots/knot.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
src/sage/knots/knot.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
r""" Knots AUTHORS: - Miguel Angel Marco Buzunariz - Amit Jamadagni """ #***************************************************************************** # Copyright (C) 2014 Travis Scrimshaw <tscrim at ucdavis.edu> # # This program is free software: you can redistribute it and/or modify # it under the terms of...
30.063758
136
0.480076
from sage.knots.link import Link from sage.rings.integer import Integer from sage.rings.finite_rings.integer_mod import Mod class Knot(Link): def __init__(self, data, check=True): Link.__init__(self, data) if check: if self.number_of_components() != 1: raise ...
true
true
f72a14f414a54cde57d44cf0105f7d6ea3a142f8
3,674
py
Python
matplotlib2tikz/patch.py
jameshensman/matplotlib2tikz
53cd52529c13b08221f962f1a338d33c055132ee
[ "MIT" ]
1
2021-05-25T20:47:41.000Z
2021-05-25T20:47:41.000Z
matplotlib2tikz/patch.py
jameshensman/matplotlib2tikz
53cd52529c13b08221f962f1a338d33c055132ee
[ "MIT" ]
null
null
null
matplotlib2tikz/patch.py
jameshensman/matplotlib2tikz
53cd52529c13b08221f962f1a338d33c055132ee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # import matplotlib as mpl from . import path as mypath def draw_patch(data, obj): """Return the PGFPlots code for patches. """ # Gather the draw options. data, draw_options = mypath.get_draw_options( data, obj.get_edgecolor(), obj.get_facecolor() ) if isinsta...
28.929134
115
0.60724
import matplotlib as mpl from . import path as mypath def draw_patch(data, obj): data, draw_options = mypath.get_draw_options( data, obj.get_edgecolor(), obj.get_facecolor() ) if isinstance(obj, mpl.patches.Rectangle): return _draw_rectangle(data, obj, draw_options) e...
true
true
f72a15f6519d5b0f2de8510193883522c725a840
2,207
py
Python
run/test_set_get_delete.py
JSeam2/Boopy
fc601e362947242b80bcc5c0a2de838e02ef3f1b
[ "MIT" ]
3
2020-03-18T12:51:01.000Z
2021-12-01T20:01:17.000Z
run/test_set_get_delete.py
JSeam2/Boopy
fc601e362947242b80bcc5c0a2de838e02ef3f1b
[ "MIT" ]
null
null
null
run/test_set_get_delete.py
JSeam2/Boopy
fc601e362947242b80bcc5c0a2de838e02ef3f1b
[ "MIT" ]
4
2020-02-25T12:27:31.000Z
2020-06-02T19:49:15.000Z
import os import time import subprocess import signal import requests import secrets print('='*81) print("Running Integration Test: {}".format(__file__)) nodes = [ ['1', '0.0.0.0:8001', '0.0.0.0:81'], ['2', '0.0.0.0:8002', '0.0.0.0:82'], ['3', '0.0.0.0:8003', '0.0.0.0:83'], ['4', '0.0.0.0:8004', '0.0...
19.882883
57
0.515632
import os import time import subprocess import signal import requests import secrets print('='*81) print("Running Integration Test: {}".format(__file__)) nodes = [ ['1', '0.0.0.0:8001', '0.0.0.0:81'], ['2', '0.0.0.0:8002', '0.0.0.0:82'], ['3', '0.0.0.0:8003', '0.0.0.0:83'], ['4', '0.0.0.0:8004', '0.0...
true
true
f72a1694183b61ee3827e0b4a3909cca8c657eca
32,592
py
Python
lib/googlecloudsdk/core/console/console_io.py
ianel20/google-cloud-sdk
36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/core/console/console_io.py
ianel20/google-cloud-sdk
36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/core/console/console_io.py
ianel20/google-cloud-sdk
36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3
[ "Apache-2.0" ]
1
2020-07-25T12:23:41.000Z
2020-07-25T12:23:41.000Z
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
34.020877
80
0.665777
import logging import os import re import sys import textwrap import threading import time from googlecloudsdk.core import exceptions from googlecloudsdk.core import log from googlecloudsdk.core import properties from googlecloudsdk.core.console import console_attr from googlecloudsdk.core.console impor...
true
true
f72a16a88bd2e7f2a04565212dbdc6829381ba8b
11,244
py
Python
src/openfermion/utils/_grid.py
mpharrigan/OpenFermion
ae5bbaed60faa019fae9d47d6e578933874e074d
[ "Apache-2.0" ]
null
null
null
src/openfermion/utils/_grid.py
mpharrigan/OpenFermion
ae5bbaed60faa019fae9d47d6e578933874e074d
[ "Apache-2.0" ]
null
null
null
src/openfermion/utils/_grid.py
mpharrigan/OpenFermion
ae5bbaed60faa019fae9d47d6e578933874e074d
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribu...
37.605351
81
0.596852
import itertools import numpy import scipy import scipy.linalg class OrbitalSpecificationError(Exception): pass class Grid: def __init__(self, dimensions, length, scale): if not isinstance(dimensions, int) or dimensions <= 0: raise ValueError( 'dimensions m...
true
true
f72a1840be2b7b6a8d90b8ea7f88260d3394c345
390
py
Python
api/ver1/offices/strings.py
pcf26536/politico-api
1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c
[ "MIT" ]
1
2019-02-22T19:34:32.000Z
2019-02-22T19:34:32.000Z
api/ver1/offices/strings.py
pcf26536/politico-api
1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c
[ "MIT" ]
null
null
null
api/ver1/offices/strings.py
pcf26536/politico-api
1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c
[ "MIT" ]
1
2019-02-07T22:12:25.000Z
2019-02-07T22:12:25.000Z
""" string constants for office module """ fed_type = 'federal' leg_type = 'legislative' state_type = 'state' loc_gov_type = 'local government' office_type_list = [fed_type, leg_type, state_type, loc_gov_type] office_id_str = 'Office ID ' office_key = 'office' prezzo = 'President' mca = 'Member of County Assem...
27.857143
66
0.715385
fed_type = 'federal' leg_type = 'legislative' state_type = 'state' loc_gov_type = 'local government' office_type_list = [fed_type, leg_type, state_type, loc_gov_type] office_id_str = 'Office ID ' office_key = 'office' prezzo = 'President' mca = 'Member of County Assembly' wr = 'Women Representative' gov = 'Go...
true
true
f72a18619bff18684364dfb679729a22a85ad5ff
2,217
py
Python
tools/telemetry/telemetry/core/platform/android_device.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2015-08-13T21:04:58.000Z
2015-08-13T21:04:58.000Z
tools/telemetry/telemetry/core/platform/android_device.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/telemetry/telemetry/core/platform/android_device.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-04T06:34:36.000Z
2020-11-04T06:34:36.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging from telemetry.core import util from telemetry.core.backends import adb_commands from telemetry.core.platform import device from telemetry.cor...
34.640625
79
0.738385
import logging from telemetry.core import util from telemetry.core.backends import adb_commands from telemetry.core.platform import device from telemetry.core.platform.profiler import monsoon class AndroidDevice(device.Device): def __init__(self, device_id, enable_performance_mode=False): super(AndroidDevic...
true
true
f72a1afc1bd1464461d901edc69d6b82a2642d50
13,446
py
Python
test/functional/decodescript.py
IDC-Group/VHKD
0256ddf1477439ebc84e97132d3673aa61c39b73
[ "MIT" ]
3
2018-06-23T10:04:45.000Z
2018-06-25T02:22:01.000Z
test/functional/decodescript.py
IDC-Group/VHKD
0256ddf1477439ebc84e97132d3673aa61c39b73
[ "MIT" ]
null
null
null
test/functional/decodescript.py
IDC-Group/VHKD
0256ddf1477439ebc84e97132d3673aa61c39b73
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The vhkdCoin Core vhkd # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test decoding scripts via decodescript RPC command.""" from test_framework.test_framework import vhkdCoinTe...
74.7
761
0.7751
from test_framework.test_framework import vhkdCoinTestFramework from test_framework.util import * from test_framework.mininode import * from io import BytesIO class DecodeScriptTest(vhkdCoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 def dec...
true
true
f72a1b89963a4a3a6d1bf9e9c6daa16de82b1501
177
py
Python
seglossbias/data/__init__.py
by-liu/SegLossBia
9cc639c04084cda9d5fb20ea34699db7e0beaf5c
[ "MIT" ]
18
2021-04-20T17:03:20.000Z
2022-03-12T05:56:24.000Z
seglossbias/data/__init__.py
by-liu/SegLossBia
9cc639c04084cda9d5fb20ea34699db7e0beaf5c
[ "MIT" ]
null
null
null
seglossbias/data/__init__.py
by-liu/SegLossBia
9cc639c04084cda9d5fb20ea34699db7e0beaf5c
[ "MIT" ]
1
2021-07-08T17:44:15.000Z
2021-07-08T17:44:15.000Z
from .retinal_lesion_dataset import RetinalLesionsDataset from .cityscapes import CityscapesDataset from .image_folder import ImageFolder from .build import build_data_pipeline
35.4
57
0.887006
from .retinal_lesion_dataset import RetinalLesionsDataset from .cityscapes import CityscapesDataset from .image_folder import ImageFolder from .build import build_data_pipeline
true
true
f72a1bdff1a726f89b33188978307242dbacf3ef
8,753
py
Python
var/spack/repos/builtin/packages/ferret/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-10T13:47:48.000Z
2019-04-17T13:05:17.000Z
var/spack/repos/builtin/packages/ferret/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
17
2019-03-21T15:54:00.000Z
2022-03-29T19:34:28.000Z
var/spack/repos/builtin/packages/ferret/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-04-07T18:27:09.000Z
2022-03-31T22:52:38.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import os class Ferret(Package): """Ferret is an interactive computer visualization and analysi...
44.207071
102
0.540272
from spack import * import os class Ferret(Package): homepage = "http://ferret.pmel.noaa.gov/Ferret/home" url = "https://github.com/NOAA-PMEL/Ferret/archive/v7.6.0.tar.gz" maintainers = ['RemiLacroix-IDRIS'] version('7.6.0', sha256='69832d740bd44c9eadd198a5de4d96c4c01ae90ae28c2c3414c1bb9f...
true
true
f72a1d7dd4c80ce0ed01d5ce8dc4f4809a465124
212
py
Python
Webscraping_and_Automation/web-automation.py
Ruban2205/Python-Projects
6c0444784b3be1356d43c70ca544e01e97158d0a
[ "MIT" ]
1
2022-01-17T06:52:29.000Z
2022-01-17T06:52:29.000Z
Webscraping_and_Automation/web-automation.py
Ruban2205/Python-Projects
6c0444784b3be1356d43c70ca544e01e97158d0a
[ "MIT" ]
null
null
null
Webscraping_and_Automation/web-automation.py
Ruban2205/Python-Projects
6c0444784b3be1356d43c70ca544e01e97158d0a
[ "MIT" ]
null
null
null
from webbot import Browser import time web = Browser() web.go_to('https://www.rubangino.in/') web.click('ABOUT') web.click('SKILLS') web.click('PORTFOLIO') web.go_to('https://www.rubangino.in/android-app.html')
21.2
54
0.731132
from webbot import Browser import time web = Browser() web.go_to('https://www.rubangino.in/') web.click('ABOUT') web.click('SKILLS') web.click('PORTFOLIO') web.go_to('https://www.rubangino.in/android-app.html')
true
true
f72a1f0c23b646477e269707c49f7c4f891d2af1
446
py
Python
External/__init__.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
2
2021-02-10T09:07:15.000Z
2021-03-16T17:05:24.000Z
External/__init__.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
102
2021-01-20T11:14:21.000Z
2021-12-12T17:34:42.000Z
External/__init__.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
1
2021-01-29T09:28:05.000Z
2021-01-29T09:28:05.000Z
""" This folder contains 3rd party packages that are used in this Weasel project. You can find a list of these below with their respective version. Each one has a folder allocated, which contains their own README.md file with their licensing details (all open-source) - dcm4che Version 5.23.1 - pyqtgraph Version 0.9.1...
44.6
119
0.784753
true
true
f72a205db5af6129fef3b71373688885867a2642
285
py
Python
fbchat_archive_parser/writers/json.py
alvin-c/fbmessenger-visualizer
f89988720b2af79832a60824dce969f20b0ebb59
[ "MIT" ]
356
2016-01-25T23:57:57.000Z
2022-02-20T18:39:22.000Z
fbchat_archive_parser/writers/json.py
alvin-c/fbmessenger-visualizer
f89988720b2af79832a60824dce969f20b0ebb59
[ "MIT" ]
78
2016-05-13T19:41:38.000Z
2018-11-12T17:55:30.000Z
fbchat_archive_parser/writers/json.py
alvin-c/fbmessenger-visualizer
f89988720b2af79832a60824dce969f20b0ebb59
[ "MIT" ]
57
2016-09-09T15:19:57.000Z
2022-03-24T19:29:59.000Z
from __future__ import unicode_literals, absolute_import from .dict import DictWriter import json class JsonWriter(DictWriter): def serialize_content(self, data): return json.dumps(data, ensure_ascii=False) @property def extension(self): return 'json'
19
56
0.729825
from __future__ import unicode_literals, absolute_import from .dict import DictWriter import json class JsonWriter(DictWriter): def serialize_content(self, data): return json.dumps(data, ensure_ascii=False) @property def extension(self): return 'json'
true
true
f72a21ace7280d3d195e7c570c8971b756c0bb85
10,355
py
Python
tests/user_test.py
maerifat/django-DefectDojo
ba1a415219ff20e8b4e909ef14f750de9b80297e
[ "BSD-3-Clause" ]
null
null
null
tests/user_test.py
maerifat/django-DefectDojo
ba1a415219ff20e8b4e909ef14f750de9b80297e
[ "BSD-3-Clause" ]
206
2020-04-20T16:03:18.000Z
2022-01-15T23:07:48.000Z
tests/user_test.py
maerifat/django-DefectDojo
ba1a415219ff20e8b4e909ef14f750de9b80297e
[ "BSD-3-Clause" ]
1
2020-12-06T15:44:44.000Z
2020-12-06T15:44:44.000Z
import time import unittest import sys from pathlib import Path from base_test_class import BaseTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver import ActionChains clas...
47.068182
130
0.689039
import time import unittest import sys from pathlib import Path from base_test_class import BaseTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver import ActionChains clas...
true
true
f72a21c95f67fb3323e247b7bbe34268a650183d
8,864
py
Python
Acceleration/memcached/regressionSims/sw/memtest_deploy.py
pooyaww/Vivado_HLS_Samples
6dc48bded1fc577c99404fc99c5089ae7279189a
[ "BSD-3-Clause" ]
326
2016-07-06T01:50:43.000Z
2022-03-31T21:50:19.000Z
Acceleration/memcached/regressionSims/sw/memtest_deploy.py
asicguy/HLx_Examples
249406bf7718c33d10a837ddd2ee71a683d481e8
[ "BSD-3-Clause" ]
10
2017-04-05T16:02:19.000Z
2021-06-09T14:26:40.000Z
Acceleration/memcached/regressionSims/sw/memtest_deploy.py
asicguy/HLx_Examples
249406bf7718c33d10a837ddd2ee71a683d481e8
[ "BSD-3-Clause" ]
192
2016-08-31T09:15:18.000Z
2022-03-01T11:28:12.000Z
#!/usr/bin/python # ------------------------------------------------------------------------------ # KVS Regression Testing # ------------------------------------------------------------------------------ # # To run regression tests, a environment configuration and simulation setups # are required. These are two pytho...
37.400844
232
0.625903
false
true
f72a21f6c715e3e5ea77580a68578caf14684d15
15,231
py
Python
ginga/canvas/transform.py
profxj/ginga
a5f447b760ac38dafa52181b3f99156545a6f2e7
[ "BSD-3-Clause" ]
null
null
null
ginga/canvas/transform.py
profxj/ginga
a5f447b760ac38dafa52181b3f99156545a6f2e7
[ "BSD-3-Clause" ]
2
2017-07-25T15:22:13.000Z
2020-04-25T19:34:30.000Z
ginga/canvas/transform.py
profxj/ginga
a5f447b760ac38dafa52181b3f99156545a6f2e7
[ "BSD-3-Clause" ]
3
2018-02-09T20:06:30.000Z
2020-03-30T02:31:44.000Z
# # transform.py -- coordinate transforms for Ginga # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import numpy as np from ginga import trcalc from ginga.misc import Bunch __all__ = ['TransformError', 'BaseTransform', 'ComposedTransform', 'In...
27.743169
78
0.589653
import numpy as np from ginga import trcalc from ginga.misc import Bunch __all__ = ['TransformError', 'BaseTransform', 'ComposedTransform', 'InvertedTransform', 'PassThruTransform', 'WindowNativeTransform', 'CartesianWindowTransform', 'CartesianNativeTransform', 'Rota...
true
true
f72a2370017c122159ed563919fd31b5e3d7c7ad
165
py
Python
Python/Strings/StringSplitAndJoin.py
devansh-pratap-singh/hackerrank-solutions
227817d90846424cd3078e60b225eb201e906cf9
[ "MIT" ]
1
2020-10-15T14:03:52.000Z
2020-10-15T14:03:52.000Z
Python/Strings/StringSplitAndJoin.py
devansh-pratap-singh/HackerRank-Solutions
227817d90846424cd3078e60b225eb201e906cf9
[ "MIT" ]
null
null
null
Python/Strings/StringSplitAndJoin.py
devansh-pratap-singh/HackerRank-Solutions
227817d90846424cd3078e60b225eb201e906cf9
[ "MIT" ]
null
null
null
def split_and_join(line): new = line.split(" ") return "-".join(new) if __name__ == '__main__': line = input() result = split_and_join(line) print(result)
20.625
31
0.654545
def split_and_join(line): new = line.split(" ") return "-".join(new) if __name__ == '__main__': line = input() result = split_and_join(line) print(result)
true
true
f72a24ac56b6a4a8bd16cd8ff8d1ab866e7cbece
263
py
Python
PyLibvirt/test.py
flyflyinit/libvirt-GUI-using-python
4793ac8e581e2c75d42cd7966bae75cc792c3522
[ "MIT" ]
null
null
null
PyLibvirt/test.py
flyflyinit/libvirt-GUI-using-python
4793ac8e581e2c75d42cd7966bae75cc792c3522
[ "MIT" ]
null
null
null
PyLibvirt/test.py
flyflyinit/libvirt-GUI-using-python
4793ac8e581e2c75d42cd7966bae75cc792c3522
[ "MIT" ]
null
null
null
from PIL import Image,ImageDraw import os ########### showing the image on the screen image1 = Image.open('icons/io.png') drawing_object=ImageDraw.Draw(image1) drawing_object.rectangle((50,0,190,150), fill = None, outline ='red') image1.show() #display(image1)
23.909091
69
0.730038
from PIL import Image,ImageDraw import os
true
true
f72a26135e2d57e4c45bf036bf1bf49ac9d741c1
1,804
py
Python
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateProductTagsRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateProductTagsRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateProductTagsRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.382979
100
0.745011
from aliyunsdkcore.request import RpcRequest class CreateProductTagsRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Iot', '2018-01-20', 'CreateProductTags','iot') def get_ProductTags(self): return self.get_query_params().get('ProductTags') def set_ProductTags(self,P...
true
true
f72a263618701ae1fe6cb1a521bcae84e7789cff
52,716
py
Python
wildlifecompliance/components/legal_case/serializers.py
preranaandure/wildlifecompliance
bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5
[ "Apache-2.0" ]
1
2020-12-07T17:12:40.000Z
2020-12-07T17:12:40.000Z
wildlifecompliance/components/legal_case/serializers.py
preranaandure/wildlifecompliance
bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5
[ "Apache-2.0" ]
14
2020-01-08T08:08:26.000Z
2021-03-19T22:59:46.000Z
wildlifecompliance/components/legal_case/serializers.py
preranaandure/wildlifecompliance
bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5
[ "Apache-2.0" ]
15
2020-01-08T08:02:28.000Z
2021-11-03T06:48:32.000Z
import datetime import traceback import pytz from rest_framework.fields import CharField from ledger.accounts.models import EmailUser, Address from wildlifecompliance.components.legal_case.models import ( LegalCase, LegalCaseUserAction, LegalCaseCommsLogEntry, LegalCasePriority, LegalCaseRunningSh...
37.92518
114
0.612471
import datetime import traceback import pytz from rest_framework.fields import CharField from ledger.accounts.models import EmailUser, Address from wildlifecompliance.components.legal_case.models import ( LegalCase, LegalCaseUserAction, LegalCaseCommsLogEntry, LegalCasePriority, LegalCaseRunningSh...
true
true
f72a264bb94bb5718618a67a096c5366fb3374f5
2,620
py
Python
google/cloud/speech/v1p1beta1/speech-v1p1beta1-py/google/cloud/speech_v1p1beta1/types/__init__.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/speech/v1p1beta1/speech-v1p1beta1-py/google/cloud/speech_v1p1beta1/types/__init__.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/speech/v1p1beta1/speech-v1p1beta1-py/google/cloud/speech_v1p1beta1/types/__init__.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
28.172043
74
0.748092
from .cloud_speech import ( LongRunningRecognizeMetadata, LongRunningRecognizeRequest, LongRunningRecognizeResponse, RecognitionAudio, RecognitionConfig, RecognitionMetadata, RecognizeRequest, RecognizeResponse, SpeakerDiarizationConfig, SpeechContext, SpeechRe...
true
true
f72a26dfc31e2ceb7e66c055421e71cb651c6797
3,810
py
Python
Beams/Cantilever Beam - End Loaded.py
vsriv90/mechanical_engineering
c922cdce1a595e9acb6a87cf415fb3685caf51a3
[ "MIT" ]
1
2021-11-03T06:37:44.000Z
2021-11-03T06:37:44.000Z
Beams/Cantilever Beam - End Loaded.py
vsriv90/mechanical_engineering
c922cdce1a595e9acb6a87cf415fb3685caf51a3
[ "MIT" ]
null
null
null
Beams/Cantilever Beam - End Loaded.py
vsriv90/mechanical_engineering
c922cdce1a595e9acb6a87cf415fb3685caf51a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Cantilever beams - End Loaded # ![Cantilever%20-%20End%20Loaded.jpeg](attachment:Cantilever%20-%20End%20Loaded.jpeg) # In[1]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sn # to draw plots # import plotly.express as px # import ...
28.014706
125
0.645407
t pandas as pd import matplotlib.pyplot as plt import seaborn as sn from PIL import Image f = 700 l = 100 UnitF = str('N') UnitL = str("mm") x = [0,l] y = [0,0] plt.plot(x, y,label = "Beam", color='green', linewidth = 10,marker='o', markerfacecolor='blue', markersize=15) plt.legend()
true
true
f72a27bac82a4eddc6703adc1c7ebd25659b4aad
2,192
py
Python
razor/version.py
SRI-CSL/OCCAM
8c498301f658fd3c158ffb6aad36dc0dd57c6239
[ "BSD-3-Clause" ]
17
2015-11-23T17:19:54.000Z
2022-03-18T23:55:29.000Z
razor/version.py
SRI-CSL/application-specialization
6e3efd1431195ccb4afd0801caa8cc825931197f
[ "BSD-3-Clause" ]
58
2015-11-26T17:24:12.000Z
2021-11-30T12:47:31.000Z
razor/version.py
SRI-CSL/application-specialization
6e3efd1431195ccb4afd0801caa8cc825931197f
[ "BSD-3-Clause" ]
10
2015-09-03T14:54:27.000Z
2020-11-13T14:02:11.000Z
""" OCCAM Copyright (c) 2011-2017, SRI International All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of con...
36.533333
86
0.764142
razor_version = '1.1.2'
true
true
f72a27db8ed137ada094f4964a806b163f22f0f6
19,877
py
Python
tests/cases/mount_test.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
tests/cases/mount_test.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
tests/cases/mount_test.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import fuse import mock import os import six import stat import tempfile import threading import time from girder.cli import mount from girder.exceptions import ValidationException from girder.models.file import File from girder.models.setting import Setting from girder.models.u...
46.118329
96
0.640992
import datetime import fuse import mock import os import six import stat import tempfile import threading import time from girder.cli import mount from girder.exceptions import ValidationException from girder.models.file import File from girder.models.setting import Setting from girder.models.user import User from gi...
true
true
f72a2a7c5923c797d3dd68abb92ef1c14020412e
199
py
Python
apirel/users/tests/test_models.py
scottBowles/apirel
597d66eaf65ed9caced411d10c1d8a51f2b76f8f
[ "MIT" ]
null
null
null
apirel/users/tests/test_models.py
scottBowles/apirel
597d66eaf65ed9caced411d10c1d8a51f2b76f8f
[ "MIT" ]
10
2022-01-05T01:26:19.000Z
2022-03-28T02:06:15.000Z
apirel/users/tests/test_models.py
scottBowles/apirel
597d66eaf65ed9caced411d10c1d8a51f2b76f8f
[ "MIT" ]
null
null
null
import pytest from apirel.users.models import User pytestmark = pytest.mark.django_db def test_user_get_absolute_url(user: User): assert user.get_absolute_url() == f"/users/{user.username}/"
19.9
64
0.768844
import pytest from apirel.users.models import User pytestmark = pytest.mark.django_db def test_user_get_absolute_url(user: User): assert user.get_absolute_url() == f"/users/{user.username}/"
true
true
f72a2cdaf83462439b996bbb10ea5e4ee8322bf5
22,331
py
Python
aetros/utils/image.py
aetros/aetros-cli
a2a1f38d6af1660e1e2680c7d413ec2aef45faab
[ "MIT" ]
120
2016-07-26T16:06:14.000Z
2021-07-19T03:26:07.000Z
aetros/utils/image.py
maxpumperla/aetros-cli
a2a1f38d6af1660e1e2680c7d413ec2aef45faab
[ "MIT" ]
30
2016-08-15T22:21:54.000Z
2018-03-14T08:52:46.000Z
aetros/utils/image.py
maxpumperla/aetros-cli
a2a1f38d6af1660e1e2680c7d413ec2aef45faab
[ "MIT" ]
30
2016-07-31T20:54:48.000Z
2019-10-17T11:20:18.000Z
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. # BSD 3-clause license from __future__ import absolute_import from __future__ import print_function import math from six.moves import range # Find the best implementation available from aetros.utils.pilutil import imresize try: from cStringIO i...
41.740187
451
0.579553
from __future__ import absolute_import from __future__ import print_function import math from six.moves import range from aetros.utils.pilutil import imresize try: from cStringIO import StringIO except ImportError: from io import StringIO import numpy as np import PIL.Image SUPPORTED_EX...
true
true
f72a2d4074dad48939a61e0cf5afc75f21b803b0
4,053
py
Python
configs/Misc/torchvision_imagenet_R_50.py
lkeab/detectron2
d4d2948aed6c0c73558da10f8647661f61470e37
[ "Apache-2.0" ]
4
2021-05-24T04:43:33.000Z
2022-03-29T04:59:31.000Z
configs/Misc/torchvision_imagenet_R_50.py
lkeab/detectron2
d4d2948aed6c0c73558da10f8647661f61470e37
[ "Apache-2.0" ]
1
2021-06-16T07:01:43.000Z
2021-11-09T03:48:47.000Z
configs/Misc/torchvision_imagenet_R_50.py
lkeab/detectron2
d4d2948aed6c0c73558da10f8647661f61470e37
[ "Apache-2.0" ]
2
2022-03-13T09:35:32.000Z
2022-03-29T05:04:08.000Z
""" An example config file to train a ImageNet classifier with detectron2. Model and dataloader both come from torchvision. This shows how to use detectron2 as a general engine for any new models and tasks. To run, use the following command: python tools/lazyconfig_train_net.py --config-file configs/Misc/torchvision_i...
29.369565
94
0.658278
import torch from torch import nn from torch.nn import functional as F from omegaconf import OmegaConf import torchvision from torchvision.transforms import transforms as T from torchvision.models.resnet import ResNet, Bottleneck from fvcore.common.param_scheduler import MultiStepParamScheduler from detectron2.solve...
true
true
f72a2ec186c24a531378756e12879ab2a4ae97af
60,347
py
Python
python/GafferUI/UIEditor.py
hypothetical-inc/gaffer
7da631400cfac5399255d23ff296f677e96c7540
[ "BSD-3-Clause" ]
49
2018-08-27T07:52:25.000Z
2022-02-08T13:54:05.000Z
python/GafferUI/UIEditor.py
hypothetical-inc/gaffer
7da631400cfac5399255d23ff296f677e96c7540
[ "BSD-3-Clause" ]
21
2018-11-27T16:00:32.000Z
2022-03-23T20:01:55.000Z
python/GafferUI/UIEditor.py
themissingcow/gaffer
b636debeb2c918fde55b3f4ef53fbc2e1e9ab78a
[ "BSD-3-Clause" ]
4
2018-12-23T16:16:41.000Z
2021-06-16T09:04:01.000Z
########################################################################## # # Copyright (c) 2014, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
33.675781
170
0.698013
" plug empty so that it # is available for use by the user on Reference nodes once a Box has # been exported and referenced. plugParent = self.__node self.__plugAddButtons.setVisible( True ) self.__plugListing.setPlugParent( plugParent ) self.__sectionEditor.setPlugParent( plugParent ) for widg...
true
true
f72a2f12d14736f1dea5052023ae58272f1954cd
2,905
py
Python
miniFawn/models.py
FelixTheC/allSales
76d955b80bf9b5bb58bd53d8ee644249cf04e1a3
[ "Apache-2.0" ]
null
null
null
miniFawn/models.py
FelixTheC/allSales
76d955b80bf9b5bb58bd53d8ee644249cf04e1a3
[ "Apache-2.0" ]
null
null
null
miniFawn/models.py
FelixTheC/allSales
76d955b80bf9b5bb58bd53d8ee644249cf04e1a3
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.urls import reverse from ordercontact.models import Ordercontactinvoiceaddresse from ordercontact.models import Ordercontactdeliveryaddresse from sales.models import ProductionRecordInputMiniGL from sales.models import BaseModelWithoutBeltDesign class Minifawnordermodel(BaseM...
33.390805
100
0.703614
from django.db import models from django.urls import reverse from ordercontact.models import Ordercontactinvoiceaddresse from ordercontact.models import Ordercontactdeliveryaddresse from sales.models import ProductionRecordInputMiniGL from sales.models import BaseModelWithoutBeltDesign class Minifawnordermodel(BaseM...
true
true
f72a2fc7d90882bd0cd97ea02adabacff7fe8dea
2,126
py
Python
ml/myscript/Logisticegression.py
miraclestatus/mllearning
f5db6642e8c05488b133ee627e5f63c92e45ff6e
[ "Apache-2.0" ]
1
2020-06-24T12:44:21.000Z
2020-06-24T12:44:21.000Z
ml/myscript/Logisticegression.py
miraclestatus/mllearning
f5db6642e8c05488b133ee627e5f63c92e45ff6e
[ "Apache-2.0" ]
null
null
null
ml/myscript/Logisticegression.py
miraclestatus/mllearning
f5db6642e8c05488b133ee627e5f63c92e45ff6e
[ "Apache-2.0" ]
null
null
null
import numpy as np from .metrics import accuracy_score class Logisticegression(): def __init__(self): # 系数 self.coef_ = None # 截距 self.intercept_ = None # 向量 self._theta = None def _sigmoid(self, t): return 1./(1. + np.exp(-t)) def fit(self, X_train, ...
33.746032
84
0.562088
import numpy as np from .metrics import accuracy_score class Logisticegression(): def __init__(self): self.coef_ = None self.intercept_ = None self._theta = None def _sigmoid(self, t): return 1./(1. + np.exp(-t)) def fit(self, X_train, y_train, eta...
true
true
f72a2ff159f35066264c6696680d05775e13ffd9
125,019
py
Python
flare_emu.py
mr-tz/flare-emu
0cc6b0b73feba3ffdd83e0892b18b9b4fcbe0403
[ "Apache-2.0" ]
null
null
null
flare_emu.py
mr-tz/flare-emu
0cc6b0b73feba3ffdd83e0892b18b9b4fcbe0403
[ "Apache-2.0" ]
null
null
null
flare_emu.py
mr-tz/flare-emu
0cc6b0b73feba3ffdd83e0892b18b9b4fcbe0403
[ "Apache-2.0" ]
null
null
null
############################################ # Copyright (C) 2018 FireEye, Inc. # # Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or # http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-BSD-3-CLAUSE or # https://opensource.org/licenses/BSD-3-Clause>, at your option. This file may...
52.462862
138
0.562091
ry read or write # hookApis: set to False if you don't want flare-emu to emulate common # instructions to emulate, Defaults to 0 (all code available). def emulateRange(self, startAddr, endAddr=None, registers=None, stack=None, instructionHook=None, callHook=None, ...
true
true
f72a30b3cc3869b03198bc2b6d011b858ede7e71
1,027
py
Python
examples/rename_part.py
mradway/hycohanz
717f1c84a8a6b555b4327b868aa5968a9a717a74
[ "BSD-2-Clause" ]
76
2015-07-13T19:56:25.000Z
2022-03-29T08:53:56.000Z
examples/rename_part.py
zxzion/hycohanz
717f1c84a8a6b555b4327b868aa5968a9a717a74
[ "BSD-2-Clause" ]
2
2016-09-12T14:13:17.000Z
2020-03-23T17:57:30.000Z
examples/rename_part.py
zxzion/hycohanz
717f1c84a8a6b555b4327b868aa5968a9a717a74
[ "BSD-2-Clause" ]
44
2015-01-10T12:43:37.000Z
2022-03-27T14:13:00.000Z
import hycohanz as hfss raw_input('Press "Enter" to connect to HFSS.>') [oAnsoftApp, oDesktop] = hfss.setup_interface() raw_input('Press "Enter" to create a new project.>') oProject = hfss.new_project(oDesktop) raw_input('Press "Enter" to insert a new DrivenModal design named HFSSDesign1.>') oDesign = hfss.insert...
23.340909
112
0.708861
import hycohanz as hfss raw_input('Press "Enter" to connect to HFSS.>') [oAnsoftApp, oDesktop] = hfss.setup_interface() raw_input('Press "Enter" to create a new project.>') oProject = hfss.new_project(oDesktop) raw_input('Press "Enter" to insert a new DrivenModal design named HFSSDesign1.>') oDesign = hfss.insert...
true
true
f72a3134f48e05427d75ca4ce77b2fb29d5b6bdf
12,006
py
Python
api_1.3/containerd/services/leases/v1/leases_pb2_grpc.py
siemens/pycontainerd
9b1184ecbcc91144ad6903403818b5b8989a32f3
[ "Apache-2.0" ]
24
2019-12-16T12:38:51.000Z
2022-02-16T18:44:20.000Z
api_1.5/containerd/services/leases/v1/leases_pb2_grpc.py
siemens/pycontainerd
9b1184ecbcc91144ad6903403818b5b8989a32f3
[ "Apache-2.0" ]
9
2020-03-03T07:42:40.000Z
2021-09-01T10:11:18.000Z
api_1.3/containerd/services/leases/v1/leases_pb2_grpc.py
siemens/pycontainerd
9b1184ecbcc91144ad6903403818b5b8989a32f3
[ "Apache-2.0" ]
10
2019-12-16T11:20:23.000Z
2022-01-24T01:53:13.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from containerd.services.leases.v1 import leases_pb2 as containerd_dot_services_dot_leases_dot_v1_dot_leases__pb2 from google.protobuf import empty_pb2 as google...
48.804878
138
0.693487
import grpc from containerd.services.leases.v1 import leases_pb2 as containerd_dot_services_dot_leases_dot_v1_dot_leases__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class LeasesStub(object): def __init__(self, channel): self.Create = channel.unary_unary( ...
true
true
f72a323e448cb0a9fa157ef9d9d8c7e1cb25daf0
28,211
py
Python
envbuilder.py
lurman/envbulder
01dd05809e0a4558131bd6574186744364a08045
[ "Apache-2.0" ]
null
null
null
envbuilder.py
lurman/envbulder
01dd05809e0a4558131bd6574186744364a08045
[ "Apache-2.0" ]
null
null
null
envbuilder.py
lurman/envbulder
01dd05809e0a4558131bd6574186744364a08045
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import subprocess from snc_config import SncConfig from datetime import datetime, timedelta import argparse from argparse import RawTextHelpFormatter from color_print import ColorPrint from plugins import PluginsLoader import os from multiprocessing import Pool import copy_reg import types from i...
47.096828
157
0.618092
import subprocess from snc_config import SncConfig from datetime import datetime, timedelta import argparse from argparse import RawTextHelpFormatter from color_print import ColorPrint from plugins import PluginsLoader import os from multiprocessing import Pool import copy_reg import types from itertools import repea...
true
true