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
f75eb701008419b45c2fd5595adf6ce3b717e4d3
37,863
py
Python
src/transformers/models/layoutlm/modeling_layoutlm.py
timpal0l/transformers
d86d57faa3b6511c6e4d9139535d77b695b9af8a
[ "Apache-2.0" ]
2
2020-11-30T11:30:40.000Z
2021-03-26T17:20:33.000Z
src/transformers/models/layoutlm/modeling_layoutlm.py
timpal0l/transformers
d86d57faa3b6511c6e4d9139535d77b695b9af8a
[ "Apache-2.0" ]
1
2020-11-12T11:00:12.000Z
2020-11-12T11:00:12.000Z
src/transformers/models/layoutlm/modeling_layoutlm.py
timpal0l/transformers
d86d57faa3b6511c6e4d9139535d77b695b9af8a
[ "Apache-2.0" ]
1
2020-11-17T02:48:00.000Z
2020-11-17T02:48:00.000Z
# coding=utf-8 # Copyright 2018 The Microsoft Research Asia LayoutLM Team Authors and the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/...
41.425602
159
0.675594
import math import torch from torch import nn from torch.nn import CrossEntropyLoss from ...activations import ACT2FN from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward from ...modeling_outputs import ( BaseModelOutputWithCrossAttentions, BaseMo...
true
true
f75eb70dfe18f5179da9db1fc0dde930e07a13f5
2,073
py
Python
inventory/common/api/renderers.py
cnobile2012/inventory
bc09ccdead39a5cd758088dbfe5c56dec43c7e29
[ "MIT" ]
10
2015-02-16T17:12:44.000Z
2021-06-04T18:14:01.000Z
inventory/common/api/renderers.py
cnobile2012/inventory
bc09ccdead39a5cd758088dbfe5c56dec43c7e29
[ "MIT" ]
1
2021-09-20T01:17:38.000Z
2021-09-20T01:17:50.000Z
inventory/common/api/renderers.py
cnobile2012/inventory
bc09ccdead39a5cd758088dbfe5c56dec43c7e29
[ "MIT" ]
5
2015-09-09T02:01:33.000Z
2021-05-29T09:09:14.000Z
# -*- coding: utf-8 -*- # # inventory/common/api/renderers.py # import importlib from django.conf import settings class RendererFactory: _DEFAULT_RENDERERS = settings.REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] VERSIONS = (1.0,) URI_PREFIX = 'application/vnd.tetrasys.pbpms.' CLASS_INFIX = 'RendererVe...
35.135593
76
0.559093
import importlib from django.conf import settings class RendererFactory: _DEFAULT_RENDERERS = settings.REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] VERSIONS = (1.0,) URI_PREFIX = 'application/vnd.tetrasys.pbpms.' CLASS_INFIX = 'RendererVer' def __init__(self): self.configured_renderers = ...
true
true
f75eb7ed84e728ed87ec119c4b061f8eec7f5b63
31,319
py
Python
sdk/lusid/models/period_type.py
rizwansaeed/lusid-sdk-python-preview
52d092d6d4099b8526f0318f3fe1ddc0b943da6a
[ "MIT" ]
null
null
null
sdk/lusid/models/period_type.py
rizwansaeed/lusid-sdk-python-preview
52d092d6d4099b8526f0318f3fe1ddc0b943da6a
[ "MIT" ]
null
null
null
sdk/lusid/models/period_type.py
rizwansaeed/lusid-sdk-python-preview
52d092d6d4099b8526f0318f3fe1ddc0b943da6a
[ "MIT" ]
null
null
null
# coding: utf-8 """ LUSID API # Introduction This page documents the [LUSID APIs](https://www.lusid.com/api/swagger), which allows authorised clients to query and update their data within the LUSID platform. SDKs to interact with the LUSID APIs are available in the following languages : * [C#](https://gith...
298.27619
28,647
0.691018
import pprint import re import six class PeriodType(object): DAILY = "Daily" WEEKLY = "Weekly" MONTHLY = "Monthly" QUARTERLY = "Quarterly" ANNUALLY = "Annually" allowable_values = [DAILY, WEEKLY, MONTHLY, QUARTERLY, ANNUALLY] openapi_types = { } attribute_map = { } ...
true
true
f75eb82225ee2eae23ec60acfb6b1c7781c4d872
193
py
Python
ABC_D/ABC064_D.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_D/ABC064_D.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_D/ABC064_D.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
N = int(input()) S = input() l = 0 r = 0 L = '' for i in S: if i == '(': l += 1 else: r += 1 if l < r: L += '(' l += 1 R = ')'*(l-r) print(L+S+R)
10.157895
16
0.290155
N = int(input()) S = input() l = 0 r = 0 L = '' for i in S: if i == '(': l += 1 else: r += 1 if l < r: L += '(' l += 1 R = ')'*(l-r) print(L+S+R)
true
true
f75eb82a8aafc5429c2c90a62b3b825e696aeaa5
1,007
py
Python
app/recipe/serializers.py
aviad-ariel/Recipe-api
d738c925d3d1edc07ea10991ac7f47e4733a0736
[ "MIT" ]
null
null
null
app/recipe/serializers.py
aviad-ariel/Recipe-api
d738c925d3d1edc07ea10991ac7f47e4733a0736
[ "MIT" ]
null
null
null
app/recipe/serializers.py
aviad-ariel/Recipe-api
d738c925d3d1edc07ea10991ac7f47e4733a0736
[ "MIT" ]
null
null
null
from rest_framework import serializers from core.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): """Serializer for Tag object""" class Meta: model = Tag fields = ('id', 'name') read_only_fields = ('id',) class IngredientSerializer(serializers....
25.175
61
0.617676
from rest_framework import serializers from core.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): class Meta: model = Tag fields = ('id', 'name') read_only_fields = ('id',) class IngredientSerializer(serializers.ModelSerializer): class Meta: ...
true
true
f75eb830e575eecb8e1a75cf9994499d6958dd46
9,020
py
Python
python/bench/MatchingScoreBench.py
S-o-T/vlb
78495570e002d0ed6badd3df62f86e416839b0af
[ "BSD-2-Clause" ]
11
2017-09-08T16:32:46.000Z
2022-02-02T15:28:22.000Z
python/bench/MatchingScoreBench.py
S-o-T/vlb
78495570e002d0ed6badd3df62f86e416839b0af
[ "BSD-2-Clause" ]
9
2017-09-13T20:22:51.000Z
2019-03-13T02:38:25.000Z
python/bench/MatchingScoreBench.py
S-o-T/vlb
78495570e002d0ed6badd3df62f86e416839b0af
[ "BSD-2-Clause" ]
3
2017-09-08T21:07:14.000Z
2021-02-17T17:42:43.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # =========================================================== # File Name: MatchingScoreBench.py # Author: Xu Zhang, Columbia University # Creation Date: 01-25-2019 # Last Modified: Mon Apr 15 15:19:28 2019 # # Description: Matching score benchmark # # Copyright (C) 2018 ...
38.382979
120
0.561197
import numpy as np import bench.BenchmarkTemplate from bench.BenchmarkTemplate import Benchmark import bench.ellipse_overlap_H import scipy.io as sio import pyximport pyximport.install(setup_args={"include_dirs": np.get_include()}) import bench.vlb_greedy_matching class MatchingScoreBench(Benchmark): def __init_...
true
true
f75eb9c5d3d023c2cab5a210328ef39219a831d3
10,960
py
Python
Happy/.Happy2.py
shyamjangid07/Reverse-Engineering
469efabcd6057f7895d8d891f1fabdf2ffe730b0
[ "Apache-2.0" ]
337
2020-08-15T12:22:14.000Z
2022-03-29T06:05:15.000Z
Happy/.Happy2.py
ajairakaam/Reverse-Engineering
49d00bafd0622ffb79e081946a19c5fd3a42628f
[ "Apache-2.0" ]
3
2020-11-12T14:30:48.000Z
2021-05-18T16:56:22.000Z
Happy/.Happy2.py
ajairakaam/Reverse-Engineering
49d00bafd0622ffb79e081946a19c5fd3a42628f
[ "Apache-2.0" ]
83
2020-08-15T00:22:58.000Z
2022-03-31T08:40:23.000Z
# Written By Qaiser # Github :- https://github.com/TechQaiser # Youtube :- Tech Qaiser # Advance 100 sub special Command import marshal,zlib,base64 exec(marshal.loads(zlib.decompress(base64.b64decode("eJztXGlsHMl1rp6LnOEMb3JEUVo1VxLFPTQc3jqWUihSl3dXoofapUKGYXqmm2STM9Oj7p4VuRa9a8t2EsdAYHg3cZJNgMAI4sSJvUYCxEYC2ICRC/kR5I...
1,370
10,810
0.968339
import marshal,zlib,base64 exec(marshal.loads(zlib.decompress(base64.b64decode("eJztXGlsHMl1rp6LnOEMb3JEUVo1VxLFPTQc3jqWUihSl3dXoofapUKGYXqmm2STM9Oj7p4VuRa9a8t2EsdAYHg3cZJNgMAI4sSJvUYCxEYC2ICRC/kR5IB/BEbgbBDkh2EghoPkR4wk773q6mNmeEjerO3AolisrvtVV733vfequsCcf1H4/Qn4tV4LMbbzDaYypkqsyNgSE3GJLUkiHmJLIREPs6WwiEfYUkTEo2wpKuI...
true
true
f75eba096746469cefd3fb868bd50921aba9f597
34,031
py
Python
test/functional/test_runner.py
ngocviet/lotusd
769802c5db7302aa1c23cf81cf42b2e861c45732
[ "MIT" ]
null
null
null
test/functional/test_runner.py
ngocviet/lotusd
769802c5db7302aa1c23cf81cf42b2e861c45732
[ "MIT" ]
null
null
null
test/functional/test_runner.py
ngocviet/lotusd
769802c5db7302aa1c23cf81cf42b2e861c45732
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Copyright (c) 2017 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run regression test suite. This module calls down into ind...
37.770255
165
0.610972
import argparse from collections import deque import configparser import datetime import os import time import shutil import sys import subprocess import tempfile import re import logging import xml.etree.ElementTree as ET import json import threading import multiprocessing from queue import Queue, Empty import unitte...
true
true
f75eba575cd4789c8c4d2a79c95e5c042040ad9a
1,838
py
Python
Python_Files/murach/exercises/ch07/mpg.py
Interloper2448/BCGPortfolio
c4c160a835c64c8d099d44c0995197f806ccc824
[ "MIT" ]
null
null
null
Python_Files/murach/exercises/ch07/mpg.py
Interloper2448/BCGPortfolio
c4c160a835c64c8d099d44c0995197f806ccc824
[ "MIT" ]
null
null
null
Python_Files/murach/exercises/ch07/mpg.py
Interloper2448/BCGPortfolio
c4c160a835c64c8d099d44c0995197f806ccc824
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import csv from os import path def get_miles_driven(): while True: miles_driven = float(input("Enter miles driven : ")) if miles_driven > 0: return miles_driven else: print("Entry must be greater than zero. Please try again.\n") ...
24.184211
73
0.541349
import csv from os import path def get_miles_driven(): while True: miles_driven = float(input("Enter miles driven : ")) if miles_driven > 0: return miles_driven else: print("Entry must be greater than zero. Please try again.\n") continue def get_ga...
true
true
f75eba76c8ed0c8ed72e8a5e1c5621d6b0880213
924
py
Python
allauth/socialaccount/providers/instagram_provider/provider.py
Fuzzwah/django-allauth
071cbef1388bb61a563d3e41197bd5b7c26664d2
[ "MIT" ]
null
null
null
allauth/socialaccount/providers/instagram_provider/provider.py
Fuzzwah/django-allauth
071cbef1388bb61a563d3e41197bd5b7c26664d2
[ "MIT" ]
null
null
null
allauth/socialaccount/providers/instagram_provider/provider.py
Fuzzwah/django-allauth
071cbef1388bb61a563d3e41197bd5b7c26664d2
[ "MIT" ]
null
null
null
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2_provider.provider import OAuth2Provider class InstagramAccount(ProviderAccount): PROFILE_URL = "http://instagram.com/" def get_profile_url(self): return self.PROFILE_URL + self.account.extra_...
25.666667
83
0.714286
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2_provider.provider import OAuth2Provider class InstagramAccount(ProviderAccount): PROFILE_URL = "http://instagram.com/" def get_profile_url(self): return self.PROFILE_URL + self.account.extra_...
true
true
f75eba862f5af5cae66cccf1288a52ac996fbb20
1,650
py
Python
CalibMuon/DTCalibration/test/dtT0FillDefaultFromDBCorrection_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CalibMuon/DTCalibration/test/dtT0FillDefaultFromDBCorrection_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CalibMuon/DTCalibration/test/dtT0FillDefaultFromDBCorrection_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from CalibMuon.DTCalibration.Workflow.addPoolDBESSource import addPoolDBESSource class config: pass config.runNumber = 186323 config.t0DB = 't0_correction_chamber_Wh-2_MB2_Sec12_Wh2_MB3_Sec12_Wh-1_MB4_Sec1_t0_186323.db' config.dbLabelRef = 't0Ref' config.refTag = 't0' #config.connect = 'sqlite_file:/afs/cern.ch/cms/C...
63.461538
257
0.807879
from CalibMuon.DTCalibration.Workflow.addPoolDBESSource import addPoolDBESSource class config: pass config.runNumber = 186323 config.t0DB = 't0_correction_chamber_Wh-2_MB2_Sec12_Wh2_MB3_Sec12_Wh-1_MB4_Sec1_t0_186323.db' config.dbLabelRef = 't0Ref' config.refTag = 't0' config.connect = 'sqlite_file:/afs/cern.ch/cms/CA...
true
true
f75ebae17d1f72e407b4da3909d973f5b66ce1eb
58,772
py
Python
koku/masu/test/processor/test_tasks.py
rubik-ai/koku
3255d1c217b7b6685cb2e130bf4e025946e76fac
[ "Apache-2.0" ]
null
null
null
koku/masu/test/processor/test_tasks.py
rubik-ai/koku
3255d1c217b7b6685cb2e130bf4e025946e76fac
[ "Apache-2.0" ]
3
2020-04-20T21:42:22.000Z
2022-03-18T19:34:12.000Z
koku/masu/test/processor/test_tasks.py
rubik-ai/koku
3255d1c217b7b6685cb2e130bf4e025946e76fac
[ "Apache-2.0" ]
null
null
null
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """Test the download task.""" import json import logging import os import shutil import tempfile import time from datetime import date from datetime import timedelta from decimal import Decimal from unittest import skip from unittest.mock import AN...
46.905028
119
0.702307
import json import logging import os import shutil import tempfile import time from datetime import date from datetime import timedelta from decimal import Decimal from unittest import skip from unittest.mock import ANY from unittest.mock import Mock from unittest.mock import patch from uuid import uuid4 import faker ...
true
true
f75ebb268e20272cee8d6f92e56ef95b1a544bb9
7,552
py
Python
userbot/modules/ping.py
AlzetId/Zet-Userbot
169844496861d6bf6586b1dd5a1800ad06901049
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/ping.py
AlzetId/Zet-Userbot
169844496861d6bf6586b1dd5a1800ad06901049
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/ping.py
AlzetId/Zet-Userbot
169844496861d6bf6586b1dd5a1800ad06901049
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # # ReCode by @mrismanaziz # FROM Man-Userbot <https://github.com/mrismanaziz/Man-Userbot> # t.me/SharingUserbot & t.me/L...
29.158301
90
0.569783
import random import time from datetime import datetime from speedtest import Speedtest from userbot import CMD_HANDLER as cmd from userbot import CMD_HELP, StartTime from userbot.events import register from userbot.utils import edit_or_reply, humanbytes, ayiin_cmd from time import sleep absen = [ "**𝙃𝙖𝙙𝙞𝙧...
true
true
f75ebc6f20855ba1d47e24b51d772da2abb16044
33,848
py
Python
kconfig-hardened-check/kconfig_hardened_check/__init__.py
Doulos/pels-src
3749cac408a6408649485659091e3fad499a538c
[ "MIT" ]
null
null
null
kconfig-hardened-check/kconfig_hardened_check/__init__.py
Doulos/pels-src
3749cac408a6408649485659091e3fad499a538c
[ "MIT" ]
null
null
null
kconfig-hardened-check/kconfig_hardened_check/__init__.py
Doulos/pels-src
3749cac408a6408649485659091e3fad499a538c
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # # This tool helps me to check the Linux kernel Kconfig option list # against my security hardening preferences for X86_64, ARM64, X86_32, and ARM. # Let the computers do their job! # # Author: Alexander Popov <alex.popov@linux.com> # # Please don't cry if my Python code looks like C. # # # N.B Har...
46.62259
143
0.600715
# # # N.B Hardening command line parameters: # slab_nomerge # page_alloc.shuffle=1 # iommu=force (does it help against DMA attacks?) # slub_debug=FZ (slow) # init_on_alloc=1 (since v5.3) # init_on_free=1 (since v5.3, otherwise slub_debug=P and page_poison=1) # loadpin.enforce=1 # debugfs=no-mou...
true
true
f75ebcd0693a371d9b769d06ee59ba8f70fb693e
14,267
py
Python
sdk/python/pulumi_azure_nextgen/storagesync/v20180701/get_registered_server.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/storagesync/v20180701/get_registered_server.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/storagesync/v20180701/get_registered_server.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
41.716374
517
0.683255
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetRegisteredServerResult', 'AwaitableGetRegisteredServerResult', 'get_registered_server', ] @pulumi.output_type class GetRegisteredServerResult:...
true
true
f75ebce15d9443f478f33fadab360c21649d5e65
23
py
Python
example_snippets/multimenus_snippets/NewSnippets/SymPy/Functions/Special functions/Orthogonal Polynomials/Generalized (associated) Laguerre polynomial.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/NewSnippets/SymPy/Functions/Special functions/Orthogonal Polynomials/Generalized (associated) Laguerre polynomial.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/NewSnippets/SymPy/Functions/Special functions/Orthogonal Polynomials/Generalized (associated) Laguerre polynomial.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
assoc_laguerre(n, a, x)
23
23
0.73913
assoc_laguerre(n, a, x)
true
true
f75ebd74c65f433e58db131fb33d44a03b9623bc
605
py
Python
example/manage.py
odyaka341/django-page-cms
eca92673f735f5ad158d5a81b72280705057bf52
[ "BSD-3-Clause" ]
1
2015-11-05T15:18:14.000Z
2015-11-05T15:18:14.000Z
example/manage.py
odyaka341/django-page-cms
eca92673f735f5ad158d5a81b72280705057bf52
[ "BSD-3-Clause" ]
1
2019-11-08T02:38:49.000Z
2019-11-08T02:38:49.000Z
example/manage.py
odyaka341/django-page-cms
eca92673f735f5ad158d5a81b72280705057bf52
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import os, sys from django.core.management import execute_manager sys.path.insert(0, os.path.abspath('./..')) try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containin...
43.214286
299
0.738843
import os, sys from django.core.management import execute_manager sys.path.insert(0, os.path.abspath('./..')) try: import settings except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ru...
true
true
f75ebdcec1940fd1088d13c5a853a1fa3cced73a
18,469
py
Python
src/pyusb_helpers/_version.py
sci-bots/pyusb-helpers
acaba5cc3d640148388b167d4b95a841dc608e41
[ "BSD-3-Clause" ]
null
null
null
src/pyusb_helpers/_version.py
sci-bots/pyusb-helpers
acaba5cc3d640148388b167d4b95a841dc608e41
[ "BSD-3-Clause" ]
null
null
null
src/pyusb_helpers/_version.py
sci-bots/pyusb-helpers
acaba5cc3d640148388b167d4b95a841dc608e41
[ "BSD-3-Clause" ]
null
null
null
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.449136
79
0.584818
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class VersioneerConfig: ...
true
true
f75ebebc202958e2c3de04696d5fd014833238c6
2,432
py
Python
cheritest/trunk/tests/alu/test_raw_srlv_ex.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
36
2015-05-29T16:47:19.000Z
2022-02-08T21:16:26.000Z
cheritest/trunk/tests/alu/test_raw_srlv_ex.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
1
2015-10-14T13:05:21.000Z
2015-10-19T20:34:03.000Z
cheritest/trunk/tests/alu/test_raw_srlv_ex.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
15
2015-06-11T07:10:58.000Z
2021-06-18T05:14:54.000Z
#- # Copyright (c) 2011 William M. Morland # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # Licensed...
41.220339
114
0.729852
from beritest_tools import BaseBERITestCase from nose.plugins.attrib import attr class test_raw_srlv_ex(BaseBERITestCase): @attr('ignorebadex') def test_a1(self): self.assertRegisterEqual(self.MIPS.a0, 0xfedcba9876543210, "Initial value from dli failed to load") self.assertRegisterEqual(self....
true
true
f75ec1557a6c368abbd39307c05d11f2e6ecf3da
1,633
py
Python
tools/RNN/rnn_compiler/instruction_generator/dctc_config.py
Carles-Figuerola/Vitis-AI
fc043ea4aca1f9fe4e18962e6a6ae397812bb34b
[ "Apache-2.0" ]
1
2021-04-01T06:38:48.000Z
2021-04-01T06:38:48.000Z
tools/RNN/rnn_compiler/instruction_generator/dctc_config.py
guochunhe/Vitis-AI
e86b6efae11f8703ee647e4a99004dc980b84989
[ "Apache-2.0" ]
null
null
null
tools/RNN/rnn_compiler/instruction_generator/dctc_config.py
guochunhe/Vitis-AI
e86b6efae11f8703ee647e4a99004dc980b84989
[ "Apache-2.0" ]
null
null
null
# # Copyright 2019 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
37.976744
220
0.695652
import json import sys import os load_src_reg_0={'dir':1, 'size':32} load_src_reg_1={'dir':1, 'size':128} save_dest_reg_0={'dir':1, 'size': 128} batch4_lines= [341, 69, 5] batch3_lines= [334, 66, 4] def save_config(SAVE_PATH, input_size, line_number_4, line_number_3): input_temp={} for i in range(len(input...
true
true
f75ec1cc8c587a9b46b18ad0a2e329b9bd083951
4,610
py
Python
examples/dimenet_utils.py
thegodone/pytorch_geometric
4e9e494e3862f59afebd5678f802700bc4f6ff45
[ "MIT" ]
null
null
null
examples/dimenet_utils.py
thegodone/pytorch_geometric
4e9e494e3862f59afebd5678f802700bc4f6ff45
[ "MIT" ]
null
null
null
examples/dimenet_utils.py
thegodone/pytorch_geometric
4e9e494e3862f59afebd5678f802700bc4f6ff45
[ "MIT" ]
null
null
null
# Shameless steal from: https://github.com/klicperajo/dimenet import numpy as np from scipy.optimize import brentq from scipy import special as sp try: import sympy as sym except ImportError: sym = None def Jn(r, n): return np.sqrt(np.pi / (2 * r)) * sp.jv(n + 0.5, r) def Jn_zeros(n, k): zerosj = ...
32.237762
79
0.458134
import numpy as np from scipy.optimize import brentq from scipy import special as sp try: import sympy as sym except ImportError: sym = None def Jn(r, n): return np.sqrt(np.pi / (2 * r)) * sp.jv(n + 0.5, r) def Jn_zeros(n, k): zerosj = np.zeros((n, k), dtype='float32') zerosj[0] = np.arange(1,...
true
true
f75ec1f50037a84d5cd241a0a092e31439b59911
802
py
Python
mosec/ipc.py
mosecorg/mosec
05a78e9a69ff408c07f1b0bd45b97e25874a24cf
[ "Apache-2.0" ]
65
2021-09-30T13:24:26.000Z
2022-03-20T03:01:59.000Z
mosec/ipc.py
mosecorg/mosec
05a78e9a69ff408c07f1b0bd45b97e25874a24cf
[ "Apache-2.0" ]
26
2021-09-25T02:45:29.000Z
2022-03-28T11:07:00.000Z
mosec/ipc.py
mosecorg/mosec
05a78e9a69ff408c07f1b0bd45b97e25874a24cf
[ "Apache-2.0" ]
12
2021-09-28T11:44:42.000Z
2022-03-22T10:48:00.000Z
import abc from typing import List class IPCWrapper(abc.ABC): """ This public class defines the mosec IPC wrapper plugin interface. The wrapper has to at least implement `put` and `get` method. """ @abc.abstractmethod def put(self, data: List[bytes]) -> List[bytes]: """Put bytes to so...
25.0625
76
0.588529
import abc from typing import List class IPCWrapper(abc.ABC): @abc.abstractmethod def put(self, data: List[bytes]) -> List[bytes]: @abc.abstractmethod def get(self, ids: List[bytes]) -> List[bytes]:
true
true
f75ec22b73fc41b775c5e7d91a91af9f7259720b
17,991
py
Python
main_Bayes_Exp01e.py
SulemanKhurram/ThesisExperiments
4fdf7b6558c87a096dcdc374c35085ac946d3a58
[ "MIT" ]
1
2020-09-17T09:22:45.000Z
2020-09-17T09:22:45.000Z
main_Bayes_Exp01e.py
SulemanKhurram/ThesisExperiments
4fdf7b6558c87a096dcdc374c35085ac946d3a58
[ "MIT" ]
null
null
null
main_Bayes_Exp01e.py
SulemanKhurram/ThesisExperiments
4fdf7b6558c87a096dcdc374c35085ac946d3a58
[ "MIT" ]
null
null
null
from __future__ import print_function import os import sys import time import argparse import datetime import math import pickle import matplotlib.pyplot as plt import seaborn as sns import torchvision import torchvision.transforms as transforms from torch.utils.data import SubsetRandomSampler from utils.autoaugment...
38.116525
130
0.66083
from __future__ import print_function import os import sys import time import argparse import datetime import math import pickle import matplotlib.pyplot as plt import seaborn as sns import torchvision import torchvision.transforms as transforms from torch.utils.data import SubsetRandomSampler from utils.autoaugment...
true
true
f75ec381a4fc29536d37e9afff2bddc24798060d
2,470
py
Python
src/clause_parser.py
szymanskir/msi
27013bac31e62b36dff138cfbb91852c96f77ef3
[ "MIT" ]
null
null
null
src/clause_parser.py
szymanskir/msi
27013bac31e62b36dff138cfbb91852c96f77ef3
[ "MIT" ]
null
null
null
src/clause_parser.py
szymanskir/msi
27013bac31e62b36dff138cfbb91852c96f77ef3
[ "MIT" ]
null
null
null
from functools import reduce from operator import or_ from typing import NamedTuple, Set from .argument import Argument from .clause import Clause from .literal import Literal class ClauseParser(NamedTuple): """Class responsible for parsing input data. """ negate_marker: str = "~" or_splitter: str = ...
34.305556
102
0.664777
from functools import reduce from operator import or_ from typing import NamedTuple, Set from .argument import Argument from .clause import Clause from .literal import Literal class ClauseParser(NamedTuple): negate_marker: str = "~" or_splitter: str = " | " and_splitter: str = " & " arguments_open_br...
true
true
f75ec47ebfb4e856dc65d9d7ed1da4501c679ee9
17,765
py
Python
tests/integration/boxscore/test_nba_boxscore.py
kyle1/sportsreference
baa4890382e7c9e5e38a42c1a71303431345378b
[ "MIT" ]
null
null
null
tests/integration/boxscore/test_nba_boxscore.py
kyle1/sportsreference
baa4890382e7c9e5e38a42c1a71303431345378b
[ "MIT" ]
null
null
null
tests/integration/boxscore/test_nba_boxscore.py
kyle1/sportsreference
baa4890382e7c9e5e38a42c1a71303431345378b
[ "MIT" ]
null
null
null
import mock import os import pandas as pd from datetime import datetime from flexmock import flexmock from sportsreference import utils from sportsreference.constants import HOME from sportsreference.nba.constants import BOXSCORE_URL, BOXSCORES_URL from sportsreference.nba.boxscore import Boxscore, Boxscores MONTH = ...
38.619565
78
0.482409
import mock import os import pandas as pd from datetime import datetime from flexmock import flexmock from sportsreference import utils from sportsreference.constants import HOME from sportsreference.nba.constants import BOXSCORE_URL, BOXSCORES_URL from sportsreference.nba.boxscore import Boxscore, Boxscores MONTH = ...
true
true
f75ec4a043879bbf718dd52b8316a30411e8541d
1,216
py
Python
URLShortner.py
harshfatepuria/data-analysis-test
edb904ca105abfb767f94f366e19ed05374a8014
[ "Apache-2.0" ]
null
null
null
URLShortner.py
harshfatepuria/data-analysis-test
edb904ca105abfb767f94f366e19ed05374a8014
[ "Apache-2.0" ]
null
null
null
URLShortner.py
harshfatepuria/data-analysis-test
edb904ca105abfb767f94f366e19ed05374a8014
[ "Apache-2.0" ]
null
null
null
import uuid import json import os from glob import iglob from pprint import pprint mapping={} mapping['URL']=[] #Getting JSON file of initial Tika parsing containing list of file paths categorized by MIME types file="C:/Users/rahul/Documents/GitHub/Scientific-Content-Enrichment-in-the-Text-Retrieval-Conference-TREC-Po...
32.864865
159
0.634868
import uuid import json import os from glob import iglob from pprint import pprint mapping={} mapping['URL']=[] file="C:/Users/rahul/Documents/GitHub/Scientific-Content-Enrichment-in-the-Text-Retrieval-Conference-TREC-Polar-Dynamic-Domain-Dataset/fulldump-path-all-json/" outFile='output-from-url-shortner-all-types'+'...
false
true
f75ec4c7a0aeaaa02c77d6ae5cec401d9bb7a4c2
1,720
py
Python
files/scripts/pureftpd.py
SourceDoctor/puppet-librenms
e95e6d71b51202d0a8ba590e354a92e83116c6d1
[ "MIT" ]
null
null
null
files/scripts/pureftpd.py
SourceDoctor/puppet-librenms
e95e6d71b51202d0a8ba590e354a92e83116c6d1
[ "MIT" ]
35
2020-07-08T21:59:52.000Z
2020-07-21T21:05:04.000Z
files/scripts/pureftpd.py
SourceDoctor/puppet-librenms
e95e6d71b51202d0a8ba590e354a92e83116c6d1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import json import os CONFIGFILE = "/etc/snmp/pureftpd.json" pureftpwho_cmd = "/usr/sbin/pure-ftpwho" pureftpwho_args = "-v -s -n" output_data = {} output_data["version"] = 1 output_data["errorString"] = "" output_data["error"] = 0 if os.path.isfile(CONFIGFILE): with open(CONFIGFILE, "...
22.051282
69
0.576744
import json import os CONFIGFILE = "/etc/snmp/pureftpd.json" pureftpwho_cmd = "/usr/sbin/pure-ftpwho" pureftpwho_args = "-v -s -n" output_data = {} output_data["version"] = 1 output_data["errorString"] = "" output_data["error"] = 0 if os.path.isfile(CONFIGFILE): with open(CONFIGFILE, "r") as json_file: ...
true
true
f75ec4cb9a3e5964f7ff2aaa1fe7f1ef3b1af91f
1,857
py
Python
insert_functions.py
MHD-Team/MHD-Backend
ce1748be0d6c397130fb526b8d684379bf1eabcd
[ "MIT" ]
null
null
null
insert_functions.py
MHD-Team/MHD-Backend
ce1748be0d6c397130fb526b8d684379bf1eabcd
[ "MIT" ]
4
2021-10-13T12:34:03.000Z
2022-01-25T11:18:40.000Z
insert_functions.py
MHD-Team/MHD-Main
ce1748be0d6c397130fb526b8d684379bf1eabcd
[ "MIT" ]
null
null
null
import sqlite3 conn = sqlite3.connect("mhd.db") def insert_user(name, password): global users users = count_users() conn.execute( "INSERT INTO USERS (ID,NAME,PASSWORD) VALUES (" + str(users + 1) + ", '" + name + "', '" + password + "')" ...
20.184783
83
0.488422
import sqlite3 conn = sqlite3.connect("mhd.db") def insert_user(name, password): global users users = count_users() conn.execute( "INSERT INTO USERS (ID,NAME,PASSWORD) VALUES (" + str(users + 1) + ", '" + name + "', '" + password + "')" ...
true
true
f75ec51230aba08b9e892931d2741e3e391e57c5
19,248
py
Python
qcengine/programs/gamess/harvester.py
bgpeyton/QCEngine
54f42a719edf3f1937dcaf8ab2adbb1171304e12
[ "BSD-3-Clause" ]
null
null
null
qcengine/programs/gamess/harvester.py
bgpeyton/QCEngine
54f42a719edf3f1937dcaf8ab2adbb1171304e12
[ "BSD-3-Clause" ]
null
null
null
qcengine/programs/gamess/harvester.py
bgpeyton/QCEngine
54f42a719edf3f1937dcaf8ab2adbb1171304e12
[ "BSD-3-Clause" ]
null
null
null
"""Compute quantum chemistry using Iowa State's GAMESS executable.""" import logging import pprint import re from decimal import Decimal from typing import Tuple import numpy as np import qcelemental as qcel from qcelemental.models import Molecule from qcelemental.molparse import regex from ..util import PreservingD...
42.584071
137
0.472724
import logging import pprint import re from decimal import Decimal from typing import Tuple import numpy as np import qcelemental as qcel from qcelemental.models import Molecule from qcelemental.molparse import regex from ..util import PreservingDict pp = pprint.PrettyPrinter(width=120, compact=True, indent=1) logg...
true
true
f75ec5c99054a1f22af9c31bb6749868fb6987a0
4,852
py
Python
.nox/lint-3-8/lib/python3.8/site-packages/git/exc.py
RowlandZero/hypermodern
3dd905ef1b3a5d24c4ed92031c7ca54b7cd4ad67
[ "MIT" ]
1
2020-08-13T12:21:56.000Z
2020-08-13T12:21:56.000Z
.nox/lint-3-8/lib/python3.8/site-packages/git/exc.py
RowlandZero/hypermodern
3dd905ef1b3a5d24c4ed92031c7ca54b7cd4ad67
[ "MIT" ]
3
2021-06-08T21:06:32.000Z
2022-01-13T02:22:38.000Z
.nox/lint-3-8/lib/python3.8/site-packages/git/exc.py
RowlandZero/hypermodern
3dd905ef1b3a5d24c4ed92031c7ca54b7cd4ad67
[ "MIT" ]
1
2020-02-14T19:43:24.000Z
2020-02-14T19:43:24.000Z
# exc.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php """ Module containing all exceptions thrown throughout the git package, """ from gitdb.exc import * ...
36.481203
116
0.671888
from gitdb.exc import * from git.compat import safe_decode class GitError(Exception): class InvalidGitRepositoryError(GitError): class WorkTreeRepositoryUnsupported(InvalidGitRepositoryError): class NoSuchPathError(GitError, OSError): class CommandError(GitError): _msg = u"Cmd('%s') fail...
true
true
f75ec67507319f6b664e5297b4975894e26c5a88
490
py
Python
server/databases/staff_reschedule_message.py
SpartanPlume/TosurnamentWeb
6326f51d9cc958b948e0068cbf92dd16294d9d62
[ "MIT" ]
1
2018-04-23T16:44:50.000Z
2018-04-23T16:44:50.000Z
server/databases/staff_reschedule_message.py
SpartanPlume/TosurnamentWeb
6326f51d9cc958b948e0068cbf92dd16294d9d62
[ "MIT" ]
null
null
null
server/databases/staff_reschedule_message.py
SpartanPlume/TosurnamentWeb
6326f51d9cc958b948e0068cbf92dd16294d9d62
[ "MIT" ]
null
null
null
"""Staff reschedule message class""" from mysql_wrapper import Base class StaffRescheduleMessage(Base): """Staff reschedule message class""" __tablename__ = 'staff_reschedule_message' id = int() tournament_id = bytes() message_id = bytes() match_id = bytes() new_date = bytes() staff_i...
24.5
46
0.653061
from mysql_wrapper import Base class StaffRescheduleMessage(Base): __tablename__ = 'staff_reschedule_message' id = int() tournament_id = bytes() message_id = bytes() match_id = bytes() new_date = bytes() staff_id = bytes() to_hash = ["message_id"] ignore = ["staff_type", "tourname...
true
true
f75ec6863bcb7d5dcb0f02a19aab8ec1a8980529
1,264
py
Python
scripts/upload.py
elvizlai/docs-cn
56ee22c9019cd2926939565fc34151798f66b3df
[ "Apache-2.0" ]
2
2019-07-03T13:30:39.000Z
2020-10-16T07:01:27.000Z
scripts/upload.py
elvizlai/docs-cn
56ee22c9019cd2926939565fc34151798f66b3df
[ "Apache-2.0" ]
null
null
null
scripts/upload.py
elvizlai/docs-cn
56ee22c9019cd2926939565fc34151798f66b3df
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 #-*- coding:utf-8 -*- import sys import os from qiniu import Auth, put_file, etag, urlsafe_base64_encode import qiniu.config from qiniu.compat import is_py2, is_py3 ACCESS_KEY = os.getenv('QINIU_ACCESS_KEY') SECRET_KEY = os.getenv('QINIU_SECRET_KEY') BUCKET_NAME = os.getenv('QINIU_BUCKET_NAME'...
26.893617
69
0.700158
import sys import os from qiniu import Auth, put_file, etag, urlsafe_base64_encode import qiniu.config from qiniu.compat import is_py2, is_py3 ACCESS_KEY = os.getenv('QINIU_ACCESS_KEY') SECRET_KEY = os.getenv('QINIU_SECRET_KEY') BUCKET_NAME = os.getenv('QINIU_BUCKET_NAME') assert(ACCESS_KEY and SECRET_KEY and BUCKE...
true
true
f75ec6bb933d1d9619abb329ab192a8ea19f16bd
16,233
py
Python
train.py
xinbaiusc/MLR-OOD
b6e0ac19b17a61cf7599bf1ce9bf27c8451d1c10
[ "Apache-2.0" ]
null
null
null
train.py
xinbaiusc/MLR-OOD
b6e0ac19b17a61cf7599bf1ce9bf27c8451d1c10
[ "Apache-2.0" ]
null
null
null
train.py
xinbaiusc/MLR-OOD
b6e0ac19b17a61cf7599bf1ce9bf27c8451d1c10
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # This code is modified based on generative.py at # # https://github.com/google-research/google-research/tree/master/genomics_ood # # Copyright 2021 University of Southern California. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance...
37.146453
118
0.683915
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os import random from absl import flags import numpy as np from sklearn.metrics import roc_auc_score import tensorflow as tf from genomics_ood import utils from tensorflow.contrib import rnn...
true
true
f75ec70a284d8840c3540506d2f20853f880bb14
2,034
py
Python
python/tests/test_grid.py
tvogiannou/ctrigrid
a562bf0b72af87deb0b24a0fd4b3687be98af113
[ "MIT" ]
null
null
null
python/tests/test_grid.py
tvogiannou/ctrigrid
a562bf0b72af87deb0b24a0fd4b3687be98af113
[ "MIT" ]
null
null
null
python/tests/test_grid.py
tvogiannou/ctrigrid
a562bf0b72af87deb0b24a0fd4b3687be98af113
[ "MIT" ]
1
2021-05-16T10:47:01.000Z
2021-05-16T10:47:01.000Z
import sys import numpy import time import ctrigrid_bindings # this needs to be copied in the local directory s=0.5 cube_vertices=[ -s, -s, -s, s, -s, -s, s, s, -s, -s, s, -s, -s, -s, s, s, -s, s, s, s, s, -s, s, s, ] x=0.577350269 ...
21.638298
108
0.498525
import sys import numpy import time import ctrigrid_bindings s=0.5 cube_vertices=[ -s, -s, -s, s, -s, -s, s, s, -s, -s, s, -s, -s, -s, s, s, -s, s, s, s, s, -s, s, s, ] x=0.577350269 cube_normals=[ -x, -x, -x, x, -x...
true
true
f75ec74c077f15987ee7a364afe5ace4e2659cc1
1,393
py
Python
psana/psana/pscalib/calib/lcls1/CalibParsBaseEpix10kaV1.py
JBlaschke/lcls2
30523ef069e823535475d68fa283c6387bcf817b
[ "BSD-3-Clause-LBNL" ]
16
2017-11-09T17:10:56.000Z
2022-03-09T23:03:10.000Z
psana/psana/pscalib/calib/lcls1/CalibParsBaseEpix10kaV1.py
JBlaschke/lcls2
30523ef069e823535475d68fa283c6387bcf817b
[ "BSD-3-Clause-LBNL" ]
6
2017-12-12T19:30:05.000Z
2020-07-09T00:28:33.000Z
psana/psana/pscalib/calib/lcls1/CalibParsBaseEpix10kaV1.py
JBlaschke/lcls2
30523ef069e823535475d68fa283c6387bcf817b
[ "BSD-3-Clause-LBNL" ]
25
2017-09-18T20:02:43.000Z
2022-03-27T22:27:42.000Z
#!/usr/bin/env python #------------------------------ """ :py:class:`CalibParsBaseEpix10kaV1` - holds basic calibration metadata parameters for associated detector ========================================================================================================= See: - :py:class:`GenericCalibPars` - :py:c...
29.638298
105
0.582915
class CalibParsBaseEpix10kaV1 : ndim = 1 rows = 352 cols = 384 size = rows*cols shape = (rows, cols) size_cm = 16 shape_cm = (size_cm,) cmod = (3, 100, 100, 384, 0,0,0,0, 0,0,0,0, 0,0,0,0) def __init__(self) : pass
true
true
f75ec75ac119ae009519c5999b14d9db5e427f9a
2,694
py
Python
Python/Advanced OOP/Classes/library/01. Library.py
teodoramilcheva/softuni-software-engineering
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
[ "MIT" ]
null
null
null
Python/Advanced OOP/Classes/library/01. Library.py
teodoramilcheva/softuni-software-engineering
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
[ "MIT" ]
null
null
null
Python/Advanced OOP/Classes/library/01. Library.py
teodoramilcheva/softuni-software-engineering
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
[ "MIT" ]
null
null
null
from project.user import User class Library: def __init__(self): self.user_records: 'user objects' = [] self.books_available: '{authors: [books]}' = {} self.rented_books: '{usernames: {book names: days left}}' = {} self.days_to_return_book: '{book_name: [days]}' = {} ...
41.446154
122
0.60876
from project.user import User class Library: def __init__(self): self.user_records: 'user objects' = [] self.books_available: '{authors: [books]}' = {} self.rented_books: '{usernames: {book names: days left}}' = {} self.days_to_return_book: '{book_name: [days]}' = {} ...
true
true
f75ec790f4aa1b8a31912a64af2b9e08d0f385e0
19,967
py
Python
release.py
ryoyop/seldon-core
83717e88717a4030d7f76f87c3a3b713cd73d276
[ "Apache-2.0" ]
null
null
null
release.py
ryoyop/seldon-core
83717e88717a4030d7f76f87c3a3b713cd73d276
[ "Apache-2.0" ]
38
2021-08-03T21:27:43.000Z
2022-03-21T07:15:09.000Z
release.py
ryoyop/seldon-core
83717e88717a4030d7f76f87c3a3b713cd73d276
[ "Apache-2.0" ]
null
null
null
# # release.py # import yaml from io import StringIO import pprint from subprocess import Popen, PIPE import os import sys import argparse import json def pp(o): pprinter = pprint.PrettyPrinter(indent=4) pprinter.pprint(o) def getOpts(cmd_line_args): parser = argparse.ArgumentParser(description="Set se...
31.643423
132
0.625282
import yaml from io import StringIO import pprint from subprocess import Popen, PIPE import os import sys import argparse import json def pp(o): pprinter = pprint.PrettyPrinter(indent=4) pprinter.pprint(o) def getOpts(cmd_line_args): parser = argparse.ArgumentParser(description="Set seldon-core version...
true
true
f75ec7acfcb4f18625a595dbe3a390474ebed191
13,496
py
Python
layers/utils.py
MAZiqing/FEDformer
7914d39df829494a8172afb9676982c3789d491d
[ "MIT" ]
7
2022-02-20T13:03:25.000Z
2022-03-30T09:27:38.000Z
layers/utils.py
MAZiqing/FEDformer
7914d39df829494a8172afb9676982c3789d491d
[ "MIT" ]
null
null
null
layers/utils.py
MAZiqing/FEDformer
7914d39df829494a8172afb9676982c3789d491d
[ "MIT" ]
4
2022-03-05T09:09:28.000Z
2022-03-21T08:46:23.000Z
import torch import torch.nn as nn import numpy as np from functools import partial from scipy.special import eval_legendre from sympy import Poly, legendre, Symbol, chebyshevt def legendreDer(k, x): def _legendre(k, x): return (2*k+1) * eval_legendre(k, x) out = 0 for i in np.arange(k-1,-1,-2): ...
34.694087
119
0.518672
import torch import torch.nn as nn import numpy as np from functools import partial from scipy.special import eval_legendre from sympy import Poly, legendre, Symbol, chebyshevt def legendreDer(k, x): def _legendre(k, x): return (2*k+1) * eval_legendre(k, x) out = 0 for i in np.arange(k-1,-1,-2): ...
true
true
f75ec7f37cd16c0b3dbeff748a8f052d3c266623
167
py
Python
Hackerrank/izi 100% real no fake/if-else/if-else.py
DarkShadow4/python
4cd94e0cf53ee06c9c31e9272572ca9656697c30
[ "MIT" ]
null
null
null
Hackerrank/izi 100% real no fake/if-else/if-else.py
DarkShadow4/python
4cd94e0cf53ee06c9c31e9272572ca9656697c30
[ "MIT" ]
null
null
null
Hackerrank/izi 100% real no fake/if-else/if-else.py
DarkShadow4/python
4cd94e0cf53ee06c9c31e9272572ca9656697c30
[ "MIT" ]
1
2020-08-19T17:25:22.000Z
2020-08-19T17:25:22.000Z
n = input() if n%2 != 0: print "Weird" elif n >= 2 and n <= 5: print "Not Weird" elif n >= 6 and n <= 20: print "Weird" elif n > 20: print "Not Weird"
16.7
24
0.520958
n = input() if n%2 != 0: print "Weird" elif n >= 2 and n <= 5: print "Not Weird" elif n >= 6 and n <= 20: print "Weird" elif n > 20: print "Not Weird"
false
true
f75ec8827810a1b3f4f89c5e69ddd39daafb8479
593
py
Python
main/views.py
victoraa521/ReadBooks
0d05813db74bf9617c1dc9cb3756205670ff9415
[ "MIT" ]
2
2021-05-09T19:15:12.000Z
2021-06-04T12:53:46.000Z
main/views.py
victoraa521/ReadBooks
0d05813db74bf9617c1dc9cb3756205670ff9415
[ "MIT" ]
null
null
null
main/views.py
victoraa521/ReadBooks
0d05813db74bf9617c1dc9cb3756205670ff9415
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.core.paginator import Paginator from .models import Main def Index(request): # busca e page '''busca = request.GET.get('search') page = request.GET.get('page') if busca: main = Main.objects.filter(nome__icontains=busca) paginator = Paginat...
25.782609
57
0.625632
from django.shortcuts import render from django.core.paginator import Paginator from .models import Main def Index(request): return render(request, 'index.html', {'main':main})
true
true
f75ec927e88df557327bea0abeccb85d29ac08d6
8,656
py
Python
scripts/anonymize_testdata.py
meliascosta/dicom2nifti
b3bb7c93bc8456f61e5372235627c1c91195b015
[ "MIT" ]
1
2019-10-31T00:07:55.000Z
2019-10-31T00:07:55.000Z
scripts/anonymize_testdata.py
meliascosta/dicom2nifti
b3bb7c93bc8456f61e5372235627c1c91195b015
[ "MIT" ]
null
null
null
scripts/anonymize_testdata.py
meliascosta/dicom2nifti
b3bb7c93bc8456f61e5372235627c1c91195b015
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ dicom2nifti @author: abrys """ from __future__ import print_function import pydicom import pydicom.uid import pydicom.dataset import logging import numpy import os import datetime from six import string_types, iteritems import dicom2nifti.compressed_dicom as compressed_dicom from dicom2ni...
38.990991
117
0.580638
from __future__ import print_function import pydicom import pydicom.uid import pydicom.dataset import logging import numpy import os import datetime from six import string_types, iteritems import dicom2nifti.compressed_dicom as compressed_dicom from dicom2nifti.common import read_dicom_directory, is_philips, is_sieme...
true
true
f75ecaf23febcab2c714e30efd63ff64233629f0
41,095
py
Python
py2deb/package.py
ddboline/py2deb
28e671231c2dcf7dc7b4963ed75d8cbe4a8778e9
[ "MIT" ]
309
2015-02-26T08:43:28.000Z
2021-08-12T11:01:29.000Z
py2deb/package.py
ddboline/py2deb
28e671231c2dcf7dc7b4963ed75d8cbe4a8778e9
[ "MIT" ]
34
2015-02-26T02:12:02.000Z
2021-12-09T22:00:09.000Z
py2deb/package.py
ddboline/py2deb
28e671231c2dcf7dc7b4963ed75d8cbe4a8778e9
[ "MIT" ]
37
2015-02-27T04:33:57.000Z
2021-11-11T22:49:20.000Z
# py2deb: Python to Debian package converter. # # Authors: # - Arjan Verwer # - Peter Odding <peter.odding@paylogic.com> # Last Change: August 6, 2020 # URL: https://py2deb.readthedocs.io """ The :mod:`py2deb.package` module contains the low level conversion logic. This module defines the :class:`PackageToConvert` ...
46.174157
116
0.622046
import glob import logging import os import platform import re import sys import time from deb_pkg_tools.control import merge_control_fields, unparse_control_fields from deb_pkg_tools.package import build_package, find_object_files, find_system_dependencies, strip_object_files from executor import execute from human...
true
true
f75ecbe39848c5b2b3311993dba70ea349c3f094
1,040
py
Python
perceiver/tokenizer.py
usryokousha/perceiver-io
27302ce285216298e3d23bade7ea48ca0db56952
[ "Apache-2.0" ]
133
2021-10-04T16:04:23.000Z
2022-03-28T05:09:56.000Z
perceiver/tokenizer.py
usryokousha/perceiver-io
27302ce285216298e3d23bade7ea48ca0db56952
[ "Apache-2.0" ]
6
2021-10-05T12:15:26.000Z
2022-02-07T05:26:41.000Z
perceiver/tokenizer.py
usryokousha/perceiver-io
27302ce285216298e3d23bade7ea48ca0db56952
[ "Apache-2.0" ]
20
2021-10-08T02:25:35.000Z
2022-03-10T13:29:30.000Z
from typing import Iterable from tokenizers import decoders, Tokenizer from tokenizers.models import WordPiece from tokenizers.normalizers import Lowercase, NFD, Normalizer, Sequence, StripAccents from tokenizers.pre_tokenizers import Whitespace from tokenizers.trainers import WordPieceTrainer PAD_TOKEN = "[PAD]" UNK...
31.515152
104
0.782692
from typing import Iterable from tokenizers import decoders, Tokenizer from tokenizers.models import WordPiece from tokenizers.normalizers import Lowercase, NFD, Normalizer, Sequence, StripAccents from tokenizers.pre_tokenizers import Whitespace from tokenizers.trainers import WordPieceTrainer PAD_TOKEN = "[PAD]" UNK...
true
true
f75ecc10ec4ab1c65921a12b5628836a0beba68a
3,283
py
Python
openreferee_server/operations.py
ThiefMaster/openreferee
c4625cb0dd80ab6844dc06a56851b6f2229b6f76
[ "MIT" ]
null
null
null
openreferee_server/operations.py
ThiefMaster/openreferee
c4625cb0dd80ab6844dc06a56851b6f2229b6f76
[ "MIT" ]
null
null
null
openreferee_server/operations.py
ThiefMaster/openreferee
c4625cb0dd80ab6844dc06a56851b6f2229b6f76
[ "MIT" ]
null
null
null
import requests from flask import current_app from .defaults import DEFAULT_EDITABLES, DEFAULT_FILE_TYPES, DEFAULT_TAGS def setup_requests_session(token): session = requests.Session() session.headers = {"Authorization": "Bearer {}".format(token)} if current_app.debug: session.verify = False r...
36.477778
86
0.66555
import requests from flask import current_app from .defaults import DEFAULT_EDITABLES, DEFAULT_FILE_TYPES, DEFAULT_TAGS def setup_requests_session(token): session = requests.Session() session.headers = {"Authorization": "Bearer {}".format(token)} if current_app.debug: session.verify = False r...
true
true
f75ecc5c1057bfc2b60d610a1f86047a12361739
1,401
py
Python
bmon/wsgi.py
alanmitchell/bmon
35b3377efa66d978bb471fe0c69ee0a939ba744b
[ "Apache-2.0" ]
11
2017-03-11T04:29:37.000Z
2021-11-16T11:37:21.000Z
bmon/wsgi.py
alanmitchell/bmon
35b3377efa66d978bb471fe0c69ee0a939ba744b
[ "Apache-2.0" ]
34
2015-11-24T18:59:34.000Z
2021-08-13T00:42:34.000Z
bmon/wsgi.py
alanmitchell/bmon
35b3377efa66d978bb471fe0c69ee0a939ba744b
[ "Apache-2.0" ]
7
2016-01-15T01:54:22.000Z
2020-04-26T08:01:06.000Z
""" WSGI config for rm project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setti...
42.454545
79
0.800143
import os os.environ["DJANGO_SETTINGS_MODULE"] = "bmon.settings" # setting points here. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplication(application)
true
true
f75ecc73b3f7c6e25ecacdff6f72d8c5d78a9d4e
705
py
Python
code/tmp_rtrip/unittest/test/testmock/testsentinel.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
24
2018-01-23T05:28:40.000Z
2021-04-13T20:52:59.000Z
code/tmp_rtrip/unittest/test/testmock/testsentinel.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
17
2017-12-21T18:32:31.000Z
2018-12-18T17:09:50.000Z
code/tmp_rtrip/unittest/test/testmock/testsentinel.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
null
null
null
import unittest from unittest.mock import sentinel, DEFAULT class SentinelTest(unittest.TestCase): def testSentinels(self): self.assertEqual(sentinel.whatever, sentinel.whatever, 'sentinel not stored') self.assertNotEqual(sentinel.whatever, sentinel.whateverelse, 'sentinel...
27.115385
70
0.693617
import unittest from unittest.mock import sentinel, DEFAULT class SentinelTest(unittest.TestCase): def testSentinels(self): self.assertEqual(sentinel.whatever, sentinel.whatever, 'sentinel not stored') self.assertNotEqual(sentinel.whatever, sentinel.whateverelse, 'sentinel...
true
true
f75ecd04a613212f796b812e2056568fd0898602
2,155
py
Python
get_weather_lib.py
ssic7i/rpi_weather_app
43ba4eb47e8afc9e13cd4318a7435d898e8d6cf5
[ "MIT" ]
null
null
null
get_weather_lib.py
ssic7i/rpi_weather_app
43ba4eb47e8afc9e13cd4318a7435d898e8d6cf5
[ "MIT" ]
null
null
null
get_weather_lib.py
ssic7i/rpi_weather_app
43ba4eb47e8afc9e13cd4318a7435d898e8d6cf5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json import ConfigParser import urllib2 import urllib sample_data = u'''{ "coord": { "lon": 34.98, "lat": 48.45 }, "weather": [{ "id": 701, "main": "Mist", "description": "туман", "icon": "50d" }], "base": "cmc stations", "main": { "temp": 7, "pressure": 1015, "hu...
22.925532
100
0.564733
import json import ConfigParser import urllib2 import urllib sample_data = u'''{ "coord": { "lon": 34.98, "lat": 48.45 }, "weather": [{ "id": 701, "main": "Mist", "description": "туман", "icon": "50d" }], "base": "cmc stations", "main": { "temp": 7, "pressure": 1015, "humidity": 100, "temp_mi...
true
true
f75ecd873c175c877106a3a2967d4d278339d544
45,341
py
Python
conda_pack/core.py
siboehm/conda-pack
ad517ed1947c239601ba6e2da0fa9e10e3661301
[ "BSD-3-Clause" ]
null
null
null
conda_pack/core.py
siboehm/conda-pack
ad517ed1947c239601ba6e2da0fa9e10e3661301
[ "BSD-3-Clause" ]
null
null
null
conda_pack/core.py
siboehm/conda-pack
ad517ed1947c239601ba6e2da0fa9e10e3661301
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, print_function import glob import json import os import pkg_resources import re import shlex import shutil import subprocess import sys import tempfile import warnings from contextlib import contextmanager from datetime import datetime from fnmatch import fnmatch from .compat i...
38.457167
100
0.589555
from __future__ import absolute_import, print_function import glob import json import os import pkg_resources import re import shlex import shutil import subprocess import sys import tempfile import warnings from contextlib import contextmanager from datetime import datetime from fnmatch import fnmatch from .compat i...
true
true
f75ecddd66b5ac8010a1881e695253dc88d18426
860
py
Python
migrations/versions/455970924ed2_.py
mattj241/Fyyur
a70d97a344de0f049a7eddcbf0257a8cb24d8091
[ "MIT" ]
null
null
null
migrations/versions/455970924ed2_.py
mattj241/Fyyur
a70d97a344de0f049a7eddcbf0257a8cb24d8091
[ "MIT" ]
null
null
null
migrations/versions/455970924ed2_.py
mattj241/Fyyur
a70d97a344de0f049a7eddcbf0257a8cb24d8091
[ "MIT" ]
null
null
null
"""empty message Revision ID: 455970924ed2 Revises: ab6b56596f03 Create Date: 2021-05-28 18:10:58.753066 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '455970924ed2' down_revision = 'ab6b56596f03' branch_labels = None...
27.741935
107
0.711628
from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '455970924ed2' down_revision = 'ab6b56596f03' branch_labels = None depends_on = None def upgrade(): op.add_column('shows', sa.Column('start_datetime', sa.DateTime(), nullable=False)) op.drop_column('shows...
true
true
f75ece2f807531910da88eb8212dffea10de3614
2,472
py
Python
73_Reverse/python/reverse.py
serranojl/basic-computer-games
b197b00deefe8b69d5b5f13d7f2003ccc9649a70
[ "Unlicense" ]
1
2022-03-31T13:47:37.000Z
2022-03-31T13:47:37.000Z
73_Reverse/python/reverse.py
serranojl/basic-computer-games
b197b00deefe8b69d5b5f13d7f2003ccc9649a70
[ "Unlicense" ]
null
null
null
73_Reverse/python/reverse.py
serranojl/basic-computer-games
b197b00deefe8b69d5b5f13d7f2003ccc9649a70
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 import random import textwrap NUMCNT = 9 # How many numbers are we playing with? def main() -> None: print("REVERSE".center(72)) print("CREATIVE COMPUTING MORRISTOWN, NEW JERSEY".center(72)) print() print() print("REVERSE -- A GAME OF SKILL") print() if not input...
23.102804
77
0.555016
import random import textwrap NUMCNT = 9 def main() -> None: print("REVERSE".center(72)) print("CREATIVE COMPUTING MORRISTOWN, NEW JERSEY".center(72)) print() print() print("REVERSE -- A GAME OF SKILL") print() if not input("DO YOU WANT THE RULES? (yes/no) ").lower().startswith("n"): ...
true
true
f75ece3ae6ff8c3ebb555afd5adbb616cf1782a0
333
py
Python
examples/django_app/api/models.py
nbxorg/webservices
e66e426b6eb7c91228667f2813a4a8bf70d5571d
[ "BSD-3-Clause" ]
14
2015-11-24T08:56:32.000Z
2022-03-13T22:52:42.000Z
examples/django_app/api/models.py
nbxorg/webservices
e66e426b6eb7c91228667f2813a4a8bf70d5571d
[ "BSD-3-Clause" ]
2
2015-11-25T06:29:13.000Z
2016-05-10T15:00:06.000Z
examples/django_app/api/models.py
nbxorg/webservices
e66e426b6eb7c91228667f2813a4a8bf70d5571d
[ "BSD-3-Clause" ]
4
2016-06-08T22:41:05.000Z
2018-07-25T18:09:06.000Z
from django.db import models class Key(models.Model): public_key = models.CharField(max_length=100, unique=True) private_key = models.CharField(max_length=100, unique=True) def __unicode__(self): return 'Public Key: %s, Private Key: %s' % ( self.public_key, self.private_ke...
25.615385
63
0.642643
from django.db import models class Key(models.Model): public_key = models.CharField(max_length=100, unique=True) private_key = models.CharField(max_length=100, unique=True) def __unicode__(self): return 'Public Key: %s, Private Key: %s' % ( self.public_key, self.private_ke...
true
true
f75ecea49a8128c0ed1f06c24d4018100c00ec68
1,134
py
Python
tests/storage/cases/test_KT1VwGoijY62ze1w9iTaCum7ybMyGcw2Uep5.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2021-05-20T16:52:08.000Z
2021-05-20T16:52:08.000Z
tests/storage/cases/test_KT1VwGoijY62ze1w9iTaCum7ybMyGcw2Uep5.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-12-30T16:44:56.000Z
2020-12-30T16:44:56.000Z
tests/storage/cases/test_KT1VwGoijY62ze1w9iTaCum7ybMyGcw2Uep5.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2022-03-20T19:01:00.000Z
2022-03-20T19:01:00.000Z
from unittest import TestCase from tests import get_data from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson class StorageTestKT1VwGoijY62ze1w9iTaCum7ybMyGcw2Uep5(TestCase): @classmethod def setUpClass(cls): cls.maxDiff = None cls....
40.5
112
0.749559
from unittest import TestCase from tests import get_data from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson class StorageTestKT1VwGoijY62ze1w9iTaCum7ybMyGcw2Uep5(TestCase): @classmethod def setUpClass(cls): cls.maxDiff = None cls....
true
true
f75ecee5ae0f5245ce535e29aebe507ae4f33b48
6,812
py
Python
models/CCNet/ccnet.py
HenryOsborne/SemanticSegmentation
d41549c3fd22731d7a12cdb1b438f730b0ebfcbc
[ "MIT" ]
null
null
null
models/CCNet/ccnet.py
HenryOsborne/SemanticSegmentation
d41549c3fd22731d7a12cdb1b438f730b0ebfcbc
[ "MIT" ]
null
null
null
models/CCNet/ccnet.py
HenryOsborne/SemanticSegmentation
d41549c3fd22731d7a12cdb1b438f730b0ebfcbc
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.nn as nn from models.CCNet.CC import CC_module as CrissCrossAttention affine_par = True BatchNorm2d = nn.BatchNorm2d def outS(i): i = int(i) i = (i + 1) / 2 i = int(np.ceil((i + 1) / 2.0)) i = (i + 1) / 2 return i def conv3x3(in_planes, out_planes, s...
37.428571
116
0.610834
import numpy as np import torch import torch.nn as nn from models.CCNet.CC import CC_module as CrissCrossAttention affine_par = True BatchNorm2d = nn.BatchNorm2d def outS(i): i = int(i) i = (i + 1) / 2 i = int(np.ceil((i + 1) / 2.0)) i = (i + 1) / 2 return i def conv3x3(in_planes, out_planes, s...
true
true
f75ed121f3ef8ae89a79afbe90ad72fa341628cb
6,633
py
Python
lib/sqlalchemy/event/legacy.py
lvillis/sqlalchemy
889d05c444264bf1b6d11386459d3360cc529d27
[ "MIT" ]
1
2020-07-21T16:06:40.000Z
2020-07-21T16:06:40.000Z
lib/sqlalchemy/event/legacy.py
lvillis/sqlalchemy
889d05c444264bf1b6d11386459d3360cc529d27
[ "MIT" ]
4
2020-04-23T19:00:28.000Z
2021-09-28T18:14:58.000Z
lib/sqlalchemy/event/legacy.py
lvillis/sqlalchemy
889d05c444264bf1b6d11386459d3360cc529d27
[ "MIT" ]
null
null
null
# event/legacy.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """Routines to handle adaption of legacy call signatures, generation of deprecation...
33.670051
79
0.573195
from .. import util def _legacy_signature(since, argnames, converter=None): def leg(fn): if not hasattr(fn, "_legacy_signatures"): fn._legacy_signatures = [] fn._legacy_signatures.append((since, argnames, converter)) return fn return leg def _wrap_fn_for_legacy(dispat...
true
true
f75ed1c436a6b49b025ce42052a2fe95e6eab174
1,895
py
Python
merge.py
watchdogpolska/campaign-zwierzeta
46c25faf0c7293a53aaa59868402556a096c9b60
[ "MIT" ]
null
null
null
merge.py
watchdogpolska/campaign-zwierzeta
46c25faf0c7293a53aaa59868402556a096c9b60
[ "MIT" ]
null
null
null
merge.py
watchdogpolska/campaign-zwierzeta
46c25faf0c7293a53aaa59868402556a096c9b60
[ "MIT" ]
1
2021-10-12T10:51:17.000Z
2021-10-12T10:51:17.000Z
import json # import requests # from pathlib import Path # import re with open('fetch_poslowie_from_sejm_gov_pl.json') as fp: sejm_content = json.load(fp) with open('fetch.json') as fp: target_content = json.load(fp) def normalize_name(v): parts = v.split(' ') return f"{parts[0]} {parts[-1]}" sejm_n...
33.245614
108
0.671768
import json with open('fetch_poslowie_from_sejm_gov_pl.json') as fp: sejm_content = json.load(fp) with open('fetch.json') as fp: target_content = json.load(fp) def normalize_name(v): parts = v.split(' ') return f"{parts[0]} {parts[-1]}" sejm_name = {normalize_name(x['name']) for x in sejm_content} t...
true
true
f75ed20024ae7bc1c989d39ed4940bfa331eea7b
26,876
py
Python
py/gravel_spec/bindings.py
Kaiyuan-Zhang/Gravel-public
ff3f7dc7d5ac63d91e26f03ae4e49a7451c6cb22
[ "MIT" ]
4
2020-04-11T19:11:25.000Z
2021-02-06T10:46:39.000Z
py/gravel_spec/bindings.py
Kaiyuan-Zhang/Gravel-public
ff3f7dc7d5ac63d91e26f03ae4e49a7451c6cb22
[ "MIT" ]
1
2021-11-01T20:19:23.000Z
2021-11-01T20:19:43.000Z
py/gravel_spec/bindings.py
Kaiyuan-Zhang/Gravel-public
ff3f7dc7d5ac63d91e26f03ae4e49a7451c6cb22
[ "MIT" ]
1
2020-04-18T03:36:03.000Z
2020-04-18T03:36:03.000Z
import copy import numbers from ctypes import * from . import ops from .utils import fresh_name, fresh_bv import z3 from functools import reduce from .symbolic import CobbleSymVal, CobbleSymGen funcs = [ ('is_bv', [c_void_p], c_bool), ('get_bv_width', [c_void_p], ...
37.960452
129
0.543868
import copy import numbers from ctypes import * from . import ops from .utils import fresh_name, fresh_bv import z3 from functools import reduce from .symbolic import CobbleSymVal, CobbleSymGen funcs = [ ('is_bv', [c_void_p], c_bool), ('get_bv_width', [c_void_p], ...
true
true
f75ed33ae8994c4e03f4e5cd6584cf1d21ff6793
3,180
py
Python
thirdparty/basalt/thirdparty/ros/ros_comm/test/test_rospy/test/rostest/test_latch_unsubscribe.py
Bookiebookie/LieSpline
b617bdf6b37164562387d0257145e9230d28e2e7
[ "BSD-3-Clause" ]
2
2021-05-22T09:46:00.000Z
2022-03-25T09:56:22.000Z
thirdparty/basalt/thirdparty/ros/ros_comm/test/test_rospy/test/rostest/test_latch_unsubscribe.py
Bookiebookie/LieSpline
b617bdf6b37164562387d0257145e9230d28e2e7
[ "BSD-3-Clause" ]
null
null
null
thirdparty/basalt/thirdparty/ros/ros_comm/test/test_rospy/test/rostest/test_latch_unsubscribe.py
Bookiebookie/LieSpline
b617bdf6b37164562387d0257145e9230d28e2e7
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Software License Agreement (BSD License) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditio...
37.857143
76
0.707862
PKG = 'test_rospy' NAME = 'test_latch_unsubscribe' import os import sys import unittest import psutil from std_msgs.msg import String def _get_connections(process_info): if hasattr(process_info, 'connections'): return process_info.connections() elif hasattr(process_info, 'get_connections'): ...
true
true
f75ed3850907cb4e863cd4b4e682fdb942fefee8
1,174
py
Python
pypy/interpreter/pyparser/test/test_parser.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/interpreter/pyparser/test/test_parser.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
null
null
null
pypy/interpreter/pyparser/test/test_parser.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
from pypy.interpreter.pyparser.asthelper import get_atoms from pypy.interpreter.pyparser.grammar import Parser from pypy.interpreter.pyparser import error from fakes import FakeSpace def test_symbols(): p = Parser() x1 = p.add_symbol('sym') x2 = p.add_token('tok') x3 = p.add_anon_symbol(':sym') x4...
23.959184
57
0.592845
from pypy.interpreter.pyparser.asthelper import get_atoms from pypy.interpreter.pyparser.grammar import Parser from pypy.interpreter.pyparser import error from fakes import FakeSpace def test_symbols(): p = Parser() x1 = p.add_symbol('sym') x2 = p.add_token('tok') x3 = p.add_anon_symbol(':sym') x4...
true
true
f75ed3ac340f4b88f0759c1d2f532a2390733075
67,209
py
Python
tests/trainer/test_trainer.py
pollenjp/pytorch-lightning
06f83492919c4c72a989f9bb8f271b92b479648b
[ "Apache-2.0" ]
2
2020-08-29T14:59:15.000Z
2020-09-11T11:09:10.000Z
tests/trainer/test_trainer.py
pollenjp/pytorch-lightning
06f83492919c4c72a989f9bb8f271b92b479648b
[ "Apache-2.0" ]
null
null
null
tests/trainer/test_trainer.py
pollenjp/pytorch-lightning
06f83492919c4c72a989f9bb8f271b92b479648b
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.643814
120
0.687334
import logging import math import os import pickle import sys from argparse import Namespace from copy import deepcopy from pathlib import Path from unittest.mock import ANY, call, patch import cloudpickle import pytest import torch from omegaconf import OmegaConf from torch.optim import SGD from torch.utils.data impo...
true
true
f75ed48b4250187e812ac5c869f0ae21c73d8cf1
1,442
bzl
Python
dependency_support/com_github_yosyshq_nextpnr/com_github_yosyshq_nextpnr.bzl
proppy/bazel_rules_hdl
67de36744870a312a7dbf09f9a693b38167534b3
[ "Apache-2.0" ]
null
null
null
dependency_support/com_github_yosyshq_nextpnr/com_github_yosyshq_nextpnr.bzl
proppy/bazel_rules_hdl
67de36744870a312a7dbf09f9a693b38167534b3
[ "Apache-2.0" ]
null
null
null
dependency_support/com_github_yosyshq_nextpnr/com_github_yosyshq_nextpnr.bzl
proppy/bazel_rules_hdl
67de36744870a312a7dbf09f9a693b38167534b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
42.411765
116
0.730236
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def com_github_yosyshq_nextpnr(): maybe( http_archive, name = "com_github_yosyshq_nextpnr", urls = [ "https://github.com/YosysHQ/nextpnr/archive/...
true
true
f75ed53ea0453129def7b23d6c3a1efe379fa548
10,436
py
Python
tests/integration/test_iam.py
matthall88/localstack
a3cc76b779e12b86f9c64525e976c9147ca6b6f6
[ "Apache-2.0" ]
3
2021-07-19T08:12:14.000Z
2021-12-16T19:08:22.000Z
tests/integration/test_iam.py
matthall88/localstack
a3cc76b779e12b86f9c64525e976c9147ca6b6f6
[ "Apache-2.0" ]
1
2021-03-01T13:55:42.000Z
2021-03-01T13:55:42.000Z
tests/integration/test_iam.py
matthall88/localstack
a3cc76b779e12b86f9c64525e976c9147ca6b6f6
[ "Apache-2.0" ]
1
2020-09-25T23:21:08.000Z
2020-09-25T23:21:08.000Z
import os import logging import json import unittest from botocore.exceptions import ClientError from localstack.constants import TEST_AWS_ACCOUNT_ID from localstack.services.iam.iam_starter import ADDITIONAL_MANAGED_POLICIES from localstack.utils.aws import aws_stack from localstack.utils.common import short_uid from ...
33.55627
101
0.559026
import os import logging import json import unittest from botocore.exceptions import ClientError from localstack.constants import TEST_AWS_ACCOUNT_ID from localstack.services.iam.iam_starter import ADDITIONAL_MANAGED_POLICIES from localstack.utils.aws import aws_stack from localstack.utils.common import short_uid from ...
true
true
f75ed576c68f55ad6758f124b1345584cca7e39a
302
py
Python
to_json.py
gordonnchy/kamusi
61600f9fac1d7a1fe74b1a48add55545f3f98e47
[ "MIT" ]
8
2021-11-11T10:49:41.000Z
2022-01-13T16:34:54.000Z
to_json.py
gordonnchy/kamusi
61600f9fac1d7a1fe74b1a48add55545f3f98e47
[ "MIT" ]
2
2021-11-12T05:47:14.000Z
2021-11-12T07:12:02.000Z
to_json.py
gordonnchy/kamusi
61600f9fac1d7a1fe74b1a48add55545f3f98e47
[ "MIT" ]
2
2021-11-12T06:30:25.000Z
2022-03-03T07:38:51.000Z
import pandas as pd def convert_to_json(): kamusi = pd.read_csv( "words.csv", usecols=["Index", "Word", "Meaning", "Synonyms", "Conjugation"] ) kamusi = kamusi.set_index("Index") kamusi.to_json("kamusi.json", orient="index") if __name__ == "__main__": convert_to_json()
21.571429
84
0.639073
import pandas as pd def convert_to_json(): kamusi = pd.read_csv( "words.csv", usecols=["Index", "Word", "Meaning", "Synonyms", "Conjugation"] ) kamusi = kamusi.set_index("Index") kamusi.to_json("kamusi.json", orient="index") if __name__ == "__main__": convert_to_json()
true
true
f75ed6e7b3a33f914de8d248b3d3a929993fcb4a
200
py
Python
autoalchemy/__init__.py
hay-kot/autoalchemy
7310a4ca8bbe2d33d65c1105fbd80f8011d84b0f
[ "MIT" ]
null
null
null
autoalchemy/__init__.py
hay-kot/autoalchemy
7310a4ca8bbe2d33d65c1105fbd80f8011d84b0f
[ "MIT" ]
null
null
null
autoalchemy/__init__.py
hay-kot/autoalchemy
7310a4ca8bbe2d33d65c1105fbd80f8011d84b0f
[ "MIT" ]
null
null
null
"""Top-level package for AutoAlchemy.""" __author__ = """Hayden Kotelman""" __email__ = "hay-kot@pm.me" __version__ = "0.1.0" from .auto-alchemy import auto_init from .config import AutoInitConfig
20
40
0.73
"""Top-level package for AutoAlchemy.""" __author__ = """Hayden Kotelman""" __email__ = "hay-kot@pm.me" __version__ = "0.1.0" from .auto-alchemy import auto_init from .config import AutoInitConfig
false
true
f75ed944d01f77905c8039ab5f5f367d72057d51
1,374
py
Python
test/test.py
TescaF/interactive_mapping
3190e06bc93142c6b03071a930892699ae57f7b3
[ "MIT" ]
null
null
null
test/test.py
TescaF/interactive_mapping
3190e06bc93142c6b03071a930892699ae57f7b3
[ "MIT" ]
null
null
null
test/test.py
TescaF/interactive_mapping
3190e06bc93142c6b03071a930892699ae57f7b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Contains all file-reading code and mapping code to generate results used for HRI17 and RSS17 papers. ''' import sys import os import time sys.path.append('../src') from entity import Entity from mapper import * from file_io import * from object_defs import * if __name__ == "__main__": # ...
29.869565
107
0.699418
''' Contains all file-reading code and mapping code to generate results used for HRI17 and RSS17 papers. ''' import sys import os import time sys.path.append('../src') from entity import Entity from mapper import * from file_io import * from object_defs import * if __name__ == "__main__": dir = os.path.dirname(...
false
true
f75ed9a3cb2e38297d4e16051fe5c517cf60de64
2,417
py
Python
tests/v1/test_review.py
miritih/WeConnect
c839f8504f8f2c922b0828c1ada2863fbaa15ee1
[ "MIT" ]
null
null
null
tests/v1/test_review.py
miritih/WeConnect
c839f8504f8f2c922b0828c1ada2863fbaa15ee1
[ "MIT" ]
4
2018-02-28T15:17:26.000Z
2018-05-20T06:59:31.000Z
tests/v1/test_review.py
miritih/WeConnect
c839f8504f8f2c922b0828c1ada2863fbaa15ee1
[ "MIT" ]
1
2018-03-08T17:50:30.000Z
2018-03-08T17:50:30.000Z
import unittest import os import json from app import create_app from app.v1.v1 import business_model, user_model class AddBusinessTestCase(unittest.TestCase): """This class represents the api test case""" def setUp(self): """ Will be called before every test """ self.app = cr...
40.966102
106
0.593297
import unittest import os import json from app import create_app from app.v1.v1 import business_model, user_model class AddBusinessTestCase(unittest.TestCase): def setUp(self): self.app = create_app(config_name='testing') self.client = self.app.test_client self.user = {"username": "mirit...
true
true
f75ed9c864cd9d9f4e73511d733de11eb4a944e7
146
py
Python
jirafs/types.py
coddingtonbear/jirafs
2eeeeee2188f7945560008e76dfe2a15c4a45da3
[ "MIT" ]
119
2015-01-06T08:05:38.000Z
2022-03-22T21:19:50.000Z
jirafs/types.py
coddingtonbear/jirafs
2eeeeee2188f7945560008e76dfe2a15c4a45da3
[ "MIT" ]
54
2015-03-18T20:37:48.000Z
2022-03-23T14:26:26.000Z
jirafs/types.py
coddingtonbear/jirafs
2eeeeee2188f7945560008e76dfe2a15c4a45da3
[ "MIT" ]
16
2015-04-29T18:39:31.000Z
2020-09-23T12:30:49.000Z
from typing import Dict, Union JirafsMacroAttributeValue = Union[str, float, bool] JirafsMacroAttributes = Dict[str, JirafsMacroAttributeValue]
24.333333
60
0.821918
from typing import Dict, Union JirafsMacroAttributeValue = Union[str, float, bool] JirafsMacroAttributes = Dict[str, JirafsMacroAttributeValue]
true
true
f75ed9e325d88875bf7ba8450beaa9c44ffbf193
8,740
py
Python
flask_admin/contrib/sqla/fields.py
gstf/flask-admin
5f1b2d8813c7aa048862a820d17a6efbeba8c42f
[ "BSD-3-Clause" ]
1
2019-04-13T20:53:16.000Z
2019-04-13T20:53:16.000Z
flask_admin/contrib/sqla/fields.py
gstf/flask-admin
5f1b2d8813c7aa048862a820d17a6efbeba8c42f
[ "BSD-3-Clause" ]
null
null
null
flask_admin/contrib/sqla/fields.py
gstf/flask-admin
5f1b2d8813c7aa048862a820d17a6efbeba8c42f
[ "BSD-3-Clause" ]
null
null
null
""" Useful form fields for use with SQLAlchemy ORM. """ import operator from wtforms import widgets from wtforms.fields import SelectFieldBase from wtforms.validators import ValidationError from .tools import get_primary_key from flask_admin._compat import text_type, string_types from flask_admin.form import Form...
34.007782
100
0.628375
import operator from wtforms import widgets from wtforms.fields import SelectFieldBase from wtforms.validators import ValidationError from .tools import get_primary_key from flask_admin._compat import text_type, string_types from flask_admin.form import FormOpts from flask_admin.model.fields import InlineFieldList, I...
true
true
f75ed9e792d416d3b58d05d8f9079077bb106e04
1,255
py
Python
setup.py
osgirl/django-azure-storage
42af95dff0d6c7a5ec5944635d778029315a537f
[ "MIT" ]
12
2015-04-12T08:10:44.000Z
2020-10-26T18:21:24.000Z
setup.py
osgirl/django-azure-storage
42af95dff0d6c7a5ec5944635d778029315a537f
[ "MIT" ]
13
2015-06-12T18:07:46.000Z
2018-12-21T19:35:14.000Z
setup.py
osgirl/django-azure-storage
42af95dff0d6c7a5ec5944635d778029315a537f
[ "MIT" ]
18
2015-01-30T11:39:06.000Z
2021-04-15T09:39:09.000Z
#!/usr/bin/env python from setuptools import setup, find_packages import os from azure_storage import __version__ PACKAGE_DIR = os.path.abspath(os.path.dirname(__file__)) os.chdir(PACKAGE_DIR) setup( name='django-azure-storage', version=__version__, url="https://github.com/Rediker-Software/django-azure-...
31.375
74
0.641434
from setuptools import setup, find_packages import os from azure_storage import __version__ PACKAGE_DIR = os.path.abspath(os.path.dirname(__file__)) os.chdir(PACKAGE_DIR) setup( name='django-azure-storage', version=__version__, url="https://github.com/Rediker-Software/django-azure-storage", author="...
true
true
f75eda3f7aa52e8aa143756c4269fef101d30175
14,026
py
Python
python/cuspatial/cuspatial/io/geopandas_adapter.py
AyodeAwe/cuspatial
77971ac91a24228bc46cf461c0ac7b6f2ed78e44
[ "Apache-2.0" ]
347
2019-08-29T12:39:02.000Z
2022-03-28T14:55:34.000Z
python/cuspatial/cuspatial/io/geopandas_adapter.py
AyodeAwe/cuspatial
77971ac91a24228bc46cf461c0ac7b6f2ed78e44
[ "Apache-2.0" ]
425
2019-08-24T23:27:46.000Z
2022-03-31T20:07:18.000Z
python/cuspatial/cuspatial/io/geopandas_adapter.py
AyodeAwe/cuspatial
77971ac91a24228bc46cf461c0ac7b6f2ed78e44
[ "Apache-2.0" ]
109
2019-08-14T22:49:56.000Z
2022-02-24T19:54:42.000Z
# Copyright (c) 2020-2021 NVIDIA CORPORATION. import numpy as np from geopandas import GeoSeries as gpGeoSeries from shapely.geometry import ( LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, ) class GeoPandasAdapter: def __init__(self, geoseries: gpGeoSeries): ...
43.559006
79
0.494938
import numpy as np from geopandas import GeoSeries as gpGeoSeries from shapely.geometry import ( LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, ) class GeoPandasAdapter: def __init__(self, geoseries: gpGeoSeries): self.offsets = self._load_geometry_offsets(...
true
true
f75edaa505a3e5114c5f728af5489f6e51dad0a4
10,148
py
Python
tempest/api/identity/admin/v3/test_projects.py
savitha-p/tempest-2
07a572ca175d10fb7366c5015aa28419b76af3c8
[ "Apache-2.0" ]
null
null
null
tempest/api/identity/admin/v3/test_projects.py
savitha-p/tempest-2
07a572ca175d10fb7366c5015aa28419b76af3c8
[ "Apache-2.0" ]
null
null
null
tempest/api/identity/admin/v3/test_projects.py
savitha-p/tempest-2
07a572ca175d10fb7366c5015aa28419b76af3c8
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 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 requ...
43.930736
78
0.665254
from tempest.api.identity import base from tempest.lib.common.utils import data_utils from tempest.lib import decorators class ProjectsTestJSON(base.BaseIdentityV3AdminTest): @decorators.idempotent_id('0ecf465c-0dc4-4532-ab53-91ffeb74d12d') def test_project_create_with_description(self): pro...
true
true
f75edad6f4a34226221a867351477884bd48eaa8
445
py
Python
tests/test_utils.py
henry410213028/fb-group-crawler
426d2f57cde56bca610d7ccf43e2a3ed9174f038
[ "MIT" ]
null
null
null
tests/test_utils.py
henry410213028/fb-group-crawler
426d2f57cde56bca610d7ccf43e2a3ed9174f038
[ "MIT" ]
null
null
null
tests/test_utils.py
henry410213028/fb-group-crawler
426d2f57cde56bca610d7ccf43e2a3ed9174f038
[ "MIT" ]
null
null
null
import pytest from fb_group.utils import parse_args class TestUtils: def test_parse_args(self): assert parse_args([]) == {} assert parse_args(["a=1"]) == {"a": "1"} assert parse_args(["a=1", "b=2"]) == {"a": "1", "b": "2"} assert parse_args(["a"]) == {} assert parse_args(["...
31.785714
65
0.480899
import pytest from fb_group.utils import parse_args class TestUtils: def test_parse_args(self): assert parse_args([]) == {} assert parse_args(["a=1"]) == {"a": "1"} assert parse_args(["a=1", "b=2"]) == {"a": "1", "b": "2"} assert parse_args(["a"]) == {} assert parse_args(["...
true
true
f75edbe386e0f566fd74ade087b9f75f6e128aeb
4,252
py
Python
test_tools/test_configurablebase.py
zarppy/MUREIL_2014
25ba16554ce8f614b9337e0fffce75da3fa259a4
[ "MIT" ]
null
null
null
test_tools/test_configurablebase.py
zarppy/MUREIL_2014
25ba16554ce8f614b9337e0fffce75da3fa259a4
[ "MIT" ]
null
null
null
test_tools/test_configurablebase.py
zarppy/MUREIL_2014
25ba16554ce8f614b9337e0fffce75da3fa259a4
[ "MIT" ]
null
null
null
# # # Copyright (C) University of Melbourne 2012 # # # #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...
36.033898
80
0.523283
import sys sys.path.append('..') import os import unittest import numpy from tools import mureilexception, testutilities from tools import mureilbuilder from tools import configurablebase class TestExpandConfig(unittest.TestCase): def setUp(self): testutilities.unittest_path_setup(self...
true
true
f75edc3789d5d32993d769926482775986ffade2
1,075
py
Python
mysite/polls/migrations/0001_initial.py
bealsa/django-polls-tutorial
3d58d391a91c3d9dc9f113fd58c9d1e66306bebf
[ "MIT" ]
null
null
null
mysite/polls/migrations/0001_initial.py
bealsa/django-polls-tutorial
3d58d391a91c3d9dc9f113fd58c9d1e66306bebf
[ "MIT" ]
null
null
null
mysite/polls/migrations/0001_initial.py
bealsa/django-polls-tutorial
3d58d391a91c3d9dc9f113fd58c9d1e66306bebf
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-30 16:07 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Question', fields=[ ...
32.575758
114
0.586047
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Question', fields=[ ('id', models.AutoField(auto_created=T...
true
true
f75edd330dd6b9efcae249a095625cbd5609f0fb
351
py
Python
pliers/support/__init__.py
debanjanghosh/pliers
4b2e48b239603d4756c41ee2769b57411bbf5fac
[ "BSD-3-Clause" ]
1
2019-04-17T16:32:07.000Z
2019-04-17T16:32:07.000Z
pliers/support/__init__.py
debanjanghosh/pliers
4b2e48b239603d4756c41ee2769b57411bbf5fac
[ "BSD-3-Clause" ]
1
2018-11-16T17:20:03.000Z
2018-11-16T17:20:03.000Z
pliers/support/__init__.py
debanjanghosh/pliers
4b2e48b239603d4756c41ee2769b57411bbf5fac
[ "BSD-3-Clause" ]
null
null
null
''' Support utilities for (mostly) text data. ''' # TODO: This stuff should probably be merged into .utils. from .decorators import requires_nltk_corpus from .download import download_nltk_data from .download_embedding import download_embedding_data __all__ = [ 'requires_nltk_corpus', 'download_nltk_data', ...
25.071429
57
0.774929
from .decorators import requires_nltk_corpus from .download import download_nltk_data from .download_embedding import download_embedding_data __all__ = [ 'requires_nltk_corpus', 'download_nltk_data', 'download_embedding_data' ]
true
true
f75edd5d121a5735da2770b53087e98815a82692
3,134
py
Python
utils/constant.py
Fallen-Breath/PCRC
be50e2956f05e55f9505b8a759f68da428e7a0d8
[ "Apache-2.0" ]
101
2020-01-13T15:14:26.000Z
2022-03-25T06:10:53.000Z
utils/constant.py
Fallen-Breath/PCRC
be50e2956f05e55f9505b8a759f68da428e7a0d8
[ "Apache-2.0" ]
21
2020-02-26T18:05:32.000Z
2022-03-26T01:47:51.000Z
utils/constant.py
Fallen-Breath/PCRC
be50e2956f05e55f9505b8a759f68da428e7a0d8
[ "Apache-2.0" ]
20
2020-03-14T04:08:52.000Z
2022-01-22T14:02:20.000Z
# coding: utf8 import os from . import pycraft Version = '0.11.3-alpha' ROOT_PATH = [ os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', ''), # I'm in ./utils/ folder so ../ might be the path './', ] MilliSecondPerHour = 60 * 60 * 1000 BytePerKB = 1024 BytePerMB = BytePerKB * 1024 MinimumLegalFileSize =...
21.175676
143
0.655712
import os from . import pycraft Version = '0.11.3-alpha' ROOT_PATH = [ os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', ''), './', ] MilliSecondPerHour = 60 * 60 * 1000 BytePerKB = 1024 BytePerMB = BytePerKB * 1024 MinimumLegalFileSize = 10 * BytePerKB RecordingFilePath = 'temp_recording/' RecordingSt...
true
true
f75edd98efb4d5ca8b2c3c2f1f9d0770a8d60e50
13,477
py
Python
herbarium/data/build.py
shipjobs/herbarium
db49442e9322e20c2556bffa9dbcb0dfcd695788
[ "Apache-2.0" ]
1
2021-05-31T21:43:59.000Z
2021-05-31T21:43:59.000Z
herbarium/data/build.py
shipjobs/herbarium
db49442e9322e20c2556bffa9dbcb0dfcd695788
[ "Apache-2.0" ]
null
null
null
herbarium/data/build.py
shipjobs/herbarium
db49442e9322e20c2556bffa9dbcb0dfcd695788
[ "Apache-2.0" ]
1
2021-06-11T08:35:23.000Z
2021-06-11T08:35:23.000Z
# Copyright (c) Facebook, Inc. and its affiliates. from collections import defaultdict import itertools import logging import numpy as np import operator import pickle import torch.utils.data from tabulate import tabulate from termcolor import colored from herbarium.config import configurable from herbarium.utils.comm...
37.96338
138
0.678192
from collections import defaultdict import itertools import logging import numpy as np import operator import pickle import torch.utils.data from tabulate import tabulate from termcolor import colored from herbarium.config import configurable from herbarium.utils.comm import get_world_size from herbarium.utils.env imp...
true
true
f75eddcdc9970af8e19d4c862ad1085ab29ed7eb
3,671
py
Python
fastai2/callback/captum.py
poppingtonic/fastai2
026fb13f5df3f338378fbd37d9ce8b0399ef1927
[ "Apache-2.0" ]
1
2020-05-27T05:00:49.000Z
2020-05-27T05:00:49.000Z
fastai2/callback/captum.py
poppingtonic/fastai2
026fb13f5df3f338378fbd37d9ce8b0399ef1927
[ "Apache-2.0" ]
null
null
null
fastai2/callback/captum.py
poppingtonic/fastai2
026fb13f5df3f338378fbd37d9ce8b0399ef1927
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/73_callback.captum.ipynb (unless otherwise specified). __all__ = ['json_clean', 'IntegradedGradientsCallback', 'CaptumInsightsCallback'] # Cell import tempfile from ..basics import * from ..learner import Callback # Cell # Dirty hack as json_clean doesn't support Cate...
39.053191
135
0.64669
__all__ = ['json_clean', 'IntegradedGradientsCallback', 'CaptumInsightsCallback'] import tempfile from ..basics import * from ..learner import Callback from ipykernel import jsonutil _json_clean=jsonutil.json_clean def json_clean(o): o = list(o.items) if isinstance(o,CategoryMap) else o return _json_clean...
true
true
f75edddc637ba2cc9d40e038f0292812ecbd1fb8
1,768
py
Python
Doc/tools/docutils/languages/ja.py
cocoatomo/Python3.2_C_API_Tutorial
e33d4a285429935aca3178dc2a97aca3ab484232
[ "PSF-2.0" ]
2
2019-03-03T00:04:36.000Z
2020-10-06T16:22:38.000Z
Doc/tools/docutils/languages/ja.py
cocoatomo/Python3.2_C_API_Tutorial
e33d4a285429935aca3178dc2a97aca3ab484232
[ "PSF-2.0" ]
null
null
null
Doc/tools/docutils/languages/ja.py
cocoatomo/Python3.2_C_API_Tutorial
e33d4a285429935aca3178dc2a97aca3ab484232
[ "PSF-2.0" ]
1
2019-03-03T00:04:38.000Z
2019-03-03T00:04:38.000Z
# -*- coding: utf-8 -*- # $Id: ja.py 78909 2010-03-13 10:49:23Z georg.brandl $ # Author: Hisashi Morita <hisashim@kt.rim.or.jp> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html...
28.516129
77
0.585407
__docformat__ = 'reStructuredText' labels = { 'author': u'著者', 'authors': u'著者', 'organization': u'組織', 'address': u'住所', 'contact': u'連絡先', 'version': u'バージョン', 'revision': u'リビジョン', 'status': u'ステータス', 'date': u'日付', 'copyright': u'著作権', 'ded...
true
true
f75edeb53c2cb37c25d8fac501c0ebf33033d773
373
py
Python
codewars/6kyu/amrlotfy77/Ultimate Array Reverser/test_bench.py
ictcubeMENA/Training_one
dff6bee96ba42babe4888e5cf9a9448a6fd93fc3
[ "MIT" ]
null
null
null
codewars/6kyu/amrlotfy77/Ultimate Array Reverser/test_bench.py
ictcubeMENA/Training_one
dff6bee96ba42babe4888e5cf9a9448a6fd93fc3
[ "MIT" ]
2
2019-01-22T10:53:42.000Z
2019-01-31T08:02:48.000Z
codewars/6kyu/amrlotfy77/Ultimate Array Reverser/test_bench.py
ictcubeMENA/Training_one
dff6bee96ba42babe4888e5cf9a9448a6fd93fc3
[ "MIT" ]
13
2019-01-22T10:37:42.000Z
2019-01-25T13:30:43.000Z
from main import count_positives_sum_negatives,count_positives_sum_negatives1 def test1(benchmark): assert benchmark(count_positives_sum_negatives1,[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -11, -12, -13, -14, -15]) == [10, -65] def test(benchmark): assert benchmark(count_positives_sum_negatives, [1, 2, 3, 4, 5, ...
41.444444
126
0.656836
from main import count_positives_sum_negatives,count_positives_sum_negatives1 def test1(benchmark): assert benchmark(count_positives_sum_negatives1,[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -11, -12, -13, -14, -15]) == [10, -65] def test(benchmark): assert benchmark(count_positives_sum_negatives, [1, 2, 3, 4, 5, ...
true
true
f75edef2e6ed6c2ad6aca4486e0a84067a263d2a
6,697
py
Python
tests/utils/test_events.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
tests/utils/test_events.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
tests/utils/test_events.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
import json from collections import defaultdict from queue import Queue from unittest.mock import patch import redis from redis.exceptions import ConnectionError from CTFd.config import TestingConfig from CTFd.utils.events import EventManager, RedisEventManager, ServerSentEvent from tests.helpers import cre...
34.168367
87
0.561296
import json from collections import defaultdict from queue import Queue from unittest.mock import patch import redis from redis.exceptions import ConnectionError from CTFd.config import TestingConfig from CTFd.utils.events import EventManager, RedisEventManager, ServerSentEvent from tests.helpers import cre...
true
true
f75edf0ae35cdd358d05c4ddeb76e07f12f2e19d
711
py
Python
cmsplugin_rt/google_analytics/cms_plugins.py
RacingTadpole/cmsplugin-rt
e77192629fc5df4c1ce9d53611d67e94435b7d72
[ "BSD-3-Clause" ]
1
2015-09-28T10:10:32.000Z
2015-09-28T10:10:32.000Z
cmsplugin_rt/google_analytics/cms_plugins.py
RacingTadpole/cmsplugin-rt
e77192629fc5df4c1ce9d53611d67e94435b7d72
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_rt/google_analytics/cms_plugins.py
RacingTadpole/cmsplugin-rt
e77192629fc5df4c1ce9d53611d67e94435b7d72
[ "BSD-3-Clause" ]
null
null
null
from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext_lazy as _ from models import * bootstrap_module_name = _("Widgets") layout_module_name = _("Layout elements") generic_module_name = _("Generic") meta_module_name = _("Meta elements") class ...
29.625
65
0.769339
from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext_lazy as _ from models import * bootstrap_module_name = _("Widgets") layout_module_name = _("Layout elements") generic_module_name = _("Generic") meta_module_name = _("Meta elements") class ...
true
true
f75edf724f51bb54d4390fc09ff001a9f65f7bd0
12,730
py
Python
venv/lib/python3.6/site-packages/ansible_collections/azure/azcollection/plugins/modules/azure_rm_virtualwan.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/azure/azcollection/plugins/modules/azure_rm_virtualwan.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/azure/azcollection/plugins/modules/azure_rm_virtualwan.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Copyright (c) 2020 Fred-Sun, (@Fred-Sun) # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: azure_rm_virtualwan version_added: '1.5.0...
31.825
130
0.53425
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: azure_rm_virtualwan version_added: '1.5.0' short_description: Manage Azure VirtualWan instance description: - Create, update and delete instance of Azure VirtualWan. options: resource_group: ...
true
true
f75edf903de9435e055e5f1f0e51966ad1dee8ab
1,188
py
Python
764 largest plus sign/largest_plus_sign.py
JawadAsifBD/leetcode
15c3bd0363f2a0bf2956fec38c095a955ca6c000
[ "MIT" ]
null
null
null
764 largest plus sign/largest_plus_sign.py
JawadAsifBD/leetcode
15c3bd0363f2a0bf2956fec38c095a955ca6c000
[ "MIT" ]
null
null
null
764 largest plus sign/largest_plus_sign.py
JawadAsifBD/leetcode
15c3bd0363f2a0bf2956fec38c095a955ca6c000
[ "MIT" ]
null
null
null
from typing import List class Solution: def orderOfLargestPlusSign(self, N: int, mines: List[List[int]]) -> int: banned = {tuple(mine) for mine in mines} dp = [[0] * N for _ in range(N)] ans = 0 for r in range(N): count = 0 for c in range(N): ...
26.4
76
0.420875
from typing import List class Solution: def orderOfLargestPlusSign(self, N: int, mines: List[List[int]]) -> int: banned = {tuple(mine) for mine in mines} dp = [[0] * N for _ in range(N)] ans = 0 for r in range(N): count = 0 for c in range(N): ...
true
true
f75edff11aba70f0713adf24e4016b8e0740142a
794
py
Python
src/books/urls.py
twistedTongues/django-dummy
2c642a87d576fbe4afa31daacb9fa68e76d8d4b2
[ "Apache-2.0" ]
null
null
null
src/books/urls.py
twistedTongues/django-dummy
2c642a87d576fbe4afa31daacb9fa68e76d8d4b2
[ "Apache-2.0" ]
null
null
null
src/books/urls.py
twistedTongues/django-dummy
2c642a87d576fbe4afa31daacb9fa68e76d8d4b2
[ "Apache-2.0" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ # path('', views.show_book_list_view), # path('book/<int:book_id>/', views.show_book_by_pk_view), # path('book/create/', views.create_book_view), # path('book/update/<int:pk>/', views.update_book_view), # path('book/delete/<int:pk>/'...
39.7
62
0.670025
from django.urls import path from . import views urlpatterns = [ path('', views.ShowHomePageListView.as_view()), path('books/', views.ShowBookListView.as_view()), path('<int:pk>/', views.ShowBookDetailView.as_view()), path('create/', views.CreateBookView.as_view()), pat...
true
true
f75ee0d0ddd95c6e43b2404895a47c64a31914d6
2,552
py
Python
venv/Lib/site-packages/pandas/tests/test_optional_dependency.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
7
2022-01-16T12:28:16.000Z
2022-03-04T15:31:45.000Z
venv/Lib/site-packages/pandas/tests/test_optional_dependency.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
45
2019-06-12T20:35:20.000Z
2022-03-07T05:45:56.000Z
venv/Lib/site-packages/pandas/tests/test_optional_dependency.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
4
2016-01-01T06:21:53.000Z
2020-05-09T20:54:50.000Z
import sys import types import pytest from pandas.compat._optional import ( VERSIONS, import_optional_dependency, ) import pandas._testing as tm def test_import_optional(): match = "Missing .*notapackage.* pip .* conda .* notapackage" with pytest.raises(ImportError, match=match): import_opt...
30.023529
82
0.710031
import sys import types import pytest from pandas.compat._optional import ( VERSIONS, import_optional_dependency, ) import pandas._testing as tm def test_import_optional(): match = "Missing .*notapackage.* pip .* conda .* notapackage" with pytest.raises(ImportError, match=match): import_opt...
true
true
f75ee1fe202c4e4a5e2bd3c21103165aaa4a062f
597
py
Python
tests/test_skeleton.py
desimmons/portfolio_rebalance
0ea4a2b3fb3d1bee975e77445fc8a656e82db8e5
[ "MIT" ]
null
null
null
tests/test_skeleton.py
desimmons/portfolio_rebalance
0ea4a2b3fb3d1bee975e77445fc8a656e82db8e5
[ "MIT" ]
null
null
null
tests/test_skeleton.py
desimmons/portfolio_rebalance
0ea4a2b3fb3d1bee975e77445fc8a656e82db8e5
[ "MIT" ]
null
null
null
import pytest from portfolio_rebalance.skeleton import fib, main __author__ = "David Simmons" __copyright__ = "David Simmons" __license__ = "MIT" def test_fib(): """API Tests""" assert fib(1) == 1 assert fib(2) == 1 assert fib(7) == 13 with pytest.raises(AssertionError): fib(-10) def t...
22.961538
73
0.666667
import pytest from portfolio_rebalance.skeleton import fib, main __author__ = "David Simmons" __copyright__ = "David Simmons" __license__ = "MIT" def test_fib(): assert fib(1) == 1 assert fib(2) == 1 assert fib(7) == 13 with pytest.raises(AssertionError): fib(-10) def test_main(capsys): ...
true
true
f75ee2a0820872665348663f8c7b9258ceaba510
40,604
py
Python
google/cloud/bigquery/logging/v1/google-cloud-bigquery-logging-v1-py/google/cloud/bigquery_logging_v1/types/audit_data.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/bigquery/logging/v1/google-cloud-bigquery-logging-v1-py/google/cloud/bigquery_logging_v1/types/audit_data.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/bigquery/logging/v1/google-cloud-bigquery-logging-v1-py/google/cloud/bigquery_logging_v1/types/audit_data.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
28.4541
116
0.597355
import proto from google.iam.v1 import iam_policy_pb2 from google.iam.v1 import policy_pb2 from google.protobuf import duration_pb2 from google.protobuf import timestamp_pb2 from google.rpc import status_pb2 __protobuf__ = proto.module( package='google.cloud.bigquery.logging.v1', manifest={ 'Au...
true
true
f75ee2bc4a70ad0ac99738f44bdc30a4be9600ec
1,512
py
Python
brownie/scripts/runMiniSwap.py
SuperZooper3/AstroSwap
86441eb099c8b518441cd9bb58bf8ac75e5709c1
[ "MIT" ]
1
2022-02-10T05:38:20.000Z
2022-02-10T05:38:20.000Z
brownie/scripts/runMiniSwap.py
SuperZooper3/AstroSwap
86441eb099c8b518441cd9bb58bf8ac75e5709c1
[ "MIT" ]
null
null
null
brownie/scripts/runMiniSwap.py
SuperZooper3/AstroSwap
86441eb099c8b518441cd9bb58bf8ac75e5709c1
[ "MIT" ]
1
2022-02-18T13:08:58.000Z
2022-02-18T13:08:58.000Z
from scripts.helpers import smart_get_account, LOCAL_BLOCKCHAIN_ENVIRONMENTS, approve_transfer from scripts.runAstroSwap import deploy_erc20 from brownie import network, accounts, config, MiniSwap, MockERC20 from brownie.network.contract import Contract fee = 400 def deploy_mini_swap(fee): account = smart_get_acc...
36
112
0.718254
from scripts.helpers import smart_get_account, LOCAL_BLOCKCHAIN_ENVIRONMENTS, approve_transfer from scripts.runAstroSwap import deploy_erc20 from brownie import network, accounts, config, MiniSwap, MockERC20 from brownie.network.contract import Contract fee = 400 def deploy_mini_swap(fee): account = smart_get_acc...
true
true
f75ee4cd8bf461eb2122e1709536dd8212f79ef8
6,821
py
Python
lib/exabgp/bgp/message/open/capability/capability.py
cloudscale-ch/exabgp
55ee496dfbc3fce75c5107fae7a7d38567154d46
[ "BSD-3-Clause" ]
1
2021-09-08T15:31:42.000Z
2021-09-08T15:31:42.000Z
lib/exabgp/bgp/message/open/capability/capability.py
cloudscale-ch/exabgp
55ee496dfbc3fce75c5107fae7a7d38567154d46
[ "BSD-3-Clause" ]
null
null
null
lib/exabgp/bgp/message/open/capability/capability.py
cloudscale-ch/exabgp
55ee496dfbc3fce75c5107fae7a7d38567154d46
[ "BSD-3-Clause" ]
1
2020-05-28T17:33:14.000Z
2020-05-28T17:33:14.000Z
# encoding: utf-8 """ capability.py Created by Thomas Mangin on 2012-07-17. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ import sys # Do not create a dependency loop by using exabgp.bgp.message as import from exabgp.util import ordinal from exabgp.uti...
35.526042
115
0.674388
import sys from exabgp.util import ordinal from exabgp.util import concat_bytes_i from exabgp.bgp.message.notification import Notify class _CapabilityCode (int): _cache = dict() if sys.version_info[0] < 3: __slots__ = ['NAME','_cache'] RESERVED = 0x00 MULTIPROTOCOL = 0x01 ROUT...
true
true
f75ee586473bc9e74eb06f405c2bb8ac6980ae58
6,896
py
Python
storage/team09/ISAM/Cilindro.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
storage/team09/ISAM/Cilindro.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
storage/team09/ISAM/Cilindro.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
import BinWriter as bi import os class Cilindro: def __init__(self, nombre, pkeys, ikey, ruta): self.indx = [None]*30 self.longi = 30 self.nombre = nombre self.ruta = ruta+"/"+nombre+".b" self.icode = ikey self.pkeys = pkeys self.seguiente = ikey + 1 ...
30.648889
70
0.430249
import BinWriter as bi import os class Cilindro: def __init__(self, nombre, pkeys, ikey, ruta): self.indx = [None]*30 self.longi = 30 self.nombre = nombre self.ruta = ruta+"/"+nombre+".b" self.icode = ikey self.pkeys = pkeys self.seguiente = ikey + 1 ...
true
true
f75ee60eba79254703b35249e4ab9234ec6a90fa
837
py
Python
pymtl3/stdlib/rtl/Crossbar.py
mondO/pymtl3
9869dda28c01926cee6da94ebdeac2a210150c62
[ "BSD-3-Clause" ]
1
2022-01-03T06:22:11.000Z
2022-01-03T06:22:11.000Z
pymtl3/stdlib/rtl/Crossbar.py
mondO/pymtl3
9869dda28c01926cee6da94ebdeac2a210150c62
[ "BSD-3-Clause" ]
null
null
null
pymtl3/stdlib/rtl/Crossbar.py
mondO/pymtl3
9869dda28c01926cee6da94ebdeac2a210150c62
[ "BSD-3-Clause" ]
null
null
null
""" ====================================================================== Crossbar.py ====================================================================== """ from pymtl3 import * class Crossbar( Component ): def construct( s, nports, dtype ): sel_nbits = clog2( nports ) s.in_ = [ InPort ( dtype ) ...
27
73
0.44325
from pymtl3 import * class Crossbar( Component ): def construct( s, nports, dtype ): sel_nbits = clog2( nports ) s.in_ = [ InPort ( dtype ) for _ in range( nports ) ] s.out = [ OutPort ( dtype ) for _ in range( nports ) ] s.sel = [ InPort ( mk_bits( sel_nbits ) ) for _ in range( nports...
true
true
f75ee654261c2a65968b7c24776d8541f15000b8
53
py
Python
eupy/native/__init__.py
fivosts/eupy
9e21ee2cf3ba5666db85723384c7b3422c71286a
[ "MIT" ]
null
null
null
eupy/native/__init__.py
fivosts/eupy
9e21ee2cf3ba5666db85723384c7b3422c71286a
[ "MIT" ]
4
2020-04-03T00:03:48.000Z
2020-06-24T18:37:03.000Z
eupy/native/__init__.py
fivosts/eupy
9e21ee2cf3ba5666db85723384c7b3422c71286a
[ "MIT" ]
null
null
null
__all__ = ['logger', 'plotter', 'profiler', 'shell']
26.5
52
0.622642
__all__ = ['logger', 'plotter', 'profiler', 'shell']
true
true
f75ee6d4ec0165d85f785253790996bb3cde76ff
583
py
Python
py3utils/_random.py
hezhiming/py3utils
02f52ddabd074b169032089d11701bb160bba00f
[ "MIT" ]
3
2018-06-21T02:29:41.000Z
2021-11-16T12:14:58.000Z
py3utils/_random.py
hezhiming/py3utils
02f52ddabd074b169032089d11701bb160bba00f
[ "MIT" ]
null
null
null
py3utils/_random.py
hezhiming/py3utils
02f52ddabd074b169032089d11701bb160bba00f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # date: 2018/2/22 # author: he.zhiming # from __future__ import unicode_literals, absolute_import import random class RandomUtils: @classmethod def get_random_float(cls) -> float: """调整标准库命名 提示调用者, 会返回一个float :return: ...
17.666667
56
0.567753
from __future__ import unicode_literals, absolute_import import random class RandomUtils: @classmethod def get_random_float(cls) -> float: return random.random() @classmethod def get_random_int(cls, left, right) -> int: return random.randint(left, right)
true
true
f75ee6e5412226b866c5459646ae5600d1d63e80
9,420
py
Python
ted_talk_downloader/ted_talk_downloader.py
zhijing-jin/ted_talk_downloader
dae18abd92f804f2a67953c63b8bd48c1fe7009b
[ "BSD-3-Clause" ]
2
2020-01-11T19:10:15.000Z
2022-01-05T01:55:33.000Z
ted_talk_downloader/ted_talk_downloader.py
zhijing-jin/ted_talk_downloader
dae18abd92f804f2a67953c63b8bd48c1fe7009b
[ "BSD-3-Clause" ]
null
null
null
ted_talk_downloader/ted_talk_downloader.py
zhijing-jin/ted_talk_downloader
dae18abd92f804f2a67953c63b8bd48c1fe7009b
[ "BSD-3-Clause" ]
1
2022-01-09T01:17:00.000Z
2022-01-09T01:17:00.000Z
__author__ = "Zhijing Jin" __copyright__ = "Copyright 2020, Zhijing Jin" __credits__ = ["git@github.com:shunk031/TedScraper.git"] __license__ = "MIT" __version__ = "1.0" __email__ = "zhijing.jin@connect.hku.hk" __status__ = "Production" ''' website is https://www.ted.com/participate/translate/our-languages stats of pr...
34.505495
158
0.591401
__author__ = "Zhijing Jin" __copyright__ = "Copyright 2020, Zhijing Jin" __credits__ = ["git@github.com:shunk031/TedScraper.git"] __license__ = "MIT" __version__ = "1.0" __email__ = "zhijing.jin@connect.hku.hk" __status__ = "Production" import os import re import time import json from urllib.request import urlopen f...
true
true
f75ee86c5848c45dbe3f5064c802b1f6731f9c85
2,482
py
Python
src/models/eval_model.py
Inquiring-Nomad/ml-ops-simple
ab7047e0b1d0ff8fbb2843d7a727a8d2a0f47b37
[ "MIT" ]
null
null
null
src/models/eval_model.py
Inquiring-Nomad/ml-ops-simple
ab7047e0b1d0ff8fbb2843d7a727a8d2a0f47b37
[ "MIT" ]
null
null
null
src/models/eval_model.py
Inquiring-Nomad/ml-ops-simple
ab7047e0b1d0ff8fbb2843d7a727a8d2a0f47b37
[ "MIT" ]
null
null
null
import os import warnings import sys import pandas as pd import numpy as np from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score from sklearn.model_selection import train_test_split,cross_val_score from sklearn.model_selection import GridSearchCV,RandomizedSearchCV from sklearn.linear_model imp...
30.641975
77
0.698227
import os import warnings import sys import pandas as pd import numpy as np from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score from sklearn.model_selection import train_test_split,cross_val_score from sklearn.model_selection import GridSearchCV,RandomizedSearchCV from sklearn.linear_model imp...
true
true
f75ee913d86c66feb00d22794469180f1cd0e4a2
2,872
py
Python
setup.py
baffolobill/django-redisboard
74c93c27544bee7fa727a8f3b68c7a22bcb3e794
[ "BSD-2-Clause" ]
null
null
null
setup.py
baffolobill/django-redisboard
74c93c27544bee7fa727a8f3b68c7a22bcb3e794
[ "BSD-2-Clause" ]
null
null
null
setup.py
baffolobill/django-redisboard
74c93c27544bee7fa727a8f3b68c7a22bcb3e794
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setuptools import find_packages fro...
33.395349
96
0.602716
from __future__ import absolute_import from __future__ import print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setuptools import find_packages from setuptools import setup def read(*names, **k...
true
true
f75ee9c7d0885bca4f7ca96e1185d50b8b2e66d0
852
py
Python
src/clean/domain/model.py
evoludigit/clean_architecture_fastapi
aadb0c481c6dd9dfcde14160062b534180c24068
[ "MIT" ]
null
null
null
src/clean/domain/model.py
evoludigit/clean_architecture_fastapi
aadb0c481c6dd9dfcde14160062b534180c24068
[ "MIT" ]
null
null
null
src/clean/domain/model.py
evoludigit/clean_architecture_fastapi
aadb0c481c6dd9dfcde14160062b534180c24068
[ "MIT" ]
null
null
null
from __future__ import annotations from dataclasses import dataclass from anytree import NodeMixin from typing import Optional from slugify import slugify pattern_ltree_compatible = "[^-a-z0-9_]+" def identifier_from_string(a_string: str) -> str: return slugify(a_string, regex_pattern=pattern_ltree_compatible, se...
26.625
92
0.71831
from __future__ import annotations from dataclasses import dataclass from anytree import NodeMixin from typing import Optional from slugify import slugify pattern_ltree_compatible = "[^-a-z0-9_]+" def identifier_from_string(a_string: str) -> str: return slugify(a_string, regex_pattern=pattern_ltree_compatible, se...
true
true
f75eec5dbe71dc3b266ef4091e1756a519638653
2,054
py
Python
PythonPlayground/iTunesPlaylist/findDuplicates.py
jercas/PythonPlaygroud
449374c4c1b24ce342f94b87a622e9494c3779d5
[ "Apache-2.0" ]
1
2017-06-14T02:13:19.000Z
2017-06-14T02:13:19.000Z
PythonPlayground/iTunesPlaylist/findDuplicates.py
jercas/PythonPlaygroud
449374c4c1b24ce342f94b87a622e9494c3779d5
[ "Apache-2.0" ]
null
null
null
PythonPlayground/iTunesPlaylist/findDuplicates.py
jercas/PythonPlaygroud
449374c4c1b24ce342f94b87a622e9494c3779d5
[ "Apache-2.0" ]
null
null
null
#coding=utf-8 #2017.6.13 #By JerCas # 导入plist文件解析模块 import plistlib def findDuplicates(fileName): """查找重复曲目""" print("Finding duplicate tracks in "+ fileName +" ...") # 读取播放列表 # P-list文件将对象表示为字典,而播放列表文件使用的是一个字典的字典字典(值仍为一个字典);readPlist读入一个P-list文件作为输入,返回一个字典字典 plist = plistlib.readPlist(fileName) ...
34.813559
87
0.595424
import plistlib def findDuplicates(fileName): print("Finding duplicate tracks in "+ fileName +" ...") plist = plistlib.readPlist(fileName) tracks = plist['Tracks'] trackNames = {} for trackId,track in tracks.items(): try: name = track['Name'] ...
true
true
f75eeca089b91db7040c06c70f994d3b9a91ad1b
9,285
py
Python
tests/ut/python/dataset/test_random_vertical_flip_with_bbox.py
GuoSuiming/mindspore
48afc4cfa53d970c0b20eedfb46e039db2a133d5
[ "Apache-2.0" ]
4
2021-01-26T09:14:01.000Z
2021-01-26T09:17:24.000Z
tests/ut/python/dataset/test_random_vertical_flip_with_bbox.py
GuoSuiming/mindspore
48afc4cfa53d970c0b20eedfb46e039db2a133d5
[ "Apache-2.0" ]
null
null
null
tests/ut/python/dataset/test_random_vertical_flip_with_bbox.py
GuoSuiming/mindspore
48afc4cfa53d970c0b20eedfb46e039db2a133d5
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
42.788018
118
0.7049
import numpy as np import mindspore.dataset as ds import mindspore.dataset.vision.c_transforms as c_vision from mindspore import log as logger from util import visualize_with_bounding_boxes, InvalidBBoxType, check_bad_bbox, \ config_get_set_seed, config_get_set_num_parallel_workers, save_and_check_md5 GENERATE_GO...
true
true
f75eedcc8cd8676f44aa7c6a325c4511b5560866
6,851
py
Python
cusp/cusp_stage2.py
olsonjonny/cusp_cirq_demo
f7236d93018d4c7d7eb177dba3188d9c1fa1cffe
[ "Apache-2.0" ]
null
null
null
cusp/cusp_stage2.py
olsonjonny/cusp_cirq_demo
f7236d93018d4c7d7eb177dba3188d9c1fa1cffe
[ "Apache-2.0" ]
null
null
null
cusp/cusp_stage2.py
olsonjonny/cusp_cirq_demo
f7236d93018d4c7d7eb177dba3188d9c1fa1cffe
[ "Apache-2.0" ]
null
null
null
"""Routines for Stage Two of CUSP: Training the Quantum Autoencoder.""" import numpy as np from multiprocessing import Pool from cirq import Circuit, MeasurementGate, ParamResolver from cirq.ops import * from cirq.google import ExpZGate, XmonQubit, XmonSimulator from cirq.circuits import InsertStrategy from cirq.cont...
31.865116
100
0.608816
import numpy as np from multiprocessing import Pool from cirq import Circuit, MeasurementGate, ParamResolver from cirq.ops import * from cirq.google import ExpZGate, XmonQubit, XmonSimulator from cirq.circuits import InsertStrategy from cirq.contrib.jobs.job import Job from cirq.contrib.jobs.depolarizer_channel impor...
true
true