hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c47596b8a5035d0ebdff520ba15dc9448d843dc
7,887
py
Python
sphinx/builders/singlehtml.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
sphinx/builders/singlehtml.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
sphinx/builders/singlehtml.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
""" sphinx.builders.singlehtml ~~~~~~~~~~~~~~~~~~~~~~~~~~ Single HTML builders. :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from os import path from typing import Any, Dict, List, Tuple, Union from docutils import nodes from docuti...
37.557143
91
0.613034
from os import path from typing import Any, Dict, List, Tuple, Union from docutils import nodes from docutils.nodes import Node from sphinx.application import Sphinx from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.deprecation import RemovedInSphinx40Warning, deprecated_alias from sphinx.environmen...
true
true
1c4759c0cc109175a0ac69b07dc02aafad9b54f6
26,867
py
Python
src/test/isolation2/sql_isolation_testcase.py
kalensk/gpdb
52d17ad2057c0b74360e4693f683cc537178d86a
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/isolation2/sql_isolation_testcase.py
kalensk/gpdb
52d17ad2057c0b74360e4693f683cc537178d86a
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/isolation2/sql_isolation_testcase.py
kalensk/gpdb
52d17ad2057c0b74360e4693f683cc537178d86a
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
40.1
193
0.544274
import pygresql.pg import os import subprocess import re import multiprocessing import tempfile import time import sys import socket from optparse import OptionParser import traceback def is_digit(n): try: int(n) return True except ValueError: return False def load_helper_file(helper...
true
true
1c475a28b1d83edba4b3c614df0405e3f55f79f0
53,813
py
Python
lib/sqlalchemy/sql/sqltypes.py
mjpieters/sqlalchemy
a8efeb6c052330b7b8d44960132d638b08d42d18
[ "MIT" ]
null
null
null
lib/sqlalchemy/sql/sqltypes.py
mjpieters/sqlalchemy
a8efeb6c052330b7b8d44960132d638b08d42d18
[ "MIT" ]
null
null
null
lib/sqlalchemy/sql/sqltypes.py
mjpieters/sqlalchemy
a8efeb6c052330b7b8d44960132d638b08d42d18
[ "MIT" ]
null
null
null
# sql/sqltypes.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQL specific types. """ import datetime as dt import codecs from .type_api impor...
33.115692
93
0.607474
import datetime as dt import codecs from .type_api import TypeEngine, TypeDecorator, to_instance from .elements import quoted_name, type_coerce from .default_comparator import _DefaultColumnComparator from .. import exc, util, processors from .base import _bind_or_error, SchemaEventTarget from . import operator...
true
true
1c475b01d3f2a15d38e7166284a6e4891d718fa6
4,466
py
Python
tinkt/cmap_utils.py
claydodo/tinkt
dfd07fe7cad34c0d5a1ec0e03a6437a502410918
[ "Unlicense" ]
null
null
null
tinkt/cmap_utils.py
claydodo/tinkt
dfd07fe7cad34c0d5a1ec0e03a6437a502410918
[ "Unlicense" ]
null
null
null
tinkt/cmap_utils.py
claydodo/tinkt
dfd07fe7cad34c0d5a1ec0e03a6437a502410918
[ "Unlicense" ]
null
null
null
# -*- coding:utf-8 -*- # cmap utils import six import numpy as np from matplotlib import cm as mpl_cm from matplotlib import colors as mpl_colors from . import cm as tinkt_cm CM_FAMILIES = { 'mpl': mpl_cm, 'tinkt': tinkt_cm } def set_under_over_bad_colors(cmap, under=None, over=None, bad=None): if un...
36.606557
140
0.638155
import six import numpy as np from matplotlib import cm as mpl_cm from matplotlib import colors as mpl_colors from . import cm as tinkt_cm CM_FAMILIES = { 'mpl': mpl_cm, 'tinkt': tinkt_cm } def set_under_over_bad_colors(cmap, under=None, over=None, bad=None): if under is not None: cmap.set_...
true
true
1c475e064511372aa11c413ea6aad9da5ab26d2e
10,185
py
Python
test_nfc.py
tnoumar/ST-M24SR64-NFC
6f5b2ec574fb51d3ffc458b562eb0f6df657a6a4
[ "MIT" ]
null
null
null
test_nfc.py
tnoumar/ST-M24SR64-NFC
6f5b2ec574fb51d3ffc458b562eb0f6df657a6a4
[ "MIT" ]
null
null
null
test_nfc.py
tnoumar/ST-M24SR64-NFC
6f5b2ec574fb51d3ffc458b562eb0f6df657a6a4
[ "MIT" ]
null
null
null
# Author: Taha NOUMAR tnoumar@enseirb-matmeca.fr # DATA SHEETS # https://www.st.com/resource/en/datasheet/m24sr64-y.pdf # CONFIGURATION # tag type: M24SR64Y # eeprom size: 64KBit # I2C address: 0x56 import machine import binascii import utime def byte0(b): return b & 0x00FF def byte1(b): return ...
34.880137
149
0.525282
import machine import binascii import utime def byte0(b): return b & 0x00FF def byte1(b): return (b & 0xFF00) >> 8 class NFCTag(): I2C_ADDRESS_7BIT = 0x56 SYSTEM = 0xE101 CC = 0xE103 NDEF = 0x0001 NDEF_HEADER=[0xd1, 0x01, 0x00, 0x54, 0x02, 0x65, 0x6e] verbose = True ...
true
true
1c475e204df91f662e807804eaf4a475b120362c
18,766
py
Python
OgreVertexBuffer.py
lamogui/ogre_blender_importer
4742e27909f57598889bdfa8a956001c6776d056
[ "MIT" ]
13
2016-01-23T08:00:34.000Z
2022-02-16T10:27:08.000Z
OgreVertexBuffer.py
lamogui/ogre_blender_importer
4742e27909f57598889bdfa8a956001c6776d056
[ "MIT" ]
3
2016-09-20T15:22:28.000Z
2021-05-31T01:25:05.000Z
OgreVertexBuffer.py
lamogui/ogre_blender_importer
4742e27909f57598889bdfa8a956001c6776d056
[ "MIT" ]
9
2016-07-13T23:23:55.000Z
2022-03-24T21:22:53.000Z
from enum import IntEnum; from struct import unpack_from; try: from OgreHardwareBuffer import OgreFakeHardwareBuffer except ImportError as e: directory = os.path.dirname(os.path.realpath(__file__)); print("Import error: " + str(e) + " manual compilation" ); srcfile="OgreHardwareBuffer.py"; exec(compile...
37.013807
113
0.632154
from enum import IntEnum; from struct import unpack_from; try: from OgreHardwareBuffer import OgreFakeHardwareBuffer except ImportError as e: directory = os.path.dirname(os.path.realpath(__file__)); print("Import error: " + str(e) + " manual compilation" ); srcfile="OgreHardwareBuffer.py"; exec(compile...
true
true
1c475e3625b49e36e394562fd00fe1877c86b2a5
4,692
py
Python
env/Lib/site-packages/sqlalchemy/dialects/sqlite/pysqlcipher.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
env/Lib/site-packages/sqlalchemy/dialects/sqlite/pysqlcipher.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
env/Lib/site-packages/sqlalchemy/dialects/sqlite/pysqlcipher.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# sqlite/pysqlcipher.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: sqlite+pysqlcipher :name: pysqlcipher :dbapi: pysqlci...
33.755396
96
0.702472
from __future__ import absolute_import from .pysqlite import SQLiteDialect_pysqlite from ... import pool from ...engine import url as _url class SQLiteDialect_pysqlcipher(SQLiteDialect_pysqlite): driver = "pysqlcipher" pragmas = ("kdf_iter", "cipher", "cipher_page_size", "cipher_use_hmac") @cla...
true
true
1c475e7b96a4c7661d55f944dc305ea0b892c612
2,727
py
Python
facerec_py/facerec/svm.py
idf/FaceReader
d649bf7ca7f9cf66ac99e81a5187cfcc2b54f49d
[ "MIT" ]
7
2015-04-17T02:12:32.000Z
2018-08-08T01:29:24.000Z
facerec_py/facerec/svm.py
idf/FaceReader
d649bf7ca7f9cf66ac99e81a5187cfcc2b54f49d
[ "MIT" ]
null
null
null
facerec_py/facerec/svm.py
idf/FaceReader
d649bf7ca7f9cf66ac99e81a5187cfcc2b54f49d
[ "MIT" ]
4
2017-08-26T11:44:20.000Z
2021-06-13T11:50:11.000Z
from facerec_py.facerec.classifier import SVM from facerec_py.facerec.validation import KFoldCrossValidation from facerec_py.facerec.model import PredictableModel from svmutil import * from itertools import product import numpy as np import logging def range_f(begin, end, step): seq = [] while True: i...
35.881579
171
0.6641
from facerec_py.facerec.classifier import SVM from facerec_py.facerec.validation import KFoldCrossValidation from facerec_py.facerec.model import PredictableModel from svmutil import * from itertools import product import numpy as np import logging def range_f(begin, end, step): seq = [] while True: i...
true
true
1c475ea363209a3a683098d4d7dce556761ceb57
7,113
py
Python
app/main.py
ri10073/tracardi-api
828bc0939b3915af4c32906c65769c5b5fd992c3
[ "MIT" ]
null
null
null
app/main.py
ri10073/tracardi-api
828bc0939b3915af4c32906c65769c5b5fd992c3
[ "MIT" ]
null
null
null
app/main.py
ri10073/tracardi-api
828bc0939b3915af4c32906c65769c5b5fd992c3
[ "MIT" ]
null
null
null
import logging import os import asyncio from time import time import elasticsearch from fastapi.middleware.cors import CORSMiddleware from fastapi import FastAPI, Request, Depends from starlette.staticfiles import StaticFiles from app.api import token_endpoint, rule_endpoint, resource_endpoint, event_endpoint, \ ...
34.529126
146
0.685505
import logging import os import asyncio from time import time import elasticsearch from fastapi.middleware.cors import CORSMiddleware from fastapi import FastAPI, Request, Depends from starlette.staticfiles import StaticFiles from app.api import token_endpoint, rule_endpoint, resource_endpoint, event_endpoint, \ ...
true
true
1c475ed89de55cb2f813d13f5130ed38d968d27a
3,572
py
Python
bindings/python/ensmallen/datasets/string/sulfurospirillumhalorespiransdsm13726.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/sulfurospirillumhalorespiransdsm13726.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/sulfurospirillumhalorespiransdsm13726.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Sulfurospirillum halorespirans DSM 13726. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11...
34.019048
223
0.68505
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def SulfurospirillumHalorespiransDsm13726( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: s...
true
true
1c475eea3e539ba4d1a9a72d6264384d25b277e3
204
py
Python
book/recursion/base_conversion.py
Web-Dev-Collaborative/algos
d280581d74ded382094283d931a202eb55fd8369
[ "CC0-1.0" ]
153
2015-12-24T00:32:23.000Z
2022-02-24T06:00:29.000Z
book/recursion/base_conversion.py
Web-Dev-Collaborative/algos
d280581d74ded382094283d931a202eb55fd8369
[ "CC0-1.0" ]
78
2015-11-17T11:46:15.000Z
2021-06-28T18:37:58.000Z
book/recursion/base_conversion.py
rhivent/algo-books-python
c4fa29616ca9a8a15ba40fa12d21fd8f35096d40
[ "CC0-1.0" ]
66
2015-11-02T03:38:02.000Z
2022-03-05T17:36:26.000Z
CHAR_FOR_INT = '0123456789abcdef' def to_string(n, base): if n < base: return CHAR_FOR_INT[n] return to_string(n // base, base) + CHAR_FOR_INT[n % base] to_string(1453, 16) # => 5Ad
17
62
0.637255
CHAR_FOR_INT = '0123456789abcdef' def to_string(n, base): if n < base: return CHAR_FOR_INT[n] return to_string(n // base, base) + CHAR_FOR_INT[n % base] to_string(1453, 16)
true
true
1c475efe695ee9d1a051a1330fe3636e05ac3b4c
579
py
Python
setup.py
tijko/shadow
8ba9a8c2de2be51fa4eb387a179dbc0ac4641575
[ "MIT" ]
null
null
null
setup.py
tijko/shadow
8ba9a8c2de2be51fa4eb387a179dbc0ac4641575
[ "MIT" ]
null
null
null
setup.py
tijko/shadow
8ba9a8c2de2be51fa4eb387a179dbc0ac4641575
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup, Extension, find_packages except ImportError: from distutils.core import setup, Extension setup( name = 'shadow', version = '0.0.1', author='Tim Konick', author_email='konick781@gmail.com', url='', descri...
26.318182
82
0.670121
try: from setuptools import setup, Extension, find_packages except ImportError: from distutils.core import setup, Extension setup( name = 'shadow', version = '0.0.1', author='Tim Konick', author_email='konick781@gmail.com', url='', description='Provides auxillary data on processes'...
true
true
1c475f7fce5478d597fc5b92d7692cf01e58b4c5
1,559
py
Python
thenewboston_node/business_logic/models/signed_change_request/base.py
nishp77/thenewboston-node
158b1f1739b2c6c9c21c80e9da854ca141f1cf8f
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/models/signed_change_request/base.py
nishp77/thenewboston-node
158b1f1739b2c6c9c21c80e9da854ca141f1cf8f
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/models/signed_change_request/base.py
nishp77/thenewboston-node
158b1f1739b2c6c9c21c80e9da854ca141f1cf8f
[ "MIT" ]
null
null
null
import copy import logging from dataclasses import dataclass from typing import ClassVar, Type, TypeVar from thenewboston_node.business_logic.models.base import BaseDataclass from thenewboston_node.core.logging import validates from thenewboston_node.core.utils.cryptography import derive_public_key from thenewboston_n...
32.479167
92
0.77678
import copy import logging from dataclasses import dataclass from typing import ClassVar, Type, TypeVar from thenewboston_node.business_logic.models.base import BaseDataclass from thenewboston_node.core.logging import validates from thenewboston_node.core.utils.cryptography import derive_public_key from thenewboston_n...
true
true
1c475f9553b3a997c5e9fa81cedd6cc86997d3a6
4,621
py
Python
ProjectFiles/UMKCEntrepreneurialLegalServicesClinicDocuments/IntakeForm.py
KCLegalHackers/2016-Coding-For-Lawyers
0e7aeaf3b446defcfa60c862dfac5627cedd1560
[ "MIT" ]
1
2021-01-15T00:34:54.000Z
2021-01-15T00:34:54.000Z
ProjectFiles/UMKCEntrepreneurialLegalServicesClinicDocuments/IntakeForm.py
KCLegalHackers/2016-Coding-For-Lawyers
0e7aeaf3b446defcfa60c862dfac5627cedd1560
[ "MIT" ]
null
null
null
ProjectFiles/UMKCEntrepreneurialLegalServicesClinicDocuments/IntakeForm.py
KCLegalHackers/2016-Coding-For-Lawyers
0e7aeaf3b446defcfa60c862dfac5627cedd1560
[ "MIT" ]
null
null
null
print('Application for Services: To be considered for acceptance as a client, you must complete this form and return it to the Entrepreneurial Legal Services Clinic. Acceptance as a client of the UMKC Entrepreneurial Legal Services Clinic is not guaranteed, and is ultimately based upon available of resources and time t...
78.322034
726
0.781649
print('Application for Services: To be considered for acceptance as a client, you must complete this form and return it to the Entrepreneurial Legal Services Clinic. Acceptance as a client of the UMKC Entrepreneurial Legal Services Clinic is not guaranteed, and is ultimately based upon available of resources and time t...
true
true
1c475fd0731889687d14b2130b367eb0ec6cbbcf
1,749
py
Python
setup.py
gaussian/django-sql-explorer
844c8f59f8a3de31ef445e18356e97afded50dfc
[ "MIT" ]
null
null
null
setup.py
gaussian/django-sql-explorer
844c8f59f8a3de31ef445e18356e97afded50dfc
[ "MIT" ]
null
null
null
setup.py
gaussian/django-sql-explorer
844c8f59f8a3de31ef445e18356e97afded50dfc
[ "MIT" ]
null
null
null
import os from setuptools import setup from explorer import __version__ # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): ...
33.634615
79
0.612922
import os from setuptools import setup from explorer import __version__ # README file and 2) it's easier to type in the README file than to put a raw def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="django-sql-explorer", version=__version__, author=...
true
true
1c4760d27cf1f4616f2f9ae082e15fd487249b5e
3,074
py
Python
tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/keras_evaluation_test.py
andrewyguo/privacy
a33afde0c105ece6c48b17a80f13899cf3e7c1b3
[ "Apache-2.0" ]
null
null
null
tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/keras_evaluation_test.py
andrewyguo/privacy
a33afde0c105ece6c48b17a80f13899cf3e7c1b3
[ "Apache-2.0" ]
null
null
null
tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/keras_evaluation_test.py
andrewyguo/privacy
a33afde0c105ece6c48b17a80f13899cf3e7c1b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, The TensorFlow Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
41.540541
125
0.737801
from absl.testing import absltest import numpy as np import tensorflow as tf from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack import keras_evaluation from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import AttackResults from tensorflow_priv...
true
true
1c47629a3fff6341d9f92bd348f85e77bc92bff9
282
py
Python
html_downloader.py
etworker/TinySpider
b3e3c67451d361d064d915875582341b84f0d49d
[ "MIT" ]
null
null
null
html_downloader.py
etworker/TinySpider
b3e3c67451d361d064d915875582341b84f0d49d
[ "MIT" ]
null
null
null
html_downloader.py
etworker/TinySpider
b3e3c67451d361d064d915875582341b84f0d49d
[ "MIT" ]
null
null
null
__author__ = 'worker' import urllib2 class HtmlDownloader(object): def download(self, url): if url is None: return None response = urllib2.urlopen(url) if response.getcode() != 200: return None return response.read()
20.142857
39
0.588652
__author__ = 'worker' import urllib2 class HtmlDownloader(object): def download(self, url): if url is None: return None response = urllib2.urlopen(url) if response.getcode() != 200: return None return response.read()
true
true
1c4762e3f34e2ed7a22ada6411f795fe540463d8
18,315
py
Python
pfp/native/compat_io.py
krx/pfp-construct
248c43781e15ba6eb0a9a6c0982a40c0e380d9b6
[ "MIT" ]
null
null
null
pfp/native/compat_io.py
krx/pfp-construct
248c43781e15ba6eb0a9a6c0982a40c0e380d9b6
[ "MIT" ]
null
null
null
pfp/native/compat_io.py
krx/pfp-construct
248c43781e15ba6eb0a9a6c0982a40c0e380d9b6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ This module of native functions is implemented for compatability with 010 editor functions. Some of these functions are nops, some are fully implemented. """ from pytest import skip import six import sys from pfp.native import native import pfp.interp import pfp.errors as ...
29.82899
93
0.690527
from pytest import skip import six import sys from pfp.native import native import pfp.interp import pfp.errors as errors import pfp.bitwrap as bitwrap from .. import utils import construct as C @native(name="BigEndian", ret=None) def BigEndian(params, ctxt, scope, stream, coord): if len(params) > 0: ...
true
true
1c4763580d072403c8ca37e045aa564412f3085f
3,801
py
Python
train_utils.py
Jack407/TFCNs_source_code
f41466ad18457dd6335287112191e5daacf6d80d
[ "MIT" ]
null
null
null
train_utils.py
Jack407/TFCNs_source_code
f41466ad18457dd6335287112191e5daacf6d80d
[ "MIT" ]
null
null
null
train_utils.py
Jack407/TFCNs_source_code
f41466ad18457dd6335287112191e5daacf6d80d
[ "MIT" ]
null
null
null
import argparse import logging import random import sys import time import numpy as np import torch import torch.nn as nn import torch.optim as optim from tensorboardX import SummaryWriter from torch.nn.modules.loss import CrossEntropyLoss from torch.utils.data import DataLoader from tqdm import tqdm from utils import ...
43.689655
109
0.660353
import argparse import logging import random import sys import time import numpy as np import torch import torch.nn as nn import torch.optim as optim from tensorboardX import SummaryWriter from torch.nn.modules.loss import CrossEntropyLoss from torch.utils.data import DataLoader from tqdm import tqdm from utils import ...
true
true
1c4763d96158d165cbae23a7f534f6cbe67be1a2
78,654
py
Python
source/codegen/metadata/nifgen/functions.py
zhindes/grpc-device
616aa913963098b12d276693895b7eb946f82df4
[ "MIT" ]
null
null
null
source/codegen/metadata/nifgen/functions.py
zhindes/grpc-device
616aa913963098b12d276693895b7eb946f82df4
[ "MIT" ]
23
2021-04-16T06:22:40.000Z
2021-06-11T05:51:45.000Z
source/codegen/metadata/nifgen/functions.py
zhindes/grpc-device
616aa913963098b12d276693895b7eb946f82df4
[ "MIT" ]
1
2021-10-30T09:23:49.000Z
2021-10-30T09:23:49.000Z
functions = { 'AbortGeneration':{ 'parameters':[ { 'name':'vi', 'direction':'in', 'type':'ViSession' } ], 'returns':'ViStatus' }, 'AdjustSampleClockRelativeDelay':{ 'parameters':[ { ...
25.729146
61
0.309902
functions = { 'AbortGeneration':{ 'parameters':[ { 'name':'vi', 'direction':'in', 'type':'ViSession' } ], 'returns':'ViStatus' }, 'AdjustSampleClockRelativeDelay':{ 'parameters':[ { ...
true
true
1c476528ea9e0ab39dc368d76e84eab32c00fa45
724
py
Python
mldp/tests/transformers/test_seq_len_computer.py
prashantlv/mltoolkit
acc192bafc66b7661d541ef4f604b5e5ab7df5ca
[ "MIT" ]
1
2020-10-03T05:23:31.000Z
2020-10-03T05:23:31.000Z
mldp/tests/transformers/test_seq_len_computer.py
prashantlv/mltoolkit
acc192bafc66b7661d541ef4f604b5e5ab7df5ca
[ "MIT" ]
null
null
null
mldp/tests/transformers/test_seq_len_computer.py
prashantlv/mltoolkit
acc192bafc66b7661d541ef4f604b5e5ab7df5ca
[ "MIT" ]
null
null
null
import unittest from mldp.steps.transformers.nlp import SeqLenComputer from mldp.utils.tools import DataChunk from copy import deepcopy import numpy as np class TestSeqLenComputer(unittest.TestCase): def test_output(self): fn = "dummy" new_fn = "dummy_len" data = [[1, 2, 3], [12], ["a", "...
27.846154
64
0.618785
import unittest from mldp.steps.transformers.nlp import SeqLenComputer from mldp.utils.tools import DataChunk from copy import deepcopy import numpy as np class TestSeqLenComputer(unittest.TestCase): def test_output(self): fn = "dummy" new_fn = "dummy_len" data = [[1, 2, 3], [12], ["a", "...
true
true
1c4765731326549e159d462a7abaa90cb1582cbf
181
py
Python
apps/profile/apps.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
2
2018-05-18T08:38:29.000Z
2018-05-22T08:26:09.000Z
apps/profile/apps.py
IT-PM-OpenAdaptronik/Webapp
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
118
2017-10-31T13:45:09.000Z
2018-02-24T20:51:42.000Z
apps/profile/apps.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class ProfileConfig(AppConfig): name = 'apps.profile' verbose_name = _('profile')
22.625
54
0.762431
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class ProfileConfig(AppConfig): name = 'apps.profile' verbose_name = _('profile')
true
true
1c47670eaf2832f39b529a294728b4e11a136702
629
py
Python
src/create_experiment.py
G-Simeone/Learning_Accident_Occurence_on_Dutch_Highways
1f3992a529fed70fd488811d68128a1e255fac5f
[ "MIT" ]
4
2018-11-09T16:18:28.000Z
2019-04-09T11:19:23.000Z
src/create_experiment.py
G-Simeone/Learning_Accident_Occurence_on_Dutch_Highways
1f3992a529fed70fd488811d68128a1e255fac5f
[ "MIT" ]
null
null
null
src/create_experiment.py
G-Simeone/Learning_Accident_Occurence_on_Dutch_Highways
1f3992a529fed70fd488811d68128a1e255fac5f
[ "MIT" ]
1
2020-05-28T18:48:17.000Z
2020-05-28T18:48:17.000Z
import sys from utils import write_exp_utils import pandas as pd from utils import misc_utils import psycopg2 from psycopg2.extras import Json, DictCursor def main(argv): print(argv[1]) w = write_exp_utils.ExperimentConfig(argv[1], argv[2]) print("writing {} to database".format(argv[1]) ) w.write_to_db...
29.952381
105
0.732909
import sys from utils import write_exp_utils import pandas as pd from utils import misc_utils import psycopg2 from psycopg2.extras import Json, DictCursor def main(argv): print(argv[1]) w = write_exp_utils.ExperimentConfig(argv[1], argv[2]) print("writing {} to database".format(argv[1]) ) w.write_to_db...
true
true
1c4767c28a173b87d61645270342bcabb9c6929c
7,674
py
Python
setup.py
WildbookOrg/wbia-deprecate-tpl-brambox
9aa6a69f706d0653a65520c696a7cd66715b6a37
[ "MIT" ]
2
2019-03-23T03:14:11.000Z
2019-11-21T07:16:13.000Z
setup.py
WildbookOrg/wbia-deprecate-tpl-brambox
9aa6a69f706d0653a65520c696a7cd66715b6a37
[ "MIT" ]
null
null
null
setup.py
WildbookOrg/wbia-deprecate-tpl-brambox
9aa6a69f706d0653a65520c696a7cd66715b6a37
[ "MIT" ]
1
2021-12-01T03:04:53.000Z
2021-12-01T03:04:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import sys from os.path import exists from collections import OrderedDict from setuptools import find_packages from skbuild import setup def native_mb_python_tag(plat_impl=None, version_info=None): """ ...
31.975
125
0.572974
from __future__ import absolute_import, division, print_function import sys from os.path import exists from collections import OrderedDict from setuptools import find_packages from skbuild import setup def native_mb_python_tag(plat_impl=None, version_info=None): if plat_impl is None: import platform ...
true
true
1c476801c70edbae6a98a7915c2d93aa454b9a2d
5,022
py
Python
Analysis/SampleVisualization_AE.py
melodist/MELTNET
47548e4a027ea4e23cdcb5ba1f1d9aa1aa7bbf29
[ "MIT" ]
9
2020-03-16T04:17:05.000Z
2022-02-08T12:51:45.000Z
Analysis/SampleVisualization_AE.py
melodist/MELTNET
47548e4a027ea4e23cdcb5ba1f1d9aa1aa7bbf29
[ "MIT" ]
1
2019-11-26T08:18:16.000Z
2020-09-10T15:21:40.000Z
Analysis/SampleVisualization_AE.py
melodist/MELTNET
47548e4a027ea4e23cdcb5ba1f1d9aa1aa7bbf29
[ "MIT" ]
3
2020-03-16T04:17:30.000Z
2021-12-02T07:10:22.000Z
""" Sample Visualization Make 2-D image of sample distribution 1-1. Extract Features using initial network 1-2. Extract Features using trained network 2. Using K-means to classify the patches 3. Dimension reduction using PCA 4. Visualize results """ import tensorflow as tf import numpy as n...
35.871429
121
0.660892
import tensorflow as tf import numpy as np from Network import NetworkKeras import os import time from Extraction import PatchExtraction from sklearn.cluster import KMeans from sklearn.decomposition import PCA import matplotlib.pyplot as plt from datetime import datetime def SampleVisualization_AE(path_model, path_i...
true
true
1c4768746d5b6ffc5563045f2c062c9a11652afe
7,689
py
Python
tests/components/hue/test_init.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
1
2019-04-22T06:05:09.000Z
2019-04-22T06:05:09.000Z
tests/components/hue/test_init.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
2
2022-01-13T04:26:00.000Z
2022-03-12T01:05:37.000Z
tests/components/hue/test_init.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
1
2021-09-20T01:52:31.000Z
2021-09-20T01:52:31.000Z
"""Test Hue setup process.""" from unittest.mock import Mock, patch from homeassistant.setup import async_setup_component from homeassistant.components import hue from tests.common import mock_coro, MockConfigEntry async def test_setup_with_no_config(hass): """Test that we do not discover anything or try to set...
35.109589
78
0.613864
from unittest.mock import Mock, patch from homeassistant.setup import async_setup_component from homeassistant.components import hue from tests.common import mock_coro, MockConfigEntry async def test_setup_with_no_config(hass): with patch.object(hass, 'config_entries') as mock_config_entries, \ patc...
true
true
1c476b5d686fb5d71b925dc5ae700b71ab106d76
3,587
py
Python
auto_xml.py
tdwitham/AutohammerPy
1621400fd148f012bc59176ad51aa05c5c879c4f
[ "BSD-2-Clause" ]
null
null
null
auto_xml.py
tdwitham/AutohammerPy
1621400fd148f012bc59176ad51aa05c5c879c4f
[ "BSD-2-Clause" ]
null
null
null
auto_xml.py
tdwitham/AutohammerPy
1621400fd148f012bc59176ad51aa05c5c879c4f
[ "BSD-2-Clause" ]
null
null
null
# (c) 2016,2017 - Timothy D. Witham tim.wookie.witham@gmail.com # Licensed under BSD 2-Clause __author__ = 'wookie' import pprint from components.FileOps import writeLog, initialLogDir, makeLogDir from components.infrastructure import getSysInfo from components.MySQL import MySQLOps global DBOP runConfig = dict() sec...
26.182482
101
0.622805
__author__ = 'wookie' import pprint from components.FileOps import writeLog, initialLogDir, makeLogDir from components.infrastructure import getSysInfo from components.MySQL import MySQLOps global DBOP runConfig = dict() secParms = dict() def ckheader(cEvent, cTag, cText): if (cEvent == 'start'): setTo...
true
true
1c476bd27893d69e83ccb306a1d2ce80722a4ad1
9,534
py
Python
piqa/fsim.py
francois-rozet/spiq
a2e68c38da9129c85867e77641ed29d88e84c9d7
[ "MIT" ]
19
2020-10-12T13:57:21.000Z
2020-12-05T12:23:41.000Z
piqa/fsim.py
francois-rozet/spiq
a2e68c38da9129c85867e77641ed29d88e84c9d7
[ "MIT" ]
null
null
null
piqa/fsim.py
francois-rozet/spiq
a2e68c38da9129c85867e77641ed29d88e84c9d7
[ "MIT" ]
null
null
null
r"""Feature Similarity (FSIM) This module implements the FSIM in PyTorch. Original: https://www4.comp.polyu.edu.hk/~cslzhang/IQA/FSIM/FSIM.htm References: .. [Zhang2011] FSIM: A Feature Similarity Index for Image Quality Assessment (Zhang et al., 2011) .. [Kovesi1999] Image Features From Phase Congruenc...
27.877193
101
0.560835
import math import torch import torch.fft as fft import torch.nn as nn import torch.nn.functional as F from torch import Tensor from .utils import _jit, assert_type, reduce_tensor from .utils import complex as cx from .utils.color import ColorConv from .utils.functional import ( scharr_kernel, gradient_kerne...
true
true
1c476c016e38e87c7a75eeb62acb50db4e2d2883
1,623
py
Python
tests/test_exceptions.py
dobisel/yhttp
4396c03905d71b801a92dead3504cc3ef7d98d79
[ "MIT" ]
10
2020-01-30T16:23:28.000Z
2021-12-12T23:24:37.000Z
tests/test_exceptions.py
dobisel/yhttp
4396c03905d71b801a92dead3504cc3ef7d98d79
[ "MIT" ]
1
2021-07-12T21:07:06.000Z
2021-08-08T10:42:27.000Z
tests/test_exceptions.py
dobisel/yhttp
4396c03905d71b801a92dead3504cc3ef7d98d79
[ "MIT" ]
1
2020-01-26T13:28:35.000Z
2020-01-26T13:28:35.000Z
import pytest from bddrest import status, response, when from yhttp import statuses def test_httpstatus(app, Given): @app.route() def get(req): raise statuses.badrequest() @app.route('/foo') def get(req): return statuses.badrequest() with Given(): assert status == '400 ...
21.077922
78
0.601356
import pytest from bddrest import status, response, when from yhttp import statuses def test_httpstatus(app, Given): @app.route() def get(req): raise statuses.badrequest() @app.route('/foo') def get(req): return statuses.badrequest() with Given(): assert status == '400 ...
true
true
1c476cdd7fb60214bfeb7c01ad0034abc05bd191
3,585
py
Python
plots/thresholds/vit.py
drunkcoding/model-inference
02d2240bc7052fa32223a80fa63625fe681db102
[ "MIT" ]
1
2021-11-15T19:07:13.000Z
2021-11-15T19:07:13.000Z
plots/thresholds/vit.py
drunkcoding/model-inference
02d2240bc7052fa32223a80fa63625fe681db102
[ "MIT" ]
null
null
null
plots/thresholds/vit.py
drunkcoding/model-inference
02d2240bc7052fa32223a80fa63625fe681db102
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from functools import partial import itertools import json import logging import os import time import seaborn as sns import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score import torch from transformers import AutoModelForImageClassification, ViTForImageClas...
24.724138
85
0.72106
from dataclasses import dataclass, field from functools import partial import itertools import json import logging import os import time import seaborn as sns import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score import torch from transformers import AutoModelForImageClassification, ViTForImageClas...
true
true
1c476d41ac879c082652e00bd7f7e69e609c5a8a
14,750
py
Python
game/gamesrc/objects/world/quests.py
abbacode/avaloria
02e1805ac6e74543c96408b7951429f94bc140ca
[ "ClArtistic" ]
null
null
null
game/gamesrc/objects/world/quests.py
abbacode/avaloria
02e1805ac6e74543c96408b7951429f94bc140ca
[ "ClArtistic" ]
null
null
null
game/gamesrc/objects/world/quests.py
abbacode/avaloria
02e1805ac6e74543c96408b7951429f94bc140ca
[ "ClArtistic" ]
null
null
null
import random from prettytable import PrettyTable from src.utils import create, utils from ev import Object from game.gamesrc.objects import copyreader class QuestManager(Object): """ This object is attached to the character and manages all quests received. """ def at_object_creation(self): "...
48.360656
175
0.592746
import random from prettytable import PrettyTable from src.utils import create, utils from ev import Object from game.gamesrc.objects import copyreader class QuestManager(Object): """ This object is attached to the character and manages all quests received. """ def at_object_creation(self): "...
false
true
1c476e3ec222661def123f38fb26ec5839432659
1,087
py
Python
src/utils/etc.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
src/utils/etc.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
src/utils/etc.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
import itertools import json from typing import Iterable, List, Tuple def remove_pads(sequences: Iterable[Iterable[int]], true_lengths: Iterable[int], *, pre_pad: bool = False) -> List[List[int]]: assert len(sequences) == len(true_lengths) output = [] for...
26.512195
78
0.609936
import itertools import json from typing import Iterable, List, Tuple def remove_pads(sequences: Iterable[Iterable[int]], true_lengths: Iterable[int], *, pre_pad: bool = False) -> List[List[int]]: assert len(sequences) == len(true_lengths) output = [] for...
true
true
1c476f371ca7d1b74fa727dff3dcc27f059ba338
4,943
py
Python
tiddlyweb/serializations/json.py
angeluseve/tiddlyweb
d24a45d48faa2b014e1c1598ec176c4c1c98fb07
[ "BSD-3-Clause" ]
1
2016-05-09T15:26:17.000Z
2016-05-09T15:26:17.000Z
tiddlyweb/serializations/json.py
angeluseve/tiddlyweb
d24a45d48faa2b014e1c1598ec176c4c1c98fb07
[ "BSD-3-Clause" ]
null
null
null
tiddlyweb/serializations/json.py
angeluseve/tiddlyweb
d24a45d48faa2b014e1c1598ec176c4c1c98fb07
[ "BSD-3-Clause" ]
null
null
null
""" JSON based serializer. """ import simplejson from base64 import b64encode, b64decode from tiddlyweb.serializations import SerializationInterface from tiddlyweb.model.bag import Bag from tiddlyweb.model.policy import Policy class Serialization(SerializationInterface): """ Turn various entities to and fr...
32.519737
103
0.584665
import simplejson from base64 import b64encode, b64decode from tiddlyweb.serializations import SerializationInterface from tiddlyweb.model.bag import Bag from tiddlyweb.model.policy import Policy class Serialization(SerializationInterface): def list_recipes(self, recipes): return simplejson.dumps([rec...
true
true
1c4771447baf8ca0aea72d01cd74569e19c6a862
7,917
py
Python
solo/methods/nnsiam.py
ludysama/crp
08027b67f174426ddac5eef8186349e8337481fc
[ "MIT" ]
2
2021-11-02T07:38:33.000Z
2021-11-21T12:55:28.000Z
solo/methods/nnsiam.py
ludysama/crp
08027b67f174426ddac5eef8186349e8337481fc
[ "MIT" ]
null
null
null
solo/methods/nnsiam.py
ludysama/crp
08027b67f174426ddac5eef8186349e8337481fc
[ "MIT" ]
null
null
null
# Copyright 2021 solo-learn development team. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to use, # copy, modify, merge, publ...
35.662162
99
0.630794
import argparse from typing import Any, Dict, List, Sequence, Tuple import torch import torch.nn as nn import torch.nn.functional as F from solo.losses.simsiam import simsiam_loss_func from solo.methods.base import BaseMethod from solo.utils.misc import gather class NNSiam(BaseMethod): def __i...
true
true
1c47724e4746e520c60664378824afb818843692
6,421
py
Python
src/create_embedded_tools.py
erenon/bazel
9bf885afeb01c766d84acf86ca847a7b5e7bd0d8
[ "Apache-2.0" ]
null
null
null
src/create_embedded_tools.py
erenon/bazel
9bf885afeb01c766d84acf86ca847a7b5e7bd0d8
[ "Apache-2.0" ]
null
null
null
src/create_embedded_tools.py
erenon/bazel
9bf885afeb01c766d84acf86ca847a7b5e7bd0d8
[ "Apache-2.0" ]
null
null
null
# pylint: disable=g-direct-third-party-import # pylint: disable=g-bad-file-header # Copyright 2017 The Bazel 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 # # ...
42.523179
80
0.686653
atch import os import os.path import re import sys import zipfile from src.create_embedded_tools_lib import copy_tar_to_zip from src.create_embedded_tools_lib import copy_zip_to_zip from src.create_embedded_tools_lib import is_executable output_paths = [ ('*tools/jdk/BUILD*', lambda x: 'tools/jdk/BUILD'),...
true
true
1c47729e783feede84d393f9c877b04a40b6c1cf
5,680
py
Python
src/morphforgeexamples/exset6_poster_ocns2012/poster1.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
1
2021-01-21T11:31:59.000Z
2021-01-21T11:31:59.000Z
src/morphforgeexamples/exset6_poster_ocns2012/poster1.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
null
null
null
src/morphforgeexamples/exset6_poster_ocns2012/poster1.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are ...
40.283688
124
0.660915
import matplotlib as mpl mpl.rcParams['font.size'] = 14 from morphforge.stdimports import * from morphforgecontrib.stdimports import * eqnset_txt_na = """ define_component hh_na { i = g * (v-erev) * m**3*h m_inf = m_alpha_rate / (m_alpha_rate + m_beta_rate) m_tau =...
true
true
1c4772bee94a9049c31da5ef09d5c7071e017e16
2,599
py
Python
tasrif/processing_pipeline/pandas/convert_to_datetime.py
qcri/tasrif
327bc1eccb8f8e11d8869ba65a7c72ad038aa094
[ "BSD-3-Clause" ]
20
2021-12-06T10:41:54.000Z
2022-03-13T16:25:43.000Z
tasrif/processing_pipeline/pandas/convert_to_datetime.py
qcri/tasrif
327bc1eccb8f8e11d8869ba65a7c72ad038aa094
[ "BSD-3-Clause" ]
33
2021-12-06T08:27:18.000Z
2022-03-14T05:07:53.000Z
tasrif/processing_pipeline/pandas/convert_to_datetime.py
qcri/tasrif
327bc1eccb8f8e11d8869ba65a7c72ad038aa094
[ "BSD-3-Clause" ]
2
2022-02-07T08:06:48.000Z
2022-02-14T07:13:42.000Z
""" Operator to convert a column feature from string to datetime """ import pandas as pd from tasrif.processing_pipeline import PandasOperator from tasrif.processing_pipeline.validators import InputsAreDataFramesValidatorMixin class ConvertToDatetimeOperator(InputsAreDataFramesValidatorMixin, PandasOperator): ""...
33.320513
94
0.58561
import pandas as pd from tasrif.processing_pipeline import PandasOperator from tasrif.processing_pipeline.validators import InputsAreDataFramesValidatorMixin class ConvertToDatetimeOperator(InputsAreDataFramesValidatorMixin, PandasOperator): def __init__(self, feature_names, **kwargs): self.feature_name...
true
true
1c4772d8628f28ac08f50f8f4e940c76e95bac8c
2,757
py
Python
deploy/env/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/filelog.py
wangvictor2012/liuwei
0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1
[ "BSD-3-Clause" ]
3
2015-11-05T07:42:43.000Z
2017-05-29T22:59:47.000Z
vendor/lib/python2.7/site-packages/mercurial/filelog.py
ddollar/gobuild
c1b0e52ab6849a13a95a3fdae4913b925f658272
[ "MIT" ]
null
null
null
vendor/lib/python2.7/site-packages/mercurial/filelog.py
ddollar/gobuild
c1b0e52ab6849a13a95a3fdae4913b925f658272
[ "MIT" ]
null
null
null
# filelog.py - file history class for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import revlog import re _mdre = re.compile('\1\n') def _parsemeta(text): "...
29.645161
74
0.564744
import revlog import re _mdre = re.compile('\1\n') def _parsemeta(text): if text[:2] != '\1\n': return None, None, None s = _mdre.search(text, 2).start() mtext = text[2:s] meta = {} keys = [] for l in mtext.splitlines(): k, v = l.split(": ", 1) meta[k] = v ...
true
true
1c47737253ed550c0b8f08ac8b7f413886c1457e
14,684
py
Python
train.py
solmn/parallel_wavenet
45e9eceb7a2d1982b3d45823332575eb26f333c0
[ "MIT" ]
3
2018-10-30T13:45:14.000Z
2020-03-29T06:56:10.000Z
train.py
solmn/parallel_wavenet
45e9eceb7a2d1982b3d45823332575eb26f333c0
[ "MIT" ]
null
null
null
train.py
solmn/parallel_wavenet
45e9eceb7a2d1982b3d45823332575eb26f333c0
[ "MIT" ]
null
null
null
"""Training script for the WaveNet network on the VCTK corpus. This script trains a network with the WaveNet using data from the VCTK corpus, which can be freely downloaded at the following site (~10 GB): http://homepages.inf.ed.ac.uk/jyamagis/page3/page58/page58.html """ from __future__ import print_function import ...
42.686047
117
0.611959
from __future__ import print_function import argparse from datetime import datetime import json import os import sys import time import tensorflow as tf from tensorflow.python.client import timeline from wavenet import WaveNetModel, AudioReader, optimizer_factory BATCH_SIZE = 1 DATA_DIRECTORY = './dataset/LJSpeech...
true
true
1c4773afb9dfe031efe91c301916c555e9dcc6a3
9,570
py
Python
src/HYPERPLUME/hyperplume.py
Pabsm94/Easyplume
ee54194c1c0930b2a0ef442c47f80bd4570913d2
[ "MIT" ]
null
null
null
src/HYPERPLUME/hyperplume.py
Pabsm94/Easyplume
ee54194c1c0930b2a0ef442c47f80bd4570913d2
[ "MIT" ]
null
null
null
src/HYPERPLUME/hyperplume.py
Pabsm94/Easyplume
ee54194c1c0930b2a0ef442c47f80bd4570913d2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Apr 22 14:07:39 2016 @author: pablo """ import numpy as np import abc import matplotlib.pyplot as plt class Hyperplume(): """ Parent class Hyperplume loads target plasma and defines common attributes as well as shared methods in the AEM and SSM plume classe...
34.301075
262
0.546604
import numpy as np import abc import matplotlib.pyplot as plt class Hyperplume(): __metaclass__= abc.ABCMeta @abc.abstractclassmethod def solver(self): return @abc.abstractclassmethod def query(self,z,r): ...
true
true
1c47745f1c0e2c39646a97885253608082c44006
46
py
Python
__init__.py
lucaskjaero/WiktionaryParser
c60a7cb7e50ca929e02c8e6e258c23f4d4114c21
[ "MIT" ]
1
2021-08-24T17:51:41.000Z
2021-08-24T17:51:41.000Z
__init__.py
lucaskjaero/WiktionaryParser
c60a7cb7e50ca929e02c8e6e258c23f4d4114c21
[ "MIT" ]
null
null
null
__init__.py
lucaskjaero/WiktionaryParser
c60a7cb7e50ca929e02c8e6e258c23f4d4114c21
[ "MIT" ]
1
2020-12-14T16:22:31.000Z
2020-12-14T16:22:31.000Z
from .wiktionaryparser import WiktionaryParser
46
46
0.913043
from .wiktionaryparser import WiktionaryParser
true
true
1c477468c75e4642c2f29e87bfdbf22ef08e11fd
4,043
py
Python
models/definitions/flownet/inference.py
HaydenFaulkner/VidDet
2dbc104a41bf1192a00ffde07695180eab18cea8
[ "MIT" ]
19
2019-08-05T12:20:17.000Z
2020-10-29T11:33:50.000Z
models/definitions/flownet/inference.py
HaydenFaulkner/VideoYOLO
2dbc104a41bf1192a00ffde07695180eab18cea8
[ "MIT" ]
2
2021-08-25T14:47:55.000Z
2022-02-09T23:30:49.000Z
models/definitions/flownet/inference.py
HaydenFaulkner/VideoYOLO
2dbc104a41bf1192a00ffde07695180eab18cea8
[ "MIT" ]
3
2020-03-02T14:52:18.000Z
2020-06-05T07:51:18.000Z
import cv2 import mxnet as mx import numpy as np from scipy.misc import imresize from tqdm import tqdm from flownet import get_flownet from utils import flow_to_image, crop, normalise def process_two_images(model, imgs, ctx=None): """ Process two images into one flow image Args: model: The model t...
26.083871
108
0.606728
import cv2 import mxnet as mx import numpy as np from scipy.misc import imresize from tqdm import tqdm from flownet import get_flownet from utils import flow_to_image, crop, normalise def process_two_images(model, imgs, ctx=None): if len(imgs) != 2: return None if isinstance(imgs[0], str): if ...
true
true
1c47763f1386690bf0efd66398f708660e2f5d45
5,537
py
Python
scripts/automation/trex_control_plane/astf/trex_astf_lib/trex_astf_global_info.py
alialnu/trex-core
ae4ab05a6215fd0a859adde40dac6afa8bf0f950
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/astf/trex_astf_lib/trex_astf_global_info.py
alialnu/trex-core
ae4ab05a6215fd0a859adde40dac6afa8bf0f950
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/astf/trex_astf_lib/trex_astf_global_info.py
alialnu/trex-core
ae4ab05a6215fd0a859adde40dac6afa8bf0f950
[ "Apache-2.0" ]
null
null
null
import socket class ASTFGlobalInfoBase(object): _g_params = {} class inner(object): def __init__(self, params, name): self._fields = {} self._params = params self._name = name def __setattr__(self, name, val): if name.startswith("_")...
37.161074
123
0.483475
import socket class ASTFGlobalInfoBase(object): _g_params = {} class inner(object): def __init__(self, params, name): self._fields = {} self._params = params self._name = name def __setattr__(self, name, val): if name.startswith("_")...
true
true
1c4777590dcdd7cd0868594deb226eb09b523f7d
16,358
py
Python
senlin/objects/fields.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
45
2015-10-18T02:56:50.000Z
2022-03-01T15:28:02.000Z
senlin/objects/fields.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
2
2019-04-26T10:44:47.000Z
2020-12-16T19:45:34.000Z
senlin/objects/fields.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
45
2015-10-19T02:35:57.000Z
2021-09-28T09:01:42.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
30.575701
79
0.602152
from oslo_config import cfg from oslo_serialization import jsonutils from oslo_utils import strutils from oslo_utils import uuidutils from oslo_versionedobjects import fields import re from senlin.common import consts from senlin.common.i18n import _ CONF = cfg.CONF FlexibleBooleanField = fields.Flexib...
true
true
1c477804be4c4bf6d36610dc17cf96819da6d6fc
45,319
py
Python
nessai/nestedsampler.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
null
null
null
nessai/nestedsampler.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
null
null
null
nessai/nestedsampler.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Functions and objects related to the main nested sampling algorithm. """ from collections import deque import datetime import logging import os import pickle import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np import seaborn as sns import torch from tqdm i...
36.313301
79
0.583045
from collections import deque import datetime import logging import os import pickle import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np import seaborn as sns import torch from tqdm import tqdm from .livepoint import get_dtype, DEFAULT_FLOAT_DTYPE from .plot import plot_indices, pl...
true
true
1c47785da9d34f0b1c8a9845b5a3002f171b51df
8,815
py
Python
src/sensor_placement.py
tolgadur/Sensor-Placement
ad33477d1fb14052e1a9e58d149d0b8e767ea318
[ "MIT" ]
3
2020-05-10T20:37:50.000Z
2022-03-31T08:25:23.000Z
src/sensor_placement.py
tolgadur/Sensor-Placement
ad33477d1fb14052e1a9e58d149d0b8e767ea318
[ "MIT" ]
null
null
null
src/sensor_placement.py
tolgadur/Sensor-Placement
ad33477d1fb14052e1a9e58d149d0b8e767ea318
[ "MIT" ]
2
2021-02-26T10:15:24.000Z
2021-06-07T11:11:08.000Z
#!/usr/bin/python import numpy as np import heapq import pandas as pd """ FILE NAME: 'sensor_placement.py' DESCRIPTION: This file is implementing the class that will be used for sensor positioning according to solution proposed by Krause, Singh and Guestrin (2008). """ class SensorPlacement: @staticmethod...
42.584541
128
0.569484
import numpy as np import heapq import pandas as pd class SensorPlacement: @staticmethod def isMonotonic(cov, k, V, S, U): A = np.array([]) for j in range(k): S_A = np.setdiff1d(S, A).astype(int) for y in S_A: AHat = np.setdiff1d(V, np.append(A, [y])) ...
true
true
1c4778cd6ee4e3e7a884ff4789b58f8fe5d8053a
1,178
py
Python
prime_numbers_test.py
mkiterian/prime-numbers
be8b3b1250ec8351964c2ef93f8d5e6463efcc7b
[ "MIT" ]
null
null
null
prime_numbers_test.py
mkiterian/prime-numbers
be8b3b1250ec8351964c2ef93f8d5e6463efcc7b
[ "MIT" ]
null
null
null
prime_numbers_test.py
mkiterian/prime-numbers
be8b3b1250ec8351964c2ef93f8d5e6463efcc7b
[ "MIT" ]
null
null
null
import unittest from prime_numbers import generate_prime_numbers class PrimeNumberTest(unittest.TestCase): def test_n_is_an_integer(self): #tests if n is an integer with self.assertRaises(TypeError, msg='n is not an integer'): generate_prime_numbers('number') def test_if_number_is_a_positive_integer(self)...
33.657143
124
0.77674
import unittest from prime_numbers import generate_prime_numbers class PrimeNumberTest(unittest.TestCase): def test_n_is_an_integer(self): with self.assertRaises(TypeError, msg='n is not an integer'): generate_prime_numbers('number') def test_if_number_is_a_positive_integer(self): self.assertEqual(ge...
true
true
1c4779a4e3f7663805d73bbf5c2232d96cc76f28
1,621
py
Python
axley/cogs/misc.py
1olipop/Axley
9ace6706be58c2a8e066a0dbcdcc337b34cc5da7
[ "Apache-2.0" ]
18
2021-05-08T10:28:34.000Z
2021-12-30T16:44:19.000Z
axley/cogs/misc.py
vedrecide/Axley
9ace6706be58c2a8e066a0dbcdcc337b34cc5da7
[ "Apache-2.0" ]
1
2021-07-05T13:07:20.000Z
2021-07-05T13:07:20.000Z
axley/cogs/misc.py
1olipop/Axley
9ace6706be58c2a8e066a0dbcdcc337b34cc5da7
[ "Apache-2.0" ]
6
2021-06-01T15:31:10.000Z
2021-07-21T17:17:36.000Z
import discord import psutil import os from discord.ext import commands class Misc(commands.Cog): def __init__(self, bot): self.bot = bot self.process = psutil.Process(os.getpid()) @commands.command(name="Ping", description="Ping of the bot") @commands.guild_only() async def ping(sel...
31.173077
130
0.623689
import discord import psutil import os from discord.ext import commands class Misc(commands.Cog): def __init__(self, bot): self.bot = bot self.process = psutil.Process(os.getpid()) @commands.command(name="Ping", description="Ping of the bot") @commands.guild_only() async def ping(sel...
true
true
1c477b36fa5f2df5e41a132388aaaf828bdc48a6
5,661
py
Python
resource/o2o1/examples.py
chenrushan/chenrushan.github.io
e97745d006b002e1f91c25a74859d313e5c197ed
[ "MIT" ]
null
null
null
resource/o2o1/examples.py
chenrushan/chenrushan.github.io
e97745d006b002e1f91c25a74859d313e5c197ed
[ "MIT" ]
null
null
null
resource/o2o1/examples.py
chenrushan/chenrushan.github.io
e97745d006b002e1f91c25a74859d313e5c197ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Author: juscodit@gmail.com import matplotlib import numpy as np import matplotlib.pyplot as plt import math import sys from math import pow from math import exp delta = 0.025 ### ============================== ### Ellipse function (f(x) = x1^2 + 50 x2^2) ### ============================== ...
23.106122
122
0.558205
import matplotlib import numpy as np import matplotlib.pyplot as plt import math import sys from math import pow from math import exp delta = 0.025 ) heinv = np.linalg.inv(hessian) return np.squeeze(np.asarray(np.negative(np.dot(heinv, gr(p))))) def alpha(p, dd): a, r, c1 = 1, 0.3, 1e-4 g = gr(p) p1 ...
false
true
1c477bb7d2693680a90d4f6220d45872d11fc4b0
1,663
py
Python
vm.py
Ccode-lang/CHex
f8138da241a8b96fae5691de7a9d789a9dbcbeb2
[ "MIT" ]
1
2022-01-31T18:36:36.000Z
2022-01-31T18:36:36.000Z
vm.py
Ccode-lang/CHex
f8138da241a8b96fae5691de7a9d789a9dbcbeb2
[ "MIT" ]
null
null
null
vm.py
Ccode-lang/CHex
f8138da241a8b96fae5691de7a9d789a9dbcbeb2
[ "MIT" ]
null
null
null
import os import sys import codecs try: file = open(sys.argv[1], "rb") except: print("File does not exist or is not given.") sys.exit() bytecode = file.read() file.close() bytecode = list(bytecode) hexcode = [] for dec in bytecode: hexcode += [hex(dec)] # print(hexcode) # magic number check if hexcode[...
27.262295
106
0.556825
import os import sys import codecs try: file = open(sys.argv[1], "rb") except: print("File does not exist or is not given.") sys.exit() bytecode = file.read() file.close() bytecode = list(bytecode) hexcode = [] for dec in bytecode: hexcode += [hex(dec)] if hexcode[0] == "0x68" and hexcode[1] == "0x69...
true
true
1c477bc4296ae17f76dbbd9dad1779671e3a34ae
9,426
py
Python
_backend_api/migrations/0022_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
_backend_api/migrations/0022_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
_backend_api/migrations/0022_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Brand' db.create_table(u'_backend_api_brand', ( ...
78.55
142
0.619032
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.create_table(u'_backend_api_brand', ( (u'id', self.gf('django.db.models.fields.A...
true
true
1c477c54727b29435a21a6019d3960076fc447e1
4,706
py
Python
nibabel/minc2.py
tobon/nibabel
ff2b5457207bb5fd6097b08f7f11123dc660fda7
[ "BSD-3-Clause" ]
null
null
null
nibabel/minc2.py
tobon/nibabel
ff2b5457207bb5fd6097b08f7f11123dc660fda7
[ "BSD-3-Clause" ]
null
null
null
nibabel/minc2.py
tobon/nibabel
ff2b5457207bb5fd6097b08f7f11123dc660fda7
[ "BSD-3-Clause" ]
null
null
null
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
35.383459
132
0.632172
true
true
1c477c95b5afb69f25ef37ab384ae3c2d5026cb5
4,980
py
Python
tests/integrationtest/api/test_guards.py
RasmusGodske/eo-platform-utils
4d7c5bdc102d1eb7a5edff096f2783dbdbaa283d
[ "Apache-2.0" ]
null
null
null
tests/integrationtest/api/test_guards.py
RasmusGodske/eo-platform-utils
4d7c5bdc102d1eb7a5edff096f2783dbdbaa283d
[ "Apache-2.0" ]
null
null
null
tests/integrationtest/api/test_guards.py
RasmusGodske/eo-platform-utils
4d7c5bdc102d1eb7a5edff096f2783dbdbaa283d
[ "Apache-2.0" ]
null
null
null
from typing import List from uuid import uuid4 import pytest from flask.testing import FlaskClient from origin.api import ( Application, EndpointGuard, TokenGuard, ScopedGuard, ) from .endpoints import EmptyEndpoint class TestGuards: """ TODO """ @pytest.mark.parametrize('guard', [...
25.9375
78
0.41245
from typing import List from uuid import uuid4 import pytest from flask.testing import FlaskClient from origin.api import ( Application, EndpointGuard, TokenGuard, ScopedGuard, ) from .endpoints import EmptyEndpoint class TestGuards: @pytest.mark.parametrize('guard', [ TokenGuard(), ...
true
true
1c477d2e6f7e2a1431cc5681d3d4bbd7036d06ed
191
py
Python
alphapept/__init__.py
enryH/alphapept
a4a1155b820f3567e21a872e0883e653661efe2b
[ "Apache-2.0" ]
null
null
null
alphapept/__init__.py
enryH/alphapept
a4a1155b820f3567e21a872e0883e653661efe2b
[ "Apache-2.0" ]
null
null
null
alphapept/__init__.py
enryH/alphapept
a4a1155b820f3567e21a872e0883e653661efe2b
[ "Apache-2.0" ]
null
null
null
__version__ = "0.4.0" __requirements__ = { "": "requirements/requirements.txt", "develop": "requirements/requirements_develop.txt", "gui": "requirements/requirements_gui.txt", }
23.875
55
0.696335
__version__ = "0.4.0" __requirements__ = { "": "requirements/requirements.txt", "develop": "requirements/requirements_develop.txt", "gui": "requirements/requirements_gui.txt", }
true
true
1c477dc103178022d9d4cec538afb84e72df6950
167
py
Python
django_chatserver/chat/routing.py
zhiqiyu/Random-Web
10b89776fbcdaa012e1f42a49a050d1b397b73a2
[ "MIT" ]
null
null
null
django_chatserver/chat/routing.py
zhiqiyu/Random-Web
10b89776fbcdaa012e1f42a49a050d1b397b73a2
[ "MIT" ]
null
null
null
django_chatserver/chat/routing.py
zhiqiyu/Random-Web
10b89776fbcdaa012e1f42a49a050d1b397b73a2
[ "MIT" ]
null
null
null
from django.urls import re_path from . import consumers websocket_urlpatterns = [ re_path(r'ws/chat/(?P<room_name>\w+)/$', consumers.ChatConsumer.as_asgi()), ]
18.555556
79
0.718563
from django.urls import re_path from . import consumers websocket_urlpatterns = [ re_path(r'ws/chat/(?P<room_name>\w+)/$', consumers.ChatConsumer.as_asgi()), ]
true
true
1c477e1719e1177e3264aa192d9f0d5a10a984e2
9,469
py
Python
osx/qcdict.py
WeAreAVP/mdqc
3130a713c70017bc54d8e5da6bb5766ba9d97423
[ "Apache-2.0" ]
8
2019-01-18T08:58:02.000Z
2021-05-20T16:51:14.000Z
osx/qcdict.py
WeAreAVP/mdqc
3130a713c70017bc54d8e5da6bb5766ba9d97423
[ "Apache-2.0" ]
7
2016-02-25T21:50:03.000Z
2017-12-13T14:27:29.000Z
osx/qcdict.py
WeAreAVP/mdqc
3130a713c70017bc54d8e5da6bb5766ba9d97423
[ "Apache-2.0" ]
2
2020-02-13T16:00:07.000Z
2020-08-12T16:31:49.000Z
# MDQC Core (OSX) # Version 0.1, 2013-10-28 # Copyright (c) 2013 AudioVisual Preservation Solutions # All rights reserved. # Released under the Apache license, v. 2.0 import subprocess from collections import defaultdict from os import path import time from re import compile, findall, UNICODE import sys # template (t...
32.539519
132
0.524659
import subprocess from collections import defaultdict from os import path import time from re import compile, findall, UNICODE import sys def template(tpl): rules = [] with open(tpl, 'r') as t: s = t.readlines() for r in range(len(s)): q = s[r].split('\t') if q[1].strip() i...
false
true
1c477e610890926de828f933fc42e26ec8d369e3
83
py
Python
MachineLearningToolkitCore/Loss/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
MachineLearningToolkitCore/Loss/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
MachineLearningToolkitCore/Loss/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 22:43:31 2019 @author: ZWH """
10.375
35
0.542169
true
true
1c477f84e4323ce0c780a036d579746b5abba31d
522
py
Python
dynabuffers-python/tests/usecase/Schema03Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
2
2019-10-28T12:28:01.000Z
2020-07-07T12:25:40.000Z
dynabuffers-python/tests/usecase/Schema03Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
1
2021-12-21T07:35:22.000Z
2021-12-21T07:35:22.000Z
dynabuffers-python/tests/usecase/Schema03Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
1
2020-03-19T09:19:43.000Z
2020-03-19T09:19:43.000Z
import os import unittest from antlr4 import FileStream from dynabuffers.Dynabuffers import Dynabuffers class Schema03Test(unittest.TestCase): root_dir = os.path.dirname(os.path.realpath(__file__)) def test_parse(self): engine = Dynabuffers.parse(FileStream(self.root_dir + "/schema03.dbs")) ...
24.857143
89
0.697318
import os import unittest from antlr4 import FileStream from dynabuffers.Dynabuffers import Dynabuffers class Schema03Test(unittest.TestCase): root_dir = os.path.dirname(os.path.realpath(__file__)) def test_parse(self): engine = Dynabuffers.parse(FileStream(self.root_dir + "/schema03.dbs")) ...
true
true
1c47802de2045227fcff56755ff71d4d4d7c6eba
150
py
Python
hubspot/cms/performance/api/__init__.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
1
2020-11-12T08:46:32.000Z
2020-11-12T08:46:32.000Z
hubspot/cms/performance/api/__init__.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
hubspot/cms/performance/api/__init__.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import # flake8: noqa # import apis into api package from hubspot.cms.performance.api.default_api import DefaultApi
21.428571
62
0.826667
from __future__ import absolute_import from hubspot.cms.performance.api.default_api import DefaultApi
true
true
1c47816a5c703047ace0c887f2f265050774570e
1,174
py
Python
dir_test/test_me.py
splbio/pytestdoc
08a8ee1a4014bb78169ee4fc41cc6b722032826e
[ "BSD-2-Clause" ]
9
2015-07-08T16:25:32.000Z
2021-04-15T10:50:12.000Z
dir_test/test_me.py
splbio/pytestdoc
08a8ee1a4014bb78169ee4fc41cc6b722032826e
[ "BSD-2-Clause" ]
1
2015-08-18T06:53:50.000Z
2015-10-11T04:55:41.000Z
dir_test/test_me.py
splbio/pytestdoc
08a8ee1a4014bb78169ee4fc41cc6b722032826e
[ "BSD-2-Clause" ]
2
2019-04-04T08:44:13.000Z
2021-02-22T08:12:03.000Z
import json import pytestdoc WHAT_IS_THIS = True def times(x, y): return x * y TEST_CATEGORY="derp" @pytestdoc.tattr_redmine_feature(7474) @pytestdoc.tattr_redmine_bug(7475, 1776) @pytestdoc.tattr_incomplete @pytestdoc.tattr_category("herp") @pytestdoc.tattr_doc(""" This is the *documentation* for my function ...
24.978723
77
0.736797
import json import pytestdoc WHAT_IS_THIS = True def times(x, y): return x * y TEST_CATEGORY="derp" @pytestdoc.tattr_redmine_feature(7474) @pytestdoc.tattr_redmine_bug(7475, 1776) @pytestdoc.tattr_incomplete @pytestdoc.tattr_category("herp") @pytestdoc.tattr_doc(""" This is the *documentation* for my function ...
true
true
1c4781b885c055266febe549972d98ad995a452c
2,740
py
Python
aiida_defect/calculations.py
unkcpz/aiida-defect
592c1d8dd8130b06d06b543d5e5d35286afa63a3
[ "MIT" ]
1
2021-02-18T07:20:02.000Z
2021-02-18T07:20:02.000Z
aiida_defect/calculations.py
unkcpz/aiida-defect
592c1d8dd8130b06d06b543d5e5d35286afa63a3
[ "MIT" ]
null
null
null
aiida_defect/calculations.py
unkcpz/aiida-defect
592c1d8dd8130b06d06b543d5e5d35286afa63a3
[ "MIT" ]
null
null
null
""" Calculations provided by aiida_defect. Register calculations via the "aiida.calculations" entry point in setup.json. """ from __future__ import absolute_import import six from aiida.common import datastructures from aiida.engine import CalcJob from aiida.orm import SinglefileData from aiida.plugins import DataFa...
40.895522
125
0.708394
from __future__ import absolute_import import six from aiida.common import datastructures from aiida.engine import CalcJob from aiida.orm import SinglefileData from aiida.plugins import DataFactory DiffParameters = DataFactory('defect') class DiffCalculation(CalcJob): @classmethod def define(cls, spec): ...
true
true
1c4782033a601ea0f3de81c2b2d2f03f95b1884b
2,006
py
Python
examples/gui/__main__.py
vcokltfre/aionasa
8cd1d496d7373c806e38eb75e0103e4377da0875
[ "MIT" ]
4
2020-11-26T10:49:53.000Z
2021-05-18T17:56:08.000Z
examples/gui/__main__.py
vcokltfre/aionasa
8cd1d496d7373c806e38eb75e0103e4377da0875
[ "MIT" ]
1
2021-01-07T01:41:27.000Z
2021-01-07T01:41:27.000Z
examples/gui/__main__.py
vcokltfre/aionasa
8cd1d496d7373c806e38eb75e0103e4377da0875
[ "MIT" ]
1
2021-08-19T18:49:53.000Z
2021-08-19T18:49:53.000Z
import argparse import asyncio import os from aionasa.epic.api import EPIC from aionasa.utils import date_strptime from gui import open_gui __doc__ = "Download some images from NASA's EPIC archive and open them in a gui browser." usage = "python -m aionasa.epic [-h] [--date DATE] [--collection COLLECTION] img_folder...
28.657143
100
0.653539
import argparse import asyncio import os from aionasa.epic.api import EPIC from aionasa.utils import date_strptime from gui import open_gui __doc__ = "Download some images from NASA's EPIC archive and open them in a gui browser." usage = "python -m aionasa.epic [-h] [--date DATE] [--collection COLLECTION] img_folder...
true
true
1c4782238324e2454e74dfd129755995c5656e98
11,993
py
Python
aesara/graph/utils.py
danhphan/aesara
5a0fb0e731358d54648823170acd911cc1534d6a
[ "BSD-3-Clause" ]
null
null
null
aesara/graph/utils.py
danhphan/aesara
5a0fb0e731358d54648823170acd911cc1534d6a
[ "BSD-3-Clause" ]
null
null
null
aesara/graph/utils.py
danhphan/aesara
5a0fb0e731358d54648823170acd911cc1534d6a
[ "BSD-3-Clause" ]
null
null
null
import linecache import sys import traceback from abc import ABCMeta from io import StringIO from typing import TYPE_CHECKING, List, Optional, Sequence, Tuple, TypeVar, Union if TYPE_CHECKING: from aesara.graph.basic import Apply, Variable T = TypeVar("T", bound=Union["Apply", "Variable"]) def simple_extract_s...
28.622912
85
0.547736
import linecache import sys import traceback from abc import ABCMeta from io import StringIO from typing import TYPE_CHECKING, List, Optional, Sequence, Tuple, TypeVar, Union if TYPE_CHECKING: from aesara.graph.basic import Apply, Variable T = TypeVar("T", bound=Union["Apply", "Variable"]) def simple_extract_s...
true
true
1c47827600948d2b87bf218f91b1371ea3cbb3eb
3,488
py
Python
fhirclient/models/coding.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
fhirclient/models/coding.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
fhirclient/models/coding.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Coding) on 2019-01-22. # 2019, SMART Health IT. from . import element class Coding(element.Element): """ A r e f e r e n c e t o a...
12.966543
103
0.294725
from . import element class Coding(element.Element): resource_type = "Coding" def __init__(self, jsondict=None, strict=True): self.code = None self.display = None self.system = None self.userSelected = None se...
true
true
1c4782c8740a735f5aa4dfddb82ffcdda14f7ceb
689
py
Python
packages/cuda/cuSolverDn.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
3
2019-08-02T21:02:47.000Z
2021-09-08T13:59:43.000Z
packages/cuda/cuSolverDn.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
null
null
null
packages/cuda/cuSolverDn.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Lijun Zhu # california institute of technology # (c) 2016-2019 all rights reserved # # externals from . import cuda as libcuda # the extension from .Matrix import Matrix class cuSolverDn: """ Wrapper for cusolverDn lib utitilies """ def create_handle(): """ ...
20.264706
57
0.628447
from . import cuda as libcuda from .Matrix import Matrix class cuSolverDn: def create_handle(): handle = libcuda.cusolverDnCreate() return handle def get_current_handle(): from . import manager if manager.current_device is None: manager.device(0)...
true
true
1c478487162412bd45e541a0e720bee7c90272d6
42,379
py
Python
tensorflow/python/framework/func_graph.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
3
2016-08-20T04:02:24.000Z
2019-04-21T06:18:41.000Z
tensorflow/python/framework/func_graph.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
59
2019-06-17T09:37:49.000Z
2022-01-19T01:21:34.000Z
tensorflow/python/framework/func_graph.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
1
2019-10-31T09:22:30.000Z
2019-10-31T09:22:30.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.720766
97
0.697704
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections as py_collections import itertools import weakref from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.eager import context from tensorflow.python.eager...
true
true
1c478522810cfe82e7a178b902b41a16a8504685
14,006
py
Python
sdk/python/pulumi_azure_native/azurestackhci/v20210101preview/get_cluster.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/azurestackhci/v20210101preview/get_cluster.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/azurestackhci/v20210101preview/get_cluster.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
39.677054
496
0.667214
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetClusterResult', 'AwaitableGetClusterResult', 'get_cluster', ] @pulumi.output_type class GetClusterResult: def __...
true
true
1c478544308d1c24ccd1470dc7b2c5e5197b8d45
1,181
py
Python
src/main.py
ITAnalyst-JU/process-logger
a51d4604b2dc3047dec9adfec96334ff20a3782f
[ "MIT" ]
null
null
null
src/main.py
ITAnalyst-JU/process-logger
a51d4604b2dc3047dec9adfec96334ff20a3782f
[ "MIT" ]
null
null
null
src/main.py
ITAnalyst-JU/process-logger
a51d4604b2dc3047dec9adfec96334ff20a3782f
[ "MIT" ]
null
null
null
#!/bin/python import time import argparse from Invoker import Invoker def parse_cmd_name(parts): # TODO maybe for eg. 'make testall' this shoule return 'make testall' and not 'make'? assert len(parts) >= 1 assert len(parts[0]) >= 1 x = parts[0].split('/')[-1] assert ' ' not in x return x d...
28.804878
111
0.647756
import time import argparse from Invoker import Invoker def parse_cmd_name(parts): assert len(parts) >= 1 assert len(parts[0]) >= 1 x = parts[0].split('/')[-1] assert ' ' not in x return x def get_time_str(): t = time.localtime() return f'{t.tm_year}.{t.tm_mon}.{t.tm_mday} {t.tm_...
true
true
1c478548a8539ffc957d7a9e7b5a3ba080deb1de
1,052
py
Python
manabe/public/management/commands/fake_server.py
luoyedao/manabe
90c158bd23e956308263b542634adc97f6526276
[ "Apache-2.0" ]
16
2018-08-12T08:28:00.000Z
2022-03-15T02:13:42.000Z
manabe/public/management/commands/fake_server.py
luoyedao/manabe
90c158bd23e956308263b542634adc97f6526276
[ "Apache-2.0" ]
14
2020-02-11T23:27:29.000Z
2022-02-11T03:43:26.000Z
manabe/public/management/commands/fake_server.py
luoyedao/manabe
90c158bd23e956308263b542634adc97f6526276
[ "Apache-2.0" ]
25
2018-08-26T07:38:46.000Z
2022-03-15T02:13:45.000Z
from random import choice from django.contrib.auth.models import User from appinput.models import App from envx.models import Env from serverinput.models import Server def fake_server_data(): Server.objects.all().delete() print('delete all server data') user_set = User.objects.all() app_set = App.obj...
35.066667
78
0.586502
from random import choice from django.contrib.auth.models import User from appinput.models import App from envx.models import Env from serverinput.models import Server def fake_server_data(): Server.objects.all().delete() print('delete all server data') user_set = User.objects.all() app_set = App.obj...
true
true
1c47869bfa0f88eba2e94f57df3c36bcb2331ede
404
py
Python
server/src/prefect_server/utilities/__init__.py
louisditzel/prefect
b1a02fee623b965e756a38aa09059db780ab67eb
[ "ECL-2.0", "Apache-2.0" ]
1
2020-05-10T14:32:32.000Z
2020-05-10T14:32:32.000Z
server/src/prefect_server/utilities/__init__.py
louisditzel/prefect
b1a02fee623b965e756a38aa09059db780ab67eb
[ "ECL-2.0", "Apache-2.0" ]
3
2022-02-14T11:25:57.000Z
2022-02-27T16:25:14.000Z
server/src/prefect_server/utilities/__init__.py
louisditzel/prefect
b1a02fee623b965e756a38aa09059db780ab67eb
[ "ECL-2.0", "Apache-2.0" ]
1
2020-05-31T04:42:56.000Z
2020-05-31T04:42:56.000Z
# Licensed under the Prefect Community License, available at # https://www.prefect.io/legal/prefect-community-license import prefect_server.utilities.context import prefect_server.utilities.exceptions import prefect_server.utilities.graphql import prefect_server.utilities.logging import prefect_server.utilities.names...
33.666667
60
0.868812
import prefect_server.utilities.context import prefect_server.utilities.exceptions import prefect_server.utilities.graphql import prefect_server.utilities.logging import prefect_server.utilities.names import prefect_server.utilities.tests import prefect_server.utilities.asynchronous
true
true
1c47883aeba99de2cb069da42b1663aff45d1bfb
11,011
py
Python
data_kits/nf_kits.py
Jarvis73/DINs
fe967115182a47b9ad1018658cd1be745831e7aa
[ "MIT" ]
null
null
null
data_kits/nf_kits.py
Jarvis73/DINs
fe967115182a47b9ad1018658cd1be745831e7aa
[ "MIT" ]
null
null
null
data_kits/nf_kits.py
Jarvis73/DINs
fe967115182a47b9ad1018658cd1be745831e7aa
[ "MIT" ]
null
null
null
# Copyright 2019-2020 Jianwei Zhang All Right Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
38.365854
101
0.612297
import pickle import zlib from pathlib import Path import nibabel as nib import numpy as np import pandas as pd import scipy.ndimage as ndi import tqdm ROOT = Path(__file__).parent.parent.parent DATA_ROOT = ROOT / "data/NF" def read_nii(file_name, out_dtype=np.int16, special=False, only_header=False...
true
true
1c4788a7fec1e92cf4988f8cd63897bc0a883269
1,288
py
Python
setup.py
AbhiProjects/TagLib
214139259157a7b3ec3f2fb7b342411a33b85839
[ "BSD-3-Clause" ]
null
null
null
setup.py
AbhiProjects/TagLib
214139259157a7b3ec3f2fb7b342411a33b85839
[ "BSD-3-Clause" ]
null
null
null
setup.py
AbhiProjects/TagLib
214139259157a7b3ec3f2fb7b342411a33b85839
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """Setup script for taglib""" import sys if sys.hexversion < 0x02060000: print >> sys.stderr, 'Sorry, Python 2.6 is required.' sys.exit(1) from distutils.core import setup sys.dont_write_bytecode = True # don't leave turds from taglib import __version__ def main(): setup(name='t...
29.953488
78
0.585404
import sys if sys.hexversion < 0x02060000: print >> sys.stderr, 'Sorry, Python 2.6 is required.' sys.exit(1) from distutils.core import setup sys.dont_write_bytecode = True from taglib import __version__ def main(): setup(name='taglib', author='Chris Jones', author_email='cjones...
true
true
1c478921c64292aa5b2d3adeb81064377fca26e0
1,101
py
Python
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.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 ...
30.583333
132
0.608538
from msrest.serialization import Model class SchedulePolicy(Model): _validation = { 'schedule_policy_type': {'required': True}, } _attribute_map = { 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, } _subtype_map = { 'schedule_policy_type'...
true
true
1c478b7837a4774911d31634003c88b12e9c37bc
3,439
py
Python
assets/winc_firmware_upgrade/firmware/handler_search.py
rashedtalukder/cryptoauth_trustplatform_designsuite
6b42c64071a9fb5dc9894bfedbbfabbcfb7961c1
[ "MIT" ]
11
2019-12-03T14:18:38.000Z
2021-08-25T16:41:27.000Z
assets/winc_firmware_upgrade/firmware/handler_search.py
rashedtalukder/cryptoauth_trustplatform_designsuite
6b42c64071a9fb5dc9894bfedbbfabbcfb7961c1
[ "MIT" ]
9
2020-02-13T09:07:42.000Z
2022-03-18T18:29:24.000Z
assets/winc_firmware_upgrade/firmware/handler_search.py
rashedtalukder/cryptoauth_trustplatform_designsuite
6b42c64071a9fb5dc9894bfedbbfabbcfb7961c1
[ "MIT" ]
10
2020-04-28T10:35:48.000Z
2021-11-03T23:03:30.000Z
''' Simple program to get a hint where simple programs might be installed by chasing thru registry, does not deal with things like word which are beyonf complicated. Pass in extention to check and a hint at what program you want. Returns 0 if found. 2 for parm error 1 for not found Eg C:\work_repos\>python handler...
27.95935
95
0.549578
import sys import os import winreg roots_hives = { "HKEY_CLASSES_ROOT": winreg.HKEY_CLASSES_ROOT, "HKEY_CURRENT_USER": winreg.HKEY_CURRENT_USER, "HKEY_LOCAL_MACHINE": winreg.HKEY_LOCAL_MACHINE, "HKEY_USERS": winreg.HKEY_USERS, "HKEY_PERFORMANCE_DATA": winreg.HKEY_PERFORMANCE_DATA, "HKEY_CURRENT...
true
true
1c478b7de55a29c23c21c47bbecf9e11a14c3e20
7,684
py
Python
test/test_grapher.py
leehyoeun96/rosprofiler
c7bee4e98d8417cd3e2a8ef246b7930c97c74dc5
[ "Apache-2.0" ]
6
2017-11-18T05:59:22.000Z
2022-01-01T11:56:00.000Z
test/test_grapher.py
leehyoeun96/rosprofiler
c7bee4e98d8417cd3e2a8ef246b7930c97c74dc5
[ "Apache-2.0" ]
3
2015-04-11T20:04:24.000Z
2018-06-19T21:55:39.000Z
test/test_grapher.py
leehyoeun96/rosprofiler
c7bee4e98d8417cd3e2a8ef246b7930c97c74dc5
[ "Apache-2.0" ]
15
2017-11-19T05:03:29.000Z
2021-03-15T15:26:37.000Z
#!/usr/bin/env python # Copyright 2014 Open Source Robotics Foundation, 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 requ...
49.574194
153
0.730739
import sys import unittest import time import rospy import rostest from ros_topology_msgs.msg import * PKG = 'rosprofiler' NAME = 'test_grapher' EXPECTED_NODES = dict() talker1 = Node(name="/talker1") talker1.publishes.append("/chatter") talker1.publishes.append("/rosout") talker1.connections.append(...
true
true
1c478bdc9499e3ce8182dc63c0c4b8edbd2abeb0
12,032
py
Python
stellapy/stellapy_old/stella_read.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
4
2021-12-15T08:23:45.000Z
2022-02-18T15:14:42.000Z
stellapy/stellapy_old/stella_read.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
37
2021-07-05T16:41:33.000Z
2022-03-21T15:58:05.000Z
stellapy/stellapy_old/stella_read.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
7
2021-07-05T15:35:55.000Z
2022-03-09T09:23:42.000Z
import numpy as np from stella_dirs import * from scipy.io import netcdf #plt.rcParams.update({'font.size': 28}) #plt.rcParams['lines.linewidth'] = 2 import tabCompleter from tabCompleter import * from plotbox import * from aux_functions import * from os import listdir from netCDF4 import * import glob import os.path ...
31.915119
93
0.640376
import numpy as np from stella_dirs import * from scipy.io import netcdf import tabCompleter from tabCompleter import * from plotbox import * from aux_functions import * from os import listdir from netCDF4 import * import glob import os.path def format1(value): return "%.3e" % value def format2(value): re...
true
true
1c478c2f72be04820d92305cfffce27aa98c7fa4
907
py
Python
electrum/tests/__init__.py
checho1989/electrum-civx
4853bf42f0aa96bb894992c1abf7b8bdda587543
[ "MIT" ]
null
null
null
electrum/tests/__init__.py
checho1989/electrum-civx
4853bf42f0aa96bb894992c1abf7b8bdda587543
[ "MIT" ]
null
null
null
electrum/tests/__init__.py
checho1989/electrum-civx
4853bf42f0aa96bb894992c1abf7b8bdda587543
[ "MIT" ]
null
null
null
import unittest import threading from electrum_civx import constants # Set this locally to make the test suite run faster. # If set, unit tests that would normally test functions with multiple implementations, # will only be run once, using the fastest implementation. # e.g. libsecp256k1 vs python-ecdsa. pycryptodom...
23.25641
86
0.705623
import unittest import threading from electrum_civx import constants FAST_TESTS = False class SequentialTestCase(unittest.TestCase): test_lock = threading.Lock() def setUp(self): super().setUp() self.test_lock.acquire() def tearDown(self): super().tearDown() self...
true
true
1c478c32bd4fd3adda92f37777aa80cd495fcafb
926
py
Python
common/models/notice/UserNews.py
apanly/python_learn_master
93a214241812f77a006cc8350a7bad6c4eec6c89
[ "BSD-3-Clause" ]
5
2020-11-29T14:21:18.000Z
2021-10-07T04:11:29.000Z
common/models/notice/UserNews.py
linkgeek/python_flask_cms
ff5e794b5b11075670e5d11a8cbda0a137319876
[ "BSD-3-Clause" ]
null
null
null
common/models/notice/UserNews.py
linkgeek/python_flask_cms
ff5e794b5b11075670e5d11a8cbda0a137319876
[ "BSD-3-Clause" ]
2
2020-11-30T09:55:53.000Z
2022-03-19T12:49:40.000Z
# coding: utf-8 from application import db class UserNews(db.Model): __tablename__ = 'user_news' id = db.Column(db.Integer, primary_key=True, info='消息id') uid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue(), info='用户id') title = db.Column(db.String(255), nullable=False, server_...
51.444444
105
0.686825
from application import db class UserNews(db.Model): __tablename__ = 'user_news' id = db.Column(db.Integer, primary_key=True, info='消息id') uid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue(), info='用户id') title = db.Column(db.String(255), nullable=False, server_default=db.Fetc...
true
true
1c478d69dfa8ae825ea6fc0e5a10dfc164798605
3,750
py
Python
nova/scheduler/filters/disk_filter.py
panguan737/nova
0d177185a439baa228b42c948cab4e934d6ac7b8
[ "Apache-2.0" ]
null
null
null
nova/scheduler/filters/disk_filter.py
panguan737/nova
0d177185a439baa228b42c948cab4e934d6ac7b8
[ "Apache-2.0" ]
null
null
null
nova/scheduler/filters/disk_filter.py
panguan737/nova
0d177185a439baa228b42c948cab4e934d6ac7b8
[ "Apache-2.0" ]
1
2020-11-02T10:17:13.000Z
2020-11-02T10:17:13.000Z
# Copyright (c) 2012 OpenStack Foundation # 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 ...
37.5
79
0.6496
from oslo_log import log as logging import nova.conf from nova.i18n import _LW from nova.scheduler import filters from nova.scheduler.filters import utils LOG = logging.getLogger(__name__) CONF = nova.conf.CONF class DiskFilter(filters.BaseHostFilter): RUN_ON_REBUILD = False def _get_disk_...
true
true
1c478dfbc5d80108de891f08ddbc1d37b7c4fa6e
7,930
py
Python
tests/user/test_scoreboard.py
HYU-ICEWALL/CTFd
d2d95d882663d39d32527afd4382f07188ecb89a
[ "Apache-2.0" ]
null
null
null
tests/user/test_scoreboard.py
HYU-ICEWALL/CTFd
d2d95d882663d39d32527afd4382f07188ecb89a
[ "Apache-2.0" ]
null
null
null
tests/user/test_scoreboard.py
HYU-ICEWALL/CTFd
d2d95d882663d39d32527afd4382f07188ecb89a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from CTFd.models import Teams, Solves, WrongKeys from CTFd.utils import get_config, set_config from CTFd import utils from tests.helpers import * from freezegun import freeze_time from mock import patch import json def test_top_10(): '''Make sure top10 returns correc...
34.034335
115
0.509458
from CTFd.models import Teams, Solves, WrongKeys from CTFd.utils import get_config, set_config from CTFd import utils from tests.helpers import * from freezegun import freeze_time from mock import patch import json def test_top_10(): app = create_ctfd() with app.app_context(): register_user(app, na...
true
true
1c478ed2cb7df85c8da293ebd6985cd21b3671a5
3,769
py
Python
pynventory/hosts.py
kufsa/pynventory
708e7950c38e873b2a4b7bdc779c0533888ac811
[ "MIT" ]
null
null
null
pynventory/hosts.py
kufsa/pynventory
708e7950c38e873b2a4b7bdc779c0533888ac811
[ "MIT" ]
null
null
null
pynventory/hosts.py
kufsa/pynventory
708e7950c38e873b2a4b7bdc779c0533888ac811
[ "MIT" ]
null
null
null
from fabric import Connection from invoke.exceptions import UnexpectedExit class LinuxHost: def __init__(self, host, user): self.connection = Connection(host, connect_timeout=1, user=user, ) self.host = host @staticmethod def display_name(): return 'Host' def __str__(self): ...
30.893443
106
0.555585
from fabric import Connection from invoke.exceptions import UnexpectedExit class LinuxHost: def __init__(self, host, user): self.connection = Connection(host, connect_timeout=1, user=user, ) self.host = host @staticmethod def display_name(): return 'Host' def __str__(self): ...
true
true
1c478ee5315f97fa1a7ac3ba3481af09e56571ff
786
py
Python
setup.py
AndrewRPorter/stocki
0793fe05735c8c803f5cb3ef2ea029a82243dbbd
[ "MIT" ]
33
2018-07-11T19:22:00.000Z
2021-01-02T13:01:10.000Z
setup.py
AndrewRPorter/stocki
0793fe05735c8c803f5cb3ef2ea029a82243dbbd
[ "MIT" ]
2
2018-07-12T12:33:46.000Z
2018-07-16T13:07:59.000Z
setup.py
AndrewRPorter/stocki
0793fe05735c8c803f5cb3ef2ea029a82243dbbd
[ "MIT" ]
5
2018-07-11T17:22:07.000Z
2019-03-19T08:48:08.000Z
from setuptools import setup try: with open("LICENSE.txt", "r") as f: _license = f.read() except Exception: _license = "" try: with open("README.md", "r") as f: _readme = f.read() except Exception: _readme = "" install_requires = ["requests", "urwid", "pycodestyle"] setup( nam...
22.457143
70
0.652672
from setuptools import setup try: with open("LICENSE.txt", "r") as f: _license = f.read() except Exception: _license = "" try: with open("README.md", "r") as f: _readme = f.read() except Exception: _readme = "" install_requires = ["requests", "urwid", "pycodestyle"] setup( nam...
true
true
1c478fc5baec380c9474bb2707520c938527aa52
1,730
py
Python
Puzzle5/binaryPartitioning.py
manasharma90/AoC-2020-Python
6a979eff34136b6b74a340c40121da76e35451da
[ "Apache-2.0" ]
null
null
null
Puzzle5/binaryPartitioning.py
manasharma90/AoC-2020-Python
6a979eff34136b6b74a340c40121da76e35451da
[ "Apache-2.0" ]
null
null
null
Puzzle5/binaryPartitioning.py
manasharma90/AoC-2020-Python
6a979eff34136b6b74a340c40121da76e35451da
[ "Apache-2.0" ]
null
null
null
# defining a function to execute binary partitioning of a list # input = list; output = tuple with two lists ie. ([first half list], [second half list]) def list_half(input_list): half = len(input_list)//2 lower_half = input_list[:half] upper_half = input_list[half:] return lower_half, upper_half w...
25.441176
108
0.616185
def list_half(input_list): half = len(input_list)//2 lower_half = input_list[:half] upper_half = input_list[half:] return lower_half, upper_half with open('input.txt', 'r') as f: a = f.read() boarding_passes = a.split('\n') boarding_passes_cleaned = [] for bp in boarding_passes: if len...
true
true
1c4790bd2a51657327ca769fe5588e04bb77bab6
2,878
py
Python
python/src/nnabla/backward_function/div2.py
chunxiaosz/nnabla
9f4249313129d0fd23d304453830157fee96a2e5
[ "Apache-2.0" ]
1
2019-09-10T06:51:37.000Z
2019-09-10T06:51:37.000Z
python/src/nnabla/backward_function/div2.py
langbin2014/nnabla
e94bac5bed65337010e2ac07a5937fb862ab2dd8
[ "Apache-2.0" ]
null
null
null
python/src/nnabla/backward_function/div2.py
langbin2014/nnabla
e94bac5bed65337010e2ac07a5937fb862ab2dd8
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 Sony 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 applicabl...
35.097561
91
0.589298
import numpy as np import nnabla as nn import nnabla.functions as F from .backward_function import BackwardFunction class Div2Backward(BackwardFunction): def name(self): return 'Div2Backward' def _create_forward_inputs_and_outputs(self, inputs, outputs): inputs_fwd = [...
true
true
1c4791f5de8986417f5d44fefb3cdffd7192c28f
2,568
py
Python
python_scripts/linear_models_sol_03.py
odotreppe/scikit-learn-mooc
da97773fc9b860371e94e3c72791b0c92471b22d
[ "CC-BY-4.0" ]
2
2021-09-30T11:07:28.000Z
2021-09-30T11:07:31.000Z
python_scripts/linear_models_sol_03.py
Ravimk07/scikit-learn-mooc
c3aaf8c5a9aa4f1d749ebc1b7d5ae24619fee4bf
[ "CC-BY-4.0" ]
null
null
null
python_scripts/linear_models_sol_03.py
Ravimk07/scikit-learn-mooc
c3aaf8c5a9aa4f1d749ebc1b7d5ae24619fee4bf
[ "CC-BY-4.0" ]
null
null
null
# %% [markdown] # # 📃 Solution for Exercise M4.03 # # In all previous notebooks, we only used a single feature in `data`. But we # have already shown that we could add new features to make the model more # expressive by deriving new features, based on the original feature. # # The aim of this notebook is to train a li...
35.666667
112
0.720405
arn.datasets import fetch_california_housing data, target = fetch_california_housing(as_frame=True, return_X_y=True) target *= 100 data.head() from sklearn.linear_model import LinearRegression linear_regression = LinearRegression() from sklearn.model_selection import cross_validate cv_results = c...
true
true
1c47920152539c32902149b890e26eb84bfb3c09
5,674
py
Python
novaclient/v1_1/volumes.py
citrix-openstack-build/python-novaclient
3d73fb36e7c5e5f933560760f46ff6aec74ff093
[ "Apache-1.1" ]
1
2015-02-16T09:37:00.000Z
2015-02-16T09:37:00.000Z
novaclient/v1_1/volumes.py
sivel/python-novaclient
810857849ed32773c38df12785715f89d33e83af
[ "Apache-1.1" ]
null
null
null
novaclient/v1_1/volumes.py
sivel/python-novaclient
810857849ed32773c38df12785715f89d33e83af
[ "Apache-1.1" ]
null
null
null
# Copyright 2011 Denali Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
34.180723
78
0.605217
import six from novaclient import base from novaclient.openstack.common.py3kcompat import urlutils class Volume(base.Resource): NAME_ATTR = 'display_name' def __repr__(self): return "<Volume: %s>" % self.id def delete(self): self.manager.delete(self) class VolumeManage...
true
true
1c47922da6f61b01101caee74d5b39091250523f
5,778
py
Python
deepspeech_pytorch/validation.py
RaphaelOlivier/deepspeech.pytorch
eb73ef61807ab01fad3662ad03dfea8fd44439aa
[ "MIT" ]
1
2021-08-07T07:12:40.000Z
2021-08-07T07:12:40.000Z
deepspeech_pytorch/validation.py
RaphaelOlivier/deepspeech.pytorch
eb73ef61807ab01fad3662ad03dfea8fd44439aa
[ "MIT" ]
1
2019-02-07T12:52:46.000Z
2019-02-07T12:52:46.000Z
deepspeech_pytorch/validation.py
RaphaelOlivier/deepspeech.pytorch
eb73ef61807ab01fad3662ad03dfea8fd44439aa
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod import torch from torch.cuda.amp import autocast from tqdm import tqdm from deepspeech_pytorch.decoder import Decoder, GreedyDecoder from pytorch_lightning.metrics import Metric import Levenshtein as Lev class ErrorRate(Metric, ABC): def __init__(self, decod...
33.789474
81
0.602631
from abc import ABC, abstractmethod import torch from torch.cuda.amp import autocast from tqdm import tqdm from deepspeech_pytorch.decoder import Decoder, GreedyDecoder from pytorch_lightning.metrics import Metric import Levenshtein as Lev class ErrorRate(Metric, ABC): def __init__(self, decod...
true
true
1c479507647de6ce6ea1f9c6b660694c87468544
4,167
py
Python
polish/utils/host_call_fn.py
kinoute/google-research
4a59cab927579ea9722e43252c695de5da4eb5e2
[ "Apache-2.0" ]
11
2020-01-29T07:25:04.000Z
2022-03-05T16:01:21.000Z
polish/utils/host_call_fn.py
RubensZimbres/google-research
562c7c6ef959cb3cb382b1b660ccc45e8f5289c4
[ "Apache-2.0" ]
13
2020-01-28T22:19:53.000Z
2022-02-10T00:39:26.000Z
polish/utils/host_call_fn.py
RubensZimbres/google-research
562c7c6ef959cb3cb382b1b660ccc45e8f5289c4
[ "Apache-2.0" ]
2
2020-02-27T11:09:49.000Z
2021-08-25T07:32:15.000Z
# coding=utf-8 # Copyright 2019 The Google Research 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 applicab...
36.552632
78
0.708903
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gin import tensorflow as tf from tensorflow.contrib import summary as contrib_summary @gin.configurable def build_host_call_fn_every_n_global_steps( params, names_and_tensors, ...
true
true
1c47967d6dc098c03dfcc9f615566eb99f55f87c
78,681
py
Python
src/transformers/modeling_tf_utils.py
holazzer/transformers
53191d75ecca21c028077b3227f9ac47379e4690
[ "Apache-2.0" ]
9
2021-07-31T12:02:20.000Z
2021-09-21T00:40:43.000Z
src/transformers/modeling_tf_utils.py
holazzer/transformers
53191d75ecca21c028077b3227f9ac47379e4690
[ "Apache-2.0" ]
null
null
null
src/transformers/modeling_tf_utils.py
holazzer/transformers
53191d75ecca21c028077b3227f9ac47379e4690
[ "Apache-2.0" ]
1
2021-10-01T05:32:22.000Z
2021-10-01T05:32:22.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA 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 cop...
45.192993
167
0.63202
import functools import inspect import os import re import warnings from typing import Dict, List, Optional, Union import h5py import numpy as np import tensorflow as tf from tensorflow.python.keras import backend as K from tensorflow.python.keras.saving import hdf5_format from .configuration_utils im...
true
true
1c47973c175cf48b3b9eebccc97189614023378a
3,319
py
Python
zerver/lib/sessions.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
1
2020-03-17T14:58:50.000Z
2020-03-17T14:58:50.000Z
zerver/lib/sessions.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
null
null
null
zerver/lib/sessions.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
null
null
null
import logging from datetime import timedelta from django.conf import settings from django.contrib.auth import SESSION_KEY, get_user_model from django.contrib.sessions.models import Session from django.utils.timezone import now as timezone_now from importlib import import_module from typing import Any, List, Mapping, ...
40.975309
108
0.730642
import logging from datetime import timedelta from django.conf import settings from django.contrib.auth import SESSION_KEY, get_user_model from django.contrib.sessions.models import Session from django.utils.timezone import now as timezone_now from importlib import import_module from typing import Any, List, Mapping, ...
true
true
1c47973f15053c421fd0ceb6b824666a3ce5fbc4
50,742
py
Python
Funções Analíticas/Virtualenv/Lib/site-packages/matplotlib/__init__.py
Leonardo-Maciel/PSO_Maciel
3939448da45716260f3ac7811afdd13be670f346
[ "MIT" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
Funções Analíticas/Virtualenv/Lib/site-packages/matplotlib/__init__.py
Leonardo-Maciel/PSO_Maciel
3939448da45716260f3ac7811afdd13be670f346
[ "MIT" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
Funções Analíticas/Virtualenv/Lib/site-packages/matplotlib/__init__.py
Leonardo-Maciel/PSO_Maciel
3939448da45716260f3ac7811afdd13be670f346
[ "MIT" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
""" An object-oriented plotting library. A procedural interface is provided by the companion pyplot module, which may be imported directly, e.g.:: import matplotlib.pyplot as plt or using ipython:: ipython at your terminal, followed by:: In [1]: %matplotlib In [2]: import matplotlib.pyplot as plt ...
34.192722
79
0.619566
import atexit from collections import namedtuple from collections.abc import MutableMapping import contextlib from distutils.version import LooseVersion import functools import importlib import inspect from inspect import Parameter import locale import logging import os from pathlib import Path import pprint import re...
true
true
1c4797802e5895313ae0514ecdda3acd949bd084
6,958
py
Python
Lib/objc/CoreTelephony.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
701
2018-10-22T11:54:09.000Z
2022-03-31T14:39:30.000Z
Lib/objc/CoreTelephony.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
229
2018-10-24T09:15:31.000Z
2021-12-24T16:51:37.000Z
Lib/objc/CoreTelephony.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
131
2018-11-25T18:33:03.000Z
2022-03-24T03:18:07.000Z
""" Classes from the 'CoreTelephony' framework. """ try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None MuxNotificationSink = _Class("MuxNotificationSink") Co...
47.333333
87
0.841765
try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None MuxNotificationSink = _Class("MuxNotificationSink") CoreTelephonyClientRemoteAsyncProxy = _Class("CoreTele...
true
true
1c4798111c6d8c070c9d6fc6c731414b5eeea115
34
py
Python
main/views/admin/profile/__init__.py
tiberiucorbu/av-website
f26f44a367d718316442506b130a7034697670b8
[ "MIT" ]
null
null
null
main/views/admin/profile/__init__.py
tiberiucorbu/av-website
f26f44a367d718316442506b130a7034697670b8
[ "MIT" ]
null
null
null
main/views/admin/profile/__init__.py
tiberiucorbu/av-website
f26f44a367d718316442506b130a7034697670b8
[ "MIT" ]
null
null
null
from .profile_controller import *
17
33
0.823529
from .profile_controller import *
true
true
1c4799987b867024deedfd8f407f6c7f0bdfb743
1,772
py
Python
keylime/tornado_requests.py
ansasaki/keylime
6aeb105975e8f2b3e9c83417dcf69b25dc2d69e4
[ "Apache-2.0" ]
null
null
null
keylime/tornado_requests.py
ansasaki/keylime
6aeb105975e8f2b3e9c83417dcf69b25dc2d69e4
[ "Apache-2.0" ]
null
null
null
keylime/tornado_requests.py
ansasaki/keylime
6aeb105975e8f2b3e9c83417dcf69b25dc2d69e4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' SPDX-License-Identifier: Apache-2.0 Copyright 2017 Massachusetts Institute of Technology. ''' import ssl from tornado import httpclient from keylime import json async def request(method, url, params=None, data=None, context=None, headers=None): http_client = httpclient.AsyncHTTPCli...
28.580645
83
0.586907
import ssl from tornado import httpclient from keylime import json async def request(method, url, params=None, data=None, context=None, headers=None): http_client = httpclient.AsyncHTTPClient() if params is not None and len(list(params.keys())) > 0: url += '?' for key in list(params.keys...
true
true
1c479a27833091f86e7dce2d076b0b29113122e0
1,190
py
Python
rgbContrast.py
tsarjak/gsoc_code_library
961cea8e0833d28e5c78e7dd06f7c3823b38cbfb
[ "MIT" ]
null
null
null
rgbContrast.py
tsarjak/gsoc_code_library
961cea8e0833d28e5c78e7dd06f7c3823b38cbfb
[ "MIT" ]
null
null
null
rgbContrast.py
tsarjak/gsoc_code_library
961cea8e0833d28e5c78e7dd06f7c3823b38cbfb
[ "MIT" ]
null
null
null
import cv2 from PIL import Image import numpy as np def arrayToImage(img,sizeX,sizeY,saveAs): rgbArray = np.zeros((sizeX,sizeY,3),'uint8') for i in range(0,sizeX): for j in range(0,sizeY): for k in range(0,3): rgbArray[i,j,k] = img[i,j,k] * 255 img = Image.fromarray(rg...
25.869565
65
0.544538
import cv2 from PIL import Image import numpy as np def arrayToImage(img,sizeX,sizeY,saveAs): rgbArray = np.zeros((sizeX,sizeY,3),'uint8') for i in range(0,sizeX): for j in range(0,sizeY): for k in range(0,3): rgbArray[i,j,k] = img[i,j,k] * 255 img = Image.fromarray(rg...
true
true
1c479cab6063cd842005ff2b64e355a6610808bd
31,229
py
Python
fstunes/__init__.py
raxod502/fstunes
d54860ba1a709ce75855e6897d7f8019ecb92640
[ "MIT" ]
1
2019-05-03T04:08:17.000Z
2019-05-03T04:08:17.000Z
fstunes/__init__.py
raxod502/fstunes
d54860ba1a709ce75855e6897d7f8019ecb92640
[ "MIT" ]
null
null
null
fstunes/__init__.py
raxod502/fstunes
d54860ba1a709ce75855e6897d7f8019ecb92640
[ "MIT" ]
null
null
null
import argparse import bisect import collections import math import mutagen import os import pathlib import random import re import shutil import string import sys def has_duplicates(l): return len(l) != len(set(l)) def iter_len(iterable): return sum(1 for _ in iterable) def plural(n): return "s" if n !=...
36.957396
79
0.573666
import argparse import bisect import collections import math import mutagen import os import pathlib import random import re import shutil import string import sys def has_duplicates(l): return len(l) != len(set(l)) def iter_len(iterable): return sum(1 for _ in iterable) def plural(n): return "s" if n !=...
true
true
1c479ce23370138a8cdf01d03c981094aa08ac95
1,867
py
Python
python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
CeH9/intellij-community
ae45cfd4c76876f9b1c58c6f46508d18523ebd41
[ "Apache-2.0" ]
1
2020-05-30T04:49:44.000Z
2020-05-30T04:49:44.000Z
python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2022-02-19T09:45:05.000Z
2022-02-27T20:32:55.000Z
python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
a = <error descr="Python does not support a trailing 'u'">12u</error> b = <warning descr="Python version 3.4, 3.5, 3.6, 3.7, 3.8 do not support a trailing 'l'.">12l</warning> c = <error descr="Python does not support a trailing 'll'">12ll</error> d = <error descr="Python does not support a trailing 'U'">12U</error> e =...
81.173913
193
0.706481
a = <error descr="Python does not support a trailing 'u'">12u</error> b = <warning descr="Python version 3.4, 3.5, 3.6, 3.7, 3.8 do not support a trailing 'l'.">12l</warning> c = <error descr="Python does not support a trailing 'll'">12ll</error> d = <error descr="Python does not support a trailing 'U'">12U</error> e =...
false
true
1c479d15f72832953af2ac415b7d3ec3543095c2
1,214
py
Python
setup.py
DanielR59/mljar-supervised
04a90ffbff33b2c93a7c212825b987e73b7f62fe
[ "MIT" ]
null
null
null
setup.py
DanielR59/mljar-supervised
04a90ffbff33b2c93a7c212825b987e73b7f62fe
[ "MIT" ]
null
null
null
setup.py
DanielR59/mljar-supervised
04a90ffbff33b2c93a7c212825b987e73b7f62fe
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() setup( name="mljar-supervised", v...
30.35
81
0.644152
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() setup( name="mljar-supervised", version="0.11.2", description="Automated Mac...
true
true
1c479d38ba2d385729e4a2e779104cd41110084d
1,146
py
Python
tekstovni_vmesnik.py
kavcicm/Vislice
04c3c09bad456321ee9da04c6af8deaeaa509842
[ "MIT" ]
null
null
null
tekstovni_vmesnik.py
kavcicm/Vislice
04c3c09bad456321ee9da04c6af8deaeaa509842
[ "MIT" ]
null
null
null
tekstovni_vmesnik.py
kavcicm/Vislice
04c3c09bad456321ee9da04c6af8deaeaa509842
[ "MIT" ]
null
null
null
import model lojtrice = "#############################\n" def izpis_zmage(igra): tekst = lojtrice + "Uganili ste geslo {0}.\n".format(igra.geslo) return tekst def izpis_poraza(igra): tekst = lojtrice + "Obešeni ste! Pravilno geslo je blio {0}.\n".format(igra.geslo) return tekst def izpis_igre(igra): ...
26.651163
86
0.579407
import model lojtrice = "#############################\n" def izpis_zmage(igra): tekst = lojtrice + "Uganili ste geslo {0}.\n".format(igra.geslo) return tekst def izpis_poraza(igra): tekst = lojtrice + "Obešeni ste! Pravilno geslo je blio {0}.\n".format(igra.geslo) return tekst def izpis_igre(igra): ...
true
true
1c479e4d6b65a786785934f82983844d7a1b5553
443
py
Python
run_blast.py
denkovarik/EC-Scrape
e6340fe852b204f4813ec6ede4d20138a85644b6
[ "MIT" ]
null
null
null
run_blast.py
denkovarik/EC-Scrape
e6340fe852b204f4813ec6ede4d20138a85644b6
[ "MIT" ]
null
null
null
run_blast.py
denkovarik/EC-Scrape
e6340fe852b204f4813ec6ede4d20138a85644b6
[ "MIT" ]
null
null
null
import sys, os, time from utils import * import shutil from run_blast_utils import * blast_rslt_dir = 'blast_rslts\\' blast_working_dir = 'temp_blast\\' commands = [] args = parse_args(sys.argv) # Compile command line arguments commands = compile_cmd(args, blast_rslt_dir, blast_working_dir) start_time = t...
24.611111
63
0.740406
import sys, os, time from utils import * import shutil from run_blast_utils import * blast_rslt_dir = 'blast_rslts\\' blast_working_dir = 'temp_blast\\' commands = [] args = parse_args(sys.argv) commands = compile_cmd(args, blast_rslt_dir, blast_working_dir) start_time = time.time() exec_commands(command...
true
true