hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c01468bb2c1eda03785ee2c9ebefa3526deb377
26,072
py
Python
dataset/dataset.py
dornik/sporeagent
a95139c47534670f7a47f86adf62d3e488981409
[ "MIT" ]
3
2022-01-04T13:39:22.000Z
2022-02-25T08:49:50.000Z
dataset/dataset.py
dornik/sporeagent
a95139c47534670f7a47f86adf62d3e488981409
[ "MIT" ]
null
null
null
dataset/dataset.py
dornik/sporeagent
a95139c47534670f7a47f86adf62d3e488981409
[ "MIT" ]
3
2022-01-04T12:19:53.000Z
2022-03-18T03:34:10.000Z
import numpy as np import torch from torch.utils.data import Dataset import torchvision import os import pickle import trimesh import sys import skimage.io as skio from tqdm import tqdm import open3d as o3d import cv2 as cv from scipy.spatial.transform.rotation import Rotation import glob import config as cfg import d...
53.099796
121
0.5751
import numpy as np import torch from torch.utils.data import Dataset import torchvision import os import pickle import trimesh import sys import skimage.io as skio from tqdm import tqdm import open3d as o3d import cv2 as cv from scipy.spatial.transform.rotation import Rotation import glob import config as cfg import d...
true
true
1c0146ae48c3a1126774051bdb2210ed1344912b
5,058
py
Python
torchreid/data/datasets/image/viper.py
mangye16/deep-person-reid
42eaccea712c3ebcc5273085a3cfea400a4783b8
[ "MIT" ]
2
2021-05-05T09:17:46.000Z
2021-08-29T15:16:43.000Z
torchreid/data/datasets/image/viper.py
mangye16/deep-person-reid
42eaccea712c3ebcc5273085a3cfea400a4783b8
[ "MIT" ]
null
null
null
torchreid/data/datasets/image/viper.py
mangye16/deep-person-reid
42eaccea712c3ebcc5273085a3cfea400a4783b8
[ "MIT" ]
null
null
null
from __future__ import division, print_function, absolute_import import glob import numpy as np import os.path as osp from torchreid.utils import read_json, write_json from ..dataset import ImageDataset class VIPeR(ImageDataset): """VIPeR. Reference: Gray et al. Evaluating appearance models for re...
38.318182
105
0.549822
from __future__ import division, print_function, absolute_import import glob import numpy as np import os.path as osp from torchreid.utils import read_json, write_json from ..dataset import ImageDataset class VIPeR(ImageDataset): dataset_dir = 'viper' dataset_url = 'http://users.soe.ucsc.edu/~manduchi/VIPe...
true
true
1c0146e6d239ee6ba7af17f027ffd8aa41bf219f
4,739
py
Python
openface/torch_neural_net.py
sharmasaravanan/openface-Verification
e2471e827eee2c86e92861f5fd59affa04c725ba
[ "Apache-2.0" ]
null
null
null
openface/torch_neural_net.py
sharmasaravanan/openface-Verification
e2471e827eee2c86e92861f5fd59affa04c725ba
[ "Apache-2.0" ]
null
null
null
openface/torch_neural_net.py
sharmasaravanan/openface-Verification
e2471e827eee2c86e92861f5fd59affa04c725ba
[ "Apache-2.0" ]
null
null
null
# Copyright 2015-2016 Carnegie Mellon University # # 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 l...
30.973856
93
0.618274
import atexit import binascii from subprocess import Popen, PIPE import os import os.path import sys import numpy as np import cv2 myDir = os.path.dirname(os.path.realpath(__file__)) os.environ['TERM'] = 'linux' class TorchNeuralNet: defaultModel = os.path.join(myDir, '..', 'models', ...
true
true
1c014700145b410f6d65cd6be5e1a47e03f515bc
2,188
py
Python
rws_client_thread_example.py
charlypg/RobotWebServices-Python-Interface
c96c5267b48aeeb179894e81d59fa726c7198b83
[ "MIT" ]
null
null
null
rws_client_thread_example.py
charlypg/RobotWebServices-Python-Interface
c96c5267b48aeeb179894e81d59fa726c7198b83
[ "MIT" ]
null
null
null
rws_client_thread_example.py
charlypg/RobotWebServices-Python-Interface
c96c5267b48aeeb179894e81d59fa726c7198b83
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Copyright (c) 2021 Charly PECQUEUX--GUÉZÉNEC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the r...
32.656716
88
0.654479
import time from rws_client_thread import RWSClientThread class RWSClientThreadCustom(RWSClientThread): def run(self): payload = {'resources':['1'], '1':'/rw/panel/ctrlstate', '1-p':'1'} self.start_listening(payload) for i i...
true
true
1c0147a10416ec9c680f62b78584ca6adedf8ff7
94,852
py
Python
internalblue/core.py
ParikhKadam/internalblue
889946a138f49a0a0874a0b1226cbd8414113d6f
[ "Unlicense" ]
485
2018-09-08T12:12:34.000Z
2022-03-30T19:37:22.000Z
internalblue/core.py
ParikhKadam/internalblue
889946a138f49a0a0874a0b1226cbd8414113d6f
[ "Unlicense" ]
46
2018-09-09T14:35:27.000Z
2022-03-09T16:43:26.000Z
internalblue/core.py
ParikhKadam/internalblue
889946a138f49a0a0874a0b1226cbd8414113d6f
[ "Unlicense" ]
62
2018-09-09T14:35:37.000Z
2022-02-03T06:20:58.000Z
#!/usr/bin/env python2 # core.py # # This file contains the main class of the framework which # includes the thread functions for the receive and send thread. # It also implements methods to setup the TCP connection to the # Android Bluetooth stack via ADB port forwarding # # Copyright (c) 2020 The InternalBlue Team. ...
42.288007
195
0.590636
from __future__ import division import datetime import logging import queue as queue2k import socket import struct import time from abc import ABCMeta, abstractmethod from builtins import hex, str, range, object from threading import Thread from future import standard_library from future.utils import with_metaclass...
true
true
1c0147d442a309b521fceb7e960f9a5d9c9f7511
1,842
py
Python
src/squash/api_v1/blob.py
lsst-sqre/squash-rest-api
4c42115418e8770da3fc42e8046e63e6d7e536d7
[ "MIT" ]
null
null
null
src/squash/api_v1/blob.py
lsst-sqre/squash-rest-api
4c42115418e8770da3fc42e8046e63e6d7e536d7
[ "MIT" ]
22
2021-01-04T15:20:41.000Z
2022-03-21T21:02:17.000Z
src/squash/api_v1/blob.py
lsst-sqre/squash-rest-api
4c42115418e8770da3fc42e8046e63e6d7e536d7
[ "MIT" ]
null
null
null
import json from flask_restful import Resource, reqparse from squash.tasks.s3 import download_object from ..models import JobModel as Job class Blob(Resource): parser = reqparse.RequestParser() parser.add_argument( "metric", type=str, required=True, help="This field cannot b...
23.316456
79
0.535831
import json from flask_restful import Resource, reqparse from squash.tasks.s3 import download_object from ..models import JobModel as Job class Blob(Resource): parser = reqparse.RequestParser() parser.add_argument( "metric", type=str, required=True, help="This field cannot b...
true
true
1c0147fc853610d1c79abf4f9c4dec4f275e7773
350
py
Python
cloudmesh/catalog/database.py
cloudmesh/cloudmesh-catalog
393f76e373c40afb89e512539b3647753d4576fb
[ "Apache-2.0" ]
null
null
null
cloudmesh/catalog/database.py
cloudmesh/cloudmesh-catalog
393f76e373c40afb89e512539b3647753d4576fb
[ "Apache-2.0" ]
15
2022-02-09T15:59:02.000Z
2022-03-03T00:20:29.000Z
cloudmesh/catalog/database.py
cloudmesh/cloudmesh-catalog
393f76e373c40afb89e512539b3647753d4576fb
[ "Apache-2.0" ]
null
null
null
from yamldb import YamlDB class DataBase(YamlDB): def __init__(self, name="~/.cloudmesh/catalog/data.yaml", kind=YamlDB): self.db = YamlDB(filename=name) # # TODO: create the database if it does not exists # check if yamldb already does this # def update(self, name):...
23.333333
75
0.622857
from yamldb import YamlDB class DataBase(YamlDB): def __init__(self, name="~/.cloudmesh/catalog/data.yaml", kind=YamlDB): self.db = YamlDB(filename=name) def update(self, name): self.db.uppdate(name)
true
true
1c01484ed19b2bfa3933a52bee9c020ffa735683
1,256
py
Python
yitu/yitu_speech/setup.py
wangjinyu124419/long_audio_asr
d8dabf6cb10b282e3bd4981207c4a0f478977c9b
[ "MIT" ]
null
null
null
yitu/yitu_speech/setup.py
wangjinyu124419/long_audio_asr
d8dabf6cb10b282e3bd4981207c4a0f478977c9b
[ "MIT" ]
null
null
null
yitu/yitu_speech/setup.py
wangjinyu124419/long_audio_asr
d8dabf6cb10b282e3bd4981207c4a0f478977c9b
[ "MIT" ]
1
2019-11-15T10:29:52.000Z
2019-11-15T10:29:52.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2018-Present Shanghai Yitu Technology Co., Ltd. # Licensed under the Apache License, Version 2.0 # Yitu SDK from setuptools import setup, find_packages from common import constants with open("README.rst") as fp: LONG_DESCRIPTION = fp.read() setup( n...
30.634146
61
0.621815
from setuptools import setup, find_packages from common import constants with open("README.rst") as fp: LONG_DESCRIPTION = fp.read() setup( name = 'yitu-speech-python-sdk', version = str(constants.CONSTANT_VERSION), packages = find_packages(), install_requires=[ 'requests', ], li...
true
true
1c014a8a21f93f5ef0d372fa949fac929672e325
1,128
py
Python
circle_core/alembic/versions/017a329f79bf_add_replication_master_id_to_cc_.py
glucoseinc/CircleCore
577f814ce2944efb6e5997f3d7838c71ce9aea6a
[ "MIT" ]
3
2019-01-11T04:30:18.000Z
2019-01-11T04:31:18.000Z
circle_core/alembic/versions/017a329f79bf_add_replication_master_id_to_cc_.py
glucoseinc/CircleCore
577f814ce2944efb6e5997f3d7838c71ce9aea6a
[ "MIT" ]
16
2018-11-21T11:47:18.000Z
2021-09-01T03:52:35.000Z
circle_core/alembic/versions/017a329f79bf_add_replication_master_id_to_cc_.py
glucoseinc/CircleCore
577f814ce2944efb6e5997f3d7838c71ce9aea6a
[ "MIT" ]
null
null
null
"""add `replication_master_id` to cc_informations Revision ID: 017a329f79bf Revises: Create Date: 2017-02-13 21:36:56.994225 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '017a329f79bf' down_revision = None branch_labels = None depends_on = None def upgrade...
29.684211
103
0.714539
from alembic import op import sqlalchemy as sa revision = '017a329f79bf' down_revision = None branch_labels = None depends_on = None def upgrade(): with op.batch_alter_table('cc_informations', schema=None) as batch_op: batch_op.add_column(sa.Column('replication_master_id', sa.Integer(), nullable=Tru...
true
true
1c014ad653f19ce0fd2824bab7a3b7ad900a4477
1,391
py
Python
catalog/admin.py
UwemEkong/django_local_library
146d36cd6e2800517fccc1ce781962048d469b1b
[ "MIT" ]
null
null
null
catalog/admin.py
UwemEkong/django_local_library
146d36cd6e2800517fccc1ce781962048d469b1b
[ "MIT" ]
5
2020-06-05T20:26:11.000Z
2021-09-22T18:19:48.000Z
catalog/admin.py
UwemEkong/django_local_library
146d36cd6e2800517fccc1ce781962048d469b1b
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Author, Genre, Book, BookInstance, Language #admin.site.register(Book) #admin.site.register(Author) #admin.site.register(BookInstance) admin.site.register(Genre) admin.site.register(Language) # Define the admin class class BooksInline...
30.23913
80
0.698059
from django.contrib import admin from .models import Author, Genre, Book, BookInstance, Language admin.site.register(Genre) admin.site.register(Language) class BooksInline(admin.TabularInline): model = Book class AuthorAdmin(admin.ModelAdmin): list_display = ('last_name', 'first_name', 'date_of_birth', 'da...
true
true
1c014b6e3684f9d67192468476b8091aa314ff1a
37,158
py
Python
venv/Lib/site-packages/pandas/tests/plotting/test_series.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/plotting/test_series.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/plotting/test_series.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
""" Test cases for Series.plot """ from datetime import datetime from itertools import chain import numpy as np from numpy.random import randn import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, Series, date_range import pandas._testing as tm fro...
37.839104
87
0.575704
from datetime import datetime from itertools import chain import numpy as np from numpy.random import randn import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, Series, date_range import pandas._testing as tm from pandas.tests.plotting.common impor...
true
true
1c014ca796d78e404537ee5f1d885ad1ff13fb1f
4,964
py
Python
leetcode/10 regular-expression-matching.py
xiewendan/algorithm
64016100dc5122603be468bef90d62edcd1846ec
[ "MIT" ]
null
null
null
leetcode/10 regular-expression-matching.py
xiewendan/algorithm
64016100dc5122603be468bef90d62edcd1846ec
[ "MIT" ]
null
null
null
leetcode/10 regular-expression-matching.py
xiewendan/algorithm
64016100dc5122603be468bef90d62edcd1846ec
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # __author__ = xiaobao # __date__ = 2019/09/27 23:06:41 # desc: 是否匹配 # 给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。 # '.' 匹配任意单个字符 # '*' 匹配零个或多个前面的那一个元素 # 所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。 # 说明: # s 可能为空,且只包含从 a-z 的小写字母。 # p 可能为空,且只包含从 a-z 的小写字母,以及字符 . 和 *。 # 示例 1: # 输入: # s = "aa" # p =...
26.688172
106
0.499194
class Solution: def isMatch(self, s, p): nLenS = len(s) nLenP = len(p) subset = [] for i in range(1+nLenS): subset.append([False]*(1+nLenP)) for i in range(1+nLenS): subset[i][0] = False subset[0][0] = True for i in r...
true
true
1c014d113703cf0ac992442219bbad1761ba21e5
10,006
py
Python
watcher/decision_engine/strategy/strategies/base.py
mail2nsrajesh/watcher
5f179609d0ee145fc7957972c83593cce242884d
[ "Apache-2.0" ]
null
null
null
watcher/decision_engine/strategy/strategies/base.py
mail2nsrajesh/watcher
5f179609d0ee145fc7957972c83593cce242884d
[ "Apache-2.0" ]
null
null
null
watcher/decision_engine/strategy/strategies/base.py
mail2nsrajesh/watcher
5f179609d0ee145fc7957972c83593cce242884d
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # Copyright (c) 2015 b<>com # # 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 a...
29.516224
79
0.68399
import abc import six from oslo_utils import strutils from watcher.common import clients from watcher.common import context from watcher.common import exception from watcher.common.loader import loadable from watcher.common import utils from watcher.decision_engine.loading import default as loading from watcher.dec...
true
true
1c014dd6edf22e634f63e735e8155b4f19b21e30
17,301
py
Python
tensorflow/python/distribute/strategy_combinations.py
TL-Rubick/tensorflow
6cf1ccf6060a95aad3ccc84544d0aa166990ec72
[ "Apache-2.0" ]
11
2018-01-03T15:11:09.000Z
2021-04-13T05:47:27.000Z
tensorflow/python/distribute/strategy_combinations.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
88
2020-11-24T08:18:10.000Z
2022-03-25T20:28:30.000Z
tensorflow/python/distribute/strategy_combinations.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
10
2018-07-31T10:56:21.000Z
2019-10-07T08:05:21.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.775109
111
0.765678
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python import tf2 from tensorflow.python.distribute import central_storage_strategy from tensorflow.python.distribute import cluster_resolver from tensorflow.python.distribute import collective...
true
true
1c014e057f05313a99f1d16b3e83845dc1b486c3
809
py
Python
mysite/blog/forms.py
ATummillo/tech-blog-demo
16a14d8e3efba961b2ef7fc8674f8dc415529eb9
[ "MIT" ]
null
null
null
mysite/blog/forms.py
ATummillo/tech-blog-demo
16a14d8e3efba961b2ef7fc8674f8dc415529eb9
[ "MIT" ]
null
null
null
mysite/blog/forms.py
ATummillo/tech-blog-demo
16a14d8e3efba961b2ef7fc8674f8dc415529eb9
[ "MIT" ]
null
null
null
from django import forms from .models import Post, Comment class PostForm(forms.ModelForm): class Meta(): model = Post fields = ('author', 'title', 'text') widgets = { 'title': forms.TextInput(attrs={ 'class': 'textinputclass' }), 'text'...
24.515152
70
0.498146
from django import forms from .models import Post, Comment class PostForm(forms.ModelForm): class Meta(): model = Post fields = ('author', 'title', 'text') widgets = { 'title': forms.TextInput(attrs={ 'class': 'textinputclass' }), 'text'...
true
true
1c014ebf466ae73e864d8cc1b0b3b43126d82d7d
3,618
py
Python
tests/egg2pg/test_egg_coordsys.py
CFSworks/panda3d
e13a4d653984eaaa4d3a30fcb76df9a7d17f085c
[ "PHP-3.01", "PHP-3.0" ]
null
null
null
tests/egg2pg/test_egg_coordsys.py
CFSworks/panda3d
e13a4d653984eaaa4d3a30fcb76df9a7d17f085c
[ "PHP-3.01", "PHP-3.0" ]
null
null
null
tests/egg2pg/test_egg_coordsys.py
CFSworks/panda3d
e13a4d653984eaaa4d3a30fcb76df9a7d17f085c
[ "PHP-3.01", "PHP-3.0" ]
null
null
null
import pytest from panda3d import core # Skip these tests if we can't import egg. egg = pytest.importorskip("panda3d.egg") COORD_SYSTEMS = [core.CS_zup_right, core.CS_yup_right, core.CS_zup_left, core.CS_yup_left] @pytest.mark.parametrize("egg_coordsys", COORD_SYSTEMS) @pytest.mark.parametrize("coordsys", COORD_SY...
34.457143
90
0.718905
import pytest from panda3d import core egg = pytest.importorskip("panda3d.egg") COORD_SYSTEMS = [core.CS_zup_right, core.CS_yup_right, core.CS_zup_left, core.CS_yup_left] @pytest.mark.parametrize("egg_coordsys", COORD_SYSTEMS) @pytest.mark.parametrize("coordsys", COORD_SYSTEMS) def test_egg2pg_transform_ident(egg_...
true
true
1c014fc9eef16c40f923227745b41f8cfa260063
57
py
Python
python/doit/04/vartest.py
gangserver/py_test
869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4
[ "Apache-2.0" ]
null
null
null
python/doit/04/vartest.py
gangserver/py_test
869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4
[ "Apache-2.0" ]
null
null
null
python/doit/04/vartest.py
gangserver/py_test
869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4
[ "Apache-2.0" ]
null
null
null
a = 1 def vartest(a): a = a + 1 vartest(a) print(a)
8.142857
15
0.526316
a = 1 def vartest(a): a = a + 1 vartest(a) print(a)
true
true
1c01507d5807333c7d3b2b777e303e118a25ff89
20,681
py
Python
resources/drawable.py
Hancapo/Sollumz
da12f20f148e29258c244f9ce37bd87ddec05d02
[ "MIT" ]
null
null
null
resources/drawable.py
Hancapo/Sollumz
da12f20f148e29258c244f9ce37bd87ddec05d02
[ "MIT" ]
null
null
null
resources/drawable.py
Hancapo/Sollumz
da12f20f148e29258c244f9ce37bd87ddec05d02
[ "MIT" ]
null
null
null
from abc import ABC as AbstractClass, abstractmethod from xml.etree import ElementTree as ET from .codewalker_xml import * from ..tools.utils import * from .bound import * from collections import namedtuple from collections.abc import MutableSequence from enum import Enum class YDD: file_extension = ".ydd.xml" ...
32.314063
252
0.626662
from abc import ABC as AbstractClass, abstractmethod from xml.etree import ElementTree as ET from .codewalker_xml import * from ..tools.utils import * from .bound import * from collections import namedtuple from collections.abc import MutableSequence from enum import Enum class YDD: file_extension = ".ydd.xml" ...
true
true
1c015148f3a79e5c6e576cb60de468501d92a430
3,282
py
Python
lane_finding_pipeline/GradientFilter.py
kerrywang/Advanced-Lane-Finding
146fd169b9c9a0c58d2bd6103e147fdc4a26684d
[ "MIT" ]
null
null
null
lane_finding_pipeline/GradientFilter.py
kerrywang/Advanced-Lane-Finding
146fd169b9c9a0c58d2bd6103e147fdc4a26684d
[ "MIT" ]
17
2020-01-28T22:46:24.000Z
2022-03-11T23:48:39.000Z
lane_finding_pipeline/GradientFilter.py
kerrywang/Advanced-Lane-Finding
146fd169b9c9a0c58d2bd6103e147fdc4a26684d
[ "MIT" ]
null
null
null
from lane_finding_pipeline.piplineinterface import PipeLineInterface import cv2 import numpy as np import constant import os class GradientFilter(PipeLineInterface): def __init__(self, filter=[]): self.filters = filter def addFilter(self, filterClass): assert isinstance(filterClass, GradientFil...
38.611765
94
0.644424
from lane_finding_pipeline.piplineinterface import PipeLineInterface import cv2 import numpy as np import constant import os class GradientFilter(PipeLineInterface): def __init__(self, filter=[]): self.filters = filter def addFilter(self, filterClass): assert isinstance(filterClass, GradientFil...
true
true
1c01514db1336134c96d4b021408b174d8372ebb
548
py
Python
packages/pyre/flow/__init__.py
avalentino/pyre
7e1f0287eb7eba1c6d1ef385e5160079283ac363
[ "BSD-3-Clause" ]
25
2018-04-23T01:45:39.000Z
2021-12-10T06:01:23.000Z
packages/pyre/flow/__init__.py
avalentino/pyre
7e1f0287eb7eba1c6d1ef385e5160079283ac363
[ "BSD-3-Clause" ]
53
2018-05-31T04:55:00.000Z
2021-10-07T21:41:32.000Z
packages/pyre/flow/__init__.py
avalentino/pyre
7e1f0287eb7eba1c6d1ef385e5160079283ac363
[ "BSD-3-Clause" ]
12
2018-04-23T22:50:40.000Z
2022-02-20T17:27:23.000Z
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2021 all rights reserved # """ Support for workflows """ # the protocols from .Producer import Producer as producer from .Specification import Specification as specification from .Flow import Flow as flow # the components from .Factory import...
18.266667
57
0.762774
from .Producer import Producer as producer from .Specification import Specification as specification from .Flow import Flow as flow from .Factory import Factory as factory from .Product import Product as product from .Workflow import Workflow as workflow from .DynamicWorkflow import DynamicWorkflow as dynamic fro...
true
true
1c015173d61b5312ac7bf652044c63d6e8470f2f
3,290
py
Python
scripts/venv/lib/python2.7/site-packages/cogent/parse/infernal.py
sauloal/cnidaria
fe6f8c8dfed86d39c80f2804a753c05bb2e485b4
[ "MIT" ]
3
2015-11-20T08:44:42.000Z
2016-12-14T01:40:03.000Z
scripts/venv/lib/python2.7/site-packages/cogent/parse/infernal.py
sauloal/cnidaria
fe6f8c8dfed86d39c80f2804a753c05bb2e485b4
[ "MIT" ]
1
2017-09-04T14:04:32.000Z
2020-05-26T19:04:00.000Z
scripts/venv/lib/python2.7/site-packages/cogent/parse/infernal.py
sauloal/cnidaria
fe6f8c8dfed86d39c80f2804a753c05bb2e485b4
[ "MIT" ]
null
null
null
#!/usr/bin/env python #file cogent.parse.infernal.py """Parses various Infernal output formats for the commandline version of: Infernal 1.0 and 1.0.2 only.""" from cogent.parse.table import ConvertFields, SeparatorFormatParser,is_empty __author__ = "Jeremy Widmann" __copyright__ = "Copyright 2007-2012, The Cogent Pro...
38.255814
79
0.611854
from cogent.parse.table import ConvertFields, SeparatorFormatParser,is_empty __author__ = "Jeremy Widmann" __copyright__ = "Copyright 2007-2012, The Cogent Project" __credits__ = ["Jeremy Widmann"] __license__ = "GPL" __version__ = "1.5.3" __maintainer__ = "Jeremy Widmann" __email__ = "jeremy.widmann@colorado.edu" __...
true
true
1c015174618297b40a0f8f1dfa5c9d46141669ed
9,630
py
Python
static/doc/current/_static/conf.py
andreasebner/open62541-www-staging
0e715605854cfaa181ef503072f8f45fdfafbb4b
[ "Apache-2.0" ]
null
null
null
static/doc/current/_static/conf.py
andreasebner/open62541-www-staging
0e715605854cfaa181ef503072f8f45fdfafbb4b
[ "Apache-2.0" ]
null
null
null
static/doc/current/_static/conf.py
andreasebner/open62541-www-staging
0e715605854cfaa181ef503072f8f45fdfafbb4b
[ "Apache-2.0" ]
1
2021-10-12T07:01:19.000Z
2021-10-12T07:01:19.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -*- coding: utf-8 -*- # # open62541 documentation build configuration file, created by # sphinx-quickstart on Sat May...
32.866894
79
0.72108
import sys import os import shlex import sphinx_rtd_theme extensions = ['sphinx.ext.graphviz'] numfig = True templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'toc' project = u'open62541' copyright = u'2016, The open62541 authors' author = u'The open62541 authors' # |version| and |release...
true
true
1c01520b2864cd9a92e81b37cca59f5c41b908e7
44
py
Python
__init__.py
minjunli/jsonc
a61b72e92729f9177d8d8685deae744244d6be16
[ "MIT" ]
2
2020-08-30T08:02:10.000Z
2020-09-06T05:33:55.000Z
__init__.py
minjunli/jsonc
a61b72e92729f9177d8d8685deae744244d6be16
[ "MIT" ]
null
null
null
__init__.py
minjunli/jsonc
a61b72e92729f9177d8d8685deae744244d6be16
[ "MIT" ]
null
null
null
from .jsonc import load, loads, dump, dumps
22
43
0.75
from .jsonc import load, loads, dump, dumps
true
true
1c015235c0ace1dcd81812a3a61972adfeb260be
6,489
py
Python
ggshield/filter.py
segudev/ggshield
d880ca58d6405f81dd57e1151f337010a019bcda
[ "MIT" ]
null
null
null
ggshield/filter.py
segudev/ggshield
d880ca58d6405f81dd57e1151f337010a019bcda
[ "MIT" ]
null
null
null
ggshield/filter.py
segudev/ggshield
d880ca58d6405f81dd57e1151f337010a019bcda
[ "MIT" ]
null
null
null
import hashlib import math import operator import re from collections import OrderedDict from typing import Dict, Iterable, List, Optional, Set import click from pygitguardian.models import Match, PolicyBreak, ScanResult from ggshield.config_types import IgnoredMatch REGEX_MATCH_HIDE = re.compile(r"[^+\-\s]") REGEX...
29.903226
88
0.661889
import hashlib import math import operator import re from collections import OrderedDict from typing import Dict, Iterable, List, Optional, Set import click from pygitguardian.models import Match, PolicyBreak, ScanResult from ggshield.config_types import IgnoredMatch REGEX_MATCH_HIDE = re.compile(r"[^+\-\s]") REGEX...
true
true
1c0152426b0f9dea9acc69155aa0f82115b1bed9
2,973
py
Python
src/run.py
liuweiping2020/advForNLP
cb4d21ead7a05826999edec2e6745e5301c4a19c
[ "MIT" ]
null
null
null
src/run.py
liuweiping2020/advForNLP
cb4d21ead7a05826999edec2e6745e5301c4a19c
[ "MIT" ]
null
null
null
src/run.py
liuweiping2020/advForNLP
cb4d21ead7a05826999edec2e6745e5301c4a19c
[ "MIT" ]
null
null
null
# coding: UTF-8 import time import torch import numpy as np from trains.train_eval import train, init_network from importlib import import_module import argparse parser = argparse.ArgumentParser(description='Chinese Text Classification') parser.add_argument('--model', type=str, required=True, help=...
41.873239
114
0.712412
import time import torch import numpy as np from trains.train_eval import train, init_network from importlib import import_module import argparse parser = argparse.ArgumentParser(description='Chinese Text Classification') parser.add_argument('--model', type=str, required=True, help='choose a model:...
true
true
1c015244247639f063db56a27e2962c3a5a312b9
50
py
Python
tests/__init__.py
ircmaxell/unifi-protect-backup
af8ca90356d0e7439c528018d72f1d844af47a93
[ "MIT" ]
69
2022-02-20T02:16:32.000Z
2022-03-28T19:03:25.000Z
tests/__init__.py
ircmaxell/unifi-protect-backup
af8ca90356d0e7439c528018d72f1d844af47a93
[ "MIT" ]
24
2022-02-20T15:31:38.000Z
2022-03-26T16:30:22.000Z
tests/__init__.py
ircmaxell/unifi-protect-backup
af8ca90356d0e7439c528018d72f1d844af47a93
[ "MIT" ]
4
2022-02-22T11:14:59.000Z
2022-03-26T15:35:27.000Z
"""Unit test package for unifi-protect-backup."""
25
49
0.72
true
true
1c01528085dd04ad94cae839db985775130047e9
430
py
Python
packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="waterfall.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, pa...
30.714286
84
0.662791
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="waterfall.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, pa...
true
true
1c0152ea23487d1b1f721940d529fb638922ba8b
331
py
Python
python/tests/test_node_port.py
tk1012/ion-kit
d42be09dfd78fe415058723c186a76a84c699d45
[ "MIT" ]
4
2020-11-18T14:31:23.000Z
2022-01-07T21:01:05.000Z
python/tests/test_node_port.py
tk1012/ion-kit
d42be09dfd78fe415058723c186a76a84c699d45
[ "MIT" ]
19
2020-10-23T08:12:12.000Z
2021-09-02T02:08:19.000Z
python/tests/test_node_port.py
tk1012/ion-kit
d42be09dfd78fe415058723c186a76a84c699d45
[ "MIT" ]
7
2020-10-22T01:33:06.000Z
2022-02-23T18:43:45.000Z
from ionpy import Node, Port, Type, TypeCode def test_node_port(): t = Type(code_=TypeCode.Int, bits_=32, lanes_=1) port_to_set = Port(key='iamkey', type=t, dim=3) ports = [ port_to_set, ] n = Node() n.set_port(ports) port_to_get = n.get_port('iamkey') print(f'from node.get_port: {port...
20.6875
52
0.646526
from ionpy import Node, Port, Type, TypeCode def test_node_port(): t = Type(code_=TypeCode.Int, bits_=32, lanes_=1) port_to_set = Port(key='iamkey', type=t, dim=3) ports = [ port_to_set, ] n = Node() n.set_port(ports) port_to_get = n.get_port('iamkey') print(f'from node.get_port: {port...
true
true
1c0153dc322979a63c049acb4eb576668c80edeb
2,062
py
Python
setup.py
tk0miya/sphinxcontrib-devhelp
393d13983dccec9248c64d8763f2c9bfe2dd677c
[ "BSD-2-Clause" ]
2
2019-08-27T15:38:50.000Z
2021-08-08T02:25:35.000Z
setup.py
tk0miya/sphinxcontrib-devhelp
393d13983dccec9248c64d8763f2c9bfe2dd677c
[ "BSD-2-Clause" ]
1
2019-07-13T12:33:58.000Z
2021-04-14T15:36:17.000Z
setup.py
tk0miya/sphinxcontrib-devhelp
393d13983dccec9248c64d8763f2c9bfe2dd677c
[ "BSD-2-Clause" ]
7
2019-09-29T04:31:04.000Z
2021-03-14T16:17:34.000Z
# -*- coding: utf-8 -*- import os from setuptools import setup, find_packages long_desc = ''' sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. ''' extras_require = { 'test': [ 'pytest', ], 'lint': [ 'flake8', 'mypy', 'docutils-stubs', ], } d...
29.042254
90
0.617847
import os from setuptools import setup, find_packages long_desc = ''' sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. ''' extras_require = { 'test': [ 'pytest', ], 'lint': [ 'flake8', 'mypy', 'docutils-stubs', ], } def get_version(): pa...
true
true
1c0153ecc6e2f3b5afbc34d52b91a221655960db
718
py
Python
examples/1827402026.py
lobo0616/bysj
c90bf1de8328cf44acb6faaaac4b575b83ef11a1
[ "MIT" ]
1
2020-03-30T15:33:25.000Z
2020-03-30T15:33:25.000Z
examples/1827402026.py
lobo0616/bysj
c90bf1de8328cf44acb6faaaac4b575b83ef11a1
[ "MIT" ]
null
null
null
examples/1827402026.py
lobo0616/bysj
c90bf1de8328cf44acb6faaaac4b575b83ef11a1
[ "MIT" ]
1
2020-04-02T14:37:26.000Z
2020-04-02T14:37:26.000Z
# 学号:1827402026 # 姓名:谢仪伟 # IP:192.168.157.177 # 上传时间:2018/11/12 15:22:50 import math def func1(a,b): if a>b: n=a a=b b=n if a<b: a=a*(a+1) m=a%10 n=0 while m==0: n=n+1 return def func2(a, b): if a<=0 or b<=0: ...
13.054545
34
0.399721
 import math def func1(a,b): if a>b: n=a a=b b=n if a<b: a=a*(a+1) m=a%10 n=0 while m==0: n=n+1 return def func2(a, b): if a<=0 or b<=0: return if a>b: c=a a=b b=c m=0 for...
false
true
1c01542ef66f50c0e3007e53528ccd61dec49e31
50,508
py
Python
excel_workbook_automation/revenue/revenue_data_formatting.py
eulloa10/work-automation-projects
6a25b4507317e7072c23e2fb8ae6b632174140e9
[ "MIT" ]
null
null
null
excel_workbook_automation/revenue/revenue_data_formatting.py
eulloa10/work-automation-projects
6a25b4507317e7072c23e2fb8ae6b632174140e9
[ "MIT" ]
null
null
null
excel_workbook_automation/revenue/revenue_data_formatting.py
eulloa10/work-automation-projects
6a25b4507317e7072c23e2fb8ae6b632174140e9
[ "MIT" ]
null
null
null
from openpyxl import Workbook, load_workbook from openpyxl.worksheet.table import Table, TableStyleInfo from openpyxl.styles import PatternFill, Border, Side, Alignment, Protection, Font from openpyxl.utils import get_column_letter from openpyxl.comments import Comment from openpyxl.drawing.image import Image import da...
40.374101
641
0.628237
from openpyxl import Workbook, load_workbook from openpyxl.worksheet.table import Table, TableStyleInfo from openpyxl.styles import PatternFill, Border, Side, Alignment, Protection, Font from openpyxl.utils import get_column_letter from openpyxl.comments import Comment from openpyxl.drawing.image import Image import da...
true
true
1c015445fd9f4003c23228ebc2c2b23044c255bc
7,380
py
Python
userbot/__init__.py
FocusedKen/One4uBot
4d998b37ce586f7288a331a9cc5a5134dea8ce48
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/__init__.py
FocusedKen/One4uBot
4d998b37ce586f7288a331a9cc5a5134dea8ce48
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/__init__.py
FocusedKen/One4uBot
4d998b37ce586f7288a331a9cc5a5134dea8ce48
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-05-12T18:39:30.000Z
2020-05-12T18:39:30.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """ Userbot initialization. """ import os from sys import version_info from logging import basicConfig, getLogger, IN...
31.810345
143
0.720054
import os from sys import version_info from logging import basicConfig, getLogger, INFO, DEBUG from distutils.util import strtobool as sb from pylast import LastFMNetwork, md5 from pySmartDL import SmartDL from dotenv import load_dotenv from requests import get from telethon import TelegramClient from telethon.sessi...
true
true
1c015477764a75f8de984af613ab7198130f55fb
60,166
py
Python
pysnmp/MPLS-LDP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/MPLS-LDP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/MPLS-LDP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module MPLS-LDP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MPLS-LDP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:04:02 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
146.746341
10,707
0.791361
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection = mibBuilder.impo...
true
true
1c0154d564919e875cb6a8dac0ed746bdd74cfb7
838
py
Python
nuage_neutron/db/migration/alembic_migrations/versions/liberty_release.py
jbemmel/nuage-openstack-neutron
e356c017f7e1600b72cfc26abb588c7cf636e925
[ "Apache-2.0" ]
14
2015-06-24T18:35:25.000Z
2020-09-21T07:14:06.000Z
nuage_neutron/db/migration/alembic_migrations/versions/liberty_release.py
jbemmel/nuage-openstack-neutron
e356c017f7e1600b72cfc26abb588c7cf636e925
[ "Apache-2.0" ]
7
2016-01-20T18:20:28.000Z
2020-11-18T16:04:14.000Z
nuage_neutron/db/migration/alembic_migrations/versions/liberty_release.py
jbemmel/nuage-openstack-neutron
e356c017f7e1600b72cfc26abb588c7cf636e925
[ "Apache-2.0" ]
43
2015-04-07T09:02:35.000Z
2021-02-12T07:50:19.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 # d...
27.933333
78
0.71599
revision = 'liberty' down_revision = None def upgrade(): pass
true
true
1c0155feb795d3a869e6eb88ef41d4dafc1f982e
5,056
py
Python
stage/configuration/test_mongodb_origin.py
Sentienz/datacollector-tests
ca27988351dc3366488098b5db6c85a8be2f7b85
[ "Apache-2.0" ]
null
null
null
stage/configuration/test_mongodb_origin.py
Sentienz/datacollector-tests
ca27988351dc3366488098b5db6c85a8be2f7b85
[ "Apache-2.0" ]
1
2019-04-24T11:06:38.000Z
2019-04-24T11:06:38.000Z
stage/configuration/test_mongodb_origin.py
anubandhan/datacollector-tests
301c024c66d68353735256b262b681dd05ba16cc
[ "Apache-2.0" ]
2
2019-05-24T06:34:37.000Z
2020-03-30T11:48:18.000Z
import pytest from streamsets.testframework.decorators import stub @stub @pytest.mark.parametrize('stage_attributes', [{'authentication_type': 'USER_PASS'}]) def test_authentication_source(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'authentication_ty...
24.784314
119
0.699763
import pytest from streamsets.testframework.decorators import stub @stub @pytest.mark.parametrize('stage_attributes', [{'authentication_type': 'USER_PASS'}]) def test_authentication_source(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'authentication_ty...
true
true
1c0157b72cd011c3a7a7845175e411892b95df31
817
py
Python
code/interview-problems/knights-dialer/level_3.py
alexgolec/interview-problems
134b4f6d8c19524cdd61a03a283c77aaa93d67d3
[ "MIT" ]
141
2019-01-23T16:14:39.000Z
2021-05-01T03:41:25.000Z
code/interview-problems/knights-dialer/level_3.py
alexgolec/career-advice
134b4f6d8c19524cdd61a03a283c77aaa93d67d3
[ "MIT" ]
2
2019-07-30T03:00:13.000Z
2020-09-26T12:59:26.000Z
code/interview-problems/knights-dialer/level_3.py
alexgolec/career-advice
134b4f6d8c19524cdd61a03a283c77aaa93d67d3
[ "MIT" ]
12
2019-01-28T17:38:48.000Z
2021-05-17T00:21:33.000Z
# Level 3: A linear-time, linear space recursive solution which counts and # memoizes results. from neighbors import neighbors def count_sequences(start_position, num_hops): cache = {} def helper(position, num_hops): if (position, num_hops) in cache: return cache[ (position, num...
27.233333
75
0.625459
from neighbors import neighbors def count_sequences(start_position, num_hops): cache = {} def helper(position, num_hops): if (position, num_hops) in cache: return cache[ (position, num_hops) ] if num_hops == 0: return 1 else: num_sequences = 0 ...
true
true
1c01589b5762c725c037cbbd4a3980395e717eeb
80,945
py
Python
venv/lib/python3.9/site-packages/MetalPerformanceShaders/_metadata.py
ipriyam26/RedditTTS
8528bdc3adcea1197c7159e6eb4c302487e32406
[ "MIT" ]
null
null
null
venv/lib/python3.9/site-packages/MetalPerformanceShaders/_metadata.py
ipriyam26/RedditTTS
8528bdc3adcea1197c7159e6eb4c302487e32406
[ "MIT" ]
null
null
null
venv/lib/python3.9/site-packages/MetalPerformanceShaders/_metadata.py
ipriyam26/RedditTTS
8528bdc3adcea1197c7159e6eb4c302487e32406
[ "MIT" ]
null
null
null
# This file is generated by objective.metadata # # Last update: Thu Dec 2 21:43:35 2021 # # flake8: noqa import objc, sys if sys.maxsize > 2 ** 32: def sel32or64(a, b): return b else: def sel32or64(a, b): return a if objc.arch == "arm64": def selAorI(a, b): return a else: ...
38.326231
9,746
0.584977
import objc, sys if sys.maxsize > 2 ** 32: def sel32or64(a, b): return b else: def sel32or64(a, b): return a if objc.arch == "arm64": def selAorI(a, b): return a else: def selAorI(a, b): return b misc = {} misc.update( { "MPSNDArrayOffsets": objc.c...
true
true
1c0158a087909a1a8b0d43d79add04b39558d4b5
144
py
Python
cosSim/__init__.py
ovanov/cosSim
23f6c4d32d7daff6d3694f45001254c3af1d5480
[ "MIT" ]
1
2022-01-28T11:21:42.000Z
2022-01-28T11:21:42.000Z
cosSim/__init__.py
ovanov/cosSim
23f6c4d32d7daff6d3694f45001254c3af1d5480
[ "MIT" ]
null
null
null
cosSim/__init__.py
ovanov/cosSim
23f6c4d32d7daff6d3694f45001254c3af1d5480
[ "MIT" ]
null
null
null
from . import cli from cosSim.parseClass import Parser from cosSim.similarity import Similarity from cosSim.text_preprocessor import Preprocess
28.8
47
0.861111
from . import cli from cosSim.parseClass import Parser from cosSim.similarity import Similarity from cosSim.text_preprocessor import Preprocess
true
true
1c0159761ef58e6ac81695714f77d320ededbcd8
1,682
py
Python
commands/unluckyflippers.py
Dabomstew/goldenrod
36c4f9e5321788779840371b09a78cc6b26b38b1
[ "MIT" ]
2
2015-05-20T00:42:03.000Z
2015-05-23T04:18:42.000Z
commands/unluckyflippers.py
Dabomstew/goldenrod
36c4f9e5321788779840371b09a78cc6b26b38b1
[ "MIT" ]
null
null
null
commands/unluckyflippers.py
Dabomstew/goldenrod
36c4f9e5321788779840371b09a78cc6b26b38b1
[ "MIT" ]
null
null
null
import config import random import datetime, time def execute(parser, bot, user, args): topwhat = 5 try: topwhat = int(args) except ValueError: topwhat = 5 if topwhat < 1: topwhat = 1 if topwhat > 10: bot.addressUser(user, "For the full unluc...
43.128205
233
0.649822
import config import random import datetime, time def execute(parser, bot, user, args): topwhat = 5 try: topwhat = int(args) except ValueError: topwhat = 5 if topwhat < 1: topwhat = 1 if topwhat > 10: bot.addressUser(user, "For the full unluc...
true
true
1c0159b8d60f4c4ddd1db0518ce101acc5ad66b9
4,325
py
Python
pycalc.py
sisodiya2421/calc
95d336535e53d428d9a93028c2956c91cae23ea2
[ "MIT" ]
null
null
null
pycalc.py
sisodiya2421/calc
95d336535e53d428d9a93028c2956c91cae23ea2
[ "MIT" ]
1
2019-10-31T12:24:23.000Z
2019-10-31T12:24:23.000Z
pycalc.py
sisodiya2421/calc
95d336535e53d428d9a93028c2956c91cae23ea2
[ "MIT" ]
null
null
null
import sys from functools import partial from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication from PyQt5.QtWidgets import QMainWindow from PyQt5.QtWidgets import QWidget from PyQt5.QtWidgets import QGridLayout from PyQt5.QtWidgets import QLineEdit from PyQt5.QtWidgets import QPushButton from PyQt5.QtWid...
32.518797
76
0.589827
import sys from functools import partial from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication from PyQt5.QtWidgets import QMainWindow from PyQt5.QtWidgets import QWidget from PyQt5.QtWidgets import QGridLayout from PyQt5.QtWidgets import QLineEdit from PyQt5.QtWidgets import QPushButton from PyQt5.QtWid...
true
true
1c015b99bcca8ffbfd54021fbd20fe299596e6ec
858
py
Python
1.2/deploy.py
DrStarkXavier/NoonPyMe
4086e7b8b9d034289bf58f3ac916a1ad5d2ed87d
[ "Apache-2.0" ]
null
null
null
1.2/deploy.py
DrStarkXavier/NoonPyMe
4086e7b8b9d034289bf58f3ac916a1ad5d2ed87d
[ "Apache-2.0" ]
null
null
null
1.2/deploy.py
DrStarkXavier/NoonPyMe
4086e7b8b9d034289bf58f3ac916a1ad5d2ed87d
[ "Apache-2.0" ]
null
null
null
from noonPyMe import NPM from header import program_header from driver import webDiv from custom_logger import set_logger LOGGER = set_logger('deploying_the_interface') if __name__ == '__main__': program_header('1.2') try: # browser = str(input('Enter the your browser name (chrome, or firefox): ')) #o...
34.32
93
0.629371
from noonPyMe import NPM from header import program_header from driver import webDiv from custom_logger import set_logger LOGGER = set_logger('deploying_the_interface') if __name__ == '__main__': program_header('1.2') try: browser = "chrome" driver = '' scrapingUrl = st...
true
true
1c015ba26263d0bd53ee8d03fe8f6725c9afebfd
1,520
py
Python
test/tools/get-mud-flows.py
usnistgov/nist-mud
2bb9feeb291eba59c3206e82e97639cfc196cbac
[ "Unlicense" ]
18
2018-06-25T17:41:15.000Z
2022-03-24T12:14:05.000Z
test/tools/get-mud-flows.py
usnistgov/nist-mud
2bb9feeb291eba59c3206e82e97639cfc196cbac
[ "Unlicense" ]
1
2018-08-28T20:54:23.000Z
2018-08-28T20:54:23.000Z
test/tools/get-mud-flows.py
usnistgov/nist-mud
2bb9feeb291eba59c3206e82e97639cfc196cbac
[ "Unlicense" ]
6
2018-10-01T16:43:25.000Z
2020-01-21T23:26:54.000Z
import requests import json import argparse import os from os import sys import string import time import ast def is_part(some_string, target): return target in some_string if __name__ == "__main__" : parser = argparse.ArgumentParser() parser.add_argument("-m", help="metadata mask ") args = parser.pa...
29.803922
87
0.594079
import requests import json import argparse import os from os import sys import string import time import ast def is_part(some_string, target): return target in some_string if __name__ == "__main__" : parser = argparse.ArgumentParser() parser.add_argument("-m", help="metadata mask ") args = parser.pa...
true
true
1c015bad980d891078de06d8414327679312a59a
5,380
py
Python
docs/source/conf.py
yupbank/euclidesdb
c4210b68a79aab20e6911c78940b909b8bede557
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
yupbank/euclidesdb
c4210b68a79aab20e6911c78940b909b8bede557
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
yupbank/euclidesdb
c4210b68a79aab20e6911c78940b909b8bede557
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
29.081081
79
0.653532
project = 'euclidesdb' copyright = '2018, Christian S. Perone' author = 'Christian S. Perone' version = '0.1.1' release = '0.1.1' extensions = [ ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' language = None exclude_patterns = [] pygments_style = None html_scaled_image_li...
true
true
1c015ccdc49a15d12a59738b11ddb76e295e6749
111
py
Python
sanity.py
sofakid/Skoarcery
e4fece84792e1979bdac8abaeb76a117ad8f3965
[ "Artistic-2.0" ]
343
2015-02-23T23:14:27.000Z
2021-09-07T04:33:01.000Z
sanity.py
sofakid/Skoarcery
e4fece84792e1979bdac8abaeb76a117ad8f3965
[ "Artistic-2.0" ]
25
2015-02-16T05:13:23.000Z
2016-06-26T14:14:51.000Z
sanity.py
sofakid/Skoarcery
e4fece84792e1979bdac8abaeb76a117ad8f3965
[ "Artistic-2.0" ]
7
2015-09-07T15:09:28.000Z
2019-02-24T11:11:55.000Z
from Skoarcery.factoary.Build_Sc import Build_Sc if __name__ == '__main__': b = Build_Sc() b.sanity()
18.5
48
0.693694
from Skoarcery.factoary.Build_Sc import Build_Sc if __name__ == '__main__': b = Build_Sc() b.sanity()
true
true
1c015ceb3d7f8c017a150aef7c07cbcd4c84409e
54,150
py
Python
chinese_calendar/constants.py
gitwyy/chinese-calendar
b7347f89746654963da42a2fc0df36131f872ed5
[ "MIT" ]
2
2020-05-25T06:53:36.000Z
2021-09-10T04:52:01.000Z
chinese_calendar/constants.py
gitwyy/chinese-calendar
b7347f89746654963da42a2fc0df36131f872ed5
[ "MIT" ]
null
null
null
chinese_calendar/constants.py
gitwyy/chinese-calendar
b7347f89746654963da42a2fc0df36131f872ed5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # this file is generated by chinese_calendar.scripts.generate_constants from __future__ import absolute_import, unicode_literals import datetime from enum import Enum class Holiday(Enum): def __new__(cls, english, chinese, days): obj = object.__new__(cls) obj._value_ = eng...
73.874488
84
0.737729
from __future__ import absolute_import, unicode_literals import datetime from enum import Enum class Holiday(Enum): def __new__(cls, english, chinese, days): obj = object.__new__(cls) obj._value_ = english obj.chinese = chinese obj.days = days return obj new_years_da...
true
true
1c015d514f5591c7171ee4dcc76df22535c739e3
10,241
py
Python
capitalist/models.py
wit4er/python-capitalist
08f74ab80155b9a4a72c3a03bd1b13153fbdb891
[ "MIT" ]
null
null
null
capitalist/models.py
wit4er/python-capitalist
08f74ab80155b9a4a72c3a03bd1b13153fbdb891
[ "MIT" ]
null
null
null
capitalist/models.py
wit4er/python-capitalist
08f74ab80155b9a4a72c3a03bd1b13153fbdb891
[ "MIT" ]
3
2020-03-02T12:40:00.000Z
2021-12-24T12:04:36.000Z
class Model: __slots__ = [] @classmethod def parse_json(cls, json_data, **kwargs): raise NotImplementedError class CurrencyRate(Model): __slots__ = ['type', 'amount', 'amount_currency', 'target_currency'] TYPES = ('buy', 'sell', 'uahSell') def __init__(self, type_, amount, amount_cu...
33.6875
117
0.666244
class Model: __slots__ = [] @classmethod def parse_json(cls, json_data, **kwargs): raise NotImplementedError class CurrencyRate(Model): __slots__ = ['type', 'amount', 'amount_currency', 'target_currency'] TYPES = ('buy', 'sell', 'uahSell') def __init__(self, type_, amount, amount_cu...
true
true
1c0160d795e533fec698100a000e7225a6c435d0
3,220
py
Python
download-weights.py
ronjian/once-for-all
6d0a76be5007fda31c8b366a51f23b626bb8f24c
[ "Apache-2.0" ]
null
null
null
download-weights.py
ronjian/once-for-all
6d0a76be5007fda31c8b366a51f23b626bb8f24c
[ "Apache-2.0" ]
null
null
null
download-weights.py
ronjian/once-for-all
6d0a76be5007fda31c8b366a51f23b626bb8f24c
[ "Apache-2.0" ]
null
null
null
#%% from ofa.model_zoo import ofa_specialized # %% net, image_size = ofa_specialized('flops@595M_top1@80.0_finetune@75' , pretrained=True) # %% specialized_network_list = [ ################# FLOPs ################# 'flops@595M_top1@80.0_finetune@75', 'flops@482M_top1@79.6_f...
40.759494
82
0.61677
from ofa.model_zoo import ofa_specialized net, image_size = ofa_specialized('flops@595M_top1@80.0_finetune@75' , pretrained=True) specialized_network_list = [ 'flops@595M_top1@80.0_finetune@75', 'flops@482M_top1@79.6_finetune@75', 'flops@389M_top1@79.1_finetune@75', ...
true
true
1c016141669b530f781fb0f9fe4bdc17c64f21f1
1,523
py
Python
tests/extension/thread_/fsm_as_module/thread_fsm_as_module.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
232
2015-09-01T16:07:48.000Z
2022-03-28T14:53:28.000Z
tests/extension/thread_/fsm_as_module/thread_fsm_as_module.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
34
2015-08-21T09:13:03.000Z
2022-03-21T23:52:44.000Z
tests/extension/thread_/fsm_as_module/thread_fsm_as_module.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
46
2015-09-24T14:39:57.000Z
2022-02-23T21:59:56.000Z
from __future__ import absolute_import from __future__ import print_function import sys import os # the next line can be removed after installation sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import ve...
21.450704
69
0.599475
from __future__ import absolute_import from __future__ import print_function import sys import os sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import veriloggen.thread as vthread def mkLed(): m = ...
true
true
1c01615ceb1d367ef6fed99f5ae5cfb8c02c7b75
3,668
py
Python
cloudspeech_demo.py
benemortasia/gMusicVoiceKit
d1608b3f02e4c53ac426ba85f304e5b9a56ba1bc
[ "MIT" ]
2
2018-03-01T18:06:11.000Z
2018-03-01T18:06:14.000Z
cloudspeech_demo.py
benemortasia/gMusicVoiceKit
d1608b3f02e4c53ac426ba85f304e5b9a56ba1bc
[ "MIT" ]
null
null
null
cloudspeech_demo.py
benemortasia/gMusicVoiceKit
d1608b3f02e4c53ac426ba85f304e5b9a56ba1bc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
36.68
85
0.586968
import aiy.audio import aiy.cloudspeech import aiy.voicehat import re import sys sys.path.append('/home/pi/AIY-voice-kit-python/src/gMusicVoiceKit') from SongManipulation.play_song import play_song from SongManipulation.play_song_by_artist import play_song_by_artist from PlaylistManipulation.create_playlist import ...
true
true
1c0161b3f0b3dac1525c6dda81125e25ce1b388a
1,875
py
Python
tests/tst_tools.py
AXGKl/terminal_markdown_viewer
eef1a3b0e1eaa12ff4711f2515473e905a7197c1
[ "BSD-3-Clause" ]
null
null
null
tests/tst_tools.py
AXGKl/terminal_markdown_viewer
eef1a3b0e1eaa12ff4711f2515473e905a7197c1
[ "BSD-3-Clause" ]
null
null
null
tests/tst_tools.py
AXGKl/terminal_markdown_viewer
eef1a3b0e1eaa12ff4711f2515473e905a7197c1
[ "BSD-3-Clause" ]
null
null
null
import os import sys from shutil import copyfile from subprocess import run as srun # if set, that would hard import plugins in mdv/plugs.py (our IDE trick): os.environ['MDV_DEV'] = '' here = os.path.abspath(os.path.dirname(__file__)) def test_mod_ctx(test_file): tf = test_file.rsplit('/', 1)[-1].split('.py', 1...
30.241935
83
0.6368
import os import sys from shutil import copyfile from subprocess import run as srun os.environ['MDV_DEV'] = '' here = os.path.abspath(os.path.dirname(__file__)) def test_mod_ctx(test_file): tf = test_file.rsplit('/', 1)[-1].split('.py', 1)[0] m = {'d_tmp': os.path.dirname(here) + '/tmp', 'fn_tst': tf} m...
true
true
1c0161d6a884c167c0b6119448d9ec04dad6f6f0
260
py
Python
plugins/region_growing/__init__.py
bsavelev/medipy
f0da3750a6979750d5f4c96aedc89ad5ae74545f
[ "CECILL-B" ]
null
null
null
plugins/region_growing/__init__.py
bsavelev/medipy
f0da3750a6979750d5f4c96aedc89ad5ae74545f
[ "CECILL-B" ]
null
null
null
plugins/region_growing/__init__.py
bsavelev/medipy
f0da3750a6979750d5f4c96aedc89ad5ae74545f
[ "CECILL-B" ]
1
2022-03-04T05:47:08.000Z
2022-03-04T05:47:08.000Z
from connected_threshold import ( connected_threshold, connected_threshold_with_radius) from region_growing_panel import RegionGrowingPanel import os.path import medipy.itk medipy.itk.load_wrapitk_module(os.path.dirname(__file__), "MediPyRegionGrowing")
28.888889
80
0.853846
from connected_threshold import ( connected_threshold, connected_threshold_with_radius) from region_growing_panel import RegionGrowingPanel import os.path import medipy.itk medipy.itk.load_wrapitk_module(os.path.dirname(__file__), "MediPyRegionGrowing")
true
true
1c01621176913650561433e0e4a9b00761e5822b
2,514
py
Python
sia_load_tester/dataset_uploader.py
mtlynch/sia_load_tester
f4e2785e6dbceb1cf9c912ccb2fad49617102afb
[ "MIT" ]
6
2018-03-01T04:06:50.000Z
2020-07-28T12:28:28.000Z
sia_load_tester/dataset_uploader.py
mtlynch/sia_load_tester
f4e2785e6dbceb1cf9c912ccb2fad49617102afb
[ "MIT" ]
40
2018-02-09T00:41:41.000Z
2018-04-20T04:02:57.000Z
sia_load_tester/dataset_uploader.py
mtlynch/sia_load_tester
f4e2785e6dbceb1cf9c912ccb2fad49617102afb
[ "MIT" ]
null
null
null
import logging import sia_client as sc import sia_conditions _MAX_CONCURRENT_UPLOADS = 5 _SLEEP_SECONDS = 15 logger = logging.getLogger(__name__) def make_dataset_uploader(upload_queue, exit_event): """Factory for creating a DatasetUploader using production settings.""" return DatasetUploader(upload_queue,...
35.914286
79
0.625696
import logging import sia_client as sc import sia_conditions _MAX_CONCURRENT_UPLOADS = 5 _SLEEP_SECONDS = 15 logger = logging.getLogger(__name__) def make_dataset_uploader(upload_queue, exit_event): return DatasetUploader(upload_queue, sc.make_sia_client(), sia_conditions.make_waiter...
true
true
1c01621561075502dcd91fcd71535d047a03bea6
1,713
py
Python
garnbarn_api/authentication.py
GarnBarn/garnbarn-backend
ebe54b7206a6c27198003aaeb908cc2b296fa1dd
[ "MIT" ]
null
null
null
garnbarn_api/authentication.py
GarnBarn/garnbarn-backend
ebe54b7206a6c27198003aaeb908cc2b296fa1dd
[ "MIT" ]
39
2021-10-14T16:20:28.000Z
2021-12-01T08:58:53.000Z
garnbarn_api/authentication.py
GarnBarn/garnbarn-backend
ebe54b7206a6c27198003aaeb908cc2b296fa1dd
[ "MIT" ]
3
2021-10-14T16:12:22.000Z
2022-01-13T14:23:34.000Z
"""This File contain the custom authentication for checking the ID Token from Firebase Auth. """ from rest_framework import authentication, exceptions from django.http import HttpRequest from firebase_admin import credentials, auth, initialize_app from garnbarn_api.models import CustomUser import os if os.path.exists(...
38.931818
130
0.70286
from rest_framework import authentication, exceptions from django.http import HttpRequest from firebase_admin import credentials, auth, initialize_app from garnbarn_api.models import CustomUser import os if os.path.exists('firebase-adminsdk-credential.json'): credential = credentials.Certificate( 'fire...
true
true
1c016225eaabf04962ae0df9a8ed9f3fd38f794a
68,092
py
Python
sdk/python/pulumi_spotinst/aws/elastigroup.py
timmyers/pulumi-spotinst
3d071aaff57f7549403aca8587b1892f40e85d6c
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_spotinst/aws/elastigroup.py
timmyers/pulumi-spotinst
3d071aaff57f7549403aca8587b1892f40e85d6c
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_spotinst/aws/elastigroup.py
timmyers/pulumi-spotinst
3d071aaff57f7549403aca8587b1892f40e85d6c
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Elasti...
58.148591
1,790
0.653586
import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Elastigroup(pulumi.CustomResource): availability_zones: pulumi.Output[list] block_devices_mode: pulumi.Output[str] capacity_unit: pulumi.Output[str] cpu_credits: pulumi.Outpu...
true
true
1c0162db8cd0a2fdf9575c620746f912770e1286
4,606
py
Python
file_process/views.py
emilysa/genevieve
d390d4f79e240628a001491035570750ddb6265a
[ "MIT" ]
1
2015-05-27T19:52:32.000Z
2015-05-27T19:52:32.000Z
file_process/views.py
emilysa/genevieve
d390d4f79e240628a001491035570750ddb6265a
[ "MIT" ]
null
null
null
file_process/views.py
emilysa/genevieve
d390d4f79e240628a001491035570750ddb6265a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Views for genome reports and genetic variants""" import requests from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import Http404, HttpResponse, HttpResponseRedirect from django.views.gene...
38.705882
78
0.664134
"""Views for genome reports and genetic variants""" import requests from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import Http404, HttpResponse, HttpResponseRedirect from django.views.generic.edit import FormView...
false
true
1c016493623d6d6ed9f664e5b2b8c508d9c07257
3,756
py
Python
bin/merge_xml.py
dbonadiman/acl-anthology
7ea46b11fc9fb1ff60eba17cfd4f8d170d2d2cdc
[ "Apache-2.0" ]
1
2019-12-05T16:22:26.000Z
2019-12-05T16:22:26.000Z
bin/merge_xml.py
dbonadiman/acl-anthology
7ea46b11fc9fb1ff60eba17cfd4f8d170d2d2cdc
[ "Apache-2.0" ]
null
null
null
bin/merge_xml.py
dbonadiman/acl-anthology
7ea46b11fc9fb1ff60eba17cfd4f8d170d2d2cdc
[ "Apache-2.0" ]
2
2021-09-16T07:16:15.000Z
2021-10-30T06:41:55.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2019 Matt Post <post@cs.jhu.edu> # Copyright 2019 David Wei Chiang <dchiang@nd.edu> # # 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 a...
36.466019
138
0.628594
import logging import difflib import lxml.etree as etree import copy unique_attributes = {'id'} recurse_elements = {'volume', 'paper'} exclude_elements = {'paper'} def opentag(node): copy = etree.Element(node.tag) copy.text = "\n" for a, v in sorted(node.attrib.items()): if a in unique_attribut...
true
true
1c0164a3516296f97659e84f4be110ccff0417cb
5,561
py
Python
tests/bugs/core_4864_test.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2022-02-05T11:37:13.000Z
2022-02-05T11:37:13.000Z
tests/bugs/core_4864_test.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2021-09-03T11:47:00.000Z
2021-09-03T12:42:10.000Z
tests/bugs/core_4864_test.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2021-06-30T14:14:16.000Z
2021-06-30T14:14:16.000Z
#coding:utf-8 # # id: bugs.core_4864 # title: CREATE DATABASE fail with ISQL # decription: # Test obtains full path to $fb_home via FBSVCMGR info_get_env. # Then it makes copy of file 'databases.conf' that is in $fb_home directory because # following ...
33.10119
114
0.576875
import pytest from firebird.qa import db_factory, python_act, Action substitutions_1 = [] init_script_1 = """""" db_1 = db_factory(sql_dialect=3, init=init_script_1) # # first do f.flush(), and # # then do os.fsync(f.fileno()), to ensure that all internal buffers associated with f are written to disk. #...
true
true
1c01673ce6cc5322ea7bc78c6f83824cd78d9181
317
py
Python
CodeChef/Empire Business/SOLDVAL.py
Naga-kalyan/competitive_programming
e9501b16ac327c7f6700a0970d0804e1f9ef5f1b
[ "MIT" ]
8
2020-09-02T13:30:41.000Z
2022-01-31T07:45:31.000Z
CodeChef/Empire Business/SOLDVAL.py
Naga-kalyan/competitive_programming
e9501b16ac327c7f6700a0970d0804e1f9ef5f1b
[ "MIT" ]
null
null
null
CodeChef/Empire Business/SOLDVAL.py
Naga-kalyan/competitive_programming
e9501b16ac327c7f6700a0970d0804e1f9ef5f1b
[ "MIT" ]
1
2021-02-15T13:44:22.000Z
2021-02-15T13:44:22.000Z
T = int(input()) for _ in range(T): N = int(input()) A = list(map(int, input().split())) Llist = [A[0]] Rlist = [A[N-1]] for i in range(1, N): Llist.append(min(Llist[-1]+1, A[i])) Rlist.append(min(Rlist[-1]+1, A[N-1-i])) print(*[min(Llist[i], Rlist[N-1-i]) for i in range(N)])
28.818182
59
0.507886
T = int(input()) for _ in range(T): N = int(input()) A = list(map(int, input().split())) Llist = [A[0]] Rlist = [A[N-1]] for i in range(1, N): Llist.append(min(Llist[-1]+1, A[i])) Rlist.append(min(Rlist[-1]+1, A[N-1-i])) print(*[min(Llist[i], Rlist[N-1-i]) for i in range(N)])
true
true
1c01676ed54764be1279513b08cbdc4d1f084625
44,961
py
Python
app/python-source/objective_function.py
Matthew-Boyd/dao-tk
2ab34425aeccbac2d08cf1b8fc262568ab8102eb
[ "MIT" ]
2
2019-11-14T01:40:49.000Z
2021-04-04T09:23:16.000Z
app/python-source/objective_function.py
Matthew-Boyd/dao-tk
2ab34425aeccbac2d08cf1b8fc262568ab8102eb
[ "MIT" ]
1
2019-01-07T22:05:36.000Z
2019-01-07T22:07:02.000Z
app/python-source/objective_function.py
Matthew-Boyd/dao-tk
2ab34425aeccbac2d08cf1b8fc262568ab8102eb
[ "MIT" ]
4
2019-12-03T16:41:48.000Z
2020-12-15T20:18:53.000Z
""" ** Objective function model for the O&M / Capital Costs optimization project ** This code provides data structures and algorithms needed to evaluate the objective function components for the CSP optimization project. The objective consists of a number of separate simulations and evaluations. class _Data: Th...
45.692073
254
0.536042
""" ** Objective function model for the O&M / Capital Costs optimization project ** This code provides data structures and algorithms needed to evaluate the objective function components for the CSP optimization project. The objective consists of a number of separate simulations and evaluations. class _Data: Th...
false
true
1c0167b77b3ded254eedd43158cfce87e56b4206
13,118
py
Python
swagger_client/models/test_run_with_custom_field_resource.py
rcbops/qtest-swagger-client
28220aa95d878922ca4b35c325706932adabea4e
[ "Apache-2.0" ]
1
2019-09-10T17:55:53.000Z
2019-09-10T17:55:53.000Z
swagger_client/models/test_run_with_custom_field_resource.py
rcbops/qtest-swagger-client
28220aa95d878922ca4b35c325706932adabea4e
[ "Apache-2.0" ]
null
null
null
swagger_client/models/test_run_with_custom_field_resource.py
rcbops/qtest-swagger-client
28220aa95d878922ca4b35c325706932adabea4e
[ "Apache-2.0" ]
2
2019-02-12T23:15:10.000Z
2022-03-11T20:08:28.000Z
# coding: utf-8 """ qTest Manager API Version 8.6 - 9.1 qTest Manager API Version 8.6 - 9.1 OpenAPI spec version: 8.6 - 9.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class TestRunWithC...
29.678733
247
0.582406
from pprint import pformat from six import iteritems import re class TestRunWithCustomFieldResource(object): def __init__(self, parent_id=None, parent_type=None, created=None, links=None, id=None, name=None, order=None, pid=None, created_date=None, last_modified_date=None, properties=None, test_case=N...
true
true
1c0168f7d2ed86b357551e5ac004ac83161d2971
3,016
py
Python
Lib/plat-irix5/cdplayer.py
jasonadu/Python-2.5
93e24b88564de120b1296165b5c55975fdcb8a3c
[ "PSF-2.0" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
Lib/plat-irix5/cdplayer.py
jasonadu/Python-2.5
93e24b88564de120b1296165b5c55975fdcb8a3c
[ "PSF-2.0" ]
1
2021-04-11T15:01:12.000Z
2021-04-11T15:01:12.000Z
Lib/plat-irix5/cdplayer.py
jasonadu/Python-2.5
93e24b88564de120b1296165b5c55975fdcb8a3c
[ "PSF-2.0" ]
2
2016-04-04T14:31:33.000Z
2018-03-09T22:39:02.000Z
# This file implements a class which forms an interface to the .cdplayerrc # file that is maintained by SGI's cdplayer program. # # Usage is as follows: # # import readcd # r = readcd.Readcd() # c = Cdplayer(r.gettrackinfo()) # # Now you can use c.artist, c.title and c.track[trackno] (where trackno # starts at 1). Whe...
33.88764
76
0.478117
# # Usage is as follows: # # import readcd # r = readcd.Readcd() # c = Cdplayer(r.gettrackinfo()) # # Now you can use c.artist, c.title and c.track[trackno] (where trackno # starts at 1). When the CD is not recognized, all values will be the empty # string. # It is also possible to set the above mentioned variables to...
false
true
1c016a970d33bce04b4248d6de4587f40c923d12
2,912
py
Python
airflow/hooks/postgres_hook.py
KarthikKothareddy/AirFlow
faaf0b8b4467bcf5bff4a5b49086a9e02cb9c112
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2018-03-07T12:25:05.000Z
2018-03-19T01:00:10.000Z
airflow/hooks/postgres_hook.py
KarthikKothareddy/AirFlow
faaf0b8b4467bcf5bff4a5b49086a9e02cb9c112
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/hooks/postgres_hook.py
KarthikKothareddy/AirFlow
faaf0b8b4467bcf5bff4a5b49086a9e02cb9c112
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2020-11-25T15:01:28.000Z
2021-04-12T04:09:41.000Z
# -*- coding: utf-8 -*- # # 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 ...
34.666667
79
0.647321
import psycopg2 import psycopg2.extensions from contextlib import closing from airflow.hooks.dbapi_hook import DbApiHook class PostgresHook(DbApiHook): conn_name_attr = 'postgres_conn_id' default_conn_name = 'postgres_default' supports_autocommit = True def __init__(self, *args, **kwargs): ...
true
true
1c016c80416eb82cfdf5612eebd941b15bc5a3cd
493
py
Python
gangetabell_videreutvikling.py
jjberg83/python_eksperimenter
ea26a6bd4a0cf71e69cbf5015a06db30de811b45
[ "MIT" ]
null
null
null
gangetabell_videreutvikling.py
jjberg83/python_eksperimenter
ea26a6bd4a0cf71e69cbf5015a06db30de811b45
[ "MIT" ]
null
null
null
gangetabell_videreutvikling.py
jjberg83/python_eksperimenter
ea26a6bd4a0cf71e69cbf5015a06db30de811b45
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 27 07:08:34 2021 @author: jjberg """ grense = int(input('Hvor langt opp skal gangetabellen gå? ')) print() for header in range(grense+1): if header == 0: print(end='\t') else: print(header, end='\t') print() strek = '-----...
18.961538
61
0.572008
grense = int(input('Hvor langt opp skal gangetabellen gå? ')) print() for header in range(grense+1): if header == 0: print(end='\t') else: print(header, end='\t') print() strek = '-----' print(strek*grense) for ytre in range(1, grense+1): print(ytre, '| ', end='\t') for indre in rang...
true
true
1c016daf0da67c687948add65b93fb0f440a5682
1,318
py
Python
generator/tests/utilities/convert_size_test.py
romulobusatto/google-api-php-client-services
7f3d938a1e4b364afa633b5ba13a0d3c9bc156bf
[ "Apache-2.0" ]
709
2018-09-13T01:13:59.000Z
2022-03-31T10:28:41.000Z
generator/tests/utilities/convert_size_test.py
romulobusatto/google-api-php-client-services
7f3d938a1e4b364afa633b5ba13a0d3c9bc156bf
[ "Apache-2.0" ]
1,351
2018-10-12T23:07:12.000Z
2022-03-05T09:25:29.000Z
generator/tests/utilities/convert_size_test.py
romulobusatto/google-api-php-client-services
7f3d938a1e4b364afa633b5ba13a0d3c9bc156bf
[ "Apache-2.0" ]
307
2018-09-04T20:15:31.000Z
2022-03-31T09:42:39.000Z
#!/usr/bin/python2.7 # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
36.611111
75
0.742033
from google.apputils import basetest from googleapis.codegen.utilities import convert_size class ConvertSizeTest(basetest.TestCase): def testConvertSize(self): self.assertEquals(None, convert_size.ConvertSize(None)) self.assertEquals(None, convert_size.ConvertSize('4')) self.assertEquals(None, conver...
true
true
1c016df9c1af4fc88ffab5f8e82b6a7edf46de03
256
py
Python
gilton/gilton/doctype/sales_user/sales_user.py
namrataindictrans123/Gilton
6a484f16aacc23ec4a2454333b5d3facb2abd7e1
[ "MIT" ]
null
null
null
gilton/gilton/doctype/sales_user/sales_user.py
namrataindictrans123/Gilton
6a484f16aacc23ec4a2454333b5d3facb2abd7e1
[ "MIT" ]
null
null
null
gilton/gilton/doctype/sales_user/sales_user.py
namrataindictrans123/Gilton
6a484f16aacc23ec4a2454333b5d3facb2abd7e1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, Indictrans and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class SalesUser(Document): pass
23.272727
49
0.78125
from __future__ import unicode_literals import frappe from frappe.model.document import Document class SalesUser(Document): pass
true
true
1c016e0661588e0fa0bbd8ccafddbb7059628ea7
1,743
py
Python
core/benchmarker.py
RedisAI/benchmarks
65b8509b81795da73f25f51941c61fbd9765914c
[ "MIT" ]
6
2019-04-18T10:17:52.000Z
2021-07-02T19:57:08.000Z
core/benchmarker.py
hhsecond/benchmarks
65b8509b81795da73f25f51941c61fbd9765914c
[ "MIT" ]
1
2021-07-21T12:17:08.000Z
2021-07-21T12:17:08.000Z
core/benchmarker.py
hhsecond/benchmarks
65b8509b81795da73f25f51941c61fbd9765914c
[ "MIT" ]
2
2020-03-15T00:37:57.000Z
2022-02-26T04:36:00.000Z
from collections import defaultdict from .config import config from .reporter import Reporter from .dockering import Dockering # TODO: make sure imports are not affecting performance class BenchmarkManager: _experiment_dict: dict = defaultdict(dict) def __init__(self): pass @classmethod def...
39.613636
86
0.57315
from collections import defaultdict from .config import config from .reporter import Reporter from .dockering import Dockering class BenchmarkManager: _experiment_dict: dict = defaultdict(dict) def __init__(self): pass @classmethod def register(cls, name, fn): name_list = name.split...
true
true
1c016e4548e88687ce7377ad94fc3b0468493073
726
py
Python
pyleecan/Methods/Slot/SlotW23/build_geometry.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
4
2017-11-27T10:14:34.000Z
2018-09-20T11:30:32.000Z
pyleecan/Methods/Slot/SlotW23/build_geometry.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
null
null
null
pyleecan/Methods/Slot/SlotW23/build_geometry.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
null
null
null
from ....Classes.Arc1 import Arc1 from ....Classes.Segment import Segment def build_geometry(self): """Compute the curve (Line) needed to plot the object. The ending point of a curve is the starting point of the next curve in the list Parameters ---------- self : SlotW23 A SlotW23 obj...
21.352941
74
0.57438
from ....Classes.Arc1 import Arc1 from ....Classes.Segment import Segment def build_geometry(self): line_dict = self._comp_line_dict() curve_list = [ line_dict["1-2"], line_dict["2-3"], line_dict["3-4"], line_dict["4-5"], line_dict["5-6"], line_dict["6-7"], ...
true
true
1c016f08f5572d3b984728fadec3094168890cb9
1,358
py
Python
Ar_Script/ar_296_单线程_网站访问.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
null
null
null
Ar_Script/ar_296_单线程_网站访问.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
1
2020-01-19T01:19:57.000Z
2020-01-19T01:19:57.000Z
Ar_Script/ar_296_单线程_网站访问.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
null
null
null
import requests import time def download_one(url): resp = requests.get(url) print('Read {} from {}'.format(len(resp.content), url)) def download_all(sites): for site in sites: download_one(site) def main(): sites = [ 'https://en.wikipedia.org/wiki/Portal:Arts', 'https://en....
33.121951
86
0.654639
import requests import time def download_one(url): resp = requests.get(url) print('Read {} from {}'.format(len(resp.content), url)) def download_all(sites): for site in sites: download_one(site) def main(): sites = [ 'https://en.wikipedia.org/wiki/Portal:Arts', 'https://en....
true
true
1c016f111dcb132d902013d88a621325bdfdb93b
2,108
py
Python
encodings/mac_romanian.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
1
2020-03-12T16:44:10.000Z
2020-03-12T16:44:10.000Z
encodings/mac_romanian.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
null
null
null
encodings/mac_romanian.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.2.4 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] # Embedded file name: encodings.mac_romanian import codecs class Codec(codecs.Codec): def encode(self, input, errors='strict'): return codecs.ch...
51.414634
859
0.761385
import codecs class Codec(codecs.Codec): def encode(self, input, errors='strict'): return codecs.charmap_encode(input, errors, encoding_table) def decode(self, input, errors='strict'): return codecs.charmap_decode(input, errors, decoding_table) class IncrementalEncoder(codecs.IncrementalEnc...
true
true
1c016f5f874cedc6f9868f5080a0a7753f8d38de
1,810
py
Python
ooobuild/lo/view/x_control_access.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/view/x_control_access.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/view/x_control_access.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
35.490196
131
0.740331
import typing from abc import abstractmethod from ..uno.x_interface import XInterface as XInterface_8f010a43 if typing.TYPE_CHECKING: from ..awt.x_control import XControl as XControl_7a9c098d from ..awt.x_control_model import XControlModel as XControlModel_affc0b7e class XControlAccess(XInterface_8f010a43): ...
true
true
1c016fce0afda994fa3eb18d544019c21b8601e3
5,305
py
Python
master/GenerateWeather.py
gpaw789/weather_sim
2b0137cc87c05d811771b5ffa413a477e685681d
[ "BSD-2-Clause" ]
null
null
null
master/GenerateWeather.py
gpaw789/weather_sim
2b0137cc87c05d811771b5ffa413a477e685681d
[ "BSD-2-Clause" ]
null
null
null
master/GenerateWeather.py
gpaw789/weather_sim
2b0137cc87c05d811771b5ffa413a477e685681d
[ "BSD-2-Clause" ]
null
null
null
import random import datetime from time import sleep import pickle import helpers import pandas as pd # structure # main() is text interface # build_position() is the function that builds the lat/long coodinates # running() is the function that runs while loop indefinitely and print the datastream # generate() is the ...
36.335616
127
0.633742
import random import datetime from time import sleep import pickle import helpers import pandas as pd def generate(location, time, temperature, humidity): latlongele = helpers.geolocation(location) weather = ["Rain", "Snow", "Sunny"] location_int = location lat = latlongele[0] long = latlon...
true
true
1c0170276f3a3ef1b50a9384698a4a2f7d745540
7,478
py
Python
mars/worker/__main__.py
Focke-Wulf/mars
7fbe1c7ef2f7e55455811ec511b68294546d04dc
[ "Apache-2.0" ]
1
2020-11-05T05:53:00.000Z
2020-11-05T05:53:00.000Z
mars/worker/__main__.py
Focke-Wulf/mars
7fbe1c7ef2f7e55455811ec511b68294546d04dc
[ "Apache-2.0" ]
null
null
null
mars/worker/__main__.py
Focke-Wulf/mars
7fbe1c7ef2f7e55455811ec511b68294546d04dc
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
48.245161
114
0.659802
import argparse import logging import os from ..base_app import BaseApplication, arg_deprecated_action from ..distributor import MarsDistributor from ..errors import StartArgumentError from ..config import options from ..serialize.dataserializer import CompressType from .service import WorkerService logger = logging...
true
true
1c01703d7ee2f64493462dbca4e12e7b62c64087
7,194
py
Python
selfdrive/car/toyota/carcontroller.py
herman5/openpilot
b7ddce8bacde6de2f708af0b70ea8a20d61396f2
[ "MIT" ]
null
null
null
selfdrive/car/toyota/carcontroller.py
herman5/openpilot
b7ddce8bacde6de2f708af0b70ea8a20d61396f2
[ "MIT" ]
null
null
null
selfdrive/car/toyota/carcontroller.py
herman5/openpilot
b7ddce8bacde6de2f708af0b70ea8a20d61396f2
[ "MIT" ]
null
null
null
from cereal import car from common.numpy_fast import clip, interp from selfdrive.car import apply_toyota_steer_torque_limits, create_gas_interceptor_command, make_can_msg from selfdrive.car.toyota.toyotacan import create_steer_command, create_ui_command, \ create_accel_command...
47.96
132
0.709619
from cereal import car from common.numpy_fast import clip, interp from selfdrive.car import apply_toyota_steer_torque_limits, create_gas_interceptor_command, make_can_msg from selfdrive.car.toyota.toyotacan import create_steer_command, create_ui_command, \ create_accel_command...
true
true
1c017046ac538eca9b6440e7472ec8e47f864b1f
819
py
Python
pytest_appium/driver/proxy/proxy_mixin.py
tking16/pytest-appium
6e17bdb6e46c29c2398e6016ffb406eda148c453
[ "MIT" ]
18
2018-04-18T09:58:27.000Z
2021-11-15T10:08:30.000Z
pytest_appium/driver/proxy/proxy_mixin.py
tking16/pytest-appium
6e17bdb6e46c29c2398e6016ffb406eda148c453
[ "MIT" ]
1
2019-12-09T09:06:43.000Z
2020-05-07T09:44:00.000Z
pytest_appium/driver/proxy/proxy_mixin.py
tking16/pytest-appium
6e17bdb6e46c29c2398e6016ffb406eda148c453
[ "MIT" ]
7
2018-03-28T14:26:05.000Z
2021-12-08T11:40:05.000Z
import wrapt import functools from collections import defaultdict import logging log = logging.getLogger(__name__) DEFAULT_REGISTRATION_NAME = 'base' MIXIN_CLASSS = defaultdict(list) def register_proxy_mixin(cls=None, *, name=DEFAULT_REGISTRATION_NAME): if cls == None: return functools.partial(register...
26.419355
75
0.757021
import wrapt import functools from collections import defaultdict import logging log = logging.getLogger(__name__) DEFAULT_REGISTRATION_NAME = 'base' MIXIN_CLASSS = defaultdict(list) def register_proxy_mixin(cls=None, *, name=DEFAULT_REGISTRATION_NAME): if cls == None: return functools.partial(register...
true
true
1c01706366ff6d534fbfb82cbf7623a50a3616ff
2,126
py
Python
migrate/changeset/databases/mysql.py
nsoranzo/sqlalchemy-migrate
8acab2cd75a5b23ac162e49c8e4fb1e3f958352a
[ "MIT" ]
1
2021-11-13T05:40:33.000Z
2021-11-13T05:40:33.000Z
migrate/changeset/databases/mysql.py
nsoranzo/sqlalchemy-migrate
8acab2cd75a5b23ac162e49c8e4fb1e3f958352a
[ "MIT" ]
3
2020-07-17T04:22:52.000Z
2021-10-05T22:11:08.000Z
migrate/changeset/databases/mysql.py
nsoranzo/sqlalchemy-migrate
8acab2cd75a5b23ac162e49c8e4fb1e3f958352a
[ "MIT" ]
null
null
null
""" MySQL database specific implementations of changeset classes. """ import sqlalchemy from sqlalchemy.databases import mysql as sa_base from sqlalchemy import types as sqltypes from migrate import exceptions from migrate.changeset import ansisql from migrate.changeset import util MySQLSchemaGenerator = sa_bas...
30.811594
82
0.710724
import sqlalchemy from sqlalchemy.databases import mysql as sa_base from sqlalchemy import types as sqltypes from migrate import exceptions from migrate.changeset import ansisql from migrate.changeset import util MySQLSchemaGenerator = sa_base.MySQLDDLCompiler class MySQLColumnGenerator(MySQLSchemaGenerator, ansi...
true
true
1c017181fcf33279cd55cbbb60abf05bc29110f0
1,461
py
Python
recommendations_microservice/namespaces/token/namespace.py
7552-2020C2-grupo5/recommendations_microservice
05e6780911c27719a8056d28c4adcbb82a0110ec
[ "Apache-2.0" ]
null
null
null
recommendations_microservice/namespaces/token/namespace.py
7552-2020C2-grupo5/recommendations_microservice
05e6780911c27719a8056d28c4adcbb82a0110ec
[ "Apache-2.0" ]
null
null
null
recommendations_microservice/namespaces/token/namespace.py
7552-2020C2-grupo5/recommendations_microservice
05e6780911c27719a8056d28c4adcbb82a0110ec
[ "Apache-2.0" ]
null
null
null
"""Token namespace module.""" from flask_restx import Namespace, Resource, fields from recommendations_microservice.constants import BOOKBNB_TOKEN from recommendations_microservice.exceptions import ServerTokenError from .controller import add_end_var, remove_env_var ns = Namespace("Server tokens", description="Reg...
34.785714
86
0.665982
from flask_restx import Namespace, Resource, fields from recommendations_microservice.constants import BOOKBNB_TOKEN from recommendations_microservice.exceptions import ServerTokenError from .controller import add_end_var, remove_env_var ns = Namespace("Server tokens", description="Register server tokens") server_...
true
true
1c017182c153e9458ce15f419cd18a5e7db01090
1,226
py
Python
tests/gamestonk_terminal/stocks/discovery/test_fidelity_view.py
jbushago/GamestonkTerminal
73a2b419664bf62bbdc59aa8402c8cd6a913a518
[ "MIT" ]
1
2022-03-15T13:05:40.000Z
2022-03-15T13:05:40.000Z
tests/gamestonk_terminal/stocks/discovery/test_fidelity_view.py
bhoang/GamestonkTerminal
ab4de1dd70fba866930150e440a03e461a6ca6a8
[ "MIT" ]
null
null
null
tests/gamestonk_terminal/stocks/discovery/test_fidelity_view.py
bhoang/GamestonkTerminal
ab4de1dd70fba866930150e440a03e461a6ca6a8
[ "MIT" ]
null
null
null
# IMPORTATION STANDARD # IMPORTATION THIRDPARTY import pytest # IMPORTATION INTERNAL from gamestonk_terminal.stocks.discovery import fidelity_view @pytest.fixture(scope="module") def vcr_config(): return { "filter_headers": [("User-Agent", None)], } @pytest.mark.vcr(record_mode="none") @pytest.mar...
23.576923
78
0.706362
import pytest from gamestonk_terminal.stocks.discovery import fidelity_view @pytest.fixture(scope="module") def vcr_config(): return { "filter_headers": [("User-Agent", None)], } @pytest.mark.vcr(record_mode="none") @pytest.mark.parametrize( "val", [ "75% Buys, 25% Sells", ...
true
true
1c01719e6fa9e92982b70e921630b7f9c34794f6
948
py
Python
pythran/tests/euler/euler44.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,647
2015-01-13T01:45:38.000Z
2022-03-28T01:23:41.000Z
pythran/tests/euler/euler44.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,116
2015-01-01T09:52:05.000Z
2022-03-18T21:06:40.000Z
pythran/tests/euler/euler44.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
180
2015-02-12T02:47:28.000Z
2022-03-14T10:28:18.000Z
#runas solve() #pythran export solve() def solve(): ''' Pentagonal numbers are generated by the formula, P_n=n(3n-1)/2. The first ten pentagonal numbers are: 1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ... It can be seen that P_4 + P_7 = 22 + 70 = 92 = P_8. However, their difference, 70 - 22 = 48,...
31.6
160
0.537975
def solve(): MAX = 2000 pent = [ n * (3*n - 1) / 2 for n in range(1, 2*MAX) ] pdic = dict.fromkeys(pent) def main2(): for j in range(0, MAX): for k in range(j+1, 2*MAX-1): p_j = pent[j] p_k = pent[k] p_sum = p_j + p_k ...
true
true
1c01721ca2f4a72b847e57943ee3d83d35e87c34
8,101
py
Python
sdk/eventhub/azure-eventhubs/azure/eventhub/exceptions.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
sdk/eventhub/azure-eventhubs/azure/eventhub/exceptions.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
sdk/eventhub/azure-eventhubs/azure/eventhub/exceptions.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
42.192708
112
0.658561
import logging import six from uamqp import errors, compat from ._constants import NO_RETRY_ERRORS _LOGGER = logging.getLogger(__name__) def _error_handler(error): if error.condition == b'com.microsoft:server-busy': return errors.ErrorAction(retry=True, backoff=4) if error.condition == b'com.micro...
true
true
1c01726eb2de68aadb10ea1a833ebe403b562187
5,023
py
Python
temboo/core/Library/Amazon/EC2/DescribeAvailabilityZones.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/Amazon/EC2/DescribeAvailabilityZones.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/Amazon/EC2/DescribeAvailabilityZones.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # DescribeAvailabilityZones # Returns Availability Zones that are available for your EC2 account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2....
44.451327
230
0.700976
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class DescribeAvailabilityZones(Choreography): def __init__(self, temboo_session): super(...
true
true
1c0173b227353de887632d3d56bcebe6b5c72627
8,248
py
Python
src/amuse/community/etics/interface.py
rknop/amuse
85d5bdcc29cfc87dc69d91c264101fafd6658aec
[ "Apache-2.0" ]
131
2015-06-04T09:06:57.000Z
2022-02-01T12:11:29.000Z
src/amuse/community/etics/interface.py
rknop/amuse
85d5bdcc29cfc87dc69d91c264101fafd6658aec
[ "Apache-2.0" ]
690
2015-10-17T12:18:08.000Z
2022-03-31T16:15:58.000Z
src/amuse/community/etics/interface.py
rieder/amuse
3ac3b6b8f922643657279ddee5c8ab3fc0440d5e
[ "Apache-2.0" ]
102
2015-01-22T10:00:29.000Z
2022-02-09T13:29:43.000Z
from amuse.community import * from amuse.community.interface.gd import GravitationalDynamics from amuse.community.interface.gd import GravitationalDynamicsInterface class EticsInterface(CodeInterface, GravitationalDynamicsInterface, LiteratureReferencesMixIn): """ .. [#] Meiron, Y., Li, B., Holley-Bockelma...
50.91358
128
0.670587
from amuse.community import * from amuse.community.interface.gd import GravitationalDynamics from amuse.community.interface.gd import GravitationalDynamicsInterface class EticsInterface(CodeInterface, GravitationalDynamicsInterface, LiteratureReferencesMixIn): include_headers = ['worker_code.h'] def __init__...
true
true
1c017468044ae6a1d57dc9ab5b7294e38b5b9a51
1,371
py
Python
src/toil/lib/conversions.py
thiagogenez/toil
b25e7d0616fef3aa9085a7d7d7ae6bdc257f2d92
[ "Apache-2.0" ]
null
null
null
src/toil/lib/conversions.py
thiagogenez/toil
b25e7d0616fef3aa9085a7d7d7ae6bdc257f2d92
[ "Apache-2.0" ]
null
null
null
src/toil/lib/conversions.py
thiagogenez/toil
b25e7d0616fef3aa9085a7d7d7ae6bdc257f2d92
[ "Apache-2.0" ]
null
null
null
"""Conversion utilities for mapping memory, disk, core declarations from strings to numbers and vice versa.""" # TODO: Consolidate all conversion utilities here to use the same functions: # src/toil/lib/humanize.py (bytes2human; human2bytes) # src/toil/batchSystems/__init__.py (MemoryString) # def bytes_in_unit(uni...
36.078947
110
0.593727
def bytes_in_unit(unit: str = 'B') -> int: num_bytes = 1 if unit.lower() in ['ki', 'kib']: num_bytes = 1 << 10 if unit.lower() in ['mi', 'mib']: num_bytes = 1 << 20 if unit.lower() in ['gi', 'gib']: num_bytes = 1 << 30 if unit.lower() in ['ti', 'tib']: num_bytes = 1...
true
true
1c01749e71c5d067ae10256e13c0ddffa8d7fc34
1,180
py
Python
toolkit/models/serp.py
salonimalhotra-ui/seo-audits-toolkit
99af8b53dffad45f679eaf06b4a8080df75fcd72
[ "MIT" ]
1
2020-12-21T18:21:34.000Z
2020-12-21T18:21:34.000Z
toolkit/models/serp.py
x0rzkov/seo-audits-toolkit
29994cbab51bd0697c717b675df3c176096e4f03
[ "MIT" ]
null
null
null
toolkit/models/serp.py
x0rzkov/seo-audits-toolkit
29994cbab51bd0697c717b675df3c176096e4f03
[ "MIT" ]
null
null
null
from toolkit import dbAlchemy class Serp(dbAlchemy.Model): """Data model for user accounts.""" __tablename__ = 'serp-keyword' id = dbAlchemy.Column( dbAlchemy.Integer, primary_key=True ) query_text = dbAlchemy.Column( dbAlchemy.String(64), index=True, unique...
20.701754
45
0.576271
from toolkit import dbAlchemy class Serp(dbAlchemy.Model): __tablename__ = 'serp-keyword' id = dbAlchemy.Column( dbAlchemy.Integer, primary_key=True ) query_text = dbAlchemy.Column( dbAlchemy.String(64), index=True, unique=True, nullable=False ) ...
true
true
1c0174cc8979c8b1471ab354fdf48ab0ec0fa805
803
py
Python
demos/raffiot_demo.py
sdaves/raffiot.py
1aa3ea54a7de4a1647c3bef0345c813cf35d80fc
[ "Apache-2.0" ]
23
2021-02-18T12:56:46.000Z
2022-03-30T00:26:57.000Z
demos/raffiot_demo.py
sdaves/raffiot.py
1aa3ea54a7de4a1647c3bef0345c813cf35d80fc
[ "Apache-2.0" ]
1
2021-09-23T12:34:15.000Z
2021-11-09T13:52:35.000Z
demos/raffiot_demo.py
sdaves/raffiot.py
1aa3ea54a7de4a1647c3bef0345c813cf35d80fc
[ "Apache-2.0" ]
2
2021-09-22T00:00:21.000Z
2022-03-30T00:27:01.000Z
from raffiot import io from raffiot.io import IO # Colors in termainal reset = "\u001b[m" bred = "\u001b[91m" bgreen = "\u001b[92m" byellow = "\u001b[93m" bcyan = "\u001b[96m" def prog(color, name, i) -> IO[None, None, None]: """ Print in `color` every number from `i` to 1. """ if i > 0: retu...
21.702703
76
0.56538
from raffiot import io from raffiot.io import IO reset = "\u001b[m" bred = "\u001b[91m" bgreen = "\u001b[92m" byellow = "\u001b[93m" bcyan = "\u001b[96m" def prog(color, name, i) -> IO[None, None, None]: if i > 0: return io.defer(print, f"{color}From prog {name}: {i}{reset}").then( io.yield_,...
true
true
1c0175543848f72f7e5264a20545ee0ad84c84c8
3,121
py
Python
sdk/python/pulumi_azure_native/batch/v20200901/list_batch_account_keys.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/batch/v20200901/list_batch_account_keys.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/batch/v20200901/list_batch_account_keys.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
33.923913
147
0.668696
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'ListBatchAccountKeysResult', 'AwaitableListBatchAccountKeysResult', 'list_batch_account_keys', ] @pulumi.output_type class ListBatchAccountKeysRe...
true
true
1c0175c1f83a86cc68a842e00c70b5266b04739a
616
py
Python
server/app/users/__init__.py
chrisng93/restaurant-picker
c21b6da2c13c8a163a4beeaa3317ac793f8674d7
[ "MIT" ]
1
2017-05-04T14:43:04.000Z
2017-05-04T14:43:04.000Z
server/app/users/__init__.py
chrisng93/dished.
c21b6da2c13c8a163a4beeaa3317ac793f8674d7
[ "MIT" ]
45
2017-04-27T03:39:58.000Z
2017-05-04T02:42:37.000Z
server/app/users/__init__.py
chrisng93/dished.
c21b6da2c13c8a163a4beeaa3317ac793f8674d7
[ "MIT" ]
null
null
null
""" Customizations for user service """ from ..common.core import ModelService from .UserModel import User class UserService(ModelService): __model__ = User def update(self, **kwargs): """ Updates and returns model """ model = self.get(kwargs['id']) for k, v in self._preprocess_pa...
25.666667
66
0.597403
from ..common.core import ModelService from .UserModel import User class UserService(ModelService): __model__ = User def update(self, **kwargs): model = self.get(kwargs['id']) for k, v in self._preprocess_params(kwargs).items(): if k == 'password': model.set_passwo...
true
true
1c0175cccd3b5dab6f413014928079d984773e7b
14,070
py
Python
lib/core/test_engine.py
loki-ikol/Detectron
eddb1301d95e870ed4898c15550f12c9e1fb1e58
[ "Apache-2.0" ]
2
2018-04-23T01:35:38.000Z
2020-06-18T08:00:48.000Z
lib/core/test_engine.py
loki-ikol/Detectron
eddb1301d95e870ed4898c15550f12c9e1fb1e58
[ "Apache-2.0" ]
null
null
null
lib/core/test_engine.py
loki-ikol/Detectron
eddb1301d95e870ed4898c15550f12c9e1fb1e58
[ "Apache-2.0" ]
1
2020-01-03T16:10:53.000Z
2020-01-03T16:10:53.000Z
# Copyright (c) 2017-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
36.736292
81
0.651457
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict import cv2 import datetime import logging import numpy as np import os import yaml from caffe2.python import workspace from core.c...
true
true
1c01775ce7ee6d9c2a3b5fa8866d0da56263d56c
29,744
py
Python
cvopt_study/utils/_logger.py
lucasiscovici/cvopt
b74dcdc07a66456c1a52dc4a13df20f2d5fe7071
[ "BSD-2-Clause" ]
null
null
null
cvopt_study/utils/_logger.py
lucasiscovici/cvopt
b74dcdc07a66456c1a52dc4a13df20f2d5fe7071
[ "BSD-2-Clause" ]
null
null
null
cvopt_study/utils/_logger.py
lucasiscovici/cvopt
b74dcdc07a66456c1a52dc4a13df20f2d5fe7071
[ "BSD-2-Clause" ]
null
null
null
import os, sys, warnings, time, copy import pandas as pd, numpy as np from collections import OrderedDict from datetime import datetime, timedelta, timezone from sklearn.preprocessing import LabelEncoder from sklearn.ensemble import RandomForestRegressor from bokeh import layouts from bokeh.io import output_file, outp...
53.019608
221
0.601836
import os, sys, warnings, time, copy import pandas as pd, numpy as np from collections import OrderedDict from datetime import datetime, timedelta, timezone from sklearn.preprocessing import LabelEncoder from sklearn.ensemble import RandomForestRegressor from bokeh import layouts from bokeh.io import output_file, outp...
true
true
1c01781249f8696eae91193f5b5157a0ea063253
4,000
py
Python
bot/cstour.py
Craigsuter/OGDiscordBotTestWill
3056c97d8224335e8fda6e23aee42009d85ab231
[ "MIT" ]
null
null
null
bot/cstour.py
Craigsuter/OGDiscordBotTestWill
3056c97d8224335e8fda6e23aee42009d85ab231
[ "MIT" ]
null
null
null
bot/cstour.py
Craigsuter/OGDiscordBotTestWill
3056c97d8224335e8fda6e23aee42009d85ab231
[ "MIT" ]
1
2022-02-20T05:02:20.000Z
2022-02-20T05:02:20.000Z
import datetime # imports import discord import requests from bs4 import BeautifulSoup as soup from dotenv import load_dotenv from dropboxUploader import download_file, upload_file load_dotenv() def getcs_url(): try: download_file('/dropcsgotournament.txt', 'csgotournament.txt') f = open('csgotournament.txt...
40.40404
187
0.6875
import datetime import discord import requests from bs4 import BeautifulSoup as soup from dotenv import load_dotenv from dropboxUploader import download_file, upload_file load_dotenv() def getcs_url(): try: download_file('/dropcsgotournament.txt', 'csgotournament.txt') f = open('csgotournament.txt') tou...
true
true
1c0178c362d5bc484e40a003e5708ec20896c134
2,660
py
Python
neuro_bump_version/main.py
neuro-inc/bump-tag
f338b77c6d02b656fd51f661dc78a0194928dd89
[ "Apache-2.0" ]
null
null
null
neuro_bump_version/main.py
neuro-inc/bump-tag
f338b77c6d02b656fd51f661dc78a0194928dd89
[ "Apache-2.0" ]
1
2022-03-18T03:25:13.000Z
2022-03-18T03:25:13.000Z
neuro_bump_version/main.py
neuro-inc/neuro-bump-version
ef95faac134edf799e8038b3457a877afee7cbc7
[ "Apache-2.0" ]
null
null
null
import datetime import pathlib import subprocess import sys import click from packaging.version import Version, parse def find_root() -> pathlib.Path: path = pathlib.Path.cwd() while path != path.parent: if (path / ".git").is_dir(): return path path = path.parent raise click.C...
28.602151
78
0.589474
import datetime import pathlib import subprocess import sys import click from packaging.version import Version, parse def find_root() -> pathlib.Path: path = pathlib.Path.cwd() while path != path.parent: if (path / ".git").is_dir(): return path path = path.parent raise click.C...
true
true
1c0178d4c0d2465668f0bb90c8d87fe22b614d58
3,064
py
Python
script/translations/clean.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
script/translations/clean.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:13:11.000Z
2022-03-31T06:01:46.000Z
script/translations/clean.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""Find translation keys that are in Lokalise but no longer defined in source.""" import argparse import json from .const import CORE_PROJECT_ID, FRONTEND_DIR, FRONTEND_PROJECT_ID, INTEGRATIONS_DIR from .error import ExitApp from .lokalise import get_api from .util import get_base_arg_parser def get_arguments() -> a...
28.635514
102
0.645561
import argparse import json from .const import CORE_PROJECT_ID, FRONTEND_DIR, FRONTEND_PROJECT_ID, INTEGRATIONS_DIR from .error import ExitApp from .lokalise import get_api from .util import get_base_arg_parser def get_arguments() -> argparse.Namespace: parser = get_base_arg_parser() parser.add_argument( ...
true
true
1c0178ec4c8df92d799d51f3373e5ccab1f81e37
4,610
py
Python
src/modules/chain_builder/chain_builder.py
joyantaDebnath/CERES
aca2d13a561ec32e2650e021e5defb4d60d5fe30
[ "OpenSSL" ]
1
2021-12-05T07:40:51.000Z
2021-12-05T07:40:51.000Z
src/modules/chain_builder/chain_builder.py
joyantaDebnath/CERES
aca2d13a561ec32e2650e021e5defb4d60d5fe30
[ "OpenSSL" ]
null
null
null
src/modules/chain_builder/chain_builder.py
joyantaDebnath/CERES
aca2d13a561ec32e2650e021e5defb4d60d5fe30
[ "OpenSSL" ]
null
null
null
import os from itertools import groupby from modules.parsers.combinator_based import parser_tbs_raw from modules.parsers.combinator_based import parser_x509 ski_index_map = {} mapped_ca_store_path = str(os.getcwd()) + "/" + "compiled-ca-store/" def set_more_info(cert_list): for k in range(0, len(cert_list)): ...
36.015625
107
0.596963
import os from itertools import groupby from modules.parsers.combinator_based import parser_tbs_raw from modules.parsers.combinator_based import parser_x509 ski_index_map = {} mapped_ca_store_path = str(os.getcwd()) + "/" + "compiled-ca-store/" def set_more_info(cert_list): for k in range(0, len(cert_list)): ...
true
true
1c0179e5693aa62d7bf7f382af407f82018d6c53
1,662
py
Python
r_p_s.py
simonszuharev/designing-python
ed4c574137fecf43637f9798eef59051ed41fba2
[ "MIT" ]
1
2021-04-21T00:26:05.000Z
2021-04-21T00:26:05.000Z
r_p_s.py
simonszuharev/designing-python
ed4c574137fecf43637f9798eef59051ed41fba2
[ "MIT" ]
null
null
null
r_p_s.py
simonszuharev/designing-python
ed4c574137fecf43637f9798eef59051ed41fba2
[ "MIT" ]
null
null
null
import random def r_p_s(): #1 - rock, 2 - paper, scissors. return random.randint(1,3) def compare(user_input, computer_output): if user_input == 1 and computer_output == 2: print("You have Rock, computer has Paper. Computer won!") elif user_input == 1 and computer_output == 3: ...
36.933333
76
0.617329
import random def r_p_s(): return random.randint(1,3) def compare(user_input, computer_output): if user_input == 1 and computer_output == 2: print("You have Rock, computer has Paper. Computer won!") elif user_input == 1 and computer_output == 3: print("You have Rock, computer ...
true
true
1c0179f2d0ee08e5c83eee4252aa0f5a323ac623
599
py
Python
tests/test_concrete_dropout.py
danielkelshaw/ConcreteDropout
65be53d3ecf558992f1c473c90e206717946897b
[ "MIT" ]
2
2021-04-20T05:29:20.000Z
2022-01-11T21:55:13.000Z
tests/test_concrete_dropout.py
danielkelshaw/ConcreteDropout
65be53d3ecf558992f1c473c90e206717946897b
[ "MIT" ]
8
2020-05-04T16:40:04.000Z
2021-02-12T19:49:16.000Z
tests/test_concrete_dropout.py
danielkelshaw/ConcreteDropout
65be53d3ecf558992f1c473c90e206717946897b
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch import Tensor from condrop.concrete_dropout import ConcreteDropout class TestConcreteDropout: def test_forward(self): to_pass = torch.ones(5) cd = ConcreteDropout( weight_regulariser=1e-6, dropout_regulariser=1e-3 ) ...
22.185185
52
0.659432
import torch import torch.nn as nn from torch import Tensor from condrop.concrete_dropout import ConcreteDropout class TestConcreteDropout: def test_forward(self): to_pass = torch.ones(5) cd = ConcreteDropout( weight_regulariser=1e-6, dropout_regulariser=1e-3 ) ...
true
true
1c017a931a1c0edc323fe6ad829760aa99512d80
4,543
py
Python
test/DVIPDF/DVIPDF.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
1,403
2017-11-23T14:24:01.000Z
2022-03-30T20:59:39.000Z
test/DVIPDF/DVIPDF.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
3,708
2017-11-27T13:47:12.000Z
2022-03-29T17:21:17.000Z
test/DVIPDF/DVIPDF.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
281
2017-12-01T23:48:38.000Z
2022-03-31T15:25:44.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
27.203593
73
0.654193
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() test.write('mytex.py', r""" import os import sys import getopt cmd_opts, arg = getopt.getopt(sys.argv[1:], 'i:r:', []) base_name = os.path.splitext(arg[0])[0] infile = open(ar...
true
true
1c017a990188bafb48276d5db6d9b268711fd436
1,456
py
Python
Searching/Ternary Search/Python/ternary_search.py
manas0522/Algorithms
e6ca46849123616abb8e92e785ae2f750b64a1b3
[ "MIT" ]
1
2021-10-16T19:36:33.000Z
2021-10-16T19:36:33.000Z
Searching/Ternary Search/Python/ternary_search.py
manas0522/Algorithms
e6ca46849123616abb8e92e785ae2f750b64a1b3
[ "MIT" ]
null
null
null
Searching/Ternary Search/Python/ternary_search.py
manas0522/Algorithms
e6ca46849123616abb8e92e785ae2f750b64a1b3
[ "MIT" ]
null
null
null
# Python3 program to illustrate # recursive approach to ternary search import math as mt # Function to perform Ternary Search def ternarySearch(l, r, key, ar): if (r >= l): # Find the mid1 and mid2 mid1 = l + (r - l) //3 mid2 = r - (r - l) //3 # Check if key is present at any mid if (ar[mid1] == key): ...
18.2
45
0.631868
import math as mt def ternarySearch(l, r, key, ar): if (r >= l): mid1 = l + (r - l) //3 mid2 = r - (r - l) //3 if (ar[mid1] == key): return mid1 if (ar[mid2] == key): return mid2 if (key < ar[mid1]): return ternarySearch(l, mid1 - 1, key, ar) elif (key > ar[mid2]): ...
true
true
1c017b54e9adb2261b6086a4c9f347a9aa844ab2
666
py
Python
IG/email.py
mwikiaBundi1/instagram
b1001fe3487c8b6bcee202403ecbcbf41dc5ddfe
[ "MIT" ]
null
null
null
IG/email.py
mwikiaBundi1/instagram
b1001fe3487c8b6bcee202403ecbcbf41dc5ddfe
[ "MIT" ]
7
2019-11-19T06:51:01.000Z
2022-03-12T00:04:40.000Z
clones/email.py
dicksonkariuki/Instagram
41377a7202e0888a779cf7985d308dc6a83a2a4f
[ "MIT" ]
null
null
null
from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string def send_welcome_email(name, receiver): # Creating message subject and sender subject = 'Welcome to the Instagram! Enjoy sharing your happy moments with the world.' sender = 'gideonapptests@gmail.com' ...
44.4
90
0.755255
from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string def send_welcome_email(name, receiver): subject = 'Welcome to the Instagram! Enjoy sharing your happy moments with the world.' sender = 'gideonapptests@gmail.com' text_content = render_to_st...
true
true
1c017b6071dd2d33060708cdeedb335fd93549a2
52
py
Python
luckydonaldUtils/network/__init__.py
luckydonald/python-utils
455f5174707804a39384776185b8bc307223e19f
[ "MIT" ]
5
2016-12-06T00:49:21.000Z
2019-10-03T04:18:13.000Z
luckydonaldUtils/network/__init__.py
luckydonald/python-utils
455f5174707804a39384776185b8bc307223e19f
[ "MIT" ]
5
2016-03-19T02:08:14.000Z
2018-12-01T02:30:19.000Z
luckydonaldUtils/network/__init__.py
luckydonald/python-utils
455f5174707804a39384776185b8bc307223e19f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'luckydonald'
13
26
0.596154
__author__ = 'luckydonald'
true
true
1c017b7ad5a62cfd72485f31c50df37cc8712e95
344
py
Python
PredictiveOutlierExplanationBenchmark/src/models/feature_selection/SES.py
myrtakis/MxM
552fa5ad27e542f41ade04ad1af565fdc6213be7
[ "Apache-2.0" ]
5
2021-07-13T07:48:32.000Z
2022-02-28T10:59:15.000Z
PredictiveOutlierExplanationBenchmark/src/models/feature_selection/SES.py
myrtakis/MxM
552fa5ad27e542f41ade04ad1af565fdc6213be7
[ "Apache-2.0" ]
5
2021-03-19T15:30:01.000Z
2022-03-12T00:51:20.000Z
PredictiveOutlierExplanationBenchmark/src/models/feature_selection/SES.py
myrtakis/MxM
552fa5ad27e542f41ade04ad1af565fdc6213be7
[ "Apache-2.0" ]
null
null
null
import warnings warnings.filterwarnings("ignore") class SES: def __init__(self, params): self.__params = params def run(self, X_train, Y_train): warnings.warn('SES is removed from this version of PROTEUS to avoid conflicts with Apache 2.0 license. SES returns an empty array of features.') ...
22.933333
152
0.69186
import warnings warnings.filterwarnings("ignore") class SES: def __init__(self, params): self.__params = params def run(self, X_train, Y_train): warnings.warn('SES is removed from this version of PROTEUS to avoid conflicts with Apache 2.0 license. SES returns an empty array of features.') ...
true
true
1c017d2e0336252d6babc6817ee68a813423a350
599
py
Python
troposphere/iotcoredeviceadvisor.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
troposphere/iotcoredeviceadvisor.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
troposphere/iotcoredeviceadvisor.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** from . import AWSObject, PropsDictType, Tags class SuiteDefinition(AWSObject): """ `SuiteDefinition <http://docs.aws.amazon.com/AWSCloudFo...
26.043478
142
0.69783
from . import AWSObject, PropsDictType, Tags class SuiteDefinition(AWSObject): resource_type = "AWS::IoTCoreDeviceAdvisor::SuiteDefinition" props: PropsDictType = { "SuiteDefinitionConfiguration": (dict, True), "Tags": (Tags, False), }
true
true