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
f7feed2d0e6bbc22ca226fdfeec3d9cd4d713703
1,076
py
Python
auth/token_box.py
ivmfnal/dm_common
0f390d3da1c52191b017a5493bee47b0335eb6bd
[ "BSD-3-Clause" ]
1
2022-03-18T19:01:29.000Z
2022-03-18T19:01:29.000Z
auth/token_box.py
ivmfnal/dm_common
0f390d3da1c52191b017a5493bee47b0335eb6bd
[ "BSD-3-Clause" ]
null
null
null
auth/token_box.py
ivmfnal/dm_common
0f390d3da1c52191b017a5493bee47b0335eb6bd
[ "BSD-3-Clause" ]
null
null
null
class TokenBox(object): def __init__(self, url, username, password, margin = 10, request_now = False): self.URL = url self.Username = username self.Password = password self.Token = None self.Expiration = 0 self.Encoded = None self.Margin = margin if re...
32.606061
89
0.555762
class TokenBox(object): def __init__(self, url, username, password, margin = 10, request_now = False): self.URL = url self.Username = username self.Password = password self.Token = None self.Expiration = 0 self.Encoded = None self.Margin = margin if re...
true
true
f7feedc493f997aa5760f4fb539749318c3bf7da
1,760
py
Python
thumbor/app.py
ravisaini1990S/thumbor
8312a1e384edd9cb999bc52c8477d926a72f9869
[ "MIT" ]
6
2015-01-27T05:36:22.000Z
2019-12-04T05:19:34.000Z
thumbor/app.py
ravisaini1990S/thumbor
8312a1e384edd9cb999bc52c8477d926a72f9869
[ "MIT" ]
null
null
null
thumbor/app.py
ravisaini1990S/thumbor
8312a1e384edd9cb999bc52c8477d926a72f9869
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com import tornado.web import tornado.ioloop from thumbor.handlers.black...
32
86
0.6625
import tornado.web import tornado.ioloop from thumbor.handlers.blacklist import BlacklistHandler from thumbor.handlers.healthcheck import HealthcheckHandler from thumbor.handlers.upload import ImageUploadHandler from thumbor.handlers.image_resource import ImageResourceHandler from thumbor.url import Url from ...
true
true
f7feedfae7ecf52dc44632d9e9328da672bc44fe
3,187
py
Python
learn/tests/tests_services/tests_answer.py
Aigrefin/py3learn
8104315689caff2523bda3b4ad70a807f4a43fa7
[ "MIT" ]
null
null
null
learn/tests/tests_services/tests_answer.py
Aigrefin/py3learn
8104315689caff2523bda3b4ad70a807f4a43fa7
[ "MIT" ]
1
2021-06-10T19:05:49.000Z
2021-06-10T19:05:49.000Z
learn/tests/tests_services/tests_answer.py
Aigrefin/py3learn
8104315689caff2523bda3b4ad70a807f4a43fa7
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest.mock import MagicMock, patch from django.contrib.auth.models import User from django.utils import timezone from learn.infrastructure.database import Database from learn.models import Translation, RythmNotation from learn.services.answer import Answer class AnswerTests(Tes...
37.940476
100
0.72733
from unittest import TestCase from unittest.mock import MagicMock, patch from django.contrib.auth.models import User from django.utils import timezone from learn.infrastructure.database import Database from learn.models import Translation, RythmNotation from learn.services.answer import Answer class AnswerTests(Tes...
true
true
f7feef1001806af6273753ae5efc274125de6d6f
9,018
py
Python
data/GAScore_latency.py
sharm294/shoal
db7dd08a70882585fb9740a39b57b4b7a48b3081
[ "MIT" ]
1
2021-04-12T06:41:33.000Z
2021-04-12T06:41:33.000Z
data/GAScore_latency.py
UofT-HPRC/shoal
db7dd08a70882585fb9740a39b57b4b7a48b3081
[ "MIT" ]
null
null
null
data/GAScore_latency.py
UofT-HPRC/shoal
db7dd08a70882585fb9740a39b57b4b7a48b3081
[ "MIT" ]
null
null
null
import os # This script parses the output from Vivado to compute latency numbers for the # GAScore. vivado_output_file = "GAScore_latency.txt" search_string = "STAT_" units = 'us' clock_period = 0.02 # clock_align = 0.01 # signal transitions from sonar occur on negedges table_template = "| {label:38} | {init:11} | {...
45.316583
143
0.681748
import os vivado_output_file = "GAScore_latency.txt" search_string = "STAT_" units = 'us' clock_period = 0.02 ount:6} | {extra:38} |" def start_trans(first_beat): return round(first_beat - clock_period, 3) def cycle_count(base, delta, scaling=1): cycles = round(round(delta - base, 3) / clock_period, 3) ...
true
true
f7feefc2e6409d729d7f47aec8f699ae8879d5a6
163
py
Python
mozumder/template/__init__.py
mozumder/django-mozumder
887ce303249eac2d77de062fd57023dbc4b782dd
[ "MIT" ]
1
2020-06-13T06:12:16.000Z
2020-06-13T06:12:16.000Z
mozumder/template/__init__.py
mozumder/django-mozumder
887ce303249eac2d77de062fd57023dbc4b782dd
[ "MIT" ]
4
2020-06-18T03:53:29.000Z
2021-06-09T17:56:12.000Z
mozumder/template/__init__.py
mozumder/django-mozumder
887ce303249eac2d77de062fd57023dbc4b782dd
[ "MIT" ]
null
null
null
from .components import * from .template import MozumderTemplate, Block from .default import MozumderHTMLMessageTemplate from .errors import MozumderErrorTemplate
32.6
48
0.858896
from .components import * from .template import MozumderTemplate, Block from .default import MozumderHTMLMessageTemplate from .errors import MozumderErrorTemplate
true
true
f7fef1c85ca7f9bf5ff712c32f46593eb5b8ca11
429
py
Python
nba-stats/str_to_second.py
fndomariano/data-studies
726ded420ca22eb9a7526ef43bf01506fbf47519
[ "MIT" ]
null
null
null
nba-stats/str_to_second.py
fndomariano/data-studies
726ded420ca22eb9a7526ef43bf01506fbf47519
[ "MIT" ]
null
null
null
nba-stats/str_to_second.py
fndomariano/data-studies
726ded420ca22eb9a7526ef43bf01506fbf47519
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def str_to_second(time): if isinstance(time, int) or isinstance(time, float): return time * 60 time = time.split(':') if (len(time) == 3): hours = int(time[0]) * 3600 minutes = int(time[1]) * 60 seconds = int(time[2]) return (hours + minutes + seconds) if (len(time) == 2): ...
20.428571
53
0.599068
def str_to_second(time): if isinstance(time, int) or isinstance(time, float): return time * 60 time = time.split(':') if (len(time) == 3): hours = int(time[0]) * 3600 minutes = int(time[1]) * 60 seconds = int(time[2]) return (hours + minutes + seconds) if (len(time) == 2): minutes = int(time[0]) ...
true
true
f7fef1ed64208e4f7bf8401a5c23a4a3069d0873
3,520
py
Python
setup.py
jbarlow-mcafee/opendxl-thehive-service-python
371a1fd3d4731e654d4a100069ed8d56c4044624
[ "Apache-2.0" ]
null
null
null
setup.py
jbarlow-mcafee/opendxl-thehive-service-python
371a1fd3d4731e654d4a100069ed8d56c4044624
[ "Apache-2.0" ]
null
null
null
setup.py
jbarlow-mcafee/opendxl-thehive-service-python
371a1fd3d4731e654d4a100069ed8d56c4044624
[ "Apache-2.0" ]
null
null
null
# pylint: disable=no-member, no-name-in-module, import-error from __future__ import absolute_import import glob import os import distutils.command.sdist import distutils.log import subprocess from setuptools import Command, setup import setuptools.command.sdist # Patch setuptools' sdist behaviour with distutils' sdis...
27.076923
77
0.621875
from __future__ import absolute_import import glob import os import distutils.command.sdist import distutils.log import subprocess from setuptools import Command, setup import setuptools.command.sdist setuptools.command.sdist.sdist.run = distutils.command.sdist.sdist.run VERSION_INFO = {} CWD = os.path.abspath(os....
true
true
f7fef337b283f919d64c8d148223da3698cdcaca
4,028
py
Python
core/tests/gae_suite.py
tjinjoy/oppia
ed5ccbd95e42078457d40dde1dda02f1ae6a4354
[ "Apache-2.0" ]
2
2019-03-31T07:03:32.000Z
2019-04-24T18:12:53.000Z
core/tests/gae_suite.py
tjinjoy/oppia
ed5ccbd95e42078457d40dde1dda02f1ae6a4354
[ "Apache-2.0" ]
3
2019-08-01T18:38:54.000Z
2019-08-12T03:02:59.000Z
core/tests/gae_suite.py
tjinjoy/oppia
ed5ccbd95e42078457d40dde1dda02f1ae6a4354
[ "Apache-2.0" ]
1
2020-03-15T14:29:55.000Z
2020-03-15T14:29:55.000Z
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
35.964286
79
0.69712
from __future__ import absolute_import from __future__ import unicode_literals import argparse import os import sys import unittest CURR_DIR = os.path.abspath(os.getcwd()) OPPIA_TOOLS_DIR = os.path.join(CURR_DIR, '..', 'oppia_tools') THIRD_PARTY_DIR = os.path.join(CURR_DIR, 'third_party') DIRS_TO_...
true
true
f7fef3b275b60c6bd9a041b4632d6f8bd6cea8b8
5,297
py
Python
pyscience/algebra/variable.py
m-alzam/pyscience
63452dd6dc662928613cd45c19b911d48866fabe
[ "MIT" ]
null
null
null
pyscience/algebra/variable.py
m-alzam/pyscience
63452dd6dc662928613cd45c19b911d48866fabe
[ "MIT" ]
null
null
null
pyscience/algebra/variable.py
m-alzam/pyscience
63452dd6dc662928613cd45c19b911d48866fabe
[ "MIT" ]
null
null
null
""" pyscience - python science programming Copyright (c) 2019 Manuel Alcaraz Zambrano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
37.041958
99
0.650179
from pyscience import algebra from pyscience.math import Fraction class Variable: def __init__(self, name='x'): self.name = name def evaluate(self, **kwargs): items = kwargs.keys() if self.name in list(items): return kwargs.get(self.name) return Variable(name=s...
true
true
f7fef4eb25bd85db81b2be7750171bf10fc591df
21,259
py
Python
ashpy/losses/gan.py
EmanueleGhelfi/ashpy
6156b97c636c5b568c5a57c23b77d9ae28421bba
[ "Apache-2.0" ]
null
null
null
ashpy/losses/gan.py
EmanueleGhelfi/ashpy
6156b97c636c5b568c5a57c23b77d9ae28421bba
[ "Apache-2.0" ]
2
2019-07-16T08:20:27.000Z
2019-07-16T11:10:45.000Z
ashpy/losses/gan.py
EmanueleGhelfi/ashpy
6156b97c636c5b568c5a57c23b77d9ae28421bba
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Zuru Tech HK Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
34.06891
207
0.621901
from abc import ABC from enum import Enum from typing import List, Union, Type import tensorflow as tf from ashpy.contexts import GANContext from ashpy.losses.executor import Executor, SumExecutor class AdversarialLossType(Enum): GAN = 0 LSGAN = 1 class GANExecutor(Executor, ABC): ...
true
true
f7fef51f7252ab620407c3abc4b1662f432c9847
2,233
py
Python
app.py
mylovesnsd1998/detectf
1f79f253c830693d39731a5b11f3a431061c6934
[ "Apache-2.0" ]
null
null
null
app.py
mylovesnsd1998/detectf
1f79f253c830693d39731a5b11f3a431061c6934
[ "Apache-2.0" ]
null
null
null
app.py
mylovesnsd1998/detectf
1f79f253c830693d39731a5b11f3a431061c6934
[ "Apache-2.0" ]
null
null
null
from flask import json import base64 from flask import request, send_from_directory from label_image import callapi from flask import Flask, redirect, url_for from flask import jsonify from flask_cors import CORS, cross_origin from flask import send_file import os # db.create_all() # enable to create db app = Flask(__...
29
84
0.628751
from flask import json import base64 from flask import request, send_from_directory from label_image import callapi from flask import Flask, redirect, url_for from flask import jsonify from flask_cors import CORS, cross_origin from flask import send_file import os ) cors = CORS(app) app.config['CORS_HEADERS'] = 'Conten...
true
true
f7fef66186a218d8ae0c5e5b93d3557b4153a76f
4,423
py
Python
projecteuler/projectEuler91_rightTriangleCount.py
qingfengxia/python-projecteuler
a2cba042fe7256364f6a5fa55df805a87da9a301
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
projecteuler/projectEuler91_rightTriangleCount.py
qingfengxia/python-projecteuler
a2cba042fe7256364f6a5fa55df805a87da9a301
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
projecteuler/projectEuler91_rightTriangleCount.py
qingfengxia/python-projecteuler
a2cba042fe7256364f6a5fa55df805a87da9a301
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals, absolute_import, division #!/usr/bin/python """ problem 91 weblink:http://projecteuler.net/problem=91 description: see webpage Analysis: method 1: one point must be (0,0) recursive RC(1)=3 symmetric, X-axis, Y...
33.763359
111
0.563645
from __future__ import print_function, unicode_literals, absolute_import, division from projecteulerhelper import * def isRightTriangle(x,y): e2l=sorted([x[1]*x[1]+x[0]*x[0], y[1]*y[1]+y[0]*y[0], (y[1]-x[1])**2+(y[0]-x[0])**2 ]) if min(e2l)==0: return False if e2l[...
true
true
f7fef8065ec691004563e60844761af2644d5fb0
4,089
py
Python
cim/database/db_delete_queries.py
ali-jal/cimdb-1
be8e13ffb83667f44672c11f1d0d81dfd7d405f5
[ "MIT" ]
1
2021-09-03T13:49:40.000Z
2021-09-03T13:49:40.000Z
cim/database/db_delete_queries.py
ali-jal/cimdb-1
be8e13ffb83667f44672c11f1d0d81dfd7d405f5
[ "MIT" ]
20
2021-02-02T02:00:36.000Z
2022-03-20T11:34:29.000Z
cim/database/db_delete_queries.py
ali-jal/cimdb-1
be8e13ffb83667f44672c11f1d0d81dfd7d405f5
[ "MIT" ]
4
2021-02-02T02:24:52.000Z
2021-02-09T06:45:49.000Z
# filename: db_delete_queries # description: provides DELETE database queries to delete selected data from each of the entity tables # connect to database import cim.database.db_connector as db # Create a connection to the database db_connection = db.connect_to_database() def delete(delete_query_to_run): """ Sinc...
35.25
122
0.802886
import cim.database.db_connector as db db_connection = db.connect_to_database() def delete(delete_query_to_run): try: db_connection = db.connect_to_database() cursor = db.execute_query(db_connection=db_connection, query=delete_query_to_run) return True except Exception as e: print(f'An error o...
true
true
f7fefa2e280bb4991f935c491a9ed8f9d3056831
293
py
Python
kattis/Stand on Zanzibar.py
jaredliw/python-question-bank
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2021-04-08T07:49:15.000Z
2021-04-08T07:49:15.000Z
kattis/Stand on Zanzibar.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
null
null
null
kattis/Stand on Zanzibar.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2022-01-23T02:12:24.000Z
2022-01-23T02:12:24.000Z
# CPU: 0.05 s for _ in range(int(input())): population = list(map(int, input().split())) import_ = 0 for idx in range(1, len(population) - 1): if population[idx] > population[idx - 1] * 2: import_ += population[idx] - population[idx - 1] * 2 print(import_)
32.555556
64
0.576792
for _ in range(int(input())): population = list(map(int, input().split())) import_ = 0 for idx in range(1, len(population) - 1): if population[idx] > population[idx - 1] * 2: import_ += population[idx] - population[idx - 1] * 2 print(import_)
true
true
f7fefae90a28df8205be8de97c55f1c9e04c2c35
772
py
Python
Week3/get_most_probable_motif.py
arvinddoraiswamy/mybioinfo
e964fa20f1bdea06d2ef26f6ea8ad57847985929
[ "MIT" ]
null
null
null
Week3/get_most_probable_motif.py
arvinddoraiswamy/mybioinfo
e964fa20f1bdea06d2ef26f6ea8ad57847985929
[ "MIT" ]
null
null
null
Week3/get_most_probable_motif.py
arvinddoraiswamy/mybioinfo
e964fa20f1bdea06d2ef26f6ea8ad57847985929
[ "MIT" ]
null
null
null
import sys import os #Adding directory to the path where Python searches for modules module_folder = os.path.dirname('/opt/Courses/TechCourses/Bioinformatics/code/') sys.path.insert(0, module_folder) #Importing genemanipulating module. This has a lot of common functions. import genemanip if __name__ == "__main__": ...
33.565217
80
0.680052
import sys import os module_folder = os.path.dirname('/opt/Courses/TechCourses/Bioinformatics/code/') sys.path.insert(0, module_folder) import genemanip if __name__ == "__main__": import sys lines = sys.stdin.read().splitlines() Text = lines[0] k = int(lines[1]) A = [float(c) for c in lines[2]....
false
true
f7fefb3e5b767e25373665058d4fd6a298fb3d60
5,041
py
Python
python/paddle/fluid/__init__.py
ZongwuYang/Paddle
6224e61fd94e6ad87f18c2808a76256b516fa3f3
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/__init__.py
ZongwuYang/Paddle
6224e61fd94e6ad87f18c2808a76256b516fa3f3
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/__init__.py
ZongwuYang/Paddle
6224e61fd94e6ad87f18c2808a76256b516fa3f3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
32.522581
88
0.694703
from __future__ import print_function import os from . import framework from .framework import * from . import executor from .executor import * from . import trainer from . import inferencer from . import io from . import evaluator from . import initializer from . import layers from . import contrib fr...
true
true
f7fefc80986df70cc91eb40096762f055d5f1afe
2,058
py
Python
problems/leetcode/lt-3.py
neerajp99/algorithms
1d6885d2a895821ac511fa8a46913d34db2511ca
[ "MIT" ]
1
2021-06-17T07:59:42.000Z
2021-06-17T07:59:42.000Z
problems/leetcode/lt-3.py
neerajp99/algorithms
1d6885d2a895821ac511fa8a46913d34db2511ca
[ "MIT" ]
null
null
null
problems/leetcode/lt-3.py
neerajp99/algorithms
1d6885d2a895821ac511fa8a46913d34db2511ca
[ "MIT" ]
1
2022-01-13T08:42:31.000Z
2022-01-13T08:42:31.000Z
# 3. Longest Substring Without Repeating Characters """ Given a string s, find the length of the longest substring without repeating characters. """ class Solution: # Solution 1 (Hashmap) def lengthOfLongestSubstring(self, s: str) -> int: # Initialise empty hasmap check_dict = dict() # ...
40.352941
114
0.590379
class Solution: def lengthOfLongestSubstring(self, s: str) -> int: check_dict = dict() max_value = 0 max_check = -1 if len(s) < 2: return len(s) for i in range(len(s)): if s[i] i...
true
true
f7fefc8ff48ab859635a15ee92ed550e6ffd38c7
2,769
py
Python
han/vocabulary.py
nryotaro/han
ed78f6772f4bf6923d9a3f52dbcc8a55e757631b
[ "MIT" ]
null
null
null
han/vocabulary.py
nryotaro/han
ed78f6772f4bf6923d9a3f52dbcc8a55e757631b
[ "MIT" ]
null
null
null
han/vocabulary.py
nryotaro/han
ed78f6772f4bf6923d9a3f52dbcc8a55e757631b
[ "MIT" ]
null
null
null
"""Word embedding.""" import typing as t import torchtext.vocab as v import torch def build_vocabulary( sentences: t.Iterator[t.Iterator[str]], pad_symbol: str = "<pad>", unknown_symbol: str = "<unk>", ) -> v.Vocab: """Build vocabulary. Each element of `sentences` is a list of words. The vocabul...
26.122642
73
0.625135
import typing as t import torchtext.vocab as v import torch def build_vocabulary( sentences: t.Iterator[t.Iterator[str]], pad_symbol: str = "<pad>", unknown_symbol: str = "<unk>", ) -> v.Vocab: vocab: v.Vocab = v.build_vocab_from_iterator( (sentence for sentence in sentences), special_...
true
true
f7fefd0259b96892cf85d5ed37c1c06c7d5285fe
172
py
Python
samcli/commands/local/lib/exceptions.py
langn/aws-sam-cli
160d87ff3c07f092315e1ac71ddc00257fde011b
[ "Apache-2.0" ]
3
2018-11-29T12:57:56.000Z
2021-02-24T11:58:58.000Z
samcli/commands/local/lib/exceptions.py
langn/aws-sam-cli
160d87ff3c07f092315e1ac71ddc00257fde011b
[ "Apache-2.0" ]
1
2018-05-23T19:51:18.000Z
2018-05-23T19:51:18.000Z
samcli/commands/local/lib/exceptions.py
langn/aws-sam-cli
160d87ff3c07f092315e1ac71ddc00257fde011b
[ "Apache-2.0" ]
2
2018-09-03T11:54:16.000Z
2021-02-05T03:32:17.000Z
""" Custom exceptions raised by this local library """ class NoApisDefined(Exception): """ Raised when there are no APIs defined in the template """ pass
15.636364
57
0.668605
class NoApisDefined(Exception): pass
true
true
f7fefecf35025fdf3c21ce31e70c5aa72d32c5d5
3,385
py
Python
origin/origin_channels.py
deathbybandaid/fHDHR_Ceton
6d7224be0f97e25844afd8933bdb00893f48e88b
[ "WTFPL" ]
null
null
null
origin/origin_channels.py
deathbybandaid/fHDHR_Ceton
6d7224be0f97e25844afd8933bdb00893f48e88b
[ "WTFPL" ]
null
null
null
origin/origin_channels.py
deathbybandaid/fHDHR_Ceton
6d7224be0f97e25844afd8933bdb00893f48e88b
[ "WTFPL" ]
null
null
null
import xmltodict import base64 import re import threading class OriginChannels(): def __init__(self, fhdhr, origin): self.fhdhr = fhdhr self.origin = origin def get_channels(self): cleaned_channels = [] url_headers = {'accept': 'application/xml;q=0.9, */*;q=0.8'} cou...
36.793478
125
0.550369
import xmltodict import base64 import re import threading class OriginChannels(): def __init__(self, fhdhr, origin): self.fhdhr = fhdhr self.origin = origin def get_channels(self): cleaned_channels = [] url_headers = {'accept': 'application/xml;q=0.9, */*;q=0.8'} cou...
true
true
f7fefee9eff9373e9e99a507d49cc43a2b14c7fa
237
py
Python
src/poetry_hooks/__version__.py
jvrana/poetry-hooks
a3f967ea4353c5466516b33a9c4576762f47350f
[ "MIT" ]
null
null
null
src/poetry_hooks/__version__.py
jvrana/poetry-hooks
a3f967ea4353c5466516b33a9c4576762f47350f
[ "MIT" ]
null
null
null
src/poetry_hooks/__version__.py
jvrana/poetry-hooks
a3f967ea4353c5466516b33a9c4576762f47350f
[ "MIT" ]
null
null
null
# __version__.py # autogenerated by keats 0.2.28 __version__ = "0.4.2" __name__ = "poetry-hooks" __title__ = "poetry-hooks" __authors__ = ['Justin Vrana <justin.vrana@gmail.com>'] __repo__ = None __homepage__ = None __description__ = ""
23.7
55
0.734177
__version__ = "0.4.2" __name__ = "poetry-hooks" __title__ = "poetry-hooks" __authors__ = ['Justin Vrana <justin.vrana@gmail.com>'] __repo__ = None __homepage__ = None __description__ = ""
true
true
f7feffee5e417036c331f7b88919179c6b210753
119
py
Python
w4/finterstellar/__init__.py
finterstellar/lecture
fb14fb1c6a842e2ee2f79b0225ac9f4d11c3ca47
[ "MIT" ]
2
2020-05-14T05:53:15.000Z
2020-09-29T03:45:59.000Z
w4/finterstellar/__init__.py
finterstellar/lecture
fb14fb1c6a842e2ee2f79b0225ac9f4d11c3ca47
[ "MIT" ]
null
null
null
w4/finterstellar/__init__.py
finterstellar/lecture
fb14fb1c6a842e2ee2f79b0225ac9f4d11c3ca47
[ "MIT" ]
6
2020-03-01T13:50:23.000Z
2022-03-29T05:47:28.000Z
from .common import * from .prep import * #from .trading import * from .valuation import * from .visualization import *
23.8
28
0.747899
from .common import * from .prep import * from .valuation import * from .visualization import *
true
true
f7ff00f7410b91bf68dc4e6f17a7b5823635b06c
11,164
py
Python
lemur/plugins/lemur_kubernetes/plugin.py
backwardn/lemur
9f641c14a916d72177216ac82b29c1d9b569d957
[ "Apache-2.0" ]
1
2020-11-11T22:01:58.000Z
2020-11-11T22:01:58.000Z
lemur/plugins/lemur_kubernetes/plugin.py
backwardn/lemur
9f641c14a916d72177216ac82b29c1d9b569d957
[ "Apache-2.0" ]
2
2021-02-10T02:29:45.000Z
2021-04-30T21:40:40.000Z
lemur/plugins/lemur_kubernetes/plugin.py
backwardn/lemur
9f641c14a916d72177216ac82b29c1d9b569d957
[ "Apache-2.0" ]
null
null
null
""" .. module: lemur.plugins.lemur_kubernetes.plugin :platform: Unix :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. The plugin inserts certificates and the private key as Kubernetes secret that can later be used to secure service endpoin...
34.45679
104
0.567539
import base64 import itertools import os import requests from flask import current_app from lemur.common.defaults import common_name from lemur.common.utils import parse_certificate from lemur.plugins.bases import DestinationPlugin DEFAULT_API_VERSION = "v1" def ensure_resource(k8s_api, k8s_base_uri, namespace, ki...
true
true
f7ff00fd5487a03a90cb0e56e83f58c27dad60f7
4,091
py
Python
test_statically.py
AlanCristhian/statically
01ea9e5cbe047d4b7d69772b6155ef05fe475bb8
[ "MIT" ]
208
2017-10-30T13:11:52.000Z
2022-03-14T00:04:24.000Z
test_statically.py
AlanCristhian/statically
01ea9e5cbe047d4b7d69772b6155ef05fe475bb8
[ "MIT" ]
9
2017-10-30T21:43:18.000Z
2019-11-04T15:25:22.000Z
test_statically.py
AlanCristhian/statically
01ea9e5cbe047d4b7d69772b6155ef05fe475bb8
[ "MIT" ]
9
2017-10-30T14:26:43.000Z
2019-07-08T02:25:27.000Z
import unittest import asyncio import subprocess import sys import os.path import cython try: import IPython except ImportError: ipython_installed = False else: ipython_installed = True import statically ONE_HUNDRED = 100 execute = asyncio.get_event_loop().run_until_complete def is_cython_function(obj...
28.809859
104
0.629186
import unittest import asyncio import subprocess import sys import os.path import cython try: import IPython except ImportError: ipython_installed = False else: ipython_installed = True import statically ONE_HUNDRED = 100 execute = asyncio.get_event_loop().run_until_complete def is_cython_function(obj...
true
true
f7ff034a956d7a49e5d2f627fe862127ab5a7c41
14,792
py
Python
pelix/rsa/providers/distribution/py4j.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
65
2015-04-21T10:41:18.000Z
2022-01-02T16:25:40.000Z
pelix/rsa/providers/distribution/py4j.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
85
2015-01-20T14:23:52.000Z
2022-02-19T17:08:46.000Z
pelix/rsa/providers/distribution/py4j.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
32
2015-03-13T07:43:05.000Z
2020-04-24T07:56:53.000Z
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Py4j-based Distribution and Discovery Provider :author: Scott Lewis :copyright: Copyright 2020, Scott Lewis :license: Apache License 2.0 :version: 1.0.1 .. Copyright 2020 Scott Lewis Licensed under the Apache License, Version 2.0 (the "License"); yo...
33.240449
128
0.652177
from concurrent.futures import ThreadPoolExecutor from queue import Queue from threading import Thread, RLock import logging from osgiservicebridge.bridge import ( JavaServiceProxy, Py4jServiceBridgeEventListener, Py4jServiceBridge, PythonService, ) from osgiservicebridge.protobuf import ( Proto...
true
true
f7ff03ffafef99ce507bb1fcd20f2653bbb18c58
386
py
Python
course/migrations/0006_alter_coursesmodel_slug.py
dewale005/whitefieldcoursesite
e96277de34d0e7d464482cda787f1ee41fbe64fe
[ "MIT" ]
null
null
null
course/migrations/0006_alter_coursesmodel_slug.py
dewale005/whitefieldcoursesite
e96277de34d0e7d464482cda787f1ee41fbe64fe
[ "MIT" ]
null
null
null
course/migrations/0006_alter_coursesmodel_slug.py
dewale005/whitefieldcoursesite
e96277de34d0e7d464482cda787f1ee41fbe64fe
[ "MIT" ]
null
null
null
# Generated by Django 3.2.6 on 2021-08-25 18:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course', '0005_coursesmodel_slug'), ] operations = [ migrations.AlterField( model_name='coursesmodel', name='slug', ...
20.315789
48
0.598446
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course', '0005_coursesmodel_slug'), ] operations = [ migrations.AlterField( model_name='coursesmodel', name='slug', field=models.SlugField(unique=True)...
true
true
f7ff04a0d14c05d62eebf33a07be72d3158395ce
2,012
py
Python
tests/testKuhn.py
1696012928/RoomAI
37be09590489ab5f7c85083173e83ea31c40b76c
[ "MIT" ]
1
2018-03-02T00:49:31.000Z
2018-03-02T00:49:31.000Z
tests/testKuhn.py
1696012928/RoomAI
37be09590489ab5f7c85083173e83ea31c40b76c
[ "MIT" ]
null
null
null
tests/testKuhn.py
1696012928/RoomAI
37be09590489ab5f7c85083173e83ea31c40b76c
[ "MIT" ]
null
null
null
import unittest import roomai.kuhn import roomai.common class KuhnTester(unittest.TestCase): """ """ def testKuhn(self): """ """ for i in range(1000): players = [roomai.kuhn.Example_KuhnPokerAlwaysBetPlayer() for i in range(2)] + [roomai.kuhn.KuhnPokerChancePlayer()] ...
36.581818
128
0.644135
import unittest import roomai.kuhn import roomai.common class KuhnTester(unittest.TestCase): def testKuhn(self): for i in range(1000): players = [roomai.kuhn.Example_KuhnPokerAlwaysBetPlayer() for i in range(2)] + [roomai.kuhn.KuhnPokerChancePlayer()] env = roomai.kuhn.KuhnPoker...
true
true
f7ff0518bda03cb65ae06dad43a0492bb2af5645
2,633
py
Python
sdk/ImageSearch/image_search_client/_image_search_client.py
WMRamadan/bing-search-sdk-for-python
276d9cd6963c939081b3dec91bdd9aded42b3b35
[ "MIT" ]
12
2021-03-11T20:24:12.000Z
2022-02-10T22:55:03.000Z
sdk/ImageSearch/image_search_client/_image_search_client.py
WMRamadan/bing-search-sdk-for-python
276d9cd6963c939081b3dec91bdd9aded42b3b35
[ "MIT" ]
null
null
null
sdk/ImageSearch/image_search_client/_image_search_client.py
WMRamadan/bing-search-sdk-for-python
276d9cd6963c939081b3dec91bdd9aded42b3b35
[ "MIT" ]
10
2021-03-09T17:02:48.000Z
2022-02-12T18:40:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # ---------------------------------------...
40.507692
412
0.6673
from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: from typing import Any, Optional from azure.core.credentials import TokenCredential from ._configuration import ImageSearchClientConfiguration from .operations impo...
true
true
f7ff0573d01e715f50b4eb5c23fc49a13a25d067
979
py
Python
src/devint/counter.py
mathieucaroff/metravision
f0bbd4ed1d4b7c8d7a2de4c7a77c5dbe3714bf90
[ "BSD-3-Clause" ]
2
2019-01-21T09:45:59.000Z
2019-10-22T12:00:12.000Z
src/devint/counter.py
mathieucaroff/metravision
f0bbd4ed1d4b7c8d7a2de4c7a77c5dbe3714bf90
[ "BSD-3-Clause" ]
null
null
null
src/devint/counter.py
mathieucaroff/metravision
f0bbd4ed1d4b7c8d7a2de4c7a77c5dbe3714bf90
[ "BSD-3-Clause" ]
null
null
null
""" Code ajoutant les compteurs à la collection d'images. """ import cv2 import numpy as np def genFilledRegion(height=520, width=720, channelCount=None, dtype=np.uint8, fill_value=0): shape = [height, width] if channelCount is not None: shape.append(channelCount) return np.full(shape=shape, dty...
27.194444
92
0.623085
import cv2 import numpy as np def genFilledRegion(height=520, width=720, channelCount=None, dtype=np.uint8, fill_value=0): shape = [height, width] if channelCount is not None: shape.append(channelCount) return np.full(shape=shape, dtype=dtype, fill_value=fill_value) def addCounters(im, segment...
true
true
f7ff05fa1947430fe89f554f001570431d4cf2d3
141
py
Python
core_lib/observer/observer_listener.py
shubham-surya/core-lib
543db80706746a937e5ed16bd50f2de8d58b32e4
[ "MIT" ]
null
null
null
core_lib/observer/observer_listener.py
shubham-surya/core-lib
543db80706746a937e5ed16bd50f2de8d58b32e4
[ "MIT" ]
9
2021-03-11T02:29:17.000Z
2022-03-22T19:01:18.000Z
core_lib/observer/observer_listener.py
shubham-surya/core-lib
543db80706746a937e5ed16bd50f2de8d58b32e4
[ "MIT" ]
2
2022-01-27T11:19:00.000Z
2022-02-11T11:33:09.000Z
from abc import ABC, abstractmethod class ObserverListener(ABC): @abstractmethod def update(self, key: str, value): pass
14.1
38
0.680851
from abc import ABC, abstractmethod class ObserverListener(ABC): @abstractmethod def update(self, key: str, value): pass
true
true
f7ff0628072d6e40053800e8fdcd09acc29b048c
11,023
py
Python
frappe/utils/user.py
AKedar21/frappe
4c9ce1701caea07e595f81414af3a9f219cccb65
[ "MIT" ]
null
null
null
frappe/utils/user.py
AKedar21/frappe
4c9ce1701caea07e595f81414af3a9f219cccb65
[ "MIT" ]
null
null
null
frappe/utils/user.py
AKedar21/frappe
4c9ce1701caea07e595f81414af3a9f219cccb65
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json from frappe import _dict import frappe.share from frappe.utils import cint from frappe.boot import get_allowed_reports from frappe.permissions import get_role...
28.856021
111
0.692008
from __future__ import unicode_literals import frappe, json from frappe import _dict import frappe.share from frappe.utils import cint from frappe.boot import get_allowed_reports from frappe.permissions import get_roles, get_valid_perms from frappe.core.doctype.domain_settings.domain_settings import get_active_modu...
true
true
f7ff06b7c5f070e8226a4692d732ebf30068a5e2
6,523
py
Python
src/modules/blogo_colours.py
mlewis109/blogo
eae7eae4363f0e93f1c40b3096ab51ad90eed8f7
[ "Unlicense" ]
2
2021-12-16T04:16:53.000Z
2022-03-23T16:55:18.000Z
src/modules/blogo_colours.py
mlewis109/blogo
eae7eae4363f0e93f1c40b3096ab51ad90eed8f7
[ "Unlicense" ]
null
null
null
src/modules/blogo_colours.py
mlewis109/blogo
eae7eae4363f0e93f1c40b3096ab51ad90eed8f7
[ "Unlicense" ]
null
null
null
def all_colours(): colours = { "indianred":(0.8039,0.3608,0.3608,1), "lightcoral":(0.9412,0.502,0.502,1), "salmon":(0.9804,0.502,0.4471,1), "darksalmon":(0.9137,0.5882,0.4784,1), "lightsalmon":(1,0.6275,0.4784,1), "crimson":(0.8627,0.0784,0.2353,1), "r...
41.814103
57
0.505289
def all_colours(): colours = { "indianred":(0.8039,0.3608,0.3608,1), "lightcoral":(0.9412,0.502,0.502,1), "salmon":(0.9804,0.502,0.4471,1), "darksalmon":(0.9137,0.5882,0.4784,1), "lightsalmon":(1,0.6275,0.4784,1), "crimson":(0.8627,0.0784,0.2353,1), "r...
true
true
f7ff06b88d5280b788b13c5b425763edcbe6b864
303
py
Python
data/multilingual/Latn.EUS/Sans_12/pdf_to_json_test_Latn.EUS_Sans_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
1
2021-09-19T19:47:35.000Z
2021-09-19T19:47:35.000Z
data/multilingual/Latn.EUS/Sans_12/pdf_to_json_test_Latn.EUS_Sans_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
data/multilingual/Latn.EUS/Sans_12/pdf_to_json_test_Latn.EUS_Sans_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.EUS/Sans_12/udhr_Latn.EUS_Sans_12.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
30.3
73
0.811881
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.EUS/Sans_12/udhr_Latn.EUS_Sans_12.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
true
true
f7ff07662b3e96ced8491b8279428f96107213e1
743
py
Python
orange3/Orange/preprocess/setup.py
rgschmitz1/BioDepot-workflow-builder
f74d904eeaf91ec52ec9b703d9fb38e9064e5a66
[ "MIT" ]
54
2017-01-08T17:21:49.000Z
2021-11-02T08:46:07.000Z
orange3/Orange/preprocess/setup.py
Synthia-3/BioDepot-workflow-builder
4ee93abe2d79465755e82a145af3b6a6e1e79fd4
[ "MIT" ]
22
2017-03-28T06:03:14.000Z
2021-07-28T05:43:55.000Z
orange3/Orange/preprocess/setup.py
Synthia-3/BioDepot-workflow-builder
4ee93abe2d79465755e82a145af3b6a6e1e79fd4
[ "MIT" ]
21
2017-01-26T21:12:09.000Z
2022-01-31T21:34:59.000Z
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD Style. import os import numpy def configuration(parent_package="", top_path=None): from numpy.distutils.misc_util import Configuration libraries = [] if os.name == "posix": libraries.append("m") config = Configuration...
24.766667
66
0.644684
import os import numpy def configuration(parent_package="", top_path=None): from numpy.distutils.misc_util import Configuration libraries = [] if os.name == "posix": libraries.append("m") config = Configuration("preprocess", parent_package, top_path) for source in ("_discretize.c", "_...
true
true
f7ff0b9e6832e4686cd6461296f8f65650340966
46,343
py
Python
calm/dsl/providers/plugins/azure_vm/main.py
tuxtof/calm-dsl
5af67435d8304b97e170a690068f2d5975e9bfe6
[ "Apache-2.0" ]
37
2019-12-23T15:23:20.000Z
2022-03-15T11:12:11.000Z
calm/dsl/providers/plugins/azure_vm/main.py
tuxtof/calm-dsl
5af67435d8304b97e170a690068f2d5975e9bfe6
[ "Apache-2.0" ]
144
2020-03-09T11:22:09.000Z
2022-03-28T21:34:09.000Z
calm/dsl/providers/plugins/azure_vm/main.py
abhijeetkaurav1st/calm-dsl
6487a896967b3fd667b9320e2ad3a397c9960497
[ "Apache-2.0" ]
46
2020-01-23T14:28:04.000Z
2022-03-09T04:17:10.000Z
import click from ruamel import yaml from distutils.version import LooseVersion as LV from calm.dsl.api import get_resource_api, get_api_client from calm.dsl.providers import get_provider_interface from calm.dsl.store import Version from .constants import AZURE as azure Provider = get_provider_interface() class Az...
35.241825
95
0.541894
import click from ruamel import yaml from distutils.version import LooseVersion as LV from calm.dsl.api import get_resource_api, get_api_client from calm.dsl.providers import get_provider_interface from calm.dsl.store import Version from .constants import AZURE as azure Provider = get_provider_interface() class Az...
true
true
f7ff0c4b7b09af616779ab7b5e32f33941ef961b
1,509
py
Python
farmguru/health/migrations/0002_auto_20150409_0841.py
savioabuga/farmguru
41d6b357a64e69f510070a4acf0a89053b03f80e
[ "BSD-3-Clause" ]
null
null
null
farmguru/health/migrations/0002_auto_20150409_0841.py
savioabuga/farmguru
41d6b357a64e69f510070a4acf0a89053b03f80e
[ "BSD-3-Clause" ]
null
null
null
farmguru/health/migrations/0002_auto_20150409_0841.py
savioabuga/farmguru
41d6b357a64e69f510070a4acf0a89053b03f80e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): dependencies = [ ('groups', '0002_pasture'), ('health', '0001_initial'), ] operations = ...
35.928571
147
0.587806
from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): dependencies = [ ('groups', '0002_pasture'), ('health', '0001_initial'), ] operations = [ migrations.Cr...
true
true
f7ff0c4d80d5303b76e53d98529529995f0ec483
1,190
py
Python
web_app.py
palolo02/web-scraping-challenge
1ba3235fc5dd29a8e85b58c3e1dca94c15b2e1ad
[ "ADSL" ]
null
null
null
web_app.py
palolo02/web-scraping-challenge
1ba3235fc5dd29a8e85b58c3e1dca94c15b2e1ad
[ "ADSL" ]
null
null
null
web_app.py
palolo02/web-scraping-challenge
1ba3235fc5dd29a8e85b58c3e1dca94c15b2e1ad
[ "ADSL" ]
null
null
null
# Paolo Vega # SQLAlchemy Challenge # Bootcamp # Versión 1.0.0 May-24-2020 # Versión 1.0.1 May-24-2020 # Versión 1.0.2 May-24-2020 ################################################# # Import Modules ################################################# from flask import Flask from flask import render_template from flask ...
23.333333
58
0.497479
true
true
f7ff0d752fa5d7ed8297479d22ec4e804e7964a6
3,738
py
Python
pyansiwrapper/core/task_executor.py
stonelake/pyansiwrapper
147a979f6ec68b270f0855b8dea99b4f8fd2ef64
[ "MIT" ]
null
null
null
pyansiwrapper/core/task_executor.py
stonelake/pyansiwrapper
147a979f6ec68b270f0855b8dea99b4f8fd2ef64
[ "MIT" ]
null
null
null
pyansiwrapper/core/task_executor.py
stonelake/pyansiwrapper
147a979f6ec68b270f0855b8dea99b4f8fd2ef64
[ "MIT" ]
null
null
null
from collections import namedtuple import ansible from ansible.parsing.dataloader import DataLoader from ansible.utils.display import Display from ansible.vars import VariableManager from ansible.inventory import Inventory from ansible.playbook.play import Play from ansible.executor.task_queue_manager import TaskQueue...
37.38
76
0.53344
from collections import namedtuple import ansible from ansible.parsing.dataloader import DataLoader from ansible.utils.display import Display from ansible.vars import VariableManager from ansible.inventory import Inventory from ansible.playbook.play import Play from ansible.executor.task_queue_manager import TaskQueue...
true
true
f7ff0e630a6b36b12eea97a51dcae73edf1abd36
1,475
py
Python
api/helpers/search.py
kanav-mehra/solve-iwmi
d1db518a71f3343f39bfa14eb9234b033e7335eb
[ "MIT" ]
1
2021-05-19T16:55:12.000Z
2021-05-19T16:55:12.000Z
api/helpers/search.py
kanav-mehra/solve-iwmi
d1db518a71f3343f39bfa14eb9234b033e7335eb
[ "MIT" ]
null
null
null
api/helpers/search.py
kanav-mehra/solve-iwmi
d1db518a71f3343f39bfa14eb9234b033e7335eb
[ "MIT" ]
null
null
null
import sys from pprint import pprint from database import es from helpers.filters import createQueryFilters def createTableRows(filters): query = createQueryFilters(filters) body={ 'query':query } if filters['sort'] !='id': body['sort'] = [ {filters['sort']:{"order":filt...
25.877193
70
0.364068
import sys from pprint import pprint from database import es from helpers.filters import createQueryFilters def createTableRows(filters): query = createQueryFilters(filters) body={ 'query':query } if filters['sort'] !='id': body['sort'] = [ {filters['sort']:{"order":filt...
true
true
f7ff0e7764ef9bc42482fe9df04c06eaacb2668e
1,992
py
Python
source/webanalyzer.py
hrbolek/func2pipe
9e8d56239382d06af044f0f020547283444390a4
[ "MIT" ]
1
2020-06-01T21:12:19.000Z
2020-06-01T21:12:19.000Z
source/webanalyzer.py
hrbolek/func2pipe
9e8d56239382d06af044f0f020547283444390a4
[ "MIT" ]
null
null
null
source/webanalyzer.py
hrbolek/func2pipe
9e8d56239382d06af044f0f020547283444390a4
[ "MIT" ]
null
null
null
import re import os import io def webdelay(urlpart, minseconds, maxseconds): def inner(func): def result(url): if (urlpart in url): waitfor = random.randrange(minseconds, maxseconds) time.sleep(waitfor) return func(url) return resul...
31.619048
134
0.515562
import re import os import io def webdelay(urlpart, minseconds, maxseconds): def inner(func): def result(url): if (urlpart in url): waitfor = random.randrange(minseconds, maxseconds) time.sleep(waitfor) return func(url) return resul...
true
true
f7ff0f079284ec661e60c8dcc5b12c3dfca11e78
680
py
Python
var/spack/repos/builtin/packages/r-pfam-db/package.py
nkianggiss/spack
3477d3375142a30f5714bb5966a6d8bb22c33c06
[ "ECL-2.0", "Apache-2.0", "MIT" ]
3
2019-06-27T13:26:50.000Z
2019-07-01T16:24:54.000Z
var/spack/repos/builtin/packages/r-pfam-db/package.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
75
2016-07-27T11:43:00.000Z
2020-12-08T15:56:53.000Z
var/spack/repos/builtin/packages/r-pfam-db/package.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
8
2015-10-16T13:51:49.000Z
2021-10-18T13:58:03.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RPfamDb(RPackage): """A set of protein ID mappings for PFAM assembled using data from ...
34
107
0.707353
from spack import * class RPfamDb(RPackage): homepage = "https://www.bioconductor.org/packages/PFAM.db/" url = "https://www.bioconductor.org/packages/3.5/data/annotation/src/contrib/PFAM.db_3.4.1.tar.gz" version('3.4.1', '65ed35887ecc44f5ac9f9c8563e03f44') depends_on('r@3.4.0:3.4.9', when...
true
true
f7ff0f76aad12c68577a42277b18ac5fcdc4010a
5,048
py
Python
src/core/depth_map_utils.py
salarim/scene_vis
8e146195599aaa7598137dd223e9ce2b9e0b25a3
[ "MIT" ]
33
2019-07-16T19:52:43.000Z
2022-03-17T15:30:59.000Z
src/core/depth_map_utils.py
salarim/scene_vis
8e146195599aaa7598137dd223e9ce2b9e0b25a3
[ "MIT" ]
null
null
null
src/core/depth_map_utils.py
salarim/scene_vis
8e146195599aaa7598137dd223e9ce2b9e0b25a3
[ "MIT" ]
8
2019-07-26T03:24:35.000Z
2022-03-02T01:51:00.000Z
import cv2 import numpy as np import png from datasets.kitti.obj import calib_utils def read_depth_map(depth_map_path): depth_image = cv2.imread(depth_map_path, cv2.IMREAD_ANYDEPTH) depth_map = depth_image / 256.0 # Discard depths less than 10cm from the camera depth_map[depth_map < 0.1] = 0.0 ...
32.152866
97
0.642235
import cv2 import numpy as np import png from datasets.kitti.obj import calib_utils def read_depth_map(depth_map_path): depth_image = cv2.imread(depth_map_path, cv2.IMREAD_ANYDEPTH) depth_map = depth_image / 256.0 depth_map[depth_map < 0.1] = 0.0 return depth_map.astype(np.float32) def save...
true
true
f7ff0faec391bb87ffd7d16b6284a8ca90f7521b
22,903
py
Python
tests/test_dbapi20.py
Hema-Mathiyazhagan/nzpy
e71bf64f88dcfe5211c5973fd087721f3449006e
[ "Apache-2.0" ]
null
null
null
tests/test_dbapi20.py
Hema-Mathiyazhagan/nzpy
e71bf64f88dcfe5211c5973fd087721f3449006e
[ "Apache-2.0" ]
null
null
null
tests/test_dbapi20.py
Hema-Mathiyazhagan/nzpy
e71bf64f88dcfe5211c5973fd087721f3449006e
[ "Apache-2.0" ]
null
null
null
import time import warnings import nzpy import pytest ''' Python DB API 2.0 driver compliance unit test suite. This software is Public Domain and may be used without restrictions. "Now we have booze and barflies entering the discussion, plus rumours of DBAs on drugs... and I won't tell you what flashes throug...
33.289244
79
0.664498
import time import warnings import nzpy import pytest __rcs_id__ = '$Id: dbapi20.py,v 1.10 2003/10/09 03:14:14 zenzen Exp $' __version__ = '$Revision: 1.10 $'[11:-2] __author__ = 'Stuart Bishop <zen@shangri-la.dropbear.id.au>' driver = nzpy table_prefix = 'dbapi20te...
true
true
f7ff117b02c17cdb8dd98b7183a3ecda2fa8e4cd
3,303
py
Python
h2o-py/tests/testdir_munging/pyunit_interaction.py
kyoren/https-github.com-h2oai-h2o-3
77b27109c84c4739f9f1b7a3078f8992beefc813
[ "Apache-2.0" ]
1
2016-09-30T05:58:18.000Z
2016-09-30T05:58:18.000Z
h2o-py/tests/testdir_munging/pyunit_interaction.py
kyoren/https-github.com-h2oai-h2o-3
77b27109c84c4739f9f1b7a3078f8992beefc813
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_munging/pyunit_interaction.py
kyoren/https-github.com-h2oai-h2o-3
77b27109c84c4739f9f1b7a3078f8992beefc813
[ "Apache-2.0" ]
null
null
null
import sys sys.path.insert(1, "../../") import h2o, tests def interaction_check(): # Connect to a pre-existing cluster iris = h2o.import_file(path=tests.locate("smalldata/iris/iris.csv")) # add a couple of factor columns to iris iris = iris.cbind(iris[4] == "Iris-setosa") iris[5] = iris[5].a...
54.147541
126
0.582198
import sys sys.path.insert(1, "../../") import h2o, tests def interaction_check(): iris = h2o.import_file(path=tests.locate("smalldata/iris/iris.csv")) iris = iris.cbind(iris[4] == "Iris-setosa") iris[5] = iris[5].asfactor() iris.set_name(5,"C6") iris = iris.cbind(iris[4] == "Iris...
true
true
f7ff11e70134f83ebfb3e63680787b3672a6a232
9,204
py
Python
src/config.py
EthanJian/botty
2afb05363e9b0cd2439faaebb4b9b6f76b809bb8
[ "MIT" ]
null
null
null
src/config.py
EthanJian/botty
2afb05363e9b0cd2439faaebb4b9b6f76b809bb8
[ "MIT" ]
null
null
null
src/config.py
EthanJian/botty
2afb05363e9b0cd2439faaebb4b9b6f76b809bb8
[ "MIT" ]
null
null
null
import configparser import numpy as np import os class Config: def _select_val(self, section: str, key: str = None): if section in self._custom and key in self._custom[section]: return self._custom[section][key] elif section in self._config: return self._config[section][key...
53.824561
163
0.627119
import configparser import numpy as np import os class Config: def _select_val(self, section: str, key: str = None): if section in self._custom and key in self._custom[section]: return self._custom[section][key] elif section in self._config: return self._config[section][key...
true
true
f7ff1237763303b117d4c70444399ea1f9253802
1,821
py
Python
Module 3/9324OS_13_code/old/observer.py
real-slim-chadi/Python_Master-the-Art-of-Design-Patterns
95ec92272374e330b04d931208abbb184c7c7908
[ "MIT" ]
73
2016-09-15T23:07:04.000Z
2022-03-05T15:09:48.000Z
Module 3/9324OS_13_code/old/observer.py
real-slim-chadi/Python_Master-the-Art-of-Design-Patterns
95ec92272374e330b04d931208abbb184c7c7908
[ "MIT" ]
null
null
null
Module 3/9324OS_13_code/old/observer.py
real-slim-chadi/Python_Master-the-Art-of-Design-Patterns
95ec92272374e330b04d931208abbb184c7c7908
[ "MIT" ]
51
2016-10-07T20:47:51.000Z
2021-12-22T21:00:24.000Z
class Publisher: def __init__(self): self.observers = [] def add(self, observer): if observer not in self.observers: self.observers.append(observer) else: print('Failed to add: {}'.format(observer)) def remove(self, observer): try: self.o...
21.939759
112
0.569467
class Publisher: def __init__(self): self.observers = [] def add(self, observer): if observer not in self.observers: self.observers.append(observer) else: print('Failed to add: {}'.format(observer)) def remove(self, observer): try: self.o...
true
true
f7ff12420621511535f18333efbdd5bf6d01c34a
1,917
py
Python
var/spack/repos/builtin/packages/libspatialite/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/libspatialite/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/libspatialite/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack.package import * class Libspatialite(AutotoolsPackage): """SpatiaLite is an open source librar...
41.673913
101
0.72144
import os from spack.package import * class Libspatialite(AutotoolsPackage): homepage = "https://www.gaia-gis.it" url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0a.tar.gz" manual_download = True version('5.0.1', sha256='eecbc94311c78012d059ebc0fae86ea5ef6...
true
true
f7ff12a64cee41ab112a3716230fa615d78fefa0
3,442
py
Python
fairseq/criterions/interlingua_loss.py
carlosep93/LANGSPEC
8c8f55d999d79628a56f48d4e1a8918f8c426f72
[ "BSD-3-Clause" ]
null
null
null
fairseq/criterions/interlingua_loss.py
carlosep93/LANGSPEC
8c8f55d999d79628a56f48d4e1a8918f8c426f72
[ "BSD-3-Clause" ]
null
null
null
fairseq/criterions/interlingua_loss.py
carlosep93/LANGSPEC
8c8f55d999d79628a56f48d4e1a8918f8c426f72
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch from fair...
42.493827
95
0.647879
import math import torch from fairseq import utils from . import FairseqCriterion, register_criterion @register_criterion('interlingua_label_smoothed_cross_entropy') class InterlinguaLabelSmoothedCrossEntropyCriterion(FairseqCriterion): def __init__(self, args, task): super().__init__(args, task)...
true
true
f7ff130e2a91ce553a5e256194defbcff6bdbd8a
1,891
py
Python
src/04_sync/philosopher.py
rurumimic/concurrency-python
3eb7875dd4848872226f8035d295a31a40e32bf0
[ "MIT" ]
null
null
null
src/04_sync/philosopher.py
rurumimic/concurrency-python
3eb7875dd4848872226f8035d295a31a40e32bf0
[ "MIT" ]
null
null
null
src/04_sync/philosopher.py
rurumimic/concurrency-python
3eb7875dd4848872226f8035d295a31a40e32bf0
[ "MIT" ]
null
null
null
import random import threading import time class Philosopher(threading.Thread): def __init__(self, name, leftFork, rightFork): print(f'{name} Has Sat Down At the Table') threading.Thread.__init__(self, name=name) self.leftFork = leftFork self.rightFork = rightFork def run(sel...
31
103
0.618191
import random import threading import time class Philosopher(threading.Thread): def __init__(self, name, leftFork, rightFork): print(f'{name} Has Sat Down At the Table') threading.Thread.__init__(self, name=name) self.leftFork = leftFork self.rightFork = rightFork def run(sel...
true
true
f7ff13e4b4de122bc1af7115f845b8db159ae3c1
692
py
Python
Data Scientist Career Path/7. Summary Statistics/7. Visualizing Categorical Data/2. Pie/3. better.py
myarist/Codecademy
2ba0f104bc67ab6ef0f8fb869aa12aa02f5f1efb
[ "MIT" ]
23
2021-06-06T15:35:55.000Z
2022-03-21T06:53:42.000Z
Data Scientist Career Path/7. Summary Statistics/7. Visualizing Categorical Data/2. Pie/3. better.py
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
null
null
null
Data Scientist Career Path/7. Summary Statistics/7. Visualizing Categorical Data/2. Pie/3. better.py
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
9
2021-06-08T01:32:04.000Z
2022-03-18T15:38:09.000Z
import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import codecademylib3 major_data = pd.read_csv("major_data.csv") print(major_data.head()) major_data_agg = pd.read_csv("major_data_agg.csv") print(major_data_agg.head()) pie_wedges = major_data["proportion"] pie_labels = major_data["major"] p...
21.625
50
0.771676
import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import codecademylib3 major_data = pd.read_csv("major_data.csv") print(major_data.head()) major_data_agg = pd.read_csv("major_data_agg.csv") print(major_data_agg.head()) pie_wedges = major_data["proportion"] pie_labels = major_data["major"] p...
true
true
f7ff154ee539df909268c32975d808718debd77f
4,225
py
Python
recipes/m4/all/conanfile.py
ngerke/conan-center-index
758e929499e06754c6a9fd081cf5faa0f9be4dd2
[ "MIT" ]
null
null
null
recipes/m4/all/conanfile.py
ngerke/conan-center-index
758e929499e06754c6a9fd081cf5faa0f9be4dd2
[ "MIT" ]
null
null
null
recipes/m4/all/conanfile.py
ngerke/conan-center-index
758e929499e06754c6a9fd081cf5faa0f9be4dd2
[ "MIT" ]
null
null
null
from conans import ConanFile, tools, AutoToolsBuildEnvironment from contextlib import contextmanager import os class M4Conan(ConanFile): name = "m4" description = "GNU M4 is an implementation of the traditional Unix macro processor" topics = ("conan", "m4", "macro", "macro processor") url = "https://g...
38.761468
141
0.607574
from conans import ConanFile, tools, AutoToolsBuildEnvironment from contextlib import contextmanager import os class M4Conan(ConanFile): name = "m4" description = "GNU M4 is an implementation of the traditional Unix macro processor" topics = ("conan", "m4", "macro", "macro processor") url = "https://g...
true
true
f7ff1607025948cbe197fe6999d784f564b5cee6
2,295
py
Python
servers/dta/config_default.py
apache/incubator-milagro-mfa-server
b33dfe864ff0bcb8a26a46745b9c596d72d22ccf
[ "Apache-2.0" ]
21
2016-09-18T19:13:58.000Z
2021-11-10T18:35:30.000Z
servers/dta/config_default.py
apache/incubator-milagro-mfa-server
b33dfe864ff0bcb8a26a46745b9c596d72d22ccf
[ "Apache-2.0" ]
3
2016-09-21T14:58:41.000Z
2019-05-29T23:35:32.000Z
servers/dta/config_default.py
apache/incubator-milagro-mfa-server
b33dfe864ff0bcb8a26a46745b9c596d72d22ccf
[ "Apache-2.0" ]
15
2016-05-24T11:15:47.000Z
2021-11-10T18:35:22.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...
34.772727
81
0.76732
from __future__ import unicode_literals address = "127.0.0.1" port = 8001 credentialsFile = '%CREDENTIALSFILE%' up_file = '%BACKUP_FILE%' passphrase = '%PASSPHRASE%' salt = '%SALT%'
true
true
f7ff161b0418f98ead8a2de0684d91ab248d7ee3
3,945
py
Python
netbox_client/models/width.py
nrfta/python-netbox-client
68ba6dd4d7306513dc1ad38f3ac59122ba4f70a8
[ "MIT" ]
null
null
null
netbox_client/models/width.py
nrfta/python-netbox-client
68ba6dd4d7306513dc1ad38f3ac59122ba4f70a8
[ "MIT" ]
null
null
null
netbox_client/models/width.py
nrfta/python-netbox-client
68ba6dd4d7306513dc1ad38f3ac59122ba4f70a8
[ "MIT" ]
null
null
null
# coding: utf-8 """ NetBox API API to access NetBox # noqa: E501 OpenAPI spec version: 2.8 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Width(object): """NOTE: This class is auto generated by the swagger cod...
26.3
91
0.531559
import pprint import re import six class Width(object): swagger_types = { 'label': 'str', 'value': 'int' } attribute_map = { 'label': 'label', 'value': 'value' } def __init__(self, label=None, value=None): self._label = None self._value ...
true
true
f7ff179043d1abfbb8cfad3b21f483f8593a6738
6,090
py
Python
src/pur/core/txs/SlaveTransaction.py
pur-token/pur-core
ce372be274262a839c45436dfee58ba4ea105074
[ "MIT" ]
null
null
null
src/pur/core/txs/SlaveTransaction.py
pur-token/pur-core
ce372be274262a839c45436dfee58ba4ea105074
[ "MIT" ]
null
null
null
src/pur/core/txs/SlaveTransaction.py
pur-token/pur-core
ce372be274262a839c45436dfee58ba4ea105074
[ "MIT" ]
null
null
null
from pypurlib.pypurlib import bin2hstr from pur.core.State import State from pur.core.StateContainer import StateContainer from pur.core.misc import logger from pur.core.txs.Transaction import Transaction from pur.generated.pur_pb2 import SlaveMetadata class SlaveTransaction(Transaction): def __init__(self, pro...
44.452555
118
0.635304
from pypurlib.pypurlib import bin2hstr from pur.core.State import State from pur.core.StateContainer import StateContainer from pur.core.misc import logger from pur.core.txs.Transaction import Transaction from pur.generated.pur_pb2 import SlaveMetadata class SlaveTransaction(Transaction): def __init__(self, pro...
true
true
f7ff17e7b6f129a68378dbaf00f8b7e5e713d191
1,378
py
Python
examples/signature_downloadFile.py
apinsard/yousign-api-client-python
27e00bcd00c4ca180b76ef0d096f5b0b5962a690
[ "Apache-2.0" ]
null
null
null
examples/signature_downloadFile.py
apinsard/yousign-api-client-python
27e00bcd00c4ca180b76ef0d096f5b0b5962a690
[ "Apache-2.0" ]
null
null
null
examples/signature_downloadFile.py
apinsard/yousign-api-client-python
27e00bcd00c4ca180b76ef0d096f5b0b5962a690
[ "Apache-2.0" ]
1
2019-12-06T13:08:23.000Z
2019-12-06T13:08:23.000Z
import base64 import suds import os import ysApi import string import random if __name__ == "__main__": # Config File c = ysApi.ApiClient('../config/config.ini') # c = ysApi.ApiClient(None, "username", # "password", # "apikey", # "en...
27.56
82
0.568215
import base64 import suds import os import ysApi import string import random if __name__ == "__main__": c = ysApi.ApiClient('../config/config.ini') def id_generator(size=5, chars= string.ascii_lowercase + string.digits): return ''.join(random.choice(chars) for _ in range(si...
true
true
f7ff1836f4cfbfab8e90ffd4451894d24b97beea
2,293
py
Python
src/daisyDelight/madPlayer.py
Neppord/daisy-delight
a3efe83427239f137a8b2cc7138799cd2a3a005d
[ "MIT" ]
null
null
null
src/daisyDelight/madPlayer.py
Neppord/daisy-delight
a3efe83427239f137a8b2cc7138799cd2a3a005d
[ "MIT" ]
null
null
null
src/daisyDelight/madPlayer.py
Neppord/daisy-delight
a3efe83427239f137a8b2cc7138799cd2a3a005d
[ "MIT" ]
null
null
null
#! /usr/bin/python # coding: latin1 import ossaudiodev, mad class MadPlayer: def __init__(self, state): self.output = ossaudiodev.open('w') self.Clip = None self.file = None self.state = state state.addObserver(self) self.isPlaying = False self.src = None ...
33.231884
113
0.54601
import ossaudiodev, mad class MadPlayer: def __init__(self, state): self.output = ossaudiodev.open('w') self.Clip = None self.file = None self.state = state state.addObserver(self) self.isPlaying = False self.src = None self.t = None def updat...
false
true
f7ff18bbb8352db2837c5331db24f4ab0aef194e
1,220
py
Python
lib/python3.6/site-packages/conda/common/signals.py
PhonPhey/Magnezi
bf96246d69edc6882653ba5e1332c0eff8d10294
[ "MIT" ]
2
2021-11-28T12:47:01.000Z
2021-12-04T16:58:16.000Z
lib/python3.6/site-packages/conda/common/signals.py
PhonPhey/Magnezi
bf96246d69edc6882653ba5e1332c0eff8d10294
[ "MIT" ]
2
2021-12-04T12:51:07.000Z
2021-12-04T16:49:18.000Z
lib/python3.6/site-packages/conda/common/signals.py
PhonPhey/Magnezi
bf96246d69edc6882653ba5e1332c0eff8d10294
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from contextlib import contextmanager from logging import getLogger import signal from .compat import iteritems log = getLogger(__name__) INTERRUPT_SIGNALS = ( 'SIGABRT', 'SIGINT', 'SIGTERM', '...
24.897959
86
0.636066
from __future__ import absolute_import, division, print_function, unicode_literals from contextlib import contextmanager from logging import getLogger import signal from .compat import iteritems log = getLogger(__name__) INTERRUPT_SIGNALS = ( 'SIGABRT', 'SIGINT', 'SIGTERM', 'SIGQUIT', 'SIGBREAK...
true
true
f7ff198333448b7829141cb9e9ae779a2c2fcbca
2,188
py
Python
tests/__init__.py
dmr/ramdisk-mounter
fa00f59932bfdc56571d6218e43bbe6b733d2f77
[ "MIT" ]
3
2019-12-18T22:28:41.000Z
2021-02-13T23:48:30.000Z
tests/__init__.py
dmr/ramdisk-mounter
fa00f59932bfdc56571d6218e43bbe6b733d2f77
[ "MIT" ]
null
null
null
tests/__init__.py
dmr/ramdisk-mounter
fa00f59932bfdc56571d6218e43bbe6b733d2f77
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import string, random import time import os import ramdisk_mounter fold = os.path.abspath( os.path.join( os.path.dirname(__file__), '_folder_of_ram_disk') ) if not os.path.exists(fold): os.makedirs(fold) class TestRaiseErrorToOut...
27.012346
86
0.64808
import unittest import string, random import time import os import ramdisk_mounter fold = os.path.abspath( os.path.join( os.path.dirname(__file__), '_folder_of_ram_disk') ) if not os.path.exists(fold): os.makedirs(fold) class TestRaiseErrorToOuterContext(unittest.TestCase): def test_e...
false
true
f7ff1aba9de5d328718b1aa37091a9a0d4d6db4b
1,999
py
Python
custom_components/tuya_v2/remote.py
tbratfisch/tuya-home-assistant
2805792d599b68de8ed101a96c48f2b89452362d
[ "MIT" ]
null
null
null
custom_components/tuya_v2/remote.py
tbratfisch/tuya-home-assistant
2805792d599b68de8ed101a96c48f2b89452362d
[ "MIT" ]
null
null
null
custom_components/tuya_v2/remote.py
tbratfisch/tuya-home-assistant
2805792d599b68de8ed101a96c48f2b89452362d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Support for Tuya switches.""" from __future__ import annotations import logging from typing import Any from tuya_iot import TuyaHomeManager from homeassistant.components.remote import RemoteEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssist...
25.628205
97
0.65983
from __future__ import annotations import logging from typing import Any from tuya_iot import TuyaHomeManager from homeassistant.components.remote import RemoteEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.dispatcher import async_...
true
true
f7ff1b0e720b165e3e9612df9e3b0354dc781ebb
1,428
py
Python
var/spack/repos/builtin/packages/beast2/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/beast2/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/beast2/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Beast2(Package): """BEAST is a cross-platform program for Bayesian inference using MCMC ...
42
99
0.72409
from spack import * class Beast2(Package): homepage = "http://beast2.org/" url = "https://github.com/CompEvol/beast2/releases/download/v2.4.6/BEAST.v2.4.6.Linux.tgz" version('2.5.2', sha256='2feb2281b4f7cf8f7de1a62de50f52a8678ed0767fc72f2322e77dde9b8cd45f') version('2.4.6', sha256='84029c5...
true
true
f7ff1b7770561ff6571ca0f499434d65f091c05a
3,595
py
Python
spyder/middlewares.py
rean23/cityData
886d19b9f3289ca1faefb6333aaed361829cfe43
[ "MIT" ]
3
2019-01-28T09:18:25.000Z
2021-04-01T15:52:15.000Z
spyder/middlewares.py
rean23/cityData
886d19b9f3289ca1faefb6333aaed361829cfe43
[ "MIT" ]
null
null
null
spyder/middlewares.py
rean23/cityData
886d19b9f3289ca1faefb6333aaed361829cfe43
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # https://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals class SpyderSpiderMiddleware(object): # Not all methods need to be defined. If a method is not defined, # scrapy a...
34.567308
78
0.665925
from scrapy import signals class SpyderSpiderMiddleware(object): @classmethod def from_crawler(cls, crawler): s = cls() crawler.signals.connect(s.spider_opened, signal=signals.spider_opened) return s def process_spider_input(self, response, spider):...
true
true
f7ff1b902b248457fefb06001e70abbd513a8e77
25,214
py
Python
flask_web/app/system_state_module.py
bopopescu/local_scda
40fa4a586f140dc00b8d3f53c732e22e022be338
[ "MIT" ]
null
null
null
flask_web/app/system_state_module.py
bopopescu/local_scda
40fa4a586f140dc00b8d3f53c732e22e022be338
[ "MIT" ]
null
null
null
flask_web/app/system_state_module.py
bopopescu/local_scda
40fa4a586f140dc00b8d3f53c732e22e022be338
[ "MIT" ]
2
2020-07-23T21:55:21.000Z
2021-01-14T12:27:19.000Z
# This is the System State Modules # # # import json as simplejson import json import time import os import cherrypy from urlparse import * from shutil import * import urllib from cherrypy.lib.httputil import parse_query_string import redis import base64 redis_handle_15 = redis.StrictRedis(host='localhost', port=6379...
34.398363
108
0.627667
import json as simplejson import json import time import os import cherrypy from urlparse import * from shutil import * import urllib from cherrypy.lib.httputil import parse_query_string import redis import base64 redis_handle_15 = redis.StrictRedis(host='localhost', port=6379, db=15) mode_string = [ ...
false
true
f7ff1b91856c517d6d8fc3445a5f591fbd1c39cf
6,992
py
Python
lale/lib/imblearn/random_over_sampler.py
gbdrt/lale
291f824a6b96f088e787979ca768f50d7758424e
[ "Apache-2.0" ]
null
null
null
lale/lib/imblearn/random_over_sampler.py
gbdrt/lale
291f824a6b96f088e787979ca768f50d7758424e
[ "Apache-2.0" ]
null
null
null
lale/lib/imblearn/random_over_sampler.py
gbdrt/lale
291f824a6b96f088e787979ca768f50d7758424e
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
40.888889
151
0.581236
from imblearn.over_sampling import RandomOverSampler as OrigModel import lale.docstrings import lale.operators from lale.lib.imblearn.base_resampler import ( BaseResamplerImpl, _input_decision_function_schema, _input_fit_schema, _input_predict_proba_schema, _input_predict_schema, ...
true
true
f7ff1cd170e27a543a04f599ad76ecbd73806bfe
844
py
Python
frappe/core/doctype/view_log/test_view_log.py
vigneshbarani/frappe
5e7ac14ddff9939882c44019b542ce6eb5f9c267
[ "MIT" ]
null
null
null
frappe/core/doctype/view_log/test_view_log.py
vigneshbarani/frappe
5e7ac14ddff9939882c44019b542ce6eb5f9c267
[ "MIT" ]
5
2020-12-04T21:08:07.000Z
2022-03-12T00:39:56.000Z
frappe/core/doctype/view_log/test_view_log.py
vigneshbarani/frappe
5e7ac14ddff9939882c44019b542ce6eb5f9c267
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestViewLog(unittest.TestCase): def tearDown(self): frappe.set_user('Administrator') def test_if_user_is_added(self): ev = frappe.get_...
22.810811
58
0.684834
from __future__ import unicode_literals import frappe import unittest class TestViewLog(unittest.TestCase): def tearDown(self): frappe.set_user('Administrator') def test_if_user_is_added(self): ev = frappe.get_doc({ 'doctype': 'Event', 'subject': 'test event for view logs', 'starts_on': '2018-06-04...
true
true
f7ff1e3ec66b203f2e86e07ab73c0dfa4b3c0576
3,199
py
Python
environment/figure_library.py
JannerM/spatial-reasoning
e163003a33177e41ca02d5feefee3fdfca5ba154
[ "MIT" ]
54
2017-07-14T01:08:57.000Z
2021-07-09T12:46:57.000Z
environment/figure_library.py
jannerm/spatial-reasoning
e163003a33177e41ca02d5feefee3fdfca5ba154
[ "MIT" ]
null
null
null
environment/figure_library.py
jannerm/spatial-reasoning
e163003a33177e41ca02d5feefee3fdfca5ba154
[ "MIT" ]
16
2017-07-16T03:18:19.000Z
2021-05-28T13:04:12.000Z
spritepath = 'sprites/' objects = { 'grass': { 'index': 0, 'value': 0, 'sprite': 'sprites/grass_figure_4.png', # 'sprites/white.png', 'background': True, 'unique': False, }, 'puddle': { 'index': 1, 'value': -1, 'sprite': 'sprites/water_fig...
25.388889
70
0.467334
spritepath = 'sprites/' objects = { 'grass': { 'index': 0, 'value': 0, 'sprite': 'sprites/grass_figure_4.png', 'background': True, 'unique': False, }, 'puddle': { 'index': 1, 'value': -1, 'sprite': 'sprites/water_figure_2.png', '...
true
true
f7ff1ea3188cc4c77411fa2c5529a7e4972e5b4e
8,264
py
Python
trdemo/python/antchain_sdk_trdemo/models.py
alipay/antchain-openapi-prod-sdk
f78549e5135d91756093bd88d191ca260b28e083
[ "MIT" ]
6
2020-06-28T06:40:50.000Z
2022-02-25T11:02:18.000Z
trdemo/python/antchain_sdk_trdemo/models.py
alipay/antchain-openapi-prod-sdk
f78549e5135d91756093bd88d191ca260b28e083
[ "MIT" ]
null
null
null
trdemo/python/antchain_sdk_trdemo/models.py
alipay/antchain-openapi-prod-sdk
f78549e5135d91756093bd88d191ca260b28e083
[ "MIT" ]
6
2020-06-30T09:29:03.000Z
2022-01-07T10:42:22.000Z
# -*- coding: utf-8 -*- # This file is auto-generated, don't edit it. Thanks. from Tea.model import TeaModel class Config(TeaModel): """ Model for initing client """ def __init__( self, access_key_id: str = None, access_key_secret: str = None, security_token: str = None...
36.405286
79
0.607696
from Tea.model import TeaModel class Config(TeaModel): def __init__( self, access_key_id: str = None, access_key_secret: str = None, security_token: str = None, protocol: str = None, read_timeout: int = None, connect_timeout: int = None, http_proxy...
true
true
f7ff1edbffb05123c5d50c0f38fef92ed675cf97
2,298
py
Python
fabtools/require/system.py
pahaz/fabtools
6ccf400a6b0d2b0097e1f764822b6e45a6e48b88
[ "BSD-2-Clause" ]
null
null
null
fabtools/require/system.py
pahaz/fabtools
6ccf400a6b0d2b0097e1f764822b6e45a6e48b88
[ "BSD-2-Clause" ]
null
null
null
fabtools/require/system.py
pahaz/fabtools
6ccf400a6b0d2b0097e1f764822b6e45a6e48b88
[ "BSD-2-Clause" ]
null
null
null
""" System settings =============== """ from __future__ import with_statement from re import escape from fabric.api import sudo, warn from fabric.contrib.files import append, uncomment from fabtools.files import is_file, watch from fabtools.system import ( get_hostname, set_hostname, get_sysctl, set_sysctl, ...
24.709677
69
0.614447
from __future__ import with_statement from re import escape from fabric.api import sudo, warn from fabric.contrib.files import append, uncomment from fabtools.files import is_file, watch from fabtools.system import ( get_hostname, set_hostname, get_sysctl, set_sysctl, supported_locales, ) def sysct...
true
true
f7ff1f6d98d56b13bc8f5ee441e552b8127305bd
5,062
py
Python
utils/custom.py
hyyc554/drf_rbac
258743114a5214684d223aff5859b0e2174a9968
[ "MIT" ]
24
2020-01-27T11:57:17.000Z
2022-01-14T05:36:09.000Z
utils/custom.py
hyyc554/drf_rbac
258743114a5214684d223aff5859b0e2174a9968
[ "MIT" ]
11
2020-07-08T05:55:26.000Z
2022-01-13T02:12:55.000Z
utils/custom.py
hyyc554/drf_rbac
258743114a5214684d223aff5859b0e2174a9968
[ "MIT" ]
9
2020-07-23T10:08:51.000Z
2021-05-12T03:36:34.000Z
# @Time : 2019/1/13 11:28 # @Author : xufqing # import celery, logging, redis import logging from rest_framework import serializers from rest_framework.generics import ListAPIView from rest_framework.pagination import PageNumberPagination from rest_framework.permissions import BasePermission from rest_framework.pe...
31.055215
115
0.600948
import logging from rest_framework import serializers from rest_framework.generics import ListAPIView from rest_framework.pagination import PageNumberPagination from rest_framework.permissions import BasePermission from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response f...
true
true
f7ff1fb6723cb9c2d11d65934096f062bdf1f1c9
2,635
py
Python
main.py
rtspeaks360/exchange_rates_extractor
7eb17da1b0c06ae084e22e8f0668accca9541dee
[ "MIT" ]
null
null
null
main.py
rtspeaks360/exchange_rates_extractor
7eb17da1b0c06ae084e22e8f0668accca9541dee
[ "MIT" ]
null
null
null
main.py
rtspeaks360/exchange_rates_extractor
7eb17da1b0c06ae084e22e8f0668accca9541dee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: rish # @Date: 2020-08-04 00:16:57 # @Last Modified by: rish # @Last Modified time: 2020-08-10 12:14:31 ### Imports START import os import sys import time import logging import parser ### Imports END # Logger settings logging.basicConfig( level=logging.INFO, format='%(asctime)...
22.330508
69
0.69222
me import logging import parser vel=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' ) logger = logging.getLogger(__name__) script_name = sys.argv[0] script_path = script_name[:-8] args = parser.parser_args() FIRST = True if args.env == 'prod': logger.info('prod environment') ...
true
true
f7ff202c924fee2e44ab31ff578cc03c2e91730d
31,736
py
Python
shap/explainers/_partition.py
aaronwtr/shap
5a7b3740a6eccd772bcc3450dee3188487c18104
[ "MIT" ]
null
null
null
shap/explainers/_partition.py
aaronwtr/shap
5a7b3740a6eccd772bcc3450dee3188487c18104
[ "MIT" ]
null
null
null
shap/explainers/_partition.py
aaronwtr/shap
5a7b3740a6eccd772bcc3450dee3188487c18104
[ "MIT" ]
null
null
null
import types import copy import inspect from ..utils import MaskedModel import numpy as np import warnings import time from tqdm.auto import tqdm import queue from ..utils import assert_import, record_import_error, safe_isinstance, make_masks, OpChain from .. import Explanation from .. import maskers from ._explainer i...
46.127907
145
0.573985
import types import copy import inspect from ..utils import MaskedModel import numpy as np import warnings import time from tqdm.auto import tqdm import queue from ..utils import assert_import, record_import_error, safe_isinstance, make_masks, OpChain from .. import Explanation from .. import maskers from ._explainer i...
true
true
f7ff2053a632e3635774f6bfa710cc06f514a39c
2,996
py
Python
examples/twistedweb_server.py
ShadowJonathan/txredisapi
5da94b91e7936af8fddba824da21cde428581996
[ "Apache-2.0" ]
104
2015-01-05T16:10:44.000Z
2019-10-14T14:59:10.000Z
examples/twistedweb_server.py
ShadowJonathan/txredisapi
5da94b91e7936af8fddba824da21cde428581996
[ "Apache-2.0" ]
55
2015-01-22T11:25:20.000Z
2019-11-19T21:39:32.000Z
examples/twistedweb_server.py
ShadowJonathan/txredisapi
5da94b91e7936af8fddba824da21cde428581996
[ "Apache-2.0" ]
50
2015-03-01T10:26:28.000Z
2019-11-17T23:26:51.000Z
#!/usr/bin/env twistd -ny # coding: utf-8 # Copyright 2009 Alexandre Fiori # # 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 b...
27.740741
74
0.676235
import txredisapi as redis from twisted.application import internet from twisted.application import service from twisted.internet import defer from twisted.web import server from twisted.web import xmlrpc from twisted.web.resource import Resource class Root(Resource): isLeaf = False class Ba...
true
true
f7ff20e76088b0b92d2df80c3fbeb09a7de2e990
1,465
py
Python
networking/graphviz/second_program.py
maciej233/PYTHON
7e635a2250890f1a293983b3988bdcc5f5e71ccf
[ "MIT" ]
null
null
null
networking/graphviz/second_program.py
maciej233/PYTHON
7e635a2250890f1a293983b3988bdcc5f5e71ccf
[ "MIT" ]
null
null
null
networking/graphviz/second_program.py
maciej233/PYTHON
7e635a2250890f1a293983b3988bdcc5f5e71ccf
[ "MIT" ]
null
null
null
import glob, re from graphviz import Digraph, Source pattern = re.compile('Et[23]/[0123]') device_lldp_neighbors = [] for file_name in glob.glob("/tmp/logi_lldp/*"): device = file_name.split("/")[3].split("_")[0] #print("device: " + device) with open(file_name, 'r') as f: for line in f.readlines(...
31.170213
89
0.631399
import glob, re from graphviz import Digraph, Source pattern = re.compile('Et[23]/[0123]') device_lldp_neighbors = [] for file_name in glob.glob("/tmp/logi_lldp/*"): device = file_name.split("/")[3].split("_")[0] with open(file_name, 'r') as f: for line in f.readlines(): line = eval(...
true
true
f7ff216a1168b984d5e82978f869dc3123c6f78b
11,935
py
Python
doc/source/notebooks/intro_to_gpflow2.pct.py
BracketJohn/GPflow
33178689c34d773a05532d50e3d4d97e7d5d6d60
[ "Apache-2.0" ]
null
null
null
doc/source/notebooks/intro_to_gpflow2.pct.py
BracketJohn/GPflow
33178689c34d773a05532d50e3d4d97e7d5d6d60
[ "Apache-2.0" ]
null
null
null
doc/source/notebooks/intro_to_gpflow2.pct.py
BracketJohn/GPflow
33178689c34d773a05532d50e3d4d97e7d5d6d60
[ "Apache-2.0" ]
null
null
null
# --- # jupyter: # jupytext: # formats: ipynb,.pct.py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.3.3 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% [markdown] ...
32.69863
265
0.704985
umpy as np import tensorflow as tf import gpflow from gpflow.config import default_float import warnings warnings.filterwarnings('ignore') output_logdir = "/tmp/tensorboard" def enumerated_logdir(_logdir_id: int = [0]): logdir = Path(output_logdir, str(_logdir_id[0])) _logdir_...
true
true
f7ff219d0bf42aa764301ad0fe2f8f1cd022eaf5
8,190
py
Python
test/functional/wallet_basic.py
Trittium/trittium
1342377171ee59aeb505d7a95cd87074ca52684a
[ "MIT" ]
20
2018-07-05T07:38:37.000Z
2021-11-28T14:57:47.000Z
test/functional/wallet_basic.py
Trittium/trittium
1342377171ee59aeb505d7a95cd87074ca52684a
[ "MIT" ]
4
2019-04-08T06:50:39.000Z
2021-03-31T15:09:47.000Z
test/functional/wallet_basic.py
Trittium/trittium
1342377171ee59aeb505d7a95cd87074ca52684a
[ "MIT" ]
23
2018-05-08T14:37:26.000Z
2021-03-09T17:02:07.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet.""" from test_framework.test_framework import PivxTestFramework from test_framework.uti...
41.573604
121
0.62906
from test_framework.test_framework import PivxTestFramework from test_framework.util import ( assert_array_result, assert_equal, assert_fee_amount, assert_raises_rpc_error, connect_nodes, Decimal, wait_until, ) class WalletTest(PivxTestFramework): def set_test_params(self): ...
true
true
f7ff23475ff5889fc69efe2ea1de0977e3323ebb
5,707
py
Python
accelbyte_py_sdk/api/iam/operations/roles/get_role.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/iam/operations/roles/get_role.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
accelbyte_py_sdk/api/iam/operations/roles/get_role.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # pylint: disable=duplicate-code # pylint: disable=li...
25.591928
141
0.62362
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from .....core import Operation from .....core import HeaderStr from .....core import HttpResponse from ...models import ModelRoleResponse class GetRole(Operation): _url: str = "/iam/role...
true
true
f7ff23b8ef6be5806b413294ee2ac4762875de0e
1,466
py
Python
classification/Inception-V3_PyTorch/dataloader.py
Divyanshu23/model-zoo
2eea6df691d302e182bb1ff8ec5af3542de562ba
[ "MIT" ]
43
2020-05-16T21:05:34.000Z
2022-02-08T11:33:29.000Z
classification/Inception-V3_PyTorch/dataloader.py
Divyanshu23/model-zoo
2eea6df691d302e182bb1ff8ec5af3542de562ba
[ "MIT" ]
52
2020-05-14T16:18:08.000Z
2021-11-02T19:13:47.000Z
classification/Inception-V3_PyTorch/dataloader.py
Divyanshu23/model-zoo
2eea6df691d302e182bb1ff8ec5af3542de562ba
[ "MIT" ]
69
2020-05-14T13:39:23.000Z
2021-07-30T00:51:27.000Z
import shutil import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader, random_split from torchvision import transforms, datasets def load_cifar(): transform = transforms.Compose([transforms.Resize((32, 32)), transforms.ToTensor(), ...
35.756098
82
0.651432
import shutil import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader, random_split from torchvision import transforms, datasets def load_cifar(): transform = transforms.Compose([transforms.Resize((32, 32)), transforms.ToTensor(), ...
true
true
f7ff24ec1f7ee94b7822f70639f2d123168ebfe5
11,105
py
Python
tensorflow/contrib/batching/python/ops/batch_ops_test.py
imdone/tensorflow
bb4d1ef3861c83627ee9586b85ac3070a7d38335
[ "Apache-2.0" ]
1
2021-04-16T14:53:22.000Z
2021-04-16T14:53:22.000Z
tensorflow/contrib/batching/python/ops/batch_ops_test.py
imdone/tensorflow
bb4d1ef3861c83627ee9586b85ac3070a7d38335
[ "Apache-2.0" ]
10
2018-02-04T18:41:52.000Z
2018-05-02T09:00:46.000Z
tensorflow/contrib/batching/python/ops/batch_ops_test.py
imdone/tensorflow
bb4d1ef3861c83627ee9586b85ac3070a7d38335
[ "Apache-2.0" ]
4
2018-01-17T14:22:49.000Z
2018-02-27T15:06:41.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.946043
87
0.642954
from __future__ import absolute_import from __future__ import division from __future__ import print_function import threading import time from tensorflow.contrib.batching.python.ops import batch_ops from tensorflow.python.framework import dtypes from tensorflow.python.ops import array_ops from tensorfl...
true
true
f7ff2684d053e255af1625b8e32e0fbfe593614d
1,228
py
Python
crom/bootstrap/bootstrap.py
mropert/crom
b871b756c348952de2a044b22b36c9fbb0e76132
[ "MIT" ]
null
null
null
crom/bootstrap/bootstrap.py
mropert/crom
b871b756c348952de2a044b22b36c9fbb0e76132
[ "MIT" ]
null
null
null
crom/bootstrap/bootstrap.py
mropert/crom
b871b756c348952de2a044b22b36c9fbb0e76132
[ "MIT" ]
null
null
null
from crom.project import Project def with_directory(file, dir): if dir is None: return file else: return'/'.join([dir, file]) def list_files(files, dir): return map(lambda f: with_directory(f, dir), files) def get_files(files, dir): return dict(map(lambda p: (with_directory(p[0], d...
31.487179
86
0.62785
from crom.project import Project def with_directory(file, dir): if dir is None: return file else: return'/'.join([dir, file]) def list_files(files, dir): return map(lambda f: with_directory(f, dir), files) def get_files(files, dir): return dict(map(lambda p: (with_directory(p[0], d...
true
true
f7ff284ed125ec95d0f2dc9fcdee3b0ae82ac8bb
7,600
py
Python
tests/test_subcluster.py
mmascher/osg-configure
0a8490f87ff1b3340796f94ed657b62b19602347
[ "Apache-2.0" ]
null
null
null
tests/test_subcluster.py
mmascher/osg-configure
0a8490f87ff1b3340796f94ed657b62b19602347
[ "Apache-2.0" ]
null
null
null
tests/test_subcluster.py
mmascher/osg-configure
0a8490f87ff1b3340796f94ed657b62b19602347
[ "Apache-2.0" ]
null
null
null
"""Module for unit testing subcluster / resource entry configuration""" # pylint: disable=W0703 # pylint: disable=R0904 from __future__ import print_function import os import sys import unittest import ConfigParser import logging # setup system library path pathname = os.path.realpath('../') sys.path.insert(0, pathn...
39.583333
125
0.653289
from __future__ import print_function import os import sys import unittest import ConfigParser import logging pathname = os.path.realpath('../') sys.path.insert(0, pathname) try: NullHandler = logging.NullHandler except AttributeError: class NullHandler(logging.Handler): def emit(self, record): ...
true
true
f7ff28e0d7921f6698ca0444b0b371e2e820261c
7,140
py
Python
exam_system/stud_app/migrations/0001_initial.py
hiruthikj/exam-system
952cb87bd43b31f6337aac1f1e57e05a68e7c531
[ "Apache-2.0" ]
3
2020-11-16T17:32:56.000Z
2021-04-07T14:16:24.000Z
exam_system/stud_app/migrations/0001_initial.py
hiruthikj/exam-system
952cb87bd43b31f6337aac1f1e57e05a68e7c531
[ "Apache-2.0" ]
null
null
null
exam_system/stud_app/migrations/0001_initial.py
hiruthikj/exam-system
952cb87bd43b31f6337aac1f1e57e05a68e7c531
[ "Apache-2.0" ]
1
2020-11-03T17:10:20.000Z
2020-11-03T17:10:20.000Z
# Generated by Django 3.1.3 on 2020-11-16 09:43 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
51
150
0.592437
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f7ff294ad6a5df593bbd854409a5e766cca7cf79
204
py
Python
practice_py/love.py
RootProgrammer/Python
d3308af735934d40df5ca2b115cf1deffcae5fac
[ "MIT" ]
1
2021-04-18T08:14:41.000Z
2021-04-18T08:14:41.000Z
practice_py/love.py
RootProgrammer/Python
d3308af735934d40df5ca2b115cf1deffcae5fac
[ "MIT" ]
null
null
null
practice_py/love.py
RootProgrammer/Python
d3308af735934d40df5ca2b115cf1deffcae5fac
[ "MIT" ]
null
null
null
from turtle import * color("blue","black") pensize(1) speed(1) begin_fill() left(50) forward(100) circle(40,180) left(260) circle(40,177) forward(100) end_fill() hideturtle() done()
10.736842
22
0.642157
from turtle import * color("blue","black") pensize(1) speed(1) begin_fill() left(50) forward(100) circle(40,180) left(260) circle(40,177) forward(100) end_fill() hideturtle() done()
true
true
f7ff29715fcfb8b3ac8fa348a68ca50e86816ab2
562
py
Python
muro/dashboards/migrations/0006_auto_20180316_1404.py
edupo/muro
618ed01a37c417ba2d67c613dbc53366b81dd734
[ "Apache-2.0" ]
null
null
null
muro/dashboards/migrations/0006_auto_20180316_1404.py
edupo/muro
618ed01a37c417ba2d67c613dbc53366b81dd734
[ "Apache-2.0" ]
4
2018-02-28T08:32:59.000Z
2018-04-24T10:50:38.000Z
muro/dashboards/migrations/0006_auto_20180316_1404.py
edupo/muro
618ed01a37c417ba2d67c613dbc53366b81dd734
[ "Apache-2.0" ]
1
2018-02-09T18:04:32.000Z
2018-02-09T18:04:32.000Z
# Generated by Django 2.0.2 on 2018-03-16 14:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboards', '0005_auto_20180301_2056'), ] operations = [ migrations.AddField( model_name='dashboard', name='fromtim...
23.416667
58
0.580071
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboards', '0005_auto_20180301_2056'), ] operations = [ migrations.AddField( model_name='dashboard', name='fromtime', field=models.TimeField(blank=Tr...
true
true
f7ff29ac0c977aea009765d623946d669ae89db0
3,349
py
Python
wagtailgeowidget/edit_handlers.py
mariusboe/wagtail-geo-widget
bced21950685d0d1843acd77bb0740b7df3b1415
[ "MIT" ]
null
null
null
wagtailgeowidget/edit_handlers.py
mariusboe/wagtail-geo-widget
bced21950685d0d1843acd77bb0740b7df3b1415
[ "MIT" ]
null
null
null
wagtailgeowidget/edit_handlers.py
mariusboe/wagtail-geo-widget
bced21950685d0d1843acd77bb0740b7df3b1415
[ "MIT" ]
null
null
null
import warnings from wagtail.admin.edit_handlers import FieldPanel from wagtailgeowidget import geocoders from wagtailgeowidget.app_settings import GEO_WIDGET_ZOOM from wagtailgeowidget.widgets import GeocoderField, GoogleMapsField, LeafletField class GoogleMapsPanel(FieldPanel): def __init__(self, *args, **kwa...
29.901786
84
0.597193
import warnings from wagtail.admin.edit_handlers import FieldPanel from wagtailgeowidget import geocoders from wagtailgeowidget.app_settings import GEO_WIDGET_ZOOM from wagtailgeowidget.widgets import GeocoderField, GoogleMapsField, LeafletField class GoogleMapsPanel(FieldPanel): def __init__(self, *args, **kwa...
true
true
f7ff2b76a5718666b526e8bc6752d78cfcc79232
8,202
py
Python
carl/jaccard.py
zaratec/carl
9d655c2cb75d90ddc6b2d101073248a2fc3c252e
[ "MIT" ]
null
null
null
carl/jaccard.py
zaratec/carl
9d655c2cb75d90ddc6b2d101073248a2fc3c252e
[ "MIT" ]
null
null
null
carl/jaccard.py
zaratec/carl
9d655c2cb75d90ddc6b2d101073248a2fc3c252e
[ "MIT" ]
1
2020-11-19T23:41:28.000Z
2020-11-19T23:41:28.000Z
import itertools import operator from carl import charts from carl import common from carl import storage from carl.analysis import table_to_dict, map_items_to_parent, print_tabulated def gen_view_sets(pages): """ Generates the view_set for each page in pages""" views = common.VIEWS reqs = table_to_dict(...
30.043956
78
0.584492
import itertools import operator from carl import charts from carl import common from carl import storage from carl.analysis import table_to_dict, map_items_to_parent, print_tabulated def gen_view_sets(pages): """ Generates the view_set for each page in pages""" views = common.VIEWS reqs = table_to_dict(...
false
true
f7ff2b88a5f2e3746635f10ada3446d842d5baea
1,248
py
Python
tests/test_openwebifpy.py
fbradyirl/openwebifpy
e40454fbf6e67568a032c67700818aaf6d8e81df
[ "MIT" ]
5
2019-04-07T09:37:37.000Z
2021-12-01T11:30:23.000Z
tests/test_openwebifpy.py
fbradyirl/openwebifpy
e40454fbf6e67568a032c67700818aaf6d8e81df
[ "MIT" ]
6
2019-03-01T16:16:17.000Z
2021-05-21T14:52:06.000Z
tests/test_openwebifpy.py
fbradyirl/openwebifpy
e40454fbf6e67568a032c67700818aaf6d8e81df
[ "MIT" ]
1
2020-11-13T14:42:02.000Z
2020-11-13T14:42:02.000Z
""" tests.test_api ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the api Copyright (c) 2015 Finbarr Brady <https://github.com/fbradyirl> Licensed under the MIT license. """ # pylint: disable=protected-access import unittest import openwebif.api from openwebif.error import OpenWebIfError, MissingParamError class TestAP...
32
93
0.66266
import unittest import openwebif.api from openwebif.error import OpenWebIfError, MissingParamError class TestAPI(unittest.TestCase): def test_create(self): self.assertRaises(MissingParamError, lambda: openwebif.api.CreateDevice()) def test_get_picon_name(self): self.asser...
true
true
f7ff2bafcd87a9be7eec1b6ce21916f115d5b7af
1,058
py
Python
tests/functional/scripts/pyi_load_dll_using_ctypes.py
hawkhai/pyinstaller
016a24479b34de161792c72dde455a81ad4c78ae
[ "Apache-2.0" ]
9,267
2015-01-01T04:08:45.000Z
2022-03-31T11:42:38.000Z
tests/functional/scripts/pyi_load_dll_using_ctypes.py
hawkhai/pyinstaller
016a24479b34de161792c72dde455a81ad4c78ae
[ "Apache-2.0" ]
5,150
2015-01-01T12:09:56.000Z
2022-03-31T18:06:12.000Z
tests/functional/scripts/pyi_load_dll_using_ctypes.py
hawkhai/pyinstaller
016a24479b34de161792c72dde455a81ad4c78ae
[ "Apache-2.0" ]
2,101
2015-01-03T10:25:27.000Z
2022-03-30T11:04:42.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2005-2021, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt...
35.266667
94
0.640832
import os import sys from ctypes import CDLL from pyi_get_datadir import get_data_dir if sys.platform.startswith('win32'): name = 'ctypes_dylib.dll' elif sys.platform.startswith("darwin"): name = 'ctypes_dylib.dylib' else: name = 'ctypes_dylib.so' tct = CDLL(os.path.join(get_data_dir(), 'cty...
true
true
f7ff2e0ebe354bc5ae9421ae9279e46ddcffc9d9
1,477
py
Python
google/ads/googleads/v10/errors/types/access_invitation_error.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v10/errors/types/access_invitation_error.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v10/errors/types/access_invitation_error.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
31.425532
74
0.725796
import proto __protobuf__ = proto.module( package="google.ads.googleads.v10.errors", marshal="google.ads.googleads.v10", manifest={"AccessInvitationErrorEnum",}, ) class AccessInvitationErrorEnum(proto.Message): class AccessInvitationError(proto.Enum): UNSPECIFIED = 0 ...
true
true
f7ff2e201982a9655fd15644da752ad00b36de5d
103
py
Python
setup.py
chanhakim/RTGraph
71a0054a574d1e23cc31420cc6f3124d4f8c2cc1
[ "MIT" ]
null
null
null
setup.py
chanhakim/RTGraph
71a0054a574d1e23cc31420cc6f3124d4f8c2cc1
[ "MIT" ]
null
null
null
setup.py
chanhakim/RTGraph
71a0054a574d1e23cc31420cc6f3124d4f8c2cc1
[ "MIT" ]
null
null
null
from setuptools import setup setup(name="mbci lab", app=["mbci_lab/app.py"], setup_requires=['py2app'])
51.5
74
0.747573
from setuptools import setup setup(name="mbci lab", app=["mbci_lab/app.py"], setup_requires=['py2app'])
true
true
f7ff2e55f9e4bfd191e519db80c4ee04a2aaa64b
1,648
py
Python
gui/prototxt_editor/editor_slider.py
anglebinbin/Barista-tool
2d51507fb3566881923f0b273127f59d23ed317f
[ "MIT" ]
1
2020-02-11T19:05:17.000Z
2020-02-11T19:05:17.000Z
gui/prototxt_editor/editor_slider.py
anglebinbin/Barista-tool
2d51507fb3566881923f0b273127f59d23ed317f
[ "MIT" ]
null
null
null
gui/prototxt_editor/editor_slider.py
anglebinbin/Barista-tool
2d51507fb3566881923f0b273127f59d23ed317f
[ "MIT" ]
null
null
null
from PyQt5.QtWidgets import QWidget, QSlider, QHBoxLayout from PyQt5.QtCore import QMargins from PyQt5.QtCore import QObject, pyqtSignal class EditorSlider(QWidget): # widget containig the slider # direct subclassing of QSlider leads to errors valueChanged = pyqtSignal(int) def __init__(self, vmin, ...
31.09434
65
0.63835
from PyQt5.QtWidgets import QWidget, QSlider, QHBoxLayout from PyQt5.QtCore import QMargins from PyQt5.QtCore import QObject, pyqtSignal class EditorSlider(QWidget): valueChanged = pyqtSignal(int) def __init__(self, vmin, vcur, vmax, parent): QWidget.__init__(self, parent) self.ed...
true
true
f7ff2ead94d10a1453750fc5a531f65fbb53f3cf
2,387
py
Python
NLPCode/named_entity_recognition/utils.py
trusthlt/dp-across-nlp-tasks
ec3e03511420044cdb0bb1a3574925d354ff03f4
[ "Apache-2.0" ]
1
2021-12-21T14:05:34.000Z
2021-12-21T14:05:34.000Z
NLPCode/named_entity_recognition/utils.py
trusthlt/dp-across-nlp-tasks
ec3e03511420044cdb0bb1a3574925d354ff03f4
[ "Apache-2.0" ]
null
null
null
NLPCode/named_entity_recognition/utils.py
trusthlt/dp-across-nlp-tasks
ec3e03511420044cdb0bb1a3574925d354ff03f4
[ "Apache-2.0" ]
null
null
null
import time import torch from queue import Queue import numpy as np from sklearn.metrics import precision_recall_fscore_support def get_acc_pre_rec_f1(y_true, y_pred): assert (len(y_true) == len(y_pred)) # accuracy acc = 0 for t, p in zip(y_true, y_pred): if t == p: acc += 1 #...
34.1
103
0.616255
import time import torch from queue import Queue import numpy as np from sklearn.metrics import precision_recall_fscore_support def get_acc_pre_rec_f1(y_true, y_pred): assert (len(y_true) == len(y_pred)) acc = 0 for t, p in zip(y_true, y_pred): if t == p: acc += 1 pr_epo...
true
true
f7ff2ecf83ed29ff957f9409894c59ba5e464f59
367
py
Python
src/gym_cpr_grid/setup.py
karthiks1701/cpr-appropriation-1
2c7d4be27b5e5aa09bb778fadf1d2ddf4a9d80fd
[ "MIT" ]
1
2022-03-05T13:34:21.000Z
2022-03-05T13:34:21.000Z
src/gym_cpr_grid/setup.py
karthiks1701/cpr-appropriation-1
2c7d4be27b5e5aa09bb778fadf1d2ddf4a9d80fd
[ "MIT" ]
null
null
null
src/gym_cpr_grid/setup.py
karthiks1701/cpr-appropriation-1
2c7d4be27b5e5aa09bb778fadf1d2ddf4a9d80fd
[ "MIT" ]
1
2022-03-04T11:54:17.000Z
2022-03-04T11:54:17.000Z
from setuptools import setup setup( name="gym_cpr_grid", version="0.0.1", description="CPR appropriation grid world compatible with OpenAI Gym", url="http://github.com/Wadaboa/cpr-appropriation", author="Alessio Falai", author_email="falai.alessio@gmail.com", license="MIT", install_requ...
26.214286
74
0.689373
from setuptools import setup setup( name="gym_cpr_grid", version="0.0.1", description="CPR appropriation grid world compatible with OpenAI Gym", url="http://github.com/Wadaboa/cpr-appropriation", author="Alessio Falai", author_email="falai.alessio@gmail.com", license="MIT", install_requ...
true
true
f7ff2f594e64999c5ca7288ea1b09a0061b030bc
23,429
py
Python
Task 12-14 - Fill births and deaths/Wikipedia/update_births_deaths.py
maurusian/DarijaBot
e2e70378dd5e6645a97359b7495fc2bba6ab185d
[ "MIT" ]
null
null
null
Task 12-14 - Fill births and deaths/Wikipedia/update_births_deaths.py
maurusian/DarijaBot
e2e70378dd5e6645a97359b7495fc2bba6ab185d
[ "MIT" ]
null
null
null
Task 12-14 - Fill births and deaths/Wikipedia/update_births_deaths.py
maurusian/DarijaBot
e2e70378dd5e6645a97359b7495fc2bba6ab185d
[ "MIT" ]
null
null
null
from openpyxl import Workbook, load_workbook import re import pywikibot from pgvbotLib import * from urllib.request import urlopen, quote, Request from urllib.error import URLError import json, sys, os #import SPARQLWrapper import requests date_pattern = r'[-]{0,1}[0-9]+-[0-9]+-[0-9]+' #print(re.match(date_pattern,'t2...
36.550702
160
0.597934
from openpyxl import Workbook, load_workbook import re import pywikibot from pgvbotLib import * from urllib.request import urlopen, quote, Request from urllib.error import URLError import json, sys, os import requests date_pattern = r'[-]{0,1}[0-9]+-[0-9]+-[0-9]+' filename = './data/query.sparql' export = './data/...
true
true
f7ff2ff48a6488f28ebfeed1405cab6a6fc0502f
1,551
py
Python
update_judicial_data.py
ronaldshaooo/OpenDataJudicial
ee55b234276511b824a04d836607741f9189ebd8
[ "MIT" ]
null
null
null
update_judicial_data.py
ronaldshaooo/OpenDataJudicial
ee55b234276511b824a04d836607741f9189ebd8
[ "MIT" ]
null
null
null
update_judicial_data.py
ronaldshaooo/OpenDataJudicial
ee55b234276511b824a04d836607741f9189ebd8
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import os import patoolib import requests import shutil judicial_history_directory = 'judicial_history' fincial_judgement_directory = 'fincial_judgement' def copy_fincial_judgement(): for root, _dirs, files in os.walk(judicial_history_directory): print('check {}'.format(roo...
33
106
0.659574
from bs4 import BeautifulSoup import os import patoolib import requests import shutil judicial_history_directory = 'judicial_history' fincial_judgement_directory = 'fincial_judgement' def copy_fincial_judgement(): for root, _dirs, files in os.walk(judicial_history_directory): print('check {}'.format(roo...
true
true
f7ff3017c4d0c54c1a82b058504ce4532e958323
26,132
py
Python
mexdex/pvutils.py
parallelworks/welding
eb1fe04e9f1be1d374782f7476767dcf2197fe36
[ "MIT" ]
null
null
null
mexdex/pvutils.py
parallelworks/welding
eb1fe04e9f1be1d374782f7476767dcf2197fe36
[ "MIT" ]
null
null
null
mexdex/pvutils.py
parallelworks/welding
eb1fe04e9f1be1d374782f7476767dcf2197fe36
[ "MIT" ]
null
null
null
from paraview.simple import * import sys import data_IO import os import subprocess import shutil # For saving plots as pngs import matplotlib import numpy as np import warnings def getParaviewVersion(): """ Return paraview version as a double number: e.g. 5.4""" PVversionMajor = paraview.servermanager.vtkSM...
35.361299
120
0.650046
from paraview.simple import * import sys import data_IO import os import subprocess import shutil import matplotlib import numpy as np import warnings def getParaviewVersion(): PVversionMajor = paraview.servermanager.vtkSMProxyManager.GetVersionMajor() PVversionMinor = paraview.servermanager.vtkSMProxyMana...
true
true
f7ff3078f4a8fe151ccb117d86d20ae3a168ed98
1,574
py
Python
PyFlow/Packages/PyFlowBase/Nodes/cliexit.py
liaokongVFX/PyFlow
337462746acf087432f4dd3248e3a1349c3a3c79
[ "Apache-2.0" ]
null
null
null
PyFlow/Packages/PyFlowBase/Nodes/cliexit.py
liaokongVFX/PyFlow
337462746acf087432f4dd3248e3a1349c3a3c79
[ "Apache-2.0" ]
null
null
null
PyFlow/Packages/PyFlowBase/Nodes/cliexit.py
liaokongVFX/PyFlow
337462746acf087432f4dd3248e3a1349c3a3c79
[ "Apache-2.0" ]
1
2019-08-21T07:36:20.000Z
2019-08-21T07:36:20.000Z
## Copyright 2015-2019 Ilgar Lunin, Pedro Cabrera ## 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...
31.48
92
0.720457
xecPin') helper.addInputStruct(PinStructure.Single) return helper @staticmethod def category(): return 'CLI' @staticmethod def keywords(): return [] @staticmethod def description(): return 'Stops cli program loop' def compute(self, *args, **kwargs)...
true
true
f7ff3081486b687c2eaf174841864e919416c8b7
2,396
py
Python
tensorflow_io/core/python/experimental/serialization_ops.py
pshiko/io
a1793e6b41ed7a8db572249aba15a8e513a348a5
[ "Apache-2.0" ]
null
null
null
tensorflow_io/core/python/experimental/serialization_ops.py
pshiko/io
a1793e6b41ed7a8db572249aba15a8e513a348a5
[ "Apache-2.0" ]
null
null
null
tensorflow_io/core/python/experimental/serialization_ops.py
pshiko/io
a1793e6b41ed7a8db572249aba15a8e513a348a5
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
32.378378
84
0.698664
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow_io.core.python.ops import core_ops class _NamedTensorSpec(tf.TensorSpec): def named(self, named=None): if named is not None: self._named = na...
true
true
f7ff310d356e03af98ca58a20d2d8a005d10a589
154
py
Python
core/tests/unittests/test_import_version.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
4,462
2019-12-09T17:41:07.000Z
2022-03-31T22:00:41.000Z
core/tests/unittests/test_import_version.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
1,408
2019-12-09T17:48:59.000Z
2022-03-31T20:24:12.000Z
core/tests/unittests/test_import_version.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
623
2019-12-10T02:04:18.000Z
2022-03-20T17:11:01.000Z
import autogluon.core def test_import_version(): assert isinstance(autogluon.core.__version__, str) assert len(autogluon.core.__version__) != 0
22
54
0.766234
import autogluon.core def test_import_version(): assert isinstance(autogluon.core.__version__, str) assert len(autogluon.core.__version__) != 0
true
true
f7ff31a3b74859e4cd30da654696681c7bbe8c86
292
py
Python
image_annotations/abstract.py
brandontrabucco/image_annotations
4140fce44c6465bfd5de90eb935e014cec4c024e
[ "MIT" ]
null
null
null
image_annotations/abstract.py
brandontrabucco/image_annotations
4140fce44c6465bfd5de90eb935e014cec4c024e
[ "MIT" ]
null
null
null
image_annotations/abstract.py
brandontrabucco/image_annotations
4140fce44c6465bfd5de90eb935e014cec4c024e
[ "MIT" ]
null
null
null
"""Author: Brandon Trabucco An abstract class for defining usage the dataset. """ class Abstract(object): """Scaffold the dataset annotator and loader. """ def start(self): """Will eventually house computation and return an interesting result. """ pass
20.857143
78
0.65411
class Abstract(object): def start(self): pass
true
true
f7ff31f42e5b26cbf413226fb48b06e483fc6c0e
95,067
py
Python
lib/matplotlib/transforms.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/transforms.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/transforms.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
""" matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of :class:`TransformNode` objects whose actual value depends on their children. When the contents of children change, their pare...
34.159899
94
0.591541
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np from numpy import ma from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox, update_path_extents) from numpy.linalg import inv from weakref import Wea...
true
true
f7ff321f48554463a337e8af0e6b695428971983
3,724
py
Python
qml_workdir/data_work/feat_sel_12.py
quantum13/mlbootcamp5
2b473074daadce8ee7c859dcec6f6171464c3a43
[ "MIT" ]
2
2017-07-18T06:32:09.000Z
2017-09-21T12:26:01.000Z
qml_workdir/data_work/feat_sel_12.py
quantum13/mlbootcamp5
2b473074daadce8ee7c859dcec6f6171464c3a43
[ "MIT" ]
null
null
null
qml_workdir/data_work/feat_sel_12.py
quantum13/mlbootcamp5
2b473074daadce8ee7c859dcec6f6171464c3a43
[ "MIT" ]
2
2017-07-18T18:42:06.000Z
2021-10-09T14:26:40.000Z
import datetime import numpy as np import os import sys sys.path.insert(0, os.getcwd()) from hyperopt import hp, fmin, tpe import qml_workdir.classes.config from qml.cv import QCV from qml.models import QXgb, QAvg, QAvgOneModelData from qml_workdir.classes.models import qm trash wrong model cv = QCV(qm) model_id ...
26.6
131
0.771482
import datetime import numpy as np import os import sys sys.path.insert(0, os.getcwd()) from hyperopt import hp, fmin, tpe import qml_workdir.classes.config from qml.cv import QCV from qml.models import QXgb, QAvg, QAvgOneModelData from qml_workdir.classes.models import qm trash wrong model cv = QCV(qm) model_id ...
false
true