hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f76820a0cf773e3414b6ba95572b51f88cba36b5
857
py
Python
api/migrations/versions/452a7485f568_add_autograde_enabled_to_assignment.py
Racheltrq/Anubis
20eabe5651cee4ca5dc2f2b9bb531724aad1cf37
[ "MIT" ]
87
2021-11-08T10:58:26.000Z
2022-03-31T19:02:47.000Z
api/migrations/versions/452a7485f568_add_autograde_enabled_to_assignment.py
efaraz27/Anubis
40a12933877df7f39dd75ca26148858774fcda7b
[ "MIT" ]
114
2021-06-27T08:37:43.000Z
2021-10-24T00:51:01.000Z
api/migrations/versions/452a7485f568_add_autograde_enabled_to_assignment.py
efaraz27/Anubis
40a12933877df7f39dd75ca26148858774fcda7b
[ "MIT" ]
15
2021-11-07T17:02:21.000Z
2022-03-28T02:04:16.000Z
"""ADD autograde_enabled to assignment Revision ID: 452a7485f568 Revises: 3d972cfa5be9 Create Date: 2021-04-27 20:45:32.938022 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "452a7485f568" down_revision = "3d972cfa5be9" branch_labels = None depends_on = None ...
25.205882
82
0.683781
import sqlalchemy as sa from alembic import op revision = "452a7485f568" down_revision = "3d972cfa5be9" branch_labels = None depends_on = None def upgrade(): op.add_column( "assignment", sa.Column("autograde_enabled", sa.Boolean(), nullable=True, default=True), ) conn = op.get_bind() ...
true
true
f768218048533e03281b143209bacb92af8118a0
52,179
py
Python
NeoAnalysis_Py2.7/NeoAnalysis/neo/io/nixio.py
Research-lab-KUMS/NeoAnalysis
32b508dfade3069b1ec5cc7664574b8d3f2d5f57
[ "MIT" ]
23
2017-09-04T13:20:38.000Z
2022-03-08T08:15:17.000Z
NeoAnalysis_Py2.7/NeoAnalysis/neo/io/nixio.py
Research-lab-KUMS/NeoAnalysis
32b508dfade3069b1ec5cc7664574b8d3f2d5f57
[ "MIT" ]
4
2018-01-05T13:44:29.000Z
2021-09-30T17:08:15.000Z
NeoAnalysis_Py2.7/NeoAnalysis/neo/io/nixio.py
neoanalysis/NeoAnalysis
c5f25b71e16997f3a05f70b1eead11f99a3b7e2b
[ "MIT" ]
5
2017-11-26T19:40:46.000Z
2021-03-11T17:25:23.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2016, German Neuroinformatics Node (G-Node) # Achilleas Koutsou <achilleas.k@gmail.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the BSD License. See # LICE...
39.559515
79
0.56425
from __future__ import absolute_import import time from datetime import datetime from collections import Iterable import itertools from hashlib import md5 import quantities as pq import numpy as np from ...neo.io.baseio import BaseIO from ...neo.core import (Block, Segment, ChannelIndex, AnalogSignal, ...
true
true
f7682277fe34755b50d583c74dcfbca0e3041096
2,468
py
Python
meta_mb/envs/mb_envs/swimmer.py
iclavera/meta-mb
a1204e573c1415161129403cfb287bf120488fd0
[ "MIT" ]
4
2021-01-07T08:22:51.000Z
2021-12-27T10:53:14.000Z
meta_mb/envs/mb_envs/swimmer.py
iclavera/meta-mb
a1204e573c1415161129403cfb287bf120488fd0
[ "MIT" ]
null
null
null
meta_mb/envs/mb_envs/swimmer.py
iclavera/meta-mb
a1204e573c1415161129403cfb287bf120488fd0
[ "MIT" ]
null
null
null
from __future__ import division from __future__ import print_function from __future__ import absolute_import import os import numpy as np import tensorflow as tf from gym import utils from gym.envs.mujoco import mujoco_env from meta_mb.meta_envs.base import MetaEnv class SwimmerEnv(MetaEnv, mujoco_env.MujocoEnv, ut...
32.051948
90
0.616288
from __future__ import division from __future__ import print_function from __future__ import absolute_import import os import numpy as np import tensorflow as tf from gym import utils from gym.envs.mujoco import mujoco_env from meta_mb.meta_envs.base import MetaEnv class SwimmerEnv(MetaEnv, mujoco_env.MujocoEnv, ut...
true
true
f76823a71405b4a59e6eddd22d0f97cce9d8b237
8,440
py
Python
rlgear/rllib_utils.py
dpendleton22/rlgear
7c9364715f7fb67d00c54460fe44fe2ce2211dd7
[ "BSD-3-Clause" ]
null
null
null
rlgear/rllib_utils.py
dpendleton22/rlgear
7c9364715f7fb67d00c54460fe44fe2ce2211dd7
[ "BSD-3-Clause" ]
null
null
null
rlgear/rllib_utils.py
dpendleton22/rlgear
7c9364715f7fb67d00c54460fe44fe2ce2211dd7
[ "BSD-3-Clause" ]
null
null
null
import argparse import re import os import sys import string import json import random import time from pathlib import Path from typing import Tuple, Any, Iterable, Union, Dict, List import yaml import ray import ray.tune.utils from ray.rllib.evaluation import MultiAgentEpisode from ray.rllib.agents.callbacks import D...
35.914894
139
0.593009
import argparse import re import os import sys import string import json import random import time from pathlib import Path from typing import Tuple, Any, Iterable, Union, Dict, List import yaml import ray import ray.tune.utils from ray.rllib.evaluation import MultiAgentEpisode from ray.rllib.agents.callbacks import D...
true
true
f76823e0a293a8c3b58a35cbbb492e423d4fc045
61,923
py
Python
cadastre/cadastre_import.py
sigmoe/QgisCadastrePlugin
a864951cb1df2401d82981de9c13036090101e33
[ "PostgreSQL" ]
null
null
null
cadastre/cadastre_import.py
sigmoe/QgisCadastrePlugin
a864951cb1df2401d82981de9c13036090101e33
[ "PostgreSQL" ]
null
null
null
cadastre/cadastre_import.py
sigmoe/QgisCadastrePlugin
a864951cb1df2401d82981de9c13036090101e33
[ "PostgreSQL" ]
null
null
null
""" /*************************************************************************** Cadastre - import main methods A QGIS plugin This plugins helps users to import the french land registry ('cadastre') into a database. It is meant to ease the use of the data in QGIs by providing search...
40.027796
547
0.506694
import glob import io import os import re import shutil import sqlite3 as sqlite import sys import tempfile from datetime import datetime from distutils import dir_util from db_manager.db_plugins.plugin import BaseError from db_manager.dlg_db_error import DlgDbError from qgis.core import Qgis, QgsMessageLog from qgis...
true
true
f76824facd2a0b469a83bd90d905edccdcec6539
1,864
py
Python
lib/channels_m3u.py
deathbybandaid/locast2plex
fd77a4c417828006679987abd572da61e305c060
[ "MIT" ]
259
2020-03-25T15:49:02.000Z
2022-03-21T03:39:23.000Z
lib/channels_m3u.py
deathbybandaid/locast2plex
fd77a4c417828006679987abd572da61e305c060
[ "MIT" ]
226
2020-04-13T19:35:06.000Z
2022-03-06T00:21:54.000Z
lib/channels_m3u.py
deathbybandaid/locast2plex
fd77a4c417828006679987abd572da61e305c060
[ "MIT" ]
71
2020-03-25T15:49:06.000Z
2021-09-02T22:57:41.000Z
# from https://github.com/deathbybandaid/fHDHR_Locast/blob/master/fHDHR/fHDHRweb/fHDHRdevice/channels_m3u.py import lib.stations as stations from io import StringIO def get_channels_m3u(config, location, base_url): FORMAT_DESCRIPTOR = "#EXTM3U" RECORD_MARKER = "#EXTINF" fakefile = StringIO() xmltvu...
40.521739
143
0.379292
import lib.stations as stations from io import StringIO def get_channels_m3u(config, location, base_url): FORMAT_DESCRIPTOR = "#EXTM3U" RECORD_MARKER = "#EXTINF" fakefile = StringIO() xmltvurl = ('%s%s/xmltv.xml' % ("http://", base_url)) fakefile.write( "%s\n" % ( ...
true
true
f76825611d0b86226461c6c4bfbbf7b868d7c1c8
2,292
py
Python
test/tool_args.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
3
2017-01-06T09:26:23.000Z
2017-03-04T04:13:20.000Z
test/tool_args.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
2
2015-10-27T20:17:24.000Z
2016-08-04T21:49:56.000Z
test/tool_args.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
4
2015-03-31T16:09:15.000Z
2021-08-04T12:41:47.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
30.972973
73
0.717277
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os.path import sys import time import TestSCons test = TestSCons.TestSCons() test.write('SConstruct', """ # Test passing kw args to Tool constructor env1 = Environment(tools=[Tool('FooTool', toolpath=['.'], kw1='kw1val')]) print "env1['TOOL_FOO']...
true
true
f768265b23bb3b838fd2e21a9414dbd4fb187325
1,455
py
Python
lib/django-1.5/django/conf/project_template/project_name/wsgi.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/django-1.5/django/conf/project_template/project_name/wsgi.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/django-1.5/django/conf/project_template/project_name/wsgi.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
""" WSGI config for {{ project_name }} project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APP...
44.090909
79
0.795189
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") # setting points here. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplicatio...
true
true
f768286f3ac388cfc49144ba2e1cf7692e67f4e2
2,134
py
Python
run_evaluation.py
ai-xiaotong/face-benchmark
4a4a336be6df72699120d6f0a4b7160904375cb0
[ "MIT" ]
1
2020-04-20T02:19:54.000Z
2020-04-20T02:19:54.000Z
run_evaluation.py
ai-xiaotong/face-benchmark
4a4a336be6df72699120d6f0a4b7160904375cb0
[ "MIT" ]
null
null
null
run_evaluation.py
ai-xiaotong/face-benchmark
4a4a336be6df72699120d6f0a4b7160904375cb0
[ "MIT" ]
null
null
null
import os from itertools import islice import numpy as np import argparse import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from helper import roc, find_TAR_and_TH_by_FAR def get_roc(path, start=1., stop=100., step=0.1): batch_size = 1000 scores, gts = [], [] with open(path, 'r') as...
33.873016
86
0.592784
import os from itertools import islice import numpy as np import argparse import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from helper import roc, find_TAR_and_TH_by_FAR def get_roc(path, start=1., stop=100., step=0.1): batch_size = 1000 scores, gts = [], [] with open(path, 'r') as...
true
true
f76828f3c13ba8b7984a48310cca90b6c4607fdb
3,370
py
Python
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_master.py
JonZeolla/incubator-metron
1252573eab087e87fb2938f8651c5b0b393aca9e
[ "Apache-2.0" ]
631
2017-05-15T19:43:18.000Z
2022-02-04T12:46:53.000Z
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_master.py
JonZeolla/incubator-metron
1252573eab087e87fb2938f8651c5b0b393aca9e
[ "Apache-2.0" ]
975
2017-05-12T21:00:19.000Z
2021-02-25T15:09:45.000Z
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_master.py
JonZeolla/incubator-metron
1252573eab087e87fb2938f8651c5b0b393aca9e
[ "Apache-2.0" ]
396
2017-05-15T03:05:46.000Z
2022-03-30T08:35:32.000Z
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
34.742268
85
0.71365
import metron_service from metron_security import storm_security_setup from parser_commands import ParserCommands from resource_management.core.exceptions import ComponentIsNotRunning from resource_management.core.logger import Logger from resource_management.libraries.script import Script class ParserMaster(Script)...
true
true
f7682a4361c937f4a5b3c3dba62a61aa9b26a8c8
4,677
py
Python
venv/lib/python3.8/site-packages/pyqtgraph/graphicsItems/CurvePoint.py
willBear/willBear-Fundamental_Analysis
bc67eb1e69dcf6765c0b77314d37f7f165a7318f
[ "MIT" ]
150
2018-03-27T16:45:37.000Z
2022-03-30T03:47:56.000Z
venv/lib/python3.8/site-packages/pyqtgraph/graphicsItems/CurvePoint.py
willBear/willBear-Fundamental_Analysis
bc67eb1e69dcf6765c0b77314d37f7f165a7318f
[ "MIT" ]
172
2019-12-03T07:56:02.000Z
2022-03-25T15:46:45.000Z
venv/lib/python3.8/site-packages/pyqtgraph/graphicsItems/CurvePoint.py
willBear/willBear-Fundamental_Analysis
bc67eb1e69dcf6765c0b77314d37f7f165a7318f
[ "MIT" ]
40
2018-04-06T19:42:21.000Z
2022-01-11T00:34:17.000Z
from ..Qt import QtGui, QtCore from . import ArrowItem import numpy as np from ..Point import Point import weakref from .GraphicsObject import GraphicsObject __all__ = ['CurvePoint', 'CurveArrow'] class CurvePoint(GraphicsObject): """A GraphicsItem that sets its location to a point on a PlotCurveItem. Also rot...
38.02439
115
0.583708
from ..Qt import QtGui, QtCore from . import ArrowItem import numpy as np from ..Point import Point import weakref from .GraphicsObject import GraphicsObject __all__ = ['CurvePoint', 'CurveArrow'] class CurvePoint(GraphicsObject): def __init__(self, curve, index=0, pos=None, rotate=True): Gra...
true
true
f7682a965c038a0f9ec4e52d05c429f8e7d37535
28,252
py
Python
pandas/tests/indexes/datetimes/test_construction.py
toddharryreeb/pandas
6f7ca38be192159afb5d899f41552a5181aa2794
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/indexes/datetimes/test_construction.py
toddharryreeb/pandas
6f7ca38be192159afb5d899f41552a5181aa2794
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/indexes/datetimes/test_construction.py
toddharryreeb/pandas
6f7ca38be192159afb5d899f41552a5181aa2794
[ "BSD-3-Clause" ]
null
null
null
from datetime import timedelta from operator import attrgetter from functools import partial import pytest import pytz import numpy as np import pandas as pd from pandas import offsets import pandas.util.testing as tm from pandas._libs.tslib import OutOfBoundsDatetime from pandas._libs.tslibs import conversion from p...
44.074883
79
0.552952
from datetime import timedelta from operator import attrgetter from functools import partial import pytest import pytz import numpy as np import pandas as pd from pandas import offsets import pandas.util.testing as tm from pandas._libs.tslib import OutOfBoundsDatetime from pandas._libs.tslibs import conversion from p...
true
true
f7682b4c63a997f5f74b79056666b93d448ba6b7
100
py
Python
core-python/Core_Python/loop/PassLableDemo.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
9
2020-04-23T05:24:19.000Z
2022-02-17T16:37:51.000Z
core-python/Core_Python/loop/PassLableDemo.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
5
2020-10-01T05:08:37.000Z
2020-10-12T03:18:10.000Z
core-python/Core_Python/loop/PassLableDemo.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
9
2020-04-28T14:06:41.000Z
2021-10-19T18:32:28.000Z
for i in range(1,101) : if(i % 2 != 0): pass else: print(i,"is even number")
20
33
0.46
for i in range(1,101) : if(i % 2 != 0): pass else: print(i,"is even number")
true
true
f7682cd7162b339fa6739802050e1bf00a9ba144
502
py
Python
restart/DataStructure/VariableDict.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
restart/DataStructure/VariableDict.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
restart/DataStructure/VariableDict.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
import pprint class VariableDict(dict): def __init__(self): super(VariableDict, self).__init__() def __setitem__(self, key, value): # print("你赋值了一个屑变量 %s=%s"%(key,value)) self.__dict__[key]=value def __getitem__(self, item): if item not in self.__dict__: raise...
23.904762
46
0.623506
import pprint class VariableDict(dict): def __init__(self): super(VariableDict, self).__init__() def __setitem__(self, key, value): self.__dict__[key]=value def __getitem__(self, item): if item not in self.__dict__: raise KeyError("不存在的屑变量%s"%item) ret...
true
true
f7682d2ed2d39382b32f7ada72979ff1eea7d192
1,680
py
Python
tests/test_indicator_market_facilitation_index.py
Bill-Software-Engineer/trading-technical-indicators
fc00008a41da54f160609343e866c72306f4962c
[ "MIT" ]
68
2020-08-15T17:57:47.000Z
2022-03-09T21:44:45.000Z
tests/test_indicator_market_facilitation_index.py
opiddubnyi/trading-technical-indicators
f7d3478c054595106afe34f08483218afe9c4ba1
[ "MIT" ]
40
2020-01-26T11:35:10.000Z
2021-02-14T19:26:42.000Z
tests/test_indicator_market_facilitation_index.py
opiddubnyi/trading-technical-indicators
f7d3478c054595106afe34f08483218afe9c4ba1
[ "MIT" ]
24
2020-01-28T18:12:50.000Z
2022-03-16T18:54:10.000Z
""" Trading-Technical-Indicators (tti) python library File name: test_indicator_market_facilitation_index.py tti.indicators package, _market_facilitation_index.py module unit tests. """ import unittest import tti.indicators from test_indicators_common import TestIndicatorsCommon import pandas as pd import re c...
26.25
78
0.693452
import unittest import tti.indicators from test_indicators_common import TestIndicatorsCommon import pandas as pd import re class TestMarketFacilitationIndex(unittest.TestCase, TestIndicatorsCommon): precision = 10 indicator = tti.indicators.MarketFacilitationIndex ti_data_rows = [0, 1, 2] df = ...
true
true
f7682dc3163560be5e4aa0a557cd9dc814e8fc89
3,954
py
Python
jarviscli/plugins/file_organise.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
1
2019-10-03T13:39:19.000Z
2019-10-03T13:39:19.000Z
jarviscli/plugins/file_organise.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
null
null
null
jarviscli/plugins/file_organise.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
null
null
null
from __future__ import print_function from colorama import Fore import os import sys from six.moves import input from plugin import plugin @plugin('file organise') class File_Organise(): """ Type file_organise and follow instructions It organises selected folder based on extension """ def __call__...
33.226891
92
0.549064
from __future__ import print_function from colorama import Fore import os import sys from six.moves import input from plugin import plugin @plugin('file organise') class File_Organise(): def __call__(self, jarvis, s): self.file_manage(jarvis) def source_path(self, dir_name): all_paths = [] ...
true
true
f7682de93f6b7019b6512bb1401d50baad05bdfd
1,056
py
Python
tests/torch_tests/functional/test_torch_inference.py
Deeplite/deeplite-profiler
2b21c0dc5948606c47377f786b605baf4fa31bee
[ "Apache-2.0" ]
17
2021-04-13T06:09:52.000Z
2021-11-24T06:39:41.000Z
tests/torch_tests/functional/test_torch_inference.py
Deeplite/deeplite-profiler
2b21c0dc5948606c47377f786b605baf4fa31bee
[ "Apache-2.0" ]
14
2021-04-14T13:46:42.000Z
2021-12-20T21:10:25.000Z
tests/torch_tests/functional/test_torch_inference.py
Deeplite/deeplite-profiler
2b21c0dc5948606c47377f786b605baf4fa31bee
[ "Apache-2.0" ]
7
2021-04-09T16:47:56.000Z
2022-03-05T11:04:30.000Z
import pytest from tests.torch_tests.functional import BaseFunctionalTest, TORCH_AVAILABLE, MODEL, DATA from unittest import mock class TestTorchInference(BaseFunctionalTest): def test_get_acc(self): from deeplite.torch_profiler.torch_inference import get_accuracy assert get_accuracy(MODEL, DATA['t...
37.714286
89
0.704545
import pytest from tests.torch_tests.functional import BaseFunctionalTest, TORCH_AVAILABLE, MODEL, DATA from unittest import mock class TestTorchInference(BaseFunctionalTest): def test_get_acc(self): from deeplite.torch_profiler.torch_inference import get_accuracy assert get_accuracy(MODEL, DATA['t...
true
true
f7682e0199adcf5bef79f0edb3a8f9c0f9bf1154
580
py
Python
lda2vec/__init__.py
ranjeetkgupta/lda2vec_absa
a00564ecff8a94ff40a55f3d3efcb22b979b7daf
[ "MIT" ]
2
2018-07-06T15:57:31.000Z
2018-11-14T04:55:09.000Z
lda2vec/__init__.py
hailusong/lda2vec
5ec203fc6d020f6647d34aa3fdc631f4994baf5d
[ "MIT" ]
null
null
null
lda2vec/__init__.py
hailusong/lda2vec
5ec203fc6d020f6647d34aa3fdc631f4994baf5d
[ "MIT" ]
1
2018-07-04T03:11:07.000Z
2018-07-04T03:11:07.000Z
import lda2vec.dirichlet_likelihood import lda2vec.embed_mixture import lda2vec.tracking import lda2vec.preprocess import lda2vec.corpus import lda2vec.topics import lda2vec.negative_sampling dirichlet_likelihood = dirichlet_likelihood.dirichlet_likelihood EmbedMixture = embed_mixture.EmbedMixture Tracking = tracking....
32.222222
64
0.884483
import lda2vec.dirichlet_likelihood import lda2vec.embed_mixture import lda2vec.tracking import lda2vec.preprocess import lda2vec.corpus import lda2vec.topics import lda2vec.negative_sampling dirichlet_likelihood = dirichlet_likelihood.dirichlet_likelihood EmbedMixture = embed_mixture.EmbedMixture Tracking = tracking....
true
true
f7682e1b99e8bd05f93525926e56d8e6aee71c0f
4,375
py
Python
main.py
tbenyon/streamed
2c0d4f756fa8e0a492605419ba49c4f4b9bc1091
[ "MIT" ]
null
null
null
main.py
tbenyon/streamed
2c0d4f756fa8e0a492605419ba49c4f4b9bc1091
[ "MIT" ]
null
null
null
main.py
tbenyon/streamed
2c0d4f756fa8e0a492605419ba49c4f4b9bc1091
[ "MIT" ]
null
null
null
import pickle films = [ { "id": 0, "name": "Seven", "genre": "thriller", "lead_actor": "Lucy", }, { "id": 1, "name": "Matrix", "genre": "action", "lead_actor": "Barry", }, { "id": 2, "name": "Alien", "genre": "t...
24.857955
79
0.492114
import pickle films = [ { "id": 0, "name": "Seven", "genre": "thriller", "lead_actor": "Lucy", }, { "id": 1, "name": "Matrix", "genre": "action", "lead_actor": "Barry", }, { "id": 2, "name": "Alien", "genre": "t...
true
true
f7682e93613531f39531492b7dd8139520568718
2,394
py
Python
tests/unittests/test_commands.py
bossjones/scarlett-os
dc3b96604220a5848c51a14a343e97d464ad811b
[ "Apache-2.0" ]
5
2016-11-08T21:01:00.000Z
2018-05-07T11:02:43.000Z
tests/unittests/test_commands.py
bossjones/scarlett-os
dc3b96604220a5848c51a14a343e97d464ad811b
[ "Apache-2.0" ]
854
2016-09-21T13:06:32.000Z
2022-02-10T13:21:47.000Z
tests/unittests/test_commands.py
bossjones/scarlett-os
dc3b96604220a5848c51a14a343e97d464ad811b
[ "Apache-2.0" ]
2
2016-12-02T15:12:41.000Z
2017-02-25T08:21:56.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_commands ---------------------------------- """ import datetime import imp import os import sys import unittest import unittest.mock as mock from freezegun import freeze_time import pytest import scarlett_os from scarlett_os import commands # from scarlett_os...
29.195122
104
0.642022
import datetime import imp import os import sys import unittest import unittest.mock as mock from freezegun import freeze_time import pytest import scarlett_os from scarlett_os import commands @pytest.fixture(scope="function") def commands_unit_mocker_stopall(mocker): print("Called [setup]: mocker.stopall()...
true
true
f76831479aa81a085328789a3b0939f54941a00c
1,580
py
Python
bot.py
AlDival/Al-Divals-bot
ca3b6e663b3c7496ddf8fbbee288afdbbd246e94
[ "MIT" ]
null
null
null
bot.py
AlDival/Al-Divals-bot
ca3b6e663b3c7496ddf8fbbee288afdbbd246e94
[ "MIT" ]
null
null
null
bot.py
AlDival/Al-Divals-bot
ca3b6e663b3c7496ddf8fbbee288afdbbd246e94
[ "MIT" ]
null
null
null
import random import asyncio import time import os import sys import discord import requests from lxml import html client = discord.Client() @client.event async def on_message(message): if message.content.lower() == '!test': await client.send_message(message.channel, 'hello, ' + message.author.mention) ...
32.244898
284
0.655063
import random import asyncio import time import os import sys import discord import requests from lxml import html client = discord.Client() @client.event async def on_message(message): if message.content.lower() == '!test': await client.send_message(message.channel, 'hello, ' + message.author.mention) ...
false
true
f76831a693fcbad52cc336caea3449534553442a
989
py
Python
gas01/venv/Scripts/futurize-script.py
rafaels549/Sistema-de-gerenciamento-de-uma-loja-de-gas
89ce9114545f16ac9aa66851a04933b47ac38ae8
[ "MIT" ]
null
null
null
gas01/venv/Scripts/futurize-script.py
rafaels549/Sistema-de-gerenciamento-de-uma-loja-de-gas
89ce9114545f16ac9aa66851a04933b47ac38ae8
[ "MIT" ]
null
null
null
gas01/venv/Scripts/futurize-script.py
rafaels549/Sistema-de-gerenciamento-de-uma-loja-de-gas
89ce9114545f16ac9aa66851a04933b47ac38ae8
[ "MIT" ]
null
null
null
#!c:\users\pichau\gas01\venv\scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'future==0.18.2','console_scripts','futurize' import re import sys # for compatibility with easy_install; see #2198 __requires__ = 'future==0.18.2' try: from importlib.metadata import distribution except ImportError: try: fro...
29.088235
81
0.701719
import re import sys __requires__ = 'future==0.18.2' try: from importlib.metadata import distribution except ImportError: try: from importlib_metadata import distribution except ImportError: from pkg_resources import load_entry_point def importlib_load_entry_point(spec, group, name): ...
true
true
f76831ed22d0e2d3d43f0d585707a2d57fed4759
5,851
py
Python
.build/jit.py
shiplift/RSqueakOnABoat
ac449758ddb7aef1721e65a13171547761dd6e39
[ "BSD-3-Clause" ]
44
2015-02-08T09:38:46.000Z
2017-11-15T01:19:40.000Z
.build/jit.py
shiplift/RSqueakOnABoat
ac449758ddb7aef1721e65a13171547761dd6e39
[ "BSD-3-Clause" ]
112
2015-02-08T09:34:40.000Z
2017-04-10T19:06:30.000Z
.build/jit.py
shiplift/RSqueakOnABoat
ac449758ddb7aef1721e65a13171547761dd6e39
[ "BSD-3-Clause" ]
7
2015-04-08T11:49:10.000Z
2017-01-19T06:36:27.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # view jit. # import sys, os import environment try: import pygame except ImportError: print "You need PyGame installed" exit(1) if os.system("dot -V") != 0: print "You need the dot binary (from Graphviz) installed and in the PATH" exit(1) from rpyth...
36.117284
115
0.690138
import sys, os import environment try: import pygame except ImportError: print "You need PyGame installed" exit(1) if os.system("dot -V") != 0: print "You need the dot binary (from Graphviz) installed and in the PATH" exit(1) from rpython import conftest class o: view = False viewloops = T...
false
true
f76831fd6ba2b80a0f51f598542e3fac31495c77
19,834
py
Python
tests/test_mysql.py
novafacing/alembic
29ff74c2678ab73f6c5a646477c840f5cdded234
[ "MIT" ]
1
2021-03-08T08:40:18.000Z
2021-03-08T08:40:18.000Z
tests/test_mysql.py
novafacing/alembic
29ff74c2678ab73f6c5a646477c840f5cdded234
[ "MIT" ]
null
null
null
tests/test_mysql.py
novafacing/alembic
29ff74c2678ab73f6c5a646477c840f5cdded234
[ "MIT" ]
null
null
null
from sqlalchemy import Boolean from sqlalchemy import Column from sqlalchemy import DATETIME from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import Table from sqlalchemy import text from sqlalchemy import TIMESTAMP from sqlalchemy.engine.reflection import Inspe...
33.167224
79
0.608148
from sqlalchemy import Boolean from sqlalchemy import Column from sqlalchemy import DATETIME from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import Table from sqlalchemy import text from sqlalchemy import TIMESTAMP from sqlalchemy.engine.reflection import Inspe...
true
true
f76832c310db092f2cd7f47b82a3bc41fd846f87
104
py
Python
ibmpairs/__init__.py
Bhaskers-Blu-Org1/ibmpairs
c90a77017bb6f43a8d936bfde4aff5357f8e9a78
[ "BSD-3-Clause" ]
24
2019-06-21T13:58:25.000Z
2022-03-04T13:53:37.000Z
ibmpairs/__init__.py
Bhaskers-Blu-Org1/ibmpairs
c90a77017bb6f43a8d936bfde4aff5357f8e9a78
[ "BSD-3-Clause" ]
10
2019-06-09T17:17:20.000Z
2021-02-22T18:12:15.000Z
ibmpairs/__init__.py
IBM/ibmpairs
0da684f1ddab7682578b9f93e69370d248171902
[ "BSD-3-Clause" ]
18
2019-06-06T21:03:22.000Z
2021-12-08T13:01:53.000Z
# try to get PyPI package version try: from .version import version as __version__ except: pass
17.333333
47
0.730769
try: from .version import version as __version__ except: pass
true
true
f76832e2faf6e47cc9ab10da9ab2a0d48dc61b89
9,970
py
Python
spinup_utils/plot.py
red-tie/DRLib
42398bd696b7cedc8f207385f8eac4e264bd9c4e
[ "MIT" ]
null
null
null
spinup_utils/plot.py
red-tie/DRLib
42398bd696b7cedc8f207385f8eac4e264bd9c4e
[ "MIT" ]
null
null
null
spinup_utils/plot.py
red-tie/DRLib
42398bd696b7cedc8f207385f8eac4e264bd9c4e
[ "MIT" ]
null
null
null
import seaborn as sns import pandas as pd import matplotlib.pyplot as plt import json import os import os.path as osp import numpy as np DIV_LINE_WIDTH = 50 # Global vars for tracking and labeling data at load time. exp_idx = 0 units = dict() def plot_data(data, xaxis='Epoch', value="TestEpRet", condi...
40.040161
103
0.620762
import seaborn as sns import pandas as pd import matplotlib.pyplot as plt import json import os import os.path as osp import numpy as np DIV_LINE_WIDTH = 50 exp_idx = 0 units = dict() def plot_data(data, xaxis='Epoch', value="TestEpRet", condition="Condition1", smooth=1, **kwargs): if smooth > 1: ...
true
true
f7683326b540ee4ab7e0fe89d5666a85cc273732
14,699
py
Python
processor/processor/workflow/state.py
DavidJFaulkenberry/sawtooth-healthcare
3204d66526209a309dff616f7e5754782fe61efb
[ "Apache-2.0" ]
20
2019-01-31T07:20:59.000Z
2022-02-26T15:58:55.000Z
processor/processor/workflow/state.py
LonieN/sawtooth-healthcare
ea44e5eb6fe22e35c2061ed9248603cf36a47bde
[ "Apache-2.0" ]
2
2019-10-09T17:02:01.000Z
2019-11-20T16:26:42.000Z
processor/processor/workflow/state.py
LonieN/sawtooth-healthcare
ea44e5eb6fe22e35c2061ed9248603cf36a47bde
[ "Apache-2.0" ]
15
2019-01-03T17:17:03.000Z
2022-03-31T13:13:44.000Z
from processor.common import helper from processor.common.protobuf import payload_pb2 import logging # from processor.common.protobuf.payload_pb2 import Claim logging.basicConfig(level=logging.DEBUG) LOGGER = logging.getLogger(__name__) class HealthCareState(object): TIMEOUT = 3 def __init__(self, context)...
36.932161
112
0.628274
from processor.common import helper from processor.common.protobuf import payload_pb2 import logging logging.basicConfig(level=logging.DEBUG) LOGGER = logging.getLogger(__name__) class HealthCareState(object): TIMEOUT = 3 def __init__(self, context): self._context = context def create_clinic(...
true
true
f7683401a543a919683432ce082945f139ac6194
2,535
py
Python
flink-python/pyflink/table/tests/test_table_completeness.py
huyuanfeng2018/flink
b3a9dcbd65719c742fe4907ec17de396b188d378
[ "Apache-2.0" ]
9
2016-09-22T22:53:13.000Z
2019-11-30T03:07:29.000Z
flink-python/pyflink/table/tests/test_table_completeness.py
huyuanfeng2018/flink
b3a9dcbd65719c742fe4907ec17de396b188d378
[ "Apache-2.0" ]
1
2022-01-21T03:09:58.000Z
2022-01-21T03:09:58.000Z
flink-python/pyflink/table/tests/test_table_completeness.py
huyuanfeng2018/flink
b3a9dcbd65719c742fe4907ec17de396b188d378
[ "Apache-2.0" ]
1
2022-03-25T07:25:23.000Z
2022-03-25T07:25:23.000Z
################################################################################ # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this...
37.835821
94
0.666667
from pyflink.testing.test_case_utils import PythonAPICompletenessTestCase, PyFlinkTestCase from pyflink.table import Table class TableAPICompletenessTests(PythonAPICompletenessTestCase, PyFlinkTestCase): @classmethod def python_class(cls): return Table @classmethod def java_class(cls): ...
true
true
f76834ad4fdb2c3f85409de3e6a2f810950825bf
373
py
Python
common/SecurityBase.py
cogitate3/stock
bba986cbbb17de9f424c3b5417a17d1bb1204403
[ "BSD-3-Clause" ]
3,401
2016-05-20T02:49:18.000Z
2022-03-31T07:02:05.000Z
common/SecurityBase.py
sulongniao/stock
bba986cbbb17de9f424c3b5417a17d1bb1204403
[ "BSD-3-Clause" ]
23
2017-06-09T14:18:57.000Z
2022-01-07T10:38:57.000Z
common/SecurityBase.py
sulongniao/stock
bba986cbbb17de9f424c3b5417a17d1bb1204403
[ "BSD-3-Clause" ]
947
2016-08-23T14:51:46.000Z
2022-03-31T07:02:10.000Z
# -*- coding: utf-8 -*- # @Time : 2020/11/26 15:14 # @File : SecurityBase.py # @Author : Rocky C@www.30daydo.com import re class StockBase: def __init__(self): pass def valid_code(self,code): pattern = re.search('(\d{6})', code) if pattern: code = pattern.group(1) ...
17.761905
45
0.536193
import re class StockBase: def __init__(self): pass def valid_code(self,code): pattern = re.search('(\d{6})', code) if pattern: code = pattern.group(1) else: code = None return code
true
true
f76834f9910e811decbf07b7847efa59a5b7c492
2,864
py
Python
python_matlab_comparison/st_distance.py
achilleas-k/brian-scripts
4d2d8c9a53e7202b60c78716e8b1a9d521293c54
[ "Apache-2.0" ]
null
null
null
python_matlab_comparison/st_distance.py
achilleas-k/brian-scripts
4d2d8c9a53e7202b60c78716e8b1a9d521293c54
[ "Apache-2.0" ]
null
null
null
python_matlab_comparison/st_distance.py
achilleas-k/brian-scripts
4d2d8c9a53e7202b60c78716e8b1a9d521293c54
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import os import sys import subprocess as subp import numpy as np import scipy.io as scio import spike_distance as sd import spike_distance_mp as sdm import metrics def octave_spkd(st_one, st_two, cost): """ Creates an octave `m` file to run the spike train distance scri...
35.8
83
0.643156
from __future__ import print_function import os import sys import subprocess as subp import numpy as np import scipy.io as scio import spike_distance as sd import spike_distance_mp as sdm import metrics def octave_spkd(st_one, st_two, cost): octave_filename = "run_spkd.m" octave_code = ( "% Automatic...
true
true
f768351aa46a86062d583f5b9a7af199c30da68d
19,493
py
Python
xmlschema/validators/models.py
YVautrin/xmlschema
c0363bc56b1371ba4904ad5aeb1c3c3dee227350
[ "MIT" ]
95
2016-12-27T09:53:09.000Z
2019-06-17T07:32:06.000Z
xmlschema/validators/models.py
YVautrin/xmlschema
c0363bc56b1371ba4904ad5aeb1c3c3dee227350
[ "MIT" ]
114
2017-04-17T17:16:41.000Z
2019-06-30T12:13:17.000Z
xmlschema/validators/models.py
YVautrin/xmlschema
c0363bc56b1371ba4904ad5aeb1c3c3dee227350
[ "MIT" ]
26
2017-03-25T21:30:58.000Z
2019-06-17T10:24:13.000Z
# # Copyright (c), 2016-2020, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
42.010776
100
0.572359
from collections import defaultdict, deque from typing import Any, Counter, Dict, Iterable, Iterator, List, Optional, Tuple, Union from ..exceptions import XMLSchemaValueError from ..aliases import ModelGroupType, ModelParticleType, SchemaElementType from . import groups AdvanceYieldedType = Tuple[ModelParticleType, ...
true
true
f7683580bdb440f1dd1033c5cb9dfe2f6d200102
2,668
py
Python
carla_ros_bridge/src/carla_ros_bridge/object_sensor.py
BloodWorkXGaming/ros-bridge
636b10d60dd70b62f11f6685f71f8ecc47892263
[ "MIT" ]
2
2021-04-20T17:19:47.000Z
2021-04-20T18:37:01.000Z
carla_ros_bridge/src/carla_ros_bridge/object_sensor.py
BloodWorkXGaming/ros-bridge
636b10d60dd70b62f11f6685f71f8ecc47892263
[ "MIT" ]
null
null
null
carla_ros_bridge/src/carla_ros_bridge/object_sensor.py
BloodWorkXGaming/ros-bridge
636b10d60dd70b62f11f6685f71f8ecc47892263
[ "MIT" ]
1
2021-04-20T16:26:12.000Z
2021-04-20T16:26:12.000Z
#!/usr/bin/env python # # Copyright (c) 2019 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. # """ handle a object sensor """ import rospy from derived_object_msgs.msg import ObjectArray from carla_ros_bridge.vehicle import Vehic...
31.761905
79
0.585082
import rospy from derived_object_msgs.msg import ObjectArray from carla_ros_bridge.vehicle import Vehicle from carla_ros_bridge.walker import Walker from carla_ros_bridge.pseudo_actor import PseudoActor class ObjectSensor(PseudoActor): def __init__(self, uid, name, parent, node, actor_list): super(Ob...
true
true
f768364db02fcbfc99a4bafe88256c2e78cc96b7
1,708
py
Python
drb/commands/genspec.py
vinted/docker-rpm-builder
2af4d70f3c4da6589ab46e7d5fed46bcd5e5b21e
[ "Apache-2.0" ]
355
2015-01-09T01:53:29.000Z
2019-02-28T17:50:45.000Z
drb/commands/genspec.py
vinted/docker-rpm-builder
2af4d70f3c4da6589ab46e7d5fed46bcd5e5b21e
[ "Apache-2.0" ]
54
2015-02-06T17:16:56.000Z
2019-04-02T16:25:59.000Z
drb/commands/genspec.py
vinted/docker-rpm-builder
2af4d70f3c4da6589ab46e7d5fed46bcd5e5b21e
[ "Apache-2.0" ]
59
2015-02-06T18:50:58.000Z
2019-03-05T08:42:39.000Z
from __future__ import unicode_literals import os from filecmp import cmp import glob import shutil import logging import click from drb.configure_logging import configure_root_logger from drb.docker import Docker from drb.spectemplate import SpecTemplate from drb.path import getpath from drb.downloadsources import ...
28.949153
105
0.787471
from __future__ import unicode_literals import os from filecmp import cmp import glob import shutil import logging import click from drb.configure_logging import configure_root_logger from drb.docker import Docker from drb.spectemplate import SpecTemplate from drb.path import getpath from drb.downloadsources import ...
true
true
f76836ea66b59bb16f2d3792451bcf28ecb2fb44
8,428
py
Python
tools/wptrunner/wptrunner/environment.py
iBicha/wpt
6d82a3b1c7c79608aa8045666922c79accf917f6
[ "BSD-3-Clause" ]
null
null
null
tools/wptrunner/wptrunner/environment.py
iBicha/wpt
6d82a3b1c7c79608aa8045666922c79accf917f6
[ "BSD-3-Clause" ]
null
null
null
tools/wptrunner/wptrunner/environment.py
iBicha/wpt
6d82a3b1c7c79608aa8045666922c79accf917f6
[ "BSD-3-Clause" ]
1
2020-05-21T17:05:45.000Z
2020-05-21T17:05:45.000Z
import json import os import multiprocessing import signal import socket import sys import time from six import iteritems from mozlog import get_default_logger, handlers, proxy from .wptlogging import LogLevelRewriter here = os.path.split(__file__)[0] repo_root = os.path.abspath(os.path.join(here, os.pardir, os.pard...
33.444444
101
0.605719
import json import os import multiprocessing import signal import socket import sys import time from six import iteritems from mozlog import get_default_logger, handlers, proxy from .wptlogging import LogLevelRewriter here = os.path.split(__file__)[0] repo_root = os.path.abspath(os.path.join(here, os.pardir, os.pard...
true
true
f768388664554a69592ea2bb7b4b86fc648b9767
31,700
py
Python
code/train.py
dheeraj7596/MixText-LongTail
929bee28bd4536cb475efff0dffad7b3cb2d2ac1
[ "MIT" ]
null
null
null
code/train.py
dheeraj7596/MixText-LongTail
929bee28bd4536cb475efff0dffad7b3cb2d2ac1
[ "MIT" ]
null
null
null
code/train.py
dheeraj7596/MixText-LongTail
929bee28bd4536cb475efff0dffad7b3cb2d2ac1
[ "MIT" ]
null
null
null
import argparse import os import random import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data as Data from transformers_dir import * from torch.autograd import Variable from torch.utils.data import Dataset, WeightedRandomSampler from read_data import...
38.80049
205
0.581798
import argparse import os import random import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data as Data from transformers_dir import * from torch.autograd import Variable from torch.utils.data import Dataset, WeightedRandomSampler from read_data import...
true
true
f768391c76f103a807ff72434b03c350a2833765
2,166
py
Python
catalyst/examples/__init__.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
catalyst/examples/__init__.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
catalyst/examples/__init__.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
from importlib import import_module import os from toolz import merge from catalyst import run_algorithm # These are used by test_examples.py to discover the examples to run. from catalyst.utils.calendars import register_calendar, get_calendar EXAMPLE_MODULES = {} for f in os.listdir(os.path.dirname(__...
26.096386
74
0.637581
from importlib import import_module import os from toolz import merge from catalyst import run_algorithm from catalyst.utils.calendars import register_calendar, get_calendar EXAMPLE_MODULES = {} for f in os.listdir(os.path.dirname(__file__)): if not f.endswith('.py') or f == '__init__.py': ...
true
true
f76839c445454a5d0c682bb837481e838b7a2d3c
2,996
py
Python
paper/alds/script/load_networks.py
lucaslie/torchprune
2e590693a5b1d737da5fa6c379992e8b22c7ba31
[ "MIT" ]
74
2021-03-05T01:25:00.000Z
2022-03-26T06:15:32.000Z
paper/alds/script/load_networks.py
lucaslie/torchprune
2e590693a5b1d737da5fa6c379992e8b22c7ba31
[ "MIT" ]
4
2021-05-25T06:01:22.000Z
2022-01-24T22:38:09.000Z
paper/alds/script/load_networks.py
lucaslie/torchprune
2e590693a5b1d737da5fa6c379992e8b22c7ba31
[ "MIT" ]
7
2021-03-24T14:14:32.000Z
2022-02-19T17:27:56.000Z
# %% from __future__ import print_function # make sure the setup is correct everywhere import os import sys # change working directory to src from IPython import get_ipython import experiment from experiment.util.file import get_parameters # make sure it's using only GPU here... os.environ["CUDA_VISIBLE_DEVICES"] =...
28.533333
73
0.715287
from __future__ import print_function import os import sys from IPython import get_ipython import experiment from experiment.util.file import get_parameters os.environ["CUDA_VISIBLE_DEVICES"] = "0" # noqa # switch to root folder for data folder = os.path.abspath("") if "paper/alds/script" in folder: src_folde...
true
true
f7683a28a6ea5ea639cf3c1817f9fcbcb3b3ed38
5,901
py
Python
test/test_share_tree.py
gridengine/config-api
694f9667bb6569170356336283a18351456e8b82
[ "Apache-2.0" ]
6
2017-01-18T00:11:19.000Z
2022-02-10T08:18:00.000Z
test/test_share_tree.py
gridengine/config-api
694f9667bb6569170356336283a18351456e8b82
[ "Apache-2.0" ]
3
2017-05-11T13:54:42.000Z
2020-08-12T06:15:43.000Z
test/test_share_tree.py
gridengine/config-api
694f9667bb6569170356336283a18351456e8b82
[ "Apache-2.0" ]
4
2017-05-11T13:27:33.000Z
2019-10-29T02:02:24.000Z
#!/usr/bin/env python # # ___INFO__MARK_BEGIN__ ####################################################################################### # Copyright 2016-2021 Univa Corporation (acquired and owned by Altair Engineering Inc.) # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file ...
34.109827
87
0.624301
import types import random from .utils import needs_uge from .utils import generate_random_string from .utils import create_config_file from uge.exceptions.object_not_found import ObjectNotFound from uge.api.qconf_api import QconfApi create_config_file() API = QconfApi() ORIGINAL_STREE = None PRJ1_NAME = 'prj%s' % ge...
true
true
f7683a716c9500f18e7b1c69bbdd4867bcb3630b
891
py
Python
setup.py
Python3pkg/Speech-Hacker
fa95e2a50bbac6ffdd9bb6043e21446578a25628
[ "Apache-2.0" ]
null
null
null
setup.py
Python3pkg/Speech-Hacker
fa95e2a50bbac6ffdd9bb6043e21446578a25628
[ "Apache-2.0" ]
null
null
null
setup.py
Python3pkg/Speech-Hacker
fa95e2a50bbac6ffdd9bb6043e21446578a25628
[ "Apache-2.0" ]
null
null
null
from setuptools import setup with open("README.rst", "rb") as f: long_description = f.read() setup( name='Speech-Hacker', packages=['Speech-Hacker'], version='2.3', scripts=['Speech-Hacker/Speech-Hacker','Speech-Hacker/generator.py', 'Speech-Hacker/trainer.py'], description="Makes...
37.125
74
0.6633
from setuptools import setup with open("README.rst", "rb") as f: long_description = f.read() setup( name='Speech-Hacker', packages=['Speech-Hacker'], version='2.3', scripts=['Speech-Hacker/Speech-Hacker','Speech-Hacker/generator.py', 'Speech-Hacker/trainer.py'], description="Makes...
true
true
f7683bbd0031d3d7b5145ef7b29f7be690b0d4cf
303
py
Python
safe_relay_service/relay/validators.py
vaporyorg/safe-relay-service
1289c3d31639f83aa2c0110ff3b84a69212b81f5
[ "MIT" ]
2
2020-10-19T09:59:11.000Z
2021-02-04T12:26:12.000Z
safe_relay_service/relay/validators.py
vaporyorg/safe-relay-service
1289c3d31639f83aa2c0110ff3b84a69212b81f5
[ "MIT" ]
24
2019-12-11T14:43:38.000Z
2022-03-01T12:37:24.000Z
safe_relay_service/relay/validators.py
vaporyorg/safe-relay-service
1289c3d31639f83aa2c0110ff3b84a69212b81f5
[ "MIT" ]
null
null
null
from django.core.exceptions import ValidationError from web3 import Web3 def validate_checksumed_address(address): if not Web3.isChecksumAddress(address): raise ValidationError( '%(address)s is not a valid ethereum address', params={'address': address}, )
25.25
58
0.683168
from django.core.exceptions import ValidationError from web3 import Web3 def validate_checksumed_address(address): if not Web3.isChecksumAddress(address): raise ValidationError( '%(address)s is not a valid ethereum address', params={'address': address}, )
true
true
f7683bfe7c98c1157843468c70095dc610eced0e
9,067
py
Python
custom_scripts/skipgram_modified.py
aday651/embed-asym-exeriments
986f147425c3e4f42c04a25f69577bbeef6b3c23
[ "MIT" ]
2
2021-07-13T05:14:47.000Z
2021-07-14T20:11:18.000Z
custom_scripts/skipgram_modified.py
aday651/embed-asym-exeriments
986f147425c3e4f42c04a25f69577bbeef6b3c23
[ "MIT" ]
null
null
null
custom_scripts/skipgram_modified.py
aday651/embed-asym-exeriments
986f147425c3e4f42c04a25f69577bbeef6b3c23
[ "MIT" ]
null
null
null
import tensorflow as tf from custom_scripts.node_classifier_modified import make_node_classifier def make_skipgram(**kwargs): """ Uses the skipgram objective for relational data Returns ------- A model function for skipgram edge prediction (with a nonsense vertex classifier attached for testing conve...
38.096639
119
0.656667
import tensorflow as tf from custom_scripts.node_classifier_modified import make_node_classifier def make_skipgram(**kwargs): def make_label_logits(embeddings, features, mode, params): # embeddings is dynamic, and so we need a way to properly # handle this in order to set the size of thi...
true
true
f7683ccb41a212d62918a889bb9c94cfadff17c7
3,000
py
Python
test/test_link_exploration.py
gabrielmacedoanac/kgextension
0551ca278bc3de5c39baf663467be3220ad20edd
[ "MIT" ]
67
2021-01-17T20:12:44.000Z
2022-03-07T06:57:01.000Z
test/test_link_exploration.py
gabrielmacedoanac/kgextension
0551ca278bc3de5c39baf663467be3220ad20edd
[ "MIT" ]
null
null
null
test/test_link_exploration.py
gabrielmacedoanac/kgextension
0551ca278bc3de5c39baf663467be3220ad20edd
[ "MIT" ]
3
2021-04-17T09:19:31.000Z
2021-10-03T21:29:56.000Z
import pandas as pd import pytest from kgextension.link_exploration import link_explorer class TestLinkExplorer: def test1_default(self): df_input = pd.read_csv("test/data/link_exploration/link_exploration_test_input.csv") expected_result = pd.read_csv("test/data/link_exploration/link_exploration_...
48.387097
114
0.747333
import pandas as pd import pytest from kgextension.link_exploration import link_explorer class TestLinkExplorer: def test1_default(self): df_input = pd.read_csv("test/data/link_exploration/link_exploration_test_input.csv") expected_result = pd.read_csv("test/data/link_exploration/link_exploration_...
true
true
f7683d7280b2b8cc92f34d3a6f9ed35735d2d5a7
27,454
py
Python
server/tests-py/context.py
jeremiahrhall/graphql-engine
d916326f4f57d50a602211a73eb688039c863417
[ "Apache-2.0", "MIT" ]
null
null
null
server/tests-py/context.py
jeremiahrhall/graphql-engine
d916326f4f57d50a602211a73eb688039c863417
[ "Apache-2.0", "MIT" ]
null
null
null
server/tests-py/context.py
jeremiahrhall/graphql-engine
d916326f4f57d50a602211a73eb688039c863417
[ "Apache-2.0", "MIT" ]
null
null
null
#!/usr/bin/env python3 from http import HTTPStatus from socketserver import ThreadingMixIn from urllib.parse import urlparse from ruamel.yaml.comments import CommentedMap as OrderedDict # to avoid '!!omap' in yaml import threading import http.server import json import queue import socket import subprocess import time ...
34.795944
127
0.597691
from http import HTTPStatus from socketserver import ThreadingMixIn from urllib.parse import urlparse from ruamel.yaml.comments import CommentedMap as OrderedDict import threading import http.server import json import queue import socket import subprocess import time import string import random import os import re im...
true
true
f7683eac8e5211820e2cba82cdfd1d4166e829dc
11,512
py
Python
httprunner/ext/har2case/core.py
strongjian/httprunner
a40c7892f3666dd1de200e53ecd5cee9fa8a68ee
[ "Apache-2.0" ]
1
2020-05-14T11:19:31.000Z
2020-05-14T11:19:31.000Z
httprunner/ext/har2case/core.py
strongjian/httprunner
a40c7892f3666dd1de200e53ecd5cee9fa8a68ee
[ "Apache-2.0" ]
null
null
null
httprunner/ext/har2case/core.py
strongjian/httprunner
a40c7892f3666dd1de200e53ecd5cee9fa8a68ee
[ "Apache-2.0" ]
null
null
null
import base64 import json import os import sys import urllib.parse as urlparse from loguru import logger from httprunner.ext.har2case import utils try: from json.decoder import JSONDecodeError except ImportError: JSONDecodeError = ValueError IGNORE_REQUEST_HEADERS = [ "host", "accept", "content...
32.428169
135
0.489663
import base64 import json import os import sys import urllib.parse as urlparse from loguru import logger from httprunner.ext.har2case import utils try: from json.decoder import JSONDecodeError except ImportError: JSONDecodeError = ValueError IGNORE_REQUEST_HEADERS = [ "host", "accept", "content...
true
true
f7683fd845e86f68f741962cd7eba1909b6d17c6
4,561
py
Python
yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py
rbbratta/yardstick
7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529
[ "Apache-2.0" ]
null
null
null
yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py
rbbratta/yardstick
7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529
[ "Apache-2.0" ]
null
null
null
yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py
rbbratta/yardstick
7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529
[ "Apache-2.0" ]
null
null
null
############################################################################## # Copyright (c) 2015 Huawei Technologies Co.,Ltd. and others # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, ...
34.55303
78
0.578601
from __future__ import absolute_import import logging import subprocess import traceback import yardstick.ssh as ssh from yardstick.benchmark.scenarios.availability.attacker.baseattacker import \ BaseAttacker LOG = logging.getLogger(__name__) def _execute_shell_command(command, stdin=None): exitcode = 0 ...
true
true
f7683ff5d35c7f1131d96398b14963e6e86b276c
950
py
Python
conanfile.py
martinmoene/type
3bcb6c9b63dc40a131a64a01ccb67184a9364b6f
[ "BSL-1.0" ]
8
2018-03-31T08:13:23.000Z
2019-02-10T06:18:34.000Z
conanfile.py
martinmoene/type
3bcb6c9b63dc40a131a64a01ccb67184a9364b6f
[ "BSL-1.0" ]
6
2018-03-05T13:44:19.000Z
2018-06-05T08:31:45.000Z
conanfile.py
martinmoene/type
3bcb6c9b63dc40a131a64a01ccb67184a9364b6f
[ "BSL-1.0" ]
null
null
null
from conans import ConanFile, CMake class TypeLiteConan(ConanFile): version = "0.1.0" name = "type-lite" description = "Strong types for C++98, C++11 and later in a single-file header-only library" license = "Boost Software License - Version 1.0. http://www.boost.org/LICENSE_1_0.txt" url = "https:/...
33.928571
96
0.643158
from conans import ConanFile, CMake class TypeLiteConan(ConanFile): version = "0.1.0" name = "type-lite" description = "Strong types for C++98, C++11 and later in a single-file header-only library" license = "Boost Software License - Version 1.0. http://www.boost.org/LICENSE_1_0.txt" url = "https:/...
true
true
f768413f32065e98b0367cba14c159ff0ac16f3b
142
py
Python
config.sample.py
Officeyutong/HelloJudge2
e88c0a1198f8531ee0c1121dccfedb51f3f0aa0e
[ "MIT" ]
21
2020-02-24T07:56:55.000Z
2022-01-22T11:32:28.000Z
config.sample.py
Officeyutong/HelloJudge2
e88c0a1198f8531ee0c1121dccfedb51f3f0aa0e
[ "MIT" ]
1
2021-02-07T13:08:47.000Z
2021-02-09T04:50:49.000Z
config.sample.py
Officeyutong/HelloJudge2
e88c0a1198f8531ee0c1121dccfedb51f3f0aa0e
[ "MIT" ]
3
2020-06-04T07:56:20.000Z
2021-06-21T04:04:15.000Z
from config_default import * # 使用你自己的配置项覆盖默认的配置项 # 例如下面一行 HOST = "0.0.0.0" # 完整的配置项列表见config_default下的*.py文件 # 永远不要直接修改config_default下的任何文件!
17.75
33
0.788732
from config_default import * HOST = "0.0.0.0"
true
true
f768424bc353d33bb48283201f975f0a5abd58d1
28,495
py
Python
src/opserver/log.py
biswajit-mandal/contrail-controller
80c4a7e8515f7296b18ba4c21a439bd3daefcc4a
[ "Apache-2.0" ]
3
2019-01-11T06:16:40.000Z
2021-02-24T23:48:21.000Z
src/opserver/log.py
biswajit-mandal/contrail-controller
80c4a7e8515f7296b18ba4c21a439bd3daefcc4a
[ "Apache-2.0" ]
null
null
null
src/opserver/log.py
biswajit-mandal/contrail-controller
80c4a7e8515f7296b18ba4c21a439bd3daefcc4a
[ "Apache-2.0" ]
2
2019-02-06T12:52:00.000Z
2019-04-11T23:19:28.000Z
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # log # # Query log messages from analytics # import sys import argparse import json import datetime import logging import logging.handlers import time import re from opserver_util import OpServerUtils from sandesh_common.vns.tt...
43.771121
110
0.526654
import sys import argparse import json import datetime import logging import logging.handlers import time import re from opserver_util import OpServerUtils from sandesh_common.vns.ttypes import Module from sandesh_common.vns.constants import ModuleNames, NodeTypeNames import sandesh.viz.constants as VizConstants fro...
false
true
f768426f9e36fabefd636e97900e0f943bce8814
8,749
py
Python
tests/opwen_email_server/services/test_sendgrid.py
kulado/mailserver
d05c0b2e8d8c97b7b7a08028a9eacd4427a59c4b
[ "Apache-2.0" ]
15
2020-07-06T02:33:15.000Z
2021-08-09T19:24:11.000Z
tests/opwen_email_server/services/test_sendgrid.py
kulado/mailserver
d05c0b2e8d8c97b7b7a08028a9eacd4427a59c4b
[ "Apache-2.0" ]
298
2016-12-24T20:19:56.000Z
2020-04-29T03:13:21.000Z
tests/opwen_email_server/services/test_sendgrid.py
sbathgate/lokole
a4e3fa5da5373880f6783379f7ef8d843e4cc79d
[ "Apache-2.0" ]
12
2017-06-05T12:13:35.000Z
2020-01-23T03:26:05.000Z
from typing import Optional from unittest import TestCase from unittest import skipUnless from unittest.mock import Mock from unittest.mock import patch from urllib.error import URLError from responses import mock as mock_responses from opwen_email_server.config import SENDGRID_KEY from opwen_email_server.services.se...
40.317972
119
0.657104
from typing import Optional from unittest import TestCase from unittest import skipUnless from unittest.mock import Mock from unittest.mock import patch from urllib.error import URLError from responses import mock as mock_responses from opwen_email_server.config import SENDGRID_KEY from opwen_email_server.services.se...
true
true
f768431c7db61bb16f98d655e40f8e8295b73e41
8,481
py
Python
flumine/simulation/simulation.py
betcode-org/flumine
b33d82b75175106b2de0d0c4f9851599b085e389
[ "MIT" ]
2
2022-03-21T11:42:56.000Z
2022-03-26T08:36:18.000Z
flumine/simulation/simulation.py
betcode-org/flumine
b33d82b75175106b2de0d0c4f9851599b085e389
[ "MIT" ]
4
2022-03-25T09:49:37.000Z
2022-03-25T10:18:13.000Z
flumine/simulation/simulation.py
betcode-org/flumine
b33d82b75175106b2de0d0c4f9851599b085e389
[ "MIT" ]
null
null
null
import logging from collections import defaultdict from .utils import SimulatedDateTime from ..baseflumine import BaseFlumine from ..clients import BaseClient from ..events import events from .. import utils from ..exceptions import RunError from ..order.order import OrderTypes logger = logging.getLogger(__name__) ...
42.61809
96
0.515859
import logging from collections import defaultdict from .utils import SimulatedDateTime from ..baseflumine import BaseFlumine from ..clients import BaseClient from ..events import events from .. import utils from ..exceptions import RunError from ..order.order import OrderTypes logger = logging.getLogger(__name__) ...
true
true
f7684320cbacbbc0509f0ffb9327527104eb6e74
5,381
py
Python
backend/src/baserow/contrib/database/api/rows/serializers.py
ericderace/baserow
7b35e81f75166d914d07ef4ad0c30c625b6bb396
[ "MIT" ]
null
null
null
backend/src/baserow/contrib/database/api/rows/serializers.py
ericderace/baserow
7b35e81f75166d914d07ef4ad0c30c625b6bb396
[ "MIT" ]
6
2021-04-08T22:03:06.000Z
2022-01-13T03:38:17.000Z
backend/src/baserow/contrib/database/api/rows/serializers.py
ericderace/baserow
7b35e81f75166d914d07ef4ad0c30c625b6bb396
[ "MIT" ]
null
null
null
import logging from rest_framework import serializers from baserow.api.utils import get_serializer_class from baserow.api.serializers import get_example_pagination_serializer_class from baserow.core.utils import model_default_values, dict_to_object from baserow.contrib.database.fields.registries import field_type_reg...
39.566176
87
0.688162
import logging from rest_framework import serializers from baserow.api.utils import get_serializer_class from baserow.api.serializers import get_example_pagination_serializer_class from baserow.core.utils import model_default_values, dict_to_object from baserow.contrib.database.fields.registries import field_type_reg...
true
true
f76844c0e13c7848474f824c9f9c39fd4feb1b1f
5,017
py
Python
menus.py
kravlost/gogow
b41981354c711cc025d9072808ec00cd97dec91e
[ "Unlicense" ]
null
null
null
menus.py
kravlost/gogow
b41981354c711cc025d9072808ec00cd97dec91e
[ "Unlicense" ]
null
null
null
menus.py
kravlost/gogow
b41981354c711cc025d9072808ec00cd97dec91e
[ "Unlicense" ]
null
null
null
import tcod as libtcod from components.inventory import Inventory def menu(con, header, options, width, screen_width, screen_height): if len(options) > 26: raise ValueError('Ny yll rol synsi moy es 26 dewis.') # calculate total height for the header (after auto-wrap) and one line per option header_height...
52.260417
120
0.681682
import tcod as libtcod from components.inventory import Inventory def menu(con, header, options, width, screen_width, screen_height): if len(options) > 26: raise ValueError('Ny yll rol synsi moy es 26 dewis.') header_height = libtcod.console_get_height_rect(con, 0, 0, width, screen_height, header) he...
true
true
f768473ac536cde9585af170a773d03010586eaa
148
py
Python
yhackss17/urls.py
DannyKong12/yhack17
c5ebd222af3bca5cf9e390abf5245d5e7a3f927b
[ "MIT" ]
1
2018-01-17T17:49:14.000Z
2018-01-17T17:49:14.000Z
yhackss17/urls.py
DannyKong12/yhack17
c5ebd222af3bca5cf9e390abf5245d5e7a3f927b
[ "MIT" ]
18
2020-01-28T22:19:24.000Z
2022-02-10T07:03:42.000Z
yhackss17/urls.py
DannyKong12/yhack17
c5ebd222af3bca5cf9e390abf5245d5e7a3f927b
[ "MIT" ]
1
2018-01-15T18:24:14.000Z
2018-01-15T18:24:14.000Z
from django.urls import path from . import views urlpatterns = [ path('/1/<str:text>/', views.text), path(r'/2/<str:url>', views.voice) ]
16.444444
39
0.628378
from django.urls import path from . import views urlpatterns = [ path('/1/<str:text>/', views.text), path(r'/2/<str:url>', views.voice) ]
true
true
f768485fdedc5a44145d7e43db3bd46dbf3a520e
15,401
py
Python
toolchain/riscv/MSYS/python/Lib/test/test_call.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
null
null
null
toolchain/riscv/MSYS/python/Lib/test/test_call.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
1
2020-04-23T02:34:53.000Z
2020-04-23T02:34:53.000Z
toolchain/riscv/MSYS/python/Lib/test/test_call.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
1
2020-04-27T15:07:54.000Z
2020-04-27T15:07:54.000Z
import datetime import unittest from test.support import cpython_only try: import _testcapi except ImportError: _testcapi = None import struct import collections import itertools import gc class FunctionCalls(unittest.TestCase): def test_kwargs_order(self): # bpo-34320: **kwargs ...
33.407809
91
0.579118
import datetime import unittest from test.support import cpython_only try: import _testcapi except ImportError: _testcapi = None import struct import collections import itertools import gc class FunctionCalls(unittest.TestCase): def test_kwargs_order(self): od = collection...
true
true
f76848e8461e4db503b3aedefcb3605f45d4f7a8
3,700
py
Python
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/l1config/tengigwan/fcoe/fcoe.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/l1config/tengigwan/fcoe/fcoe.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/l1config/tengigwan/fcoe/fcoe.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
# Copyright 1997 - 2018 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, p...
33.944954
209
0.744595
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class Fcoe(Base): _SDM_NAME = 'fcoe' def __init__(self, parent): super(Fcoe, self).__init__(parent) @property def EnablePFCPauseDelay(self): return self._get_attribute('enablePFCPauseDelay') @EnablePFCPau...
true
true
f7684994e37b77d89bb9256421c3c8ed3d24f78d
4,038
py
Python
configmanager/config_manager.py
marco-gallegos/commit-cli
9d3790b76c5294fe6e593361fca7b29953589f09
[ "MIT" ]
1
2021-01-04T20:24:44.000Z
2021-01-04T20:24:44.000Z
configmanager/config_manager.py
marco-gallegos/commit-cli
9d3790b76c5294fe6e593361fca7b29953589f09
[ "MIT" ]
null
null
null
configmanager/config_manager.py
marco-gallegos/commit-cli
9d3790b76c5294fe6e593361fca7b29953589f09
[ "MIT" ]
null
null
null
""" @Author Marco A. Gallegos @Date 2020/12/31 @Update 2020/12/31 @Description The config manager is a class to manage the configuration file by default in ~/.commitclirc """ import distutils.util import os import pathlib import re from configmanager.config import Configuration class ConfigManager(object): ...
35.113043
95
0.600297
import distutils.util import os import pathlib import re from configmanager.config import Configuration class ConfigManager(object): def __init__(self, file: str = '.commitclirc', config: Configuration = None): self._file = file self.config = config self.regex_clave_valor = r'[\D]+[=]{1}[...
true
true
f7684a51897ca7b66db658b118e9ab886946c37f
3,165
py
Python
src/olympia/files/tests/test_decorators.py
leplatrem/addons-server
8b5ebda6f33194aa9fce12c0453574e7f850e6ad
[ "BSD-3-Clause" ]
1
2020-04-07T07:21:25.000Z
2020-04-07T07:21:25.000Z
src/olympia/files/tests/test_decorators.py
leplatrem/addons-server
8b5ebda6f33194aa9fce12c0453574e7f850e6ad
[ "BSD-3-Clause" ]
null
null
null
src/olympia/files/tests/test_decorators.py
leplatrem/addons-server
8b5ebda6f33194aa9fce12c0453574e7f850e6ad
[ "BSD-3-Clause" ]
2
2018-03-04T00:11:22.000Z
2019-12-14T09:45:55.000Z
from django import http from django.core.exceptions import PermissionDenied, ObjectDoesNotExist import pytest from mock import Mock, patch from olympia import amo from olympia.amo.tests import TestCase from olympia.access import acl from olympia.files.decorators import allowed class AllowedTest(TestCase): def ...
41.103896
78
0.711532
from django import http from django.core.exceptions import PermissionDenied, ObjectDoesNotExist import pytest from mock import Mock, patch from olympia import amo from olympia.amo.tests import TestCase from olympia.access import acl from olympia.files.decorators import allowed class AllowedTest(TestCase): def ...
true
true
f7684bd90352b46b245d2a6f41b4757da4cf4015
1,432
py
Python
Questions/Question2_3.py
sevmardi/Social_network_analysis
d299fc0120f12c2ad8ca871cad160a66873dcae0
[ "MIT" ]
1
2021-09-16T17:01:07.000Z
2021-09-16T17:01:07.000Z
Questions/Question2_3.py
sevmardi/Social_network_analysis
d299fc0120f12c2ad8ca871cad160a66873dcae0
[ "MIT" ]
null
null
null
Questions/Question2_3.py
sevmardi/Social_network_analysis
d299fc0120f12c2ad8ca871cad160a66873dcae0
[ "MIT" ]
null
null
null
import networkx as nx import helpers.DataLoader as dataLoader import matplotlib.pyplot as plt import helpers.DataLoader as data class Question2_3: def main(self): """ Caclulate the indegree and outdegree distribution of the given graph """ # Load the data data = dataLoader...
28.078431
97
0.589385
import networkx as nx import helpers.DataLoader as dataLoader import matplotlib.pyplot as plt import helpers.DataLoader as data class Question2_3: def main(self): data = dataLoader.DataLoader() medium = data.load_medium() large = data.load_large() med = self.opene...
true
true
f7684d1955b777b00c04590fa8643f9504121b06
1,495
py
Python
xlsxwriter/test/comparison/test_chart_gradient06.py
hugovk/XlsxWriter
e97cc66637d9895480ee32cfb5e561d652d3787b
[ "BSD-2-Clause" ]
null
null
null
xlsxwriter/test/comparison/test_chart_gradient06.py
hugovk/XlsxWriter
e97cc66637d9895480ee32cfb5e561d652d3787b
[ "BSD-2-Clause" ]
null
null
null
xlsxwriter/test/comparison/test_chart_gradient06.py
hugovk/XlsxWriter
e97cc66637d9895480ee32cfb5e561d652d3787b
[ "BSD-2-Clause" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompar...
25.338983
79
0.535117
from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): def setUp(self): self.set_filename('chart_gradient06.xlsx') def test_create_file(self): workbook = Workbook(self.got_filename) worksheet = wor...
true
true
f7684d3fbcff0f28ce5a081f5521872d903e7b8e
20,609
py
Python
python/pyspark/sql/tests/test_pandas_udf_grouped_map.py
sslowikatpalantir/spark
f9dddebf019da89d8611e11e1f12bc8864c17419
[ "Apache-2.0" ]
2
2019-03-13T06:50:32.000Z
2019-03-13T06:50:36.000Z
python/pyspark/sql/tests/test_pandas_udf_grouped_map.py
sslowikatpalantir/spark
f9dddebf019da89d8611e11e1f12bc8864c17419
[ "Apache-2.0" ]
5
2015-07-14T14:03:07.000Z
2018-06-06T12:40:44.000Z
python/pyspark/sql/tests/test_pandas_udf_grouped_map.py
sslowikatpalantir/spark
f9dddebf019da89d8611e11e1f12bc8864c17419
[ "Apache-2.0" ]
1
2019-04-10T06:03:57.000Z
2019-04-10T06:03:57.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
39.785714
100
0.576496
import datetime import unittest from collections import OrderedDict from decimal import Decimal from distutils.version import LooseVersion from pyspark.sql import Row from pyspark.sql.functions import array, explode, col, lit, udf, sum, pandas_udf, PandasUDFType from pyspark.sql.types import * from pyspark.testing.s...
true
true
f7684d4daac996c205fa8065a8dcaf67328ee944
6,426
py
Python
setup.py
DevinCheung/ColossalAI
632e622de818697f9949e35117c0432d88f62c87
[ "Apache-2.0" ]
null
null
null
setup.py
DevinCheung/ColossalAI
632e622de818697f9949e35117c0432d88f62c87
[ "Apache-2.0" ]
null
null
null
setup.py
DevinCheung/ColossalAI
632e622de818697f9949e35117c0432d88f62c87
[ "Apache-2.0" ]
null
null
null
import os import subprocess import sys import torch from setuptools import setup, find_packages from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CUDA_HOME # ninja build does not work unless include_dirs are abs path this_dir = os.path.dirname(os.path.abspath(__file__)) def get_cuda_bare_metal_ve...
47.6
262
0.634609
import os import subprocess import sys import torch from setuptools import setup, find_packages from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CUDA_HOME this_dir = os.path.dirname(os.path.abspath(__file__)) def get_cuda_bare_metal_version(cuda_dir): raw_output = subprocess.check_output( ...
true
true
f7684dca838546fba7bfea5666b86226bfbb5583
5,497
py
Python
tests/providers/amazon/aws/operators/test_emr_containers.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
tests/providers/amazon/aws/operators/test_emr_containers.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
tests/providers/amazon/aws/operators/test_emr_containers.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
40.124088
86
0.703475
import unittest from unittest import mock from unittest.mock import MagicMock, patch import pytest from airflow import configuration from airflow.exceptions import AirflowException from airflow.providers.amazon.aws.hooks.emr_containers import EMRContainerHook from airflow.providers.amazon.aws.operators.emr_container...
true
true
f7684e135ffcc141822421ac14fadffbbfa2569c
3,057
py
Python
tests/test_mmdvocab.py
metno/met-vocab-tools
fa657293564ff3d78f5e0fbbf00a17771e28d97e
[ "Apache-2.0" ]
null
null
null
tests/test_mmdvocab.py
metno/met-vocab-tools
fa657293564ff3d78f5e0fbbf00a17771e28d97e
[ "Apache-2.0" ]
11
2021-09-02T12:18:11.000Z
2021-09-20T09:21:29.000Z
tests/test_mmdvocab.py
metno/met-vocab-tools
fa657293564ff3d78f5e0fbbf00a17771e28d97e
[ "Apache-2.0" ]
null
null
null
""" MetVocab : MMD Vocabulary Class Tests ===================================== Copyright 2021 MET Norway 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...
32.521277
89
0.73667
import os import pytest from tools import readJson from metvocab import MMDVocab @pytest.mark.core def testCoreMMDVocab_Init(): with pytest.raises(TypeError): lookup = MMDVocab() lookup = MMDVocab("mmd", "https://vocab.met.no/mmd/Access_Constraint") assert lookup._voc_id == "mmd" assert lo...
true
true
f7684ed299e3d1830d8db4f61aa24c85a599bd1b
1,237
py
Python
app/models/pvc.py
zephyrxvxx7/KubeZephyr-Backend
242410bc236e1f7204c24d635eb3346b0c256dc8
[ "MIT" ]
2
2021-04-25T01:49:45.000Z
2021-11-25T09:10:40.000Z
app/models/pvc.py
zephyrxvxx7/KubeZephyr-Backend
242410bc236e1f7204c24d635eb3346b0c256dc8
[ "MIT" ]
null
null
null
app/models/pvc.py
zephyrxvxx7/KubeZephyr-Backend
242410bc236e1f7204c24d635eb3346b0c256dc8
[ "MIT" ]
null
null
null
from typing import Optional, List from pydantic import BaseModel, Field from app.models.k8s_resource.io.k8s.api.core.v1 import PersistentVolumeClaimSpec from app.models.k8s_resource.io.k8s.apimachinery.pkg.apis.meta.v1 import ObjectMeta class PvcInCreate(BaseModel): metadata: ObjectMeta = Field( ..., ...
39.903226
199
0.752627
from typing import Optional, List from pydantic import BaseModel, Field from app.models.k8s_resource.io.k8s.api.core.v1 import PersistentVolumeClaimSpec from app.models.k8s_resource.io.k8s.apimachinery.pkg.apis.meta.v1 import ObjectMeta class PvcInCreate(BaseModel): metadata: ObjectMeta = Field( ..., ...
true
true
f7684ee48d1401a68d481b24b9295156d7481626
249
py
Python
kattis/Prsteni.py
jaredliw/python-question-bank
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2021-04-08T07:49:15.000Z
2021-04-08T07:49:15.000Z
kattis/Prsteni.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
null
null
null
kattis/Prsteni.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2022-01-23T02:12:24.000Z
2022-01-23T02:12:24.000Z
# CPU: 0.05 s def hcf(x, y): if x == 0: return y return hcf(y % x, x) input() rings = list(map(int, input().split())) for idx in range(1, len(rings)): factor = hcf(rings[0], rings[idx]) print(f"{rings[0] // factor}/{rings[idx] // factor}")
17.785714
54
0.582329
def hcf(x, y): if x == 0: return y return hcf(y % x, x) input() rings = list(map(int, input().split())) for idx in range(1, len(rings)): factor = hcf(rings[0], rings[idx]) print(f"{rings[0] // factor}/{rings[idx] // factor}")
true
true
f7684fa7aeeb164e9ff3505cb61ce54c5a9fdbaf
280
py
Python
exercises/zh/solution_02_05_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/zh/solution_02_05_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/zh/solution_02_05_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy nlp = spacy.blank("en") # 导入Doc类 from spacy.tokens import Doc # 目标文本:"Go, get started!" words = ["Go", ",", "get", "started", "!"] spaces = [False, True, True, False, False] # 使用words和spaces创建一个Doc doc = Doc(nlp.vocab, words=words, spaces=spaces) print(doc.text)
18.666667
48
0.667857
import spacy nlp = spacy.blank("en") from spacy.tokens import Doc words = ["Go", ",", "get", "started", "!"] spaces = [False, True, True, False, False] doc = Doc(nlp.vocab, words=words, spaces=spaces) print(doc.text)
true
true
f768504dd0ecec31f67613ab2f4d85b46a9a4d2c
11,510
py
Python
docs/conf.py
astronouth7303/graphql-core
fc5ad0bd527368f395471c685716643f6957caec
[ "MIT" ]
null
null
null
docs/conf.py
astronouth7303/graphql-core
fc5ad0bd527368f395471c685716643f6957caec
[ "MIT" ]
null
null
null
docs/conf.py
astronouth7303/graphql-core
fc5ad0bd527368f395471c685716643f6957caec
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # GraphQL-core 3 documentation build configuration file, created by # sphinx-quickstart on Thu Jun 21 16:28:30 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
30.289474
80
0.708254
extensions = [ 'sphinx.ext.autodoc', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'GraphQL-core 3' copyright = '2020, Christoph Zwerschke' author = 'Christoph Zwerschke' # |version| and |release|, also used in various other places throughout the # built documents...
true
true
f768510a3fedd9e14c57f81cb8ba72c5000a6a3b
1,665
py
Python
main.py
bearhudson/PyByeSpotify
73f4b0fb74309025b525b6c7e6053edf7964b5fa
[ "Apache-2.0" ]
1
2022-02-20T07:19:17.000Z
2022-02-20T07:19:17.000Z
main.py
bearhudson/PyByeSpotify
73f4b0fb74309025b525b6c7e6053edf7964b5fa
[ "Apache-2.0" ]
null
null
null
main.py
bearhudson/PyByeSpotify
73f4b0fb74309025b525b6c7e6053edf7964b5fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 from login import LoginClass def get_playlists_recursive(count, reps, user, playlists): try: if count > 20: get_playlists_recursive(count - 20, reps + 1, user, playlists) playlists += user.get_playlists(playlist_limit=count, offset=(reps * 50)) except ValueError...
33.979592
113
0.638438
from login import LoginClass def get_playlists_recursive(count, reps, user, playlists): try: if count > 20: get_playlists_recursive(count - 20, reps + 1, user, playlists) playlists += user.get_playlists(playlist_limit=count, offset=(reps * 50)) except ValueError: print("Er...
true
true
f76851408e08dc15502346dd463c0df1bf11b814
10,663
py
Python
cif/checkcif/checkcif.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
13
2020-01-14T16:23:48.000Z
2022-02-16T18:02:08.000Z
cif/checkcif/checkcif.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
24
2021-04-21T05:30:42.000Z
2022-03-31T20:07:29.000Z
cif/checkcif/checkcif.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
1
2021-08-09T16:48:33.000Z
2021-08-09T16:48:33.000Z
# ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # dkratzert@gmx.de> wrote this file. As long as you retain # this notice you can do whatever you want with this stuff. If we meet some day, # and you think this stuff is worth it, you can buy me...
36.768966
115
0.572447
import re import subprocess import sys import time from contextlib import suppress from html.parser import HTMLParser from pathlib import Path from typing import List, Optional, Dict import requests from PyQt5.QtCore import QUrl, QThread, pyqtSignal from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, Q...
true
true
f7685167bbb26b84ddd863af7b08d159b255edf4
13,829
py
Python
src/tox_lsr/test_scripts/runqemu.py
spetrosi/tox-lsr
415329d2a47fbdb066a2e291b68e1227076e7b9e
[ "MIT" ]
null
null
null
src/tox_lsr/test_scripts/runqemu.py
spetrosi/tox-lsr
415329d2a47fbdb066a2e291b68e1227076e7b9e
[ "MIT" ]
null
null
null
src/tox_lsr/test_scripts/runqemu.py
spetrosi/tox-lsr
415329d2a47fbdb066a2e291b68e1227076e7b9e
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Launch qemu tests.""" import argparse import errno import json import logging import os import shutil import subprocess # nosec import sys import tempfile import traceback import urllib.parse import urllib.request from distutils.util import strtobool import productmd.compose import yaml # h...
31.216704
79
0.595054
import argparse import errno import json import logging import os import shutil import subprocess import sys import tempfile import traceback import urllib.parse import urllib.request from distutils.util import strtobool import productmd.compose import yaml URL_XATTR = "user.xdg.origin.url" DATE_XATTR = "user.dubli...
true
true
f768528d65638e0e32cd66146a68f77743d91bf1
1,775
py
Python
dev/runtime_estimation.py
stanleylio/smartalawa
66544f0a5eb41f81dade324887d68c529bc4b908
[ "Apache-2.0" ]
1
2020-12-02T21:28:16.000Z
2020-12-02T21:28:16.000Z
dev/runtime_estimation.py
smartcoastlines-org/huliwai
d5f0f4a6dd68f58fff2c263d427cafeb78040771
[ "Apache-2.0" ]
null
null
null
dev/runtime_estimation.py
smartcoastlines-org/huliwai
d5f0f4a6dd68f58fff2c263d427cafeb78040771
[ "Apache-2.0" ]
1
2018-03-28T23:19:41.000Z
2018-03-28T23:19:41.000Z
# Storage capacity and run time calculation. # # Stanley H.I. Lio # hlio@hawaii.edu # MESH Lab # University of Hawaii import math SPI_FLASH_SIZE_BYTE = 16*1024*1024 SPI_FLASH_PAGE_SIZE_BYTE = 256 SPI_FLASH_PAGE_COUNT = SPI_FLASH_SIZE_BYTE/SPI_FLASH_PAGE_SIZE_BYTE #SAMPLE_PER_SECOND = 1/60 SAMPLE_PER_SECOND = 5 # N...
35.5
117
0.780845
import math SPI_FLASH_SIZE_BYTE = 16*1024*1024 SPI_FLASH_PAGE_SIZE_BYTE = 256 SPI_FLASH_PAGE_COUNT = SPI_FLASH_SIZE_BYTE/SPI_FLASH_PAGE_SIZE_BYTE SAMPLE_PER_SECOND = 5 sample_size_byte = 2*4 + 6*2 sample_per_page = SPI_FLASH_PAGE_SIZE_BYTE//sample_size_byte leftover_byte = SPI_FLASH_PAGE_SIZE_BYTE - sample_per_pag...
true
true
f76854706e8b7f526294c95501e697b10bf4b940
198,798
py
Python
tensorflow/python/keras/backend.py
JackDanger/tensorflow
5d615f2f05d6ecfc37951ef574e359829cb9e3e0
[ "Apache-2.0" ]
3
2019-04-01T09:22:17.000Z
2020-01-20T16:33:22.000Z
tensorflow/python/keras/backend.py
JackDanger/tensorflow
5d615f2f05d6ecfc37951ef574e359829cb9e3e0
[ "Apache-2.0" ]
2
2021-08-25T16:00:46.000Z
2022-02-10T02:03:57.000Z
tensorflow/python/keras/backend.py
JackDanger/tensorflow
5d615f2f05d6ecfc37951ef574e359829cb9e3e0
[ "Apache-2.0" ]
3
2019-04-01T09:22:18.000Z
2019-06-21T06:47:12.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
31.620487
112
0.668342
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import itertools import json import os import sys import threading import weakref import numpy as np from tensorflow.core.protobuf import config_pb2 from tensorflow.python import tf2 from t...
true
true
f76854cbcd77c6895899ca2326da20ffae55274e
530
py
Python
Course I/Алгоритмы Python/Part2/семинары/pract2/задание/modules/task19/eur_class.py
GeorgiyDemo/FA
641a29d088904302f5f2164c9b3e1f1c813849ec
[ "WTFPL" ]
27
2019-08-18T20:54:27.000Z
2022-02-22T02:39:45.000Z
Course I/Алгоритмы Python/Part2/семинары/pract2/задание/modules/task19/eur_class.py
GeorgiyDemo/FA
641a29d088904302f5f2164c9b3e1f1c813849ec
[ "WTFPL" ]
217
2019-09-22T14:43:25.000Z
2022-03-30T13:49:18.000Z
Course I/Алгоритмы Python/Part2/семинары/pract2/задание/modules/task19/eur_class.py
GeorgiyDemo/FA
641a29d088904302f5f2164c9b3e1f1c813849ec
[ "WTFPL" ]
42
2019-09-18T11:36:28.000Z
2022-03-19T18:43:00.000Z
from .currency_class import CurrencyClass class EURClass(CurrencyClass): def __init__(self, balance): self.currency = super().eur_currency self.balance = balance def converter(self): return round(self.balance * self.currency, 2) def info(self): return ( "[EUR]...
25.238095
53
0.558491
from .currency_class import CurrencyClass class EURClass(CurrencyClass): def __init__(self, balance): self.currency = super().eur_currency self.balance = balance def converter(self): return round(self.balance * self.currency, 2) def info(self): return ( "[EUR]...
true
true
f768556c2563456a6fb3ee7a20496bd3f62e6854
1,678
py
Python
pstep_base.py
Team-Audio/synth-processor
ab608a74769a3d33f305ebb5b958b37e1fa5d4a7
[ "MIT" ]
null
null
null
pstep_base.py
Team-Audio/synth-processor
ab608a74769a3d33f305ebb5b958b37e1fa5d4a7
[ "MIT" ]
null
null
null
pstep_base.py
Team-Audio/synth-processor
ab608a74769a3d33f305ebb5b958b37e1fa5d4a7
[ "MIT" ]
null
null
null
import abc class PipelineStepBase(metaclass=abc.ABCMeta): def take_pipeline(self, left, right): pass @abc.abstractmethod def has_left(self) -> bool: raise NotImplementedError("Abstract method not implemented!") @abc.abstractmethod def has_right(self) -> bool: ...
27.966667
107
0.678784
import abc class PipelineStepBase(metaclass=abc.ABCMeta): def take_pipeline(self, left, right): pass @abc.abstractmethod def has_left(self) -> bool: raise NotImplementedError("Abstract method not implemented!") @abc.abstractmethod def has_right(self) -> bool: ...
true
true
f76856f4a37b854ff90d1b72dcc94b66fce1a5be
72
py
Python
PDA/extra_assignments/1.6. Input/print_ Hours and minutes/solution/main.py
EMbeDS-education/StatsAndComputing20212022
971e418882b206a1b5606d15d222cef1a5a04834
[ "MIT" ]
2
2022-02-24T09:35:15.000Z
2022-03-14T20:34:33.000Z
PDA/extra_assignments/1.6. Input/print_ Hours and minutes/solution/main.py
GeorgiosArg/StatsAndComputing20212022
798d39af6aa5ef5eef49d5d6f43191351e8a49f3
[ "MIT" ]
null
null
null
PDA/extra_assignments/1.6. Input/print_ Hours and minutes/solution/main.py
GeorgiosArg/StatsAndComputing20212022
798d39af6aa5ef5eef49d5d6f43191351e8a49f3
[ "MIT" ]
2
2022-03-15T21:40:35.000Z
2022-03-26T14:51:31.000Z
num_seconds = int(input()) print(num_seconds // 3600, num_seconds // 60)
36
45
0.722222
num_seconds = int(input()) print(num_seconds // 3600, num_seconds // 60)
true
true
f76857d4df568a8378cd9d885848e15e1defa800
5,166
py
Python
validation_all/hdwc_validate/valid_yolo6.py
Mastli/ASPLOS_artifact
1a592f7cfb0592f0a786e156a249087b56a4e647
[ "BSD-4-Clause" ]
7
2021-05-21T02:01:50.000Z
2021-11-22T05:51:22.000Z
validation_all/hdwc_validate/valid_yolo6.py
Mastli/ASPLOS_artifact
1a592f7cfb0592f0a786e156a249087b56a4e647
[ "BSD-4-Clause" ]
null
null
null
validation_all/hdwc_validate/valid_yolo6.py
Mastli/ASPLOS_artifact
1a592f7cfb0592f0a786e156a249087b56a4e647
[ "BSD-4-Clause" ]
3
2021-03-27T13:11:21.000Z
2021-11-01T15:40:35.000Z
import subprocess import pdb import sys glb_group ='' glb_event = '' def run_instance(Txy, Tf, Tc): cmd = 'icpc -O3 -Ofast -march=native -fopenmp -I../Vary_Layout_UKR/build -DLKF=16 -DLC=1 -DLOF=1 -DuNf=128 -DuNx=68 -DuNy=68 -DuNc=256 -DuNw=1 -DuNh=1 -DEdgeXY=4 -DuSx=1 -DuSy=1 testbed_likwid.cpp' cmd += ' -DLIK...
28.860335
201
0.549555
import subprocess import pdb import sys glb_group ='' glb_event = '' def run_instance(Txy, Tf, Tc): cmd = 'icpc -O3 -Ofast -march=native -fopenmp -I../Vary_Layout_UKR/build -DLKF=16 -DLC=1 -DLOF=1 -DuNf=128 -DuNx=68 -DuNy=68 -DuNc=256 -DuNw=1 -DuNh=1 -DEdgeXY=4 -DuSx=1 -DuSy=1 testbed_likwid.cpp' cmd += ' -DLIK...
true
true
f76858d5a91b17ddac759229139dc12d3f442493
690
py
Python
setup.py
jproque-dell/tempest-stress
c283086b326bc7afa23dd27e4cef864011847600
[ "Apache-2.0" ]
49
2015-07-01T21:28:25.000Z
2021-04-20T05:24:43.000Z
setup.py
openstack/cyborg-specs
3540e96f62f14550c4950cf832bc4ff61be84a45
[ "Apache-2.0" ]
637
2020-06-19T06:57:30.000Z
2022-03-31T08:58:54.000Z
setup.py
openstack/cyborg-specs
3540e96f62f14550c4950cf832bc4ff61be84a45
[ "Apache-2.0" ]
37
2015-08-20T15:06:54.000Z
2022-01-23T07:53:32.000Z
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
32.857143
69
0.752174
import setuptools setuptools.setup( setup_requires=['pbr'], pbr=True)
true
true
f7685931b302e2966a5f51fd3b4e9027e5212002
1,096
py
Python
examples/input_output/plot_store_load_rider.py
AartGoossens/scikit-sports
a80a67939587b8f9ed03a0b1bab7800c01984352
[ "MIT" ]
34
2018-06-14T20:17:22.000Z
2022-02-27T19:28:28.000Z
examples/input_output/plot_store_load_rider.py
AartGoossens/scikit-sports
a80a67939587b8f9ed03a0b1bab7800c01984352
[ "MIT" ]
8
2018-05-22T20:06:18.000Z
2019-10-21T06:41:51.000Z
examples/input_output/plot_store_load_rider.py
AartGoossens/scikit-sports
a80a67939587b8f9ed03a0b1bab7800c01984352
[ "MIT" ]
9
2018-05-22T19:27:22.000Z
2021-12-13T23:26:14.000Z
""" ================================== Store and load rider power-profile ================================== This example illustrates how to store the information contained in a :class:`sksports.Rider` instance. """ print(__doc__) # Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com> # License: MIT ##############...
26.731707
79
0.552007
print(__doc__) from sksports.datasets import load_fit from sksports import Rider rider = Rider() rider.add_activities(load_fit()) print('The computed activities are:\n {}'.format(rider.power_profile_)) filename_rider = 'rider.csv' rider.to_csv(filename_rider) rider_reloaded = Rider.from_csv(filename_rider) im...
true
true
f768595e2e7e8c3bc3957e39bfa3c7518f3bf6c4
4,731
py
Python
tests/runTests.py
ankraft/ACME-oneM2M-CSE
03c23ea19b35dd6e0aec752d9631e2a76778c61c
[ "BSD-3-Clause" ]
10
2020-09-25T08:49:19.000Z
2022-03-30T01:29:22.000Z
tests/runTests.py
ankraft/ACME-oneM2M-CSE
03c23ea19b35dd6e0aec752d9631e2a76778c61c
[ "BSD-3-Clause" ]
14
2020-05-22T08:00:32.000Z
2020-12-24T23:38:05.000Z
tests/runTests.py
ankraft/ACME-oneM2M-CSE
03c23ea19b35dd6e0aec752d9631e2a76778c61c
[ "BSD-3-Clause" ]
5
2020-05-22T03:43:20.000Z
2021-05-25T06:54:59.000Z
import os, fnmatch, sys, importlib, time, argparse from rich.console import Console from rich.table import Table from rich.style import Style # TODO testTransferRequests.py loadTests = [ 'testLoad' ] singleTests = [] def isRunTest(name:str) -> bool: if args.runAll: # run all tests return True if len(sing...
43.009091
166
0.698795
import os, fnmatch, sys, importlib, time, argparse from rich.console import Console from rich.table import Table from rich.style import Style loadTests = [ 'testLoad' ] singleTests = [] def isRunTest(name:str) -> bool: if args.runAll: return True if len(singleTests) > 0: return name in singleTests i...
true
true
f7685c502adb97c10fa3c5101b05f93e72341cbf
441
py
Python
topics/migrations/0003_auto_20160729_2055.py
ErikBZ/UntitledSite
1bbdec388bb190f3b4b1a671c9d0b801d0ed1e05
[ "MIT" ]
1
2016-10-17T20:08:40.000Z
2016-10-17T20:08:40.000Z
topics/migrations/0003_auto_20160729_2055.py
ErikBZ/UntitledSite
1bbdec388bb190f3b4b1a671c9d0b801d0ed1e05
[ "MIT" ]
null
null
null
topics/migrations/0003_auto_20160729_2055.py
ErikBZ/UntitledSite
1bbdec388bb190f3b4b1a671c9d0b801d0ed1e05
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-07-29 20:55 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('topics', '0002_topic_description_text'), ] operations = [ migrations.RenameField( ...
21
50
0.61678
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('topics', '0002_topic_description_text'), ] operations = [ migrations.RenameField( model_name='topic', old_name='replies', ...
true
true
f7685c5e0bcdb59990478aac73462b70d0decc61
360
py
Python
exercicios-turtle/.history/flower_20210624115547.py
Aleff13/poo-ufsc
bc1574df26f840a3c0fd5b1e0c72e5d69f61493d
[ "MIT" ]
1
2021-11-28T18:49:21.000Z
2021-11-28T18:49:21.000Z
exercicios-turtle/.history/flower_20210624115547.py
Aleff13/poo-ufsc
bc1574df26f840a3c0fd5b1e0c72e5d69f61493d
[ "MIT" ]
null
null
null
exercicios-turtle/.history/flower_20210624115547.py
Aleff13/poo-ufsc
bc1574df26f840a3c0fd5b1e0c72e5d69f61493d
[ "MIT" ]
null
null
null
import turtle tortuguita = turtle.Turtle() tortuguita.color('blue') tortuguita.speed(100) for i in range (18): tortuguita.circle(200,100) tortuguita.left(110) tortuguita.up() tortuguita.left(35) tortuguita.forward(160) tortuguita.down() tortuguita.dot(70,"black") tortuguita.left(60) tortuguita.up tortuguita...
17.142857
30
0.758333
import turtle tortuguita = turtle.Turtle() tortuguita.color('blue') tortuguita.speed(100) for i in range (18): tortuguita.circle(200,100) tortuguita.left(110) tortuguita.up() tortuguita.left(35) tortuguita.forward(160) tortuguita.down() tortuguita.dot(70,"black") tortuguita.left(60) tortuguita.up tortuguita...
true
true
f7685cbb2bc7a4dfbaa1863687f13d7f9f5faca0
1,373
py
Python
chromeos.py
GhostRiderBot/token
62484f1909a11dd0c563618413619196294ac1ac
[ "MIT" ]
null
null
null
chromeos.py
GhostRiderBot/token
62484f1909a11dd0c563618413619196294ac1ac
[ "MIT" ]
null
null
null
chromeos.py
GhostRiderBot/token
62484f1909a11dd0c563618413619196294ac1ac
[ "MIT" ]
null
null
null
from thrift.protocol import TCompactProtocol from thrift.transport import THttpClient from ttypes import LoginRequest import json, requests, LineService nama = 'Alka' Headers = { 'User-Agent': "Line/2.1.5", 'X-Line-Application': "CHROMEOS\t2.1.5\t"+nama+"\t11.2.5", "x-lal": "ja-US_US", } de...
34.325
91
0.686089
from thrift.protocol import TCompactProtocol from thrift.transport import THttpClient from ttypes import LoginRequest import json, requests, LineService nama = 'Alka' Headers = { 'User-Agent': "Line/2.1.5", 'X-Line-Application': "CHROMEOS\t2.1.5\t"+nama+"\t11.2.5", "x-lal": "ja-US_US", } de...
true
true
f7685d42eb4139195efa23d76f54982128b57f83
15,590
py
Python
src/sird.py
nicoloverardo/master-degree-thesis
0b36bf181ed6a00c2c0ab31acf52fba0fd5fa8f2
[ "BSD-3-Clause" ]
1
2021-08-04T18:00:27.000Z
2021-08-04T18:00:27.000Z
src/sird.py
nicoloverardo/master-degree-thesis
0b36bf181ed6a00c2c0ab31acf52fba0fd5fa8f2
[ "BSD-3-Clause" ]
null
null
null
src/sird.py
nicoloverardo/master-degree-thesis
0b36bf181ed6a00c2c0ab31acf52fba0fd5fa8f2
[ "BSD-3-Clause" ]
2
2021-04-04T22:59:25.000Z
2021-08-04T18:01:23.000Z
import pandas as pd import numpy as np from scipy.integrate import odeint from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_absolute_error, mean_squared_error def logistic_R0(t, R_0_start, k, x0, R_0_end): """ R0 moduled as logistic function """ return (R_0_start - R...
27.302977
87
0.512187
import pandas as pd import numpy as np from scipy.integrate import odeint from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_absolute_error, mean_squared_error def logistic_R0(t, R_0_start, k, x0, R_0_end): return (R_0_start - R_0_end) / (1 + np.exp(-k * (-t + x0))) + R_0_end d...
true
true
f7685e0b4ea963cf57147549c83594527275b1ff
3,373
py
Python
nemo/collections/asr/parts/numba_utils.py
ParikhKadam/NeMo
ee11f7c4666d410d91f9da33c61f4819ea625013
[ "Apache-2.0" ]
1
2020-08-04T08:29:41.000Z
2020-08-04T08:29:41.000Z
nemo/collections/asr/parts/numba_utils.py
ParikhKadam/NeMo
ee11f7c4666d410d91f9da33c61f4819ea625013
[ "Apache-2.0" ]
1
2020-06-11T00:54:42.000Z
2020-06-11T00:54:42.000Z
nemo/collections/asr/parts/numba_utils.py
ParikhKadam/NeMo
ee11f7c4666d410d91f9da33c61f4819ea625013
[ "Apache-2.0" ]
3
2020-03-10T05:10:07.000Z
2020-12-08T01:33:35.000Z
# Copyright 2020 NVIDIA. 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 agree...
35.882979
101
0.66973
import numpy as np from numba import jit def phase_vocoder(D: np.ndarray, rate: float, phi_advance: np.ndarray, scale_buffer: np.ndarray): time_steps = np.arange(0, D.shape[1], rate, dtype=np.float) d_stretch = np.zeros((D.shape[0], len(time_steps)), D.dtype, order='F') phase_acc = np.angle(D[:,...
true
true
f7685f47e96898afe50cbff6438a41105ac8d728
9,977
py
Python
01-Agente_em_Linguagem_Python/agentes.py
evertonnatan/tensorflow
d089549cbba24e2acc46e9732d465a803f20b339
[ "MIT" ]
null
null
null
01-Agente_em_Linguagem_Python/agentes.py
evertonnatan/tensorflow
d089549cbba24e2acc46e9732d465a803f20b339
[ "MIT" ]
null
null
null
01-Agente_em_Linguagem_Python/agentes.py
evertonnatan/tensorflow
d089549cbba24e2acc46e9732d465a803f20b339
[ "MIT" ]
null
null
null
# Esse script é uma implementação de agentes em Python # Vamos revisar os conceitos abordados no Capítulo 2 # Neste script você encontra a especificação da classe Python que cria o Agente # No Jupyter Notebook anexo, você encontra a utilização do Agente # from grid import * from statistics import mean import random ...
33.479866
109
0.63496
from statistics import mean import random import copy import collections class Thing(object): def __repr__(self): return '<{}>'.format(getattr(self, '__name__', self.__class__.__name__)) def is_alive(self): return hasattr(self, 'alive') and self.alive def show_state(self): pr...
true
true
f76860c0268ecb62982f0cf78c00a0ebff94977f
1,840
py
Python
Task/Bitmap-Write-a-PPM-file/Python/bitmap-write-a-ppm-file.py
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Bitmap-Write-a-PPM-file/Python/bitmap-write-a-ppm-file.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/Bitmap-Write-a-PPM-file/Python/bitmap-write-a-ppm-file.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
# String masquerading as ppm file (version P3) import io ppmfileout = io.StringIO('') def writeppmp3(self, f): self.writeppm(f, ppmformat='P3') def writeppm(self, f, ppmformat='P6'): assert ppmformat in ['P3', 'P6'], 'Format wrong' magic = ppmformat + '\n' comment = '# generated from Bitmap.writeppm\n...
29.206349
79
0.565217
import io ppmfileout = io.StringIO('') def writeppmp3(self, f): self.writeppm(f, ppmformat='P3') def writeppm(self, f, ppmformat='P6'): assert ppmformat in ['P3', 'P6'], 'Format wrong' magic = ppmformat + '\n' comment = '# generated from Bitmap.writeppm\n' maxval = max(max(max(bit) for bit in row)...
true
true
f768612c6472e06a3e6f783b9598cc9ccc42b05a
10,612
py
Python
bcbiovm/docker/devel.py
guillermo-carrasco/bcbio-nextgen-vm
74c53e72ea722c01b8c12b7dcf1703f79e377612
[ "MIT" ]
null
null
null
bcbiovm/docker/devel.py
guillermo-carrasco/bcbio-nextgen-vm
74c53e72ea722c01b8c12b7dcf1703f79e377612
[ "MIT" ]
null
null
null
bcbiovm/docker/devel.py
guillermo-carrasco/bcbio-nextgen-vm
74c53e72ea722c01b8c12b7dcf1703f79e377612
[ "MIT" ]
null
null
null
"""Utilities to help with developing using bcbio inside of docker. """ import copy import datetime import glob import math import os import shutil import subprocess import sys import boto import numpy import yaml from bcbio import utils from bcbio.distributed import objectstore from bcbio.pipeline import genome from ...
44.033195
116
0.636732
import copy import datetime import glob import math import os import shutil import subprocess import sys import boto import numpy import yaml from bcbio import utils from bcbio.distributed import objectstore from bcbio.pipeline import genome from bcbio.provenance import do from bcbiovm.aws import common from bcbiovm...
true
true
f76861acc0a25976bf893e510f7b977b424048e9
60,907
py
Python
sdk/python/pulumi_azure_native/devices/v20181201preview/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/devices/v20181201preview/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/devices/v20181201preview/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
44.817513
456
0.673749
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * __all__ = [ 'CertificatePropertiesResponse', 'CloudToDevicePropertiesResponse', 'EventHubPropertiesResponse', '...
true
true
f76862ce9e04407a95a1bd7d77e445809acb7c00
33,180
py
Python
featuretools/tests/primitive_tests/test_transform_features.py
windwiki/featuretools
372f513c8915e602d465069184128b9654a12d97
[ "BSD-3-Clause" ]
1
2019-11-15T11:46:46.000Z
2019-11-15T11:46:46.000Z
featuretools/tests/primitive_tests/test_transform_features.py
windwiki/featuretools
372f513c8915e602d465069184128b9654a12d97
[ "BSD-3-Clause" ]
null
null
null
featuretools/tests/primitive_tests/test_transform_features.py
windwiki/featuretools
372f513c8915e602d465069184128b9654a12d97
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pandas as pd import pytest import featuretools as ft from featuretools.computational_backends.feature_set import FeatureSet from featuretools.computational_backends.feature_set_calculator import ( FeatureSetCalculator ) from featuretools.primitives import ( Absolute, AddNumeric, ...
37.239057
127
0.620193
import numpy as np import pandas as pd import pytest import featuretools as ft from featuretools.computational_backends.feature_set import FeatureSet from featuretools.computational_backends.feature_set_calculator import ( FeatureSetCalculator ) from featuretools.primitives import ( Absolute, AddNumeric, ...
true
true
f76862dc612ebc29cf81a540aeecf1c4d9d36ffc
306
py
Python
closest-numbers.py
saketsuman07/hacker-rank-solutions
9055acf2e710b1a9caefe542b2b5e39b050e59fb
[ "MIT" ]
null
null
null
closest-numbers.py
saketsuman07/hacker-rank-solutions
9055acf2e710b1a9caefe542b2b5e39b050e59fb
[ "MIT" ]
null
null
null
closest-numbers.py
saketsuman07/hacker-rank-solutions
9055acf2e710b1a9caefe542b2b5e39b050e59fb
[ "MIT" ]
null
null
null
def closest_numbers(l): l.sort() d = 10**7 idx = [] for i in range(1, len(l)): x = l[i] - l[i-1] if x < d: d = x idx = [i-1] elif x == d: idx.append(i-1) for i in idx: print l[i], l[i+1], n = int(raw_input()) l = map(int, raw_input().split()) closest_numbers(l)
18
33
0.490196
def closest_numbers(l): l.sort() d = 10**7 idx = [] for i in range(1, len(l)): x = l[i] - l[i-1] if x < d: d = x idx = [i-1] elif x == d: idx.append(i-1) for i in idx: print l[i], l[i+1], n = int(raw_input()) l = map(int, raw_input().split()) closest_numbers(l)
false
true
f76863a37b366d473bf53e0f83730ab5d7ed3625
548
py
Python
var/spack/repos/builtin.mock/packages/externaltest/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin.mock/packages/externaltest/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin.mock/packages/externaltest/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 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 * class Externaltest(Package): homepage = "http://somewhere.com" url = "http://somewhere....
27.4
73
0.709854
from spack import * class Externaltest(Package): homepage = "http://somewhere.com" url = "http://somewhere.com/test-1.0.tar.gz" version('1.0', '1234567890abcdef1234567890abcdef') depends_on('stuff') depends_on('externaltool') def install(self, spec, prefix): touch(join_path(pr...
true
true
f76865f788868d0eb488df55d755db62240b8f95
1,742
py
Python
flask-init/database/DAOs/funcionarioDAO.py
lucasdefelippe/ds2
ede67b1d9fa0c9b4b6bcc358eab1bff35ba74a22
[ "MIT" ]
null
null
null
flask-init/database/DAOs/funcionarioDAO.py
lucasdefelippe/ds2
ede67b1d9fa0c9b4b6bcc358eab1bff35ba74a22
[ "MIT" ]
null
null
null
flask-init/database/DAOs/funcionarioDAO.py
lucasdefelippe/ds2
ede67b1d9fa0c9b4b6bcc358eab1bff35ba74a22
[ "MIT" ]
null
null
null
import psycopg2 from funcionario import Funcionario class FuncionarioDAO(): def conectar(self): banco = "dbname=flask user=postgres password=postgres host=localhost port=5432" return psycopg2.connect(banco) def buscarFuncionario(self, codigo): conexao = self.conectar().cursor() ...
31.107143
145
0.601033
import psycopg2 from funcionario import Funcionario class FuncionarioDAO(): def conectar(self): banco = "dbname=flask user=postgres password=postgres host=localhost port=5432" return psycopg2.connect(banco) def buscarFuncionario(self, codigo): conexao = self.conectar().cursor() ...
true
true
f7686601e33611b8746550c4cb282a73e07f4a83
44
py
Python
tests/annotations/__init__.py
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
[ "MIT" ]
41
2021-02-17T20:45:17.000Z
2022-03-16T19:39:00.000Z
tests/annotations/__init__.py
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
[ "MIT" ]
120
2021-03-05T01:11:45.000Z
2022-03-23T04:08:58.000Z
tests/annotations/__init__.py
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
[ "MIT" ]
18
2021-02-14T04:27:34.000Z
2022-03-03T07:29:49.000Z
"""Tests for PyBryt's various annotations"""
44
44
0.75
true
true
f768662a830a03bc4f9a6a1048617ddb162eafd7
2,170
py
Python
tests/test_clustering.py
robertopreste/prestools
5c3a66ce981f374de2e6bdc2d7c927ee5b51b9bb
[ "MIT" ]
null
null
null
tests/test_clustering.py
robertopreste/prestools
5c3a66ce981f374de2e6bdc2d7c927ee5b51b9bb
[ "MIT" ]
18
2019-09-07T16:56:11.000Z
2022-03-31T23:05:02.000Z
tests/test_clustering.py
robertopreste/prestools
5c3a66ce981f374de2e6bdc2d7c927ee5b51b9bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Created by Roberto Preste import pytest import prestools.clustering as pc import numpy as np # pc.hierarchical_clustering def test_hierarchical_clustering_empty_df(sample_empty_df): expect = None result = pc.hierarchical_clustering(sample_empty_df) assert r...
33.90625
68
0.656682
import pytest import prestools.clustering as pc import numpy as np def test_hierarchical_clustering_empty_df(sample_empty_df): expect = None result = pc.hierarchical_clustering(sample_empty_df) assert result == expect def test_hierarchical_clustering_one_entry_df(sample_one_entry_df): expect = None...
true
true
f76867664ca3b2fbece803ef5856ce7b48be8690
888
py
Python
impl/nog/tb.py
HEG-INCIPIT/ARKetype
bd2ced291292fa6cc2f101f59a9614698dae5102
[ "MIT" ]
9
2020-02-26T00:45:09.000Z
2021-11-07T23:07:06.000Z
impl/nog/tb.py
HEG-INCIPIT/ARKetype
bd2ced291292fa6cc2f101f59a9614698dae5102
[ "MIT" ]
213
2020-04-07T21:36:17.000Z
2022-03-29T21:26:04.000Z
impl/nog/tb.py
HEG-INCIPIT/ARKetype
bd2ced291292fa6cc2f101f59a9614698dae5102
[ "MIT" ]
7
2020-04-07T20:04:51.000Z
2021-08-19T01:11:55.000Z
from __future__ import absolute_import, division, print_function import sys import traceback import logging log = logging.getLogger(__name__) def traceback_with_local_vars(): tb = sys.exc_info()[2] while 1: if not tb.tb_next: break tb = tb.tb_next stack = [] f = tb.tb_fr...
22.2
79
0.539414
from __future__ import absolute_import, division, print_function import sys import traceback import logging log = logging.getLogger(__name__) def traceback_with_local_vars(): tb = sys.exc_info()[2] while 1: if not tb.tb_next: break tb = tb.tb_next stack = [] f = tb.tb_fr...
true
true
f768676679ea8828aff2fc41194f2917a3be01a9
284
py
Python
accounting/apps/connect/urls.py
newhub-spec/django-accounting
12b01a944d368ce717b57957d26d7aa4ecd04285
[ "MIT" ]
1
2019-10-18T22:13:16.000Z
2019-10-18T22:13:16.000Z
accounting/apps/connect/urls.py
newhub-spec/django-accounting
12b01a944d368ce717b57957d26d7aa4ecd04285
[ "MIT" ]
null
null
null
accounting/apps/connect/urls.py
newhub-spec/django-accounting
12b01a944d368ce717b57957d26d7aa4ecd04285
[ "MIT" ]
2
2017-07-25T14:56:25.000Z
2019-10-18T22:35:01.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.RootRedirectionView.as_view(), name="root"), # Step by step url(r'^getting-started/$', views.GettingStartedView.as_view(), name="getting-started") ]
16.705882
44
0.605634
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.RootRedirectionView.as_view(), name="root"), url(r'^getting-started/$', views.GettingStartedView.as_view(), name="getting-started") ]
true
true
f76867684883de4a33a513573621b69a3f9a71bc
649
py
Python
ecommerce/accounts/migrations/0009_alter_address_options_alter_profile_address.py
mhdirajabi/django-drf-e-commerce
526044a728f9f073a21386ff7f67ac570f4755c6
[ "MIT" ]
null
null
null
ecommerce/accounts/migrations/0009_alter_address_options_alter_profile_address.py
mhdirajabi/django-drf-e-commerce
526044a728f9f073a21386ff7f67ac570f4755c6
[ "MIT" ]
null
null
null
ecommerce/accounts/migrations/0009_alter_address_options_alter_profile_address.py
mhdirajabi/django-drf-e-commerce
526044a728f9f073a21386ff7f67ac570f4755c6
[ "MIT" ]
null
null
null
# Generated by Django 4.0 on 2021-12-28 21:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0008_remove_customuser_address_profile_address_and_more'), ] operations = [ migrations.AlterModelOptions( name='addres...
28.217391
118
0.628659
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0008_remove_customuser_address_profile_address_and_more'), ] operations = [ migrations.AlterModelOptions( name='address', options={'verbose_name': 'آدرس...
true
true
f76867b57e82bf060ddb7e79808bd7b13b335ea6
2,482
py
Python
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/CreateFlowForWebRequest.py
DataDog/aliyun-openapi-python-sdk
5cbee29bce6416dd62f61f0c3786b1af6ea0d84f
[ "Apache-2.0" ]
1
2019-12-23T12:36:43.000Z
2019-12-23T12:36:43.000Z
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/CreateFlowForWebRequest.py
liusc27/aliyun-openapi-python-sdk
5e3db3535dd21de987dc5981e71151327d5a884f
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/CreateFlowForWebRequest.py
liusc27/aliyun-openapi-python-sdk
5e3db3535dd21de987dc5981e71151327d5a884f
[ "Apache-2.0" ]
1
2021-02-23T11:27:54.000Z
2021-02-23T11:27:54.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.820513
69
0.758662
from aliyunsdkcore.request import RpcRequest class CreateFlowForWebRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Emr', '2016-04-08', 'CreateFlowForWeb') def get_CronExpr(self): return self.get_query_params().get('CronExpr') def set_CronExpr(self,CronExpr): self.add_query_param('...
true
true
f7686817718f46918e1257cbe5b32b9d92394055
407
py
Python
[Kaleido-subs]/Work in Progress/Pani Poni Dash! [BD]/ac_PPD_OP1.py
tuilakhanh/Encoding-Projects
8b254913457cb28e7d0890ad6b974d0d8f0cbecc
[ "MIT" ]
57
2019-01-31T17:32:46.000Z
2022-03-23T05:46:51.000Z
[Kaleido-subs]/Work in Progress/Pani Poni Dash! [BD]/ac_PPD_OP1.py
tuilakhanh/Encoding-Projects
8b254913457cb28e7d0890ad6b974d0d8f0cbecc
[ "MIT" ]
null
null
null
[Kaleido-subs]/Work in Progress/Pani Poni Dash! [BD]/ac_PPD_OP1.py
tuilakhanh/Encoding-Projects
8b254913457cb28e7d0890ad6b974d0d8f0cbecc
[ "MIT" ]
12
2019-04-30T06:16:13.000Z
2022-03-14T16:15:07.000Z
#!/usr/bin/env python3 import vapoursynth as vs import audiocutter from subprocess import call import shutil import os core = vs.core ts_in = r"ac.mkv" src = core.lsmas.LWLibavSource(ts_in) ac = audiocutter.AudioCutter() vid = ac.split(src, [(24,2182)]) ac.ready_qp_and_chapters(vid) vid.set_output(0) if __name__ ...
17.695652
66
0.737101
import vapoursynth as vs import audiocutter from subprocess import call import shutil import os core = vs.core ts_in = r"ac.mkv" src = core.lsmas.LWLibavSource(ts_in) ac = audiocutter.AudioCutter() vid = ac.split(src, [(24,2182)]) ac.ready_qp_and_chapters(vid) vid.set_output(0) if __name__ == "__main__": ac.c...
true
true
f7686864ba0da5db4d29b08199953d5e4383311d
8,460
py
Python
src/utils.py
Aliang-CN/GATNE
b31cb7e3cf0ea4edaf5c2d848bc02d7d47db4f24
[ "MIT" ]
2
2020-07-12T14:55:51.000Z
2020-07-15T07:43:25.000Z
src/utils.py
linxingliang/GATNE
b31cb7e3cf0ea4edaf5c2d848bc02d7d47db4f24
[ "MIT" ]
null
null
null
src/utils.py
linxingliang/GATNE
b31cb7e3cf0ea4edaf5c2d848bc02d7d47db4f24
[ "MIT" ]
1
2021-11-12T11:54:34.000Z
2021-11-12T11:54:34.000Z
import argparse from collections import defaultdict import networkx as nx import numpy as np from gensim.models.keyedvectors import Vocab from six import iteritems from sklearn.metrics import (auc, f1_score, precision_recall_curve, roc_auc_score) from walk import RWGraph def parse_args(...
36.782609
115
0.576714
import argparse from collections import defaultdict import networkx as nx import numpy as np from gensim.models.keyedvectors import Vocab from six import iteritems from sklearn.metrics import (auc, f1_score, precision_recall_curve, roc_auc_score) from walk import RWGraph def parse_args(...
true
true