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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f704acaf0d0906ebdcf3194cb863c6e94506ef5d
2,146
py
Python
stubs.min/System/Windows/Forms/__init___parts/ToolStripRenderEventArgs.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/System/Windows/Forms/__init___parts/ToolStripRenderEventArgs.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/Forms/__init___parts/ToolStripRenderEventArgs.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class ToolStripRenderEventArgs(EventArgs): """ Provides data for the System.Windows.Forms.ToolStripRenderer.OnRenderImageMargin(System.Windows.Forms.ToolStripRenderEventArgs),System.Windows.Forms.ToolStripRenderer.OnRenderToolStripBorder(System.Windows.Forms.ToolStripRenderEventArgs),and System.Windows.Forms.ToolSt...
42.078431
367
0.768872
class ToolStripRenderEventArgs(EventArgs): __new__(cls: type,g: Graphics,toolStrip: ToolStrip) __new__(cls: type,g: Graphics,toolStrip: ToolStrip,affectedBounds: Rectangle,backColor: Color) Get: AffectedBounds(self: ToolStripRenderEventArgs) -> Rectangle ConnectedArea=property(lambda self: object(),lambda...
true
true
f704acb27652fac4c53df6d424b7bb033879e704
15,975
py
Python
CollisionAvoidanceMonitor/main.py
GustavLero/EPICS-inst_servers
4bcdd6a80f1d9e074de3f0f7c66968d506981988
[ "BSD-3-Clause" ]
null
null
null
CollisionAvoidanceMonitor/main.py
GustavLero/EPICS-inst_servers
4bcdd6a80f1d9e074de3f0f7c66968d506981988
[ "BSD-3-Clause" ]
null
null
null
CollisionAvoidanceMonitor/main.py
GustavLero/EPICS-inst_servers
4bcdd6a80f1d9e074de3f0f7c66968d506981988
[ "BSD-3-Clause" ]
null
null
null
import sys import os import ode import logging import threading from time import sleep, time from genie_python.genie_startup import * import pv_server import render from configurations import config_zoom as config from collide import collide, CollisionDetector from geometry import GeometryBox from move import move_all...
33.560924
119
0.587856
import sys import os import ode import logging import threading from time import sleep, time from genie_python.genie_startup import * import pv_server import render from configurations import config_zoom as config from collide import collide, CollisionDetector from geometry import GeometryBox from move import move_all...
true
true
f704aebb270ae5ced9b2f8e4f29e963b3e7dd7bd
3,084
py
Python
rbflayer.py
edwardstm/rbf_keras
4029d1c15003438f7caadb9efefe0c026ba18933
[ "MIT" ]
1
2020-04-20T12:34:06.000Z
2020-04-20T12:34:06.000Z
rbflayer.py
edwardstm/rbf_keras
4029d1c15003438f7caadb9efefe0c026ba18933
[ "MIT" ]
null
null
null
rbflayer.py
edwardstm/rbf_keras
4029d1c15003438f7caadb9efefe0c026ba18933
[ "MIT" ]
null
null
null
import tensorflow as tf from tensorflow.keras import backend as K from tensorflow.keras.layers import Layer from tensorflow.keras.initializers import RandomUniform, Initializer, Constant import numpy as np class InitCentersRandom(Initializer): """ Initializer for initialization of centers of RBF network as...
32.463158
79
0.552205
import tensorflow as tf from tensorflow.keras import backend as K from tensorflow.keras.layers import Layer from tensorflow.keras.initializers import RandomUniform, Initializer, Constant import numpy as np class InitCentersRandom(Initializer): def __init__(self, X): self.X = X def __call__(self, shap...
true
true
f704af9532b46b3dbbc7284a567541674794e691
9,805
py
Python
tools/data/build_rawframes.py
vt-vl-lab/video-data-aug
01667cdbd1b952f2510af3422beeeb76e0d9e15a
[ "Apache-2.0" ]
20
2021-03-31T02:25:20.000Z
2022-03-11T11:45:59.000Z
tools/data/build_rawframes.py
vt-vl-lab/video-data-aug
01667cdbd1b952f2510af3422beeeb76e0d9e15a
[ "Apache-2.0" ]
6
2021-05-27T18:08:39.000Z
2022-03-23T14:00:51.000Z
tools/data/build_rawframes.py
vt-vl-lab/video-data-aug
01667cdbd1b952f2510af3422beeeb76e0d9e15a
[ "Apache-2.0" ]
4
2021-03-31T03:11:45.000Z
2021-08-22T11:11:45.000Z
import argparse import glob import os import os.path as osp import sys import warnings from multiprocessing import Pool import mmcv import numpy as np # custom import import pandas as pd import pdb def extract_frame(vid_item): """Generate optical flow using dense flow. Args: vid_item (list): Video ...
37.140152
107
0.544416
import argparse import glob import os import os.path as osp import sys import warnings from multiprocessing import Pool import mmcv import numpy as np import pandas as pd import pdb def extract_frame(vid_item): full_path, vid_path, vid_id, method, task = vid_item if '/' in vid_path: act_name = osp.b...
true
true
f704b08c47257333fbfca18d0f73801f0031cb66
1,991
py
Python
cliff/tests/test_formatters_value.py
serrollc/cliff
1dd3edafab1a34d194c4510310653ad7e2cbb582
[ "Apache-2.0" ]
null
null
null
cliff/tests/test_formatters_value.py
serrollc/cliff
1dd3edafab1a34d194c4510310653ad7e2cbb582
[ "Apache-2.0" ]
null
null
null
cliff/tests/test_formatters_value.py
serrollc/cliff
1dd3edafab1a34d194c4510310653ad7e2cbb582
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
30.166667
76
0.631341
import six from cliff.formatters import value from cliff.tests import test_columns def test_value_formatter(): sf = value.ValueFormatter() c = ('a', 'b', 'c', 'd') d = ('A', 'B', 'C', '"no escape me"') expected = 'A\nB\nC\n"no escape me"\n' output = six.StringIO() sf.emit_one(c,...
true
true
f704b1b6e255bd26c9802820bac5475dcc418066
6,716
py
Python
scraper/src/meilisearch_helper.py
myface-wang/docs-scraper
86fa2130000b6d00b6a9520d176d02ea470aec2d
[ "MIT" ]
null
null
null
scraper/src/meilisearch_helper.py
myface-wang/docs-scraper
86fa2130000b6d00b6a9520d176d02ea470aec2d
[ "MIT" ]
null
null
null
scraper/src/meilisearch_helper.py
myface-wang/docs-scraper
86fa2130000b6d00b6a9520d176d02ea470aec2d
[ "MIT" ]
null
null
null
"""MeiliSearchHelper Wrapper on top of the MeiliSearch API client""" import meilisearch from builtins import range def remove_bad_encoding(value): return value.replace(''', "'") def clean_one_field(value): if isinstance(value, bool): return str(value) elif isinstance(value, str): ret...
34.618557
90
0.611078
import meilisearch from builtins import range def remove_bad_encoding(value): return value.replace(''', "'") def clean_one_field(value): if isinstance(value, bool): return str(value) elif isinstance(value, str): return remove_bad_encoding(value) return value def clean_dict(recor...
true
true
f704b1f07f7a454874c406e6aa73fc6f56056467
1,848
py
Python
moray/_browser/chrome.py
hirorich/moray
69421ce739960c10c343ff1d72e1337594ea5c30
[ "MIT" ]
null
null
null
moray/_browser/chrome.py
hirorich/moray
69421ce739960c10c343ff1d72e1337594ea5c30
[ "MIT" ]
null
null
null
moray/_browser/chrome.py
hirorich/moray
69421ce739960c10c343ff1d72e1337594ea5c30
[ "MIT" ]
null
null
null
""" chromeをアプリモードで起動するためのコマンドを生成する """ import sys, os from moray.exception import SupportError name = 'chrome' def create_command(path, url, cmdline_args): """ 起動コマンド生成 Attributes: path (str): chromeコマンドのパス url (str): 接続先のURL cmdline_args (list<str>): コマンドライ...
23.692308
85
0.581169
import sys, os from moray.exception import SupportError name = 'chrome' def create_command(path, url, cmdline_args): return [path, '--app=' + url] + cmdline_args def find_path(): if sys.platform in ('win32', 'win64'): return _find_chrome_windows() els...
true
true
f704b28f204b556b3ce64a8a530557cbeb92babb
1,407
py
Python
itspylearning/itslearning.py
HubertJan/itspylearning
6110f87c78dfc5b78e8d52c0b05e2c376749bce3
[ "MIT" ]
null
null
null
itspylearning/itslearning.py
HubertJan/itspylearning
6110f87c78dfc5b78e8d52c0b05e2c376749bce3
[ "MIT" ]
1
2021-12-16T15:52:34.000Z
2022-01-03T17:17:09.000Z
itspylearning/itslearning.py
HubertJan/itspylearning
6110f87c78dfc5b78e8d52c0b05e2c376749bce3
[ "MIT" ]
1
2021-11-30T16:26:08.000Z
2021-11-30T16:26:08.000Z
from typing import List, Optional import aiohttp import json from aiohttp.client import ClientSession from itspylearning.consts import ITSLEARNING_URL from itspylearning.organisation import Organisation _clientSession: Optional[ClientSession] = None def _getClient() -> aiohttp.ClientSession: global _clientSessi...
31.977273
121
0.722814
from typing import List, Optional import aiohttp import json from aiohttp.client import ClientSession from itspylearning.consts import ITSLEARNING_URL from itspylearning.organisation import Organisation _clientSession: Optional[ClientSession] = None def _getClient() -> aiohttp.ClientSession: global _clientSessi...
true
true
f704b2a011d6048694d79069a8471cef3118250c
2,356
py
Python
backend/app/tests/api/node_directive/test_create.py
hollyfoxx/ace2-gui
e0f72cafdd524e0cd66549a9315697aa21ae46fa
[ "Apache-2.0" ]
1
2021-07-16T10:34:22.000Z
2021-07-16T10:34:22.000Z
backend/app/tests/api/node_directive/test_create.py
hollyfoxx/ace2-gui
e0f72cafdd524e0cd66549a9315697aa21ae46fa
[ "Apache-2.0" ]
null
null
null
backend/app/tests/api/node_directive/test_create.py
hollyfoxx/ace2-gui
e0f72cafdd524e0cd66549a9315697aa21ae46fa
[ "Apache-2.0" ]
null
null
null
import pytest import uuid from fastapi import status # # INVALID TESTS # @pytest.mark.parametrize( "key,value", [ ("description", 123), ("description", ""), ("uuid", None), ("uuid", 1), ("uuid", "abc"), ("uuid", ""), ("value", 123), ("value", ...
24.541667
84
0.629032
import pytest import uuid from fastapi import status @pytest.mark.parametrize( "key,value", [ ("description", 123), ("description", ""), ("uuid", None), ("uuid", 1), ("uuid", "abc"), ("uuid", ""), ("value", 123), ("value", None), ("...
true
true
f704b2ba2399a4abbde2614f88886205e3ef96db
1,398
py
Python
Transition.py
gerth2/FSMMaker
933db1fb2bd4b88a62590c07a58842983b625d43
[ "MIT" ]
null
null
null
Transition.py
gerth2/FSMMaker
933db1fb2bd4b88a62590c07a58842983b625d43
[ "MIT" ]
null
null
null
Transition.py
gerth2/FSMMaker
933db1fb2bd4b88a62590c07a58842983b625d43
[ "MIT" ]
null
null
null
from Comparison import Comparison from Action import Action from TransitionCodegen import TransitionCodegen from TransitionGraphic import TransitionGraphic import xml.etree.ElementTree as ET class Transition: def __init__(self, id): self.id = id self.fromStateID = None s...
31.772727
81
0.557225
from Comparison import Comparison from Action import Action from TransitionCodegen import TransitionCodegen from TransitionGraphic import TransitionGraphic import xml.etree.ElementTree as ET class Transition: def __init__(self, id): self.id = id self.fromStateID = None s...
true
true
f704b2e0ef291ebe1fc31f07298db6d46894ad1c
366
py
Python
build/kinova-ros/kinova_bringup/catkin_generated/pkg.installspace.context.pc.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
build/kinova-ros/kinova_bringup/catkin_generated/pkg.installspace.context.pc.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
build/kinova-ros/kinova_bringup/catkin_generated/pkg.installspace.context.pc.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "kinova_bringup" PROJECT_SPACE_DIR = "...
40.666667
68
0.704918
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "kinova_bringup" PROJECT_SPACE_DIR = "/workspace/install" PROJECT_VERSION = "0.0.0"
true
true
f704b34c87ed8874507207d4c03838d31c80bd03
113
py
Python
pfdo_med2image/__init__.py
FNNDSC/pfdo_med2image
f65412aea362d0db5b8e7e2257b1d8fc1e696494
[ "Apache-2.0" ]
null
null
null
pfdo_med2image/__init__.py
FNNDSC/pfdo_med2image
f65412aea362d0db5b8e7e2257b1d8fc1e696494
[ "Apache-2.0" ]
2
2020-08-18T21:47:22.000Z
2021-03-12T14:45:35.000Z
pfdo_med2image/__init__.py
FNNDSC/pfdo_med2image
f65412aea362d0db5b8e7e2257b1d8fc1e696494
[ "Apache-2.0" ]
1
2020-11-12T21:40:01.000Z
2020-11-12T21:40:01.000Z
try: from .pfdo_med2image import pfdo_med2image except: from pfdo_med2image import pfdo_med2image
22.6
49
0.752212
try: from .pfdo_med2image import pfdo_med2image except: from pfdo_med2image import pfdo_med2image
true
true
f704b3d19693548dbf7626d9ff72c05289e02e97
226
bzl
Python
BUILD.bzl
mobileink/coda
0612b142738c68155e9a9bba16cd3787bba4feed
[ "Apache-2.0" ]
null
null
null
BUILD.bzl
mobileink/coda
0612b142738c68155e9a9bba16cd3787bba4feed
[ "Apache-2.0" ]
1
2021-03-06T14:52:32.000Z
2021-03-06T14:52:32.000Z
BUILD.bzl
mobileink/coda
0612b142738c68155e9a9bba16cd3787bba4feed
[ "Apache-2.0" ]
null
null
null
# CONFIG_MLH = ["//mina/config"] CONFIG_MLH = select({ "//:profile_debug": ["//src/config/debug"], "//:profile_dev": ["//src:dev"], "//:profile_release": ["//src:release"], }, no_match_error = "Unknown profile")
25.111111
47
0.588496
CONFIG_MLH = select({ "//:profile_debug": ["//src/config/debug"], "//:profile_dev": ["//src:dev"], "//:profile_release": ["//src:release"], }, no_match_error = "Unknown profile")
true
true
f704b5b6daab1e1692d607b7bf7753465d5a41cd
2,445
py
Python
test/test_gbtile.py
flozz/img2gb
2564a718d0b377d1b524204d97a674aedeec770d
[ "BSD-3-Clause" ]
23
2018-11-14T12:50:31.000Z
2022-03-30T17:28:43.000Z
test/test_gbtile.py
flozz/img2gb
2564a718d0b377d1b524204d97a674aedeec770d
[ "BSD-3-Clause" ]
10
2019-07-01T17:24:47.000Z
2022-01-13T12:38:38.000Z
test/test_gbtile.py
flozz/img2gb
2564a718d0b377d1b524204d97a674aedeec770d
[ "BSD-3-Clause" ]
3
2019-10-16T23:27:28.000Z
2022-01-23T22:28:29.000Z
import pytest from PIL import Image from img2gb.gbtile import GBTile class Test_GBTile(object): @pytest.fixture def image(self): return Image.open("./test/assets/tileset.png") @pytest.mark.parametrize("x,result", [ (0, "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"), (8, "FF...
28.430233
96
0.566871
import pytest from PIL import Image from img2gb.gbtile import GBTile class Test_GBTile(object): @pytest.fixture def image(self): return Image.open("./test/assets/tileset.png") @pytest.mark.parametrize("x,result", [ (0, "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"), (8, "FF...
true
true
f704b74596dc89d75957ad11f92f138e450dc2bd
2,050
py
Python
mathics/profile.py
jake100/Mathics
f90f9107e12072dcfbd76549b61897bc8feb04a8
[ "Apache-2.0" ]
1
2019-04-15T13:18:05.000Z
2019-04-15T13:18:05.000Z
mathics/profile.py
jake100/Mathics
f90f9107e12072dcfbd76549b61897bc8feb04a8
[ "Apache-2.0" ]
null
null
null
mathics/profile.py
jake100/Mathics
f90f9107e12072dcfbd76549b61897bc8feb04a8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf8 -*- u""" Mathics: a general-purpose computer algebra system Copyright (C) 2011-2013 The Mathics Team This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either ver...
30.147059
79
0.643902
import cProfile import pstats from mathics.core.definitions import Definitions from mathics.core.evaluation import Evaluation definitions = Definitions(add_builtin=True) def prepare(): pass result = None def run(): global result try: ...
true
true
f704b79922c2bcb710beb9717a76fb07b5ab4af6
390
py
Python
beagle/transformers/__init__.py
truongdo619/beagle
55a5d30a381438ae66b6c1c57f57b2403621db87
[ "MIT" ]
1
2019-10-01T19:26:16.000Z
2019-10-01T19:26:16.000Z
beagle/transformers/__init__.py
truongdo619/beagle
55a5d30a381438ae66b6c1c57f57b2403621db87
[ "MIT" ]
null
null
null
beagle/transformers/__init__.py
truongdo619/beagle
55a5d30a381438ae66b6c1c57f57b2403621db87
[ "MIT" ]
1
2019-10-04T15:30:08.000Z
2019-10-04T15:30:08.000Z
from __future__ import absolute_import from .base_transformer import Transformer # noqa from .fireeye_hx_transformer import FireEyeHXTransformer # noqa from .generic_transformer import GenericTransformer # noqa from .sysmon_transformer import SysmonTransformer # noqa from .evtx_transformer import WinEVTXTransforme...
43.333333
64
0.848718
from __future__ import absolute_import from .base_transformer import Transformer from .fireeye_hx_transformer import FireEyeHXTransformer from .generic_transformer import GenericTransformer from .sysmon_transformer import SysmonTransformer from .evtx_transformer import WinEVTXTransformer from .procmon_transf...
true
true
f704b7dccf154ecda012dac0c1c0edf8a17dd5c2
804
py
Python
setup.py
jsleb333/py2tex
737292bc53115310a7e495a3781c84a3fe53b57e
[ "MIT" ]
3
2019-02-11T19:14:08.000Z
2019-02-11T22:47:15.000Z
setup.py
jsleb333/py2tex
737292bc53115310a7e495a3781c84a3fe53b57e
[ "MIT" ]
null
null
null
setup.py
jsleb333/py2tex
737292bc53115310a7e495a3781c84a3fe53b57e
[ "MIT" ]
null
null
null
import setuptools from version import __version__ with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="python2latex", version=__version__, author="Jean-Samuel Leboeuf", author_email="jean-samuel.leboeuf.1@ulaval.ca", description="A Python to LaTeX converter",...
30.923077
62
0.677861
import setuptools from version import __version__ with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="python2latex", version=__version__, author="Jean-Samuel Leboeuf", author_email="jean-samuel.leboeuf.1@ulaval.ca", description="A Python to LaTeX converter",...
true
true
f704b88ab2cda09b5ebb43639854a0c2c0509468
10,852
py
Python
as/tools/generator.py
Xuyiyang23333/asbot
c3b8a88e0970c1b39f9f7575f64b3fc3fe5161ba
[ "MIT" ]
null
null
null
as/tools/generator.py
Xuyiyang23333/asbot
c3b8a88e0970c1b39f9f7575f64b3fc3fe5161ba
[ "MIT" ]
null
null
null
as/tools/generator.py
Xuyiyang23333/asbot
c3b8a88e0970c1b39f9f7575f64b3fc3fe5161ba
[ "MIT" ]
null
null
null
from PIL import Image, ImageDraw, ImageFont import numpy as np from decimal import Decimal, ROUND_HALF_UP from math import radians, tan, cos, sin from os import path _round = lambda f, r=ROUND_HALF_UP: int(Decimal(str(f)).quantize(Decimal("0"), rounding=r)) rgb = lambda r, g, b: (r, g, b) upper_font_path = p...
40.950943
121
0.570217
from PIL import Image, ImageDraw, ImageFont import numpy as np from decimal import Decimal, ROUND_HALF_UP from math import radians, tan, cos, sin from os import path _round = lambda f, r=ROUND_HALF_UP: int(Decimal(str(f)).quantize(Decimal("0"), rounding=r)) rgb = lambda r, g, b: (r, g, b) upper_font_path = p...
true
true
f704b95c88cfabc1dac0e794e4484161cd8c29c9
5,893
py
Python
idiota/data.py
prakashsellathurai/idiota
e3cebb669bc5d04f30279c15939465aec2495eb6
[ "Apache-2.0" ]
null
null
null
idiota/data.py
prakashsellathurai/idiota
e3cebb669bc5d04f30279c15939465aec2495eb6
[ "Apache-2.0" ]
null
null
null
idiota/data.py
prakashsellathurai/idiota
e3cebb669bc5d04f30279c15939465aec2495eb6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Idiota object types tree - A tree (directory listing) object that represents the directory structure in a tree object. commit(ref) - A object that represents the changes in a single commit. blob - A blob object that represents a file or a piece of...
22.32197
102
0.589004
__author__ = "prakashsellathurai" __copyright__ = "Copyright 2021" __version__ = "1.0.1" __email__ = "prakashsellathurai@gmail.com" import os import hashlib import shutil import json from collections import namedtuple from contextlib import contextmanager GIT_DIR = None RefValue = namedtuple('RefValue', ['symbo...
true
true
f704b968b6da8f6293a4c1d3f9417ce9c6268bfa
15,401
py
Python
libcxx/utils/libcxx/test/newformat.py
LevyForchh/llvm-project
904c0865dfaef343245d6496623f187c4cdc1b61
[ "Apache-2.0" ]
null
null
null
libcxx/utils/libcxx/test/newformat.py
LevyForchh/llvm-project
904c0865dfaef343245d6496623f187c4cdc1b61
[ "Apache-2.0" ]
9
2020-04-24T21:51:04.000Z
2020-11-06T01:04:09.000Z
libcxx/utils/libcxx/test/newformat.py
LevyForchh/llvm-project
904c0865dfaef343245d6496623f187c4cdc1b61
[ "Apache-2.0" ]
null
null
null
#===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===----------------------------------...
50.661184
128
0.60087
mport lit import os import pipes import re import subprocess class CxxStandardLibraryTest(lit.formats.TestFormat): def getTestsInDirectory(self, testSuite, pathInSuite, litConfig, localConfig): SUPPORTED_SUFFIXES = ['[.]pass[.]cpp$', '[.]pass[.]mm$', '[.]run[.]fail[.]cpp$', ...
true
true
f704b9fd1df872c794b4f8b835d03462af5fb8c8
3,282
py
Python
UpWork_Projects/Will Farell_Spiders/innerwest/innerwest/settings.py
SurendraTamang/Web-Scrapping
2bb60cce9010b4b68f5c11bf295940832bb5df50
[ "MIT" ]
null
null
null
UpWork_Projects/Will Farell_Spiders/innerwest/innerwest/settings.py
SurendraTamang/Web-Scrapping
2bb60cce9010b4b68f5c11bf295940832bb5df50
[ "MIT" ]
null
null
null
UpWork_Projects/Will Farell_Spiders/innerwest/innerwest/settings.py
SurendraTamang/Web-Scrapping
2bb60cce9010b4b68f5c11bf295940832bb5df50
[ "MIT" ]
1
2022-01-18T17:15:51.000Z
2022-01-18T17:15:51.000Z
# -*- coding: utf-8 -*- # Scrapy settings for innerwest project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/t...
34.1875
103
0.777575
BOT_NAME = 'Googlebot' SPIDER_MODULES = ['innerwest.spiders'] NEWSPIDER_MODULE = 'innerwest.spiders' ROBOTSTXT_OBEY = False DOWNLOADER_MIDDLEWARES = { 'scrapy_selenium.SeleniumMiddleware': 800, } 'chrome' SELENIUM_DRIVER_EXECUTABLE_PATH = "../chromedrive...
true
true
f704bd5d6983569ac694551a583366b858070681
4,151
py
Python
legged_gym/envs/anymal_c/anymal.py
mcx/legged_gym
dd6a6892e54c4f111a203319c05da8dca9595ae1
[ "BSD-3-Clause" ]
159
2021-10-30T02:53:14.000Z
2022-03-31T20:59:20.000Z
legged_gym/envs/anymal_c/anymal.py
mcx/legged_gym
dd6a6892e54c4f111a203319c05da8dca9595ae1
[ "BSD-3-Clause" ]
13
2021-11-01T06:57:56.000Z
2022-03-19T07:16:47.000Z
legged_gym/envs/anymal_c/anymal.py
mcx/legged_gym
dd6a6892e54c4f111a203319c05da8dca9595ae1
[ "BSD-3-Clause" ]
49
2021-11-01T03:00:38.000Z
2022-03-31T21:00:30.000Z
# SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of sourc...
51.246914
161
0.747049
from time import time import numpy as np import os from isaacgym.torch_utils import * from isaacgym import gymtorch, gymapi, gymutil import torch from typing import Tuple, Dict from legged_gym.envs import LeggedRobot from legged_gym import LEGGED_GYM_ROOT_DIR from .mixed_terrains.anyma...
true
true
f704bde830d47e285d80fa6723a8d574657b41c6
2,358
py
Python
clcd/rnn_train/RNNConfig.py
felipessalvatore/CLCD
422f9e93d49e4fcfd8048ad5b36898f8713d0370
[ "MIT" ]
4
2020-02-06T19:35:13.000Z
2021-09-04T10:29:11.000Z
clcd/rnn_train/RNNConfig.py
felipessalvatore/CLCD
422f9e93d49e4fcfd8048ad5b36898f8713d0370
[ "MIT" ]
null
null
null
clcd/rnn_train/RNNConfig.py
felipessalvatore/CLCD
422f9e93d49e4fcfd8048ad5b36898f8713d0370
[ "MIT" ]
null
null
null
class RNNConfig(object): """ Holds logistic regression model hyperparams. :param height: image height :type heights: int :param width: image width :type width: int :param channels: image channels :type channels: int :param batch_size: batch size for training :type batch_size: in...
34.173913
67
0.56743
class RNNConfig(object): def __init__(self, vocab_size=25000, batch_size=32, embedding_dim=100, rnn_dim=100, output_dim=2, layers=1, epochs=8, learning_rate=0.01, ...
true
true
f704bec2aa2f0c4a7762297c633a64db6aef42a5
231
py
Python
Problems/HackerRank/weird.py
kvlizhvn/Lab_7
e7f7f8da2b5f52a426bb55981594fb8ddcbd127a
[ "MIT" ]
1
2022-02-18T15:44:46.000Z
2022-02-18T15:44:46.000Z
Problems/HackerRank/weird.py
kvlizhvn/Lab_7
e7f7f8da2b5f52a426bb55981594fb8ddcbd127a
[ "MIT" ]
null
null
null
Problems/HackerRank/weird.py
kvlizhvn/Lab_7
e7f7f8da2b5f52a426bb55981594fb8ddcbd127a
[ "MIT" ]
1
2021-03-26T13:55:52.000Z
2021-03-26T13:55:52.000Z
if __name__ == '__main__': n = int(input().strip()) if n % 2 != 0: print("Weird") elif 2 <= n <= 5: print("Not Weird") elif 6 <= n <= 20: print("Weird") else: print("Not Weird")
19.25
28
0.441558
if __name__ == '__main__': n = int(input().strip()) if n % 2 != 0: print("Weird") elif 2 <= n <= 5: print("Not Weird") elif 6 <= n <= 20: print("Weird") else: print("Not Weird")
true
true
f704bf1e7920df37e01acd48750fcd9d28294a7e
1,913
py
Python
tools/client.py
gitter-badger/electrs
a797a3864e1215a671b1d6a4efa5268c96d3f55d
[ "MIT" ]
null
null
null
tools/client.py
gitter-badger/electrs
a797a3864e1215a671b1d6a4efa5268c96d3f55d
[ "MIT" ]
null
null
null
tools/client.py
gitter-badger/electrs
a797a3864e1215a671b1d6a4efa5268c96d3f55d
[ "MIT" ]
null
null
null
import hashlib import json import sys from logbook import Logger, StreamHandler from pycoin.coins.bitcoin.networks import BitcoinMainnet import pycoin.ui.key_from_text import pycoin.key import socket script_for_address = BitcoinMainnet.ui.script_for_address log = Logger(__name__) class Connection: def __init_...
28.984848
74
0.547308
import hashlib import json import sys from logbook import Logger, StreamHandler from pycoin.coins.bitcoin.networks import BitcoinMainnet import pycoin.ui.key_from_text import pycoin.key import socket script_for_address = BitcoinMainnet.ui.script_for_address log = Logger(__name__) class Connection: def __init_...
true
true
f704c0b981e5c808fcf2d361794e61ab733573e8
400
py
Python
backend/auth/urls.py
Aquinology/Inel_Music
15fe344e9932389df09e6219d2b1ae030cfd1219
[ "MIT" ]
null
null
null
backend/auth/urls.py
Aquinology/Inel_Music
15fe344e9932389df09e6219d2b1ae030cfd1219
[ "MIT" ]
null
null
null
backend/auth/urls.py
Aquinology/Inel_Music
15fe344e9932389df09e6219d2b1ae030cfd1219
[ "MIT" ]
1
2021-02-18T11:20:34.000Z
2021-02-18T11:20:34.000Z
from django.urls import path from .views import MyObtainTokenPairView, RegisterView from rest_framework_simplejwt.views import TokenRefreshView urlpatterns = [ path('login/', MyObtainTokenPairView.as_view(), name='token_obtain_pair'), path('login/refresh/', TokenRefreshView.as_view(), name='token_refre...
36.363636
79
0.75
from django.urls import path from .views import MyObtainTokenPairView, RegisterView from rest_framework_simplejwt.views import TokenRefreshView urlpatterns = [ path('login/', MyObtainTokenPairView.as_view(), name='token_obtain_pair'), path('login/refresh/', TokenRefreshView.as_view(), name='token_refre...
true
true
f704c0f9b4488488f3aae9f679bb84275d8e52d4
11,405
py
Python
src/core/src/core_logic/PackageFilter.py
Azure/LinuxPatchExtension
6af622afb4298805bdf47328d6bc66a785f7166b
[ "Apache-2.0" ]
4
2020-06-01T14:36:30.000Z
2021-08-24T16:55:50.000Z
src/core/src/core_logic/PackageFilter.py
Azure/LinuxPatchExtension
6af622afb4298805bdf47328d6bc66a785f7166b
[ "Apache-2.0" ]
34
2020-09-11T17:20:42.000Z
2022-03-28T14:08:44.000Z
src/core/src/core_logic/PackageFilter.py
Azure/LinuxPatchExtension
6af622afb4298805bdf47328d6bc66a785f7166b
[ "Apache-2.0" ]
1
2020-12-28T10:13:20.000Z
2020-12-28T10:13:20.000Z
# Copyright 2020 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
65.924855
216
0.728979
from core.src.bootstrap.Constants import Constants import fnmatch class PackageFilter(object): def __init__(self, execution_config, composite_logger): self.execution_config = execution_config self.composite_logger = composite_logger self.global_excluded_packages...
true
true
f704c10fdcec8a9d3f12a9f1b47e921161913390
1,253
py
Python
scripts/activate_amplifier.py
drocx/RPi-Jukebox-RFID
1e211c2f4571a86d97747fe9094a34931de8b7c1
[ "MIT" ]
1
2020-03-24T20:27:07.000Z
2020-03-24T20:27:07.000Z
scripts/activate_amplifier.py
drocx/RPi-Jukebox-RFID
1e211c2f4571a86d97747fe9094a34931de8b7c1
[ "MIT" ]
null
null
null
scripts/activate_amplifier.py
drocx/RPi-Jukebox-RFID
1e211c2f4571a86d97747fe9094a34931de8b7c1
[ "MIT" ]
1
2019-10-06T16:33:52.000Z
2019-10-06T16:33:52.000Z
#!/usr/bin/python3 import sys from signal import pause import RPi.GPIO as GPIO # script to activate and deactivate an amplifier, power led, etc. using a GPIO # pin on power up / down # see for an example implementation with a PAM8403 digital amplifier # (PAM pin 12 connected to GPIO 26) # https://github.com/MiczFlor...
26.659574
92
0.703113
import sys from signal import pause import RPi.GPIO as GPIO AMP_GPIO = 26 GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(AMP_GPIO, GPIO.OUT) def set_amplifier(status): if status: print("Setting amplifier: ON") GPIO.output(AMP_GPIO, GPIO.HIGH) else: print("S...
true
true
f704c2d7e17f9fd856996531dcce0fe615f4d3e0
755
py
Python
tests/create_config.py
throne/throne-cli
5cc66165b858d9a22c65aac8269523ca1e89cbee
[ "BSD-3-Clause-Clear" ]
4
2021-05-25T05:56:05.000Z
2022-03-24T21:37:04.000Z
tests/create_config.py
throne/throne-cli
5cc66165b858d9a22c65aac8269523ca1e89cbee
[ "BSD-3-Clause-Clear" ]
9
2021-04-22T18:43:48.000Z
2021-09-05T05:11:59.000Z
tests/create_config.py
throne/throne-cli
5cc66165b858d9a22c65aac8269523ca1e89cbee
[ "BSD-3-Clause-Clear" ]
1
2021-04-26T07:07:09.000Z
2021-04-26T07:07:09.000Z
import os import time from click.testing import CliRunner from bin.throne import cli as throne runner = CliRunner() shodan_key = os.getenv('SHODAN_KEY') throne_user = os.getenv('THRONE_USER') throne_pass = os.getenv('THRONE_PASS') def test_throne_setapi(): print("Testing: throne api setapi") response = runne...
34.318182
103
0.717881
import os import time from click.testing import CliRunner from bin.throne import cli as throne runner = CliRunner() shodan_key = os.getenv('SHODAN_KEY') throne_user = os.getenv('THRONE_USER') throne_pass = os.getenv('THRONE_PASS') def test_throne_setapi(): print("Testing: throne api setapi") response = runne...
true
true
f704c4328e33a065550916c30d7752a440d3bddf
16,427
py
Python
senlin-7.0.0/senlin/objects/fields.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
senlin-7.0.0/senlin/objects/fields.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
senlin-7.0.0/senlin/objects/fields.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
30.647388
79
0.603397
from oslo_config import cfg from oslo_serialization import jsonutils from oslo_utils import strutils from oslo_utils import uuidutils from oslo_versionedobjects import fields import re import six from senlin.common import consts from senlin.common.i18n import _ CONF = cfg.CONF FlexibleBooleanField = fi...
true
true
f704c46b173fb645449a9542a94234ae033a96b3
5,712
py
Python
view/__init__.py
sadlll/ablog
d04b532751c297fe9cd25563d08f48e8aaee7f48
[ "Apache-2.0" ]
null
null
null
view/__init__.py
sadlll/ablog
d04b532751c297fe9cd25563d08f48e8aaee7f48
[ "Apache-2.0" ]
null
null
null
view/__init__.py
sadlll/ablog
d04b532751c297fe9cd25563d08f48e8aaee7f48
[ "Apache-2.0" ]
1
2020-09-14T07:09:34.000Z
2020-09-14T07:09:34.000Z
# coding:utf-8 import json import random import string import tornado.web import config from lib.jsdict import JsDict from model.user import User # route class Route(object): urls = [] def __call__(self, url, name=None): def _(cls): self.urls.append(tornado.web.URLSpec(url, cls, name=nam...
25.386667
107
0.605042
import json import random import string import tornado.web import config from lib.jsdict import JsDict from model.user import User class Route(object): urls = [] def __call__(self, url, name=None): def _(cls): self.urls.append(tornado.web.URLSpec(url, cls, name=name)) retur...
true
true
f704c490c9753e311455f361ab6740be9fccc6f7
6,062
py
Python
sdks/python/apache_beam/coders/standard_coders_test.py
bschell/beam
5533acff51cf6157d62a63c60eb3f074f1958df5
[ "Apache-2.0" ]
1
2018-12-03T09:37:01.000Z
2018-12-03T09:37:01.000Z
sdks/python/apache_beam/coders/standard_coders_test.py
bschell/beam
5533acff51cf6157d62a63c60eb3f074f1958df5
[ "Apache-2.0" ]
2
2018-09-09T16:51:47.000Z
2018-09-16T15:55:50.000Z
sdks/python/apache_beam/coders/standard_coders_test.py
bschell/beam
5533acff51cf6157d62a63c60eb3f074f1958df5
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
37.8875
79
0.682118
from __future__ import absolute_import from __future__ import print_function import json import logging import os.path import sys import unittest from builtins import map import yaml from apache_beam.coders import coder_impl from apache_beam.coders import coders from apache_beam.transforms import wi...
true
true
f704c56086b8ba866a205345226d91d6b051226d
200
py
Python
RULEngine/Game/Field.py
wonwon0/RobocupStrategyIA
891028f616d476b05b23b40924d7c99502a718e3
[ "MIT" ]
null
null
null
RULEngine/Game/Field.py
wonwon0/RobocupStrategyIA
891028f616d476b05b23b40924d7c99502a718e3
[ "MIT" ]
null
null
null
RULEngine/Game/Field.py
wonwon0/RobocupStrategyIA
891028f616d476b05b23b40924d7c99502a718e3
[ "MIT" ]
null
null
null
# Under MIT License, see LICENSE.txt class Field(): def __init__(self, ball): self.ball = ball def move_ball(self, position, delta): self.ball.set_position(position, delta)
20
47
0.655
class Field(): def __init__(self, ball): self.ball = ball def move_ball(self, position, delta): self.ball.set_position(position, delta)
true
true
f704c67d98e3a2a857e70406e7c669c763faa37b
3,213
py
Python
setup.py
altosaar/nomen
29170a2011decbc9aa4cae48bd5d8d291a6d9fb8
[ "MIT" ]
4
2016-12-22T16:37:52.000Z
2017-05-31T11:12:57.000Z
setup.py
altosaar/nomen
29170a2011decbc9aa4cae48bd5d8d291a6d9fb8
[ "MIT" ]
2
2016-12-23T06:15:31.000Z
2019-03-21T21:36:03.000Z
setup.py
altosaar/nomen
29170a2011decbc9aa4cae48bd5d8d291a6d9fb8
[ "MIT" ]
1
2018-07-05T21:14:59.000Z
2018-07-05T21:14:59.000Z
#!/usr/bin/env python # setup # Setup script for installing nomen ########################################################################## ## Imports ########################################################################## import os import re import codecs from setuptools import setup from setuptools import find...
28.945946
79
0.517585
true
true
f704c68356b63c2761fa7eec5a286419626cb51a
407
py
Python
confdgnmi/src/confd_gnmi_netconf_adapter.py
micnovak/ConfD-Demos
479499e7c5339ae77b611e17196e7516d1f1a1ce
[ "Apache-2.0" ]
11
2019-12-07T20:15:57.000Z
2022-02-04T18:12:52.000Z
confdgnmi/src/confd_gnmi_netconf_adapter.py
micnovak/ConfD-Demos
479499e7c5339ae77b611e17196e7516d1f1a1ce
[ "Apache-2.0" ]
2
2020-03-01T11:04:16.000Z
2021-02-03T14:17:23.000Z
confdgnmi/src/confd_gnmi_netconf_adapter.py
micnovak/ConfD-Demos
479499e7c5339ae77b611e17196e7516d1f1a1ce
[ "Apache-2.0" ]
6
2019-10-18T15:26:03.000Z
2021-01-13T10:28:30.000Z
from confd_gnmi_adapter import GnmiServerAdapter class GnmiNetconfServerAdapter(GnmiServerAdapter): @classmethod def get_adapter(cls): pass def set(self, prefix, path, val): pass def get_subscription_handler(self, subscription_list): pass def capabilities(self): ...
19.380952
58
0.670762
from confd_gnmi_adapter import GnmiServerAdapter class GnmiNetconfServerAdapter(GnmiServerAdapter): @classmethod def get_adapter(cls): pass def set(self, prefix, path, val): pass def get_subscription_handler(self, subscription_list): pass def capabilities(self): ...
true
true
f704c6f312d2240524282b8c816c45e6b8714e15
36,146
py
Python
lightseq/training/ops/pytorch/torch_transformer_layers.py
iRmantou/lightseq
9a617306fa711a3d6a25ef3eab9bfbe408692189
[ "Apache-2.0" ]
1
2022-03-27T17:16:16.000Z
2022-03-27T17:16:16.000Z
lightseq/training/ops/pytorch/torch_transformer_layers.py
iRmantou/lightseq
9a617306fa711a3d6a25ef3eab9bfbe408692189
[ "Apache-2.0" ]
null
null
null
lightseq/training/ops/pytorch/torch_transformer_layers.py
iRmantou/lightseq
9a617306fa711a3d6a25ef3eab9bfbe408692189
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The LightSeq Team # Copyright Facebook Fairseq # We use layers from Facebook Fairseq as our baseline import math import uuid from typing import Dict, Optional, Tuple, List import torch import torch.nn.functional as F from torch import Tensor, nn from torch.nn import Parameter, LayerNorm, Dropout, L...
38.290254
88
0.592099
import math import uuid from typing import Dict, Optional, Tuple, List import torch import torch.nn.functional as F from torch import Tensor, nn from torch.nn import Parameter, LayerNorm, Dropout, Linear from lightseq.training.ops.pytorch import util from lightseq.training.ops.pytorch.layer_base import ( Tr...
true
true
f704c7064a6678cc5c17790c675482e38ef55a1b
2,392
py
Python
api/server/swagger_server/models/api_generate_code_response.py
srishtipithadia/mlx
2fb61a8840696c7ede77cd600caa8922178ec8b0
[ "Apache-2.0" ]
null
null
null
api/server/swagger_server/models/api_generate_code_response.py
srishtipithadia/mlx
2fb61a8840696c7ede77cd600caa8922178ec8b0
[ "Apache-2.0" ]
1
2021-09-21T23:31:13.000Z
2021-09-21T23:31:13.000Z
api/server/swagger_server/models/api_generate_code_response.py
srishtipithadia/mlx
2fb61a8840696c7ede77cd600caa8922178ec8b0
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
29.9
91
0.669314
from __future__ import absolute_import from datetime import date, datetime from typing import List, Dict from swagger_server.models.base_model_ import Model from swagger_server import util class ApiGenerateCodeResponse(Model): def __init__(self, script: str=None): self.swagger_type...
true
true
f704c748c77fe552c4d56bef1c5dbb0e85cd8b5f
917
py
Python
abc231/c/main.py
nakamuloud/atcoder
aa986bc31ed050bac983888ec500c47f9d12ad2a
[ "MIT" ]
null
null
null
abc231/c/main.py
nakamuloud/atcoder
aa986bc31ed050bac983888ec500c47f9d12ad2a
[ "MIT" ]
null
null
null
abc231/c/main.py
nakamuloud/atcoder
aa986bc31ed050bac983888ec500c47f9d12ad2a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right # type: ignore from collections import Counter, defaultdict, deque # type: ignore from fractions import gcd # type: ignore from heapq import heapify, heappop, heappush, heappushpop, heapreplace, ...
26.970588
103
0.61614
import sys from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right from collections import Counter, defaultdict, deque from fractions import gcd from heapq import heapify, heappop, heappush, heappushpop, heapreplace, merge from itertools import accumulate, combinations, permutat...
true
true
f704c7ac312e7babdba94522a4ea34a2966ab06b
4,574
py
Python
test/dpt_tests/dpt_time_test.py
cyberjunky/xknx
c708ed6a2ca6449b74c6cea197d658e3399b99d1
[ "MIT" ]
1
2020-12-09T16:17:49.000Z
2020-12-09T16:17:49.000Z
test/dpt_tests/dpt_time_test.py
cyberjunky/xknx
c708ed6a2ca6449b74c6cea197d658e3399b99d1
[ "MIT" ]
null
null
null
test/dpt_tests/dpt_time_test.py
cyberjunky/xknx
c708ed6a2ca6449b74c6cea197d658e3399b99d1
[ "MIT" ]
null
null
null
"""Unit test for KNX time objects.""" import unittest from xknx.dpt import DPTTime, DPTWeekday from xknx.exceptions import ConversionError class TestDPTTime(unittest.TestCase): """Test class for KNX time objects.""" # # TEST NORMAL TIME # def test_from_knx(self): """Test parsing of DPTTi...
35.184615
94
0.555969
import unittest from xknx.dpt import DPTTime, DPTWeekday from xknx.exceptions import ConversionError class TestDPTTime(unittest.TestCase): def test_from_knx(self): self.assertEqual(DPTTime().from_knx((0x4D, 0x17, 0x2A)), {'weekday': DPTWeekday.TUESDAY, ...
true
true
f704c9482c2b74b28c4faceee71e9f4dcabea3a3
316
py
Python
johann/__init__.py
lobotmcj/johann
c188c6f31446907a5d6a237191540856f02a91a0
[ "BSD-3-Clause" ]
11
2020-08-27T18:33:09.000Z
2022-03-18T03:09:03.000Z
johann/__init__.py
johannsdg/johann
c188c6f31446907a5d6a237191540856f02a91a0
[ "BSD-3-Clause" ]
null
null
null
johann/__init__.py
johannsdg/johann
c188c6f31446907a5d6a237191540856f02a91a0
[ "BSD-3-Clause" ]
2
2020-09-04T03:07:35.000Z
2020-11-06T19:08:03.000Z
# Copyright (c) 2019-present, The Johann Authors. All Rights Reserved. # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE file. See the AUTHORS file for names of contributors. """Johann, lightweight and flexible scenario orchestration""" __version__ = "0.3.0-alpha"
39.5
79
0.759494
__version__ = "0.3.0-alpha"
true
true
f704cb298b4264480818031b4a5dc27b92ebb46c
2,543
py
Python
o3seespy/command/layer.py
vijaypolimeru/o3seespy
c9ef0c27f685de705721b10eb1ea81c3a3c24c4e
[ "MIT", "BSD-3-Clause" ]
null
null
null
o3seespy/command/layer.py
vijaypolimeru/o3seespy
c9ef0c27f685de705721b10eb1ea81c3a3c24c4e
[ "MIT", "BSD-3-Clause" ]
1
2021-06-25T15:33:31.000Z
2021-06-25T15:33:31.000Z
o3seespy/command/layer.py
millen1m/o3seespy
7eead6aef8055f73af39b969e0d3499a67e1737f
[ "MIT", "BSD-3-Clause" ]
1
2020-12-12T21:01:42.000Z
2020-12-12T21:01:42.000Z
from o3seespy.base_model import OpenSeesObject class LayerBase(OpenSeesObject): op_base_type = "layer" class Straight(LayerBase): """ The Straight Layer Class The layer command is used to generate a number of fibers along a line or a circular arc. """ op_type = 'straight' def __ini...
31.012195
119
0.604404
from o3seespy.base_model import OpenSeesObject class LayerBase(OpenSeesObject): op_base_type = "layer" class Straight(LayerBase): op_type = 'straight' def __init__(self, osi, mat, num_fiber, area_fiber, start, end): self.mat = mat self.num_fiber = int(num_fiber) self.area_fiber ...
true
true
f704ccc2e536cf7aaa02ae1d2d184594cab08683
14,888
py
Python
analyze.py
davidmam/BirdNET-Pi
873c8f4c56b30edb9297134a92a7c5a178c390e4
[ "Apache-2.0" ]
null
null
null
analyze.py
davidmam/BirdNET-Pi
873c8f4c56b30edb9297134a92a7c5a178c390e4
[ "Apache-2.0" ]
null
null
null
analyze.py
davidmam/BirdNET-Pi
873c8f4c56b30edb9297134a92a7c5a178c390e4
[ "Apache-2.0" ]
null
null
null
# BirdWeather edits by @timsterc # Other edits by @CaiusX and @mcguirepr89 import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' os.environ['CUDA_VISIBLE_DEVICES'] = '' try: import tflite_runtime.interpreter as tflite except: from tensorflow import lite as tflite import argparse import operator import librosa im...
42.056497
272
0.558907
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' os.environ['CUDA_VISIBLE_DEVICES'] = '' try: import tflite_runtime.interpreter as tflite except: from tensorflow import lite as tflite import argparse import operator import librosa import numpy as np import math import time from decimal import Decimal impo...
true
true
f704ccdab8daddc07843c80260a004c3a4b58cc3
40,273
py
Python
tests/unit_test/action/action_test.py
Anitej/kairon
61d6bd7f230a744303abab42e3b54b0381fee7da
[ "Apache-2.0" ]
null
null
null
tests/unit_test/action/action_test.py
Anitej/kairon
61d6bd7f230a744303abab42e3b54b0381fee7da
[ "Apache-2.0" ]
null
null
null
tests/unit_test/action/action_test.py
Anitej/kairon
61d6bd7f230a744303abab42e3b54b0381fee7da
[ "Apache-2.0" ]
null
null
null
import json import os os.environ["system_file"] = "./tests/testing_data/system.yaml" from typing import Dict, Text, Any, List import pytest import responses from mongoengine import connect, disconnect from rasa_sdk import Tracker from rasa_sdk.executor import CollectingDispatcher from kairon.action_server.data_object...
45.098544
196
0.596653
import json import os os.environ["system_file"] = "./tests/testing_data/system.yaml" from typing import Dict, Text, Any, List import pytest import responses from mongoengine import connect, disconnect from rasa_sdk import Tracker from rasa_sdk.executor import CollectingDispatcher from kairon.action_server.data_object...
true
true
f704ce218171769e1c7e83c8096eabe16908d3e6
848
py
Python
des039.py
LeonardoPereirajr/Curso_em_video_Python
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
[ "MIT" ]
null
null
null
des039.py
LeonardoPereirajr/Curso_em_video_Python
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
[ "MIT" ]
null
null
null
des039.py
LeonardoPereirajr/Curso_em_video_Python
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
[ "MIT" ]
null
null
null
from datetime import date ano = int(input('ANO de nascimento : ')) ano_hoje = date.today().year cont = ano_hoje - ano if cont > 20 : print(' Quem nasceu em {} tem {} anos em {} . '.format(ano, cont, ano_hoje)) print(' Sua classificação é MASTER. ') elif cont == 20 : print(' Quem nasceu em {} tem ...
44.631579
82
0.597877
from datetime import date ano = int(input('ANO de nascimento : ')) ano_hoje = date.today().year cont = ano_hoje - ano if cont > 20 : print(' Quem nasceu em {} tem {} anos em {} . '.format(ano, cont, ano_hoje)) print(' Sua classificação é MASTER. ') elif cont == 20 : print(' Quem nasceu em {} tem ...
true
true
f704ce6b1a36073883d29f973825dd98381f1c4b
443
py
Python
setup.py
msikma/upprint
b617eb7d0a661fb3107d85471520270647766906
[ "MIT" ]
null
null
null
setup.py
msikma/upprint
b617eb7d0a661fb3107d85471520270647766906
[ "MIT" ]
null
null
null
setup.py
msikma/upprint
b617eb7d0a661fb3107d85471520270647766906
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name='upprint', packages=['upprint'], version='0.1', description='Modified version of pprint with better Unicode output', author='Michiel Sikma', author_email='michiel@sikma.org', url='https://github.com/msikma/upprint', download_url='https://gith...
27.6875
72
0.670429
from distutils.core import setup setup( name='upprint', packages=['upprint'], version='0.1', description='Modified version of pprint with better Unicode output', author='Michiel Sikma', author_email='michiel@sikma.org', url='https://github.com/msikma/upprint', download_url='https://gith...
true
true
f704ce98035e4ea27201a97a216cc694ba65d79b
4,375
py
Python
tests/test_tokenizers.py
DLPerf/gretel-synthetics
58a820327e283ecc224de3686aa035b7e32bfaa6
[ "Apache-2.0" ]
252
2020-03-02T16:41:11.000Z
2022-03-28T20:57:15.000Z
tests/test_tokenizers.py
DLPerf/gretel-synthetics
58a820327e283ecc224de3686aa035b7e32bfaa6
[ "Apache-2.0" ]
39
2020-03-16T18:33:48.000Z
2021-11-10T19:13:53.000Z
tests/test_tokenizers.py
DLPerf/gretel-synthetics
58a820327e283ecc224de3686aa035b7e32bfaa6
[ "Apache-2.0" ]
36
2020-05-21T14:45:27.000Z
2022-03-01T01:32:58.000Z
from pathlib import Path from copy import deepcopy import pytest from gretel_synthetics.config import BaseConfig import gretel_synthetics.tokenizers as tok class SimpleConfig(BaseConfig): """Used for simple tokenization tests """ def get_generator_class(self): return None def get_training...
36.157025
244
0.688229
from pathlib import Path from copy import deepcopy import pytest from gretel_synthetics.config import BaseConfig import gretel_synthetics.tokenizers as tok class SimpleConfig(BaseConfig): def get_generator_class(self): return None def get_training_callable(self): return None @pytest.fix...
true
true
f704d041172d3126183353d0f84901d0084003b4
82,008
py
Python
aiida/backends/tests/export_and_import.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/export_and_import.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/export_and_import.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
39.257061
114
0.574005
t tempfile from aiida.orm import load_node from aiida.orm.data.base import Str, Int, Float, Bool from aiida.orm.importexport import export temp_folder = tempfile.mkdtemp() try: values = ("Hello", 6, -1.2399834e12, False) filename...
true
true
f704d12c29a0d4090d125d43a95bf1b2c7c9f9ab
1,372
py
Python
mvfy/visual/utils/streamer.py
erwingforerocastro/mvfy_visual_py
8740f21ffa68d0cfced0d0684251b2198488cb0e
[ "MIT" ]
null
null
null
mvfy/visual/utils/streamer.py
erwingforerocastro/mvfy_visual_py
8740f21ffa68d0cfced0d0684251b2198488cb0e
[ "MIT" ]
null
null
null
mvfy/visual/utils/streamer.py
erwingforerocastro/mvfy_visual_py
8740f21ffa68d0cfced0d0684251b2198488cb0e
[ "MIT" ]
null
null
null
import asyncio import base64 import threading import cv2 import numpy as np from flask_socketio import SocketIO, emit from flask import Flask, render_template import multiprocessing class Streamer(): def __init__(self) -> None: """Constructor """ @staticmethod async def stream_s...
25.886792
92
0.573615
import asyncio import base64 import threading import cv2 import numpy as np from flask_socketio import SocketIO, emit from flask import Flask, render_template import multiprocessing class Streamer(): def __init__(self) -> None: @staticmethod async def stream_socket( url_server: str, ...
true
true
f704d16684d90b723369d286ddc555a9a4d93ac8
4,271
py
Python
flask_tutorial/marshmallow_demo/flask_exmaple.py
ftconan/python3
eb63ba33960072f792ecce6db809866b38c402f8
[ "MIT" ]
1
2018-12-19T22:07:56.000Z
2018-12-19T22:07:56.000Z
marshmallow_demo/flask_exmaple.py
ftconan/flask-tutorial
d5164c93b5e6a6e3d2b8980e4b846adb7cb21aee
[ "MIT" ]
12
2020-03-14T05:32:26.000Z
2022-03-12T00:08:49.000Z
marshmallow_demo/flask_exmaple.py
ftconan/flask-tutorial
d5164c93b5e6a6e3d2b8980e4b846adb7cb21aee
[ "MIT" ]
1
2018-12-19T22:08:00.000Z
2018-12-19T22:08:00.000Z
# coding=utf-8 """ @author: magician @date: 2018/9/14 """ import datetime from flask_sqlalchemy import SQLAlchemy from flask import Flask, jsonify, request from sqlalchemy.exc import IntegrityError from marshmallow import Schema, fields, ValidationError, pre_load app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_...
27.733766
82
0.661203
import datetime from flask_sqlalchemy import SQLAlchemy from flask import Flask, jsonify, request from sqlalchemy.exc import IntegrityError from marshmallow import Schema, fields, ValidationError, pre_load app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://' app.config['SQLALCHEMY_TRACK_MODIFICA...
true
true
f704d2308a4a0e9874c346c623e3850cac9abfa5
6,064
py
Python
frappe/tests/test_twofactor.py
snehapatil1/frappe
dd2c33e34ad120e6305a2fa230a72d23a7a03e98
[ "MIT" ]
1
2020-12-07T22:35:21.000Z
2020-12-07T22:35:21.000Z
frappe/tests/test_twofactor.py
snehapatil1/frappe
dd2c33e34ad120e6305a2fa230a72d23a7a03e98
[ "MIT" ]
11
2018-04-01T18:36:05.000Z
2018-10-04T07:56:07.000Z
frappe/tests/test_twofactor.py
snehapatil1/frappe
dd2c33e34ad120e6305a2fa230a72d23a7a03e98
[ "MIT" ]
3
2018-01-16T17:59:55.000Z
2019-09-24T16:02:10.000Z
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest, frappe, pyotp from werkzeug.wrappers import Request from werkzeug.test import EnvironBuilder from frappe.auth import HTTPRequest from frappe.utils import cint fro...
35.255814
100
0.774571
from __future__ import unicode_literals import unittest, frappe, pyotp from werkzeug.wrappers import Request from werkzeug.test import EnvironBuilder from frappe.auth import HTTPRequest from frappe.utils import cint from frappe.twofactor import (should_run_2fa, authenticate_for_2factor, get_cached_user_pass, two_fa...
true
true
f704d2c864bad63628fb027f82d866b3cfbf5677
6,290
py
Python
conanfile.py
madebr/conan-swig_installer-1
20cd423f4a5e6e1b9e8a7633fa22ad429096c499
[ "MIT" ]
null
null
null
conanfile.py
madebr/conan-swig_installer-1
20cd423f4a5e6e1b9e8a7633fa22ad429096c499
[ "MIT" ]
null
null
null
conanfile.py
madebr/conan-swig_installer-1
20cd423f4a5e6e1b9e8a7633fa22ad429096c499
[ "MIT" ]
null
null
null
from conans import ConanFile, tools, AutoToolsBuildEnvironment from conans.errors import ConanInvalidConfiguration from contextlib import contextmanager import os import shutil class SwigConan(ConanFile): name = "swig_installer" version = "4.0.1" description = "SWIG is a software development tool that con...
46.592593
151
0.641017
from conans import ConanFile, tools, AutoToolsBuildEnvironment from conans.errors import ConanInvalidConfiguration from contextlib import contextmanager import os import shutil class SwigConan(ConanFile): name = "swig_installer" version = "4.0.1" description = "SWIG is a software development tool that con...
true
true
f704d309b2d0f6c310b68088e4d0a88caea2c3aa
1,168
py
Python
pv/wsgi.py
Dumbaz/autoradio-pv
8aae293e58b2e79a05956c535bb109f74edc89c3
[ "BSD-3-Clause" ]
null
null
null
pv/wsgi.py
Dumbaz/autoradio-pv
8aae293e58b2e79a05956c535bb109f74edc89c3
[ "BSD-3-Clause" ]
null
null
null
pv/wsgi.py
Dumbaz/autoradio-pv
8aae293e58b2e79a05956c535bb109f74edc89c3
[ "BSD-3-Clause" ]
null
null
null
""" WSGI config for pv 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_APPLICATION`` setti...
36.5
79
0.80137
import os import sys sys.path.append('/srv/pv/pv') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pv.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 # applic...
true
true
f704d3fbb8a78fe4a901efbbfcc7672e4820d792
2,293
py
Python
python/ray/tune/examples/zoopt_example.py
firebolt55439/ray
215300b070628c06f0106906fc6c03bd70ebf140
[ "Apache-2.0" ]
3
2020-12-03T17:48:45.000Z
2022-01-22T08:09:46.000Z
python/ray/tune/examples/zoopt_example.py
firebolt55439/ray
215300b070628c06f0106906fc6c03bd70ebf140
[ "Apache-2.0" ]
84
2021-03-06T08:02:56.000Z
2022-03-05T08:07:19.000Z
python/ray/tune/examples/zoopt_example.py
firebolt55439/ray
215300b070628c06f0106906fc6c03bd70ebf140
[ "Apache-2.0" ]
2
2020-05-22T15:36:27.000Z
2020-05-22T15:52:03.000Z
"""This example demonstrates the usage of ZOOptSearch. It also checks that it is usable with a separate scheduler. """ import time from ray import tune from ray.tune.suggest.zoopt import ZOOptSearch from ray.tune.schedulers import AsyncHyperBandScheduler from zoopt import ValueType # noqa: F401 def evaluation_fn(s...
30.573333
79
0.642826
import time from ray import tune from ray.tune.suggest.zoopt import ZOOptSearch from ray.tune.schedulers import AsyncHyperBandScheduler from zoopt import ValueType def evaluation_fn(step, width, height): time.sleep(0.1) return (0.1 + width * step / 100)**(-1) + height * 0.1 def easy_objective(config): ...
true
true
f704d464d0afc50d7816616dbcf9d13d85e6185a
3,897
py
Python
tests/unit/backend/chalice/api_server/mock_auth.py
isabella232/corpora-data-portal
09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9
[ "MIT" ]
null
null
null
tests/unit/backend/chalice/api_server/mock_auth.py
isabella232/corpora-data-portal
09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9
[ "MIT" ]
1
2021-02-23T22:56:13.000Z
2021-02-23T22:56:13.000Z
tests/unit/backend/chalice/api_server/mock_auth.py
isabella232/corpora-data-portal
09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9
[ "MIT" ]
null
null
null
import urllib import jose.jwt import time import random import sys import requests from flask import Flask, request, redirect, make_response, jsonify import subprocess # seconds until the token expires TOKEN_EXPIRES = 2 # A mocked out oauth server, which serves all the endpoints needed by the oauth type. class MockO...
32.747899
114
0.625353
import urllib import jose.jwt import time import random import sys import requests from flask import Flask, request, redirect, make_response, jsonify import subprocess TOKEN_EXPIRES = 2 class MockOauthApp: def __init__(self, port): self.port = port self.app = Flask("mock_oauth_app") ...
true
true
f704d4961f151943c889d1c38e2afd4fdd7bde3f
4,440
py
Python
topi/python/topi/x86/reduction.py
jheo4/incubator-tvm
c4c61cb766608fb2f0fd8c9facc480a43afed3f5
[ "Apache-2.0" ]
3
2021-02-23T22:06:01.000Z
2021-09-30T09:59:17.000Z
topi/python/topi/x86/reduction.py
jheo4/incubator-tvm
c4c61cb766608fb2f0fd8c9facc480a43afed3f5
[ "Apache-2.0" ]
4
2021-03-30T11:59:59.000Z
2022-03-12T00:40:23.000Z
topi/python/topi/x86/reduction.py
jheo4/incubator-tvm
c4c61cb766608fb2f0fd8c9facc480a43afed3f5
[ "Apache-2.0" ]
3
2021-07-20T07:40:15.000Z
2021-08-03T08:39:17.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...
36.694215
96
0.643919
from __future__ import absolute_import as _abs import tvm from .. import tag from .. import generic from ..util import get_const_tuple def _schedule_reduce(sch, op, is_idx_reduce=False): if is_idx_reduce: real_out = op.output(0) fused = sch[real_out].fuse(*sch[real_out].op.axis) ...
true
true
f704d5a672c42774980b2e28551ba3d1cd02079a
741
py
Python
micropython/boot.py
tinytux/sensor
2aa2a9ac34335c0b8579018f670b29455cfd47df
[ "MIT" ]
9
2015-01-16T17:12:20.000Z
2021-02-26T19:39:44.000Z
micropython/boot.py
tinytux/sensor
2aa2a9ac34335c0b8579018f670b29455cfd47df
[ "MIT" ]
null
null
null
micropython/boot.py
tinytux/sensor
2aa2a9ac34335c0b8579018f670b29455cfd47df
[ "MIT" ]
2
2017-02-14T05:15:03.000Z
2017-05-25T10:48:51.000Z
# boot.py -- runs on boot-up import pyb pyb.LED(3).on() # indicate we are waiting for switch press pyb.delay(2000) # wait for user to maybe press the switch switch_value = pyb.Switch()() # sample the switch at end of delay pyb.LED(3).off() # indicate that we finished w...
30.875
82
0.624831
import pyb pyb.LED(3).on() pyb.delay(2000) switch_value = pyb.Switch()() pyb.LED(3).off() pyb.LED(4).on() if switch_value: pyb.usb_mode('CDC+MSC') pyb.main('debug.py') else: pyb.usb_mode('CDC+HID') pyb.main('displaytemp...
true
true
f704d5d4ac02cfcd81c719c22d91a83721a4f86f
1,151
py
Python
Milestone2/L2_5_p5_test_vertical.py
4ntLu0/1051-Project
93ae9b8d312bd6e79949d878d3fb422282de703b
[ "Unlicense" ]
null
null
null
Milestone2/L2_5_p5_test_vertical.py
4ntLu0/1051-Project
93ae9b8d312bd6e79949d878d3fb422282de703b
[ "Unlicense" ]
null
null
null
Milestone2/L2_5_p5_test_vertical.py
4ntLu0/1051-Project
93ae9b8d312bd6e79949d878d3fb422282de703b
[ "Unlicense" ]
null
null
null
from Cimpl import * image = load_image(choose_file()) def flip_vertical(image: image) -> Image: vertical_image = copy(image) for x in range(get_width(image)): for y in range(get_height(image)): flipped_color = get_color(image, -x, y) set_color(vertical_image, x,...
28.073171
201
0.636838
from Cimpl import * image = load_image(choose_file()) def flip_vertical(image: image) -> Image: vertical_image = copy(image) for x in range(get_width(image)): for y in range(get_height(image)): flipped_color = get_color(image, -x, y) set_color(vertical_image, x,...
true
true
f704d62fcf2ec086efa3468b0494a0f1c3b01a19
2,675
py
Python
sc-actions-provider/app.py
Sage-Bionetworks-IT/cfn-cr-sc-actions-provider
f0550c6b810fbb437e24048de73d429b017750b4
[ "Apache-2.0" ]
null
null
null
sc-actions-provider/app.py
Sage-Bionetworks-IT/cfn-cr-sc-actions-provider
f0550c6b810fbb437e24048de73d429b017750b4
[ "Apache-2.0" ]
4
2020-04-28T20:24:30.000Z
2021-08-17T01:21:17.000Z
sc-actions-provider/app.py
Sage-Bionetworks-IT/cfn-cr-sc-actions-provider
f0550c6b810fbb437e24048de73d429b017750b4
[ "Apache-2.0" ]
1
2020-04-28T18:42:41.000Z
2020-04-28T18:42:41.000Z
import boto3 import json import logging from crhelper import CfnResource logger = logging.getLogger(__name__) helper = CfnResource( json_logging=False, log_level='DEBUG', boto_level='CRITICAL') try: sc = boto3.client("servicecatalog") except Exception as e: helper.init_failure(e) def get_parameters(even...
34.294872
86
0.644486
import boto3 import json import logging from crhelper import CfnResource logger = logging.getLogger(__name__) helper = CfnResource( json_logging=False, log_level='DEBUG', boto_level='CRITICAL') try: sc = boto3.client("servicecatalog") except Exception as e: helper.init_failure(e) def get_parameters(even...
true
true
f704d69bd77a243b1e77d53e8cb7b0fdb8daaf27
7,384
py
Python
src/secondaires/rapport/editeurs/bugedit_p/__init__.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
14
2015-08-21T19:15:21.000Z
2017-11-26T13:59:17.000Z
src/secondaires/rapport/editeurs/bugedit_p/__init__.py
vincent-lg/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
20
2015-09-29T20:50:45.000Z
2018-06-21T12:58:30.000Z
src/secondaires/rapport/editeurs/bugedit_p/__init__.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
3
2015-05-02T19:42:03.000Z
2018-09-06T10:55:00.000Z
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
41.717514
79
0.641522
from primaires.interpreteur.editeur.presentation import Presentation from primaires.interpreteur.editeur.description import Description from primaires.interpreteur.editeur.uniligne import Uniligne from primaires.interpreteur.editeur.entier import Entier from primaires.interpreteur.editeur...
true
true
f704d794aec6ae8e930cc4290ff291c234e2423c
16,527
py
Python
privatmarket_service.py
dimonklas/robotForPull
71485ba9612be4cb8916aae4ed6ca183a0f490ba
[ "Apache-2.0" ]
null
null
null
privatmarket_service.py
dimonklas/robotForPull
71485ba9612be4cb8916aae4ed6ca183a0f490ba
[ "Apache-2.0" ]
null
null
null
privatmarket_service.py
dimonklas/robotForPull
71485ba9612be4cb8916aae4ed6ca183a0f490ba
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import os import sys from dateutil import parser from datetime import datetime from pytz import timezone import re import datetime import dateutil.parser from datetime import timedelta def modify_test_data(initial_data): # set user name # initial_data['procuringEntity']['name'] = u'Товариство ...
39.538278
485
0.66104
import os import sys from dateutil import parser from datetime import datetime from pytz import timezone import re import datetime import dateutil.parser from datetime import timedelta def modify_test_data(initial_data): initial_data['procuringEntity']['name'] = u'ТОВ \"СФ \"РУБІЖНЕ\"' if 'contact...
true
true
f704d8c0caad083f0db74121655533699125a844
22,237
py
Python
test/input_gen/genModelsRecurrent_v2.py
corner4world/nntrainer
0f342e8f2a1ec95b4e712aa3390b21cf0ea4efae
[ "Apache-2.0" ]
null
null
null
test/input_gen/genModelsRecurrent_v2.py
corner4world/nntrainer
0f342e8f2a1ec95b4e712aa3390b21cf0ea4efae
[ "Apache-2.0" ]
null
null
null
test/input_gen/genModelsRecurrent_v2.py
corner4world/nntrainer
0f342e8f2a1ec95b4e712aa3390b21cf0ea4efae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # SPDX-License-Identifier: Apache-2.0 ## # Copyright (C) 2021 Jihoon Lee <jhoon.it.lee@samsung.com> # # @file genModelsRecurrent_v2.py # @date 19 October 2021 # @brief Generate recurrent model tcs # @author Jihoon lee <jhoon.it.lee@samsung.com> from recorder_v2 import record_v2, inspect_file fro...
48.765351
200
0.672168
from recorder_v2 import record_v2, inspect_file from zoneout import Zoneout import torch class FCUnroll(torch.nn.Module): def __init__(self, unroll_for=1, num_fc=1): super().__init__() self.fcs = torch.nn.ModuleList([torch.nn.Linear(1, 1) for i in range(num_fc)]) self.unroll_for = ...
true
true
f704d925011146519241475ec5938c87167815a6
1,196
py
Python
main.py
nikolabebic95/MaterialUiColorsScss
8f03999534424a84baca5bfd0031b90cf0cca0ae
[ "MIT" ]
null
null
null
main.py
nikolabebic95/MaterialUiColorsScss
8f03999534424a84baca5bfd0031b90cf0cca0ae
[ "MIT" ]
null
null
null
main.py
nikolabebic95/MaterialUiColorsScss
8f03999534424a84baca5bfd0031b90cf0cca0ae
[ "MIT" ]
null
null
null
import json import pathlib import urllib.request def main(): # https://gist.github.com/kawanet/a880c83f06d6baf742e45ac9ac52af96 url = 'https://gist.githubusercontent.com/kawanet/a880c83f06d6baf742e45ac9ac52af96/raw' \ '/b4fbc9a730394eb977277e73cc37b60955463f21/material-colors.json' json...
37.375
116
0.637124
import json import pathlib import urllib.request def main(): url = 'https://gist.githubusercontent.com/kawanet/a880c83f06d6baf742e45ac9ac52af96/raw' \ '/b4fbc9a730394eb977277e73cc37b60955463f21/material-colors.json' json_file_name = 'material-colors.json' urllib.request.urlretrieve...
true
true
f704d9ac6d70bd3e4025d4307a92b148575602ac
345
py
Python
bnn_mcmc_examples/examples/mlp/pima/setting1/hmc/sampler.py
papamarkou/bnn_mcmc_examples
7bb4ecfb33db4c30a8e61e31f528bda0efb24e3d
[ "MIT" ]
1
2021-09-09T15:55:37.000Z
2021-09-09T15:55:37.000Z
bnn_mcmc_examples/examples/mlp/pima/setting1/hmc/sampler.py
kushagragpt99/bnn_mcmc_examples
297cdb1e74335860989bebdb4ff6f6322b6adc06
[ "MIT" ]
null
null
null
bnn_mcmc_examples/examples/mlp/pima/setting1/hmc/sampler.py
kushagragpt99/bnn_mcmc_examples
297cdb1e74335860989bebdb4ff6f6322b6adc06
[ "MIT" ]
1
2021-10-05T06:38:57.000Z
2021-10-05T06:38:57.000Z
# %% Import packages from eeyore.samplers import HMC from bnn_mcmc_examples.examples.mlp.pima.setting1.dataloaders import training_dataloader from bnn_mcmc_examples.examples.mlp.pima.setting1.model import model # %% Setup HMC sampler sampler = HMC(model, theta0=model.prior.sample(), dataloader=training_dataloader, ...
31.363636
106
0.811594
from eeyore.samplers import HMC from bnn_mcmc_examples.examples.mlp.pima.setting1.dataloaders import training_dataloader from bnn_mcmc_examples.examples.mlp.pima.setting1.model import model sampler = HMC(model, theta0=model.prior.sample(), dataloader=training_dataloader, step=0.125, num_steps=6)
true
true
f704d9e98bd2692af546a133176acf66958374b4
866
py
Python
heltour/tournament/migrations/0049_auto_20160804_0509.py
zbidwell/heltour
3895142695096a81cc65c3fefb7d4501ed796f46
[ "MIT" ]
41
2016-08-17T19:58:42.000Z
2021-11-08T10:52:07.000Z
heltour/tournament/migrations/0049_auto_20160804_0509.py
zbidwell/heltour
3895142695096a81cc65c3fefb7d4501ed796f46
[ "MIT" ]
257
2016-08-17T22:29:05.000Z
2022-01-13T00:42:05.000Z
heltour/tournament/migrations/0049_auto_20160804_0509.py
zbidwell/heltour
3895142695096a81cc65c3fefb7d4501ed796f46
[ "MIT" ]
31
2016-09-23T23:36:14.000Z
2022-01-14T17:05:08.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-08-04 05:09 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tournament', '0048_auto_20160803_0311'), ] operations = [ migrations.AddField( ...
29.862069
174
0.643187
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tournament', '0048_auto_20160803_0311'), ] operations = [ migrations.AddField( model_name='alternate', name='season_player', ...
true
true
f704dab721959161224d66936f270ee7bed32f72
12,634
py
Python
reconstructPointwise.py
LLNL/ferdinand
af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70
[ "Apache-2.0" ]
null
null
null
reconstructPointwise.py
LLNL/ferdinand
af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70
[ "Apache-2.0" ]
null
null
null
reconstructPointwise.py
LLNL/ferdinand
af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70
[ "Apache-2.0" ]
null
null
null
############################################## # # # Ferdinand 0.40, Ian Thompson, LLNL # # # # gnd,endf,fresco,azure,hyrma # # # #####################################...
48.779923
166
0.616115
'capture'): rreac.tag = 'capture' elif reaction == gnd.getReaction('elastic'): rreac.tag = 'elastic' elif 'fission' in rreac.label: rreac.tag = rreac.label else: rreac.tag = 'competitive' xsecs = {'total':total, 'elastic':elastic, 'fission':fission, 'nonelastic':absorbtion} ...
true
true
f704dae35a632084b188c064b1c868e00c367228
12,829
py
Python
pylabnet/scripts/counter/monitor_counts.py
wi11dey/pylabnet
a6e3362f727c45aaa60e61496e858ae92e85574d
[ "MIT" ]
null
null
null
pylabnet/scripts/counter/monitor_counts.py
wi11dey/pylabnet
a6e3362f727c45aaa60e61496e858ae92e85574d
[ "MIT" ]
null
null
null
pylabnet/scripts/counter/monitor_counts.py
wi11dey/pylabnet
a6e3362f727c45aaa60e61496e858ae92e85574d
[ "MIT" ]
null
null
null
""" Generic script for monitoring counts from a counter """ import numpy as np import time import pyqtgraph as pg from pylabnet.gui.pyqt.external_gui import Window from pylabnet.utils.logging.logger import LogClient from pylabnet.scripts.pause_script import PauseService from pylabnet.network.core.generic_server import...
34.029178
179
0.581651
import numpy as np import time import pyqtgraph as pg from pylabnet.gui.pyqt.external_gui import Window from pylabnet.utils.logging.logger import LogClient from pylabnet.scripts.pause_script import PauseService from pylabnet.network.core.generic_server import GenericServer from pylabnet.network.client_server import si...
true
true
f704db4f9f14c36b7a4a23d49d7aeb53b61d9f65
1,723
py
Python
app/core/migrations/0001_initial.py
lucaspyproj/learn-app-api
77d1216c9520c21785c7f56f84d8681a2990a6cf
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
lucaspyproj/learn-app-api
77d1216c9520c21785c7f56f84d8681a2990a6cf
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
lucaspyproj/learn-app-api
77d1216c9520c21785c7f56f84d8681a2990a6cf
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-02-16 11:10 # flake8: noqa from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name...
50.676471
266
0.639582
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.Au...
true
true
f704db7738c33468077ceb775a163c773f08d47d
11,918
py
Python
Notebooks/lib/Message_passing_BN.py
olmosUC3M/Inference-and-Learning-in-discrete-Bayesian-Networks
12e08f2e3f34146638806212be54837cc22c0516
[ "MIT" ]
3
2019-05-19T11:26:42.000Z
2021-07-31T07:28:35.000Z
Notebooks/lib/Message_passing_BN.py
olmosUC3M/Inference-and-Learning-in-discrete-Bayesian-Networks
12e08f2e3f34146638806212be54837cc22c0516
[ "MIT" ]
null
null
null
Notebooks/lib/Message_passing_BN.py
olmosUC3M/Inference-and-Learning-in-discrete-Bayesian-Networks
12e08f2e3f34146638806212be54837cc22c0516
[ "MIT" ]
null
null
null
## Message passing over a discrete BN ## ## Library created by Pablo Martínez Olmos, University Carlos III Madrid ## ## olmos@tsc.uc3m.es ## ## Last modification 15/11/2016 ## import numpy as np ## Messages are stored in the logaritmic domain ## ## Global constants (to control numerical issues) inf_log=100 #To impo...
37.360502
133
0.698439
or_order) var_node['input_msgs']=[] #List to store input messages var_node['observed']=observed_value_index #-1 if the variable is not observed var_node['inner_factor']=np.zeros([cardinality,1]) #Internal vector used to imposed hard messages when variable is observed #If variable is observed, the...
true
true
f704dbc440727caa33f14c21d525c911a2a366fb
2,262
py
Python
atlassian_connect_django/rest_framework/authentication.py
gerasev-kirill/atlassian-connect-django
cd44232df512691d9ec14722c38785cf802862e9
[ "MIT" ]
null
null
null
atlassian_connect_django/rest_framework/authentication.py
gerasev-kirill/atlassian-connect-django
cd44232df512691d9ec14722c38785cf802862e9
[ "MIT" ]
null
null
null
atlassian_connect_django/rest_framework/authentication.py
gerasev-kirill/atlassian-connect-django
cd44232df512691d9ec14722c38785cf802862e9
[ "MIT" ]
null
null
null
from six import text_type from rest_framework import HTTP_HEADER_ENCODING, exceptions from django.core.exceptions import PermissionDenied from django.utils.translation import ugettext_lazy as _ from atlassian_connect_django.models.connect import AtlassianUser from atlassian_connect_django import helpers from .models i...
41.127273
169
0.741821
from six import text_type from rest_framework import HTTP_HEADER_ENCODING, exceptions from django.core.exceptions import PermissionDenied from django.utils.translation import ugettext_lazy as _ from atlassian_connect_django.models.connect import AtlassianUser from atlassian_connect_django import helpers from .models i...
true
true
f704dd4818c3b8d3017ae2937945bb191f230b62
2,054
py
Python
python_smaclient/smapi_request.py
jloehel/python_smaclient
ed18efb4e19728f3644eb1e510262def57a1767b
[ "0BSD" ]
null
null
null
python_smaclient/smapi_request.py
jloehel/python_smaclient
ed18efb4e19728f3644eb1e510262def57a1767b
[ "0BSD" ]
null
null
null
python_smaclient/smapi_request.py
jloehel/python_smaclient
ed18efb4e19728f3644eb1e510262def57a1767b
[ "0BSD" ]
null
null
null
#!/usr/bin/env python import uuid from construct import Container class SMAPI_Request(object): ''' Implentation of a ICUV Request ''' def __init__(self, function_name, target_identifier, authenticated_userid=b"", password=b"", additional_parameters=b""): self._function_n...
44.652174
89
0.624635
import uuid from construct import Container class SMAPI_Request(object): def __init__(self, function_name, target_identifier, authenticated_userid=b"", password=b"", additional_parameters=b""): self._function_name = function_name self._function_name_length = len(function_name) ...
true
true
f704ddb7dba518e0334a017e32b36881a1730110
22,096
py
Python
ppmessage/dispatcher/policy.py
augustand/ppmessage
73beac9c75f751d5026ff7defff23732c7419b43
[ "Apache-2.0" ]
6
2017-11-03T17:31:52.000Z
2020-06-14T09:14:36.000Z
ppmessage/dispatcher/policy.py
augustand/ppmessage
73beac9c75f751d5026ff7defff23732c7419b43
[ "Apache-2.0" ]
null
null
null
ppmessage/dispatcher/policy.py
augustand/ppmessage
73beac9c75f751d5026ff7defff23732c7419b43
[ "Apache-2.0" ]
16
2017-08-08T01:25:47.000Z
2019-09-17T16:32:06.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2016 PPMessage. # Guijin Ding, dingguijin@gmail.com # from ppmessage.core.constant import IOS_FAKE_TOKEN from ppmessage.core.constant import CONVERSATION_TYPE from ppmessage.core.constant import MESSAGE_SUBTYPE from ppmessage.core.constant import MESSAGE_STATUS from ppmes...
36.342105
111
0.613052
from ppmessage.core.constant import IOS_FAKE_TOKEN from ppmessage.core.constant import CONVERSATION_TYPE from ppmessage.core.constant import MESSAGE_SUBTYPE from ppmessage.core.constant import MESSAGE_STATUS from ppmessage.core.constant import MESSAGE_TYPE from ppmessage.core.constant import TASK_STATUS from ppm...
true
true
f704e0229ff68105dd98edffdadbd49a9cb411c6
1,607
py
Python
hard-gists/6623972/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/6623972/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/6623972/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
#!/usr/bin/env python # # author: syl20bnr (2013) # goal: Focus the nth window in the current workspace (limited to 10 firsts) # # Example of usage in i3 config: # # bindsym $mod+0 exec focus_win.py -n 0 # bindsym $mod+1 exec focus_win.py -n 1 # ... ... # bindsym $mod+8 exec focus_win.py -n 8 # binds...
26.783333
79
0.616677
import argparse from subprocess import Popen import i3 PARSER = argparse.ArgumentParser(prog='focus_win') PARSER.add_argument('-n', '--number', required=True, type=int, choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], help='Window num...
true
true
f704e2908192786114878cd4a17cb8a00a35bca0
1,437
py
Python
tests/test_normalizers.py
gobadiah/jasonpi
c0dc504cb4be5880d3d2dcedeebd9513a8123569
[ "MIT" ]
null
null
null
tests/test_normalizers.py
gobadiah/jasonpi
c0dc504cb4be5880d3d2dcedeebd9513a8123569
[ "MIT" ]
null
null
null
tests/test_normalizers.py
gobadiah/jasonpi
c0dc504cb4be5880d3d2dcedeebd9513a8123569
[ "MIT" ]
1
2019-03-05T09:35:06.000Z
2019-03-05T09:35:06.000Z
import datetime from jasonpi.normalizers import facebook_profile, google_profile def test_facebook_profile(): """ Test that facebook_profile computes a correct profile received from facebook oauth. """ data = { 'email': 'some@email.com', 'first_name': 'Alfred', 'last_name'...
33.418605
70
0.610299
import datetime from jasonpi.normalizers import facebook_profile, google_profile def test_facebook_profile(): data = { 'email': 'some@email.com', 'first_name': 'Alfred', 'last_name': 'Dupont', 'gender': 'male', 'birthday': '02/25/1970' } profile = facebook_profile(...
true
true
f704e2ba80b1a17cddedcb87bc5118b0363446b9
441
py
Python
_draft/x_6_8.py
ofl/kuku2
7247fb1862d917d23258ebe7a93dca5939433225
[ "MIT" ]
null
null
null
_draft/x_6_8.py
ofl/kuku2
7247fb1862d917d23258ebe7a93dca5939433225
[ "MIT" ]
1
2021-11-13T08:03:04.000Z
2021-11-13T08:03:04.000Z
_draft/x_6_8.py
ofl/kuku2
7247fb1862d917d23258ebe7a93dca5939433225
[ "MIT" ]
null
null
null
# x_6_8 # # class StockError(Exception): pass class NumberError(Exception): pass order_count = input('きび団子を何個注文しますか?:') card_number = input('カード番号を入力してください?(例、0000-0000-0000-0000):') try: if int(order_count) > 100: raise StockError if card_number != '1111-1111-1111-1111': raise Num...
16.333333
62
0.673469
class StockError(Exception): pass class NumberError(Exception): pass order_count = input('きび団子を何個注文しますか?:') card_number = input('カード番号を入力してください?(例、0000-0000-0000-0000):') try: if int(order_count) > 100: raise StockError if card_number != '1111-1111-1111-1111': raise NumberError ...
true
true
f704e2ec4bedf7f9433b07f9722cc1c5b621e5ed
10,014
py
Python
electrumx/server/daemon.py
bitcoin-global/global-electrumx
077dc2c3a5bfd9e82dc11784a98f986b8b726336
[ "MIT" ]
1
2020-06-30T18:50:22.000Z
2020-06-30T18:50:22.000Z
electrumx/server/daemon.py
bitcoin-global/global-electrumx
077dc2c3a5bfd9e82dc11784a98f986b8b726336
[ "MIT" ]
null
null
null
electrumx/server/daemon.py
bitcoin-global/global-electrumx
077dc2c3a5bfd9e82dc11784a98f986b8b726336
[ "MIT" ]
1
2020-12-18T17:13:31.000Z
2020-12-18T17:13:31.000Z
# Copyright (c) 2016-2017, Neil Booth # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. '''Class for handling asynchronous connections to a blockchain daemon.''' import asyncio import itertools import json import time import aiohttp from a...
37.931818
90
0.61454
import asyncio import itertools import json import time import aiohttp from aiorpcx import JSONRPC from electrumx.lib.util import hex_to_bytes, class_logger class DaemonError(Exception): class WarmingUpError(Exception): class ServiceRefusedError(Exception): class Daemon(object): WARMING_UP = -28 ...
true
true
f704e31e46f9b00192e8725b26646591bb78db65
644
py
Python
TODO_LIST/TODO_APP/migrations/0001_initial.py
Amit89499/TODO-APP-DJANGO
082a4ffb803778378c6a8077ca47cf868bc55ef8
[ "Apache-2.0" ]
4
2020-06-29T16:00:39.000Z
2021-05-22T03:40:38.000Z
TODO_LIST/TODO_APP/migrations/0001_initial.py
Amit89499/TODO-APP-DJANGO
082a4ffb803778378c6a8077ca47cf868bc55ef8
[ "Apache-2.0" ]
null
null
null
TODO_LIST/TODO_APP/migrations/0001_initial.py
Amit89499/TODO-APP-DJANGO
082a4ffb803778378c6a8077ca47cf868bc55ef8
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.4 on 2020-06-21 18:32 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='task', fields=[ ('id', mode...
26.833333
115
0.555901
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='task', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True...
true
true
f704e383be902dc878749e1e1053016142dfdbac
457
py
Python
sportsbet/datasets/__init__.py
ItzBraveNoob/sports-betting
521d4ef6bd0e079d508f40609681124edc2c6805
[ "MIT" ]
49
2020-12-27T15:23:23.000Z
2022-03-30T19:21:13.000Z
sportsbet/datasets/__init__.py
ItzBraveNoob/sports-betting
521d4ef6bd0e079d508f40609681124edc2c6805
[ "MIT" ]
5
2021-04-23T17:41:30.000Z
2022-02-02T14:03:37.000Z
sportsbet/datasets/__init__.py
ItzBraveNoob/sports-betting
521d4ef6bd0e079d508f40609681124edc2c6805
[ "MIT" ]
15
2021-02-13T02:01:49.000Z
2022-03-07T01:09:15.000Z
""" The :mod:`sportsbet.datasets` module provides the tools to download and transform sports betting data. """ from ._base import load from ._soccer._combined import SoccerDataLoader from ._soccer._fd import FDSoccerDataLoader from ._soccer._fte import FTESoccerDataLoader from ._soccer._dummy import DummySoccerDataLoa...
24.052632
52
0.770241
from ._base import load from ._soccer._combined import SoccerDataLoader from ._soccer._fd import FDSoccerDataLoader from ._soccer._fte import FTESoccerDataLoader from ._soccer._dummy import DummySoccerDataLoader __all__ = [ 'SoccerDataLoader', 'FDSoccerDataLoader', 'FTESoccerDataLoader', 'DummySoccerD...
true
true
f704e3f96f343e3769531df6f0c6d75bfe0aa5ca
66,444
py
Python
lib/galaxy/webapps/galaxy/controllers/dataset.py
Galaxyinternship/Galaxy
204be086a8c16d6684584cefa9053ed7c86a1784
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/webapps/galaxy/controllers/dataset.py
Galaxyinternship/Galaxy
204be086a8c16d6684584cefa9053ed7c86a1784
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/webapps/galaxy/controllers/dataset.py
Galaxyinternship/Galaxy
204be086a8c16d6684584cefa9053ed7c86a1784
[ "CC-BY-3.0" ]
null
null
null
import logging import os import urllib from markupsafe import escape import paste.httpexceptions from six import string_types, text_type from sqlalchemy import false, true from galaxy import datatypes, model, util, web from galaxy import managers from galaxy.datatypes.display_applications.util import decode_dataset_u...
56.548085
258
0.59438
import logging import os import urllib from markupsafe import escape import paste.httpexceptions from six import string_types, text_type from sqlalchemy import false, true from galaxy import datatypes, model, util, web from galaxy import managers from galaxy.datatypes.display_applications.util import decode_dataset_u...
true
true
f704e406d6064c1b07ddb3fa9237f28659c4ec07
7,122
py
Python
daal4py/sklearn/neighbors/_classification.py
Alexsandruss/daal4py
6e5a02d3fd46095585e618edba24fc258e8b0052
[ "Apache-2.0" ]
null
null
null
daal4py/sklearn/neighbors/_classification.py
Alexsandruss/daal4py
6e5a02d3fd46095585e618edba24fc258e8b0052
[ "Apache-2.0" ]
null
null
null
daal4py/sklearn/neighbors/_classification.py
Alexsandruss/daal4py
6e5a02d3fd46095585e618edba24fc258e8b0052
[ "Apache-2.0" ]
null
null
null
#=============================================================================== # Copyright 2020-2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
40.697143
85
0.641252
from ._base import NeighborsBase, KNeighborsMixin from ._base import parse_auto_method, prediction_algorithm from sklearn.base import ClassifierMixin as BaseClassifierMixin from .._utils import ( getFPType, sklearn_check_version, get_patch_message, PatchingConditionsChain) from .._devi...
true
true
f704e4bde1c29b09b13e9c055dbbdaff730de2a4
383
py
Python
other/dingding/dingtalk/api/rest/OapiAtsChannelAccountAddRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
other/dingding/dingtalk/api/rest/OapiAtsChannelAccountAddRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
other/dingding/dingtalk/api/rest/OapiAtsChannelAccountAddRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
''' Created by auto_sdk on 2020.08.19 ''' from dingtalk.api.base import RestApi class OapiAtsChannelAccountAddRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.biz_code = None self.channel_user_identify = None self.userid = None def getHttpMethod(self): return 'POST' def geta...
22.529412
48
0.75718
from dingtalk.api.base import RestApi class OapiAtsChannelAccountAddRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.biz_code = None self.channel_user_identify = None self.userid = None def getHttpMethod(self): return 'POST' def getapiname(self): return 'dingtalk.oapi.ats....
true
true
f704e67f0939a74be44c84c108717c2e056598e9
1,634
py
Python
tests/test_web_flask/test_c_route.py
RodrigoSierraV/AirBnB_clone_v4
314a2f20ea3f1de89255317d0b52a4289b36ccbc
[ "MIT" ]
5
2017-09-12T18:23:55.000Z
2021-07-27T18:05:37.000Z
tests/test_web_flask/test_c_route.py
petehwu/AirBnB_clone_v4
bf0528c99662285139aa56fe8e752d239e2f7b2a
[ "MIT" ]
8
2019-09-27T17:23:04.000Z
2019-09-30T23:31:31.000Z
tests/test_web_flask/test_c_route.py
petehwu/AirBnB_clone_v4
bf0528c99662285139aa56fe8e752d239e2f7b2a
[ "MIT" ]
10
2017-09-20T18:50:07.000Z
2022-02-17T20:58:23.000Z
#!/usr/bin/python3 """ Unit Test for api v1 Flask App """ import inspect import pep8 import web_flask import unittest from os import stat web_flask = __import__('web_flask.2-c_route', globals(), locals(), ['*']) class TestCRouteDocs(unittest.TestCase): """Class for testing Hello Route docs""" all_funcs = ins...
29.709091
75
0.601591
import inspect import pep8 import web_flask import unittest from os import stat web_flask = __import__('web_flask.2-c_route', globals(), locals(), ['*']) class TestCRouteDocs(unittest.TestCase): all_funcs = inspect.getmembers(web_flask, inspect.isfunction) @classmethod def setUpClass(cls): prin...
true
true
f704e6c02a08c79f1e412b550fbc5e2ad285adf4
11,273
py
Python
multiqc_clarity/multiqc_clarity.py
MultiQC/MultiQC_Clarity
9ac177dffa8c9a5a5d57ec0c6739a74a974b8ab3
[ "MIT" ]
1
2018-06-18T15:31:10.000Z
2018-06-18T15:31:10.000Z
multiqc_clarity/multiqc_clarity.py
MultiQC/MultiQC_Clarity
9ac177dffa8c9a5a5d57ec0c6739a74a974b8ab3
[ "MIT" ]
5
2017-03-13T17:21:45.000Z
2019-02-14T12:34:11.000Z
multiqc_clarity/multiqc_clarity.py
MultiQC/MultiQC_Clarity
9ac177dffa8c9a5a5d57ec0c6739a74a974b8ab3
[ "MIT" ]
4
2017-03-06T09:47:42.000Z
2019-02-13T13:19:23.000Z
from genologics.lims import Lims from genologics.config import BASEURI, USERNAME, PASSWORD from multiqc.utils import report, config from multiqc.modules.base_module import BaseMultiqcModule from multiqc.plots import table from collections import OrderedDict import logging import re class MultiQC_clarity_metadata(Ba...
42.863118
129
0.548213
from genologics.lims import Lims from genologics.config import BASEURI, USERNAME, PASSWORD from multiqc.utils import report, config from multiqc.modules.base_module import BaseMultiqcModule from multiqc.plots import table from collections import OrderedDict import logging import re class MultiQC_clarity_metadata(Ba...
true
true
f704e7c24f57a177cdaf904a0e365c964a9eeb80
1,308
py
Python
setup.py
ScyThe1289/cgen
e644d790fce3a06457eff30044c31eb549d8e2f8
[ "MIT" ]
null
null
null
setup.py
ScyThe1289/cgen
e644d790fce3a06457eff30044c31eb549d8e2f8
[ "MIT" ]
null
null
null
setup.py
ScyThe1289/cgen
e644d790fce3a06457eff30044c31eb549d8e2f8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup with open("README.rst", "rt") as inf: readme = inf.read() ver_dic = {} with open("cgen/version.py") as version_file: version_file_contents = version_file.read() exec(compile(version_file_contents, "cgen/version.py", 'exec'), ver_dic)...
29.727273
72
0.563456
from setuptools import setup with open("README.rst", "rt") as inf: readme = inf.read() ver_dic = {} with open("cgen/version.py") as version_file: version_file_contents = version_file.read() exec(compile(version_file_contents, "cgen/version.py", 'exec'), ver_dic) setup( name="cgen", versio...
true
true
f704e89b073258465eda8a5b1cc588d46c48769f
1,044
py
Python
src/robotide/utils/versioncomparator.py
ludovicurbain/SWIFT-RIDE
ab72df08a57101c433bfa5ad44949d9983e4e611
[ "ECL-2.0", "Apache-2.0" ]
775
2015-01-12T06:54:09.000Z
2022-03-25T05:18:05.000Z
src/robotide/utils/versioncomparator.py
ludovicurbain/SWIFT-RIDE
ab72df08a57101c433bfa5ad44949d9983e4e611
[ "ECL-2.0", "Apache-2.0" ]
2,191
2015-05-19T16:49:09.000Z
2022-03-28T21:38:34.000Z
src/robotide/utils/versioncomparator.py
ludovicurbain/SWIFT-RIDE
ab72df08a57101c433bfa5ad44949d9983e4e611
[ "ECL-2.0", "Apache-2.0" ]
382
2015-01-24T08:41:44.000Z
2022-03-13T10:14:20.000Z
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
32.625
75
0.703065
from pkg_resources import parse_version def cmp_versions(version1, version2): if version1 is None: if version2 is None: return 0 else: return -1 if version2 is None: return 1 if parse_version(version1) == parse_version(version2): retur...
true
true
f704e942f03f28034ae8717e0065554e929f93f4
4,009
py
Python
zer018_perception/lane_vision/src/homography.py
ZEROSNU/zer018
c469cf22fa1fdf731b02c79f296ee96d35dccb25
[ "MIT" ]
1
2019-01-05T07:01:46.000Z
2019-01-05T07:01:46.000Z
zer018_perception/lane_vision/src/homography.py
ZEROSNU/zer018
c469cf22fa1fdf731b02c79f296ee96d35dccb25
[ "MIT" ]
null
null
null
zer018_perception/lane_vision/src/homography.py
ZEROSNU/zer018
c469cf22fa1fdf731b02c79f296ee96d35dccb25
[ "MIT" ]
null
null
null
import cv2 import numpy as np import time ''' TEST FILE using 1000, 1000 output image. Actual code will have an output image of 200,200, which also means a different homography ''' #recalculated homography # homography_front = np.array([[3.12570133882145e-05, 0.000286172662353515, -0.680179732686621], # [0.0...
40.494949
97
0.687204
import cv2 import numpy as np import time homography_front = np.array([[4.62227601649053e-05, 0.000243520884225642, -0.678748083960862], [0.000969465596108860, -0.00207033488113324, -0.734366621126640], [1.58512860546350e-07, -6.83048800828728e-06, -0.00119023476366804]]) homography_left = np...
true
true
f704e9b9373cb103702b97b1698ac5e81ca15084
2,543
py
Python
app/forms/user.py
Kbman99/Flask-Startup
e3fea9c7e16a650abd9768ea1e9aee845dcecfda
[ "MIT" ]
null
null
null
app/forms/user.py
Kbman99/Flask-Startup
e3fea9c7e16a650abd9768ea1e9aee845dcecfda
[ "MIT" ]
null
null
null
app/forms/user.py
Kbman99/Flask-Startup
e3fea9c7e16a650abd9768ea1e9aee845dcecfda
[ "MIT" ]
null
null
null
from flask_wtf import Form from wtforms import TextField, PasswordField from wtforms.validators import (Required, Length, Email, ValidationError, EqualTo) from app.models import User class Unique(object): ''' Custom validator to check an object's attribute is unique. For e...
29.917647
75
0.594573
from flask_wtf import Form from wtforms import TextField, PasswordField from wtforms.validators import (Required, Length, Email, ValidationError, EqualTo) from app.models import User class Unique(object): def __init__(self, model, field, message): self.model = model ...
true
true
f704e9eac8de03f01fa77d9579930caec71292b1
22
py
Python
luvio/externals/domain_api/api.py
nguyenhailong253/luvio-server
8e75bea4171fc2367cc6d7ebd5a19382932840d5
[ "MIT" ]
null
null
null
luvio/externals/domain_api/api.py
nguyenhailong253/luvio-server
8e75bea4171fc2367cc6d7ebd5a19382932840d5
[ "MIT" ]
null
null
null
luvio/externals/domain_api/api.py
nguyenhailong253/luvio-server
8e75bea4171fc2367cc6d7ebd5a19382932840d5
[ "MIT" ]
null
null
null
# Call Domain api here
22
22
0.772727
true
true
f704ea950fc187b21bea1b7de6bc90411e2926da
845
py
Python
adm/makesedonac.py
AndreySV/sedona
9fe9e800ba3454b725d96355abee172591ceca1f
[ "AFL-3.0" ]
26
2015-02-16T18:35:06.000Z
2021-12-22T03:10:32.000Z
adm/makesedonac.py
AndreySV/sedona
9fe9e800ba3454b725d96355abee172591ceca1f
[ "AFL-3.0" ]
40
2015-09-29T11:19:16.000Z
2021-07-12T02:53:35.000Z
adm/makesedonac.py
AndreySV/sedona
9fe9e800ba3454b725d96355abee172591ceca1f
[ "AFL-3.0" ]
34
2015-12-10T02:53:21.000Z
2022-01-13T16:28:30.000Z
#! /usr/bin/env python3 # # makesedonac.py # # Compile sedonac.jar # # Author: Brian Frank # Creation: 7 Dec 07 # from __future__ import print_function import os import env import compilejar depends = [env.sedonaJar] srcDir = os.path.join(env.src, "sedonac", "src") jarFile = env.sedonacJar package...
17.244898
58
0.631953
from __future__ import print_function import os import env import compilejar depends = [env.sedonaJar] srcDir = os.path.join(env.src, "sedonac", "src") jarFile = env.sedonacJar packages = [ "sedonac", "sedonac.analysis", "sedonac.asm", "sedonac.ast", "sedonac.gen", "sedonac.ir", "se...
true
true
f704eb8f47624f4a65229a7680567e12eb42eb47
2,619
py
Python
test/test.py
RLSwanepoel/edsa_packages
6258dd20c2508c5bcc298b3de86cec9e6a1403d2
[ "MIT" ]
null
null
null
test/test.py
RLSwanepoel/edsa_packages
6258dd20c2508c5bcc298b3de86cec9e6a1403d2
[ "MIT" ]
null
null
null
test/test.py
RLSwanepoel/edsa_packages
6258dd20c2508c5bcc298b3de86cec9e6a1403d2
[ "MIT" ]
null
null
null
from edsa_packages import recursion, sorting #Recursion tests def test_sum_array(): ''' Make sure sum_array works ''' assert recursion.sum_array([8, 3, 2, 7, 4]) == 24, 'incorrect' assert recursion.sum_array([5, 7, 8, 8, 6, 3, 4]) == 41, 'incorrect' assert recursion.sum_array([25, 14, 2, 3, 5]...
42.241935
175
0.613975
from edsa_packages import recursion, sorting def test_sum_array(): assert recursion.sum_array([8, 3, 2, 7, 4]) == 24, 'incorrect' assert recursion.sum_array([5, 7, 8, 8, 6, 3, 4]) == 41, 'incorrect' assert recursion.sum_array([25, 14, 2, 3, 5]) == 49, 'incorrect' def test_fibonacci(): assert recursi...
true
true
f704ec3011295133131ca2780e725d89200d860c
6,746
py
Python
bin/3rdparty/awscli/customizations/ec2/bundleinstance.py
gayatrisingh31/grand_central
eae635d865549b8002a42d051d9af69e8688e129
[ "MIT" ]
36
2019-11-06T20:49:07.000Z
2021-07-07T02:26:52.000Z
bin/3rdparty/awscli/customizations/ec2/bundleinstance.py
gayatrisingh31/grand_central
eae635d865549b8002a42d051d9af69e8688e129
[ "MIT" ]
21
2019-11-10T05:38:06.000Z
2022-03-10T15:07:48.000Z
bin/3rdparty/awscli/customizations/ec2/bundleinstance.py
gayatrisingh31/grand_central
eae635d865549b8002a42d051d9af69e8688e129
[ "MIT" ]
7
2020-02-13T22:56:46.000Z
2022-01-22T05:57:34.000Z
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
37.270718
75
0.641121
import logging from hashlib import sha1 import hmac import base64 import datetime from awscli.compat import six from awscli.arguments import CustomArgument logger = logging.getLogger('ec2bundleinstance') BUCKET_DOCS = ('The bucket in which to store the AMI. ' 'You can specify a buck...
true
true
f704ecdfca4d6662c111ca95bb581c2a4f67afb6
891
py
Python
loadtests/locustfile.py
javieraviles/quarkus-github-flow
38ecb9cc626b21e621e20cd77a9638780245047c
[ "MIT" ]
8
2020-09-04T02:16:18.000Z
2022-01-23T18:40:21.000Z
loadtests/locustfile.py
javieraviles/quarkus-github-flow
38ecb9cc626b21e621e20cd77a9638780245047c
[ "MIT" ]
null
null
null
loadtests/locustfile.py
javieraviles/quarkus-github-flow
38ecb9cc626b21e621e20cd77a9638780245047c
[ "MIT" ]
3
2020-12-14T19:32:10.000Z
2022-01-17T15:06:20.000Z
import datetime from http import HTTPStatus from locust import HttpUser, task, between # This test can be run after installing locust through the cli as "locust --host=http://<deployed_host>:<port>" # Then url http://localhost:8089/ should be access to start the test. # Can also be run using no UI mode as "locust --no...
40.5
168
0.699214
import datetime from http import HTTPStatus from locust import HttpUser, task, between class QuickstartUser(HttpUser): wait_time = between(1, 2) @task(1) def get_developers(self): r = self.client.get("/developers") assert r.status_code == HTTPStatus.OK, "Unexpected response code: " + s...
true
true
f704ed56e109cde4331623e75aa489ba21777f29
2,861
py
Python
ipynb_py_convert/__main__.py
max-yue/ipynb-py-convert
77dc636240560892aedbc8a36532784dee408cfa
[ "MIT" ]
null
null
null
ipynb_py_convert/__main__.py
max-yue/ipynb-py-convert
77dc636240560892aedbc8a36532784dee408cfa
[ "MIT" ]
null
null
null
ipynb_py_convert/__main__.py
max-yue/ipynb-py-convert
77dc636240560892aedbc8a36532784dee408cfa
[ "MIT" ]
null
null
null
import json import sys from os import path header_comment = '# %%\n' def nb2py(notebook): result = [] cells = notebook['cells'] for cell in cells: cell_type = cell['cell_type'] if cell_type == 'markdown': result.append('%s"""\n%s\n"""'% (header_comm...
26.009091
77
0.510311
import json import sys from os import path header_comment = '# %%\n' def nb2py(notebook): result = [] cells = notebook['cells'] for cell in cells: cell_type = cell['cell_type'] if cell_type == 'markdown': result.append('%s"""\n%s\n"""'% (header_comm...
true
true
f704ee4619176809e6126c4c9fe27a817e363dc3
580
py
Python
day_02/day_02.py
aclima93/AdventOfCode
73cc2c194b5ffc27e4d275a3693c148d690bca1f
[ "WTFPL" ]
null
null
null
day_02/day_02.py
aclima93/AdventOfCode
73cc2c194b5ffc27e4d275a3693c148d690bca1f
[ "WTFPL" ]
null
null
null
day_02/day_02.py
aclima93/AdventOfCode
73cc2c194b5ffc27e4d275a3693c148d690bca1f
[ "WTFPL" ]
null
null
null
import sys input_file = open(sys.argv[1]) input_lines = input_file.readlines() total_wrapping = 0 total_ribbon = 0 for line in input_lines: l, w, h = line.split("x") l = int(l) w = int(w) h = int(h) dimensions = [l, w, h] min_1 = min(dimensions) dimensions.remove(min_1) min_2 = min(...
20
79
0.6
import sys input_file = open(sys.argv[1]) input_lines = input_file.readlines() total_wrapping = 0 total_ribbon = 0 for line in input_lines: l, w, h = line.split("x") l = int(l) w = int(w) h = int(h) dimensions = [l, w, h] min_1 = min(dimensions) dimensions.remove(min_1) min_2 = min(...
true
true
f704ee9eba83abf2786c8b03afb6216b6afd600a
8,786
py
Python
responder/models.py
repodevs/responder
4d15dbc4654038130f43bff48f51627dfd4b5df7
[ "Apache-2.0" ]
null
null
null
responder/models.py
repodevs/responder
4d15dbc4654038130f43bff48f51627dfd4b5df7
[ "Apache-2.0" ]
null
null
null
responder/models.py
repodevs/responder
4d15dbc4654038130f43bff48f51627dfd4b5df7
[ "Apache-2.0" ]
null
null
null
import io import json import gzip from base64 import b64decode from http.cookies import SimpleCookie import chardet import rfc3986 import graphene import yaml from requests.structures import CaseInsensitiveDict from requests.cookies import RequestsCookieJar from starlette.datastructures import MutableHeaders from sta...
29.884354
121
0.600842
import io import json import gzip from base64 import b64decode from http.cookies import SimpleCookie import chardet import rfc3986 import graphene import yaml from requests.structures import CaseInsensitiveDict from requests.cookies import RequestsCookieJar from starlette.datastructures import MutableHeaders from sta...
true
true
f704ef2c8233458ae3f08016c0e7150a60a3e915
6,863
py
Python
aae.py
anonymous-iclr-2019/acai-iclr-2019
233058a8330e8162e199933ee22b8e5fcac22072
[ "Apache-2.0" ]
20
2018-12-25T05:05:11.000Z
2021-06-21T02:27:53.000Z
aae.py
anonymous-iclr-2019/acai-iclr-2019
233058a8330e8162e199933ee22b8e5fcac22072
[ "Apache-2.0" ]
1
2021-02-08T23:40:40.000Z
2021-02-08T23:40:40.000Z
aae.py
anonymous-iclr-2019/acai-iclr-2019
233058a8330e8162e199933ee22b8e5fcac22072
[ "Apache-2.0" ]
5
2018-11-04T22:11:45.000Z
2019-09-11T12:57:15.000Z
# Copyright 2018 # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
40.85119
79
0.652339
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math from absl import app from absl import flags import tensorflow as tf from lib import data, layers, train, utils, classifiers, eval FLAGS = flags.FLAGS class AAE(train.AE): d...
true
true
f704ef3af73f982bb2a2835418342e4bbbf74ec9
17,036
py
Python
django/contrib/admin/utils.py
devops2014/djangosite
db77915c9fd35a203edd8206f702ee4082f04d4a
[ "BSD-3-Clause" ]
null
null
null
django/contrib/admin/utils.py
devops2014/djangosite
db77915c9fd35a203edd8206f702ee4082f04d4a
[ "BSD-3-Clause" ]
null
null
null
django/contrib/admin/utils.py
devops2014/djangosite
db77915c9fd35a203edd8206f702ee4082f04d4a
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import datetime import decimal from collections import defaultdict from django.contrib.auth import get_permission_codename from django.core.exceptions import FieldDoesNotExist from django.core.urlresolvers import NoReverseMatch, reverse from django.db import models from django....
33.535433
94
0.617751
from __future__ import unicode_literals import datetime import decimal from collections import defaultdict from django.contrib.auth import get_permission_codename from django.core.exceptions import FieldDoesNotExist from django.core.urlresolvers import NoReverseMatch, reverse from django.db import models from django....
true
true
f704effc26992be20ba41471a7122694d4e7fcf5
41,290
py
Python
numba/core/dispatcher.py
blair1306/numba
3b9647d17d653abac15363da604eeb804dbdd15a
[ "BSD-2-Clause" ]
2
2018-04-09T18:50:16.000Z
2019-06-11T15:19:51.000Z
numba/core/dispatcher.py
blair1306/numba
3b9647d17d653abac15363da604eeb804dbdd15a
[ "BSD-2-Clause" ]
2
2015-04-15T20:25:48.000Z
2021-03-03T12:32:59.000Z
numba/core/dispatcher.py
blair1306/numba
3b9647d17d653abac15363da604eeb804dbdd15a
[ "BSD-2-Clause" ]
1
2021-05-12T07:29:28.000Z
2021-05-12T07:29:28.000Z
# -*- coding: utf-8 -*- import collections import functools import os import struct import sys import types as pytypes import uuid import weakref from copy import deepcopy from numba import _dispatcher from numba.core import utils, types, errors, typing, serialize, config, compiler, sigutils from numba.core.compiler...
37.265343
104
0.598377
import collections import functools import os import struct import sys import types as pytypes import uuid import weakref from copy import deepcopy from numba import _dispatcher from numba.core import utils, types, errors, typing, serialize, config, compiler, sigutils from numba.core.compiler_lock import global_com...
true
true
f704f208405e343692080fea1f8d229afeb2ecb7
90,552
py
Python
src/genie/libs/parser/iosxe/tests/test_show_interface.py
Drey/genieparser
f16649efabf1f3c892bcaad340ae24ce5403ba6b
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/test_show_interface.py
Drey/genieparser
f16649efabf1f3c892bcaad340ae24ce5403ba6b
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/test_show_interface.py
Drey/genieparser
f16649efabf1f3c892bcaad340ae24ce5403ba6b
[ "Apache-2.0" ]
null
null
null
#!/bin/env python import sys import unittest from unittest.mock import Mock from unittest.mock import patch from textwrap import dedent ats_mock = Mock() with patch.dict('sys.modules', {'ats' : ats_mock}, autospec=True): import genie.parsergen from genie.parsergen import oper_fill from genie.parse...
39.115335
107
0.489774
import sys import unittest from unittest.mock import Mock from unittest.mock import patch from textwrap import dedent ats_mock = Mock() with patch.dict('sys.modules', {'ats' : ats_mock}, autospec=True): import genie.parsergen from genie.parsergen import oper_fill from genie.parsergen import oper_...
true
true
f704f29d917dfbd51e439f0dd5292f602da50c6f
8,655
py
Python
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
170
2020-06-08T18:30:52.000Z
2022-03-28T12:08:11.000Z
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
146
2020-06-14T18:56:27.000Z
2022-02-27T21:15:59.000Z
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
36
2020-06-08T18:30:56.000Z
2022-03-07T18:10:19.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Author: Li Yuanming Email: yli056@e.ntu.edu.sg Date: 1/27/2021 ML model structure definitions. """ import abc import inspect from enum import Enum from typing import Optional, Union, Tuple, Dict, OrderedDict from pydantic import BaseModel, PositiveInt, conint, Positiv...
34.209486
115
0.669324
import abc import inspect from enum import Enum from typing import Optional, Union, Tuple, Dict, OrderedDict from pydantic import BaseModel, PositiveInt, conint, PositiveFloat, Field, validator from typing_extensions import Literal class Operation(Enum): ADD = 'A' DELETE = 'D' MODIFY = 'M' EMPTY = ...
true
true
f704f2ca519f891d9320e62953ff55261e97b68a
5,431
py
Python
src/thexb/STAGE_topobinner.py
harris-2374/THEx
04c4f56eb2cf86b8f55ddd6edd3f48029296bf5a
[ "MIT" ]
null
null
null
src/thexb/STAGE_topobinner.py
harris-2374/THEx
04c4f56eb2cf86b8f55ddd6edd3f48029296bf5a
[ "MIT" ]
null
null
null
src/thexb/STAGE_topobinner.py
harris-2374/THEx
04c4f56eb2cf86b8f55ddd6edd3f48029296bf5a
[ "MIT" ]
null
null
null
""" Author: Andrew Harris Python 3.8 """ import logging import os import pandas as pd from ete3 import Tree from tqdm import tqdm ############################### Set up logger ################################# def set_logger_level(WORKING_DIR, LOG_LEVEL): logger = logging.getLogger(__name__) # Remove existing ...
38.51773
119
0.558645
import logging import os import pandas as pd from ete3 import Tree from tqdm import tqdm
true
true