hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f74e72d400feb790816dacd6a9269d0a34b4fa53
2,707
py
Python
app/core/tests/test_models.py
sorwarduet/recipe-app-api
ab13680369a693e5bf9d864328384f5781722cc2
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
sorwarduet/recipe-app-api
ab13680369a693e5bf9d864328384f5781722cc2
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
sorwarduet/recipe-app-api
ab13680369a693e5bf9d864328384f5781722cc2
[ "MIT" ]
null
null
null
import uuid from unittest.mock import patch from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@test.com', password='testpass'): """Create the sample user for test""" return get_user_model().objects.create_user(email,password) cl...
28.197917
70
0.623569
import uuid from unittest.mock import patch from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@test.com', password='testpass'): return get_user_model().objects.create_user(email,password) class ModelTests(TestCase): def test_us...
true
true
f74e743f9b6cb9cc702a94db6a855b47204b5c3f
1,480
py
Python
chapter_13/getfile.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_13/getfile.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_13/getfile.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
"Download utility" #!/usr/local/bin/python """ Fetch an arbitrary file by FTP. Anonymous FTP unless you pass a user=(name, pswd) tuple. Self-test FTPs a test file and site. """ from ftplib import FTP # socket-based FTP tools from os.path import exists # file existence test def getfile(f...
32.173913
83
0.589865
from ftplib import FTP from os.path import exists def getfile(file, site, dir, user=(), *, verbose=True, refetch=False): if exists(file) and not refetch: if verbose: print(file, 'already fetched') else: if verbose: print('Downloading', file) local = op...
true
true
f74e74afdc50a91e76566d1986577c266b4f4af9
12,515
py
Python
data/user_input/model/setup/acoustic/specificimpedanceInput.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
23
2020-01-14T12:49:11.000Z
2021-11-10T05:19:29.000Z
data/user_input/model/setup/acoustic/specificimpedanceInput.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
101
2020-01-23T19:29:00.000Z
2022-03-15T17:56:23.000Z
data/user_input/model/setup/acoustic/specificimpedanceInput.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
3
2020-01-14T12:49:26.000Z
2022-01-13T02:06:53.000Z
from data.user_input.project.printMessageInput import PrintMessageInput import os from os.path import basename import numpy as np from PyQt5.QtWidgets import QToolButton, QPushButton, QLineEdit, QFileDialog, QDialog, QTabWidget, QWidget, QTreeWidgetItem, QTreeWidget, QSpinBox from PyQt5.QtGui import QIcon from PyQt5.Q...
44.222615
156
0.669117
from data.user_input.project.printMessageInput import PrintMessageInput import os from os.path import basename import numpy as np from PyQt5.QtWidgets import QToolButton, QPushButton, QLineEdit, QFileDialog, QDialog, QTabWidget, QWidget, QTreeWidgetItem, QTreeWidget, QSpinBox from PyQt5.QtGui import QIcon from PyQt5.Q...
true
true
f74e750e6c96f16bba84fd130d5423adea67bf3f
3,642
py
Python
backend/server/wopr/forms/turbine.py
JenardKin/django-react-boilerplate
dde2c817a502e1bed4c4c0618b10b3a381eff6cf
[ "MIT" ]
null
null
null
backend/server/wopr/forms/turbine.py
JenardKin/django-react-boilerplate
dde2c817a502e1bed4c4c0618b10b3a381eff6cf
[ "MIT" ]
null
null
null
backend/server/wopr/forms/turbine.py
JenardKin/django-react-boilerplate
dde2c817a502e1bed4c4c0618b10b3a381eff6cf
[ "MIT" ]
null
null
null
from django import forms from wopr.utils import makeTurbineList, makeSiteList from wopr.models import TSiteconfig from wopr.widgets import XDSoftDateTimePickerInput class TurbineSelectionForm(forms.Form): # Default values CHOICES = list(range(1, 100)) start_time = forms.DateTimeField(input_formats=['%d/%m...
56.030769
136
0.683965
from django import forms from wopr.utils import makeTurbineList, makeSiteList from wopr.models import TSiteconfig from wopr.widgets import XDSoftDateTimePickerInput class TurbineSelectionForm(forms.Form): CHOICES = list(range(1, 100)) start_time = forms.DateTimeField(input_formats=['%d/%m/%Y %H:%M'], wid...
true
true
f74e7547dcbdb1a6023e6947235912e4c1c29048
287
py
Python
package/tests/data/postprocessing_examples/output/result4_pre.py
MrKriss/stonemason
d78becc9168c2566b31b48c9a951e2823bc98362
[ "MIT" ]
2
2017-11-13T17:40:52.000Z
2021-05-08T15:58:28.000Z
package/tests/data/postprocessing_examples/output/result4_pre.py
MrKriss/masonry
d78becc9168c2566b31b48c9a951e2823bc98362
[ "MIT" ]
3
2017-09-03T22:58:37.000Z
2017-09-12T21:45:27.000Z
package/tests/data/postprocessing_examples/output/result4_pre.py
MrKriss/stonemason
d78becc9168c2566b31b48c9a951e2823bc98362
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- MY_CONSTANT = 12124 def my_new_first_function(arg1, arg2): """This is my doc string of things""" ans = arg1 * arg2 return ans a = 10 b = 20 if __name__ == '__main__': print(function1(5, 6)) print(function2(5, 6))
14.35
41
0.609756
MY_CONSTANT = 12124 def my_new_first_function(arg1, arg2): ans = arg1 * arg2 return ans a = 10 b = 20 if __name__ == '__main__': print(function1(5, 6)) print(function2(5, 6))
true
true
f74e75633a8b9389dad6f1442f6f320370b6a185
19,268
py
Python
scripts/west_commands/build.py
jakub-uC/zephyr
d66d748b710ef7520d25d01752ea8a8c89c9e788
[ "Apache-2.0" ]
7
2021-07-27T00:12:02.000Z
2022-03-09T14:40:13.000Z
scripts/west_commands/build.py
jakub-uC/zephyr
d66d748b710ef7520d25d01752ea8a8c89c9e788
[ "Apache-2.0" ]
17
2021-02-16T12:10:08.000Z
2022-02-17T15:13:21.000Z
scripts/west_commands/build.py
jakub-uC/zephyr
d66d748b710ef7520d25d01752ea8a8c89c9e788
[ "Apache-2.0" ]
3
2018-09-05T11:29:34.000Z
2021-03-19T06:55:54.000Z
# Copyright (c) 2018 Foundries.io # # SPDX-License-Identifier: Apache-2.0 import argparse import os import pathlib import shlex import sys from west import log from west.configuration import config from zcmake import DEFAULT_CMAKE_GENERATOR, run_cmake, run_build, CMakeCache from build_helpers import is_zephyr_build, ...
41.796095
79
0.588644
import argparse import os import pathlib import shlex import sys from west import log from west.configuration import config from zcmake import DEFAULT_CMAKE_GENERATOR, run_cmake, run_build, CMakeCache from build_helpers import is_zephyr_build, find_build_dir, \ FIND_BUILD_DIR_DESCRIPTION from zephyr_ext_commo...
true
true
f74e7586663eabcd4b568113d93421bfbbcbfc5a
5,012
py
Python
SearchFiles.py
sempf/AndroidCodeReview
e0de665832cdb00a597b1bb7b4baed4578e96a3a
[ "MIT" ]
null
null
null
SearchFiles.py
sempf/AndroidCodeReview
e0de665832cdb00a597b1bb7b4baed4578e96a3a
[ "MIT" ]
null
null
null
SearchFiles.py
sempf/AndroidCodeReview
e0de665832cdb00a597b1bb7b4baed4578e96a3a
[ "MIT" ]
null
null
null
""" SYNOPSIS SearchFiles DESCRIPTION Searches reversed Android codebases for vulnerabilities from the OWASP Mobile Testing Plan, and POINT research USAGE python SearchFiles AUTHOR Bill Sempf <bill@pointweb.net> VERSION 0.1.0.0 """ import os with open("C:/Temp/result.txt", "w") as resul...
48.192308
120
0.443735
import os with open("C:/Temp/result.txt", "w") as results: for root, dirs, files in os.walk("C:\\temp\\project", topdown=False): for filename in files: with open(os.path.join(root,filename)) as currentFile: text = currentFile.read() if ('MODE_PRIVATE' in text) or...
true
true
f74e75df278495669b335d0c715ecb87058b06da
3,955
py
Python
invasion.py
johnnyapol/invasion-tracker-twitter-bot
208c10608160f2730e54777a256377a6731033fe
[ "MIT" ]
null
null
null
invasion.py
johnnyapol/invasion-tracker-twitter-bot
208c10608160f2730e54777a256377a6731033fe
[ "MIT" ]
null
null
null
invasion.py
johnnyapol/invasion-tracker-twitter-bot
208c10608160f2730e54777a256377a6731033fe
[ "MIT" ]
null
null
null
''' Created on May 3, 2016 @author: johnnyapol ''' from urllib.request import urlopen # Try to import simplejson, otherwise fallback to json try: import simplejson as json except ImportError: import json class Invasion: # Global Vars API = "https://www.toontownrewritten.com/api/in...
37.666667
110
0.51555
from urllib.request import urlopen try: import simplejson as json except ImportError: import json class Invasion: API = "https://www.toontownrewritten.com/api/invasions" CHECK_FREQUENCY = 2 updated = -1 invList = [] def __init__(self, _tweetmgr): ...
true
true
f74e7740fb202ee8e255186042bdb159c248fb85
781
py
Python
jinjamator/plugins/content/json.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
7
2020-05-06T07:48:14.000Z
2021-12-11T15:57:26.000Z
jinjamator/plugins/content/json.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
1
2020-04-11T15:13:07.000Z
2020-04-27T20:01:34.000Z
jinjamator/plugins/content/json.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
1
2020-05-29T08:53:08.000Z
2020-05-29T08:53:08.000Z
# Copyright 2019 Wilhelm Putz # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
31.24
74
0.751601
from json import dumps as json_dumps, loads as json_loads def dumps(data): return json_dumps(data, sort_keys=True, indent=2) def loads(data): return json_loads(data)
true
true
f74e78cf2d25d779e5ac98dedbad042ed45424dc
5,434
py
Python
apps/pig/src/pig/management/commands/pig_setup.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
apps/pig/src/pig/management/commands/pig_setup.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
apps/pig/src/pig/management/commands/pig_setup.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
35.986755
107
0.704637
import json import logging import os import sys from django.core import management from django.core.management.base import BaseCommand from django.db import transaction from desktop.conf import USE_NEW_EDITOR from desktop.lib import paths from desktop.models import Directory, Document, Document2, Doc...
true
true
f74e794c8be8902796a2b45001c1a20d727a7aed
6,013
py
Python
docusign_esign/models/recipient_update_response.py
hunk/docusign-python-client
a643c42c1236715e74eef6fc279a1b29da1b5455
[ "MIT" ]
null
null
null
docusign_esign/models/recipient_update_response.py
hunk/docusign-python-client
a643c42c1236715e74eef6fc279a1b29da1b5455
[ "MIT" ]
null
null
null
docusign_esign/models/recipient_update_response.py
hunk/docusign-python-client
a643c42c1236715e74eef6fc279a1b29da1b5455
[ "MIT" ]
null
null
null
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from p...
27.967442
126
0.589223
from pprint import pformat from six import iteritems import re class RecipientUpdateResponse(object): def __init__(self, combined=None, error_details=None, recipient_id=None, recipient_id_guid=None, tabs=None): self.swagger_types = { 'combined': 'str', 'error_details': 'ErrorDe...
true
true
f74e7a7cdc36ddb594f6181727cad88e20167890
12,225
py
Python
falcon/util/uri.py
mostrovsky/falcon
ca47895d9d04ec85e5032b26cc62495a9c35a036
[ "Apache-2.0" ]
1
2020-07-11T14:38:32.000Z
2020-07-11T14:38:32.000Z
falcon/util/uri.py
repustate/falcon
ca47895d9d04ec85e5032b26cc62495a9c35a036
[ "Apache-2.0" ]
null
null
null
falcon/util/uri.py
repustate/falcon
ca47895d9d04ec85e5032b26cc62495a9c35a036
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 by Rackspace Hosting, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
34.730114
78
0.641554
import six _UNRESERVED = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' '0123456789' '-._~') _DELIMITERS = ":/?#[]@!$&'()*+,;=" _ALL_ALLOWED = _UNRESERVED + _DELIMITERS _HEX_DIGITS = '0123456789ABCDEFabcdef' def _create_char_encoder(allowed_c...
true
true
f74e7b0614d01c21e92a3547d2e3b6f20d964807
868
py
Python
apps/news/serializers.py
dengjinshan/xfz
2387a214a81b1487518c358291944d84736d7fff
[ "MIT" ]
null
null
null
apps/news/serializers.py
dengjinshan/xfz
2387a214a81b1487518c358291944d84736d7fff
[ "MIT" ]
null
null
null
apps/news/serializers.py
dengjinshan/xfz
2387a214a81b1487518c358291944d84736d7fff
[ "MIT" ]
null
null
null
from rest_framework import serializers from apps.news.models import News, NewsCategory, Comment, Banner from apps.xfzauth.serializers import UserSeralizers class NewsCategorySerializers(serializers.ModelSerializer): class Meta: model = NewsCategory fields = ['id', 'name'] class NewsSerializers(s...
31
75
0.690092
from rest_framework import serializers from apps.news.models import News, NewsCategory, Comment, Banner from apps.xfzauth.serializers import UserSeralizers class NewsCategorySerializers(serializers.ModelSerializer): class Meta: model = NewsCategory fields = ['id', 'name'] class NewsSerializers(s...
true
true
f74e7b1966a703056a8fed61ed3153103771de13
1,685
py
Python
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/tests/network/statistics/test_table.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
2
2018-11-07T20:52:53.000Z
2019-10-20T15:57:01.000Z
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/tests/network/statistics/test_table.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
3
2021-12-14T20:57:54.000Z
2022-01-21T23:50:36.000Z
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/tests/network/statistics/test_table.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
2
2018-11-16T04:20:06.000Z
2019-03-28T23:49:13.000Z
# # Copyright 2014 NEC Corporation. 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 a...
33.7
76
0.667062
from ceilometer.network.statistics import table from ceilometer import sample from ceilometer.tests.network import statistics class TestTablePollsters(statistics._PollsterTestBase): def test_table_pollster(self): self._test_pollster( table.TablePollster, ...
true
true
f74e7b233bbb33cccf804f4c4cd582fd0442b5f4
1,526
py
Python
tensorflow/mandelbrot-set.py
MaraniMatias/machine-learning
5346a60d0a16942a889d67b4c313b9332eb8f50a
[ "MIT" ]
null
null
null
tensorflow/mandelbrot-set.py
MaraniMatias/machine-learning
5346a60d0a16942a889d67b4c313b9332eb8f50a
[ "MIT" ]
null
null
null
tensorflow/mandelbrot-set.py
MaraniMatias/machine-learning
5346a60d0a16942a889d67b4c313b9332eb8f50a
[ "MIT" ]
null
null
null
# Import libraries for simulation import tensorflow as tf import numpy as np # Imports for visualization import PIL.Image from io import BytesIO from IPython.display import Image, display def DisplayFractal(a, fmt='jpeg'): """Display an array of iteration counts as a colorful picture of a fractal.""" ...
24.222222
55
0.653342
import tensorflow as tf import numpy as np import PIL.Image from io import BytesIO from IPython.display import Image, display def DisplayFractal(a, fmt='jpeg'): a_cyclic = (6.28*a/20.0).reshape(list(a.shape)+[1]) img = np.concatenate([10+20*np.cos(a_cyclic), 30+50*np.sin(a_cyclic)...
true
true
f74e7c81e9020aabb957b8d7c091d162317c45c9
211,319
py
Python
venv/Lib/site-packages/apache_beam/portability/api/beam_runner_api_pb2.py
mf2199/beam_bigtable
54444e1109ad30017e7a849e88de266cc39571d6
[ "RSA-MD" ]
null
null
null
venv/Lib/site-packages/apache_beam/portability/api/beam_runner_api_pb2.py
mf2199/beam_bigtable
54444e1109ad30017e7a849e88de266cc39571d6
[ "RSA-MD" ]
null
null
null
venv/Lib/site-packages/apache_beam/portability/api/beam_runner_api_pb2.py
mf2199/beam_bigtable
54444e1109ad30017e7a849e88de266cc39571d6
[ "RSA-MD" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: beam_runner_api.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection a...
43.960682
22,125
0.76499
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google...
true
true
f74e7ce3149f1d1d021b154c376426d5033152d1
108,275
py
Python
musicbot/bot.py
Naryxian/GUBot
058f41a9471b2b3ffd63b7f64d10ec6fc17cab0f
[ "MIT" ]
null
null
null
musicbot/bot.py
Naryxian/GUBot
058f41a9471b2b3ffd63b7f64d10ec6fc17cab0f
[ "MIT" ]
null
null
null
musicbot/bot.py
Naryxian/GUBot
058f41a9471b2b3ffd63b7f64d10ec6fc17cab0f
[ "MIT" ]
null
null
null
import os import sys import time import shlex import shutil import random import inspect import logging import asyncio import pathlib import traceback import math import re import aiohttp import discord import colorlog from io import BytesIO, StringIO from functools import wraps from textwrap impo...
40.446395
155
0.563648
import os import sys import time import shlex import shutil import random import inspect import logging import asyncio import pathlib import traceback import math import re import aiohttp import discord import colorlog from io import BytesIO, StringIO from functools import wraps from textwrap impo...
true
true
f74e7d015d655fa7f6fffdcf138581ef2c3d163f
1,225
py
Python
custom_components/hacs/hacsbase/exceptions.py
rgruebel/hacs
1d461747f107afd2a9b2a78f21179ecfee9e2d50
[ "MIT" ]
5
2019-08-30T00:20:06.000Z
2021-09-04T10:29:42.000Z
custom_components/hacs/hacsbase/exceptions.py
rgruebel/hacs
1d461747f107afd2a9b2a78f21179ecfee9e2d50
[ "MIT" ]
null
null
null
custom_components/hacs/hacsbase/exceptions.py
rgruebel/hacs
1d461747f107afd2a9b2a78f21179ecfee9e2d50
[ "MIT" ]
1
2021-12-10T16:23:31.000Z
2021-12-10T16:23:31.000Z
"""Custom Exceptions.""" class HacsBaseException(Exception): """Super basic.""" class HacsUserScrewupException(HacsBaseException): """Raise this when the user does something they should not do.""" class HacsNotSoBasicException(HacsBaseException): """Not that basic.""" class HacsDataFileMissing(HacsB...
26.630435
82
0.727347
class HacsBaseException(Exception): class HacsUserScrewupException(HacsBaseException): class HacsNotSoBasicException(HacsBaseException): class HacsDataFileMissing(HacsBaseException): class HacsDataNotExpected(HacsBaseException): class HacsRepositoryInfo(HacsBaseException): class HacsRequirement(HacsBaseEx...
true
true
f74e7d62c528d8465165965b41bdd2383e04318b
516
py
Python
inception/utils/make-data-directories.py
HazyResearch/models
7027d1c4e730c20d2de94998302227f23c5e19f7
[ "Apache-2.0" ]
4
2017-02-25T02:18:31.000Z
2019-08-08T15:05:16.000Z
inception/utils/make-data-directories.py
HazyResearch/models
7027d1c4e730c20d2de94998302227f23c5e19f7
[ "Apache-2.0" ]
null
null
null
inception/utils/make-data-directories.py
HazyResearch/models
7027d1c4e730c20d2de94998302227f23c5e19f7
[ "Apache-2.0" ]
1
2021-11-15T17:11:47.000Z
2021-11-15T17:11:47.000Z
#!/bin/python import sys from os import listdir import os from shutil import copyfile if __name__=='__main__': if len(sys.argv) != 2: print("Usage: %s <data-folder>" % __file__) exit(1) folder = sys.argv[1] for i in range(16): os.mkdir(folder+"-"+str(i)) #print folder+"-"+...
19.846154
51
0.527132
import sys from os import listdir import os from shutil import copyfile if __name__=='__main__': if len(sys.argv) != 2: print("Usage: %s <data-folder>" % __file__) exit(1) folder = sys.argv[1] for i in range(16): os.mkdir(folder+"-"+str(i)) j = 0 for f in listdi...
true
true
f74e7f150ef7ddf362a5ee7cdc8f02209e260174
7,377
py
Python
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Tools/python/pylint/checkers/newstyle.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Tools/python/pylint/checkers/newstyle.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Tools/python/pylint/checkers/newstyle.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
# Copyright (c) 2005-2014 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, o...
42.641618
85
0.558764
import sys import astroid from pylint.interfaces import IAstroidChecker, INFERENCE, INFERENCE_FAILURE, HIGH from pylint.checkers import BaseChecker from pylint.checkers.utils import ( check_messages, has_known_bases, node_frame_class, ) MSGS = { 'E1001': ('Use of __slots__ on an old st...
true
true
f74e80333e037192e38a638bb5882c19616a0899
11,066
py
Python
venv/lib/python3.8/site-packages/plotly/validators/scatter/marker/_colorbar.py
SvtFilatov/soccer-predict-prices
b003ebd7c3657688790183ef7d719c42290c11b9
[ "MIT" ]
10
2021-05-31T07:18:08.000Z
2022-03-19T09:20:11.000Z
venv/lib/python3.8/site-packages/plotly/validators/scatter/marker/_colorbar.py
SvtFilatov/soccer-predict-prices
b003ebd7c3657688790183ef7d719c42290c11b9
[ "MIT" ]
1
2021-08-03T12:23:01.000Z
2021-08-10T08:35:22.000Z
venv/lib/python3.8/site-packages/plotly/validators/scatter/marker/_colorbar.py
SvtFilatov/soccer-predict-prices
b003ebd7c3657688790183ef7d719c42290c11b9
[ "MIT" ]
3
2021-01-31T16:40:52.000Z
2021-08-29T18:32:34.000Z
import _plotly_utils.basevalidators class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="scatter.marker", **kwargs): super(ColorbarValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
47.290598
87
0.525935
import _plotly_utils.basevalidators class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="scatter.marker", **kwargs): super(ColorbarValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
true
true
f74e80440cdec91b2163c5ede49ec2e2c002e828
29,798
py
Python
ironic/common/neutron.py
mpardhi23/ironic
66b07398310db1b4c26e1ba9fda247328478ed67
[ "Apache-2.0" ]
null
null
null
ironic/common/neutron.py
mpardhi23/ironic
66b07398310db1b4c26e1ba9fda247328478ed67
[ "Apache-2.0" ]
null
null
null
ironic/common/neutron.py
mpardhi23/ironic
66b07398310db1b4c26e1ba9fda247328478ed67
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
39.363276
79
0.647023
from neutronclient.common import exceptions as neutron_exceptions from neutronclient.v2_0 import client as clientv20 from oslo_log import log from oslo_utils import uuidutils import retrying from ironic.api.controllers.v1 import types from ironic.common import context as ironic_context from ironic.common i...
true
true
f74e8128ab731ab58c03214a3e6f1dfef6e8e675
403
py
Python
python_aulas/desaf101_funcao_2_voto.py
gilsonaureliano/Python-aulas
64269872acd482bcf297941ba28d30f13f29c752
[ "MIT" ]
1
2021-08-05T13:52:12.000Z
2021-08-05T13:52:12.000Z
python_aulas/desaf101_funcao_2_voto.py
gilsonaureliano/Python-aulas
64269872acd482bcf297941ba28d30f13f29c752
[ "MIT" ]
null
null
null
python_aulas/desaf101_funcao_2_voto.py
gilsonaureliano/Python-aulas
64269872acd482bcf297941ba28d30f13f29c752
[ "MIT" ]
null
null
null
def voto(n): from datetime import date global ano ano = date.today().year - n if 65 > ano >= 18: r = 'OBRIGATÓRIO' return r if ano < 18: r = 'NEGADO' return r if ano > 65: r = 'OPCIONAL' return r # programa principal print('-=' * 20) ano = int(i...
18.318182
39
0.523573
def voto(n): from datetime import date global ano ano = date.today().year - n if 65 > ano >= 18: r = 'OBRIGATÓRIO' return r if ano < 18: r = 'NEGADO' return r if ano > 65: r = 'OPCIONAL' return r print('-=' * 20) ano = int(input('Ano de nascime...
true
true
f74e815086d6f4068053d04deb70c502514f7a8f
5,430
py
Python
tests/loggers/test_all.py
bernardomig/pytorch-lightning
12b6608850a5fa6b9489ddfcfe98a54dbf99b81b
[ "Apache-2.0" ]
null
null
null
tests/loggers/test_all.py
bernardomig/pytorch-lightning
12b6608850a5fa6b9489ddfcfe98a54dbf99b81b
[ "Apache-2.0" ]
null
null
null
tests/loggers/test_all.py
bernardomig/pytorch-lightning
12b6608850a5fa6b9489ddfcfe98a54dbf99b81b
[ "Apache-2.0" ]
null
null
null
import inspect import pickle import platform import pytest import tests.base.develop_utils as tutils from pytorch_lightning import Trainer, Callback from pytorch_lightning.loggers import ( TensorBoardLogger, MLFlowLogger, NeptuneLogger, TestTubeLogger, CometLogger, WandbLogger, ) from pytorch_...
30.335196
110
0.684899
import inspect import pickle import platform import pytest import tests.base.develop_utils as tutils from pytorch_lightning import Trainer, Callback from pytorch_lightning.loggers import ( TensorBoardLogger, MLFlowLogger, NeptuneLogger, TestTubeLogger, CometLogger, WandbLogger, ) from pytorch_...
true
true
f74e819a21980a9b01060b4dc6a1be9ac63a385e
137
py
Python
profiles/templatetags/profile_tags.py
RamezIssac/djangopackages
2b54b0ae95ef805c07ca3c0b9c5184466b65c23a
[ "MIT" ]
383
2015-05-06T03:51:51.000Z
2022-03-26T07:56:44.000Z
profiles/templatetags/profile_tags.py
RamezIssac/djangopackages
2b54b0ae95ef805c07ca3c0b9c5184466b65c23a
[ "MIT" ]
257
2017-04-17T08:31:16.000Z
2022-03-27T02:30:49.000Z
profiles/templatetags/profile_tags.py
RamezIssac/djangopackages
2b54b0ae95ef805c07ca3c0b9c5184466b65c23a
[ "MIT" ]
105
2017-04-17T06:21:26.000Z
2022-03-30T05:24:19.000Z
from django import template register = template.Library() @register.filter def package_usage(user): return user.package_set.all()
15.222222
33
0.766423
from django import template register = template.Library() @register.filter def package_usage(user): return user.package_set.all()
true
true
f74e827ab6ff912a6015a4e162abb2b78b4e934f
125
py
Python
ictf_pipeline/data_models/__init__.py
rlongo/ictf-gradings-paperwork
46540fdcbaabd6331f3f56e16bca4eaa27ca3e37
[ "MIT" ]
null
null
null
ictf_pipeline/data_models/__init__.py
rlongo/ictf-gradings-paperwork
46540fdcbaabd6331f3f56e16bca4eaa27ca3e37
[ "MIT" ]
null
null
null
ictf_pipeline/data_models/__init__.py
rlongo/ictf-gradings-paperwork
46540fdcbaabd6331f3f56e16bca4eaa27ca3e37
[ "MIT" ]
null
null
null
from .student import Student, StudentIterator from .belt_level import BeltLevel, BeltLookup from .paperwork import Paperwork
31.25
45
0.848
from .student import Student, StudentIterator from .belt_level import BeltLevel, BeltLookup from .paperwork import Paperwork
true
true
f74e82917c59d3e8a61ef2b91270ffc1c81558c9
25,257
py
Python
ms2deepscore/data_generators.py
pedrocwb/ms2deepscore
fb6b131d9b7a80a98185fca49cddca5b162dc0cc
[ "Apache-2.0" ]
null
null
null
ms2deepscore/data_generators.py
pedrocwb/ms2deepscore
fb6b131d9b7a80a98185fca49cddca5b162dc0cc
[ "Apache-2.0" ]
null
null
null
ms2deepscore/data_generators.py
pedrocwb/ms2deepscore
fb6b131d9b7a80a98185fca49cddca5b162dc0cc
[ "Apache-2.0" ]
null
null
null
""" Data generators for training/inference with siamese Keras model. """ import warnings from typing import List, Iterator, NamedTuple import numpy as np import pandas as pd from tensorflow.keras.utils import Sequence from .typing import BinnedSpectrumType class SpectrumPair(NamedTuple): """ Represents a pa...
50.413174
147
0.661203
import warnings from typing import List, Iterator, NamedTuple import numpy as np import pandas as pd from tensorflow.keras.utils import Sequence from .typing import BinnedSpectrumType class SpectrumPair(NamedTuple): spectrum1: BinnedSpectrumType spectrum2: BinnedSpectrumType class DataGeneratorBase(Sequen...
true
true
f74e82d3b47fb0ecdb7dd9a5c85bc49c11a61746
627
py
Python
imp.py
gnstrg/slashbot
c6f343815a8dae5caa4776dca33e4130b38f8d30
[ "MIT" ]
4
2021-07-15T22:12:56.000Z
2021-09-03T21:35:25.000Z
imp.py
gnstrg/slashbot
c6f343815a8dae5caa4776dca33e4130b38f8d30
[ "MIT" ]
1
2021-07-28T05:04:24.000Z
2021-08-04T18:52:35.000Z
imp.py
gnstrg/slashbot
c6f343815a8dae5caa4776dca33e4130b38f8d30
[ "MIT" ]
1
2021-07-26T16:23:55.000Z
2021-07-26T16:23:55.000Z
from df import * from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from time import sleep import colorama from colorama import Fore from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.chrome.options import Options colorama.init(c...
36.882353
76
0.821372
from df import * from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from time import sleep import colorama from colorama import Fore from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.chrome.options import Options colorama.init(c...
true
true
f74e8313b025567d0fb17371c02ec44f50c49aa7
1,652
py
Python
test/acceptance/test_gecko.py
ronymesquita/webdrivermanager
75c26dd7ae7ae301e8e917a229c08a2cf8616a77
[ "MIT" ]
82
2018-10-27T14:12:20.000Z
2022-01-17T05:17:22.000Z
test/acceptance/test_gecko.py
ronymesquita/webdrivermanager
75c26dd7ae7ae301e8e917a229c08a2cf8616a77
[ "MIT" ]
45
2018-10-28T11:38:20.000Z
2021-12-15T23:04:10.000Z
test/acceptance/test_gecko.py
ronymesquita/webdrivermanager
75c26dd7ae7ae301e8e917a229c08a2cf8616a77
[ "MIT" ]
30
2019-10-09T00:38:57.000Z
2022-01-16T19:40:01.000Z
import sys from flaky import flaky from .tools import SRC_ROOT, AutomaticBaseTest, ExplicitBaseTest, NO_FILE, NO_LINK_FILE sys.path.append(SRC_ROOT) import webdrivermanager # noqa: E402 I001 class GeckoDriverManagerTestsWithAutomaticLocations(AutomaticBaseTest): DRIVER_MANAGER = webdrivermanager.GeckoDriverMan...
38.418605
103
0.762107
import sys from flaky import flaky from .tools import SRC_ROOT, AutomaticBaseTest, ExplicitBaseTest, NO_FILE, NO_LINK_FILE sys.path.append(SRC_ROOT) import webdrivermanager class GeckoDriverManagerTestsWithAutomaticLocations(AutomaticBaseTest): DRIVER_MANAGER = webdrivermanager.GeckoDriverManager @flaky ...
true
true
f74e83dd03c704275eed51e233989c582d5b9211
803
py
Python
console.py
msewell13/azalia
034aa86624ef50ff4ab6521fae2289ef10c4e10a
[ "MIT" ]
null
null
null
console.py
msewell13/azalia
034aa86624ef50ff4ab6521fae2289ef10c4e10a
[ "MIT" ]
null
null
null
console.py
msewell13/azalia
034aa86624ef50ff4ab6521fae2289ef10c4e10a
[ "MIT" ]
1
2020-11-29T11:22:35.000Z
2020-11-29T11:22:35.000Z
from functions import * # Set up a loop where users can choose what they'd like to do. choice = '' display_title_bar() while choice != 'q': print('\n[1] Run payroll') print('[2] Get tenant invoices') print('[3] Email tenant invoices') print('[4] Get Bank Transactions') print('[5] Create Documents') print(...
20.075
62
0.672478
from functions import * choice = '' display_title_bar() while choice != 'q': print('\n[1] Run payroll') print('[2] Get tenant invoices') print('[3] Email tenant invoices') print('[4] Get Bank Transactions') print('[5] Create Documents') print('[q] Quit.') choice = input("\nPlease select an option: ") ...
true
true
f74e84f87cc4eedc89285b598a08587132ffa92f
156
py
Python
ewerobot/__init__.py
crazygit/ewerobot
4b9ce2770ca2d33bb807870cdfd58209198f2c59
[ "MIT" ]
null
null
null
ewerobot/__init__.py
crazygit/ewerobot
4b9ce2770ca2d33bb807870cdfd58209198f2c59
[ "MIT" ]
null
null
null
ewerobot/__init__.py
crazygit/ewerobot
4b9ce2770ca2d33bb807870cdfd58209198f2c59
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for Enhance WeRobot.""" __author__ = """Crazygit""" __email__ = 'crazygit@foxmail.com' __version__ = '0.1.0'
19.5
44
0.647436
__author__ = """Crazygit""" __email__ = 'crazygit@foxmail.com' __version__ = '0.1.0'
true
true
f74e85a0fd15de698353fef506c669f20dfad351
55,543
py
Python
google/pubsub_v1/services/publisher/client.py
andreas-prinz/gcp-python-pubsub
d40d02713c8c189937ae5c21d099b88a3131a59f
[ "Apache-2.0" ]
null
null
null
google/pubsub_v1/services/publisher/client.py
andreas-prinz/gcp-python-pubsub
d40d02713c8c189937ae5c21d099b88a3131a59f
[ "Apache-2.0" ]
null
null
null
google/pubsub_v1/services/publisher/client.py
andreas-prinz/gcp-python-pubsub
d40d02713c8c189937ae5c21d099b88a3131a59f
[ "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 o...
40.900589
106
0.602038
from collections import OrderedDict from distutils import util import functools import os import re from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions ...
true
true
f74e860aa8de9020810b476fefa9e12d99c4785f
119
py
Python
salespersonTrackerREST/apps.py
Rashmil-1999/salesperson-tracker-web
fb8fbb8b90b1f197d79836c6f856499abce89d8b
[ "MIT" ]
4
2020-02-29T05:53:42.000Z
2020-06-27T09:54:43.000Z
salespersonTrackerREST/apps.py
Rashmil-1999/salesperson-tracker-web
fb8fbb8b90b1f197d79836c6f856499abce89d8b
[ "MIT" ]
11
2020-03-06T17:59:16.000Z
2022-03-12T00:18:47.000Z
salespersonTrackerREST/apps.py
Rashmil-1999/salesperson-tracker-web
fb8fbb8b90b1f197d79836c6f856499abce89d8b
[ "MIT" ]
25
2020-02-07T14:10:35.000Z
2020-09-30T18:42:38.000Z
from django.apps import AppConfig class SalespersontrackerrestConfig(AppConfig): name = "salespersonTrackerREST"
19.833333
46
0.815126
from django.apps import AppConfig class SalespersontrackerrestConfig(AppConfig): name = "salespersonTrackerREST"
true
true
f74e87271c3663c99ad85e48cadaa3c4efbbb5a4
2,794
py
Python
docs/samples/specification/azure_key_credential/generated/azure/key/credential/sample/_configuration.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
docs/samples/specification/azure_key_credential/generated/azure/key/credential/sample/_configuration.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
docs/samples/specification/azure_key_credential/generated/azure/key/credential/sample/_configuration.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
44.349206
130
0.683608
from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from ._version import VERSION if TYPE_CHECKING: from typing import Any from azure.core.credentials import AzureKeyCredential class AutoRestHeadTestServiceConfiguration(...
true
true
f74e88079c3258c3d77bec8a73399b79ecdcf5f2
3,110
py
Python
become_plugins/dzdosu.py
romary22/ansible
8792c326a592ff3afd2d14c2e0f223a7a30bd58a
[ "MIT" ]
null
null
null
become_plugins/dzdosu.py
romary22/ansible
8792c326a592ff3afd2d14c2e0f223a7a30bd58a
[ "MIT" ]
null
null
null
become_plugins/dzdosu.py
romary22/ansible
8792c326a592ff3afd2d14c2e0f223a7a30bd58a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ become: dzdosu short_description: su with Centrify's Direct Authorize description: - This become plugins allows your remote/login user to execute commands as another u...
32.736842
125
0.558199
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ become: dzdosu short_description: su with Centrify's Direct Authorize description: - This become plugins allows your remote/login user to execute commands as another user with su via the dzd...
true
true
f74e8a8687be5f15f69b3c654df25663aa5ee2f7
7,992
py
Python
adaptnlp/inference/text_generation.py
chsafouane/adaptnlp
34bfb8fef32d1e59f89a94799db87ed6da774965
[ "Apache-2.0" ]
410
2020-02-10T02:33:30.000Z
2022-03-18T15:23:54.000Z
adaptnlp/inference/text_generation.py
chsafouane/adaptnlp
34bfb8fef32d1e59f89a94799db87ed6da774965
[ "Apache-2.0" ]
73
2020-02-19T17:55:07.000Z
2021-11-27T12:26:09.000Z
adaptnlp/inference/text_generation.py
chsafouane/adaptnlp
34bfb8fef32d1e59f89a94799db87ed6da774965
[ "Apache-2.0" ]
39
2020-02-22T14:07:00.000Z
2021-12-21T17:39:29.000Z
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/09_text_generation.ipynb (unless otherwise specified). __all__ = ['logger', 'TransformersTextGenerator', 'EasyTextGenerator'] # Cell import logging from typing import List, Dict, Union from collections import defaultdict import torch from torch.utils.data import Tensor...
37.521127
206
0.615365
__all__ = ['logger', 'TransformersTextGenerator', 'EasyTextGenerator'] import logging from typing import List, Dict, Union from collections import defaultdict import torch from torch.utils.data import TensorDataset from transformers import ( AutoTokenizer, AutoModelForCausalLM, PreTrainedTokenizer, ...
true
true
f74e8ab9a882349f3871c5838718b0a0bbabcd64
3,290
py
Python
omega_miya/plugins/draw/deck/course.py
rinrini001/omega-miya
53a6683fccb0618e306abe9e103cec78445f3796
[ "MIT" ]
120
2021-04-20T13:20:46.000Z
2022-03-26T05:43:21.000Z
omega_miya/plugins/draw/deck/course.py
rinrini001/omega-miya
53a6683fccb0618e306abe9e103cec78445f3796
[ "MIT" ]
57
2021-04-20T08:10:14.000Z
2022-03-28T01:55:14.000Z
omega_miya/plugins/draw/deck/course.py
rinrini001/omega-miya
53a6683fccb0618e306abe9e103cec78445f3796
[ "MIT" ]
32
2021-04-21T01:57:17.000Z
2022-03-01T18:06:34.000Z
import datetime import random import hashlib basic = { '一元微积分', '多元微积分', '高等微积分', '几何与代数', '随机数学方法', '概率论与数理统计', '线性代数', '复变函数引论', '大学物理', '数理方程引', '数值分析', '离散数学', '离散数学(Ⅱ)', '随机过程', '应用随机过程', '泛函分析', '代数编码理论', '初等数论与多项式', '应用统计', '工程图学基础'...
15.817308
61
0.493009
import datetime import random import hashlib basic = { '一元微积分', '多元微积分', '高等微积分', '几何与代数', '随机数学方法', '概率论与数理统计', '线性代数', '复变函数引论', '大学物理', '数理方程引', '数值分析', '离散数学', '离散数学(Ⅱ)', '随机过程', '应用随机过程', '泛函分析', '代数编码理论', '初等数论与多项式', '应用统计', '工程图学基础'...
true
true
f74e8b636a98e2322e250909e3e0fcbb40a437e6
39,379
py
Python
tests/test_7runner.py
markjschreiber/miniwdl
e14ba7dbec7b608d9c67587dc22e877aacc2af5c
[ "MIT" ]
null
null
null
tests/test_7runner.py
markjschreiber/miniwdl
e14ba7dbec7b608d9c67587dc22e877aacc2af5c
[ "MIT" ]
null
null
null
tests/test_7runner.py
markjschreiber/miniwdl
e14ba7dbec7b608d9c67587dc22e877aacc2af5c
[ "MIT" ]
null
null
null
import unittest import logging import tempfile import random import os import shutil import json import time import docker import platform from testfixtures import log_capture from .context import WDL from unittest.mock import patch class RunnerTestCase(unittest.TestCase): """ Base class for new runner test ca...
33.772727
188
0.484929
import unittest import logging import tempfile import random import os import shutil import json import time import docker import platform from testfixtures import log_capture from .context import WDL from unittest.mock import patch class RunnerTestCase(unittest.TestCase): @classmethod def setUpClass(cls): ...
true
true
f74e8b7c761d031db0dc3ccb0325737a7fac720d
5,382
py
Python
tensorflow_datasets/core/utils/py_utils_test.py
kmh4321/datasets
286d7a8a5eb3e073f18f8fee4f774bafc23fb445
[ "Apache-2.0" ]
14
2019-03-30T02:11:29.000Z
2021-11-16T12:06:32.000Z
tensorflow_datasets/core/utils/py_utils_test.py
kmh4321/datasets
286d7a8a5eb3e073f18f8fee4f774bafc23fb445
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/core/utils/py_utils_test.py
kmh4321/datasets
286d7a8a5eb3e073f18f8fee4f774bafc23fb445
[ "Apache-2.0" ]
10
2019-03-31T08:35:29.000Z
2021-09-01T06:28:43.000Z
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
24.575342
80
0.536789
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hashlib import os from tensorflow_datasets import testing from tensorflow_datasets.core import constants from tensorflow_datasets.core.utils import py_utils class PyUtilsTest(testing.Te...
true
true
f74e8bc4e06a11eab75993143724910cff7bb565
4,704
py
Python
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_training/tests/test_view_train.py
piyushka17/azure-intelligent-edge-patterns
0d088899afb0022daa2ac434226824dba2c997c1
[ "MIT" ]
null
null
null
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_training/tests/test_view_train.py
piyushka17/azure-intelligent-edge-patterns
0d088899afb0022daa2ac434226824dba2c997c1
[ "MIT" ]
null
null
null
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_training/tests/test_view_train.py
piyushka17/azure-intelligent-edge-patterns
0d088899afb0022daa2ac434226824dba2c997c1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Project's custom action 'train' test """ import json from django.urls import reverse from rest_framework import status from vision_on_edge.azure_parts.models import Part from vision_on_edge.azure_settings.models import Setting from vision_on_edge.cameras.models import Camera from vision_on...
38.243902
80
0.609481
import json from django.urls import reverse from rest_framework import status from vision_on_edge.azure_parts.models import Part from vision_on_edge.azure_settings.models import Setting from vision_on_edge.cameras.models import Camera from vision_on_edge.general.tests.azure_testcase import CustomVisionTestCase from...
true
true
f74e8be5b03a3d733e145829e196e34ce2b046f8
4,812
py
Python
app/views/detail.py
chick0/dashboard
b29034ef0a770bf9e1aefaf0479a6bc93a82cc3a
[ "MIT" ]
null
null
null
app/views/detail.py
chick0/dashboard
b29034ef0a770bf9e1aefaf0479a6bc93a82cc3a
[ "MIT" ]
null
null
null
app/views/detail.py
chick0/dashboard
b29034ef0a770bf9e1aefaf0479a6bc93a82cc3a
[ "MIT" ]
null
null
null
from flask import Blueprint from flask import request from flask import session from flask import redirect from flask import url_for from flask import render_template from app import db from app.models import User from app.models import Token from app.models import Application from app.models import ApplicationSecret...
25.0625
82
0.631962
from flask import Blueprint from flask import request from flask import session from flask import redirect from flask import url_for from flask import render_template from app import db from app.models import User from app.models import Token from app.models import Application from app.models import ApplicationSecret...
true
true
f74e8cd759b2198f8e293e1447fdeeb2e894cae7
4,015
py
Python
onmt/utils/misc.py
QAQ-v/HeterGTransformer
8f29ffa86a40b09261092726b87608661139eec0
[ "MIT" ]
36
2020-05-04T13:53:30.000Z
2022-03-22T09:42:53.000Z
onmt/utils/misc.py
QAQ-v/HeterGTransformer
8f29ffa86a40b09261092726b87608661139eec0
[ "MIT" ]
3
2020-11-06T02:07:03.000Z
2022-03-11T21:35:57.000Z
onmt/utils/misc.py
QAQ-v/HeterGTransformer
8f29ffa86a40b09261092726b87608661139eec0
[ "MIT" ]
7
2020-07-29T06:06:07.000Z
2021-05-20T04:25:11.000Z
# -*- coding: utf-8 -*- import torch import random import inspect from itertools import islice def split_corpus(path, shard_size): with open(path, "rb") as f: if shard_size <= 0: yield f.readlines() else: while True: shard = list(islice(f, sha...
31.367188
79
0.583811
import torch import random import inspect from itertools import islice def split_corpus(path, shard_size): with open(path, "rb") as f: if shard_size <= 0: yield f.readlines() else: while True: shard = list(islice(f, shard_size)) ...
true
true
f74e8dd2ba46b9d51b93d795e8fbd3715bd5bc44
25,910
py
Python
yandex/cloud/containerregistry/v1/repository_service_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
36
2018-12-23T13:51:50.000Z
2022-03-25T07:48:24.000Z
yandex/cloud/containerregistry/v1/repository_service_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
15
2019-02-28T04:55:09.000Z
2022-03-06T23:17:24.000Z
yandex/cloud/containerregistry/v1/repository_service_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
18
2019-02-23T07:10:57.000Z
2022-03-28T14:41:08.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/containerregistry/v1/repository_service.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import ...
51.003937
3,907
0.792744
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from yandex.cloud.api import operation_pb2 as yandex_dot...
true
true
f74e8ee29676bee499db000573da1ee8b67ac1ee
3,201
py
Python
geomath.py
bgautrea/AboveCedarPark
34ca1635a1d77255bacd054503aacce39ae15e51
[ "MIT" ]
70
2016-11-21T10:17:34.000Z
2022-02-23T02:44:21.000Z
geomath.py
bgautrea/AboveCedarPark
34ca1635a1d77255bacd054503aacce39ae15e51
[ "MIT" ]
40
2016-12-07T19:18:05.000Z
2020-10-01T05:34:48.000Z
geomath.py
bgautrea/AboveCedarPark
34ca1635a1d77255bacd054503aacce39ae15e51
[ "MIT" ]
36
2016-11-19T18:49:58.000Z
2022-03-13T22:27:20.000Z
# # geomath.py # # some geo coordinate math that I found on the internet # # kevinabrandon@gmail.com # import math def HeadingStr(heading): """ Gives a heading string given the heading float """ headstr = "?" if heading != None: if heading < 22.5 or heading >= 337.5: headstr = "N" elif heading >=22.5 and ...
24.813953
122
0.675726
import math def HeadingStr(heading): headstr = "?" if heading != None: if heading < 22.5 or heading >= 337.5: headstr = "N" elif heading >=22.5 and heading < 67.5: headstr = "NE" elif heading >= 67.5 and heading < 112.5: headstr = "E" elif heading >= 112.5 and heading < 157.5: headstr = "...
true
true
f74e8f0a743a31b7444ddf2395cc2c87a3ebabf9
10,717
py
Python
Figures/Special_case_3_random_field.py
jemil-butt/kernel_inference
a82f6bc3bb399c6d2aea389204c45941a5fec2f8
[ "MIT" ]
3
2020-12-27T19:19:14.000Z
2022-02-23T13:52:48.000Z
Figures/Special_case_3_random_field.py
jemil-butt/kernel_inference
a82f6bc3bb399c6d2aea389204c45941a5fec2f8
[ "MIT" ]
null
null
null
Figures/Special_case_3_random_field.py
jemil-butt/kernel_inference
a82f6bc3bb399c6d2aea389204c45941a5fec2f8
[ "MIT" ]
null
null
null
""" The goal of this script is to showcase kernel inference for the task of estimating the covariance of a random field that exhibits an instationary correlation structure. This produces a figure showcasing the kernel inference procedure and its uses as detailed in the case example nr 3 which deals with applications ...
26.7925
138
0.736213
import sys sys.path.append("..") import numpy as np import numpy.linalg as lina import scipy.linalg as spla import matplotlib.pyplot as plt import Support_funs as sf plt.rcParams.update({'font.size': 12}) n_x=25 n_y=25 n_tot=n_x*n_y n_sample_x=20 n_sample_y=20 n_sample=n_sample_x*n_sample_y n_simu=100 t_x...
true
true
f74e8f20e452aac6acb3a9795bf7013811e2117e
1,522
py
Python
caada/ca_pems/readers.py
joshua-laughner/CAADA
831c70c0dfa96cabb95a069ad54211fb37533f5a
[ "Apache-2.0" ]
null
null
null
caada/ca_pems/readers.py
joshua-laughner/CAADA
831c70c0dfa96cabb95a069ad54211fb37533f5a
[ "Apache-2.0" ]
1
2021-05-14T00:13:38.000Z
2021-05-14T00:13:38.000Z
caada/ca_pems/readers.py
joshua-laughner/CAADA
831c70c0dfa96cabb95a069ad54211fb37533f5a
[ "Apache-2.0" ]
1
2020-12-08T17:12:54.000Z
2020-12-08T17:12:54.000Z
""" This module contains functions to read Caltrans PEMS station data and metadata files. """ import pandas as pd import sys from ..caada_typing import pathlike as _pathlike def read_pems_station_csv(csv_file: _pathlike) -> pd.DataFrame: """Read a Caltrans PEMS daily station .csv file Parameters ------...
28.716981
124
0.644547
import pandas as pd import sys from ..caada_typing import pathlike as _pathlike def read_pems_station_csv(csv_file: _pathlike) -> pd.DataFrame: columns = ['timestamp', 'station', 'district', 'route', 'direction of travel', 'lane type', 'station length', 'samples', 'percent observed', 'total flow'...
true
true
f74e8fdb82307300f7effdb43ab7c05ec82fec7a
535
py
Python
first semester/lab6.2.py
Panda-Lewandowski/Programming-in-Python
956b05ce4bac1c3152018edd0773566cdb5da093
[ "MIT" ]
1
2019-03-15T12:16:49.000Z
2019-03-15T12:16:49.000Z
first semester/lab6.2.py
Panda-Lewandowski/Programming-in-Python
956b05ce4bac1c3152018edd0773566cdb5da093
[ "MIT" ]
null
null
null
first semester/lab6.2.py
Panda-Lewandowski/Programming-in-Python
956b05ce4bac1c3152018edd0773566cdb5da093
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 x = [] N = int(input('Введите размерность матрицы: ')) for i in range(N): t = list(map(int, input('Введите новую строчку\t').split())) x.append(t) print('Исходная матрица ') for i in range(N): for j in range(N): print(' ', x[i][j], sep...
31.470588
70
0.562617
x = [] N = int(input('Введите размерность матрицы: ')) for i in range(N): t = list(map(int, input('Введите новую строчку\t').split())) x.append(t) print('Исходная матрица ') for i in range(N): for j in range(N): print(' ', x[i][j], sep=' ', end='') print() print('Повернутая на 90 гр...
true
true
f74e90dd4a6ea4090fe5b35f7befa63f22645d08
1,843
py
Python
pr_PrepCSV/test/_data_producer.py
AccessibleAI/ailibrary
f283f7c1608f5998694efc3cdbd0a29ebf3239c2
[ "Apache-2.0" ]
5
2020-11-09T21:50:10.000Z
2021-07-09T00:22:16.000Z
pr_PrepCSV/test/_data_producer.py
AccessibleAI/ailibrary
f283f7c1608f5998694efc3cdbd0a29ebf3239c2
[ "Apache-2.0" ]
14
2019-12-03T06:08:07.000Z
2021-11-21T11:56:13.000Z
pr_PrepCSV/test/_data_producer.py
AccessibleAI/ailibrary
f283f7c1608f5998694efc3cdbd0a29ebf3239c2
[ "Apache-2.0" ]
2
2020-01-07T15:35:43.000Z
2021-08-19T15:41:16.000Z
""" All rights reserved to cnvrg.io http://www.cnvrg.io test_prepcsv.py ============================================================================== """ import json import os import string import pandas import random import numpy as np ### Produce csv file for testing. rows_num = 25 data = {} summary = {} ##...
26.328571
80
0.689636
import json import os import string import pandas import random import numpy as np ): title = 'int_col_' + str(col) elements = [random.randint(1, 10) for i in range(rows_num)] data[title] = elements avg = sum(elements) / len(elements) num_of_elements = len(set(elements)) summary[title] = {'avg': avg, 'num_of_el...
true
true
f74e921170cc7a6da8bfc663279ba6c76196de12
1,960
py
Python
pgoapi/protos/pogoprotos/networking/requests/messages/get_buddy_walked_message_pb2.py
linherest/pgoapi
e3bdce71b06c099663e9796c8df166883059edd9
[ "MIT" ]
14
2017-03-28T16:32:24.000Z
2021-03-13T23:03:57.000Z
pgoapi/protos/pogoprotos/networking/requests/messages/get_buddy_walked_message_pb2.py
linherest/pgoapi
e3bdce71b06c099663e9796c8df166883059edd9
[ "MIT" ]
8
2017-03-01T07:56:09.000Z
2017-08-15T07:37:12.000Z
pgoapi/protos/pogoprotos/networking/requests/messages/get_buddy_walked_message_pb2.py
linherest/pgoapi
e3bdce71b06c099663e9796c8df166883059edd9
[ "MIT" ]
15
2017-02-24T01:30:23.000Z
2021-06-27T08:46:43.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/networking/requests/messages/get_buddy_walked_message.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as ...
31.111111
184
0.809184
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google...
true
true
f74e92175cf20ea1928bb110d2a80cbca4012a3f
4,328
py
Python
coffeebuddy/camera.py
hackenbergstefan/coffeetag
9c4f66f3de51b5121191b7cc224c8867e20e726d
[ "MIT" ]
2
2021-03-08T13:46:24.000Z
2021-03-16T21:22:51.000Z
coffeebuddy/camera.py
hackenbergstefan/coffeebuddy
9c4f66f3de51b5121191b7cc224c8867e20e726d
[ "MIT" ]
22
2021-04-05T15:31:58.000Z
2022-02-06T17:10:32.000Z
coffeebuddy/camera.py
hackenbergstefan/coffeebuddy
9c4f66f3de51b5121191b7cc224c8867e20e726d
[ "MIT" ]
1
2021-05-23T21:53:46.000Z
2021-05-23T21:53:46.000Z
import datetime import logging import queue import subprocess import time import threading import flask import coffeebuddy.facerecognition cameralock = queue.Queue(maxsize=1) thread = None class CameraThread(threading.Thread, coffeebuddy.facerecognition.FaceRecognizer): def __init__(self): super().__in...
35.768595
97
0.634011
import datetime import logging import queue import subprocess import time import threading import flask import coffeebuddy.facerecognition cameralock = queue.Queue(maxsize=1) thread = None class CameraThread(threading.Thread, coffeebuddy.facerecognition.FaceRecognizer): def __init__(self): super().__in...
true
true
f74e92c5733b84dac4d99f9b27112bac5daaa998
3,416
py
Python
tests/search_test.py
samkaufman/morello
20984494c39c0eba657254690b19a9265aa6cfcf
[ "BSD-2-Clause-Patent" ]
2
2021-11-16T18:40:37.000Z
2022-03-29T20:28:56.000Z
tests/search_test.py
samkaufman/morello
20984494c39c0eba657254690b19a9265aa6cfcf
[ "BSD-2-Clause-Patent" ]
null
null
null
tests/search_test.py
samkaufman/morello
20984494c39c0eba657254690b19a9265aa6cfcf
[ "BSD-2-Clause-Patent" ]
1
2021-10-16T22:41:54.000Z
2021-10-16T22:41:54.000Z
import collections from typing import Optional import hypothesis import pytest from hypothesis import given from hypothesis import strategies as st from morello import ( dtypes, op_pprint, pruning, search, search_cache, specs, system_config, ) from morello.system_config import current_syst...
33.490196
88
0.633782
import collections from typing import Optional import hypothesis import pytest from hypothesis import given from hypothesis import strategies as st from morello import ( dtypes, op_pprint, pruning, search, search_cache, specs, system_config, ) from morello.system_config import current_syst...
true
true
f74e93090f44fac440a879cb6e4daffcc7a83b68
218
py
Python
hype/__init__.py
JaesikKim/HiG2Vec
62803d421a29336d89d0a1336054b33672434fe3
[ "CC0-1.0", "MIT" ]
19
2020-07-16T20:07:13.000Z
2022-03-16T00:06:43.000Z
hype/__init__.py
JaesikKim/HiG2Vec
62803d421a29336d89d0a1336054b33672434fe3
[ "CC0-1.0", "MIT" ]
3
2021-07-20T10:54:27.000Z
2021-12-13T23:54:24.000Z
hype/__init__.py
JaesikKim/HiG2Vec
62803d421a29336d89d0a1336054b33672434fe3
[ "CC0-1.0", "MIT" ]
3
2022-02-23T17:57:55.000Z
2022-03-22T08:55:46.000Z
#!/usr/bin/env python3 # The original source code of Poincare Embedding can be found in https://github.com/facebookresearch/poincare-embeddings # This source code is partially modified for the application to HiG2Vec.
54.5
121
0.802752
true
true
f74e94cc4ec4c0cc657dd0815c4e9c747eb69b2d
2,747
py
Python
corefacility/roi/entity/pinwheel/pinwheel_reader.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
corefacility/roi/entity/pinwheel/pinwheel_reader.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
corefacility/roi/entity/pinwheel/pinwheel_reader.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
from core.entity.entity_readers.raw_sql_query_reader import RawSqlQueryReader from core.entity.entity_readers.query_builders.query_filters import StringQueryFilter from core.entity.entity_readers.model_emulators import ModelEmulator, ModelEmulatorFileField from .pinwheel_provider import PinwheelProvider class Pinwhe...
40.397059
112
0.65708
from core.entity.entity_readers.raw_sql_query_reader import RawSqlQueryReader from core.entity.entity_readers.query_builders.query_filters import StringQueryFilter from core.entity.entity_readers.model_emulators import ModelEmulator, ModelEmulatorFileField from .pinwheel_provider import PinwheelProvider class Pinwhe...
true
true
f74e952aaf8a54792fcd0470c6e2b36899ebcebd
60,536
py
Python
src/sage/modules/free_quadratic_module.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/modules/free_quadratic_module.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/modules/free_quadratic_module.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
r""" Free quadratic modules Sage supports computation with free quadratic modules over an arbitrary commutative ring. Nontrivial functionality is available over `\ZZ` and fields. All free modules over an integral domain are equipped with an embedding in an ambient vector space and an inner product, which you can spe...
35.546682
139
0.569116
import weakref import sage.matrix.matrix_space import sage.misc.latex as latex import sage.rings.ring as ring import sage.rings.integer from sage.categories.principal_ideal_domains import PrincipalIdealDomains from . import free_module
true
true
f74e95f9075d4eb0ec6a75737c469932644b116e
537
py
Python
day03/solution_a.py
Friedenspanzer/advent-of-code-2021
ffc07c6531a399b830ae834a1e1e158e791c3261
[ "MIT" ]
null
null
null
day03/solution_a.py
Friedenspanzer/advent-of-code-2021
ffc07c6531a399b830ae834a1e1e158e791c3261
[ "MIT" ]
null
null
null
day03/solution_a.py
Friedenspanzer/advent-of-code-2021
ffc07c6531a399b830ae834a1e1e158e791c3261
[ "MIT" ]
null
null
null
lines = 0 ones = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] file = open('input.txt', 'r+') for line in file.readlines(): lines += 1 for i in range(12): if line[i] == '1': ones[i] += 1 file.close() gamma = "" epsilon = "" for i in range(12): if ones[i] >= lines / 2: gamma += "1" ...
19.888889
55
0.486034
lines = 0 ones = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] file = open('input.txt', 'r+') for line in file.readlines(): lines += 1 for i in range(12): if line[i] == '1': ones[i] += 1 file.close() gamma = "" epsilon = "" for i in range(12): if ones[i] >= lines / 2: gamma += "1" ...
true
true
f74e96911dd2d64f997d6b83fc41c9b3ea7305ff
130
py
Python
train_titlegen.py
ercanserteli/metalgen
86ca734fd38227fc6ac3c972105584a4845c99d1
[ "MIT" ]
1
2020-02-15T19:13:28.000Z
2020-02-15T19:13:28.000Z
train_titlegen.py
ercanserteli/metalgen
86ca734fd38227fc6ac3c972105584a4845c99d1
[ "MIT" ]
7
2020-01-28T22:19:10.000Z
2022-02-09T23:35:48.000Z
train_titlegen.py
ercanserteli/metalgen
86ca734fd38227fc6ac3c972105584a4845c99d1
[ "MIT" ]
null
null
null
from titlegen.gen_title import train, sample if __name__ == "__main__": # extract_resnet_features() train() sample()
18.571429
44
0.692308
from titlegen.gen_title import train, sample if __name__ == "__main__": train() sample()
true
true
f74e974a8fb9920578cb2504786edac0dc3ee029
6,495
py
Python
tests/test_metrics.py
claudiosv/fastai
e36fc3dc9f6f7a9b9ae5134486bfb2b9388e7a98
[ "Apache-2.0" ]
1
2019-04-28T04:55:14.000Z
2019-04-28T04:55:14.000Z
tests/test_metrics.py
claudiosv/fastai
e36fc3dc9f6f7a9b9ae5134486bfb2b9388e7a98
[ "Apache-2.0" ]
null
null
null
tests/test_metrics.py
claudiosv/fastai
e36fc3dc9f6f7a9b9ae5134486bfb2b9388e7a98
[ "Apache-2.0" ]
1
2020-04-04T10:22:30.000Z
2020-04-04T10:22:30.000Z
import pytest from fastai.gen_doc.doctest import this_tests from fastai.basics import * from fastai.metrics import * from utils.fakes import fake_learner from utils.text import CaptureStdout p1 = torch.Tensor([0,1,0,0,0]).expand(5,-1) p2 = torch.Tensor([[0,0,0,0,0],[0,1,0,0,0]]).expand(5,2,-1).float() t1 = torch.arang...
34.365079
90
0.63264
import pytest from fastai.gen_doc.doctest import this_tests from fastai.basics import * from fastai.metrics import * from utils.fakes import fake_learner from utils.text import CaptureStdout p1 = torch.Tensor([0,1,0,0,0]).expand(5,-1) p2 = torch.Tensor([[0,0,0,0,0],[0,1,0,0,0]]).expand(5,2,-1).float() t1 = torch.arang...
true
true
f74e97a767bbc13e6f651b5cf31dce399059a5db
7,294
py
Python
04_image_generator_validation_by_sample_folder.py
wolfmib/ja_ocr_lab
891fad1eaa07aa8932df8c38081d4189870cb56f
[ "MIT" ]
null
null
null
04_image_generator_validation_by_sample_folder.py
wolfmib/ja_ocr_lab
891fad1eaa07aa8932df8c38081d4189870cb56f
[ "MIT" ]
null
null
null
04_image_generator_validation_by_sample_folder.py
wolfmib/ja_ocr_lab
891fad1eaa07aa8932df8c38081d4189870cb56f
[ "MIT" ]
null
null
null
import os # Pillow from PIL import Image, ImageFilter from matplotlib import pyplot import random import analyzer_system as ana_sys # sample: foler # - dix.jpg # - onze.jpg # - cherry.jpg # - lamp.jpg # - kid.jpg # - house.jpg # - a.jpg # - douze.jpg if __name__ == "__main__": # Obtenir args:...
31.575758
118
0.569235
import os from PIL import Image, ImageFilter from matplotlib import pyplot import random import analyzer_system as ana_sys if __name__ == "__main__": main_args = ana_sys.analyzer_input_args() tem_cmd = 'ls sample' tem_response = os.popen(tem_cmd).read() if main_...
true
true
f74e97ec73ae9124146611455bf16f64217869d2
710
py
Python
isic_cli/cli/user.py
ImageMarkup/isic-cli
2dd86f918443c69df601e560760d430b7f958095
[ "Apache-2.0" ]
null
null
null
isic_cli/cli/user.py
ImageMarkup/isic-cli
2dd86f918443c69df601e560760d430b7f958095
[ "Apache-2.0" ]
null
null
null
isic_cli/cli/user.py
ImageMarkup/isic-cli
2dd86f918443c69df601e560760d430b7f958095
[ "Apache-2.0" ]
null
null
null
import json import click from isic_cli.cli.context import IsicContext @click.group(short_help='Manage authentication with the ISIC Archive.') @click.pass_obj def user(ctx): pass @user.command() @click.pass_obj def login(obj: IsicContext): """Login to the ISIC Archive.""" if obj.user: click.ech...
19.189189
71
0.683099
import json import click from isic_cli.cli.context import IsicContext @click.group(short_help='Manage authentication with the ISIC Archive.') @click.pass_obj def user(ctx): pass @user.command() @click.pass_obj def login(obj: IsicContext): if obj.user: click.echo(f'Hello {obj.user["email"]}!') ...
true
true
f74e98c491d6a2280848ad9c6668cd1787693ab2
795
py
Python
RecoJets/JetProducers/python/hltMVAJetPuId_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
RecoJets/JetProducers/python/hltMVAJetPuId_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
RecoJets/JetProducers/python/hltMVAJetPuId_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
from RecoJets.JetProducers.hltPUIdAlgo_cff import * hltMVAJetPuIdCalculator = cms.EDProducer('MVAJetPuIdProducer', produceJetIds = cms.bool(False), jetids = cms.InputTag(""), runMvas = cms.bool(True), ...
49.6875
90
0.555975
from RecoJets.JetProducers.hltPUIdAlgo_cff import * hltMVAJetPuIdCalculator = cms.EDProducer('MVAJetPuIdProducer', produceJetIds = cms.bool(False), jetids = cms.InputTag(""), runMvas = cms.bool(True), ...
true
true
f74e9928be33aeda5df1aa71a8430dc49639fdc9
4,871
py
Python
weatherbot.py
gurvirsingh15/CPS847-Group-2
95afb7c7eca9a68682a80fa5d4d8e9fb65dde351
[ "MIT" ]
1
2018-02-06T18:51:42.000Z
2018-02-06T18:51:42.000Z
weatherbot.py
gurvirsingh15/CPS847-Group-2
95afb7c7eca9a68682a80fa5d4d8e9fb65dde351
[ "MIT" ]
7
2018-02-01T15:47:18.000Z
2018-02-01T18:05:28.000Z
weatherbot.py
GurvirRyerson/CPS847-Group-2
95afb7c7eca9a68682a80fa5d4d8e9fb65dde351
[ "MIT" ]
1
2019-11-25T15:58:00.000Z
2019-11-25T15:58:00.000Z
# loads .env contents import settings # use for approximate string matching import difflib import pandas as pd import os, time, sys import re, json from urllib.request import urlopen from datetime import datetime as dt from slackclient import SlackClient keys = { 'weatherbot': os.environ['WEATHERBOT_API_KEY'...
27.212291
92
0.549784
import settings import difflib import pandas as pd import os, time, sys import re, json from urllib.request import urlopen from datetime import datetime as dt from slackclient import SlackClient keys = { 'weatherbot': os.environ['WEATHERBOT_API_KEY'], 'openweather': os.environ['OPENWEATHER_API_KEY'] } ...
true
true
f74e993059af0a34e5efb14987a1e68c97c6a6ff
5,898
py
Python
text_pipeline/TokenFilter.py
abaybektursun/text-pipeline
3464783f765512f4225546c3ec761bf77c805ef2
[ "MIT" ]
null
null
null
text_pipeline/TokenFilter.py
abaybektursun/text-pipeline
3464783f765512f4225546c3ec761bf77c805ef2
[ "MIT" ]
null
null
null
text_pipeline/TokenFilter.py
abaybektursun/text-pipeline
3464783f765512f4225546c3ec761bf77c805ef2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on 6/26/18 @author: Sanjana Kapoor @author: John Sigmon Last modified: 6/28/18 """ import os import sys import json import pickle as pkl import spacy import logging.config from spacy.attrs import ORTH, LEMMA from spacy.tokens import Doc logger = logging.ge...
29.49
81
0.54883
import os import sys import json import pickle as pkl import spacy import logging.config from spacy.attrs import ORTH, LEMMA from spacy.tokens import Doc logger = logging.getLogger() ROOT_PATH = os.path.dirname(os.path.realpath(__file__)) class TokenFilter(): apply = None dispatch_fun = None ...
true
true
f74e996efddfa33ed82d43f19b6cb24fcd2fc5ff
1,393
py
Python
corehq/ex-submodules/pillowtop/processors/sample.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/ex-submodules/pillowtop/processors/sample.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/ex-submodules/pillowtop/processors/sample.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
from pillowtop.logger import pillow_logging from pillowtop.processors.interface import BulkPillowProcessor, PillowProcessor class NoopProcessor(PillowProcessor): """ Processor that does absolutely nothing. """ def process_change(self, change): pass class LoggingProcessor(PillowProcessor): ...
21.765625
79
0.66906
from pillowtop.logger import pillow_logging from pillowtop.processors.interface import BulkPillowProcessor, PillowProcessor class NoopProcessor(PillowProcessor): def process_change(self, change): pass class LoggingProcessor(PillowProcessor): def __init__(self, logger=None): self.logger = l...
true
true
f74e9af750585c5f6bd0afd6bb37d388eb822512
593
py
Python
examples/example_choices.py
bluenote10/typed_argparse
5d18420bd522dc615d63d651cc1fa43815bb9afe
[ "MIT" ]
8
2021-08-19T21:14:17.000Z
2022-03-16T21:56:54.000Z
examples/example_choices.py
bluenote10/typed_argparse
5d18420bd522dc615d63d651cc1fa43815bb9afe
[ "MIT" ]
8
2021-08-20T19:29:07.000Z
2022-02-22T11:06:16.000Z
examples/example_choices.py
bluenote10/typed_argparse
5d18420bd522dc615d63d651cc1fa43815bb9afe
[ "MIT" ]
1
2021-10-30T00:30:51.000Z
2021-10-30T00:30:51.000Z
#!/usr/bin/env python import argparse import sys from typing import List from typed_argparse import TypedArgs from typing_extensions import Literal class MyArgs(TypedArgs): mode: Literal["a", "b", "c"] def parse_args(args: List[str] = sys.argv[1:]) -> MyArgs: parser = argparse.ArgumentParser() parser....
17.969697
57
0.652614
import argparse import sys from typing import List from typed_argparse import TypedArgs from typing_extensions import Literal class MyArgs(TypedArgs): mode: Literal["a", "b", "c"] def parse_args(args: List[str] = sys.argv[1:]) -> MyArgs: parser = argparse.ArgumentParser() parser.add_argument( ...
true
true
f74e9b9345193f7b4348b6c08f48a86dab45d65e
811
py
Python
crawl_ytb/crawl.py
BuiNgocHai/youtube-8m
8aa922b02b81821655f9dbd78a575b732ed27b77
[ "Apache-2.0" ]
null
null
null
crawl_ytb/crawl.py
BuiNgocHai/youtube-8m
8aa922b02b81821655f9dbd78a575b732ed27b77
[ "Apache-2.0" ]
null
null
null
crawl_ytb/crawl.py
BuiNgocHai/youtube-8m
8aa922b02b81821655f9dbd78a575b732ed27b77
[ "Apache-2.0" ]
null
null
null
from bs4 import BeautifulSoup as bs import requests from pytube import YouTube base = "https://www.youtube.com/results?search_query=" qstring = "tin tức" r = requests.get(base+qstring) page = r.text soup=bs(page,'html.parser') vids = soup.findAll('a',attrs={'class':'yt-uix-tile-link'}) videolist=[] for v in vids: ...
21.342105
59
0.659679
from bs4 import BeautifulSoup as bs import requests from pytube import YouTube base = "https://www.youtube.com/results?search_query=" qstring = "tin tức" r = requests.get(base+qstring) page = r.text soup=bs(page,'html.parser') vids = soup.findAll('a',attrs={'class':'yt-uix-tile-link'}) videolist=[] for v in vids: ...
true
true
f74e9d47611ff68020431f29d6d5b7f5dce384ae
40
py
Python
tests/filters/__init__.py
jparsai/cvejob
8f9462a1ecdf1d4de877ac5f44e772239ffcb379
[ "Apache-2.0" ]
8
2019-09-25T14:45:28.000Z
2021-11-08T10:30:03.000Z
tests/filters/__init__.py
jparsai/cvejob
8f9462a1ecdf1d4de877ac5f44e772239ffcb379
[ "Apache-2.0" ]
113
2018-07-10T12:58:16.000Z
2020-12-09T22:33:15.000Z
tests/filters/__init__.py
jparsai/cvejob
8f9462a1ecdf1d4de877ac5f44e772239ffcb379
[ "Apache-2.0" ]
12
2018-07-10T11:00:02.000Z
2021-01-27T12:19:56.000Z
"""Tests for cvejob.filters modules."""
20
39
0.7
true
true
f74e9e0e03861fff82fddd657004447420ded6ba
681
py
Python
vispy/util/__init__.py
izaid/vispy
402cf95bfef88d70c9c45bb27c532ed72944e14a
[ "BSD-3-Clause" ]
null
null
null
vispy/util/__init__.py
izaid/vispy
402cf95bfef88d70c9c45bb27c532ed72944e14a
[ "BSD-3-Clause" ]
null
null
null
vispy/util/__init__.py
izaid/vispy
402cf95bfef88d70c9c45bb27c532ed72944e14a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2014, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Utilities for Vispy. A collection of modules that are used in one or more Vispy sub-packages. """ from .logs import logger, set_log_level, use_log_le...
40.058824
77
0.71953
from .logs import logger, set_log_level, use_log_level from .config import (config, sys_info, save_config, get_config_keys, set_data_dir, _TempDir) from .fetching import get_testing_file, load_data_file from . import fonts from . import transforms from .wrappers import use, ru...
true
true
f74e9ed9094ba38d62dbd7924a4240f2eaeb2ea8
2,907
py
Python
examples/behavior_clone.py
xtwentian3/mjrl
e403c67c165e37d933a4bee8f80771d1046b51f3
[ "Apache-2.0" ]
null
null
null
examples/behavior_clone.py
xtwentian3/mjrl
e403c67c165e37d933a4bee8f80771d1046b51f3
[ "Apache-2.0" ]
null
null
null
examples/behavior_clone.py
xtwentian3/mjrl
e403c67c165e37d933a4bee8f80771d1046b51f3
[ "Apache-2.0" ]
null
null
null
from mjrl.utils.gym_env import GymEnv from mjrl.policies.gaussian_mlp import MLP from mjrl.baselines.quadratic_baseline import QuadraticBaseline from mjrl.baselines.mlp_baseline import MLPBaseline from mjrl.algos.npg_cg import NPG from mjrl.algos.behavior_cloning import BC from mjrl.utils.train_agent import train_agent...
39.821918
102
0.583763
from mjrl.utils.gym_env import GymEnv from mjrl.policies.gaussian_mlp import MLP from mjrl.baselines.quadratic_baseline import QuadraticBaseline from mjrl.baselines.mlp_baseline import MLPBaseline from mjrl.algos.npg_cg import NPG from mjrl.algos.behavior_cloning import BC from mjrl.utils.train_agent import train_agent...
true
true
f74e9f815d8f3748130f9d1e95b28132b4ecd5b0
14,004
py
Python
RNNs/SRP_DKL_forward.py
caurnhammer/AurnhammerFrank_LIG
b3f536ddba2baeb53ef4670b12283c2e0f903a10
[ "Apache-2.0" ]
null
null
null
RNNs/SRP_DKL_forward.py
caurnhammer/AurnhammerFrank_LIG
b3f536ddba2baeb53ef4670b12283c2e0f903a10
[ "Apache-2.0" ]
2
2021-05-08T15:54:57.000Z
2021-05-08T17:52:54.000Z
RNNs/SRP_DKL_forward.py
ys7yoo/word_prediction
7598d5912eb6447b7c01d56d1a0f37643f72b80e
[ "Apache-2.0" ]
1
2021-05-08T15:16:43.000Z
2021-05-08T15:16:43.000Z
############################################################################### # Code by Christoph Aurnhammer, based on # # https://github.com/pytorch/examples/tree/master/word_language_model # # Citation: Aurnhammer & Frank (2019), Neuropsychologia. # ...
38.054348
120
0.602828
nd(log(float((prob[target]))), 4) * -1]) return sent_surprisal def compute_kld(dist_nextword, dist_plusone, seq_targets): # accept two lists of probability distributions and compute the Kullback-Leibler Divergence for each pair del dist_nextword[0] del dist_plusone[-1] # We can't compute the KLD f...
true
true
f74ea036dfc5e5fe0f8cf434923374603ce0ee7a
3,430
py
Python
python/ee/tests/imagecollection_test.py
jsta/earthengine-api
ad63b48f4423e658ae17391c1d123f6b55d26c10
[ "Apache-2.0" ]
1,909
2015-04-22T20:18:22.000Z
2022-03-31T13:42:03.000Z
python/ee/tests/imagecollection_test.py
jsta/earthengine-api
ad63b48f4423e658ae17391c1d123f6b55d26c10
[ "Apache-2.0" ]
171
2015-09-24T05:49:49.000Z
2022-03-14T00:54:50.000Z
python/ee/tests/imagecollection_test.py
jsta/earthengine-api
ad63b48f4423e658ae17391c1d123f6b55d26c10
[ "Apache-2.0" ]
924
2015-04-23T05:43:18.000Z
2022-03-28T12:11:31.000Z
#!/usr/bin/env python """Test for the ee.imagecollection module.""" from unittest import mock import unittest import ee from ee import apitestcase class ImageCollectionTestCase(apitestcase.ApiTestCase): def testImageCollectionConstructors(self): """Verifies that constructors understand valid parameters."""...
36.105263
79
0.700583
from unittest import mock import unittest import ee from ee import apitestcase class ImageCollectionTestCase(apitestcase.ApiTestCase): def testImageCollectionConstructors(self): from_id = ee.ImageCollection('abcd') self.assertEqual( ee.ApiFunction.lookup('ImageCollection.load'), from_id.func) ...
true
true
f74ea08d2c1566b0503f7ce4eb6e4deade99bf42
1,142
py
Python
kubernetes/test/test_v1beta1_custom_resource_definition_version.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_custom_resource_definition_version.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_custom_resource_definition_version.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
1
2019-01-10T11:13:52.000Z
2019-01-10T11:13:52.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
25.377778
125
0.754816
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1beta1_custom_resource_definition_version import V1beta1CustomResourceDefinitionVersion class TestV1beta1CustomResourceDefinitionVer...
true
true
f74ea0c67ab0b96a6bbd2b18ff633d525f71fc3c
17,560
py
Python
PnP_restoration/GS_PnP_restoration.py
samuro95/GSPnP
1aaabf24d2912135da0bdb89cad1cd0846f9649e
[ "MIT" ]
8
2021-10-06T15:26:05.000Z
2021-12-14T11:10:24.000Z
PnP_restoration/GS_PnP_restoration.py
samuro95/GSPnP
1aaabf24d2912135da0bdb89cad1cd0846f9649e
[ "MIT" ]
null
null
null
PnP_restoration/GS_PnP_restoration.py
samuro95/GSPnP
1aaabf24d2912135da0bdb89cad1cd0846f9649e
[ "MIT" ]
null
null
null
import os import cv2 import numpy as np import matplotlib.pyplot as plt from utils import utils_sr import torch from argparse import ArgumentParser from utils.utils_restoration import rgb2y, psnr, array2tensor, tensor2array import sys from matplotlib.ticker import MaxNLocator class PnP_restoration(): def __init_...
46.089239
237
0.598633
import os import cv2 import numpy as np import matplotlib.pyplot as plt from utils import utils_sr import torch from argparse import ArgumentParser from utils.utils_restoration import rgb2y, psnr, array2tensor, tensor2array import sys from matplotlib.ticker import MaxNLocator class PnP_restoration(): def __init_...
true
true
f74ea0ec4800d1a02fc9fe549c7c7f19e086c381
751
py
Python
churchill/api/v1/shots/serializers.py
manti-by/traugott
6ae05a53c14b29a08daa02a8de1624671f8f063a
[ "BSD-3-Clause" ]
null
null
null
churchill/api/v1/shots/serializers.py
manti-by/traugott
6ae05a53c14b29a08daa02a8de1624671f8f063a
[ "BSD-3-Clause" ]
11
2021-01-11T20:52:04.000Z
2021-05-12T09:12:38.000Z
churchill/api/v1/shots/serializers.py
manti-by/churchill
6ae05a53c14b29a08daa02a8de1624671f8f063a
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers class ShotSerializer(serializers.Serializer): id = serializers.IntegerField(read_only=True) title = serializers.CharField(max_length=100) volume = serializers.IntegerField() degree = serializers.IntegerField(min_value=0, max_value=100) cost = serializers.Deci...
34.136364
80
0.781625
from rest_framework import serializers class ShotSerializer(serializers.Serializer): id = serializers.IntegerField(read_only=True) title = serializers.CharField(max_length=100) volume = serializers.IntegerField() degree = serializers.IntegerField(min_value=0, max_value=100) cost = serializers.Deci...
true
true
f74ea13a3775ce2d8e1a5f420efda4ed93074266
1,092
py
Python
bip_utils/addr/__init__.py
git-sgmoore/bip_utils
05772821132bf538a44f22a1f3c5ba1267ed54b2
[ "MIT" ]
null
null
null
bip_utils/addr/__init__.py
git-sgmoore/bip_utils
05772821132bf538a44f22a1f3c5ba1267ed54b2
[ "MIT" ]
null
null
null
bip_utils/addr/__init__.py
git-sgmoore/bip_utils
05772821132bf538a44f22a1f3c5ba1267ed54b2
[ "MIT" ]
null
null
null
from bip_utils.addr.iaddr_encoder import IAddrEncoder from bip_utils.addr.algo_addr import AlgoAddr from bip_utils.addr.atom_addr import AtomAddr from bip_utils.addr.avax_addr import AvaxPChainAddr, AvaxXChainAddr from bip_utils.addr.egld_addr import EgldAddr from bip_utils.addr.eth_addr import EthAddr from bip_utils.a...
47.478261
84
0.871795
from bip_utils.addr.iaddr_encoder import IAddrEncoder from bip_utils.addr.algo_addr import AlgoAddr from bip_utils.addr.atom_addr import AtomAddr from bip_utils.addr.avax_addr import AvaxPChainAddr, AvaxXChainAddr from bip_utils.addr.egld_addr import EgldAddr from bip_utils.addr.eth_addr import EthAddr from bip_utils.a...
true
true
f74ea1e0ed2b2a2eafb3622461c74350740f843f
1,691
py
Python
listings/api/serializers.py
oliviatinios/takehome-be
7bea3ebf9b2d1014e31f8438d229f2fab7205964
[ "MIT" ]
null
null
null
listings/api/serializers.py
oliviatinios/takehome-be
7bea3ebf9b2d1014e31f8438d229f2fab7205964
[ "MIT" ]
null
null
null
listings/api/serializers.py
oliviatinios/takehome-be
7bea3ebf9b2d1014e31f8438d229f2fab7205964
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import House class HouseSerializer(serializers.ModelSerializer): serializers.ReadOnlyField() class Meta: model = House fields = [ "id", "area_unit", "bath...
31.314815
62
0.500887
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import House class HouseSerializer(serializers.ModelSerializer): serializers.ReadOnlyField() class Meta: model = House fields = [ "id", "area_unit", "bath...
true
true
f74ea229b3489c794c9bb082088006957693ef84
1,426
py
Python
autosklearn/pipeline/components/data_preprocessing/rescaling/none.py
ihounie/auto-sklearn
6a72f0df60b0c66ad75b0100d8d22c07da6217bb
[ "BSD-3-Clause" ]
2
2020-11-18T16:43:08.000Z
2020-11-19T21:38:37.000Z
autosklearn/pipeline/components/data_preprocessing/rescaling/none.py
ihounie/auto-sklearn
6a72f0df60b0c66ad75b0100d8d22c07da6217bb
[ "BSD-3-Clause" ]
1
2020-12-22T15:25:24.000Z
2021-05-04T20:00:08.000Z
autosklearn/pipeline/components/data_preprocessing/rescaling/none.py
ihounie/auto-sklearn
6a72f0df60b0c66ad75b0100d8d22c07da6217bb
[ "BSD-3-Clause" ]
1
2021-04-06T09:38:12.000Z
2021-04-06T09:38:12.000Z
from autosklearn.pipeline.constants import DENSE, UNSIGNED_DATA, INPUT, SPARSE from autosklearn.pipeline.components.data_preprocessing.rescaling.abstract_rescaling \ import Rescaling from autosklearn.pipeline.components.base import AutoSklearnPreprocessingAlgorithm class NoRescalingComponent(Rescaling, AutoSklear...
37.526316
86
0.609397
from autosklearn.pipeline.constants import DENSE, UNSIGNED_DATA, INPUT, SPARSE from autosklearn.pipeline.components.data_preprocessing.rescaling.abstract_rescaling \ import Rescaling from autosklearn.pipeline.components.base import AutoSklearnPreprocessingAlgorithm class NoRescalingComponent(Rescaling, AutoSklear...
true
true
f74ea3ddb229508bcad5f1063ed5de1c3f5891f5
3,959
py
Python
tests/dbshell/test_postgresql_psycopg2.py
MikeAmy/django
00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d
[ "PSF-2.0", "BSD-3-Clause" ]
3
2015-09-26T13:33:07.000Z
2020-03-08T07:34:38.000Z
tests/dbshell/test_postgresql_psycopg2.py
MikeAmy/django
00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/dbshell/test_postgresql_psycopg2.py
MikeAmy/django
00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d
[ "PSF-2.0", "BSD-3-Clause" ]
15
2016-01-08T14:28:41.000Z
2019-04-19T08:33:31.000Z
# -*- coding: utf8 -*- from __future__ import unicode_literals import locale import os from django.db.backends.postgresql.client import DatabaseClient from django.test import SimpleTestCase, mock from django.utils import six from django.utils.encoding import force_bytes, force_str class PostgreSqlDbshellCommandTest...
33.268908
86
0.484718
from __future__ import unicode_literals import locale import os from django.db.backends.postgresql.client import DatabaseClient from django.test import SimpleTestCase, mock from django.utils import six from django.utils.encoding import force_bytes, force_str class PostgreSqlDbshellCommandTestCase(SimpleTestCase): ...
true
true
f74ea575b7f54f14a5049a8eb089373976513167
25,191
py
Python
examples/mm-imdb/run_mmimdb.py
12190143/transformers
6faca88ee0c472de8207e648b0999a1ee01ff127
[ "Apache-2.0" ]
480
2019-10-14T02:22:34.000Z
2022-03-29T18:07:00.000Z
examples/mm-imdb/run_mmimdb.py
hmason/transformers
ab90353f1abfd15f8d21f99395658d060679a08c
[ "Apache-2.0" ]
20
2019-10-15T16:18:05.000Z
2022-02-27T21:23:55.000Z
examples/mm-imdb/run_mmimdb.py
hmason/transformers
ab90353f1abfd15f8d21f99395658d060679a08c
[ "Apache-2.0" ]
42
2019-10-14T21:29:59.000Z
2021-12-28T15:25:58.000Z
# coding=utf-8 # Copyright (c) Facebook, Inc. and its affiliates. # Copyright (c) HuggingFace Inc. team. # # 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...
40.960976
123
0.645905
import argparse import glob import json import logging import os import random import numpy as np import torch import torch.nn as nn from sklearn.metrics import f1_score from torch.utils.data import DataLoader, RandomSampler, SequentialSampler from torch.utils.data.distributed import DistributedSample...
true
true
f74ea5d809ed56bbe0fe6f7a8cfd2307f226270b
28,921
py
Python
src/k8s-extension/azext_k8s_extension/vendored_sdks/models/_models.py
wwendyc/azure-cli-extensions
6b4099676bb5d43fdb57bc69f9c0281cca510a0a
[ "MIT" ]
1
2021-04-22T09:20:58.000Z
2021-04-22T09:20:58.000Z
src/k8s-extension/azext_k8s_extension/vendored_sdks/models/_models.py
wwendyc/azure-cli-extensions
6b4099676bb5d43fdb57bc69f9c0281cca510a0a
[ "MIT" ]
1
2021-05-25T20:16:59.000Z
2021-05-25T20:16:59.000Z
src/k8s-extension/azext_k8s_extension/vendored_sdks/models/_models.py
wwendyc/azure-cli-extensions
6b4099676bb5d43fdb57bc69f9c0281cca510a0a
[ "MIT" ]
5
2020-09-08T22:46:48.000Z
2020-11-08T14:54:35.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
39.781293
137
0.66858
from msrest.serialization import Model from msrest.exceptions import HttpOperationError class CloudError(Model): _attribute_map = { } class ComplianceStatus(Model): _validation = { 'compliance_state': {'readonly': True}, } _attribute_map = { 'compliance_state': {'ke...
true
true
f74ea5edeba97e5d365b69156dd896b5c750746e
156
py
Python
chatbotconfig.py
apaspayamishra/Chat-Bot
ce5537b9d43d6580e74079a69582ba0a559d4c80
[ "MIT" ]
30
2020-06-16T08:46:36.000Z
2022-03-23T20:03:25.000Z
chatbotconfig.py
apaspayamishra/Chat-Bot
ce5537b9d43d6580e74079a69582ba0a559d4c80
[ "MIT" ]
8
2020-09-15T09:02:37.000Z
2022-02-10T02:36:05.000Z
chatbotconfig.py
apaspayamishra/Chat-Bot
ce5537b9d43d6580e74079a69582ba0a559d4c80
[ "MIT" ]
15
2020-11-15T16:18:28.000Z
2022-03-23T12:33:52.000Z
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): SECRET_KEY=os.environ.get('SECRET_KEY') or 'you-will-never-guess'
26
69
0.75
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): SECRET_KEY=os.environ.get('SECRET_KEY') or 'you-will-never-guess'
true
true
f74ea7db9461e4ffedd52fe6f67a09637f1c0ac6
1,330
py
Python
base/site-packages/rosetta/conf/settings.py
edisonlz/fastor
342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3
[ "Apache-2.0" ]
285
2019-12-23T09:50:21.000Z
2021-12-08T09:08:49.000Z
external_apps/django-rosetta/rosetta/conf/settings.py
spreeker/democracygame
525139955cb739c295051f317ab670049511bcf8
[ "BSD-3-Clause" ]
null
null
null
external_apps/django-rosetta/rosetta/conf/settings.py
spreeker/democracygame
525139955cb739c295051f317ab670049511bcf8
[ "BSD-3-Clause" ]
9
2019-12-23T12:59:25.000Z
2022-03-15T05:12:11.000Z
from django.conf import settings # Number of messages to display per page. MESSAGES_PER_PAGE = getattr(settings,'ROSETTA_MESSAGES_PER_PAGE',10) # Enable Google translation suggestions ENABLE_TRANSLATION_SUGGESTIONS = getattr(settings,'ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS',True) """ When running WSGI daemon mode,...
39.117647
96
0.799248
from django.conf import settings MESSAGES_PER_PAGE = getattr(settings,'ROSETTA_MESSAGES_PER_PAGE',10) ENABLE_TRANSLATION_SUGGESTIONS = getattr(settings,'ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS',True) WSGI_AUTO_RELOAD = getattr(settings,'ROSETTA_WSGI_AUTO_RELOAD', False)
true
true
f74ea8201b57a745ab0c01e531ca14451f96359d
9,207
py
Python
slate/config.py
jkkummerfeld/slate
97d59d0e285756bc1072bd595218f57142af3b15
[ "0BSD" ]
69
2018-07-01T05:06:10.000Z
2022-03-31T13:28:04.000Z
slate/config.py
jkkummerfeld/slate
97d59d0e285756bc1072bd595218f57142af3b15
[ "0BSD" ]
4
2019-01-24T21:47:10.000Z
2019-09-06T16:43:13.000Z
slate/config.py
jkkummerfeld/slate
97d59d0e285756bc1072bd595218f57142af3b15
[ "0BSD" ]
7
2019-01-24T20:02:06.000Z
2021-08-31T21:25:05.000Z
from __future__ import print_function import string import logging import curses # Needed for colours back = curses.COLOR_WHITE front = curses.COLOR_BLACK # Switch for white backgrounds ###back = curses.COLOR_BLACK ###front = curses.COLOR_WHITE COLORS = [ # Color combinations, (ID#, foreground, background) ...
28.416667
86
0.497882
from __future__ import print_function import string import logging import curses back = curses.COLOR_WHITE front = curses.COLOR_BLACK ront, back), (6, curses.COLOR_CYAN, -1), (7, curses.COLOR_MAGENTA, -1), (8, curses.COLOR_BLUE, back), (9, curses.COLOR_GREEN, back), (10, curses.COLOR_RED, -1), ...
true
true
f74ea898d1b9bb40ed4358871ee73376fc2acd82
1,753
py
Python
api/schema_migrations/20190825_add_product_cross_selling_and_product_type_cross_selling_to_critters.py
manisharmagarg/qymatix
0dc240970359429ae5105db79f9aebf1a99ba6fd
[ "Apache-2.0" ]
null
null
null
api/schema_migrations/20190825_add_product_cross_selling_and_product_type_cross_selling_to_critters.py
manisharmagarg/qymatix
0dc240970359429ae5105db79f9aebf1a99ba6fd
[ "Apache-2.0" ]
null
null
null
api/schema_migrations/20190825_add_product_cross_selling_and_product_type_cross_selling_to_critters.py
manisharmagarg/qymatix
0dc240970359429ae5105db79f9aebf1a99ba6fd
[ "Apache-2.0" ]
null
null
null
# pylint: skip-file import os from pathlib import Path from databases import Databases from dotenv import load_dotenv from playhouse.migrate import * env_path = Path('/var/www/qyapp') / '.env_core' load_dotenv(dotenv_path=env_path, verbose=True) databases = Databases() database_names = databases.get_names() migrati...
26.164179
89
0.512265
import os from pathlib import Path from databases import Databases from dotenv import load_dotenv from playhouse.migrate import * env_path = Path('/var/www/qyapp') / '.env_core' load_dotenv(dotenv_path=env_path, verbose=True) databases = Databases() database_names = databases.get_names() migrations = { 'critte...
true
true
f74ea9d8364b5fa88cbef8f33b47623c0f58cc3f
827
py
Python
app/views.py
thumlx12/MirrorTrading
73a1977e9cd814f698a695beb95941c46320db3b
[ "MIT" ]
null
null
null
app/views.py
thumlx12/MirrorTrading
73a1977e9cd814f698a695beb95941c46320db3b
[ "MIT" ]
null
null
null
app/views.py
thumlx12/MirrorTrading
73a1977e9cd814f698a695beb95941c46320db3b
[ "MIT" ]
null
null
null
from flask import render_template import app.charts as charts from . import app @app.route("/") def search(): return render_template('search.html', title='Search') @app.route("/dashboard") def hello(): _dashboard = charts.dashboard.create_charts() return render_template('base.html', ...
24.323529
72
0.643289
from flask import render_template import app.charts as charts from . import app @app.route("/") def search(): return render_template('search.html', title='Search') @app.route("/dashboard") def hello(): _dashboard = charts.dashboard.create_charts() return render_template('base.html', ...
true
true
f74eaaad9bbd8d058eedd7779669f68abe7808d5
2,524
py
Python
app.py
jmpews/torweb
c6694e6f35f9afa0c0d2f4505fc325c8f0e052d5
[ "MIT" ]
11
2016-04-18T09:08:15.000Z
2021-07-16T07:07:03.000Z
app.py
jmpews/torweb
c6694e6f35f9afa0c0d2f4505fc325c8f0e052d5
[ "MIT" ]
1
2016-10-03T20:43:27.000Z
2016-10-03T20:43:27.000Z
app.py
jmpews/torweb
c6694e6f35f9afa0c0d2f4505fc325c8f0e052d5
[ "MIT" ]
7
2016-09-23T15:53:33.000Z
2020-10-09T08:38:47.000Z
#!/usr/bin/env python # coding:utf-8 import tornado.web import tornado.ioloop from tornado.options import define, options, parse_command_line import signal import threading import time def close_server(): from custor.logger import logger MAX_WAIT_SECONDS_BEFORE_SHUTDOWN = 0 deadline = time.time() + MAX_W...
28.681818
94
0.695721
import tornado.web import tornado.ioloop from tornado.options import define, options, parse_command_line import signal import threading import time def close_server(): from custor.logger import logger MAX_WAIT_SECONDS_BEFORE_SHUTDOWN = 0 deadline = time.time() + MAX_WAIT_SECONDS_BEFORE_SHUTDOWN de...
true
true
f74eab804ad2173ba2eb4ec95cd30ede3e92b951
4,146
py
Python
gpu_bdb/queries/q23/gpu_bdb_query_23_sql.py
beckernick/tpcx-bb
f6a398d03e7aee4fd190606e6eb0fb1fbea3ea23
[ "Apache-2.0" ]
62
2020-05-14T13:33:02.000Z
2020-10-29T13:28:26.000Z
gpu_bdb/queries/q23/gpu_bdb_query_23_sql.py
beckernick/tpcx-bb
f6a398d03e7aee4fd190606e6eb0fb1fbea3ea23
[ "Apache-2.0" ]
104
2020-07-01T21:07:42.000Z
2020-11-13T16:36:04.000Z
gpu_bdb/queries/q23/gpu_bdb_query_23_sql.py
beckernick/tpcx-bb
f6a398d03e7aee4fd190606e6eb0fb1fbea3ea23
[ "Apache-2.0" ]
21
2020-05-14T14:44:40.000Z
2020-11-07T12:08:28.000Z
# # Copyright (c) 2019-2020, NVIDIA CORPORATION. # Copyright (c) 2019-2020, BlazingSQL, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
30.043478
102
0.655572
import sys import os from bdb_tools.cluster_startup import attach_to_cluster from bdb_tools.utils import ( benchmark, gpubdb_argparser, run_query, ) from dask.distributed import wait q23_year = 2001 q23_month = 1 q23_coefficient = 1.3 def read_tables(data_dir, bc): bc.create_tabl...
true
true
f74eabad3eafef1725955fce2184a10473c7cd9d
7,779
py
Python
src/CreeDictionary/CreeDictionary/test_views.py
aarppe/cree-intelligent-dictionary
79717a08f95827a024061a5a27000bbd3d684363
[ "Apache-2.0" ]
null
null
null
src/CreeDictionary/CreeDictionary/test_views.py
aarppe/cree-intelligent-dictionary
79717a08f95827a024061a5a27000bbd3d684363
[ "Apache-2.0" ]
null
null
null
src/CreeDictionary/CreeDictionary/test_views.py
aarppe/cree-intelligent-dictionary
79717a08f95827a024061a5a27000bbd3d684363
[ "Apache-2.0" ]
null
null
null
import logging from http import HTTPStatus from typing import Dict, Optional from urllib.parse import urlencode import pytest from django.http import ( HttpResponseBadRequest, HttpResponseNotAllowed, HttpResponseNotFound, ) from django.test import Client from django.urls import reverse from pytest_django.a...
34.268722
99
0.666538
import logging from http import HTTPStatus from typing import Dict, Optional from urllib.parse import urlencode import pytest from django.http import ( HttpResponseBadRequest, HttpResponseNotAllowed, HttpResponseNotFound, ) from django.test import Client from django.urls import reverse from pytest_django.a...
true
true
f74eac2a5ca17dffcf91a9b9e8b45355320b7c8c
346
py
Python
src/settings.py
RehabAUmc/modys-video
fb745edb360e9ab120280923bd2be58fd8c91fd9
[ "Apache-2.0" ]
3
2021-11-02T13:52:23.000Z
2022-02-27T12:16:32.000Z
src/settings.py
RehabAUmc/modys-video
fb745edb360e9ab120280923bd2be58fd8c91fd9
[ "Apache-2.0" ]
12
2021-09-15T09:51:39.000Z
2022-02-27T12:16:02.000Z
src/settings.py
RehabAUmc/modys-video
fb745edb360e9ab120280923bd2be58fd8c91fd9
[ "Apache-2.0" ]
null
null
null
from pathlib import Path PROJECT_ROOT_FOLDER = Path(__file__).parent.parent DATA_FOLDER = PROJECT_ROOT_FOLDER / 'data' SCORES_DATA_FILEPATH = DATA_FOLDER / 'data_clinical_scoring.xlsx' LYING_VIDEOS_DATA_FOLDER = DATA_FOLDER / 'data_stickfigure_coordinates_lying' SITTING_VIDEOS_DATA_FOLDER = DATA_FOLDER / 'data_stickfi...
43.25
81
0.855491
from pathlib import Path PROJECT_ROOT_FOLDER = Path(__file__).parent.parent DATA_FOLDER = PROJECT_ROOT_FOLDER / 'data' SCORES_DATA_FILEPATH = DATA_FOLDER / 'data_clinical_scoring.xlsx' LYING_VIDEOS_DATA_FOLDER = DATA_FOLDER / 'data_stickfigure_coordinates_lying' SITTING_VIDEOS_DATA_FOLDER = DATA_FOLDER / 'data_stickfi...
true
true
f74eace79f4f8bf8c10bb8c07aba841d848d9d58
3,646
py
Python
rotkehlchen/tests/test_price_history.py
esaulkov/rotkehlchen
dcbff5436abd93e91b2904bbe1dfbf24b3a2ec22
[ "BSD-3-Clause" ]
1
2019-08-04T08:30:14.000Z
2019-08-04T08:30:14.000Z
rotkehlchen/tests/test_price_history.py
esaulkov/rotkehlchen
dcbff5436abd93e91b2904bbe1dfbf24b3a2ec22
[ "BSD-3-Clause" ]
null
null
null
rotkehlchen/tests/test_price_history.py
esaulkov/rotkehlchen
dcbff5436abd93e91b2904bbe1dfbf24b3a2ec22
[ "BSD-3-Clause" ]
null
null
null
import random import pytest from rotkehlchen.constants.assets import A_BTC, A_ETH, A_EUR, A_USD from rotkehlchen.fval import FVal from rotkehlchen.tests.utils.constants import A_BSV, A_DASH, A_IOTA from rotkehlchen.tests.utils.history import prices @pytest.mark.skip("https://github.com/rotkehlchenio/rotkehlchen/iss...
46.151899
91
0.754251
import random import pytest from rotkehlchen.constants.assets import A_BTC, A_ETH, A_EUR, A_USD from rotkehlchen.fval import FVal from rotkehlchen.tests.utils.constants import A_BSV, A_DASH, A_IOTA from rotkehlchen.tests.utils.history import prices @pytest.mark.skip("https://github.com/rotkehlchenio/rotkehlchen/iss...
true
true
f74ead0114a1053d40a1998ba0bfd134fdd0e6ea
3,530
py
Python
setup.py
AGaliciaMartinez/qutip-tensorflow
1768387250271d6083626c10b83ea86bbb973ebf
[ "BSD-3-Clause" ]
2
2021-05-24T23:19:21.000Z
2021-05-25T07:45:13.000Z
setup.py
AGaliciaMartinez/qutip-tensorflow
1768387250271d6083626c10b83ea86bbb973ebf
[ "BSD-3-Clause" ]
null
null
null
setup.py
AGaliciaMartinez/qutip-tensorflow
1768387250271d6083626c10b83ea86bbb973ebf
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import os import subprocess import sys # Required third-party imports, must be specified in pyproject.toml. import packaging.version import setuptools def process_options(): """ Determine all runtime options, returning a dictionary of the results. The keys are: 'rootdir': ...
36.020408
79
0.650992
import os import subprocess import sys import packaging.version import setuptools def process_options(): options = {} options['rootdir'] = os.path.dirname(os.path.abspath(__file__)) options = _determine_version(options) return options def _determine_version(options): version_filename = os.pa...
true
true
f74ead5346265a3e1e788e8222f8eba5f84bd1f6
1,186
py
Python
simulation/subclone.py
shubhomb/clonal_evolution
bbbd0a482293d41cadebe53028e0adeded591e6b
[ "MIT" ]
1
2020-03-19T22:31:05.000Z
2020-03-19T22:31:05.000Z
simulation/subclone.py
shubhomb/mm_clonal_evolution
bbbd0a482293d41cadebe53028e0adeded591e6b
[ "MIT" ]
null
null
null
simulation/subclone.py
shubhomb/mm_clonal_evolution
bbbd0a482293d41cadebe53028e0adeded591e6b
[ "MIT" ]
null
null
null
import numpy as np class Subclone: """ Initializes a Subclone Population. :attr label: Either A, B or S :attr fitness: Current fitness :attr prop: Current Proportion """ def __init__(self, lbl, c, alpha, prop=0.333, parent=None, birthtime=None, color=None): ...
29.65
93
0.572513
import numpy as np class Subclone: def __init__(self, lbl, c, alpha, prop=0.333, parent=None, birthtime=None, color=None): self.label = lbl self.fitness = 0.0 self.prop = prop self.c = c self.parent = parent self.alpha = alpha self.bt = birthtime sel...
true
true
f74ead947ddb8c1027e4952d7966f7b7391ac054
7,459
py
Python
test/fuzz/test_runner.py
MichaelHDesigns/hodl-cash
eccc76430417068ae3b1b755d9bf71986779430c
[ "MIT" ]
null
null
null
test/fuzz/test_runner.py
MichaelHDesigns/hodl-cash
eccc76430417068ae3b1b755d9bf71986779430c
[ "MIT" ]
null
null
null
test/fuzz/test_runner.py
MichaelHDesigns/hodl-cash
eccc76430417068ae3b1b755d9bf71986779430c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run fuzz test targets. """ import argparse import configparser import os import sys import subprocess impor...
36.208738
180
0.617509
import argparse import configparser import os import sys import subprocess import logging def main(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, description='''Run the fuzz targets with all inputs from the seed_dir once.''', ) parser.add_...
true
true
f74eae3aae5b37f3e2195e7b98109cfdc963eab1
888
py
Python
zerver/filters.py
alexandraciobica/zulip
f3753504469070bfccc73f22f933c87bee7d1852
[ "Apache-2.0" ]
1
2020-03-17T14:58:50.000Z
2020-03-17T14:58:50.000Z
zerver/filters.py
alexandraciobica/zulip
f3753504469070bfccc73f22f933c87bee7d1852
[ "Apache-2.0" ]
3
2020-06-05T22:30:24.000Z
2022-02-10T19:04:47.000Z
zerver/filters.py
alexandraciobica/zulip
f3753504469070bfccc73f22f933c87bee7d1852
[ "Apache-2.0" ]
1
2019-12-23T05:51:08.000Z
2019-12-23T05:51:08.000Z
import re from typing import Any, Dict from django.http import HttpRequest from django.views.debug import SafeExceptionReporterFilter class ZulipExceptionReporterFilter(SafeExceptionReporterFilter): def get_post_parameters(self, request: HttpRequest) -> Dict[str, Any]: filtered_post = SafeExceptionReporte...
42.285714
96
0.644144
import re from typing import Any, Dict from django.http import HttpRequest from django.views.debug import SafeExceptionReporterFilter class ZulipExceptionReporterFilter(SafeExceptionReporterFilter): def get_post_parameters(self, request: HttpRequest) -> Dict[str, Any]: filtered_post = SafeExceptionReporte...
true
true
f74eae6663cb7e1310621bae2565730e7194127f
9,046
py
Python
gust/tests/test_preprocessing.py
richtertill/node_embeddings
7b34fd060178e90b0c82744f5ad2fd600723dbf2
[ "MIT" ]
4
2020-11-01T20:00:53.000Z
2021-08-18T21:09:31.000Z
gust/tests/test_preprocessing.py
richtertill/node_embeddings
7b34fd060178e90b0c82744f5ad2fd600723dbf2
[ "MIT" ]
1
2021-08-21T12:18:37.000Z
2021-08-21T12:18:37.000Z
gust/tests/test_preprocessing.py
richtertill/node_embeddings
7b34fd060178e90b0c82744f5ad2fd600723dbf2
[ "MIT" ]
4
2020-11-17T17:10:00.000Z
2021-12-27T04:11:24.000Z
import pytest import numpy as np import scipy.sparse as sp import gust class TestPreprocessing: def setup(self): self.A = sp.csr_matrix(np.array( [[1. , 0. , 0.5, 0. , 0. ], [0. , 1. , 1. , 0. , 1. ], [0.5, 0. , 1. , 0. , 0. ], [0. , 0. ,...
40.383929
78
0.459982
import pytest import numpy as np import scipy.sparse as sp import gust class TestPreprocessing: def setup(self): self.A = sp.csr_matrix(np.array( [[1. , 0. , 0.5, 0. , 0. ], [0. , 1. , 1. , 0. , 1. ], [0.5, 0. , 1. , 0. , 0. ], [0. , 0. ,...
true
true
f74eae6a8bbd9162a72644304679b593778430a6
28,754
py
Python
image_classification/PiT/main_multi_gpu.py
DDXDaniel/PaddleViT
9b78cd33feafe75daf68c5e5979ea7a27d4d40e9
[ "Apache-2.0" ]
null
null
null
image_classification/PiT/main_multi_gpu.py
DDXDaniel/PaddleViT
9b78cd33feafe75daf68c5e5979ea7a27d4d40e9
[ "Apache-2.0" ]
null
null
null
image_classification/PiT/main_multi_gpu.py
DDXDaniel/PaddleViT
9b78cd33feafe75daf68c5e5979ea7a27d4d40e9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PPViT 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 ...
45.568938
110
0.612541
import sys import os import time import logging import argparse import random import numpy as np import paddle import paddle.nn as nn import paddle.nn.functional as F import paddle.distributed as dist from datasets import get_dataloader from datasets import get_dataset from utils import AverageMeter from...
true
true
f74eaeafa4ae0e4f2d1bd6ed6db2a3ccc484ddc1
1,437
py
Python
stable_projects/predict_phenotypes/He2019_KRDNN/cbig/He2019/config.py
marielacour81/CBIG
511af756c6ddabbd3a9681ce3514b79ef5aaaf3f
[ "MIT" ]
2
2019-08-31T01:30:34.000Z
2020-03-04T22:18:05.000Z
stable_projects/predict_phenotypes/He2019_KRDNN/cbig/He2019/config.py
marielacour81/CBIG
511af756c6ddabbd3a9681ce3514b79ef5aaaf3f
[ "MIT" ]
null
null
null
stable_projects/predict_phenotypes/He2019_KRDNN/cbig/He2019/config.py
marielacour81/CBIG
511af756c6ddabbd3a9681ce3514b79ef5aaaf3f
[ "MIT" ]
1
2020-03-14T03:06:33.000Z
2020-03-14T03:06:33.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Written by Tong He and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md """ import os import numpy as np class config: BASE_DIR = '../../../../../../data/fmri_predict_behavior' CUR_DIR = os.getcwd() INTER_DIR = os.path....
29.326531
74
0.690327
import os import numpy as np class config: BASE_DIR = '../../../../../../data/fmri_predict_behavior' CUR_DIR = os.getcwd() INTER_DIR = os.path.join(BASE_DIR, 'He2019_data') GRAPH_FOLDER = os.path.join(INTER_DIR, 'graph') RAMDOM_SEED = 42 OUT_PATH = 'log' HCP_CORR_MAT = 'FC_subject...
true
true
f74eb160aecb179a057fbcb86ea1378677fcd663
2,144
py
Python
aliyun-python-sdk-faas/aliyunsdkfaas/request/v20170824/UpdateCreateTaskRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-faas/aliyunsdkfaas/request/v20170824/UpdateCreateTaskRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-faas/aliyunsdkfaas/request/v20170824/UpdateCreateTaskRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.580645
74
0.767257
from aliyunsdkcore.request import RpcRequest from aliyunsdkfaas.endpoint import endpoint_data class UpdateCreateTaskRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'faas', '2017-08-24', 'UpdateCreateTask') self.set_method('POST') if hasattr(self, "endpoint_map"): setat...
true
true
f74eb1866a8e3359dd254912e9d5b8bccf93d232
9,055
py
Python
cloud_controller/knowledge/instance.py
smartarch/qoscloud
13b11b0baaad0d9b234d7defccdbd8756c2618a1
[ "MIT" ]
2
2021-02-20T13:53:02.000Z
2021-11-15T16:11:32.000Z
cloud_controller/knowledge/instance.py
smartarch/qoscloud
13b11b0baaad0d9b234d7defccdbd8756c2618a1
[ "MIT" ]
null
null
null
cloud_controller/knowledge/instance.py
smartarch/qoscloud
13b11b0baaad0d9b234d7defccdbd8756c2618a1
[ "MIT" ]
null
null
null
from typing import Optional, Dict, List from cloud_controller.knowledge.model import Statefulness, Component from cloud_controller.knowledge.user_equipment import UserEquipment from cloud_controller.middleware.helpers import OrderedEnum class Compin: """ A common base class for managed and unmanaged compins....
40.066372
127
0.628382
from typing import Optional, Dict, List from cloud_controller.knowledge.model import Statefulness, Component from cloud_controller.knowledge.user_equipment import UserEquipment from cloud_controller.middleware.helpers import OrderedEnum class Compin: def __init__(self, component: Component, id_: str, chain_id: ...
true
true
f74eb1e452ff17f181767685a30d778d05792a74
16,924
py
Python
trackers/Commodities/comm_futures_tracker.py
merz9b/FinanceHub
c15ad6bb91ee0711d4974eb66e1cfe0e80a3f570
[ "MIT" ]
1
2019-09-23T22:00:18.000Z
2019-09-23T22:00:18.000Z
trackers/Commodities/comm_futures_tracker.py
paulogomesfreitas/FinanceHub
a8e1b0e645f5811a5cf3b178a75f718ff6871769
[ "MIT" ]
null
null
null
trackers/Commodities/comm_futures_tracker.py
paulogomesfreitas/FinanceHub
a8e1b0e645f5811a5cf3b178a75f718ff6871769
[ "MIT" ]
null
null
null
""" Author: Gustavo Soares """ import math import pandas as pd from bloomberg import BBG from pandas.tseries.offsets import BDay from datetime import timedelta class CommFutureTracker(object): """ Class for creating excess return indices for commodity futures using data from bloomberg. A default front-mo...
55.127036
120
0.531257
import math import pandas as pd from bloomberg import BBG from pandas.tseries.offsets import BDay from datetime import timedelta class CommFutureTracker(object): bcom_roll_schedules = { 'C': ['H', 'H', 'K', 'K', 'N', 'N', 'U', 'U', 'Z', 'Z', 'Z', 'H+'], 'S': ['H', 'H', ...
true
true
f74eb20f2f911eac6be8f37560ba099bb5753921
273
py
Python
test/test_modify_contact.py
eugence/Python-Training
670f5aabd4b1ca8ad74885477fc70102d184dc13
[ "Apache-2.0" ]
null
null
null
test/test_modify_contact.py
eugence/Python-Training
670f5aabd4b1ca8ad74885477fc70102d184dc13
[ "Apache-2.0" ]
null
null
null
test/test_modify_contact.py
eugence/Python-Training
670f5aabd4b1ca8ad74885477fc70102d184dc13
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact def test_modify_contact_first_name(app): app.contact.modify_first_contact(Contact(first_name="second first name")) def test_modify_contact_last_name(app): app.contact.modify_first_contact(Contact(last_name="second last name"))
27.3
77
0.813187
from model.contact import Contact def test_modify_contact_first_name(app): app.contact.modify_first_contact(Contact(first_name="second first name")) def test_modify_contact_last_name(app): app.contact.modify_first_contact(Contact(last_name="second last name"))
true
true