hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f8929f165d4850ccdc7506ff2809e277e3476a
1,496
py
Python
thinc/layers/with_flatten.py
TheVinhLuong102/thinc
7b54f728ddec7765a1d8a5e553d4b4b90b9edaec
[ "MIT" ]
2,542
2016-10-20T07:02:59.000Z
2022-03-30T20:18:35.000Z
thinc/layers/with_flatten.py
TheVinhLuong102/thinc
7b54f728ddec7765a1d8a5e553d4b4b90b9edaec
[ "MIT" ]
453
2016-10-19T21:09:35.000Z
2022-03-31T11:01:15.000Z
thinc/layers/with_flatten.py
TheVinhLuong102/thinc
7b54f728ddec7765a1d8a5e553d4b4b90b9edaec
[ "MIT" ]
265
2016-11-14T14:53:58.000Z
2022-03-31T02:25:24.000Z
from typing import Tuple, Callable, Sequence, Any, List, TypeVar from ..model import Model from ..config import registry from ..types import Array2d, List2d ItemT = TypeVar("ItemT") InT = Sequence[Sequence[ItemT]] OutT = List2d @registry.layers("with_flatten.v1") def with_flatten(layer: Model) -> Model[InT, OutT]:...
29.333333
83
0.661765
from typing import Tuple, Callable, Sequence, Any, List, TypeVar from ..model import Model from ..config import registry from ..types import Array2d, List2d ItemT = TypeVar("ItemT") InT = Sequence[Sequence[ItemT]] OutT = List2d @registry.layers("with_flatten.v1") def with_flatten(layer: Model) -> Model[InT, OutT]:...
true
true
f7f89382bedd64a68b7bd7ea27882511d8eab867
3,192
py
Python
pset4/dist/dnaseq.py
GaryLai91/mit-ocw-6006
0e8b69b08c7b54a83fcb90ea11bf2d7cfd87d2d7
[ "MIT" ]
null
null
null
pset4/dist/dnaseq.py
GaryLai91/mit-ocw-6006
0e8b69b08c7b54a83fcb90ea11bf2d7cfd87d2d7
[ "MIT" ]
null
null
null
pset4/dist/dnaseq.py
GaryLai91/mit-ocw-6006
0e8b69b08c7b54a83fcb90ea11bf2d7cfd87d2d7
[ "MIT" ]
null
null
null
#!/usr/bin/env python2.7 import unittest from dnaseqlib import * ### Utility classes ### # Maps integer keys to a set of arbitrary values. class Multidict: # Initializes a new multi-value dictionary, and adds any key-value # 2-tuples in the iterable sequence pairs to the data structure. def __init__(self...
31.92
98
0.600251
import unittest from dnaseqlib import * lf, pairs=[]): self.dic = {} for i in pairs: self.put(i[0], i[1]) def put(self, k, v): try: self.dic[k].append(v) except KeyError: self.dic[k] = [v,] def get(self, k): if k in...
false
true
f7f8963e1c14290a0de48e6e2f977bec8f04fd1b
4,364
py
Python
script/main.py
zzzzls/BeijingSubwayAppointmentSystem
68cd3fec1b75574da02014c7e8e16b1d812e1418
[ "MIT" ]
1
2021-06-30T09:36:44.000Z
2021-06-30T09:36:44.000Z
script/main.py
zzzzls/BeijingSubwayAppointmentSystem
68cd3fec1b75574da02014c7e8e16b1d812e1418
[ "MIT" ]
1
2021-07-01T06:40:33.000Z
2021-09-23T07:53:44.000Z
script/main.py
zzzzls/BeijingSubwayAppointmentSystem
68cd3fec1b75574da02014c7e8e16b1d812e1418
[ "MIT" ]
null
null
null
""" 北京地铁预约进站 (沙河,天通苑,草房) 辅助抢票系统 @author: zzzzls @create: 2021-06-17 @version: 0.0.1 """ import sys from os.path import abspath,dirname sys.path.append(dirname(dirname(abspath(__file__)))) import json from script.settings import * from datetime import date, timedelta import httpx import asyncio class TicketSecKill:...
31.395683
136
0.559349
import sys from os.path import abspath,dirname sys.path.append(dirname(dirname(abspath(__file__)))) import json from script.settings import * from datetime import date, timedelta import httpx import asyncio class TicketSecKill: def __init__(self): param = sys.argv[1:] ts = param[0] ...
true
true
f7f896ce2ac9c7932c0b8309018597282e0a1f76
12,506
py
Python
jpn/transliterate.py
huzerD/jpn
a73ce3b7297aa912019d2ee067634d8b4f590c46
[ "MIT" ]
null
null
null
jpn/transliterate.py
huzerD/jpn
a73ce3b7297aa912019d2ee067634d8b4f590c46
[ "MIT" ]
null
null
null
jpn/transliterate.py
huzerD/jpn
a73ce3b7297aa912019d2ee067634d8b4f590c46
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set ts=2 expandtab: ''' Module: transliterate.py Desc: Transliterate using (modified)kunrei-shiki romanizations Author: john.oneil Email: oneil.john@gmail.com DATE: Wed May 7th 2014 Writing this module because of current defficiencies in the romkan and jTranslite...
66.521277
190
0.495842
import os import argparse import re from jpn.exceptions import NonUnicodeInputException TRANSLITERATION_TABLE = { u'a' :[u'あ',u'ア'], u'i':[u'い', u'イ'],u'u':[u'う',u'ウ'], u'e':[u'え',u'エ'], u'o':[u'お',u'オ'], u'ka':[u'か',u'カ'], u'ki':[u'き',u'キ'], u'ku':[u'く',u'ク'], u'ke':[u'け',u'ケ'], u'ko':[u'こ',u'コ'], u'kya':[u'きゃ',...
true
true
f7f896d55ea6eb4aa8b6ad3fba92d72de70b3d83
1,193
py
Python
shibgreen/wallet/settings/user_settings.py
BTCgreen-Network/shibgreen-blockchain
b1e41e82ad849775543aa36fefc0c0d03e13f6e8
[ "Apache-2.0" ]
12
2021-11-10T02:52:38.000Z
2022-03-22T10:19:45.000Z
shibgreen/wallet/settings/user_settings.py
BTCgreen-Network/shibgreen-blockchain
b1e41e82ad849775543aa36fefc0c0d03e13f6e8
[ "Apache-2.0" ]
13
2021-11-16T03:09:34.000Z
2022-03-09T00:45:05.000Z
shibgreen/wallet/settings/user_settings.py
BTCgreen-Network/shibgreen-blockchain
b1e41e82ad849775543aa36fefc0c0d03e13f6e8
[ "Apache-2.0" ]
1
2022-03-15T08:25:06.000Z
2022-03-15T08:25:06.000Z
from typing import Any, Dict from shibgreen.wallet.key_val_store import KeyValStore from shibgreen.wallet.settings.default_settings import default_settings from shibgreen.wallet.settings.settings_objects import BackupInitialized class UserSettings: settings: Dict[str, Any] basic_store: KeyValStore @stat...
28.404762
79
0.653814
from typing import Any, Dict from shibgreen.wallet.key_val_store import KeyValStore from shibgreen.wallet.settings.default_settings import default_settings from shibgreen.wallet.settings.settings_objects import BackupInitialized class UserSettings: settings: Dict[str, Any] basic_store: KeyValStore @stat...
true
true
f7f89750415ccae8c71fb8819d310bab36d668d5
14,455
py
Python
pymongo/ocsp_support.py
ldennis/mongo-python-driver
cc029a1e6208863eaab453777363d3935b927f32
[ "Apache-2.0" ]
22
2015-05-18T07:04:36.000Z
2021-08-02T03:01:43.000Z
pymongo/ocsp_support.py
ldennis/mongo-python-driver
cc029a1e6208863eaab453777363d3935b927f32
[ "Apache-2.0" ]
16
2022-02-01T06:06:00.000Z
2022-02-01T06:21:40.000Z
pymongo/ocsp_support.py
ldennis/mongo-python-driver
cc029a1e6208863eaab453777363d3935b927f32
[ "Apache-2.0" ]
7
2022-02-05T20:29:14.000Z
2022-03-26T13:16:44.000Z
# Copyright 2020-present MongoDB, 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 to in wr...
39.386921
82
0.68184
import logging as _logging import re as _re from datetime import datetime as _datetime from cryptography.exceptions import InvalidSignature as _InvalidSignature from cryptography.hazmat.backends import default_backend as _default_backend from cryptography.hazmat.primitives.asymmetric.dsa import ( D...
true
true
f7f8984d50378b09bb47165eb745e2489a6bba31
175,370
py
Python
Tag10kbytome.py
Fahsaiiii2608/tk
44b4a14de11a328a9fa2ca6d0c23b1f52850adff
[ "MIT" ]
null
null
null
Tag10kbytome.py
Fahsaiiii2608/tk
44b4a14de11a328a9fa2ca6d0c23b1f52850adff
[ "MIT" ]
null
null
null
Tag10kbytome.py
Fahsaiiii2608/tk
44b4a14de11a328a9fa2ca6d0c23b1f52850adff
[ "MIT" ]
2
2018-11-04T11:17:46.000Z
2019-01-20T14:10:48.000Z
# -*- coding: utf-8 -*- #SELFBOT_MAN_PC import LINETCR from LINETCR.lib.curve.ttypes import * from datetime import datetime from time import sleep from bs4 import BeautifulSoup from threading import Thread from googletrans import Translator from gtts import gTTS import time,random,sys,json,codecs,threading,glob,urllib,...
46.978302
1,021
0.438901
import LINETCR from LINETCR.lib.curve.ttypes import * from datetime import datetime from time import sleep from bs4 import BeautifulSoup from threading import Thread from googletrans import Translator from gtts import gTTS import time,random,sys,json,codecs,threading,glob,urllib,urllib2,urllib3,re,string,ast,os,subpr...
false
true
f7f8986539b7a68162a81aad5b33d53bde3448f2
4,108
py
Python
frappe/utils/autodoc.py
ebymathew5225/frappe
880d824b77d2a6392a5d8ae9ea7db22199513c91
[ "MIT" ]
2
2017-08-24T20:25:13.000Z
2017-10-15T13:14:31.000Z
frappe/utils/autodoc.py
ebymathew5225/frappe
880d824b77d2a6392a5d8ae9ea7db22199513c91
[ "MIT" ]
89
2017-09-19T15:17:44.000Z
2022-03-31T00:52:42.000Z
frappe/utils/autodoc.py
ebymathew5225/frappe
880d824b77d2a6392a5d8ae9ea7db22199513c91
[ "MIT" ]
3
2019-08-09T17:52:18.000Z
2020-07-29T08:23:46.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt """ frappe.utils.autodoc ~~~~~~~~~~~~~~~~~~~~ Inspect elements of a given module and return its objects """ from __future__ import unicode_literals, print_function import inspect, importlib, re, frappe from frappe.mo...
23.474286
87
0.677459
from __future__ import unicode_literals, print_function import inspect, importlib, re, frappe from frappe.model.document import get_controller from six import text_type def automodule(name): attributes = [] obj = importlib.import_module(name) for attrname in dir(obj): value = getattr(obj, attrname) if ge...
true
true
f7f898dc0749779aeb4da872cc0240dc7f9f0065
10,172
py
Python
game/engine.py
deecamp2019-group20/CNN_PokerNet
751576cb941be57c8a37656feaff14b414c3dcb2
[ "MIT" ]
1
2019-12-12T09:01:49.000Z
2019-12-12T09:01:49.000Z
game/engine.py
deecamp2019-group20/CNN_PokerNet
751576cb941be57c8a37656feaff14b414c3dcb2
[ "MIT" ]
1
2019-11-25T13:43:45.000Z
2019-11-25T13:43:45.000Z
game/engine.py
deecamp2019-group20/CNN_PokerNet
751576cb941be57c8a37656feaff14b414c3dcb2
[ "MIT" ]
1
2020-03-15T06:20:04.000Z
2020-03-15T06:20:04.000Z
# -*- coding: utf-8 -*- """ 自定义相关类 """ import numpy as np from typing import List, Tuple, Dict import pandas as pd from collections import defaultdict from os.path import join, abspath, dirname from .card_util import All as backup, cache from .gameutil import card_show from copy import copy from .r import get_moves ##...
31.987421
115
0.514746
import numpy as np from typing import List, Tuple, Dict import pandas as pd from collections import defaultdict from os.path import join, abspath, dirname from .card_util import All as backup, cache from .gameutil import card_show from copy import copy from .r import get_moves x: x.rank) self.players[0].set_h...
true
true
f7f89904f1d96307aafb90c5eb50ee0d0826d300
14,912
py
Python
pyglet/media/codecs/ffmpeg_lib/libavcodec.py
SwineProject/pyglet
f0203870bef94d4349ad16f060c941d45270a0b5
[ "BSD-3-Clause" ]
null
null
null
pyglet/media/codecs/ffmpeg_lib/libavcodec.py
SwineProject/pyglet
f0203870bef94d4349ad16f060c941d45270a0b5
[ "BSD-3-Clause" ]
null
null
null
pyglet/media/codecs/ffmpeg_lib/libavcodec.py
SwineProject/pyglet
f0203870bef94d4349ad16f060c941d45270a0b5
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2018 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributi...
37.094527
78
0.617221
from __future__ import unicode_literals from ctypes import (c_int, c_uint16, c_int32, c_int64, c_uint32, c_uint64, c_uint8, c_uint, c_double, c_float, c_ubyte, c_size_t, c_char, c_char_p, c_void_p, addressof, byref, cast, POINTER, CFUNCTYPE, Structure, Union, create_strin...
true
true
f7f89913ef61a19e920312701c7308a476710352
21,421
py
Python
django/http/request.py
shinshin86/django
5cc81cd9eb69f5f7a711412c02039b435c393135
[ "PSF-2.0", "BSD-3-Clause" ]
1
2019-11-17T04:10:38.000Z
2019-11-17T04:10:38.000Z
django/http/request.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
1
2019-09-27T16:40:34.000Z
2019-09-27T16:40:34.000Z
django/http/request.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-11-04T08:47:02.000Z
2020-11-04T08:47:02.000Z
import copy import re import warnings from io import BytesIO from itertools import chain from urllib.parse import quote, urlencode, urljoin, urlsplit from django.conf import settings from django.core import signing from django.core.exceptions import ( DisallowedHost, ImproperlyConfigured, RequestDataTooBig, ) from...
36.679795
110
0.617151
import copy import re import warnings from io import BytesIO from itertools import chain from urllib.parse import quote, urlencode, urljoin, urlsplit from django.conf import settings from django.core import signing from django.core.exceptions import ( DisallowedHost, ImproperlyConfigured, RequestDataTooBig, ) from...
true
true
f7f899b571678f51066371b9a5513d9439a051fd
424
py
Python
meta_blocks/models/base.py
alshedivat/meta-blocks
6f6d93dfaab75766e8afdf9eb2fad17dc79218f2
[ "BSD-3-Clause" ]
124
2020-04-10T00:55:19.000Z
2022-03-12T13:11:01.000Z
meta_blocks/models/base.py
meteozay/meta-blocks
6f6d93dfaab75766e8afdf9eb2fad17dc79218f2
[ "BSD-3-Clause" ]
2
2020-04-10T17:28:42.000Z
2020-05-12T16:07:38.000Z
meta_blocks/models/base.py
meteozay/meta-blocks
6f6d93dfaab75766e8afdf9eb2fad17dc79218f2
[ "BSD-3-Clause" ]
8
2020-04-11T04:40:47.000Z
2021-02-17T23:52:21.000Z
"""Base classes for models.""" class Model: """The base class for models. Models consist of a collection of internally built :class:`Network` objects and define methods for building outputs (e.g., logits) and losses. The specific outputs and losses the model builds depend on the type of the model...
30.285714
79
0.698113
class Model:
true
true
f7f89a07942a5e41d6650d1635029d9c61398cc3
2,455
py
Python
py/buck/zip/munger.py
illicitonion/buck
0336e37a5d9da94b6dcdf6ab78711c1788616ad0
[ "Apache-2.0" ]
1
2022-01-25T13:13:09.000Z
2022-01-25T13:13:09.000Z
py/buck/zip/munger.py
monaka/buck
5bf0591e649158237fe7d8523f11380e4f54bdf4
[ "Apache-2.0" ]
null
null
null
py/buck/zip/munger.py
monaka/buck
5bf0591e649158237fe7d8523f11380e4f54bdf4
[ "Apache-2.0" ]
1
2019-03-18T15:21:47.000Z
2019-03-18T15:21:47.000Z
# Copyright 2015-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 to i...
32.302632
90
0.641141
import contextlib import os import optparse import shutil import sys import tempfile import zipfile def main(): parser = optparse.OptionParser() parser.add_option('--input') parser.add_option('--output') parser.add_option( '--include-path', action='append', defaul...
true
true
f7f89b1cfec17faba8f91e789c27f4751ac40c48
540
py
Python
djstripe/exceptions.py
ComFreight/cmft-stripe-integration
85a2e14dcd6fffd24e999b1f383dd7eb006606e0
[ "MIT" ]
null
null
null
djstripe/exceptions.py
ComFreight/cmft-stripe-integration
85a2e14dcd6fffd24e999b1f383dd7eb006606e0
[ "MIT" ]
null
null
null
djstripe/exceptions.py
ComFreight/cmft-stripe-integration
85a2e14dcd6fffd24e999b1f383dd7eb006606e0
[ "MIT" ]
1
2018-09-11T10:49:32.000Z
2018-09-11T10:49:32.000Z
# -*- coding: utf-8 -*- """ .. module:: djstripe.exceptions. :synopsis: dj-stripe Exceptions. .. moduleauthor:: @kavdev """ from __future__ import absolute_import, division, print_function, unicode_literals class MultipleSubscriptionException(Exception): """Raised when a Customer has multiple Subscriptions ...
23.478261
116
0.740741
from __future__ import absolute_import, division, print_function, unicode_literals class MultipleSubscriptionException(Exception): pass class StripeObjectManipulationException(Exception): pass
true
true
f7f89d3db4407aadfac4bf3f45810ddbc900a023
1,156
py
Python
permuta/misc/union_find.py
quintant/Permuta
4cdc7990e3dc298d0089ba8c48cd8967acd9b81f
[ "BSD-3-Clause" ]
12
2015-09-09T02:40:50.000Z
2021-06-02T13:40:25.000Z
permuta/misc/union_find.py
quintant/Permuta
4cdc7990e3dc298d0089ba8c48cd8967acd9b81f
[ "BSD-3-Clause" ]
80
2015-12-17T15:00:17.000Z
2022-01-25T20:31:54.000Z
permuta/misc/union_find.py
quintant/Permuta
4cdc7990e3dc298d0089ba8c48cd8967acd9b81f
[ "BSD-3-Clause" ]
19
2015-12-16T13:16:10.000Z
2021-06-01T14:37:33.000Z
class UnionFind: """A collection of distjoint sets.""" def __init__(self, size: int) -> None: """Creates a collection of size disjoint unit sets.""" self._parent = [-1] * size def find(self, idx: int) -> int: """Return the identifier of a representative element for the set ...
36.125
85
0.596021
class UnionFind: def __init__(self, size: int) -> None: self._parent = [-1] * size def find(self, idx: int) -> int: if self._parent[idx] < 0: return idx self._parent[idx] = self.find(self._parent[idx]) return self._parent[idx] def size(self, idx: int) -> int: ...
true
true
f7f89d3e371f830dec8c5a72be9e2fbf032c7be0
214
py
Python
setup.py
justanr/aiohttp_docker_webapp_example
cfc65bf2fbbe048d2e2bbee854a0bfdb00544b54
[ "MIT" ]
null
null
null
setup.py
justanr/aiohttp_docker_webapp_example
cfc65bf2fbbe048d2e2bbee854a0bfdb00544b54
[ "MIT" ]
null
null
null
setup.py
justanr/aiohttp_docker_webapp_example
cfc65bf2fbbe048d2e2bbee854a0bfdb00544b54
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="myapp", packages=find_packages('src'), package_dir={'': 'src'}, entry_points=''' [console_scripts] myapp=myapp.cli:myapp ''' )
16.461538
43
0.630841
from setuptools import setup, find_packages setup( name="myapp", packages=find_packages('src'), package_dir={'': 'src'}, entry_points=''' [console_scripts] myapp=myapp.cli:myapp ''' )
true
true
f7f89d63c577fc8bd2f6f1bfb38fae46adaa35e9
375
py
Python
fabrikApi/plugins/CIR/views/plots/ARCHIV/pybeeswarm.py
demokratiefabrik/fabrikApi
a56bb57d59a5e7cbbeeb77889c02d82f2a04c682
[ "MIT" ]
null
null
null
fabrikApi/plugins/CIR/views/plots/ARCHIV/pybeeswarm.py
demokratiefabrik/fabrikApi
a56bb57d59a5e7cbbeeb77889c02d82f2a04c682
[ "MIT" ]
null
null
null
fabrikApi/plugins/CIR/views/plots/ARCHIV/pybeeswarm.py
demokratiefabrik/fabrikApi
a56bb57d59a5e7cbbeeb77889c02d82f2a04c682
[ "MIT" ]
null
null
null
# # %% # # NOT WORKING # # from beeswarm import * # # import numpy as np # from pybeeswarm import * # # import beeswarm # import matplotlib.pyplot as plt # import numpy as np # d1 = np.random.uniform(low=-3, high=3, size=100) # d2 = np.random.normal(size=100) # # bs, ax = pybeeswarm([d1,d2], method="swarm", labels...
19.736842
101
0.624
true
true
f7f89e7579494b0c1876d7d2f08829f845946c16
1,371
py
Python
jnx_bits/mdrop/bitfields.py
Japannext/jnx_bits
cfc7bea15a37be659c4262c134902f72db2afc94
[ "Apache-2.0" ]
null
null
null
jnx_bits/mdrop/bitfields.py
Japannext/jnx_bits
cfc7bea15a37be659c4262c134902f72db2afc94
[ "Apache-2.0" ]
null
null
null
jnx_bits/mdrop/bitfields.py
Japannext/jnx_bits
cfc7bea15a37be659c4262c134902f72db2afc94
[ "Apache-2.0" ]
1
2022-03-31T05:56:00.000Z
2022-03-31T05:56:00.000Z
# # Copyright: Japannext Co., Ltd. <https://www.japannext.co.jp/> # SPDX-License-Identifier: Apache-2.0 # # TODO: check whether it's faster with BitStream. from dataclasses import dataclass ORDER_VERB = { '00': 'B', '01': 'S', '10': 'T', '11': 'E', } STR_TO_BOOL = { # Override non empty strings bei...
17.576923
68
0.55434
from dataclasses import dataclass ORDER_VERB = { '00': 'B', '01': 'S', '10': 'T', '11': 'E', } STR_TO_BOOL = { # Override non empty strings being truey in python. '0': False, '1': True, } DISPLAY = { '0': '', '1': 'P', } CAPACITY = { '0': 'P', '1': 'A', } AGGRESSOR =...
true
true
f7f89ed39b44783ea524d53e34efe8f1f0ac095e
5,876
py
Python
hypergbm/sklearn/sklearn_ops.py
lixfz/HyperGBM
a7b929f2665c590afff5eae5dd4f14d8cd20bb70
[ "Apache-2.0" ]
null
null
null
hypergbm/sklearn/sklearn_ops.py
lixfz/HyperGBM
a7b929f2665c590afff5eae5dd4f14d8cd20bb70
[ "Apache-2.0" ]
null
null
null
hypergbm/sklearn/sklearn_ops.py
lixfz/HyperGBM
a7b929f2665c590afff5eae5dd4f14d8cd20bb70
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- """ """ import numpy as np from hypergbm.cfg import HyperGBMCfg as cfg from hypernets.core.ops import ModuleChoice, Optional, Choice from hypernets.pipeline.base import Pipeline from hypernets.pipeline.transformers import SimpleImputer, SafeOneHotEncoder, TruncatedSVD, \ StandardScaler, Min...
44.854962
114
0.723281
import numpy as np from hypergbm.cfg import HyperGBMCfg as cfg from hypernets.core.ops import ModuleChoice, Optional, Choice from hypernets.pipeline.base import Pipeline from hypernets.pipeline.transformers import SimpleImputer, SafeOneHotEncoder, TruncatedSVD, \ StandardScaler, MinMaxScaler, MaxAbsScaler, Robust...
true
true
f7f8a17ebfd27f34f8aa117364ba663b7d43e9f6
691
py
Python
verification/constants.py
pratik-vii/snet-marketplace-service
482d4c37596c2608aa7fca586bfb54d19783b419
[ "MIT" ]
null
null
null
verification/constants.py
pratik-vii/snet-marketplace-service
482d4c37596c2608aa7fca586bfb54d19783b419
[ "MIT" ]
null
null
null
verification/constants.py
pratik-vii/snet-marketplace-service
482d4c37596c2608aa7fca586bfb54d19783b419
[ "MIT" ]
null
null
null
from enum import Enum class DUNSVerificationStatus(Enum): PENDING = "PENDING" APPROVED = "APPROVED" REJECTED = "REJECTED" CHANGE_REQUESTED = "CHANGE_REQUESTED" class IndividualVerificationStatus(Enum): PENDING = "PENDING" APPROVED = "APPROVED" REJECTED = "REJECTED" CHANGE_REQUESTED = ...
21.59375
56
0.688857
from enum import Enum class DUNSVerificationStatus(Enum): PENDING = "PENDING" APPROVED = "APPROVED" REJECTED = "REJECTED" CHANGE_REQUESTED = "CHANGE_REQUESTED" class IndividualVerificationStatus(Enum): PENDING = "PENDING" APPROVED = "APPROVED" REJECTED = "REJECTED" CHANGE_REQUESTED = ...
true
true
f7f8a1f2d35be36185aeb2811015b22c19f4b9b9
18,467
py
Python
main.py
marcelooyaneder/Arboretum_Antumapu
bc1d850ea0c6d45368b3bdb8b834b05dd49f9a57
[ "MIT" ]
null
null
null
main.py
marcelooyaneder/Arboretum_Antumapu
bc1d850ea0c6d45368b3bdb8b834b05dd49f9a57
[ "MIT" ]
null
null
null
main.py
marcelooyaneder/Arboretum_Antumapu
bc1d850ea0c6d45368b3bdb8b834b05dd49f9a57
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ # CRÉDITOS Software desarrllado en el laboratorio de biología de plantas ubicado en el campus Antumapu perteneciente a la Universidad de Chile. - Autores: - Paulette Naulin Gysling. - Marcelo Oyaneder Labarca. - Contacto: - marcelo.oyaneder.l@gmail.com - pnaulin@uc...
46.399497
249
0.629772
import pandas as pd import os import errno import pyqrcode from pathlib import Path import filecmp import shutil from python_firebase_url_shortener.url_shortener import UrlShortener import time import sys import easygui as eg import numpy from PIL import Image class file_manager: def file_...
true
true
f7f8a20aa8d4a4dbeff72085b26439ab923bdb33
1,195
py
Python
boa3/builtin/interop/storage/storagemap.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
boa3/builtin/interop/storage/storagemap.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
boa3/builtin/interop/storage/storagemap.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
from typing import Union class StorageMap: def __init__(self, context, prefix: Union[bytes, str]): from boa3.builtin.interop.storage.storagecontext import StorageContext self._context: StorageContext self._prefix: Union[bytes, str] def get(self, key: Union[str, bytes]) -> bytes: ...
28.452381
81
0.604184
from typing import Union class StorageMap: def __init__(self, context, prefix: Union[bytes, str]): from boa3.builtin.interop.storage.storagecontext import StorageContext self._context: StorageContext self._prefix: Union[bytes, str] def get(self, key: Union[str, bytes]) -> bytes: ...
true
true
f7f8a309031f6ed4c64517ed477088dc0125d88d
1,138
py
Python
StarNavi/api/urls.py
vlsh1n/StarNaviTestApp
57662644ede3d3bb395354035ce7e2e5582d5cb5
[ "MIT" ]
null
null
null
StarNavi/api/urls.py
vlsh1n/StarNaviTestApp
57662644ede3d3bb395354035ce7e2e5582d5cb5
[ "MIT" ]
null
null
null
StarNavi/api/urls.py
vlsh1n/StarNaviTestApp
57662644ede3d3bb395354035ce7e2e5582d5cb5
[ "MIT" ]
null
null
null
from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns from rest_framework.routers import DefaultRouter from .views import GenreListView, GenreDetailView, MovieViewSet, UserViewSet router = DefaultRouter() router.register('users', UserViewSet, basename='users') movie_list = Movie...
27.756098
76
0.695958
from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns from rest_framework.routers import DefaultRouter from .views import GenreListView, GenreDetailView, MovieViewSet, UserViewSet router = DefaultRouter() router.register('users', UserViewSet, basename='users') movie_list = Movie...
true
true
f7f8a370b32c4b49958b368f8292eaba7f39dda2
125
py
Python
portfolio/apps.py
Yubisel/webpersonal
03000f9a9b4f94a9150ea3b930821c3d48727f95
[ "MIT" ]
null
null
null
portfolio/apps.py
Yubisel/webpersonal
03000f9a9b4f94a9150ea3b930821c3d48727f95
[ "MIT" ]
null
null
null
portfolio/apps.py
Yubisel/webpersonal
03000f9a9b4f94a9150ea3b930821c3d48727f95
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PortfolioConfig(AppConfig): name = 'portfolio' verbose_name = 'portafolio'
17.857143
33
0.744
from django.apps import AppConfig class PortfolioConfig(AppConfig): name = 'portfolio' verbose_name = 'portafolio'
true
true
f7f8a40bad2aba5102dfb033ac70a29fc37e27e7
4,420
py
Python
news_topic_server/trainer/cleaner.py
yanyang729/news-recommendation
0cd2e2e84f94507a339077753e367cf8bef9e36e
[ "MIT" ]
4
2017-11-16T15:00:23.000Z
2018-03-08T16:28:26.000Z
news_topic_server/trainer/cleaner.py
yanyang729/news-recommendation
0cd2e2e84f94507a339077753e367cf8bef9e36e
[ "MIT" ]
null
null
null
news_topic_server/trainer/cleaner.py
yanyang729/news-recommendation
0cd2e2e84f94507a339077753e367cf8bef9e36e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import warnings warnings.filterwarnings('ignore') import re import string from nltk.stem import WordNetLemmatizer from nltk.corpus import stopwords # a map of contractions we may have and want to expand CONTRACTION_MAP = { "ain't": "is not", "aren't": "are not", "can't": "cannot", "can't've": "...
24.692737
80
0.594118
import warnings warnings.filterwarnings('ignore') import re import string from nltk.stem import WordNetLemmatizer from nltk.corpus import stopwords CONTRACTION_MAP = { "ain't": "is not", "aren't": "are not", "can't": "cannot", "can't've": "cannot have", "'cause": "because", "could've": "could have", "couldn't": "cou...
false
true
f7f8a46a6b5896cb42015e3502528ebdc299ff68
2,641
py
Python
config/settings/local.py
theodor85/easy-expenses
88cbe4289f9c060c23ff9b2e62d47facb479b6fb
[ "MIT" ]
null
null
null
config/settings/local.py
theodor85/easy-expenses
88cbe4289f9c060c23ff9b2e62d47facb479b6fb
[ "MIT" ]
4
2021-03-10T19:50:32.000Z
2022-02-27T05:29:55.000Z
config/settings/local.py
theodor85/easy-expenses
88cbe4289f9c060c23ff9b2e62d47facb479b6fb
[ "MIT" ]
null
null
null
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY...
40.630769
97
0.580841
from .base import * from .base import env = True = env( "DJANGO_SECRET_KEY", default="YwTzzzAIA07heIHH4AqxDS7jkQGSaTnOCb1eZemxjuA7jKkuEe8vTVvGU1Ps7Dxw", ) = ["localhost", "0.0.0.0", "127.0.0.1"] = { "default": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", "LOCATIO...
true
true
f7f8a60687bf64d2c8fab73d44bac0018eff50f2
1,079
py
Python
Metodos funcoes classes/televisao.py
PaulaRegal/Python
dc00eb4d714e989e86be89a48a3633a819d7ee9f
[ "MIT" ]
null
null
null
Metodos funcoes classes/televisao.py
PaulaRegal/Python
dc00eb4d714e989e86be89a48a3633a819d7ee9f
[ "MIT" ]
null
null
null
Metodos funcoes classes/televisao.py
PaulaRegal/Python
dc00eb4d714e989e86be89a48a3633a819d7ee9f
[ "MIT" ]
null
null
null
class Televisao: def __init__(self): self.ligada = False #tv vai começar desligada self.canal = 5 #canal vai começar no 5 #metodo para ligar a tv def power(self): if self.ligada: self.ligada = False else: self.ligada = True def aumenta_canal(self): ...
30.828571
63
0.62836
class Televisao: def __init__(self): self.ligada = False self.canal = 5 def power(self): if self.ligada: self.ligada = False else: self.ligada = True def aumenta_canal(self): if self.ligada: self.canal += 1 def diminui_can...
true
true
f7f8a68d4cb31bdd2c8a0e63bee14c2004285ae5
81,870
py
Python
tests/migrations/test_commands.py
marload/django
0ce8c15033c95931e5abd36cf071b76a0b19771a
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
2
2016-07-16T23:12:49.000Z
2017-11-14T21:43:10.000Z
tests/migrations/test_commands.py
marload/django
0ce8c15033c95931e5abd36cf071b76a0b19771a
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
3
2016-05-15T22:05:14.000Z
2019-11-02T15:58:14.000Z
tests/migrations/test_commands.py
marload/django
0ce8c15033c95931e5abd36cf071b76a0b19771a
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
2
2016-01-19T18:29:21.000Z
2021-12-23T18:17:39.000Z
import datetime import importlib import io import os import sys from unittest import mock from django.apps import apps from django.core.management import CommandError, call_command from django.db import ( ConnectionHandler, DatabaseError, connection, connections, models, ) from django.db.backends.base.schema impor...
47.024698
118
0.647612
import datetime import importlib import io import os import sys from unittest import mock from django.apps import apps from django.core.management import CommandError, call_command from django.db import ( ConnectionHandler, DatabaseError, connection, connections, models, ) from django.db.backends.base.schema impor...
true
true
f7f8a6eb63db0c10f63cbe777b8b0a03762a708c
14,704
py
Python
step1_UNET_train.py
nchlis/rsom_vasculature
320b6f0ff0a9968f18c6500aaa93d4c1d86ad25f
[ "MIT" ]
null
null
null
step1_UNET_train.py
nchlis/rsom_vasculature
320b6f0ff0a9968f18c6500aaa93d4c1d86ad25f
[ "MIT" ]
null
null
null
step1_UNET_train.py
nchlis/rsom_vasculature
320b6f0ff0a9968f18c6500aaa93d4c1d86ad25f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Sep 6 16:04:13 2018 @author: N.Chlis """ #if used on a non-GUI server ###### #import matplotlib #matplotlib.use('Agg') ################################### import tensorflow as tf gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: for gpu in...
39.002653
135
0.614867
Pooling2D, Conv2DTranspose from keras.layers.merge import concatenate from keras.layers import Dropout from keras.callbacks import EarlyStopping from keras.callbacks import ModelCheckpoint from keras.callbacks import CSVLogger import time import skimage.transform from sklearn.model_selection import train_test_split...
true
true
f7f8a6fdab32dc1c54645d1c1932231b6fbb75d8
449
py
Python
example/search_para.py
natethinks/cherry
a482621a3e397f6667f21e16d5ec0eb12c7fc4fb
[ "MIT" ]
1
2020-03-07T16:59:09.000Z
2020-03-07T16:59:09.000Z
example/search_para.py
natethinks/cherry
a482621a3e397f6667f21e16d5ec0eb12c7fc4fb
[ "MIT" ]
null
null
null
example/search_para.py
natethinks/cherry
a482621a3e397f6667f21e16d5ec0eb12c7fc4fb
[ "MIT" ]
null
null
null
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier from sklearn.linear_model import SGDClassifier from sklearn.svm import SVC import cherry import numpy as np parameters = {...
24.944444
76
0.790646
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier from sklearn.linear_model import SGDClassifier from sklearn.svm import SVC import cherry import numpy as np parameters = {...
true
true
f7f8a7e539915aea4ea6f9e0d76500b25eda3ad9
147
py
Python
17/02/4.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
null
null
null
17/02/4.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
70
2017-06-01T11:02:51.000Z
2017-06-30T00:35:32.000Z
17/02/4.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
null
null
null
class Human: def __init__(self, name, age=10): self.name = name self.age = age c = Human('Yamada') print(c.name) print(c.age)
16.333333
37
0.591837
class Human: def __init__(self, name, age=10): self.name = name self.age = age c = Human('Yamada') print(c.name) print(c.age)
true
true
f7f8a8d270acb0b807f8aa99470fa8628463a10a
751
py
Python
V2RaycSpider1225/src/services/utils/armor/anti_email/exceptions.py
winkxx/V2RayCloudSpider
de1c87a0d823ba4c9a905c5ff4fdf70911b05332
[ "MIT" ]
1
2021-12-10T14:27:44.000Z
2021-12-10T14:27:44.000Z
V2RaycSpider1225/src/services/utils/armor/anti_email/exceptions.py
kaimrdzt/V2RayCloudSpider
de1c87a0d823ba4c9a905c5ff4fdf70911b05332
[ "MIT" ]
null
null
null
V2RaycSpider1225/src/services/utils/armor/anti_email/exceptions.py
kaimrdzt/V2RayCloudSpider
de1c87a0d823ba4c9a905c5ff4fdf70911b05332
[ "MIT" ]
1
2021-12-10T14:27:48.000Z
2021-12-10T14:27:48.000Z
# -*- coding: utf-8 -*- # Time : 2021/12/22 9:04 # Author : QIN2DIM # Github : https://github.com/QIN2DIM # Description: from typing import Optional, Sequence class AntiEmailException(Exception): def __init__(self, msg: Optional[str] = None, stacktrace: Optional[Sequence[str]] = None) -> None: ...
25.896552
102
0.648469
from typing import Optional, Sequence class AntiEmailException(Exception): def __init__(self, msg: Optional[str] = None, stacktrace: Optional[Sequence[str]] = None) -> None: self.msg = msg self.stacktrace = stacktrace def __str__(self) -> str: exception_msg = "Message: {}\n".for...
true
true
f7f8a9043512f8d9ef83fe92d6463ce10aaf227a
675
py
Python
RESTBasic/migrations/versions/4be2799e102a_initial_database.py
vgeorgo/courses-python-udemy-create-websites-using-flask
34f0a789402f4dabfdbf87272fc823979b3af313
[ "MIT" ]
1
2021-01-05T19:26:07.000Z
2021-01-05T19:26:07.000Z
RESTBasic/migrations/versions/4be2799e102a_initial_database.py
vgeorgo/courses-python-udemy-create-websites-using-flask
34f0a789402f4dabfdbf87272fc823979b3af313
[ "MIT" ]
null
null
null
RESTBasic/migrations/versions/4be2799e102a_initial_database.py
vgeorgo/courses-python-udemy-create-websites-using-flask
34f0a789402f4dabfdbf87272fc823979b3af313
[ "MIT" ]
null
null
null
"""initial database Revision ID: 4be2799e102a Revises: Create Date: 2018-11-28 20:39:45.470767 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '4be2799e102a' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto g...
21.09375
65
0.678519
from alembic import op import sqlalchemy as sa revision = '4be2799e102a' down_revision = None branch_labels = None depends_on = None def upgrade():
true
true
f7f8a9c041be576fde6e55df4c464185a1401561
1,868
py
Python
src/api/dataflow/flow/handlers/nodes/base_node/base_source_node.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/api/dataflow/flow/handlers/nodes/base_node/base_source_node.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/api/dataflow/flow/handlers/nodes/base_node/base_source_node.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ------------------------------------------...
44.47619
111
0.731799
from dataflow.flow.handlers.nodes.base_node.node_handler import NodeHandler class SourceNode(NodeHandler): def update_node_metadata_relation(self, bk_biz_id, result_table_ids, heads=None, tails=None): self.node_info.update_as_source(bk_biz_id, result_table_ids[0])
true
true
f7f8aa0690977174d486c205bf4183d5ca541045
723
py
Python
bnn_mcmc_examples/examples/mlp/noisy_xor/setting1/mcmc/hmc/benchmark_run.py
papamarkou/bnn_mcmc_examples
7bb4ecfb33db4c30a8e61e31f528bda0efb24e3d
[ "MIT" ]
1
2021-09-09T15:55:37.000Z
2021-09-09T15:55:37.000Z
bnn_mcmc_examples/examples/mlp/noisy_xor/setting1/mcmc/hmc/benchmark_run.py
kushagragpt99/bnn_mcmc_examples
297cdb1e74335860989bebdb4ff6f6322b6adc06
[ "MIT" ]
null
null
null
bnn_mcmc_examples/examples/mlp/noisy_xor/setting1/mcmc/hmc/benchmark_run.py
kushagragpt99/bnn_mcmc_examples
297cdb1e74335860989bebdb4ff6f6322b6adc06
[ "MIT" ]
1
2021-10-05T06:38:57.000Z
2021-10-05T06:38:57.000Z
# %% Import packages from bnn_mcmc_examples.examples.mlp.noisy_xor.setting1.mcmc.constants import ( num_chains, num_epochs, num_burnin_epochs, verbose, verbose_step ) from bnn_mcmc_examples.examples.mlp.noisy_xor.setting1.mcmc.hmc.constants import sampler_output_path from bnn_mcmc_examples.examples.mlp.noisy_xor.s...
32.863636
100
0.789765
from bnn_mcmc_examples.examples.mlp.noisy_xor.setting1.mcmc.constants import ( num_chains, num_epochs, num_burnin_epochs, verbose, verbose_step ) from bnn_mcmc_examples.examples.mlp.noisy_xor.setting1.mcmc.hmc.constants import sampler_output_path from bnn_mcmc_examples.examples.mlp.noisy_xor.setting1.mcmc.hmc.sam...
true
true
f7f8aad8153f32829043537366778aa134928729
2,658
py
Python
.leetcode/110.balanced-binary-tree.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/110.balanced-binary-tree.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/110.balanced-binary-tree.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
# @lc app=leetcode id=110 lang=python3 # # [110] Balanced Binary Tree # # https://leetcode.com/problems/balanced-binary-tree/description/ # # algorithms # Easy (44.89%) # Likes: 3539 # Dislikes: 232 # Total Accepted: 571.5K # Total Submissions: 1.3M # Testcase Example: '[3,9,20,null,null,15,7]' # # Given a binar...
19.688889
76
0.569977
from imports import * class Solution: def isBalanced(self, root: TreeNode) -> bool: def recur(node: TreeNode) -> Tuple[bool, int]: if not node: return True, 0 fl, heightL = recur(...
true
true
f7f8ac6ae10da5f1a2dfc69c0e6914a217010b74
9,344
py
Python
gui.py
huxinkan517/video-subtitle-extractor
3fcd9d3e1f5198a0343be24f25101cd3db65ccff
[ "Apache-2.0" ]
1
2021-12-15T08:14:49.000Z
2021-12-15T08:14:49.000Z
gui.py
huxinkan517/video-subtitle-extractor
3fcd9d3e1f5198a0343be24f25101cd3db65ccff
[ "Apache-2.0" ]
null
null
null
gui.py
huxinkan517/video-subtitle-extractor
3fcd9d3e1f5198a0343be24f25101cd3db65ccff
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @Author : Fang Yao @Time : 2021/4/1 6:07 下午 @FileName: gui.py @desc: """ import sys import PySimpleGUI as sg import cv2 import os from threading import Thread from backend.tools.settings import set_language_mode from main import SubtitleExtractor class SubtitleExtractorGUI: def _...
41.714286
135
0.502783
import sys import PySimpleGUI as sg import cv2 import os from threading import Thread from backend.tools.settings import set_language_mode from main import SubtitleExtractor class SubtitleExtractorGUI: def __init__(self): self.screen_width, self.screen_height = sg.Window.get_screen_size() ...
true
true
f7f8ad698b4c8adfaeb8585e6f4f2379b2e28fce
1,363
py
Python
tests/benchmarks/constructs/RichComparisonStrings.py
RESP3CT88/Nuitka
0fcc25d9f00c4fc78c79a863c4b7987f573962e1
[ "Apache-2.0" ]
5,421
2018-09-24T08:04:06.000Z
2022-03-31T20:02:37.000Z
tests/benchmarks/constructs/RichComparisonStrings.py
ztessler/Nuitka
04c9a5471b702a0e5f28398f2661c93b83ab0d1a
[ "Apache-2.0" ]
1,348
2018-09-22T13:41:00.000Z
2022-03-31T22:33:40.000Z
tests/benchmarks/constructs/RichComparisonStrings.py
ztessler/Nuitka
04c9a5471b702a0e5f28398f2661c93b83ab0d1a
[ "Apache-2.0" ]
396
2018-09-28T15:37:03.000Z
2022-03-29T10:52:09.000Z
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # L...
31.697674
78
0.718269
# indicated. # # 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...
true
true
f7f8ae2a57aa94fc1312d1681af759d69cfd2fd7
968
py
Python
isi_sdk_8_0_1/test/test_network_groupnet_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_0_1/test/test_network_groupnet_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_0_1/test/test_network_groupnet_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 4 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_8_0_1 from i...
23.609756
104
0.725207
from __future__ import absolute_import import unittest import isi_sdk_8_0_1 from isi_sdk_8_0_1.models.network_groupnet_extended import NetworkGroupnetExtended from isi_sdk_8_0_1.rest import ApiException class TestNetworkGroupnetExtended(unittest.TestCase): def setUp(self): pass def tearDown(...
true
true
f7f8aea11007006a9ce355c1421574e7faad75a0
15,035
py
Python
sdk/python/pulumi_azure_native/network/v20171101/network_watcher.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20171101/network_watcher.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20171101/network_watcher.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
55.07326
4,551
0.684071
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ = ['NetworkWatcherArgs', 'NetworkWatcher'] @pulumi.input_type class NetworkWatcherArgs: def __init__(__self__, *, resource_group_name: pu...
true
true
f7f8b138f669f1edbe1b56d33d66b4880b7b7e35
16,783
py
Python
python/iceberg/api/types/type_util.py
moulimukherjee/incubator-iceberg
bf7edc4b325df6dd80d86fea0149d2be0ad09468
[ "Apache-2.0" ]
58
2019-09-10T20:51:26.000Z
2022-03-22T11:06:09.000Z
python/iceberg/api/types/type_util.py
moulimukherjee/incubator-iceberg
bf7edc4b325df6dd80d86fea0149d2be0ad09468
[ "Apache-2.0" ]
292
2019-07-23T04:33:18.000Z
2021-07-26T04:28:22.000Z
python/iceberg/api/types/type_util.py
moulimukherjee/incubator-iceberg
bf7edc4b325df6dd80d86fea0149d2be0ad09468
[ "Apache-2.0" ]
26
2019-08-28T23:59:03.000Z
2022-03-04T08:54:08.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.195167
110
0.618423
import math from typing import List from .type import (Type, TypeID) from .types import (ListType, MapType, NestedField, StructType) MAX_PRECISION = list() REQUIRED_LENGTH = [-1 for item in range(40)] MAX_PRECISION.append...
true
true
f7f8b42e34379c5fbcaadc191c0b8029b3990e77
4,977
py
Python
seq2seq_chatbot/preprocessing/cornell.py
rohitjack/J.A.R.V.I.C.
7d2bff9a3b1d9c1bb73a8db751db9657698d66b7
[ "MIT" ]
1
2019-11-25T23:36:30.000Z
2019-11-25T23:36:30.000Z
seq2seq_chatbot/preprocessing/cornell.py
rohitjack/J.A.R.V.I.C.
7d2bff9a3b1d9c1bb73a8db751db9657698d66b7
[ "MIT" ]
null
null
null
seq2seq_chatbot/preprocessing/cornell.py
rohitjack/J.A.R.V.I.C.
7d2bff9a3b1d9c1bb73a8db751db9657698d66b7
[ "MIT" ]
5
2019-04-06T23:10:09.000Z
2019-12-19T19:03:43.000Z
import torch from torch.jit import script, trace import torch.nn as nn from torch import optim import torch.nn.functional as F import csv import random import re import os import unicodedata import codecs from io import open import itertools import math import pickle from utils import * corpus_name = "cornell" corpus...
33.18
123
0.644364
import torch from torch.jit import script, trace import torch.nn as nn from torch import optim import torch.nn.functional as F import csv import random import re import os import unicodedata import codecs from io import open import itertools import math import pickle from utils import * corpus_name = "cornell" corpus...
true
true
f7f8b49229fa3c8682dfb682060bc70425813e68
10,178
py
Python
build_scripts/build_utils.py
ashwinprasadme/pytype
fed209c73aacfcab15efc33deef3b4016a67cfe5
[ "Apache-2.0" ]
null
null
null
build_scripts/build_utils.py
ashwinprasadme/pytype
fed209c73aacfcab15efc33deef3b4016a67cfe5
[ "Apache-2.0" ]
null
null
null
build_scripts/build_utils.py
ashwinprasadme/pytype
fed209c73aacfcab15efc33deef3b4016a67cfe5
[ "Apache-2.0" ]
null
null
null
"""Module with common utilities used by other build and test scripts.""" from __future__ import print_function import json import os import shutil import subprocess import sys PYTYPE_SRC_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) OUT_DIR = os.path.join(PYTYPE_SRC_ROOT, "out") SRC_PYI_DIR = os...
33.701987
80
0.681666
from __future__ import print_function import json import os import shutil import subprocess import sys PYTYPE_SRC_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) OUT_DIR = os.path.join(PYTYPE_SRC_ROOT, "out") SRC_PYI_DIR = os.path.join(PYTYPE_SRC_ROOT, "pytype", "pyi") OUT_PYI_DIR = os.path.join(O...
true
true
f7f8b5e6443c454c806ae74762d1ab9410daa794
3,303
py
Python
pilot/util/constants.py
MihaMuskinja/pilot2
b40c07baa84f910089c75b8be964199a1ccc5a1f
[ "Apache-2.0" ]
null
null
null
pilot/util/constants.py
MihaMuskinja/pilot2
b40c07baa84f910089c75b8be964199a1ccc5a1f
[ "Apache-2.0" ]
null
null
null
pilot/util/constants.py
MihaMuskinja/pilot2
b40c07baa84f910089c75b8be964199a1ccc5a1f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Authors: # - Mario Lassnig, mario.lassnig@cern.ch, 2017 # - Paul Nilsson, ...
37.11236
117
0.734787
from os import environ RELEASE = '2' VERSION = '4' REVISION = '1' BUILD = '1' SUCCESS = 0 FAILURE = 1 ERRNO_NOJOBS = 20 UTILITY_BEFORE_PAYLOAD = 0 UTILITY_WITH_PAYLOAD = 1 UTILITY_AFTER_PAYLOAD_STARTED = 2 UTILITY_AFTER_PAYLOAD_FINISHED = 3 UTILITY_WITH_STAGEIN = 4 PILOT_START_TIME = 'PILO...
true
true
f7f8b6c7b14117056da60262db675f8233e8c587
2,154
py
Python
evennia/game_template/server/conf/at_search.py
Jaykingamez/evennia
cf7cab1fea99ede3efecb70a65c3eb0fba1d3745
[ "BSD-3-Clause" ]
1,544
2015-01-01T22:16:31.000Z
2022-03-31T19:17:45.000Z
evennia/game_template/server/conf/at_search.py
Jaykingamez/evennia
cf7cab1fea99ede3efecb70a65c3eb0fba1d3745
[ "BSD-3-Clause" ]
1,686
2015-01-02T18:26:31.000Z
2022-03-31T20:12:03.000Z
evennia/game_template/server/conf/at_search.py
Jaykingamez/evennia
cf7cab1fea99ede3efecb70a65c3eb0fba1d3745
[ "BSD-3-Clause" ]
867
2015-01-02T21:01:54.000Z
2022-03-29T00:28:27.000Z
""" Search and multimatch handling This module allows for overloading two functions used by Evennia's search functionality: at_search_result: This is called whenever a result is returned from an object search (a common operation in commands). It should (together with at_multimatch_input b...
39.163636
82
0.687094
def at_search_result(matches, caller, query="", quiet=False, **kwargs):
true
true
f7f8b6e145f8deecf92aca43092f6102a9273755
407
py
Python
backend-python/aiqa_geo_django/wsgi.py
aiqa/geo-docker-django
87dbb841ce79d43222b7a03f708b142dc4de36de
[ "MIT" ]
1
2020-08-26T17:59:26.000Z
2020-08-26T17:59:26.000Z
backend-python/aiqa_geo_django/wsgi.py
aiqa/geo-docker-django
87dbb841ce79d43222b7a03f708b142dc4de36de
[ "MIT" ]
12
2020-06-06T00:56:38.000Z
2022-02-19T00:17:10.000Z
backend-python/aiqa_geo_django/wsgi.py
aiqa/geo-docker-django
87dbb841ce79d43222b7a03f708b142dc4de36de
[ "MIT" ]
1
2022-03-16T14:00:24.000Z
2022-03-16T14:00:24.000Z
""" WSGI config for aiqa_geo_django project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJAN...
23.941176
78
0.793612
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'aiqa_geo_django.settings') application = get_wsgi_application()
true
true
f7f8b6f0fcdc6ccedf7c7153c6f0a944e309844b
13,723
py
Python
astlib/asdl.py
cgsdfc/pyast
75bd766a420bdaf5742e85b1a584046a9bebf5a4
[ "MIT" ]
null
null
null
astlib/asdl.py
cgsdfc/pyast
75bd766a420bdaf5742e85b1a584046a9bebf5a4
[ "MIT" ]
null
null
null
astlib/asdl.py
cgsdfc/pyast
75bd766a420bdaf5742e85b1a584046a9bebf5a4
[ "MIT" ]
null
null
null
# Copyright (c) 2020 cgsdfc # # This software is released under the MIT License. # https://opensource.org/licenses/MIT #------------------------------------------------------------------------------- # Parser for ASDL [1] definition files. Reads in an ASDL description and parses # it into an AST that describes it. # #...
31.33105
80
0.578008
# modules and attributes after a product. Words starting with Capital letters # are terminals. Literal tokens are in "double quotes". Others are # non-terminals. Id is either TokenId or ConstructorId. # # module ::= "module" Id "{" [definitions] "}" # definitions ::= { TypeId "=" type } # type ...
true
true
f7f8b75db2f5f84e26592d92dfd2f31034826a0c
5,465
py
Python
tests/test_sdk_client.py
maddie-vargo/code42cli
fde4a70d4810923b668e8ca2d8d00af75c567dd1
[ "MIT" ]
null
null
null
tests/test_sdk_client.py
maddie-vargo/code42cli
fde4a70d4810923b668e8ca2d8d00af75c567dd1
[ "MIT" ]
null
null
null
tests/test_sdk_client.py
maddie-vargo/code42cli
fde4a70d4810923b668e8ca2d8d00af75c567dd1
[ "MIT" ]
null
null
null
from io import StringIO import py42.sdk import py42.settings.debug as debug import pytest from py42.exceptions import Py42MFARequiredError from py42.exceptions import Py42UnauthorizedError from requests import Response from requests.exceptions import ConnectionError from requests.exceptions import HTTPError from reque...
34.371069
139
0.782068
from io import StringIO import py42.sdk import py42.settings.debug as debug import pytest from py42.exceptions import Py42MFARequiredError from py42.exceptions import Py42UnauthorizedError from requests import Response from requests.exceptions import ConnectionError from requests.exceptions import HTTPError from reque...
true
true
f7f8b75f9fe8621c2b9fbdba5fe4a6d7353a71c4
925
py
Python
test/record/parser/test_response_whois_nic_fr_fr_property_status_missing.py
huyphan/pyyawhois
77fb2f73a9c67989f1d41d98f37037406a69d136
[ "MIT" ]
null
null
null
test/record/parser/test_response_whois_nic_fr_fr_property_status_missing.py
huyphan/pyyawhois
77fb2f73a9c67989f1d41d98f37037406a69d136
[ "MIT" ]
null
null
null
test/record/parser/test_response_whois_nic_fr_fr_property_status_missing.py
huyphan/pyyawhois
77fb2f73a9c67989f1d41d98f37037406a69d136
[ "MIT" ]
null
null
null
# This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # spec/fixtures/responses/whois.nic.fr/fr/property_status_missing # # and regenerate the tests with the following script # # $ scripts/generate_tests.py # from nose.tools import * from dateutil.parser impo...
28.90625
92
0.699459
from nose.tools import * from dateutil.parser import parse as time_parse import yawhois class TestWhoisNicFrFrPropertyStatusMissing(object): def setUp(self): fixture_path = "spec/fixtures/responses/whois.nic.fr/fr/property_status_missing.txt" host = "whois.nic.fr" part ...
true
true
f7f8b8acb5b5b9732a69cb1704d24ff8e4f740cc
2,555
py
Python
assets/agent.py
helderpsilva/tictactoe_reinforcement_learning
2d7abfb1832545d7287f84f1f7cf4f94cdb8adbb
[ "MIT" ]
1
2021-09-05T13:06:43.000Z
2021-09-05T13:06:43.000Z
assets/agent.py
helderpsilva/tictactoe_reinforcement_learning
2d7abfb1832545d7287f84f1f7cf4f94cdb8adbb
[ "MIT" ]
null
null
null
assets/agent.py
helderpsilva/tictactoe_reinforcement_learning
2d7abfb1832545d7287f84f1f7cf4f94cdb8adbb
[ "MIT" ]
null
null
null
# importar librarias necessarias. import numpy as np class Agent(): """Criação da entidade agente""" # O símbolo é X ou 0 # O epsilon é a probabilidade que o agente tem de fazer uma escolha aleatória # O learning rate é a taxa de aprendizagem def __init__(self, symbol, epsilon = 0.05, learning_rat...
34.527027
81
0.589432
import numpy as np class Agent(): def __init__(self, symbol, epsilon = 0.05, learning_rate=0.2, name=None): self.name = name self.epsilon = epsilon self.learning_rate = learning_rate self.symbol = symbol self.history = [] def value_function(self, V...
true
true
f7f8b9f7af4f546a04bf2214b67f2f46a6d670f0
474
py
Python
data/scripts/templates/object/tangible/medicine/crafted/shared_crafted_stimpack_sm_s1_e.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/medicine/crafted/shared_crafted_stimpack_sm_s1_e.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/medicine/crafted/shared_crafted_stimpack_sm_s1_e.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/medicine/crafted/shared_crafted_stimpack_sm_s1_e.iff" result.attrib...
27.882353
89
0.742616
true
true
f7f8ba2ca7e4b9864e16b3b6608a8c74cd53b859
2,311
py
Python
adminmgr/media/code/A3/task3/BD_026_109_110_ufytlDQ.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
9
2019-11-08T02:05:27.000Z
2021-12-13T12:06:35.000Z
adminmgr/media/code/A3/task3/BD_026_109_110_ufytlDQ.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
6
2019-11-27T03:23:16.000Z
2021-06-10T19:15:13.000Z
adminmgr/media/code/A3/task3/BD_026_109_110_ufytlDQ.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
4
2019-11-26T17:04:27.000Z
2021-12-13T11:57:03.000Z
import findspark findspark.init() from pyspark import SparkConf,SparkContext from pyspark.streaming import StreamingContext from pyspark.sql import Row,SQLContext import sys import requests def aggregate_tweets_count(new_values, total_sum): return sum(new_values) + (total_sum or 0) def get_sql_context_instance(spar...
27.188235
134
0.727823
import findspark findspark.init() from pyspark import SparkConf,SparkContext from pyspark.streaming import StreamingContext from pyspark.sql import Row,SQLContext import sys import requests def aggregate_tweets_count(new_values, total_sum): return sum(new_values) + (total_sum or 0) def get_sql_context_instance(spar...
true
true
f7f8ba5245d8fbc310f93776b81795296f910b3f
313
py
Python
brapci-py/brapci/source/forms.py
ReneFGJ/Brapci
1e31502d0e5e80995824304ca9daf4816d69926f
[ "MIT" ]
null
null
null
brapci-py/brapci/source/forms.py
ReneFGJ/Brapci
1e31502d0e5e80995824304ca9daf4816d69926f
[ "MIT" ]
2
2015-01-09T12:19:00.000Z
2015-01-21T14:05:06.000Z
brapci-py/brapci/source/forms.py
ReneFGJ/Brapci
1e31502d0e5e80995824304ca9daf4816d69926f
[ "MIT" ]
null
null
null
from django import forms from .models import Source class SourceForm(forms.ModelForm): class Meta: model = Source fields = ['id_jnl','jnl_name','jnl_issn_impresso'] class SourceFormConfirm(forms.ModelForm): class Meta: model = Source fields = ['id_jnl']
26.083333
59
0.629393
from django import forms from .models import Source class SourceForm(forms.ModelForm): class Meta: model = Source fields = ['id_jnl','jnl_name','jnl_issn_impresso'] class SourceFormConfirm(forms.ModelForm): class Meta: model = Source fields = ['id_jnl']
true
true
f7f8bc285abe6adfcd859b4030edc00a0cd7066e
61,842
py
Python
salt/modules/zypper.py
Jille/salt
286eaf923782851c9b6602583050be804c181a9a
[ "Apache-2.0" ]
null
null
null
salt/modules/zypper.py
Jille/salt
286eaf923782851c9b6602583050be804c181a9a
[ "Apache-2.0" ]
null
null
null
salt/modules/zypper.py
Jille/salt
286eaf923782851c9b6602583050be804c181a9a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Package support for openSUSE via the zypper package manager :depends: - ``rpm`` Python module. Install with ``zypper install rpm-python`` .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives a...
31.092006
124
0.60045
from __future__ import absolute_import import copy import fnmatch import logging import re import os import time import datetime from salt.utils.versions import LooseVersion import salt.ext.six as six from salt.exceptions import SaltInvocationError import salt.utils.event from salt.ext.six.moves import configpars...
true
true
f7f8bc36e3301cc58f737c081a0d83f639a1e0a2
3,270
py
Python
readme_metrics/Metrics.py
readmeio/metrics-sdks-python
02bc6e486260641f1a62760d20370157a4928af6
[ "0BSD" ]
2
2020-09-23T04:44:22.000Z
2021-07-06T18:14:11.000Z
readme_metrics/Metrics.py
readmeio/metrics-sdks-python
02bc6e486260641f1a62760d20370157a4928af6
[ "0BSD" ]
null
null
null
readme_metrics/Metrics.py
readmeio/metrics-sdks-python
02bc6e486260641f1a62760d20370157a4928af6
[ "0BSD" ]
1
2020-09-23T04:44:25.000Z
2020-09-23T04:44:25.000Z
import atexit import math import queue import threading import requests import json import importlib from readme_metrics import MetricsApiConfig from readme_metrics.publisher import publish_batch from readme_metrics.PayloadBuilder import PayloadBuilder from readme_metrics.ResponseInfoWrapper import ResponseInfoWrapper...
34.787234
108
0.625688
import atexit import math import queue import threading import requests import json import importlib from readme_metrics import MetricsApiConfig from readme_metrics.publisher import publish_batch from readme_metrics.PayloadBuilder import PayloadBuilder from readme_metrics.ResponseInfoWrapper import ResponseInfoWrapper...
true
true
f7f8bda4ed682df102a1df0273464045520e3003
3,317
py
Python
tests/compat/test_gecko42.py
magopian/amo-validator
bc0ac7519d1d7b6b266fc66d3eee49c63073f58a
[ "BSD-3-Clause" ]
null
null
null
tests/compat/test_gecko42.py
magopian/amo-validator
bc0ac7519d1d7b6b266fc66d3eee49c63073f58a
[ "BSD-3-Clause" ]
null
null
null
tests/compat/test_gecko42.py
magopian/amo-validator
bc0ac7519d1d7b6b266fc66d3eee49c63073f58a
[ "BSD-3-Clause" ]
null
null
null
from helper import CompatTestCase from validator.chromemanifest import ChromeManifest from validator.compat import FX42_DEFINITION from validator.errorbundler import ErrorBundle from validator.testcases import content class TestFX42Compat(CompatTestCase): """Test that compatibility tests for Gecko 42 are properly...
36.855556
78
0.609587
from helper import CompatTestCase from validator.chromemanifest import ChromeManifest from validator.compat import FX42_DEFINITION from validator.errorbundler import ErrorBundle from validator.testcases import content class TestFX42Compat(CompatTestCase): VERSION = FX42_DEFINITION def test_parseContentType(...
true
true
f7f8bdcc7fcb5863849a2cc23f70fcb47ff4fba7
1,316
py
Python
src/sage/combinat/posets/all.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/combinat/posets/all.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/combinat/posets/all.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
r""" Posets Common posets can be accessed through ``posets.<tab>`` and are listed in the posets catalog: - :ref:`Catalog of posets and lattices <sage.combinat.posets.poset_examples>` Poset-related classes: - :ref:`sage.combinat.posets.posets` - :ref:`sage.combinat.posets.lattices` - :ref:`sage.combinat.posets.line...
29.909091
77
0.784195
from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) from .posets import Poset from .lattices import LatticePoset, MeetSemilattice, JoinSemilattice from .poset_examples import posets, Posets
true
true
f7f8be728eeb09194cffabc3e87854db1a2d9bad
10,905
py
Python
qa/pull-tester/rpc-tests.py
ctwiz/stardust
0d237784267413e4076ec872e34393d26ad9aa03
[ "MIT" ]
null
null
null
qa/pull-tester/rpc-tests.py
ctwiz/stardust
0d237784267413e4076ec872e34393d26ad9aa03
[ "MIT" ]
null
null
null
qa/pull-tester/rpc-tests.py
ctwiz/stardust
0d237784267413e4076ec872e34393d26ad9aa03
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Stardust Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Run Regression Test Suite This module calls down into individual test cases via subprocess. It will...
31.700581
133
0.6221
import os import time import shutil import sys import subprocess import tempfile import re sys.path.append("qa/pull-tester/") from tests_config import * BOLD = ("","") if os.name == 'posix': BOLD = ('\033[0m', '\033[1m') RPC_TESTS_DIR = SRCDIR + '/qa/rpc-tests/' if 'ENABLE_WALLET' not in vars()...
true
true
f7f8be9d8015dfeda464d09109d65cc93cb2aef8
4,661
py
Python
preprocessing/smri/extract_freesurfer_metrics.py
GalBenZvi/BrainPrint
8dda22f130f60bac66fe05f0f5163ee3680616f5
[ "Apache-2.0" ]
null
null
null
preprocessing/smri/extract_freesurfer_metrics.py
GalBenZvi/BrainPrint
8dda22f130f60bac66fe05f0f5163ee3680616f5
[ "Apache-2.0" ]
1
2021-08-12T07:54:37.000Z
2021-08-12T07:54:37.000Z
preprocessing/smri/extract_freesurfer_metrics.py
GalBenZvi/BrainPrint
8dda22f130f60bac66fe05f0f5163ee3680616f5
[ "Apache-2.0" ]
1
2021-08-08T11:56:19.000Z
2021-08-08T11:56:19.000Z
import os from nipype.interfaces import ants from pathlib import Path from numpy import fabs from pandas.core.reshape.merge import merge def get_subject_files(derivatives_dir: Path, subj_id: str) -> dict: """ Finds subject's relevant files as were derived from FS's analysis pipeline Parameters ------...
31.073333
112
0.576057
import os from nipype.interfaces import ants from pathlib import Path from numpy import fabs from pandas.core.reshape.merge import merge def get_subject_files(derivatives_dir: Path, subj_id: str) -> dict: subj_dict = {} for hemi in ["lh", "rh"]: for val in ["thickness", "volume", "sulc", "white"]: ...
true
true
f7f8c08eefc0a72cb6b1ce655d87dbecc1b7c1f1
1,819
py
Python
bonder/check.py
gkrizek/bond
c87d81fca09b056167e8f0a2db63b1338b9c7622
[ "Apache-2.0" ]
null
null
null
bonder/check.py
gkrizek/bond
c87d81fca09b056167e8f0a2db63b1338b9c7622
[ "Apache-2.0" ]
null
null
null
bonder/check.py
gkrizek/bond
c87d81fca09b056167e8f0a2db63b1338b9c7622
[ "Apache-2.0" ]
null
null
null
import click import json import subprocess from sys import exit def get_unbonded_atom(address): try: process = subprocess.check_output("gaiacli account %s" % (address), shell=True, stderr=subprocess.STDOUT) return { "success": True, "output": json.loads(process) } ...
30.316667
209
0.592084
import click import json import subprocess from sys import exit def get_unbonded_atom(address): try: process = subprocess.check_output("gaiacli account %s" % (address), shell=True, stderr=subprocess.STDOUT) return { "success": True, "output": json.loads(process) } ...
true
true
f7f8c12eab068c39089ac9ba3ac96405e0a06111
6,224
py
Python
tests/profiler/tensorflow2/test_native_tf2_profiler.py
mchoi8739/sagemaker-debugger
fcc02366d06308642cf96b17aae417db9c1192d5
[ "Apache-2.0" ]
2
2020-07-28T22:04:02.000Z
2020-07-31T06:27:35.000Z
tests/profiler/tensorflow2/test_native_tf2_profiler.py
mchoi8739/sagemaker-debugger
fcc02366d06308642cf96b17aae417db9c1192d5
[ "Apache-2.0" ]
null
null
null
tests/profiler/tensorflow2/test_native_tf2_profiler.py
mchoi8739/sagemaker-debugger
fcc02366d06308642cf96b17aae417db9c1192d5
[ "Apache-2.0" ]
null
null
null
# Standard Library import os # Third Party import pytest import tensorflow as tf from tests.profiler.core.utils import validate_python_profiling_stats from tests.tensorflow2.utils import ModelType # First Party import smdebug.tensorflow as smd from smdebug.core.collection import CollectionKeys from smdebug.core.utils...
39.643312
117
0.746465
import os import pytest import tensorflow as tf from tests.profiler.core.utils import validate_python_profiling_stats from tests.tensorflow2.utils import ModelType import smdebug.tensorflow as smd from smdebug.core.collection import CollectionKeys from smdebug.core.utils import FRAMEWORK from smdebug.profiler.prof...
true
true
f7f8c16bf00732ac72b82b7bc497ecee71107f93
13,044
py
Python
poky/meta/lib/oeqa/utils/commands.py
Eyerunmyden/HWMgmt-MegaRAC-OpenEdition
72b03e9fc6e2a13184f1c57b8045b616db9b0a6d
[ "Apache-2.0", "MIT" ]
14
2021-11-04T07:47:37.000Z
2022-03-21T10:10:30.000Z
poky/meta/lib/oeqa/utils/commands.py
Eyerunmyden/HWMgmt-MegaRAC-OpenEdition
72b03e9fc6e2a13184f1c57b8045b616db9b0a6d
[ "Apache-2.0", "MIT" ]
null
null
null
poky/meta/lib/oeqa/utils/commands.py
Eyerunmyden/HWMgmt-MegaRAC-OpenEdition
72b03e9fc6e2a13184f1c57b8045b616db9b0a6d
[ "Apache-2.0", "MIT" ]
6
2021-11-02T10:56:19.000Z
2022-03-06T11:58:20.000Z
# # Copyright (c) 2013-2014 Intel Corporation # # SPDX-License-Identifier: MIT # # DESCRIPTION # This module is mainly used by scripts/oe-selftest and modules under meta/oeqa/selftest # It provides a class and methods for running commands on the host in a convienent way for tests. import os import sys import signal...
35.349593
133
0.596903
import os import sys import signal import subprocess import threading import time import logging from oeqa.utils import CommandError from oeqa.utils import ftools import re import contextlib try: import bb except ImportError: pass class Command(object): def __init__(self, command, bg=False, ti...
true
true
f7f8c17ecba74a8f00083f484e953c8077707774
3,605
py
Python
test/torchaudio_unittest/functional/functional_impl.py
prarabdh9909/audio
6bad3a66a7a1c7cc05755e9ee5931b7391d2b94c
[ "BSD-2-Clause" ]
1
2021-03-16T08:09:20.000Z
2021-03-16T08:09:20.000Z
test/torchaudio_unittest/functional/functional_impl.py
prarabdh9909/audio
6bad3a66a7a1c7cc05755e9ee5931b7391d2b94c
[ "BSD-2-Clause" ]
null
null
null
test/torchaudio_unittest/functional/functional_impl.py
prarabdh9909/audio
6bad3a66a7a1c7cc05755e9ee5931b7391d2b94c
[ "BSD-2-Clause" ]
null
null
null
"""Test defintion common to CPU and CUDA""" import torch import torchaudio.functional as F from parameterized import parameterized from scipy import signal from torchaudio_unittest import common_utils class Lfilter(common_utils.TestBaseMixin): def test_simple(self): """ Create a very basic signal...
39.184783
110
0.622469
import torch import torchaudio.functional as F from parameterized import parameterized from scipy import signal from torchaudio_unittest import common_utils class Lfilter(common_utils.TestBaseMixin): def test_simple(self): torch.random.manual_seed(42) waveform = torch.rand(2, 44100 * 1, dtype=se...
true
true
f7f8c1ac3508eddbbe6d086b02f19351777e5223
173
py
Python
configure.py
OmkarMetri/Conference-Management-System
4b18819738e393be0aa5fe144a8ede7ac566470c
[ "Apache-2.0" ]
null
null
null
configure.py
OmkarMetri/Conference-Management-System
4b18819738e393be0aa5fe144a8ede7ac566470c
[ "Apache-2.0" ]
1
2021-06-02T00:53:05.000Z
2021-06-02T00:53:05.000Z
configure.py
OmkarMetri/Conference-Management-System
4b18819738e393be0aa5fe144a8ede7ac566470c
[ "Apache-2.0" ]
null
null
null
import requests print("Updating database (see the server logs)") res = requests.post("http://localhost:5000/admin/update-datasets") print(res.status_code) print(res.json())
28.833333
66
0.768786
import requests print("Updating database (see the server logs)") res = requests.post("http://localhost:5000/admin/update-datasets") print(res.status_code) print(res.json())
true
true
f7f8c1f4deba335a77cd584c7dc1e85f738b79eb
2,492
py
Python
tests/core/design/core_custom_vjp_test.py
berndbohnet/flax
5aa7f335bb8819088c8b1aa89aa459c99eb00c1c
[ "Apache-2.0" ]
1
2022-02-27T13:50:55.000Z
2022-02-27T13:50:55.000Z
tests/core/design/core_custom_vjp_test.py
berndbohnet/flax
5aa7f335bb8819088c8b1aa89aa459c99eb00c1c
[ "Apache-2.0" ]
null
null
null
tests/core/design/core_custom_vjp_test.py
berndbohnet/flax
5aa7f335bb8819088c8b1aa89aa459c99eb00c1c
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
30.390244
74
0.678571
from typing import Sequence, Callable from functools import partial from absl.testing import absltest import numpy as np from flax.core import Scope, Array, init, apply, unfreeze, lift, nn import jax from jax import random, numpy as jnp def mlp_custom_grad(scope: Scope, x: Array, ...
true
true
f7f8c33a303f88218bb800b844d12a4b67476d7c
8,585
py
Python
util.py
diningphil/CGMM-ICML2018
c6da2ac267edae0a0326818c6b4f4a6c141a053f
[ "BSD-3-Clause" ]
1
2018-05-17T03:38:42.000Z
2018-05-17T03:38:42.000Z
util.py
diningphil/CGMM-ICML2018
c6da2ac267edae0a0326818c6b4f4a6c141a053f
[ "BSD-3-Clause" ]
null
null
null
util.py
diningphil/CGMM-ICML2018
c6da2ac267edae0a0326818c6b4f4a6c141a053f
[ "BSD-3-Clause" ]
null
null
null
from typing import Optional, Tuple, List import torch import torch_geometric def extend_lists(data_list: Optional[Tuple[Optional[List[torch.Tensor]]]], new_data_list: Tuple[Optional[List[torch.Tensor]]]) -> Tuple[Optional[List[torch.Tensor]]]: r""" Extends the semantic of Python :func:`exten...
42.5
160
0.671171
from typing import Optional, Tuple, List import torch import torch_geometric def extend_lists(data_list: Optional[Tuple[Optional[List[torch.Tensor]]]], new_data_list: Tuple[Optional[List[torch.Tensor]]]) -> Tuple[Optional[List[torch.Tensor]]]: if data_list is None: return new_data_list ...
true
true
f7f8c43de075b0dc8f9e8a0d763b73720fd094c5
4,285
py
Python
implementation codes/quartic oscillator/setupC.py
Z-T-WANG/DeepReinforcementLearningControlOfQuantumCartpoles
3b243f235b4945a4817b738d8dbc412937de9f28
[ "MIT" ]
6
2020-08-01T09:30:17.000Z
2021-10-31T19:40:51.000Z
implementation codes/quartic oscillator/setupC.py
Z-T-WANG/DeepReinforcementLearningControlOfQuantumCartpoles
3b243f235b4945a4817b738d8dbc412937de9f28
[ "MIT" ]
null
null
null
implementation codes/quartic oscillator/setupC.py
Z-T-WANG/DeepReinforcementLearningControlOfQuantumCartpoles
3b243f235b4945a4817b738d8dbc412937de9f28
[ "MIT" ]
1
2020-07-28T06:10:08.000Z
2020-07-28T06:10:08.000Z
from distutils.core import setup, Extension from math import pi import numpy as np import os, sys, shutil, glob import argparse parser = argparse.ArgumentParser() parser.add_argument('--lambda', default= pi/25., type=float, metavar='\lambda', help='the strength of the quartic anharmonic oscillator...
54.935897
271
0.664877
from distutils.core import setup, Extension from math import pi import numpy as np import os, sys, shutil, glob import argparse parser = argparse.ArgumentParser() parser.add_argument('--lambda', default= pi/25., type=float, metavar='\lambda', help='the strength of the quartic anharmonic oscillator...
true
true
f7f8c6a8ed3a87cb8591e84ffb27c4da0af65677
3,582
py
Python
dockit/backends/djangodocument/indexers.py
zbyte64/django-dockit
8d00a46cb0b6237de622fcb6816067078106a0c4
[ "BSD-3-Clause" ]
5
2015-02-25T17:01:48.000Z
2021-06-03T07:46:47.000Z
dockit/backends/djangodocument/indexers.py
zbyte64/django-dockit
8d00a46cb0b6237de622fcb6816067078106a0c4
[ "BSD-3-Clause" ]
1
2015-03-11T15:19:55.000Z
2015-04-13T04:14:24.000Z
dockit/backends/djangodocument/indexers.py
zbyte64/django-dockit
8d00a46cb0b6237de622fcb6816067078106a0c4
[ "BSD-3-Clause" ]
null
null
null
from django.db.models import Model, Q from dockit.backends.indexer import BaseIndexer from dockit.schema import fields#, Document import dockit.backends.djangodocument.models as indexes from dockit.backends.djangodocument.backend import ModelIndexStorage #TODO need a mechanism for back populating indexes, must be ta...
38.516129
171
0.650475
from django.db.models import Model, Q from dockit.backends.indexer import BaseIndexer from dockit.schema import fields import dockit.backends.djangodocument.models as indexes from dockit.backends.djangodocument.backend import ModelIndexStorage class Indexer(object): def __init__(self, doc_class, index_creator,...
true
true
f7f8c6e2a1a99bb0eb636992ece1ebc18068184a
7,767
py
Python
telemetry/telemetry/internal/results/story_run_unittest.py
arthesh/catapult
c5ff470c5f62406ee0eb47a4b59acf5fea5f84aa
[ "BSD-3-Clause" ]
null
null
null
telemetry/telemetry/internal/results/story_run_unittest.py
arthesh/catapult
c5ff470c5f62406ee0eb47a4b59acf5fea5f84aa
[ "BSD-3-Clause" ]
null
null
null
telemetry/telemetry/internal/results/story_run_unittest.py
arthesh/catapult
c5ff470c5f62406ee0eb47a4b59acf5fea5f84aa
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import unittest import mock from telemetry.internal.results import story_run from telemetry.story import shared_state from telemetry ...
35.62844
80
0.624565
import json import os import unittest import mock from telemetry.internal.results import story_run from telemetry.story import shared_state from telemetry import story as story_module from py_utils import tempfile_ext def TestStory(name, **kwargs): return story_module.Story(shared_state.SharedState, name=nam...
true
true
f7f8c71defb7f76045db9f8b5be4541e61000970
11,352
py
Python
nova/api/openstack/compute/views/servers.py
ZhanHan/nova
4033e0166ca16ef380705cfdd928083be8bf4f68
[ "Apache-2.0" ]
1
2019-07-29T10:30:24.000Z
2019-07-29T10:30:24.000Z
nova/api/openstack/compute/views/servers.py
ZhanHan/nova
4033e0166ca16ef380705cfdd928083be8bf4f68
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/views/servers.py
ZhanHan/nova
4033e0166ca16ef380705cfdd928083be8bf4f68
[ "Apache-2.0" ]
1
2020-07-24T00:40:05.000Z
2020-07-24T00:40:05.000Z
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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...
39.692308
79
0.568798
import hashlib from oslo_log import log as logging from nova.api.openstack import api_version_request from nova.api.openstack import common from nova.api.openstack.compute.views import addresses as views_addresses from nova.api.openstack.compute.views import flavors as views_flavors from nova.api.open...
true
true
f7f8c757aff166e3b87332ee4229303248901a0c
24,471
py
Python
salt/modules/win_pkg.py
nshalman/salt
e162ce8aca1dc3a6bf35a86c779c41469d0adfb8
[ "Apache-2.0" ]
null
null
null
salt/modules/win_pkg.py
nshalman/salt
e162ce8aca1dc3a6bf35a86c779c41469d0adfb8
[ "Apache-2.0" ]
null
null
null
salt/modules/win_pkg.py
nshalman/salt
e162ce8aca1dc3a6bf35a86c779c41469d0adfb8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' A module to manage software on Windows :depends: - win32com - win32con - win32api - pywintypes ''' # Import third party libs try: import win32api import win32con HAS_DEPENDENCIES = True except ImportError: HAS_DEPENDENCIES = False # Im...
31.65718
133
0.594663
try: import win32api import win32con HAS_DEPENDENCIES = True except ImportError: HAS_DEPENDENCIES = False import copy import logging try: import msgpack except ImportError: import msgpack_pure as msgpack import os import locale from distutils.version import LooseVersion import re import...
true
true
f7f8c8167f224dafef796ec6031f269b479e58dc
4,675
py
Python
allennlp/training/metrics/attachment_scores.py
urigoren/allennlp
236e1fd01ca30409cd736625901292609009f5c4
[ "Apache-2.0" ]
4
2019-05-30T01:03:31.000Z
2021-12-18T08:24:51.000Z
allennlp/training/metrics/attachment_scores.py
urigoren/allennlp
236e1fd01ca30409cd736625901292609009f5c4
[ "Apache-2.0" ]
123
2020-04-26T02:41:30.000Z
2021-08-02T21:18:00.000Z
allennlp/training/metrics/attachment_scores.py
urigoren/allennlp
236e1fd01ca30409cd736625901292609009f5c4
[ "Apache-2.0" ]
5
2019-07-16T06:43:50.000Z
2021-12-18T08:25:12.000Z
from typing import Optional, List from overrides import overrides import torch from allennlp.training.metrics.metric import Metric @Metric.register("attachment_scores") class AttachmentScores(Metric): """ Computes labeled and unlabeled attachment scores for a dependency parse, as well as sentence level ...
38.00813
99
0.655401
from typing import Optional, List from overrides import overrides import torch from allennlp.training.metrics.metric import Metric @Metric.register("attachment_scores") class AttachmentScores(Metric): def __init__(self, ignore_classes: List[int] = None) -> None: self._labeled_correct = 0.0 self...
true
true
f7f8c8bc7b4658d5b5e6903f6a97cb114888b621
1,027
py
Python
aerics/client.py
Aermoss/Aerics
21d25a02b339e79c46a6e28163b4b00ea027d348
[ "MIT" ]
1
2022-01-25T17:36:54.000Z
2022-01-25T17:36:54.000Z
aerics/client.py
Aermoss/Aerics
21d25a02b339e79c46a6e28163b4b00ea027d348
[ "MIT" ]
null
null
null
aerics/client.py
Aermoss/Aerics
21d25a02b339e79c46a6e28163b4b00ea027d348
[ "MIT" ]
null
null
null
import socket import pickle class Client: def __init__(self, ip, port, recv_size = 1024, pickle = True): self.ip = ip self.port = port self.recv_size = recv_size self.pickle = pickle self.destroyed = False self.client = socket.socket(socket.AF_INET, soc...
26.333333
72
0.53554
import socket import pickle class Client: def __init__(self, ip, port, recv_size = 1024, pickle = True): self.ip = ip self.port = port self.recv_size = recv_size self.pickle = pickle self.destroyed = False self.client = socket.socket(socket.AF_INET, soc...
true
true
f7f8c9c426f612adeb828f335ad7255e04da9393
10,523
py
Python
adaptnlp/training.py
emycooper/adaptnlp
2e39f81a7faa4c7cd1d2a3764790cf7bb7ad7469
[ "Apache-2.0" ]
5
2020-03-30T12:50:56.000Z
2022-01-20T22:45:29.000Z
adaptnlp/training.py
emycooper/adaptnlp
2e39f81a7faa4c7cd1d2a3764790cf7bb7ad7469
[ "Apache-2.0" ]
9
2020-11-13T18:41:44.000Z
2022-02-10T01:58:28.000Z
adaptnlp/training.py
emycooper/adaptnlp
2e39f81a7faa4c7cd1d2a3764790cf7bb7ad7469
[ "Apache-2.0" ]
1
2020-03-30T17:29:05.000Z
2020-03-30T17:29:05.000Z
from typing import Union, Dict from pathlib import Path import json import csv import numpy as np from adaptnlp import EasyDocumentEmbeddings from flair.datasets import CSVClassificationCorpus from flair.data import Corpus from flair.embeddings import DocumentRNNEmbeddings from flair.models import TextClassifier fro...
41.105469
180
0.634895
from typing import Union, Dict from pathlib import Path import json import csv import numpy as np from adaptnlp import EasyDocumentEmbeddings from flair.datasets import CSVClassificationCorpus from flair.data import Corpus from flair.embeddings import DocumentRNNEmbeddings from flair.models import TextClassifier fro...
true
true
f7f8cac09a038db6e7f34f18098c7e1ac92de8c0
606
py
Python
Leetcode/199. Binary Tree Right Side View/solution1.py
asanoviskhak/Outtalent
c500e8ad498f76d57eb87a9776a04af7bdda913d
[ "MIT" ]
51
2020-07-12T21:27:47.000Z
2022-02-11T19:25:36.000Z
Leetcode/199. Binary Tree Right Side View/solution1.py
CrazySquirrel/Outtalent
8a10b23335d8e9f080e5c39715b38bcc2916ff00
[ "MIT" ]
null
null
null
Leetcode/199. Binary Tree Right Side View/solution1.py
CrazySquirrel/Outtalent
8a10b23335d8e9f080e5c39715b38bcc2916ff00
[ "MIT" ]
32
2020-07-27T13:54:24.000Z
2021-12-25T18:12:50.000Z
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def rightSideView(self, root: TreeNode) -> List[int]: if not root: return [] nodes = [root] ...
30.3
57
0.526403
class Solution: def rightSideView(self, root: TreeNode) -> List[int]: if not root: return [] nodes = [root] result = [] while nodes: result.append(nodes[-1].val) tmp = [] for node in nodes: if node.left: tmp.append(node.left) ...
true
true
f7f8cad20a22af8e02e4775d31e89bfaceb2d952
4,604
py
Python
src/patent_client/uspto/assignment/schema.py
dmathijs/patent_client
0466d34ef7af8556a11a2cff865d0f89ef7bd542
[ "Apache-2.0" ]
15
2018-10-23T01:15:29.000Z
2022-02-01T19:53:44.000Z
src/patent_client/uspto/assignment/schema.py
grimmer0125/patent_client
8943ca970d174ecf8aad10669a95ceddd75f5e13
[ "Apache-2.0" ]
33
2018-10-26T03:48:51.000Z
2022-01-17T09:16:07.000Z
src/patent_client/uspto/assignment/schema.py
grimmer0125/patent_client
8943ca970d174ecf8aad10669a95ceddd75f5e13
[ "Apache-2.0" ]
7
2019-02-14T20:25:20.000Z
2021-05-24T07:49:34.000Z
from marshmallow import Schema, fields, EXCLUDE, pre_load, post_load, ValidationError from .model import Assignment, Property, Assignee, Assignor from patent_client.util.schema import ListField # Utility Functions def separate_dicts_by_prefix(prefix, data): keys = [k for k in data.keys() if k.startswith(prefix) ...
37.430894
148
0.682884
from marshmallow import Schema, fields, EXCLUDE, pre_load, post_load, ValidationError from .model import Assignment, Property, Assignee, Assignor from patent_client.util.schema import ListField def separate_dicts_by_prefix(prefix, data): keys = [k for k in data.keys() if k.startswith(prefix) and not k.endswith('s...
true
true
f7f8cb6f0179b6b063f09c96301f1c9980221784
1,113
py
Python
python/src/aoc/year2020/day6.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
1
2021-02-16T21:30:04.000Z
2021-02-16T21:30:04.000Z
python/src/aoc/year2020/day6.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
null
null
null
python/src/aoc/year2020/day6.py
ocirne/adventofcode
ea9b5f1b48a04284521e85c96b420ed54adf55f0
[ "Unlicense" ]
null
null
null
from collections import defaultdict from aoc.util import load_example, load_input def part1(lines): """ >>> part1(load_example(__file__, '6')) 11 """ answers = [] a = {} for line in lines: if not line.strip(): answers.append(len(a.keys())) a = {} els...
23.1875
77
0.525606
from collections import defaultdict from aoc.util import load_example, load_input def part1(lines): answers = [] a = {} for line in lines: if not line.strip(): answers.append(len(a.keys())) a = {} else: for k in line.strip(): a[k] = True ...
true
true
f7f8cb7a4e947608fdf78399dd696a1413e60f46
1,555
py
Python
tests/p2p_test_peers.py
EOTSIO/EOT
d48e22c392a8a74abe8b5761a5fee50d3f75e956
[ "MIT" ]
null
null
null
tests/p2p_test_peers.py
EOTSIO/EOT
d48e22c392a8a74abe8b5761a5fee50d3f75e956
[ "MIT" ]
null
null
null
tests/p2p_test_peers.py
EOTSIO/EOT
d48e22c392a8a74abe8b5761a5fee50d3f75e956
[ "MIT" ]
null
null
null
import subprocess class P2PTestPeers: #for testing with localhost sshname = "testnet" # ssh name for executing remote commands hosts = ["localhost"] # host list ports = [8888] # eotiod listening port of each host devs = ["lo0"] # network device of each host #for testing with testnet2 #ssh...
64.791667
399
0.615434
import subprocess class P2PTestPeers: sshname = "testnet" hosts = ["localhost"] ports = [8888] devs = ["lo0"] sts)): remoteCmd2 = remoteCmd.replace("{dev}", P2PTestPeers.devs[i]) cmd = "ssh " + P2PTestPeers.sshname + "@" + P2PTestPeers.hosts[i] + ' ' + remote...
true
true
f7f8cb8010bdf2d35bf0b3602e2ae3fdd8f3ae58
158
py
Python
runner.py
alunegov/ids_screens
2699556651195c1f9e50c36ae119825cadf63370
[ "MIT" ]
null
null
null
runner.py
alunegov/ids_screens
2699556651195c1f9e50c36ae119825cadf63370
[ "MIT" ]
null
null
null
runner.py
alunegov/ids_screens
2699556651195c1f9e50c36ae119825cadf63370
[ "MIT" ]
null
null
null
"""Convenience wrapper for running ids_screens directly from source tree.""" from ids_screens.ids_screens import main if __name__ == '__main__': main()
22.571429
76
0.753165
from ids_screens.ids_screens import main if __name__ == '__main__': main()
true
true
f7f8cb8b29bcf2601a14807eec74793482aae454
479
py
Python
classProject.py
Ayon134/code_for_Kids
d90698bb38efe5e26c31f02bd129bfdadea158e2
[ "MIT" ]
null
null
null
classProject.py
Ayon134/code_for_Kids
d90698bb38efe5e26c31f02bd129bfdadea158e2
[ "MIT" ]
null
null
null
classProject.py
Ayon134/code_for_Kids
d90698bb38efe5e26c31f02bd129bfdadea158e2
[ "MIT" ]
2
2021-01-08T03:52:46.000Z
2021-04-01T19:16:12.000Z
import smtplib, ssl port = 465 smtpServer = 'smtp.gmail.com' sender = 'omarhasan115@gmail.com' receiver = 'zabeer.omar07@gmail.com' password = input('enter your password here') message = """\ Subject: Python Consultation Hour Please Do Active on 7.00 PM Tomorrow, Thank you""" context = ssl.create_default_...
25.210526
67
0.736952
import smtplib, ssl port = 465 smtpServer = 'smtp.gmail.com' sender = 'omarhasan115@gmail.com' receiver = 'zabeer.omar07@gmail.com' password = input('enter your password here') message = """\ Subject: Python Consultation Hour Please Do Active on 7.00 PM Tomorrow, Thank you""" context = ssl.create_default_...
true
true
f7f8cc629f3ef283b80fc6fef301a8d90d6fa82c
20,552
py
Python
mmdet/core/evaluation/class_names.py
ideokas/Skripsi
d5f683d6257d1db79fd00597ad1a6733c0772cfb
[ "Apache-2.0" ]
null
null
null
mmdet/core/evaluation/class_names.py
ideokas/Skripsi
d5f683d6257d1db79fd00597ad1a6733c0772cfb
[ "Apache-2.0" ]
null
null
null
mmdet/core/evaluation/class_names.py
ideokas/Skripsi
d5f683d6257d1db79fd00597ad1a6733c0772cfb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'crazing', 'inclusion', 'patches', 'pitted_surface', 'rolled-in_scale', 'scratches ] def imagenet_det_classes(): return [ 'accordion', 'airplane...
61.903614
79
0.57717
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'crazing', 'inclusion', 'patches', 'pitted_surface', 'rolled-in_scale', 'scratches ] def imagenet_det_classes(): return [ 'accordion', 'airplane', 'ant', 'antelope', 'apple', 'armadillo', ...
false
true
f7f8cc84d8b50b3977a9162b1ea1e2e57c34e908
3,801
py
Python
test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_multiapi_service_client.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_multiapi_service_client.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_multiapi_service_client.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.353659
99
0.717969
from typing import Any, Optional, TYPE_CHECKING from azure.core import AsyncPipelineClient from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential from ._confi...
true
true
f7f8ccb5292deb36f25ccbf362f42f1c7940e74b
2,928
py
Python
examples/run_dien.py
AlexanLee/DeepCTR
1ff32c6b0105e3341ddf34e7074e596032bff158
[ "Apache-2.0" ]
null
null
null
examples/run_dien.py
AlexanLee/DeepCTR
1ff32c6b0105e3341ddf34e7074e596032bff158
[ "Apache-2.0" ]
null
null
null
examples/run_dien.py
AlexanLee/DeepCTR
1ff32c6b0105e3341ddf34e7074e596032bff158
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorflow as tf from deepctr.models import DIEN from deepctr.inputs import SparseFeat, DenseFeat, VarLenSparseFeat, get_feature_names def get_xy_fd(use_neg=False, hash_flag=False): feature_columns = [SparseFeat('user', 3, embedding_dim=10, use_hash=hash_flag), Sp...
47.225806
118
0.613046
import numpy as np import tensorflow as tf from deepctr.models import DIEN from deepctr.inputs import SparseFeat, DenseFeat, VarLenSparseFeat, get_feature_names def get_xy_fd(use_neg=False, hash_flag=False): feature_columns = [SparseFeat('user', 3, embedding_dim=10, use_hash=hash_flag), Sp...
true
true
f7f8ccc7278d89e43fc6896c7da7c83e810a950c
8,847
py
Python
summarizer/model_processors.py
ColdTeapot273K/bert-extractive-summarizer
3301f093534a3a360f496361c697f1b882e05315
[ "MIT" ]
2
2021-01-15T08:38:11.000Z
2021-07-22T06:01:10.000Z
summarizer/model_processors.py
Nikoschenk/bert-extractive-summarizer
19c4b5a5790294bbbc5a26e8248655705710ff14
[ "MIT" ]
null
null
null
summarizer/model_processors.py
Nikoschenk/bert-extractive-summarizer
19c4b5a5790294bbbc5a26e8248655705710ff14
[ "MIT" ]
null
null
null
from summarizer.bert_parent import BertParent from summarizer.cluster_features import ClusterFeatures from summarizer.sentence_handler import SentenceHandler from typing import List from abc import abstractmethod import numpy as np from transformers import * class ModelProcessor(object): def __init__( se...
40.582569
143
0.663502
from summarizer.bert_parent import BertParent from summarizer.cluster_features import ClusterFeatures from summarizer.sentence_handler import SentenceHandler from typing import List from abc import abstractmethod import numpy as np from transformers import * class ModelProcessor(object): def __init__( se...
true
true
f7f8cd0ad60d911caa71b3d94c5c5fdb28dafea6
540
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/EXT/conservative_depth.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/EXT/conservative_depth.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/EXT/conservative_depth.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C ...
33.75
126
0.77963
from OpenGL import platform as _p, arrays from OpenGL.raw.GLES2 import _types as _cs from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GLES2_EXT_conservative_depth' def _f( function ): return _p.createFu...
true
true
f7f8cdbe1b2d15e1b6a3b75394debfe18cb51538
164
py
Python
biggestnumber.py
jaejun1679-cmis/jaejun1679-cmis-cs2
3098c276e7c2bad692ab88682c694efd936ae18f
[ "CC0-1.0" ]
null
null
null
biggestnumber.py
jaejun1679-cmis/jaejun1679-cmis-cs2
3098c276e7c2bad692ab88682c694efd936ae18f
[ "CC0-1.0" ]
null
null
null
biggestnumber.py
jaejun1679-cmis/jaejun1679-cmis-cs2
3098c276e7c2bad692ab88682c694efd936ae18f
[ "CC0-1.0" ]
null
null
null
import time import math def findbignumber(bignumber=0): number = raw_input("Insert a number: ") if number == "": return number else:
16.4
43
0.597561
import time import math def findbignumber(bignumber=0): number = raw_input("Insert a number: ") if number == "": return number else:
false
true
f7f8cea08ee59a4cf933b319d4f8d0ca77fc4635
852
py
Python
setup.py
aino/django-superuser
637abd471219183c6716bd4fadb1bbbf40940032
[ "0BSD" ]
null
null
null
setup.py
aino/django-superuser
637abd471219183c6716bd4fadb1bbbf40940032
[ "0BSD" ]
null
null
null
setup.py
aino/django-superuser
637abd471219183c6716bd4fadb1bbbf40940032
[ "0BSD" ]
null
null
null
from setuptools import setup setup( name='django-superuser', version='0.2.3', description='Middleware that gives you super powers.', long_description=open('README.rst').read(), long_description_content_type='text/markdown', author='Mikko Hellsing', author_email='mikko@sumusm.se', url='...
30.428571
58
0.637324
from setuptools import setup setup( name='django-superuser', version='0.2.3', description='Middleware that gives you super powers.', long_description=open('README.rst').read(), long_description_content_type='text/markdown', author='Mikko Hellsing', author_email='mikko@sumusm.se', url='...
true
true
f7f8cebe1ddccf1c61244432e5bfecf174f95ccf
2,493
py
Python
quotations/views.py
jessamynsmith/socialjusticebingo
91ea2cae4250db7f6023cde04ae4848aec59449c
[ "MIT" ]
null
null
null
quotations/views.py
jessamynsmith/socialjusticebingo
91ea2cae4250db7f6023cde04ae4848aec59449c
[ "MIT" ]
3
2020-06-05T18:41:44.000Z
2021-06-10T20:38:30.000Z
quotations/views.py
jessamynsmith/socialjusticebingo
91ea2cae4250db7f6023cde04ae4848aec59449c
[ "MIT" ]
null
null
null
from django.conf import settings from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.db.models import Q from django.shortcuts import render_to_response, redirect from django.template import RequestContext from rest_framework import viewsets from quotations import models as quotation_mo...
37.772727
90
0.685921
from django.conf import settings from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.db.models import Q from django.shortcuts import render_to_response, redirect from django.template import RequestContext from rest_framework import viewsets from quotations import models as quotation_mo...
true
true
f7f8ceed1b88183aa79f6ab3921f89f7232393e5
1,887
py
Python
scripts/sdk_notify.py
PelionIoT/mbed-cloud-sdk-java
cc99c51db43cc9ae36601f20f20b7d8cd7515432
[ "Apache-2.0" ]
7
2017-12-28T11:19:15.000Z
2020-03-23T19:15:31.000Z
scripts/sdk_notify.py
PelionIoT/mbed-cloud-sdk-java
cc99c51db43cc9ae36601f20f20b7d8cd7515432
[ "Apache-2.0" ]
99
2018-01-09T23:56:13.000Z
2020-11-03T05:20:55.000Z
scripts/sdk_notify.py
PelionIoT/mbed-cloud-sdk-java
cc99c51db43cc9ae36601f20f20b7d8cd7515432
[ "Apache-2.0" ]
5
2018-08-02T06:29:18.000Z
2019-10-23T11:43:59.000Z
#!/usr/bin/python import sdk_common import slackclient # Block in charge of notifying of a new release class ReleaseNotifier(sdk_common.BuildStep): def __init__(self, logger=None): super(ReleaseNotifier, self).__init__('Release notification', logger) self.token = self.common_config.get_config().ge...
44.928571
149
0.619502
import sdk_common import slackclient class ReleaseNotifier(sdk_common.BuildStep): def __init__(self, logger=None): super(ReleaseNotifier, self).__init__('Release notification', logger) self.token = self.common_config.get_config().get_slack_token() self.channel = self.common_config.get_co...
true
true
f7f8cf3814442b23f4bf05fe9e24a0a981ce4c84
256
py
Python
halolib/const.py
yoramk2/halolib
c05bc9f9c37d09700c5a42dcd3b9a74c0c5c0c29
[ "MIT" ]
2
2020-07-22T13:28:47.000Z
2021-02-08T04:38:06.000Z
halolib/const.py
yoramk2/halolib
c05bc9f9c37d09700c5a42dcd3b9a74c0c5c0c29
[ "MIT" ]
2
2021-06-10T20:59:03.000Z
2021-11-15T17:47:59.000Z
halolib/const.py
yoramk2/halolib
c05bc9f9c37d09700c5a42dcd3b9a74c0c5c0c29
[ "MIT" ]
1
2021-02-08T04:38:09.000Z
2021-02-08T04:38:09.000Z
from __future__ import print_function import logging from enum import Enum logger = logging.getLogger(__name__) class HTTPChoice(Enum): # A subclass of Enum get = "GET" post = "POST" put = "PUT" delete = "DELETE" patch = "PATCH"
15.058824
45
0.667969
from __future__ import print_function import logging from enum import Enum logger = logging.getLogger(__name__) class HTTPChoice(Enum): get = "GET" post = "POST" put = "PUT" delete = "DELETE" patch = "PATCH"
true
true
f7f8cf6586efe758b96d1abc920ca344d5a5763c
11,633
py
Python
onmt/utils/loss.py
sajastu/abs-summarization
9d4b35b457cfd617965ed1fab68c173c98333439
[ "MIT" ]
27
2019-06-11T07:43:13.000Z
2021-12-03T02:34:35.000Z
onmt/utils/loss.py
sajastu/abs-summarization
9d4b35b457cfd617965ed1fab68c173c98333439
[ "MIT" ]
29
2019-07-18T10:21:57.000Z
2019-10-24T11:41:59.000Z
onmt/utils/loss.py
sajastu/abs-summarization
9d4b35b457cfd617965ed1fab68c173c98333439
[ "MIT" ]
11
2019-06-11T07:43:14.000Z
2021-01-03T04:34:18.000Z
""" This includes: LossComputeBase and the standard NMTLossCompute, and sharded loss compute stuff. """ from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F import onmt from onmt.modules.sparse_losses import SparsemaxLoss from onmt.modules.sparse_activations...
38.140984
79
0.641881
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F import onmt from onmt.modules.sparse_losses import SparsemaxLoss from onmt.modules.sparse_activations import LogSparsemax def build_loss_compute(model, tgt_field, opt, train=True): device = torch.device("cuda" if o...
true
true
f7f8d01a0f30ac350a68d924814a77fb331d4563
24,698
py
Python
src/unity/python/turicreate/util/__init__.py
TimothyRHuertas/turicreate
afa00bee56d168190c6f122e14c9fbc6656b4e97
[ "BSD-3-Clause" ]
1
2018-02-10T12:05:13.000Z
2018-02-10T12:05:13.000Z
src/unity/python/turicreate/util/__init__.py
TimothyRHuertas/turicreate
afa00bee56d168190c6f122e14c9fbc6656b4e97
[ "BSD-3-Clause" ]
null
null
null
src/unity/python/turicreate/util/__init__.py
TimothyRHuertas/turicreate
afa00bee56d168190c6f122e14c9fbc6656b4e97
[ "BSD-3-Clause" ]
1
2020-10-21T17:46:28.000Z
2020-10-21T17:46:28.000Z
# -*- coding: utf-8 -*- # Copyright © 2017 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
33.786594
181
0.619686
from __future__ import print_function as _ from __future__ import division as _ from __future__ import absolute_import as _ import logging import logging.config import time as _time import tempfile as _tempfile import os as _os import urllib as _urllib import re as _re from zipfile import ZipFile as _ZipFile imp...
true
true
f7f8d06153f4836710ae26ae715a70bb03f0916c
12,056
py
Python
utils.py
Fred62879/ACORN
2de0bf747d595dbdc4d67311fb8f46cf47f9b4cb
[ "MIT" ]
null
null
null
utils.py
Fred62879/ACORN
2de0bf747d595dbdc4d67311fb8f46cf47f9b4cb
[ "MIT" ]
null
null
null
utils.py
Fred62879/ACORN
2de0bf747d595dbdc4d67311fb8f46cf47f9b4cb
[ "MIT" ]
null
null
null
import os import torch import numpy as np import skimage.measure import matplotlib.pyplot as plt from tqdm import tqdm from astropy.io import fits from astropy.wcs import WCS from astropy.nddata import Cutout2D from torchvision.utils import make_grid def cond_mkdir(path): if not os.path.exists(path): os....
35.98806
125
0.626576
import os import torch import numpy as np import skimage.measure import matplotlib.pyplot as plt from tqdm import tqdm from astropy.io import fits from astropy.wcs import WCS from astropy.nddata import Cutout2D from torchvision.utils import make_grid def cond_mkdir(path): if not os.path.exists(path): os....
true
true
f7f8d3a44d63bdc4f8af5771ff42b779f07acb06
9,499
py
Python
infobip_api_client/model/tfa_message.py
DavadDi/infobip-api-python-client
2268b154b5462d90773fd47f9813f88c0c7d56e2
[ "MIT" ]
23
2015-07-24T14:13:12.000Z
2022-03-24T19:36:54.000Z
infobip_api_client/model/tfa_message.py
DavadDi/infobip-api-python-client
2268b154b5462d90773fd47f9813f88c0c7d56e2
[ "MIT" ]
9
2017-01-22T14:07:22.000Z
2021-10-04T10:54:08.000Z
infobip_api_client/model/tfa_message.py
DavadDi/infobip-api-python-client
2268b154b5462d90773fd47f9813f88c0c7d56e2
[ "MIT" ]
36
2015-07-24T14:40:22.000Z
2022-03-15T18:33:01.000Z
""" Infobip Client API Libraries OpenAPI Specification OpenAPI specification containing public endpoints supported in client API libraries. # noqa: E501 The version of the OpenAPI document: 1.0.172 Contact: support@infobip.com Generated by: https://openapi-generator.tech """ import re # noqa: ...
45.888889
241
0.600905
import re import sys from infobip_api_client.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, )...
true
true
f7f8d3b469cb3c4fabc761ca5ca0ac50691d06a6
10,902
py
Python
old_projects/brachistochrone/graveyard.py
dezren39/manim
80d7742446c588dc296bd3afb3465a63b63383db
[ "MIT" ]
1
2020-07-05T12:56:31.000Z
2020-07-05T12:56:31.000Z
old_projects/brachistochrone/graveyard.py
elphasminyato/manim
8488b621ef3367e6a911354d2765684321fed20e
[ "MIT" ]
3
2021-09-08T02:19:38.000Z
2022-03-12T00:41:00.000Z
old_projects/brachistochrone/graveyard.py
dezren39/manim
80d7742446c588dc296bd3afb3465a63b63383db
[ "MIT" ]
1
2020-07-05T12:56:33.000Z
2020-07-05T12:56:33.000Z
import numpy as np import itertools as it from big_ol_pile_of_manim_imports import * from old_projects.brachistochrone.curves import Cycloid class MultilayeredGlass(PhotonScene, ZoomedScene): CONFIG = { "num_discrete_layers" : 5, "num_variables" : 3, "top_color" : BLUE_E, "bottom_...
33.441718
83
0.52495
import numpy as np import itertools as it from big_ol_pile_of_manim_imports import * from old_projects.brachistochrone.curves import Cycloid class MultilayeredGlass(PhotonScene, ZoomedScene): CONFIG = { "num_discrete_layers" : 5, "num_variables" : 3, "top_color" : BLUE_E, "bottom_...
false
true
f7f8d4a4578b4d6e0ef086afe1aaa973893c6861
4,388
py
Python
models/transformer_fine_tune/kbert_model.py
ktodorov/eval-historical-texts
e2994d594525d1d92056a6398935376a96659abb
[ "MIT" ]
9
2020-08-27T15:03:46.000Z
2022-01-02T10:48:35.000Z
models/transformer_fine_tune/kbert_model.py
ktodorov/eval-historical-texts
e2994d594525d1d92056a6398935376a96659abb
[ "MIT" ]
16
2020-09-12T17:37:59.000Z
2020-11-18T10:36:32.000Z
models/transformer_fine_tune/kbert_model.py
ktodorov/eval-historical-texts
e2994d594525d1d92056a6398935376a96659abb
[ "MIT" ]
1
2022-03-08T16:16:52.000Z
2022-03-08T16:16:52.000Z
import os from typing import Callable from overrides import overrides from transformers import BertForMaskedLM, BertPreTrainedModel, BertConfig from entities.model_checkpoint import ModelCheckpoint from entities.metric import Metric from models.model_base import ModelBase from services.arguments.semantic_arguments_...
33.242424
112
0.682088
import os from typing import Callable from overrides import overrides from transformers import BertForMaskedLM, BertPreTrainedModel, BertConfig from entities.model_checkpoint import ModelCheckpoint from entities.metric import Metric from models.model_base import ModelBase from services.arguments.semantic_arguments_...
true
true
f7f8d53ff94d325fea3cbf1ba33884d9a79bcf0c
851
py
Python
LOOCV.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
2
2020-03-28T11:50:45.000Z
2020-12-08T13:36:26.000Z
LOOCV.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
2
2020-04-20T11:12:59.000Z
2020-05-11T05:37:36.000Z
LOOCV.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
null
null
null
from IProcess import IProcess, EDataType from ImageData import PipelineManager #from euclideanDistance import euclideanDistance #from kNearestNeighbour import kNearestNeighbour class LOOCV(IProcess): def __init__(self): IProcess.__init__(self) pass def toId(self): return self.getTypeAsString() def getTyp...
21.275
82
0.726204
from IProcess import IProcess, EDataType from ImageData import PipelineManager class LOOCV(IProcess): def __init__(self): IProcess.__init__(self) pass def toId(self): return self.getTypeAsString() def getType(self): return EDataType.LOOCV def do(self, imageData): IProcess.do(self, imageDat...
true
true
f7f8d5b54a4ba04256f723af36d9fa49bcca3984
779
py
Python
issues/20160522 #20 constraints/vertex-debug.py
jpsantos-mf/ezdxf
2b542a551b2cfc3c0920a5dbf302ff58cea90fbd
[ "MIT" ]
1
2021-06-05T09:15:15.000Z
2021-06-05T09:15:15.000Z
issues/20160522 #20 constraints/vertex-debug.py
jpsantos-mf/ezdxf
2b542a551b2cfc3c0920a5dbf302ff58cea90fbd
[ "MIT" ]
null
null
null
issues/20160522 #20 constraints/vertex-debug.py
jpsantos-mf/ezdxf
2b542a551b2cfc3c0920a5dbf302ff58cea90fbd
[ "MIT" ]
null
null
null
import ezdxf import sys def main(): print 'Python version is: '+(sys.version) print 'ezdxf version is: ' + ezdxf.__version__ print '\nCoordinate for layer 0' find_coordinates(filename='test.dxf',layer_name='0') print '\nCoordinate for layer 1' find_coordinates(filename='test.dxf',layer_name='Layer 1') ...
21.638889
81
0.712452
import ezdxf import sys def main(): print 'Python version is: '+(sys.version) print 'ezdxf version is: ' + ezdxf.__version__ print '\nCoordinate for layer 0' find_coordinates(filename='test.dxf',layer_name='0') print '\nCoordinate for layer 1' find_coordinates(filename='test.dxf',layer_name='Layer 1') ...
false
true
f7f8d60c9eff13bbebc60cccf2f48e503e89357c
2,570
py
Python
discordbot.py
RyoYukkuri/discordpy-startup
d59d6a4b93663699fd3d5e68c16c441379140d1f
[ "MIT" ]
null
null
null
discordbot.py
RyoYukkuri/discordpy-startup
d59d6a4b93663699fd3d5e68c16c441379140d1f
[ "MIT" ]
null
null
null
discordbot.py
RyoYukkuri/discordpy-startup
d59d6a4b93663699fd3d5e68c16c441379140d1f
[ "MIT" ]
null
null
null
import discord from googletrans import Translator TOKEN = os.environ['DISCORD_BOT_TOKEN'] client = discord.Client() translator = Translator() @client.event async def on_ready(): print('==============================') print('ログインしました・。・v') print('ユーザー名: ' + client.user.name) print(client...
40.15625
95
0.563035
import discord from googletrans import Translator TOKEN = os.environ['DISCORD_BOT_TOKEN'] client = discord.Client() translator = Translator() @client.event async def on_ready(): print('==============================') print('ログインしました・。・v') print('ユーザー名: ' + client.user.name) print(client...
true
true
f7f8d67589fc3d0bad8b49b75a05f4c2011463fe
7,744
py
Python
tests/components/sonos/conftest.py
emes30/core
489d85d862789523788bcc539a2701400052ae26
[ "Apache-2.0" ]
2
2021-07-30T19:15:52.000Z
2021-07-30T19:16:00.000Z
tests/components/sonos/conftest.py
emes30/core
489d85d862789523788bcc539a2701400052ae26
[ "Apache-2.0" ]
74
2020-08-05T07:20:27.000Z
2022-03-23T12:47:28.000Z
tests/components/sonos/conftest.py
marecabo/home-assistant
e33774a61e7fcc88aff752dfa4618dd26a746872
[ "Apache-2.0" ]
1
2021-07-30T19:16:02.000Z
2021-07-30T19:16:02.000Z
"""Configuration for Sonos tests.""" from unittest.mock import AsyncMock, MagicMock, Mock, patch as patch import pytest from homeassistant.components import ssdp from homeassistant.components.media_player import DOMAIN as MP_DOMAIN from homeassistant.components.sonos import DOMAIN from homeassistant.const import CONF...
34.571429
125
0.668259
from unittest.mock import AsyncMock, MagicMock, Mock, patch as patch import pytest from homeassistant.components import ssdp from homeassistant.components.media_player import DOMAIN as MP_DOMAIN from homeassistant.components.sonos import DOMAIN from homeassistant.const import CONF_HOSTS from tests.common import Mock...
true
true