hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f715d167d46ffec6d0102269f517067c5bcb0733
821
py
Python
ch08_dash_standard_components/table_handmade_stylecell.py
Ethan0621/plotly-dash-dev
abe478824db1ee511a2d92f88e5dad49f5d6e27e
[ "MIT" ]
21
2020-10-02T08:17:33.000Z
2022-03-22T06:10:17.000Z
ch08_dash_standard_components/table_handmade_stylecell.py
Ethan0621/plotly-dash-dev
abe478824db1ee511a2d92f88e5dad49f5d6e27e
[ "MIT" ]
4
2019-07-18T04:43:31.000Z
2021-10-31T10:30:25.000Z
ch08_dash_standard_components/table_handmade_stylecell.py
Ethan0621/plotly-dash-dev
abe478824db1ee511a2d92f88e5dad49f5d6e27e
[ "MIT" ]
12
2019-07-23T05:36:57.000Z
2021-07-11T08:57:47.000Z
import dash import dash_table app = dash.Dash(__name__) app.layout = dash_table.DataTable( fill_width=False, columns=[ {"name": "number", "id": "number"}, {"name": "region", "id": "area"}, {"name": "tsuyu-iri", "id": "tsuyu-iri"}, ], data=[ {"number": 0, "area": "okinaw...
31.576923
69
0.527406
import dash import dash_table app = dash.Dash(__name__) app.layout = dash_table.DataTable( fill_width=False, columns=[ {"name": "number", "id": "number"}, {"name": "region", "id": "area"}, {"name": "tsuyu-iri", "id": "tsuyu-iri"}, ], data=[ {"number": 0, "area": "okinaw...
true
true
f715d1f15c0f57ec6888a0eaa987c5954b2e0137
12,603
py
Python
ForgeActivity/forgeactivity/main.py
isabella232/allura
04f14f15a9a9364e18c61f68acdaa241a470186b
[ "Apache-2.0" ]
113
2015-03-25T10:33:37.000Z
2022-02-16T20:55:06.000Z
ForgeActivity/forgeactivity/main.py
apache/allura
6184203235ac6f83c943fae7fd3fef54678f9ed7
[ "Apache-2.0" ]
4
2017-08-04T16:19:07.000Z
2020-06-08T19:01:33.000Z
ForgeActivity/forgeactivity/main.py
isabella232/allura
04f14f15a9a9364e18c61f68acdaa241a470186b
[ "Apache-2.0" ]
36
2015-08-14T16:27:39.000Z
2022-02-16T20:54:35.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
38.42378
111
0.611521
from __future__ import unicode_literals from __future__ import absolute_import import logging import calendar from datetime import timedelta from itertools import islice from bson import ObjectId from ming.orm import session from tg import tmpl_context as c, app_globals as g from tg import request, re...
true
true
f715d278f72818778ed7a4eac29242b89126d982
1,827
py
Python
setup/authorization.py
LenoxFro/spotify-save-discover-weekly
1fecd101ad21a96dbb8fef6b402358386e0e5687
[ "MIT" ]
8
2021-03-31T22:05:56.000Z
2022-01-01T22:42:59.000Z
setup/authorization.py
LenoxFro/spotify-save-discover-weekly
1fecd101ad21a96dbb8fef6b402358386e0e5687
[ "MIT" ]
null
null
null
setup/authorization.py
LenoxFro/spotify-save-discover-weekly
1fecd101ad21a96dbb8fef6b402358386e0e5687
[ "MIT" ]
10
2021-03-31T22:11:58.000Z
2022-03-31T10:55:36.000Z
import urllib.parse from urllib.parse import parse_qs from dotenv import load_dotenv, find_dotenv import requests import base64 import os load_dotenv(find_dotenv()) CLIENT_ID = os.environ.get("CLIENT_ID") CLIENT_SECRET = os.environ.get("CLIENT_SECRET") REDIRECT_URI = os.environ.get("REDIRECT_URI") OAUTH_AUTHORIZE_URL...
34.471698
124
0.712644
import urllib.parse from urllib.parse import parse_qs from dotenv import load_dotenv, find_dotenv import requests import base64 import os load_dotenv(find_dotenv()) CLIENT_ID = os.environ.get("CLIENT_ID") CLIENT_SECRET = os.environ.get("CLIENT_SECRET") REDIRECT_URI = os.environ.get("REDIRECT_URI") OAUTH_AUTHORIZE_URL...
true
true
f715d41a7338077da2b9062cb81f2988564db3d0
4,328
py
Python
gouda/bot.py
fxcqz/gouda3
079bcb52f6357dc7704ec845d916f961a18d59cd
[ "MIT" ]
null
null
null
gouda/bot.py
fxcqz/gouda3
079bcb52f6357dc7704ec845d916f961a18d59cd
[ "MIT" ]
10
2016-03-22T11:52:19.000Z
2016-03-27T16:19:06.000Z
gouda/bot.py
fxcqz/gouda3
079bcb52f6357dc7704ec845d916f961a18d59cd
[ "MIT" ]
null
null
null
from collections import OrderedDict import importlib from peewee import SqliteDatabase from .settings import Settings DATABASE = SqliteDatabase("gouda.db") class Gouda(object): def __init__(self): self.settings = Settings("config/config.json") self.name = self.settings.core['nick'] # use...
37.634783
94
0.501848
from collections import OrderedDict import importlib from peewee import SqliteDatabase from .settings import Settings DATABASE = SqliteDatabase("gouda.db") class Gouda(object): def __init__(self): self.settings = Settings("config/config.json") self.name = self.settings.core['nick'] ...
true
true
f715d44ead41064419d591910c9d8e9251cb95b1
4,635
py
Python
3 experiments_confidence/batch/e2 (experiment and chance scores) (cpj).py
nmningmei/metacognition
734082e247cc7fc9d277563e2676e10692617a3f
[ "MIT" ]
3
2019-07-09T15:37:46.000Z
2019-07-17T16:28:02.000Z
3 experiments_confidence/batch/e2 (experiment and chance scores) (cpj).py
nmningmei/metacognition
734082e247cc7fc9d277563e2676e10692617a3f
[ "MIT" ]
null
null
null
3 experiments_confidence/batch/e2 (experiment and chance scores) (cpj).py
nmningmei/metacognition
734082e247cc7fc9d277563e2676e10692617a3f
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Nov 12 16:07:58 2018 @author: nmei in exp2 (e2) there were 3 possible awareness ratings ( (e.g. 1- no experience, 2 brief glimpse 3 almost clear or clear perception) BUT if can make a binary classification by focussing on 1 and 2 which are the majority...
31.965517
159
0.408846
if __name__ == '__main__': import os import pandas as pd import numpy as np import utils dir_saving = 'results_e2' if not os.path.exists(dir_saving): os.mkdir(dir_saving) try: df1 = pd.read_csv('e2.csv').iloc[:,1:] except: df1 = p...
true
true
f715d5acbe3a069259390dee428b7666dca26c08
9,706
py
Python
src/intermediate_representation/sem_utils.py
ckosten/ValueNet4SPARQL
de320a2f0e1a4c5a6c0e5cc79057dda9901046e8
[ "Apache-2.0" ]
null
null
null
src/intermediate_representation/sem_utils.py
ckosten/ValueNet4SPARQL
de320a2f0e1a4c5a6c0e5cc79057dda9901046e8
[ "Apache-2.0" ]
null
null
null
src/intermediate_representation/sem_utils.py
ckosten/ValueNet4SPARQL
de320a2f0e1a4c5a6c0e5cc79057dda9901046e8
[ "Apache-2.0" ]
1
2021-09-23T13:02:45.000Z
2021-09-23T13:02:45.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # -*- coding: utf-8 -*- """ # @Time : 2019/5/27 # @Author : Jiaqi&Zecheng # @File : sem_utils.py # @Software: PyCharm """ import os import json import re as regex import spacy from nltk.stem import WordNetLemmatizer wordnet_lemmatizer =...
46.888889
117
0.474861
import os import json import re as regex import spacy from nltk.stem import WordNetLemmatizer wordnet_lemmatizer = WordNetLemmatizer() nlp = spacy.load('en_core_web_sm', disable=['parser', 'ner']) def partial_match(query, table_name): query = [token.lemma_ for token in nlp(query)] table_name = [nlp(tok...
true
true
f715d67eef0245ded35fcb508560db29166544bc
518
py
Python
components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py
fbucafusco/esp-idf
c2ccc383dae2a47c2c2dc8c7ad78175a3fd11361
[ "Apache-2.0" ]
null
null
null
components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py
fbucafusco/esp-idf
c2ccc383dae2a47c2c2dc8c7ad78175a3fd11361
[ "Apache-2.0" ]
null
null
null
components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py
fbucafusco/esp-idf
c2ccc383dae2a47c2c2dc8c7ad78175a3fd11361
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import pytest from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s2 @pytest.mark.esp32c3 @pytest.mark.esp32s3 @pytest.mark.generic @pytest.mark.parametrize( 'config', [ 'iram_saf...
20.72
66
0.696911
import pytest from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s2 @pytest.mark.esp32c3 @pytest.mark.esp32s3 @pytest.mark.generic @pytest.mark.parametrize( 'config', [ 'iram_safe', 'release', ], indirect=True, ) def test_i2s(dut: Dut) -> None: dut.expect_exact...
true
true
f715d6d5b4734d75244b4bcd84df7da47ab5fd20
5,939
py
Python
coresupdate.py
danitxu79/Retroarch_Cores_Update_from_Retropie_Menu
2841b12b0d29b08e71e0ddbbd148e5cf84cad3ce
[ "MIT" ]
null
null
null
coresupdate.py
danitxu79/Retroarch_Cores_Update_from_Retropie_Menu
2841b12b0d29b08e71e0ddbbd148e5cf84cad3ce
[ "MIT" ]
null
null
null
coresupdate.py
danitxu79/Retroarch_Cores_Update_from_Retropie_Menu
2841b12b0d29b08e71e0ddbbd148e5cf84cad3ce
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # user's retroarch configuration file retroconfig = '/opt/retropie/configs/all/retroarch.cfg' # current buildbot url retrourl = 'https://buildbot.libretro.com' import argparse import configparser import os import os.path as pth import platform import shutil import sys import tempfile import ti...
30.613402
135
0.602795
retroconfig = '/opt/retropie/configs/all/retroarch.cfg' # current buildbot url retrourl = 'https://buildbot.libretro.com' import argparse import configparser import os import os.path as pth import platform import shutil import sys import tempfile import time import urllib.request import zipfile # parse arguments ...
true
true
f715d7a31a5df246928567994bae099da3cac6a5
7,559
py
Python
webStorm-APICloud/python_tools/Lib/SimpleHTTPServer.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
81
2017-03-13T08:24:01.000Z
2021-04-02T09:48:38.000Z
Macros/Python/SimpleHTTPServer.py
rec/DMXIS
540baa59df6f4ae39990e5888f90b95caa362279
[ "Artistic-2.0" ]
6
2017-04-30T08:36:55.000Z
2017-09-22T01:37:28.000Z
Macros/Python/SimpleHTTPServer.py
rec/DMXIS
540baa59df6f4ae39990e5888f90b95caa362279
[ "Artistic-2.0" ]
41
2017-03-18T14:11:58.000Z
2021-04-14T05:06:09.000Z
"""Simple HTTP Server. This module builds on BaseHTTPServer by implementing the standard GET and HEAD requests in a fairly straightforward manner. """ __version__ = "0.6" __all__ = ["SimpleHTTPRequestHandler"] import os import posixpath import BaseHTTPServer import urllib import cgi import shutil...
34.515982
83
0.582484
__version__ = "0.6" __all__ = ["SimpleHTTPRequestHandler"] import os import posixpath import BaseHTTPServer import urllib import cgi import shutil import mimetypes try: from cStringIO import StringIO except ImportError: from StringIO import StringIO class SimpleHTTPRequestHandler(BaseHT...
true
true
f715d813ac5ceeef5aa1cbcaa572ba4bc2637be9
182
py
Python
reduction/test/plot_algol_h_alpha_line.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
reduction/test/plot_algol_h_alpha_line.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
reduction/test/plot_algol_h_alpha_line.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
import matplotlib.pyplot as plt from reduction.algol_h_alpha_line_model import AlgolHAlphaModel if __name__ == '__main__': AlgolHAlphaModel().plot(plt.axes()) plt.show()
18.2
63
0.758242
import matplotlib.pyplot as plt from reduction.algol_h_alpha_line_model import AlgolHAlphaModel if __name__ == '__main__': AlgolHAlphaModel().plot(plt.axes()) plt.show()
true
true
f715d8a0e2bc4f9037250784399021a44f9b5b67
2,019
py
Python
h2o-py/tests/testdir_algos/glm/pyunit_link_correct_default_largeGLM.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_algos/glm/pyunit_link_correct_default_largeGLM.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_algos/glm/pyunit_link_correct_default_largeGLM.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
1
2020-12-18T19:20:02.000Z
2020-12-18T19:20:02.000Z
import sys sys.path.insert(1, "../../../") import h2o def link_correct_default(ip,port): # Connect to h2o h2o.init(ip,port) print("Reading in original prostate data.") h2o_data = h2o.upload_file(path=h2o.locate("smalldata/prostate/prostate.csv.zip")) print("Compare models with link unspecified and canonical lin...
51.769231
113
0.752353
import sys sys.path.insert(1, "../../../") import h2o def link_correct_default(ip,port): h2o.init(ip,port) print("Reading in original prostate data.") h2o_data = h2o.upload_file(path=h2o.locate("smalldata/prostate/prostate.csv.zip")) print("Compare models with link unspecified and canonical link specified.") ...
true
true
f715d969b2e39092279936585118b9960ebb2227
204
py
Python
sigbox/__init__.py
ok65/sigbox
eacec88ccdc3929e19d92d54ef3c52dda54e5856
[ "WTFPL" ]
null
null
null
sigbox/__init__.py
ok65/sigbox
eacec88ccdc3929e19d92d54ef3c52dda54e5856
[ "WTFPL" ]
null
null
null
sigbox/__init__.py
ok65/sigbox
eacec88ccdc3929e19d92d54ef3c52dda54e5856
[ "WTFPL" ]
null
null
null
from sigbox.signal_decorator import SignalDecorator from sigbox.signal_box import SignalBox, SignalBoxClass from sigbox.sigbox import SigBox __all__ = [SignalBox, SignalDecorator, SignalBoxClass, SigBox]
40.8
62
0.857843
from sigbox.signal_decorator import SignalDecorator from sigbox.signal_box import SignalBox, SignalBoxClass from sigbox.sigbox import SigBox __all__ = [SignalBox, SignalDecorator, SignalBoxClass, SigBox]
true
true
f715d9a77e0c016a8984da9e96656403d08f49b6
3,270
py
Python
aliyun-python-sdk-cbn/aliyunsdkcbn/request/v20170912/UpdateTransitRouterVbrAttachmentAttributeRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-cbn/aliyunsdkcbn/request/v20170912/UpdateTransitRouterVbrAttachmentAttributeRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-cbn/aliyunsdkcbn/request/v20170912/UpdateTransitRouterVbrAttachmentAttributeRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.023256
100
0.795107
from aliyunsdkcore.request import RpcRequest from aliyunsdkcbn.endpoint import endpoint_data class UpdateTransitRouterVbrAttachmentAttributeRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Cbn', '2017-09-12', 'UpdateTransitRouterVbrAttachmentAttribute','cbn') self.set_metho...
true
true
f715d9aaf4f384ba12cc7069add8806d2f40e71b
552
py
Python
446.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
446.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
446.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
"""446. Arithmetic Slices II - Subsequence""" class Solution(object): def numberOfArithmeticSlices(self, A): """ :type A: List[int] :rtype: int """ dp = [collections.defaultdict(int) for _ in range(len(A))] total = 0 for i in range(len(A)): for j ...
14.153846
66
0.405797
class Solution(object): def numberOfArithmeticSlices(self, A): dp = [collections.defaultdict(int) for _ in range(len(A))] total = 0 for i in range(len(A)): for j in range(i): k = A[i] - A[j] dp[i][k] += 1 if k in dp[j]: ...
true
true
f715d9f86be99e54b40e4f20ec32ccf74e3c5ae7
1,497
py
Python
ci/fireci/fireci/gradle.py
Elke26/firebase-android-sdk
47d41b9dc17cd95a7799f672f5cc14f1747642ec
[ "Apache-2.0" ]
1
2021-01-30T19:52:32.000Z
2021-01-30T19:52:32.000Z
ci/fireci/fireci/gradle.py
Elke26/firebase-android-sdk
47d41b9dc17cd95a7799f672f5cc14f1747642ec
[ "Apache-2.0" ]
1
2019-03-01T19:54:34.000Z
2019-03-01T19:58:03.000Z
ci/fireci/fireci/gradle.py
samtstern/firebase-android-sdk
ef399052f99019feb294746447e2bd8a5a6e81a4
[ "Apache-2.0" ]
1
2021-01-02T20:23:09.000Z
2021-01-02T20:23:09.000Z
# Copyright 2018 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, ...
29.94
87
0.716099
import logging import os import subprocess import sys from . import stats _logger = logging.getLogger('fireci.gradle') ADB_INSTALL_TIMEOUT = '5' def P(name, value): return '-P{}={}'.format(name, value) @stats.measure_call('gradle') def run(*args, gradle_opts='', workdir=None): new_env = dict(os...
true
true
f715da382fe2b6fe6c5bc405301456843f05fbef
34,975
py
Python
cmf/models/cmfsm.py
lidongyv/Explicit-Context-Mapping-for-Stereo-Matching
9b2e63982daf5629045de0bf0694d8ccb111b2f1
[ "Apache-2.0" ]
1
2020-12-31T02:40:49.000Z
2020-12-31T02:40:49.000Z
cmf/models/cmfsm.py
lidongyv/Explicit-Context-Mapping-for-Stereo-Matching
9b2e63982daf5629045de0bf0694d8ccb111b2f1
[ "Apache-2.0" ]
null
null
null
cmf/models/cmfsm.py
lidongyv/Explicit-Context-Mapping-for-Stereo-Matching
9b2e63982daf5629045de0bf0694d8ccb111b2f1
[ "Apache-2.0" ]
1
2020-12-31T02:40:49.000Z
2020-12-31T02:40:49.000Z
# -*- coding: utf-8 -*- # @Author: yulidong # @Date: 2018-07-17 10:44:43 # @Last Modified by: yulidong # @Last Modified time: 2019-03-01 14:12:35 # -*- coding: utf-8 -*- # @Author: lidong # @Date: 2018-03-20 18:01:52 # @Last Modified by: yulidong # @Last Modified time: 2018-07-16 22:16:14 import time import tor...
44.897304
185
0.587277
import time import torch import numpy as np import torch.nn as nn import math from math import ceil from torch.autograd import Variable from torch.nn.functional import cosine_similarity as cosine_s from cmf import caffe_pb2 from cmf.models.utils import * rsn_specs = { 'scene': { 'n_classes':...
true
true
f715da8614fe069c6b1f18f8b31418a56d1297bc
2,432
py
Python
kornia/augmentation/_3d/base.py
dichen-cd/kornia
dcd1c5e17cf4d2ae2db1f438c53245bba0afd93f
[ "ECL-2.0", "Apache-2.0" ]
1
2022-02-10T02:02:06.000Z
2022-02-10T02:02:06.000Z
kornia/augmentation/_3d/base.py
dichen-cd/kornia
dcd1c5e17cf4d2ae2db1f438c53245bba0afd93f
[ "ECL-2.0", "Apache-2.0" ]
14
2021-09-26T11:07:56.000Z
2022-03-20T11:11:15.000Z
kornia/augmentation/_3d/base.py
dichen-cd/kornia
dcd1c5e17cf4d2ae2db1f438c53245bba0afd93f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import torch import kornia from kornia.augmentation.base import TensorWithTransformMat, _AugmentationBase from kornia.augmentation.utils import _transform_input3d, _validate_input_dtype class AugmentationBase3D(_AugmentationBase): r"""AugmentationBase3D base class for customized augmentation implementations. ...
50.666667
116
0.665707
import torch import kornia from kornia.augmentation.base import TensorWithTransformMat, _AugmentationBase from kornia.augmentation.utils import _transform_input3d, _validate_input_dtype class AugmentationBase3D(_AugmentationBase): def __check_batching__(self, input: TensorWithTransformMat): if isinstanc...
true
true
f715dbd84fff6809be6f2c5c95ceb8898c2ac604
2,563
gyp
Python
binding.gyp
sumeetkakkar/node-krb5
3c13021b3fcd3be239d3c731455154910f4d03b6
[ "BSD-3-Clause" ]
null
null
null
binding.gyp
sumeetkakkar/node-krb5
3c13021b3fcd3be239d3c731455154910f4d03b6
[ "BSD-3-Clause" ]
null
null
null
binding.gyp
sumeetkakkar/node-krb5
3c13021b3fcd3be239d3c731455154910f4d03b6
[ "BSD-3-Clause" ]
1
2019-08-29T18:45:47.000Z
2019-08-29T18:45:47.000Z
{ "targets": [{ "target_name": "krb5", "sources": [ "./src/module.cc", "./src/krb5_bind.cc", "./src/gss_bind.cc", "./src/base64.cc" ], 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exceptions'], 'include_dirs': ["...
36.614286
98
0.285603
{ "targets": [{ "target_name": "krb5", "sources": [ "./src/module.cc", "./src/krb5_bind.cc", "./src/gss_bind.cc", "./src/base64.cc" ], 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exceptions'], 'include_dirs': ["...
true
true
f715dc50ff4886ddbbcf5f5817f1d0e1a2b60106
461
py
Python
jdxapi/routes/__init__.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
null
null
null
jdxapi/routes/__init__.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
9
2019-12-26T17:39:58.000Z
2022-01-13T01:59:49.000Z
jdxapi/routes/__init__.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
null
null
null
from jdxapi.routes.health import * from jdxapi.routes.upload_job_description_file import * from jdxapi.routes.upload_job_description_context import * from jdxapi.routes.framework_recommendations import * from jdxapi.routes.framework_selections import * from jdxapi.routes.generate_job_schema_plus import * from jdxapi.ro...
41.909091
58
0.848156
from jdxapi.routes.health import * from jdxapi.routes.upload_job_description_file import * from jdxapi.routes.upload_job_description_context import * from jdxapi.routes.framework_recommendations import * from jdxapi.routes.framework_selections import * from jdxapi.routes.generate_job_schema_plus import * from jdxapi.ro...
true
true
f715deb9771158a547fcbbc301e8725ecd0fded2
3,896
py
Python
Python/PyParsing/node_utils.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
115
2015-03-23T13:34:42.000Z
2022-03-21T00:27:21.000Z
Python/PyParsing/node_utils.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
56
2015-02-25T15:04:26.000Z
2022-01-03T07:42:48.000Z
Python/PyParsing/node_utils.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
59
2015-11-26T11:44:51.000Z
2022-03-21T00:27:22.000Z
#!/usr/bin/env python '''module containing various functions for working with trees and nodes''' from node_parser import NodeParser import unittest def depth(node): '''compute the depth of the given tree''' if node is None: return 0 elif node.is_leaf(): return 1 else: return 1...
28.647059
74
0.566992
from node_parser import NodeParser import unittest def depth(node): if node is None: return 0 elif node.is_leaf(): return 1 else: return 1 + max(list(map(depth, node.children()))) def depth_first_iterator(node): if node is not None: node_stack = [(node, -1)] ...
true
true
f715df136e0602e32db3dc820ce6e68ce0ad5f80
1,342
py
Python
LeetCodeSolver/pythonSolutions/from1to100/Solution74.py
ZeromaXHe/Learning-Platform
ec75c2dbd472a568d1cd482450cc471295659c62
[ "Apache-2.0" ]
null
null
null
LeetCodeSolver/pythonSolutions/from1to100/Solution74.py
ZeromaXHe/Learning-Platform
ec75c2dbd472a568d1cd482450cc471295659c62
[ "Apache-2.0" ]
null
null
null
LeetCodeSolver/pythonSolutions/from1to100/Solution74.py
ZeromaXHe/Learning-Platform
ec75c2dbd472a568d1cd482450cc471295659c62
[ "Apache-2.0" ]
null
null
null
from typing import List class Solution: """ 74.搜索二维矩阵 | 难度:中等 | 标签:数组、二分查找 编写一个高效的算法来判断 m x n 矩阵中,是否存在一个目标值。该矩阵具有如下特性: <p> 每行中的整数从左到右按升序排列。 每行的第一个整数大于前一行的最后一个整数。 <p> 示例 1: 输入:matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3 输出:true <p> 示例 2: 输入:matrix = ...
25.807692
73
0.508197
from typing import List class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: x = 0 y = len(matrix[0]) - 1 while x < len(matrix) and y >= 0: if matrix[x][y] == target: return True elif matri...
true
true
f715e0177b8228f28f6e785e8abfae78e9cd6435
10,435
py
Python
google/ads/googleads/v9/services/services/customer_customizer_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v9/services/services/customer_customizer_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v9/services/services/customer_customizer_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
41.74
112
0.628079
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple from google.api_core import grpc_helpers from google.api_core import gapic_v1 import google.auth from google.auth import credentials as ga_credentials from google.auth.transport.grpc import SslCredentials import grpc ...
true
true
f715e02ee65c789c8ebe66b9da527060e685ba50
475
py
Python
examples/sw.py
khirotaka/testbed
e32384a3267d5282fb9f2df22597dfa7fb9aa17d
[ "MIT" ]
null
null
null
examples/sw.py
khirotaka/testbed
e32384a3267d5282fb9f2df22597dfa7fb9aa17d
[ "MIT" ]
2
2020-08-09T06:26:51.000Z
2020-08-10T01:08:28.000Z
examples/sw.py
khirotaka/testbed
e32384a3267d5282fb9f2df22597dfa7fb9aa17d
[ "MIT" ]
null
null
null
import time import numpy as np from testbed._rust import sliding_window x = np.random.randn(5000, 5) s = time.time() rustout = sliding_window(x, 100, 1) print("=" * 50) print("Rust Speed: ", time.time() - s) print(rustout.shape) def sw(array, ws, over): sl = len(array) return [array[i:i+ws] for i in ran...
17.592593
57
0.633684
import time import numpy as np from testbed._rust import sliding_window x = np.random.randn(5000, 5) s = time.time() rustout = sliding_window(x, 100, 1) print("=" * 50) print("Rust Speed: ", time.time() - s) print(rustout.shape) def sw(array, ws, over): sl = len(array) return [array[i:i+ws] for i in ran...
true
true
f715e0b6071694faa85c51616ffa6eb6433f5b4c
357
py
Python
DMOJ/DMOPC/DMOPC_19_C5P3_Captivating_Construction_Challenge.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
null
null
null
DMOJ/DMOPC/DMOPC_19_C5P3_Captivating_Construction_Challenge.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
1
2021-10-14T18:26:56.000Z
2021-10-14T18:26:56.000Z
DMOJ/DMOPC/DMOPC_19_C5P3_Captivating_Construction_Challenge.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
1
2021-08-06T03:39:55.000Z
2021-08-06T03:39:55.000Z
def gcd(m, n): if n == 0: return m return gcd(n, m%n) ans = 0 H, V = map(int, input().split()) for x in range(H): for y in range(1, V): mx, my = y//gcd(x, y), x//gcd(x, y) xx, yy = mx+x, my+y while xx <= H and yy <= V: ans += (H-xx) * (V-yy) xx +=...
16.227273
43
0.40056
def gcd(m, n): if n == 0: return m return gcd(n, m%n) ans = 0 H, V = map(int, input().split()) for x in range(H): for y in range(1, V): mx, my = y//gcd(x, y), x//gcd(x, y) xx, yy = mx+x, my+y while xx <= H and yy <= V: ans += (H-xx) * (V-yy) xx +=...
true
true
f715e0ba86825ddedbad3acbdb1a48496d9dfaa8
1,368
py
Python
fetch_cast_html.py
nmaswood/tv_scraping
91573df0ca9512ac1744cddc8635f681d8ed596a
[ "Apache-2.0" ]
null
null
null
fetch_cast_html.py
nmaswood/tv_scraping
91573df0ca9512ac1744cddc8635f681d8ed596a
[ "Apache-2.0" ]
null
null
null
fetch_cast_html.py
nmaswood/tv_scraping
91573df0ca9512ac1744cddc8635f681d8ed596a
[ "Apache-2.0" ]
null
null
null
from urllib.request import FancyURLopener from bs4 import BeautifulSoup from random import choice import csv from time import sleep from urllib.parse import quote,unquote import json user_agents = [ 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11', 'Opera/9.25 (Windows NT 5....
31.090909
110
0.646199
from urllib.request import FancyURLopener from bs4 import BeautifulSoup from random import choice import csv from time import sleep from urllib.parse import quote,unquote import json user_agents = [ 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11', 'Opera/9.25 (Windows NT 5....
true
true
f715e119c6f7e84008328d68567e938b4668623f
696
py
Python
informacoes_emails.py
katianaz/GiftHelper
1fbff4e7902c25950a5f50f04f0b2c834842ccbe
[ "MIT" ]
null
null
null
informacoes_emails.py
katianaz/GiftHelper
1fbff4e7902c25950a5f50f04f0b2c834842ccbe
[ "MIT" ]
null
null
null
informacoes_emails.py
katianaz/GiftHelper
1fbff4e7902c25950a5f50f04f0b2c834842ccbe
[ "MIT" ]
1
2021-03-18T22:44:43.000Z
2021-03-18T22:44:43.000Z
import pontuacao_categorias import pandas as pd nomes = [] nomes_presenteados = [] enderecos_emails = [] for p in range(len(pontuacao_categorias.tabela.index)): nomes.append(pontuacao_categorias.tabela['3'][p]) nomes_presenteados.append(pontuacao_categorias.tabela['4'][p]) enderecos_emails.appen...
33.142857
89
0.686782
import pontuacao_categorias import pandas as pd nomes = [] nomes_presenteados = [] enderecos_emails = [] for p in range(len(pontuacao_categorias.tabela.index)): nomes.append(pontuacao_categorias.tabela['3'][p]) nomes_presenteados.append(pontuacao_categorias.tabela['4'][p]) enderecos_emails.appen...
true
true
f715e2b4af325720c565d744e3e3558d6ec968b2
11,243
py
Python
bookworm/annotation/annotation_gui.py
mush42/bookworm
a4bdd89363137a89a1bed1e9e072de4fb55576fd
[ "MIT" ]
18
2019-07-19T22:12:15.000Z
2020-08-26T17:45:19.000Z
bookworm/annotation/annotation_gui.py
mush42/bookworm
a4bdd89363137a89a1bed1e9e072de4fb55576fd
[ "MIT" ]
44
2019-07-15T10:17:00.000Z
2020-07-26T11:22:53.000Z
bookworm/annotation/annotation_gui.py
mush42/bookworm
a4bdd89363137a89a1bed1e9e072de4fb55576fd
[ "MIT" ]
9
2019-09-03T13:13:31.000Z
2020-08-25T13:55:27.000Z
# coding: utf-8 import wx from enum import IntEnum from bookworm import speech from bookworm.gui.settings import SettingsPanel from bookworm.structured_text import TextRange from bookworm.logger import logger from .annotator import Bookmarker, NoteTaker, Quoter from .annotation_dialogs import ( BookmarksViewer, ...
37.228477
88
0.592102
import wx from enum import IntEnum from bookworm import speech from bookworm.gui.settings import SettingsPanel from bookworm.structured_text import TextRange from bookworm.logger import logger from .annotator import Bookmarker, NoteTaker, Quoter from .annotation_dialogs import ( BookmarksViewer, CommentsDialo...
true
true
f715e2db12bbd9d23ff08edf3785830ee8d31ab7
3,291
py
Python
orders/models.py
pmaigutyak/mp-shop
14ea67f71fd91a282d2070414924708214fc6464
[ "0BSD" ]
2
2018-03-14T11:32:36.000Z
2021-09-25T14:31:36.000Z
orders/models.py
pmaigutyak/mp-shop
14ea67f71fd91a282d2070414924708214fc6464
[ "0BSD" ]
null
null
null
orders/models.py
pmaigutyak/mp-shop
14ea67f71fd91a282d2070414924708214fc6464
[ "0BSD" ]
null
null
null
from django.apps import apps from django.db import models from django.conf import settings from django.utils.crypto import get_random_string from django.utils.translation import ugettext_lazy as _ from exchange.models import format_printable_price, MultiCurrencyPrice from delivery.models import DeliveryMethodField f...
25.710938
76
0.673959
from django.apps import apps from django.db import models from django.conf import settings from django.utils.crypto import get_random_string from django.utils.translation import ugettext_lazy as _ from exchange.models import format_printable_price, MultiCurrencyPrice from delivery.models import DeliveryMethodField f...
true
true
f715e307959616301e030cf3bce9da95242c350f
2,917
py
Python
sklearn/linear_model/__init__.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
3
2019-11-18T13:47:42.000Z
2021-08-22T23:37:47.000Z
sklearn/linear_model/__init__.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
12
2021-03-06T23:42:46.000Z
2021-04-04T00:10:42.000Z
sklearn/linear_model/__init__.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
2
2017-06-27T12:40:35.000Z
2021-08-22T23:37:35.000Z
""" The :mod:`sklearn.linear_model` module implements a variety of linear models. """ # See http://scikit-learn.sourceforge.net/modules/sgd.html and # http://scikit-learn.sourceforge.net/modules/linear_model.html for # complete documentation. from ._base import LinearRegression from ._bayes import BayesianRidge, ARDR...
35.573171
78
0.618101
from ._base import LinearRegression from ._bayes import BayesianRidge, ARDRegression from ._least_angle import (Lars, LassoLars, lars_path, lars_path_gram, LarsCV, LassoLarsCV, LassoLarsIC) from ._coordinate_descent import (Lasso, ElasticNet, LassoCV, ElasticNetCV, ...
true
true
f715e36e362ae80301e03af5d3ad4b2ac4a51e76
239
py
Python
examples/pull_inbox_delivery_reports_ex.py
ubidreams/infobip-api-python-client
3e585bf00565627bd7da46a2c8f10b860faaeb8b
[ "Apache-2.0" ]
null
null
null
examples/pull_inbox_delivery_reports_ex.py
ubidreams/infobip-api-python-client
3e585bf00565627bd7da46a2c8f10b860faaeb8b
[ "Apache-2.0" ]
null
null
null
examples/pull_inbox_delivery_reports_ex.py
ubidreams/infobip-api-python-client
3e585bf00565627bd7da46a2c8f10b860faaeb8b
[ "Apache-2.0" ]
null
null
null
from infobip.clients import get_received_messages from __init__ import configuration get_delivery_reports_client = get_received_messages(configuration) response = get_delivery_reports_client.execute({"limit": 1}) print(unicode(response))
34.142857
66
0.857741
from infobip.clients import get_received_messages from __init__ import configuration get_delivery_reports_client = get_received_messages(configuration) response = get_delivery_reports_client.execute({"limit": 1}) print(unicode(response))
true
true
f715e3a8e11c572f5bb1831dd2bd65643e2aa549
1,558
py
Python
tests/test_image.py
juliamarc/mal-tier-list-bbcode-gen
3b14d1982883bea6c0b5cf3ba1de5360c2d71abc
[ "MIT" ]
null
null
null
tests/test_image.py
juliamarc/mal-tier-list-bbcode-gen
3b14d1982883bea6c0b5cf3ba1de5360c2d71abc
[ "MIT" ]
null
null
null
tests/test_image.py
juliamarc/mal-tier-list-bbcode-gen
3b14d1982883bea6c0b5cf3ba1de5360c2d71abc
[ "MIT" ]
null
null
null
import pytest import mal_tier_list_bbcode_gen.exceptions as exceptions from mal_tier_list_bbcode_gen.image import Image def test_source_direct_url(): image_url = 'example.com/test.png' image = Image('direct URL', image_url) assert image.image_url == image_url def test_source_google_drive_file_id(): ...
30.54902
70
0.70154
import pytest import mal_tier_list_bbcode_gen.exceptions as exceptions from mal_tier_list_bbcode_gen.image import Image def test_source_direct_url(): image_url = 'example.com/test.png' image = Image('direct URL', image_url) assert image.image_url == image_url def test_source_google_drive_file_id(): ...
true
true
f715e48b813407c0bd9d7f1f42d77633e8197d1d
5,342
py
Python
isi_sdk/models/mapping_identity_target_create_params.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
isi_sdk/models/mapping_identity_target_create_params.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
isi_sdk/models/mapping_identity_target_create_params.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 3 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_0.models.group_mem...
29.677778
116
0.586484
import pprint import re import six from isi_sdk_8_0.models.group_member import GroupMember class MappingIdentityTargetCreateParams(object): swagger_types = { 'on_disk': 'bool', 'target': 'GroupMember', 'type': 'str' } attribute_map = { 'on_disk': 'on_disk', ...
true
true
f715e4b9d03d838a2a6581b960aa71928211ff89
855
py
Python
slrp/expressions.py
thomasmatecki/parsley
0c51e9c37759fbc1c723519619952248c83e4642
[ "MIT" ]
null
null
null
slrp/expressions.py
thomasmatecki/parsley
0c51e9c37759fbc1c723519619952248c83e4642
[ "MIT" ]
2
2020-03-24T18:30:15.000Z
2020-03-31T10:57:37.000Z
slrp/expressions.py
thomasmatecki/parsley
0c51e9c37759fbc1c723519619952248c83e4642
[ "MIT" ]
null
null
null
""" Expression for matching. """ import re from abc import ABC from typing import Callable, Text, Tuple from slrp.combos import Combinable class RegExpr(Combinable): """ Regular expression matcher. """ def __init__(self, pattern): self.pattern = pattern def match(self, expr): _m...
21.923077
88
0.615205
import re from abc import ABC from typing import Callable, Text, Tuple from slrp.combos import Combinable class RegExpr(Combinable): def __init__(self, pattern): self.pattern = pattern def match(self, expr): _match = re.match(self.pattern, expr) if _match: fr, to = _matc...
true
true
f715e4c13f0a448d661aadd39ef081eb09b73466
410
py
Python
examples/example_sparsifier_graph.py
tfgraph/tfgraph
19ae968b3060275c631dc601757646abaf1f58a1
[ "Apache-2.0" ]
4
2017-07-23T13:48:35.000Z
2021-12-03T18:11:50.000Z
examples/example_sparsifier_graph.py
tfgraph/tfgraph
19ae968b3060275c631dc601757646abaf1f58a1
[ "Apache-2.0" ]
21
2017-07-23T13:15:20.000Z
2020-09-28T02:13:11.000Z
examples/example_sparsifier_graph.py
tfgraph/tfgraph
19ae968b3060275c631dc601757646abaf1f58a1
[ "Apache-2.0" ]
1
2017-07-28T10:28:04.000Z
2017-07-28T10:28:04.000Z
#!/usr/bin/python3 import tensorflow as tf import tfgraph def main(): with tf.Session() as sess: g: tfgraph.Graph = tfgraph.GraphConstructor.unweighted_random(sess, "G", 10, 85) g_sparse: tfgraph.Graph = tfgraph.GraphConstructor.as_sparsifier(sess, g, 0.75) print(g) print(g.m) print(g_sparse)...
17.826087
84
0.673171
import tensorflow as tf import tfgraph def main(): with tf.Session() as sess: g: tfgraph.Graph = tfgraph.GraphConstructor.unweighted_random(sess, "G", 10, 85) g_sparse: tfgraph.Graph = tfgraph.GraphConstructor.as_sparsifier(sess, g, 0.75) print(g) print(g.m) print(g_sparse) print(g_spars...
true
true
f715e4d2616e966f17915d11d03e9988858f4587
1,195
py
Python
shanapy/test/test_interpolater.py
ZhiyLiu/shanapy
cbcdd87f4aaa1102d5b93c9488fbcee6e28da2a6
[ "MIT" ]
3
2021-11-21T23:14:50.000Z
2022-02-12T04:32:52.000Z
shanapy/test/test_interpolater.py
ZhiyLiu/shanapy
cbcdd87f4aaa1102d5b93c9488fbcee6e28da2a6
[ "MIT" ]
null
null
null
shanapy/test/test_interpolater.py
ZhiyLiu/shanapy
cbcdd87f4aaa1102d5b93c9488fbcee6e28da2a6
[ "MIT" ]
null
null
null
import vtk from shanapy.models.sreps import Initializer, Interpolater import pyvista as pv ## Read the input surface mesh (produced by SPHARM-PDM) reader = vtk.vtkPolyDataReader() reader.SetFileName('data/example_hippocampus.vtk') reader.Update() input_mesh = reader.GetOutput() ## Initialize an s-rep for the input me...
33.194444
92
0.787448
import vtk from shanapy.models.sreps import Initializer, Interpolater import pyvista as pv data/example_hippocampus.vtk') reader.Update() input_mesh = reader.GetOutput() ializer.fit(input_mesh) num_crest_pt = 24 num_samples_outward = 3 interpolate_level=3) interp_spokes, up_spokes = interp.interpolate(srep, num_cre...
true
true
f715e52c53f3d913beec9dd47456ed969e6769b5
2,052
py
Python
flywheel_cli/importers/slurp_scan.py
amitvakula/python-cli
0bdbd39c40cdb3fe4dbd3b0cb38abbce94242dac
[ "MIT" ]
null
null
null
flywheel_cli/importers/slurp_scan.py
amitvakula/python-cli
0bdbd39c40cdb3fe4dbd3b0cb38abbce94242dac
[ "MIT" ]
null
null
null
flywheel_cli/importers/slurp_scan.py
amitvakula/python-cli
0bdbd39c40cdb3fe4dbd3b0cb38abbce94242dac
[ "MIT" ]
null
null
null
"""Provides a scanner that will group files together under a common prefix""" import copy from .abstract_scanner import AbstractScanner class SlurpScanner(AbstractScanner): """SlurpScanner groups files together by a common prefix. This works by looking at the first slash (or if there is no slash, the first ...
33.096774
96
0.634016
import copy from .abstract_scanner import AbstractScanner class SlurpScanner(AbstractScanner): def __init__(self, config): super(SlurpScanner, self).__init__(config) def discover(self, walker, context, container_factory, path_prefix=None, audit_log=None): files = list(sorted(walker....
true
true
f715e6fb9ac52b17d3d805190df8d63c65156cf6
5,008
py
Python
contrib/seeds/generate-seeds.py
BakedInside/beanscore
daa9b2ddbfd3305881749bda7f32146738154260
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
BakedInside/beanscore
daa9b2ddbfd3305881749bda7f32146738154260
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
BakedInside/beanscore
daa9b2ddbfd3305881749bda7f32146738154260
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2021 The Beans Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the di...
29.988024
91
0.568091
from base64 import b32decode from enum import Enum import struct import sys import os import re class BIP155Network(Enum): IPV4 = 1 IPV6 = 2 TORV2 = 3 TORV3 = 4 I2P = 5 CJDNS = 6 def name_to_bip155(addr): if addr.endswith('.onion'): vchAddr = b32decode(addr[0:-6], True) ...
true
true
f715e76b2533da62db85b11847c06082ebf9c1c8
565
py
Python
PDF_Copy_Paster/scripts/pdfcp.py
cooperbeaman/cogs18pdfcpfinalproject
ade7cf46534e8817b327f1c35ebf617cc977d872
[ "CNRI-Python", "Adobe-2006", "Adobe-Glyph" ]
null
null
null
PDF_Copy_Paster/scripts/pdfcp.py
cooperbeaman/cogs18pdfcpfinalproject
ade7cf46534e8817b327f1c35ebf617cc977d872
[ "CNRI-Python", "Adobe-2006", "Adobe-Glyph" ]
null
null
null
PDF_Copy_Paster/scripts/pdfcp.py
cooperbeaman/cogs18pdfcpfinalproject
ade7cf46534e8817b327f1c35ebf617cc977d872
[ "CNRI-Python", "Adobe-2006", "Adobe-Glyph" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[3]: """Script runs pdf copy paste tool through command prompt. Automatically monitors and updates clipboard contents. """ # Allows importing functions from functions.py in my_module folder import sys sys.path.append('../') # Imports functions from my_module folder from ...
25.681818
72
0.762832
import sys sys.path.append('../') from my_module.functions import * run()
true
true
f715e9d439ec161b580dbb638b66c76fe3d21b3d
2,166
py
Python
tests/mantid_data_helper.py
scipp/scipp-ci-mantid
29164f633096c4eeb0a8579b72165c96315113f8
[ "Apache-2.0" ]
null
null
null
tests/mantid_data_helper.py
scipp/scipp-ci-mantid
29164f633096c4eeb0a8579b72165c96315113f8
[ "Apache-2.0" ]
null
null
null
tests/mantid_data_helper.py
scipp/scipp-ci-mantid
29164f633096c4eeb0a8579b72165c96315113f8
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: GPL-3.0-or-later # Copyright (c) 2019 Scipp contributors (https://github.com/scipp) # @author Dimitar Tasev import os import hashlib import sys import subprocess as sp def download_file(source, destination): command = "wget -O {} {}".format(destination, source) status = sp.run(comma...
35.508197
78
0.5988
import os import hashlib import sys import subprocess as sp def download_file(source, destination): command = "wget -O {} {}".format(destination, source) status = sp.run(command, shell=True).returncode if status != 0: raise RuntimeError("Can't load {} to {}.".format(source, destination)) class...
true
true
f715eb646ed9af649d8f5a29c1d0d68ce7a3e4b3
571
py
Python
setup.py
TomKealy/causal-forest
04f3aeb1ac5547a78b96eca9bdb51b61f9e940f4
[ "MIT" ]
null
null
null
setup.py
TomKealy/causal-forest
04f3aeb1ac5547a78b96eca9bdb51b61f9e940f4
[ "MIT" ]
null
null
null
setup.py
TomKealy/causal-forest
04f3aeb1ac5547a78b96eca9bdb51b61f9e940f4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Setup file for cforest. Use setup.cfg to configure your project. This file was generated with PyScaffold 3.2.3. PyScaffold helps you to put up the scaffold of your new Python project. Learn more under: https://pyscaffold.org/ """ import sys from pkg_resources import Ver...
23.791667
75
0.702277
import sys from pkg_resources import VersionConflict, require from setuptools import setup try: require('setuptools>=38.3') except VersionConflict: print("Error: version of setuptools is too old (<38.3)!") sys.exit(1) if __name__ == "__main__": setup(use_pyscaffold=True)
true
true
f715ec4a046a358ebcab33b297f3acf0d66c97dd
9,457
py
Python
venv/lib/python3.8/site-packages/vsts/task_agent/v4_0/models/task_group.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/task_agent/v4_0/models/task_group.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/task_agent/v4_0/models/task_group.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
56.628743
973
0.649466
from .task_definition import TaskDefinition class TaskGroup(TaskDefinition): _attribute_map = { 'agent_execution': {'key': 'agentExecution', 'type': 'TaskExecution'}, 'author': {'key': 'author', 'type': 'str'}, 'category': {'key': 'category', 'type': 'str'}, 'con...
true
true
f715ec73403c11a6f9f9c12405d55dc8c40d491d
2,782
py
Python
rpbp/analysis/profile_construction/visualize_metagene_profile_bayes_factor.py
HeyLifeHD/rp-bp
9c59b1bc0267400747477467c45f96364d5528e1
[ "MIT" ]
6
2016-05-16T18:52:41.000Z
2021-12-31T06:27:29.000Z
rpbp/analysis/profile_construction/visualize_metagene_profile_bayes_factor.py
HeyLifeHD/rp-bp
9c59b1bc0267400747477467c45f96364d5528e1
[ "MIT" ]
110
2016-06-22T13:24:39.000Z
2022-02-07T09:29:14.000Z
rpbp/analysis/profile_construction/visualize_metagene_profile_bayes_factor.py
HeyLifeHD/rp-bp
9c59b1bc0267400747477467c45f96364d5528e1
[ "MIT" ]
5
2017-05-22T12:21:51.000Z
2022-02-06T10:32:56.000Z
#! /usr/bin/env python3 import matplotlib matplotlib.use('agg') import argparse import matplotlib.pyplot as plt import numpy as np import pandas as pd import logging default_title = "Metagene profile Bayes' factors" default_xlabel = "Offset, relative to translation \ninitiation site" default_ylabel = "Bayes' factor"...
34.345679
104
0.691948
import matplotlib matplotlib.use('agg') import argparse import matplotlib.pyplot as plt import numpy as np import pandas as pd import logging default_title = "Metagene profile Bayes' factors" default_xlabel = "Offset, relative to translation \ninitiation site" default_ylabel = "Bayes' factor" default_font_size = 15...
true
true
f715ed9bba993419b3f1d384d817b622367f47e1
2,536
py
Python
pxlc/qt/DropDownSelectMenu.py
pxlc/pxlc_td
44d08dd9e9a9595449005f3446536e7a02113c95
[ "MIT" ]
2
2020-10-06T22:56:10.000Z
2022-03-07T04:13:47.000Z
pxlc/qt/DropDownSelectMenu.py
pxlc/pxlc_td
44d08dd9e9a9595449005f3446536e7a02113c95
[ "MIT" ]
null
null
null
pxlc/qt/DropDownSelectMenu.py
pxlc/pxlc_td
44d08dd9e9a9595449005f3446536e7a02113c95
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------- # MIT License # # Copyright (c) 2018 pxlc@github # # 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 re...
32.101266
107
0.651025
from PySide import QtCore, QtGui from .cb import connect_callback __INFO__ = ''' item list: [ { 'label': 'Menu label', 'select_data': 'any type, returned if item is selected', 'style': 'style sheet string (optional)', } ] ''' ...
true
true
f715edafdd23569ac05010564563d3ff065388fb
8,828
py
Python
docs/source/conf.py
andrewseidl/ibis
1468b8c4f96d9d58f6fa147a2579b0d9e5796186
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
andrewseidl/ibis
1468b8c4f96d9d58f6fa147a2579b0d9e5796186
[ "Apache-2.0" ]
6
2017-05-18T19:49:09.000Z
2019-03-27T15:37:14.000Z
docs/source/conf.py
andrewseidl/ibis
1468b8c4f96d9d58f6fa147a2579b0d9e5796186
[ "Apache-2.0" ]
1
2017-06-26T15:43:35.000Z
2017-06-26T15:43:35.000Z
# -*- coding: utf-8 -*- # # Ibis documentation build configuration file, created by # sphinx-quickstart on Wed Jun 10 11:06:29 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
31.194346
79
0.715224
import glob import datetime extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.extlinks', 'sphinx.ext.mathjax', 'numpydoc', 'nbsphinx', 'IPython.sphinxext.ipython_directive', 'IPython.sphinxext.ipython_console_highlighting', ] autosumm...
true
true
f715ee5b393ad823887100ea16fc12a89479e531
1,091
py
Python
masakari-7.0.0/masakari/tests/uuidsentinel.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
70
2016-07-22T21:58:00.000Z
2022-01-04T06:05:32.000Z
masakari-7.0.0/masakari/tests/uuidsentinel.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
masakari-7.0.0/masakari/tests/uuidsentinel.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
33
2016-07-05T02:05:25.000Z
2021-12-20T07:40:43.000Z
# Copyright 2016 NTT DATA # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
32.088235
75
0.711274
import sys class UUIDSentinels(object): def __init__(self): from oslo_utils import uuidutils self._uuid_module = uuidutils self._sentinels = {} def __getattr__(self, name): if name.startswith('_'): raise ValueError('Sentinels must not start with _') ...
true
true
f715ee8ea645eac7275a181386fd2444e7fa7fa0
5,420
py
Python
sdk/python/pulumi_azure_native/machinelearningservices/v20200515preview/get_aks_service.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/machinelearningservices/v20200515preview/get_aks_service.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/machinelearningservices/v20200515preview/get_aks_service.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
33.04878
158
0.62583
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetAKSServiceResult', 'AwaitableGetAKSServiceResult', 'get_aks_service', ] @pulumi.output_type class GetAKSServiceResul...
true
true
f715f0635c3ef7697ec0cfe38a3e89fa3c316e5f
735
py
Python
awx/main/migrations/0016_v330_non_blank_workflow.py
james-crowley/awx
5cd44cde991a9526810809544e7a8f12e6174711
[ "Apache-2.0" ]
1
2021-12-27T14:33:10.000Z
2021-12-27T14:33:10.000Z
awx/main/migrations/0016_v330_non_blank_workflow.py
james-crowley/awx
5cd44cde991a9526810809544e7a8f12e6174711
[ "Apache-2.0" ]
35
2021-03-01T06:34:26.000Z
2022-03-01T01:18:42.000Z
awx/main/migrations/0016_v330_non_blank_workflow.py
james-crowley/awx
5cd44cde991a9526810809544e7a8f12e6174711
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-11 16:40 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('main', '0015_v330_blank_st...
28.269231
148
0.665306
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('main', '0015_v330_blank_start_args'), ] operations = [ migrations.AlterField( ...
true
true
f715f097181f6d815bcda6fe2acd64e76df19463
8,577
py
Python
models_all_solvable2/fac2.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
7
2019-05-08T19:14:34.000Z
2021-12-24T00:00:40.000Z
models_all_solvable2/fac2.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
null
null
null
models_all_solvable2/fac2.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
2
2020-05-21T22:15:51.000Z
2020-06-02T23:02:08.000Z
# MINLP written by GAMS Convert at 05/15/20 00:50:46 # # Equation counts # Total E G L N X C B # 34 22 3 9 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
49.578035
120
0.5903
from pyomo.environ import * model = m = ConcreteModel() m.x1 = Var(within=Reals,bounds=(0,1000),initialize=0) m.x2 = Var(within=Reals,bounds=(0,1000),initialize=0) m.x3 = Var(within=Reals,bounds=(0,1000),initialize=0) m.x4 = Var(within=Reals,bounds=(0,1000),initialize=0) m.x5 = Var(within=Reals,bo...
true
true
f715f09dd9a1ab89449f85a7df5a818d88fa8086
37,361
py
Python
banana/study/mri/dwi.py
apoz00003/banana
50bf516cc4f7d4d93985e42d0c4dcbc62fb8058a
[ "Apache-2.0" ]
null
null
null
banana/study/mri/dwi.py
apoz00003/banana
50bf516cc4f7d4d93985e42d0c4dcbc62fb8058a
[ "Apache-2.0" ]
null
null
null
banana/study/mri/dwi.py
apoz00003/banana
50bf516cc4f7d4d93985e42d0c4dcbc62fb8058a
[ "Apache-2.0" ]
null
null
null
from logging import getLogger from nipype.interfaces.utility import Merge from nipype.interfaces.fsl import ( TOPUP, ApplyTOPUP, BET, FUGUE, Merge as FslMerge) from nipype.interfaces import fsl from nipype.interfaces.utility import Merge as merge_lists from nipype.interfaces.fsl.epi import PrepareFieldmap from nipy...
37.064484
79
0.532855
from logging import getLogger from nipype.interfaces.utility import Merge from nipype.interfaces.fsl import ( TOPUP, ApplyTOPUP, BET, FUGUE, Merge as FslMerge) from nipype.interfaces import fsl from nipype.interfaces.utility import Merge as merge_lists from nipype.interfaces.fsl.epi import PrepareFieldmap from nipy...
true
true
f715f0ca82d3720e709126ea59e933b3baab9523
2,969
py
Python
test/features/steps/crud_table.py
lyrl/mycli
d62eefdc819a11ecdb97d93dd7ad1922d28a3795
[ "BSD-3-Clause" ]
10,997
2015-07-27T06:59:04.000Z
2022-03-31T07:49:26.000Z
test/features/steps/crud_table.py
lyrl/mycli
d62eefdc819a11ecdb97d93dd7ad1922d28a3795
[ "BSD-3-Clause" ]
937
2015-07-29T09:25:30.000Z
2022-03-30T23:54:03.000Z
test/features/steps/crud_table.py
lyrl/mycli
d62eefdc819a11ecdb97d93dd7ad1922d28a3795
[ "BSD-3-Clause" ]
799
2015-07-27T13:13:49.000Z
2022-03-29T21:24:39.000Z
"""Steps for behavioral style tests are defined in this module. Each step is defined by the string decorating it. This string is used to call the step in "*.feature" file. """ import wrappers from behave import when, then from textwrap import dedent @when('we create table') def step_create_table(context): """S...
26.274336
74
0.629505
import wrappers from behave import when, then from textwrap import dedent @when('we create table') def step_create_table(context): context.cli.sendline('create table a(x text);') @when('we insert into table') def step_insert_into_table(context): context.cli.sendline('''insert into a(x) values('xxx');''') ...
true
true
f715f0d86c7d1a3a041efd85461b676d0a329b65
395
py
Python
django_dapp/migrations/0005_application_default.py
phonkee/django-desktopapp
bd89434470c9d80074e8911d24059f962934c52a
[ "MIT" ]
null
null
null
django_dapp/migrations/0005_application_default.py
phonkee/django-desktopapp
bd89434470c9d80074e8911d24059f962934c52a
[ "MIT" ]
null
null
null
django_dapp/migrations/0005_application_default.py
phonkee/django-desktopapp
bd89434470c9d80074e8911d24059f962934c52a
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2019-04-12 22:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_dapp', '0004_auto_20190412_2138'), ] operations = [ migrations.AddField( model_name='application', name='defaul...
20.789474
53
0.610127
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_dapp', '0004_auto_20190412_2138'), ] operations = [ migrations.AddField( model_name='application', name='default', field=models.BooleanField(def...
true
true
f715f13073c90b7260a27beedc68a5672549e84b
1,221
py
Python
desktop/libs/notebook/setup.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/libs/notebook/setup.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/libs/notebook/setup.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
42.103448
74
0.72154
from setuptools import setup, find_packages from hueversion import VERSION setup( name = "notebook", version = VERSION, author = "Hue", url = 'http://github.com/cloudera/hue', description = "Type various snippets of code", packages = find_packages('src'), packag...
true
true
f715f2ea5f3929680f1eec4293377f802b326b46
103
py
Python
game/urls.py
BehindLoader/strategy-try
f7f0007515804b2078bb18ae831a326e6e338bbd
[ "MIT" ]
null
null
null
game/urls.py
BehindLoader/strategy-try
f7f0007515804b2078bb18ae831a326e6e338bbd
[ "MIT" ]
null
null
null
game/urls.py
BehindLoader/strategy-try
f7f0007515804b2078bb18ae831a326e6e338bbd
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('get_all', views.get_all) ]
14.714286
34
0.708738
from django.urls import path from . import views urlpatterns = [ path('get_all', views.get_all) ]
true
true
f715f3a67df36230e6e7a6cbb43f59bd83e295a2
4,603
py
Python
pipeline/service/pipeline_engine_adapter/adapter_api.py
sdgdsffdsfff/bk-sops-tencent
e8aff91f822e79031e12b0f66943830f44ced506
[ "Apache-2.0" ]
1
2020-09-24T07:39:16.000Z
2020-09-24T07:39:16.000Z
pipeline/service/pipeline_engine_adapter/adapter_api.py
sdgdsffdsfff/bk-sops-tencent
e8aff91f822e79031e12b0f66943830f44ced506
[ "Apache-2.0" ]
5
2021-02-08T20:46:54.000Z
2021-06-10T22:54:45.000Z
pipeline/service/pipeline_engine_adapter/adapter_api.py
sdgdsffdsfff/bk-sops-tencent
e8aff91f822e79031e12b0f66943830f44ced506
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
27.39881
115
0.718662
from pipeline.engine import api from pipeline.log.models import LogEntry STATE_MAP = { 'CREATED': 'RUNNING', 'READY': 'RUNNING', 'RUNNING': 'RUNNING', 'BLOCKED': 'BLOCKED', 'SUSPENDED': 'SUSPENDED', 'FINISHED': 'FINISHED', 'FAILED': 'FAILED', 'REVOKED': 'REVOKED' } def run_pipeline(...
true
true
f715f47669d217a83d920335ed050f78d844a22c
5,720
py
Python
examples/jsonrpc/JSONRPCExample.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
examples/jsonrpc/JSONRPCExample.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
examples/jsonrpc/JSONRPCExample.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
1
2019-11-18T14:17:59.000Z
2019-11-18T14:17:59.000Z
import pyjd # dummy in pyjs from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.TextArea import TextArea from pyjamas.ui.Label import Label from pyjamas.ui.Button import Button from pyjamas.ui.HTML import HTML from pyjamas.ui.VerticalPanel import VerticalPanel from pyjamas.ui.HorizontalPanel import HorizontalPa...
38.389262
122
0.618706
import pyjd from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.TextArea import TextArea from pyjamas.ui.Label import Label from pyjamas.ui.Button import Button from pyjamas.ui.HTML import HTML from pyjamas.ui.VerticalPanel import VerticalPanel from pyjamas.ui.HorizontalPanel import HorizontalPanel from pyjama...
true
true
f715f48de694a6699da344700b6ccc25623f65f8
59,016
py
Python
haystack/nodes/reader/farm.py
ZanSara/haystack
b2e6dcc99899d9ad728d21f925c5300632683d4d
[ "Apache-2.0" ]
1
2022-02-20T02:04:49.000Z
2022-02-20T02:04:49.000Z
haystack/nodes/reader/farm.py
shenyezh/haystack
2a674eaff7d711f38db1bd57ece9bb632fb928bd
[ "Apache-2.0" ]
null
null
null
haystack/nodes/reader/farm.py
shenyezh/haystack
2a674eaff7d711f38db1bd57ece9bb632fb928bd
[ "Apache-2.0" ]
null
null
null
from typing import List, Optional, Dict, Any, Union, Callable import logging import multiprocessing from pathlib import Path from collections import defaultdict from time import perf_counter import torch from haystack.modeling.data_handler.data_silo import DataSilo, DistillationDataSilo from haystack.modeling.data_ha...
51.407666
344
0.62561
from typing import List, Optional, Dict, Any, Union, Callable import logging import multiprocessing from pathlib import Path from collections import defaultdict from time import perf_counter import torch from haystack.modeling.data_handler.data_silo import DataSilo, DistillationDataSilo from haystack.modeling.data_ha...
true
true
f715f9eec1999c4f7c88c87f57493937d98df307
8,387
py
Python
thor/orbit.py
B612-Asteroid-Institute/thor
d3d1dcbe86f67a62c90b4cde3fc577e414825cf2
[ "BSD-3-Clause" ]
null
null
null
thor/orbit.py
B612-Asteroid-Institute/thor
d3d1dcbe86f67a62c90b4cde3fc577e414825cf2
[ "BSD-3-Clause" ]
null
null
null
thor/orbit.py
B612-Asteroid-Institute/thor
d3d1dcbe86f67a62c90b4cde3fc577e414825cf2
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from .utils import _checkTime from .vectors import calcNae from .vectors import calcDelta from .vectors import calcXae from .vectors import calcXa from .vectors import calcNhat from .vectors import calcR1 from .vectors import calcR2 from .projections import cartesianToGnomonic from .coordinates impo...
37.779279
124
0.582211
import numpy as np from .utils import _checkTime from .vectors import calcNae from .vectors import calcDelta from .vectors import calcXae from .vectors import calcXa from .vectors import calcNhat from .vectors import calcR1 from .vectors import calcR2 from .projections import cartesianToGnomonic from .coordinates impo...
true
true
f715fa3d62c55bf4f7f70f4b2e9a10454d261c5c
2,848
py
Python
python/test/testutil.py
AppScale/appengine-pipelines
277394648dac3e8214677af898935d07399ac8e1
[ "Apache-2.0" ]
82
2015-01-13T03:24:32.000Z
2021-10-09T04:08:27.000Z
python/test/testutil.py
AppScale/appengine-pipelines
277394648dac3e8214677af898935d07399ac8e1
[ "Apache-2.0" ]
57
2015-01-27T00:12:36.000Z
2020-10-30T16:47:05.000Z
python/test/testutil.py
AppScale/appengine-pipelines
277394648dac3e8214677af898935d07399ac8e1
[ "Apache-2.0" ]
58
2015-01-22T21:32:26.000Z
2021-10-09T04:08:19.000Z
#!/usr/bin/env python # # Copyright 2009 Google 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 o...
34.313253
84
0.720857
import logging import os import sys import tempfile class TestSetupMixin(object): TEST_APP_ID = 'my-app-id' TEST_VERSION_ID = 'my-version.1234' def setUp(self): super(TestSetupMixin, self).setUp() from google.appengine.api import apiproxy_stub_map from google.appengine.api imp...
true
true
f715fb59542e094790abdec20a4091318946f4e3
1,283
py
Python
ParserTest/ParserTest.py
isaacrez/ShowdownParser
965d5b35968978ad5101f3df3deede3219284154
[ "MIT" ]
null
null
null
ParserTest/ParserTest.py
isaacrez/ShowdownParser
965d5b35968978ad5101f3df3deede3219284154
[ "MIT" ]
null
null
null
ParserTest/ParserTest.py
isaacrez/ShowdownParser
965d5b35968978ad5101f3df3deede3219284154
[ "MIT" ]
null
null
null
import unittest from ParserTest.TestUtil import * class TestParserMethods(unittest.TestCase): DIRECT_KOs_ID = 2 PASSIVE_KOs_ID = 3 DEATHS_ID = 4 def test_direct_KO(self): pokemon_data = { "Raichu-Alola": ["p1", "Stokin' Dude!"], "Magikarp": ["p2", "A Karp"] } ...
27.891304
70
0.600156
import unittest from ParserTest.TestUtil import * class TestParserMethods(unittest.TestCase): DIRECT_KOs_ID = 2 PASSIVE_KOs_ID = 3 DEATHS_ID = 4 def test_direct_KO(self): pokemon_data = { "Raichu-Alola": ["p1", "Stokin' Dude!"], "Magikarp": ["p2", "A Karp"] } ...
true
true
f715fcdc9f378810a87d7cb126f42c12bd2af0f1
1,256
py
Python
gan_test.py
Aitical/ADspeech2face
2e811ff8cc7333729f4b77d1b1067296253e8e38
[ "MIT" ]
1
2022-01-27T14:19:04.000Z
2022-01-27T14:19:04.000Z
gan_test.py
Aitical/ADspeech2face
2e811ff8cc7333729f4b77d1b1067296253e8e38
[ "MIT" ]
null
null
null
gan_test.py
Aitical/ADspeech2face
2e811ff8cc7333729f4b77d1b1067296253e8e38
[ "MIT" ]
null
null
null
import os import glob import torch import torchvision.utils as vutils import webrtcvad from mfcc import MFCC from utils import voice2face from tqdm import tqdm import sys from parse_config import get_model import importlib # initialization vad_obj = webrtcvad.Vad(2) mfc_obj = MFCC(nfilt=64, lowerf=20., upperf=7200., s...
33.052632
89
0.755573
import os import glob import torch import torchvision.utils as vutils import webrtcvad from mfcc import MFCC from utils import voice2face from tqdm import tqdm import sys from parse_config import get_model import importlib vad_obj = webrtcvad.Vad(2) mfc_obj = MFCC(nfilt=64, lowerf=20., upperf=7200., samprate=16000, n...
true
true
f715fde92dd9503f60b1a71b39a46e6d2f9e42ad
8,020
py
Python
yatsm/cache.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
2
2018-04-25T02:10:30.000Z
2021-07-30T03:57:49.000Z
yatsm/cache.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
null
null
null
yatsm/cache.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
1
2017-04-01T16:11:52.000Z
2017-04-01T16:11:52.000Z
""" Functions related to writing to and retrieving from cache files """ import os import numpy as np from log_yatsm import logger _image_ID_str = 'image_IDs' def get_line_cache_name(dataset_config, n_images, row, nbands): """ Returns cache filename for specified config and line number Args: datase...
33.983051
79
0.646758
import os import numpy as np from log_yatsm import logger _image_ID_str = 'image_IDs' def get_line_cache_name(dataset_config, n_images, row, nbands): path = dataset_config.get('cache_line_dir') if not path: return filename = 'yatsm_r%i_n%i_b%i.npy.npz' % (row, n_images, nbands) return os....
true
true
f715fe7e69213de66aedfbfecdb0bdd840ada5fd
985
py
Python
examples/plot_hue.py
mewbak/hypertools
bc2947737be8bd5a6e2a3bdca84132f6fee8989c
[ "MIT" ]
1,681
2017-01-28T00:28:02.000Z
2022-03-11T00:57:13.000Z
examples/plot_hue.py
mewbak/hypertools
bc2947737be8bd5a6e2a3bdca84132f6fee8989c
[ "MIT" ]
170
2017-01-27T22:59:09.000Z
2022-02-12T03:47:46.000Z
examples/plot_hue.py
mewbak/hypertools
bc2947737be8bd5a6e2a3bdca84132f6fee8989c
[ "MIT" ]
180
2017-02-01T04:34:42.000Z
2022-02-22T15:46:23.000Z
# -*- coding: utf-8 -*- """ ============================= Grouping data by category ============================= When plotting, its useful to have a way to color points by some category or variable. Hypertools does this using the `hue` kwarg, which takes a list of string category labels or numerical values. If text...
26.621622
78
0.683249
import hypertools as hyp import numpy as np geo = hyp.load('weights_sample') data = geo.get_data() hue=[] for idx,i in enumerate(data): tmp=[] for iidx,ii in enumerate(i): tmp.append(int(np.random.randint(1000, size=1))) hue.append(tmp) geo.plot(fmt='.', hue=hue)
true
true
f715ff5939535a01e6aa0c240e3f32c7ba477d37
1,866
py
Python
labyrinth_generator.py
ImTheTom/labyrinth-explorer
56fa7590aa93e11d0f2bc53f58de2194227a4034
[ "MIT" ]
null
null
null
labyrinth_generator.py
ImTheTom/labyrinth-explorer
56fa7590aa93e11d0f2bc53f58de2194227a4034
[ "MIT" ]
null
null
null
labyrinth_generator.py
ImTheTom/labyrinth-explorer
56fa7590aa93e11d0f2bc53f58de2194227a4034
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # # Python Script # # Copyleft © Manoel Vilela # # WIDTH,HEIGHT = 2,3 from random import shuffle, randrange def make_maze(w=WIDTH, h=HEIGHT): vis = [[0] * w + [1] for _ in range(h)] + [[1] * (w + 1)] nowalls = [] def walk(x, y): vis[x][y] = 1 d =...
21.448276
66
0.505895
WIDTH,HEIGHT = 2,3 from random import shuffle, randrange def make_maze(w=WIDTH, h=HEIGHT): vis = [[0] * w + [1] for _ in range(h)] + [[1] * (w + 1)] nowalls = [] def walk(x, y): vis[x][y] = 1 d = [(x - 1, y), (x, y + 1), (x + 1, y), (x, y - 1)] shuffle(d) for (...
true
true
f715ffab1cd92657d37ddc8d113efdafe9821bad
8,233
py
Python
preprocess.py
gewoonrik/pullreqs-dnn
dbafd1866c1cd44424d238618e5ca54841c358c0
[ "MIT" ]
1
2017-02-17T06:51:36.000Z
2017-02-17T06:51:36.000Z
preprocess.py
gewoonrik/pullreqs-dnn
dbafd1866c1cd44424d238618e5ca54841c358c0
[ "MIT" ]
null
null
null
preprocess.py
gewoonrik/pullreqs-dnn
dbafd1866c1cd44424d238618e5ca54841c358c0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # (c) 2016 -- onwards Georgios Gousios <gousiosg@gmail.com>, Rik Nijessen <riknijessen@gmail.com> # from __future__ import print_function import pickle import random import urllib import numpy as np import argparse from config import * from code_tokenizer import CodeTokenizer from my_tokeniz...
34.161826
213
0.703146
from __future__ import print_function import pickle import random import urllib import numpy as np import argparse from config import * from code_tokenizer import CodeTokenizer from my_tokenizer import MyTokenizer from keras.preprocessing.sequence import pad_sequences @timeit def load_pr_csv(file): print(...
true
true
f71601eb739410c4a90886b6aae0725f85a7eaed
5,879
py
Python
test/functional/p2p_fingerprint.py
PitTxid/bitgreen
5168cb2db2a3f9d4f32b14c4224e1f41f0e69566
[ "MIT" ]
14
2019-08-02T21:00:14.000Z
2020-06-22T17:23:05.000Z
test/functional/p2p_fingerprint.py
PitTxid/bitgreen
5168cb2db2a3f9d4f32b14c4224e1f41f0e69566
[ "MIT" ]
7
2019-08-05T23:43:17.000Z
2020-07-17T17:26:54.000Z
test/functional/p2p_fingerprint.py
PitTxid/bitgreen
5168cb2db2a3f9d4f32b14c4224e1f41f0e69566
[ "MIT" ]
25
2019-05-21T01:59:54.000Z
2020-10-18T14:09:38.000Z
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test various fingerprinting protections. If a stale block more than a month old or its header are requ...
39.456376
110
0.691274
import time from test_framework.blocktools import (create_block, create_coinbase) from test_framework.messages import CInv from test_framework.mininode import ( P2PInterface, msg_headers, msg_block, msg_getdata, msg_getheaders, ) from test_framework.test_framework import BitGreenTestFramework ...
true
true
f71603f6109caf0554c9841dcf750730f5a4c731
760
py
Python
backend/gardenator_backend/urls.py
maany/gardenator
0dd02a323a71d996aeb970c730a48306c280d29e
[ "Apache-2.0" ]
null
null
null
backend/gardenator_backend/urls.py
maany/gardenator
0dd02a323a71d996aeb970c730a48306c280d29e
[ "Apache-2.0" ]
null
null
null
backend/gardenator_backend/urls.py
maany/gardenator
0dd02a323a71d996aeb970c730a48306c280d29e
[ "Apache-2.0" ]
null
null
null
"""gardenator_backend URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') ...
34.545455
77
0.713158
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f716050ed51f07345c48ef2000b6e1a8b2a7e2de
17,065
py
Python
Ui_polkitex.py
Trapizomba/Polkit-Explorer
59c9662f07a65b0aa7197418d0036501fd533793
[ "0BSD" ]
null
null
null
Ui_polkitex.py
Trapizomba/Polkit-Explorer
59c9662f07a65b0aa7197418d0036501fd533793
[ "0BSD" ]
null
null
null
Ui_polkitex.py
Trapizomba/Polkit-Explorer
59c9662f07a65b0aa7197418d0036501fd533793
[ "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'polkitex.ui' ## ## Created by: Qt User Interface Compiler version 6.2.3 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ##################...
58.242321
344
0.73097
iveLabel.setFont(font2) self.currentAllowActiveLabel.setFrameShape(QFrame.Box) self.currentAllowActiveLabel.setFrameShadow(QFrame.Raised) self.currentAllowActiveLabel.setAlignment(Qt.AlignCenter) self.allowInactiveGrp = QLabel(self.centralwidget) self.allowInactiveGrp.setObject...
true
true
f71605a096a836f32d317bfc1b1b9c580b670ceb
2,301
py
Python
pymatflow/scripts/nebmake.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
6
2020-03-06T16:13:08.000Z
2022-03-09T07:53:34.000Z
pymatflow/scripts/nebmake.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
1
2021-10-02T02:23:08.000Z
2021-11-08T13:29:37.000Z
pymatflow/scripts/nebmake.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
1
2021-07-10T16:28:14.000Z
2021-07-10T16:28:14.000Z
#!/usr/bin/env python import os import argparse from pymatflow.structure.neb import interpolate from pymatflow.cmd.structflow import read_structure from pymatflow.cmd.structflow import write_structure def main(): parser = argparse.ArgumentParser() parser.add_argument("-i", "--images", type=s...
39.672414
129
0.567579
import os import argparse from pymatflow.structure.neb import interpolate from pymatflow.cmd.structflow import read_structure from pymatflow.cmd.structflow import write_structure def main(): parser = argparse.ArgumentParser() parser.add_argument("-i", "--images", type=str, nargs=2, ...
true
true
f716060870df940910dece369b5b6bf64ae01993
13,519
py
Python
flexget/components/ftp/sftp.py
gjhenrique/Flexget
2dae4c7e3d002600adcce3b67c399fda115d5ce2
[ "MIT" ]
null
null
null
flexget/components/ftp/sftp.py
gjhenrique/Flexget
2dae4c7e3d002600adcce3b67c399fda115d5ce2
[ "MIT" ]
null
null
null
flexget/components/ftp/sftp.py
gjhenrique/Flexget
2dae4c7e3d002600adcce3b67c399fda115d5ce2
[ "MIT" ]
null
null
null
from collections import namedtuple from itertools import groupby from pathlib import Path from typing import List, Optional from urllib.parse import unquote, urlparse from loguru import logger from flexget import plugin from flexget.components.ftp.sftp_client import SftpClient, SftpError from flexget.config_schema im...
36.050667
112
0.609734
from collections import namedtuple from itertools import groupby from pathlib import Path from typing import List, Optional from urllib.parse import unquote, urlparse from loguru import logger from flexget import plugin from flexget.components.ftp.sftp_client import SftpClient, SftpError from flexget.config_schema im...
true
true
f71609666f0531ac8c06b96d69a4042a2ac3a5bc
853
py
Python
paperboy/resources/config.py
datalayer-externals/papermill-paperboy
b27bfdbb4ed27dea597ff1d6346eb831542ae81f
[ "Apache-2.0" ]
233
2018-11-01T09:17:08.000Z
2022-03-22T08:27:24.000Z
paperboy/resources/config.py
datalayer-externals/papermill-paperboy
b27bfdbb4ed27dea597ff1d6346eb831542ae81f
[ "Apache-2.0" ]
99
2018-10-17T21:48:42.000Z
2021-05-07T08:33:36.000Z
paperboy/resources/config.py
datalayer-externals/papermill-paperboy
b27bfdbb4ed27dea597ff1d6346eb831542ae81f
[ "Apache-2.0" ]
29
2018-11-01T11:33:08.000Z
2022-01-12T22:12:19.000Z
import falcon import json from .base import BaseResource class ConfigResource(BaseResource): '''Falcon resource to get form entries''' def __init__(self, *args, **kwargs): super(ConfigResource, self).__init__(*args, **kwargs) def on_get(self, req, resp): '''Get configuration page to crea...
32.807692
72
0.607268
import falcon import json from .base import BaseResource class ConfigResource(BaseResource): def __init__(self, *args, **kwargs): super(ConfigResource, self).__init__(*args, **kwargs) def on_get(self, req, resp): resp.content_type = 'application/json' type = req.params.get('type', No...
true
true
f71609b6af41be400030f87cd3c4bfcdfc294a4a
10,236
py
Python
READMIT/alpha/fp_VBHC_READMIT_BEA_FIPS_alpha.py
andrewcistola/value-based-healthcare
12583c33bff8dee83a7daf5aaaf1e7c39883a279
[ "MIT" ]
1
2021-03-12T07:11:14.000Z
2021-03-12T07:11:14.000Z
READMIT/alpha/fp_VBHC_READMIT_BEA_FIPS_alpha.py
andrewcistola/value-based-healthcare
12583c33bff8dee83a7daf5aaaf1e7c39883a279
[ "MIT" ]
null
null
null
READMIT/alpha/fp_VBHC_READMIT_BEA_FIPS_alpha.py
andrewcistola/value-based-healthcare
12583c33bff8dee83a7daf5aaaf1e7c39883a279
[ "MIT" ]
null
null
null
# FractureProof ## Value Based Healthcare Project ### Outcome #### CMS Hospital Wiide Readmission Rate 2018 ### Predictors #### BEA 2018 County wide Economic Measures ### Table Key #### State County FIPS ### Set working directory to project folder os.chdir("C:/Users/drewc/GitHub/allocativ") # Set wd to project repos...
45.901345
178
0.762016
2.Variance.mean()] df_pca2 = df_pca2.abs() df_pca3 = pd.DataFrame(df_pca2.max(), columns = ["MaxEV"]) df_pc = df_pca3[df_pca3.MaxEV > df_pca3.MaxEV.mean()] df_pc = df_pc.reset_index() df_pc = df_pc.rename(columns = {"index": "Features"}) tep4.head() d.DataFrame(l_gini, columns = ["Features", "Gini"]) df_gin...
true
true
f7160b02cd2fe254d7a127f34fecad15c020c378
4,926
py
Python
optimus/engines/base/dataframe/columns.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
optimus/engines/base/dataframe/columns.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
optimus/engines/base/dataframe/columns.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
from functools import reduce from sklearn.preprocessing import MinMaxScaler, MaxAbsScaler, StandardScaler from optimus.engines.base.columns import BaseColumns from optimus.helpers.columns import parse_columns, name_col from optimus.helpers.constants import Actions from optimus.helpers.raiseit import RaiseIt class D...
35.695652
131
0.661186
from functools import reduce from sklearn.preprocessing import MinMaxScaler, MaxAbsScaler, StandardScaler from optimus.engines.base.columns import BaseColumns from optimus.helpers.columns import parse_columns, name_col from optimus.helpers.constants import Actions from optimus.helpers.raiseit import RaiseIt class D...
true
true
f7160b89bbc0f0135dfed20cc0e5c8f6d06c5128
2,407
py
Python
arviz/wrappers/wrap_pystan.py
brandonwillard/arviz
1358a04cbb7759a6a15459a3d4e4f7259626484c
[ "Apache-2.0" ]
null
null
null
arviz/wrappers/wrap_pystan.py
brandonwillard/arviz
1358a04cbb7759a6a15459a3d4e4f7259626484c
[ "Apache-2.0" ]
null
null
null
arviz/wrappers/wrap_pystan.py
brandonwillard/arviz
1358a04cbb7759a6a15459a3d4e4f7259626484c
[ "Apache-2.0" ]
null
null
null
# pylint: disable=arguments-differ """Base class for PyStan wrappers.""" from ..data import from_pystan from .base import SamplingWrapper class PyStanSamplingWrapper(SamplingWrapper): """PyStan sampling wrapper base class. See the documentation on :class:`~arviz.SamplingWrapper` for a more detailed desc...
41.5
90
0.687993
from ..data import from_pystan from .base import SamplingWrapper class PyStanSamplingWrapper(SamplingWrapper): def sel_observations(self, idx): raise NotImplementedError("sel_observations must be implemented on a model basis") def sample(self, modified_observed_data): fit = self.model.sampl...
true
true
f7160d0ab638df715f56f4ffaaf4cc3e1943ef2c
1,835
py
Python
project/server/auth/wrapper.py
RaihanSabique/Flask-Restful-JWT-Auth
a6be0cc72d4f697ac3cdfa41551de9633f6feb35
[ "MIT" ]
null
null
null
project/server/auth/wrapper.py
RaihanSabique/Flask-Restful-JWT-Auth
a6be0cc72d4f697ac3cdfa41551de9633f6feb35
[ "MIT" ]
null
null
null
project/server/auth/wrapper.py
RaihanSabique/Flask-Restful-JWT-Auth
a6be0cc72d4f697ac3cdfa41551de9633f6feb35
[ "MIT" ]
null
null
null
import functools from flask import Flask, request, make_response, jsonify from flask_restful import Resource, Api, abort from project.server.models import User def login_required(method): @functools.wraps(method) def wrapper(self): auth_header = request.headers.get('Authorization') if auth_head...
35.288462
61
0.559128
import functools from flask import Flask, request, make_response, jsonify from flask_restful import Resource, Api, abort from project.server.models import User def login_required(method): @functools.wraps(method) def wrapper(self): auth_header = request.headers.get('Authorization') if auth_head...
true
true
f7160d32694f94438915434613085cbed64d24f9
4,686
py
Python
setup.py
itsalexis962/pycroscopy
8a6557408ffdc332cef102616be16e26a396532f
[ "MIT" ]
191
2016-06-19T18:34:40.000Z
2022-03-28T08:30:30.000Z
setup.py
itsalexis962/pycroscopy
8a6557408ffdc332cef102616be16e26a396532f
[ "MIT" ]
115
2016-09-20T22:07:52.000Z
2022-03-04T20:41:57.000Z
setup.py
itsalexis962/pycroscopy
8a6557408ffdc332cef102616be16e26a396532f
[ "MIT" ]
72
2016-09-20T10:19:22.000Z
2022-03-05T12:18:48.000Z
from codecs import open import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as f: long_description = f.read() with open(os.path.join(here, 'pycroscopy/__version__.py')) as f: __version__ = f.read().split("'")[1] ...
43.388889
124
0.588988
from codecs import open import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as f: long_description = f.read() with open(os.path.join(here, 'pycroscopy/__version__.py')) as f: __version__ = f.read().split("'")[1] ...
true
true
f7160db0d5fb20f368cc9ea3007c25dccdf69f7c
4,197
py
Python
tests/clvm/coin_store.py
Plotter-Network/plotter-blockchain
13d10557496f37b9a001786ff837bdf34d8f1bcb
[ "Apache-2.0" ]
1
2021-07-10T12:50:30.000Z
2021-07-10T12:50:30.000Z
tests/clvm/coin_store.py
Plotter-Network/plotter-blockchain
13d10557496f37b9a001786ff837bdf34d8f1bcb
[ "Apache-2.0" ]
null
null
null
tests/clvm/coin_store.py
Plotter-Network/plotter-blockchain
13d10557496f37b9a001786ff837bdf34d8f1bcb
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict from dataclasses import dataclass, replace from typing import Dict, Iterator, Set from plotter.full_node.mempool_check_conditions import mempool_check_conditions_dict from plotter.types.blockchain_format.coin import Coin from plotter.types.blockchain_format.sized_bytes import bytes3...
38.861111
117
0.681677
from collections import defaultdict from dataclasses import dataclass, replace from typing import Dict, Iterator, Set from plotter.full_node.mempool_check_conditions import mempool_check_conditions_dict from plotter.types.blockchain_format.coin import Coin from plotter.types.blockchain_format.sized_bytes import bytes3...
true
true
f7160e0c8e9137a12f16d8b789254f485f26bc0b
598
py
Python
src/lib/datasets/dataset_factory.py
nerminsamet/HPRNet
a23e691102ed50bd24391e6295c74f452592cdae
[ "MIT" ]
34
2021-06-09T16:47:59.000Z
2022-03-29T08:03:46.000Z
src/lib/datasets/dataset_factory.py
nerminsamet/HPRNet
a23e691102ed50bd24391e6295c74f452592cdae
[ "MIT" ]
3
2021-12-14T11:47:06.000Z
2022-03-17T04:08:39.000Z
src/lib/datasets/dataset_factory.py
nerminsamet/HPRNet
a23e691102ed50bd24391e6295c74f452592cdae
[ "MIT" ]
4
2021-06-10T07:44:15.000Z
2021-08-30T07:12:40.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .sample.multi_pose import MultiPoseDataset from .sample.landmark import LandmarkDataset from src.lib.datasets.dataset.coco_hp import COCOHP from src.lib.datasets.dataset.coco_body import COCOBODY datase...
21.357143
65
0.792642
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .sample.multi_pose import MultiPoseDataset from .sample.landmark import LandmarkDataset from src.lib.datasets.dataset.coco_hp import COCOHP from src.lib.datasets.dataset.coco_body import COCOBODY datase...
true
true
f7160e1009ab83e8020f0a7d0f081242b48b6c74
1,089
py
Python
users/migrations/0001_initial.py
pollitosabroson/retoglobal
456af32516935fb834c9f78359754614635e9910
[ "Apache-2.0" ]
null
null
null
users/migrations/0001_initial.py
pollitosabroson/retoglobal
456af32516935fb834c9f78359754614635e9910
[ "Apache-2.0" ]
null
null
null
users/migrations/0001_initial.py
pollitosabroson/retoglobal
456af32516935fb834c9f78359754614635e9910
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-10 13:50 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('genres', '0001_initial'), ('hob...
31.114286
114
0.56933
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('genres', '0001_initial'), ('hobbies', '0001_initial'), ] operations = [ migrations.Cr...
true
true
f7160f1c838fc7c07e3729784983c83446032a75
8,147
py
Python
mctsPlayer.py
dspub99/betazero
b1adf9885166e6fb4974952292653efeea1b19dc
[ "MIT" ]
11
2018-11-23T10:48:00.000Z
2020-11-24T07:51:32.000Z
mctsPlayer.py
dspub99/betazero
b1adf9885166e6fb4974952292653efeea1b19dc
[ "MIT" ]
null
null
null
mctsPlayer.py
dspub99/betazero
b1adf9885166e6fb4974952292653efeea1b19dc
[ "MIT" ]
1
2018-11-25T15:43:41.000Z
2018-11-25T15:43:41.000Z
#!/usr/bin/env python import numpy as np from randomPlayer import RandomPlayer import game import play # Run MCTS with MC to estimate the rest of the game. # http://mcts.ai/about/index.html # http://ccg.doc.gold.ac.uk/wp-content/uploads/2016/10/browne_tciaig12_1.pdf class UCT: def __init__(self, c): sel...
31.577519
139
0.551737
import numpy as np from randomPlayer import RandomPlayer import game import play class UCT: def __init__(self, c): self._c = c def parts(self, pNode, node): return (node.sum/node.n, 2*self._c*np.sqrt(2*np.log(pNode.n) / node.n)) def __call__(self, pNode, node): if node.n ==...
true
true
f7161020c4bf4dad2c0c0ebf7e4bb050b02a52e1
15,471
py
Python
tests/controllers/test_api_controller.py
Moesif/moesifapi-python
c1e8b0feab51fdd830154bf981a102c5162943ac
[ "Apache-2.0" ]
5
2017-01-28T17:09:28.000Z
2020-03-10T19:59:31.000Z
tests/controllers/test_api_controller.py
Moesif/moesifapi-python
c1e8b0feab51fdd830154bf981a102c5162943ac
[ "Apache-2.0" ]
null
null
null
tests/controllers/test_api_controller.py
Moesif/moesifapi-python
c1e8b0feab51fdd830154bf981a102c5162943ac
[ "Apache-2.0" ]
1
2019-05-12T18:37:28.000Z
2019-05-12T18:37:28.000Z
# -*- coding: utf-8 -*- """ tests.controllers.test_api_controller """ import jsonpickle from .controller_test_base import * from moesifapi.models import * from datetime import * class ApiControllerTests(ControllerTestBase): @classmethod def setUpClass(cls): super(ApiControllerTests, cls).setUp...
82.73262
8,873
0.548316
import jsonpickle from .controller_test_base import * from moesifapi.models import * from datetime import * class ApiControllerTests(ControllerTestBase): @classmethod def setUpClass(cls): super(ApiControllerTests, cls).setUpClass() cls.controller = cls.api_client.api def test_add_...
true
true
f716105610f9aba80608e6aac525ea5bef34d12c
2,465
py
Python
lib/ruleset_apply.py
brennonyork/budget-buddy
f64dc5ab5248794f101cc704e3754b2882f1d3c3
[ "MIT" ]
null
null
null
lib/ruleset_apply.py
brennonyork/budget-buddy
f64dc5ab5248794f101cc704e3754b2882f1d3c3
[ "MIT" ]
null
null
null
lib/ruleset_apply.py
brennonyork/budget-buddy
f64dc5ab5248794f101cc704e3754b2882f1d3c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Arg1 - ruleset file that contains all rulesets # Arg2 - cleaned, sorted single file with all transactions # # Transforms a given file - Arg2 - into the column set form below # with the rulesets written and applied for the given financial # source - Arg1 import re import sys if len(sys.argv) ...
37.923077
105
0.574037
import re import sys if len(sys.argv) < 3: print("ERROR: need to supply a ruleset file and transaction file") exit() ruleset_file = sys.argv[1] merge_file = sys.argv[2] incl_history = None if len(sys.argv) == 4: incl_history = sys.argv[3] rule_map = [] with open(ruleset_file, 'r') as rules...
true
true
f71610eccde5fef5a72814ac19d392b5c15c9201
7,703
py
Python
src/sage/groups/matrix_gps/unitary.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
5
2015-01-04T07:15:06.000Z
2022-03-04T15:15:18.000Z
src/sage/groups/matrix_gps/unitary.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
src/sage/groups/matrix_gps/unitary.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
10
2016-09-28T13:12:40.000Z
2022-02-12T09:28:34.000Z
r""" Unitary Groups `GU(n,q)` and `SU(n,q)` These are `n \times n` unitary matrices with entries in `GF(q^2)`. EXAMPLES:: sage: G = SU(3,5) sage: G.order() 378000 sage: G Special Unitary Group of degree 3 over Finite Field in a of size 5^2 sage: G.gens() ( [ a 0 0] [...
29.288973
82
0.537583
from sage.rings.all import ZZ, is_FiniteField, GF from sage.misc.latex import latex from sage.groups.matrix_gps.named_group import ( normalize_args_vectorspace, NamedMatrixGroup_generic, NamedMatrixGroup_gap ) def finite_field_sqrt(ring): if not is_FiniteField(ring): raise ValueError('not a f...
true
true
f71611444874d1fdc566b5e40bd2782abdfab6c2
3,694
py
Python
more_one_memo/slack/model/response.py
nonylene/more-one-memo
2c1007bb0bbafe47cba1ac63f237cd4aa66c3374
[ "MIT" ]
1
2018-06-07T01:20:42.000Z
2018-06-07T01:20:42.000Z
more_one_memo/slack/model/response.py
nonylene/more-one-memo
2c1007bb0bbafe47cba1ac63f237cd4aa66c3374
[ "MIT" ]
5
2021-06-02T00:13:17.000Z
2022-02-26T23:38:56.000Z
more_one_memo/slack/model/response.py
nonylene/more-one-memo
2c1007bb0bbafe47cba1ac63f237cd4aa66c3374
[ "MIT" ]
null
null
null
from typing import List, Optional from dataclasses import dataclass UserID = str BotID = str ChannelID = str @dataclass class Channel: """ https://api.slack.com/types/channel """ id: ChannelID name: str is_archived: bool is_member: bool @staticmethod def from_json(json: dict): ...
22.387879
88
0.600433
from typing import List, Optional from dataclasses import dataclass UserID = str BotID = str ChannelID = str @dataclass class Channel: id: ChannelID name: str is_archived: bool is_member: bool @staticmethod def from_json(json: dict): return Channel(json['id'], json['name'], json['is_...
true
true
f716116e261e01c85b7274d3654d5b780989190b
2,740
py
Python
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/sol/phys/Phys_Studio_LongRange.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
82
2016-06-29T17:24:43.000Z
2021-04-16T06:49:17.000Z
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/sol/phys/Phys_Studio_LongRange.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
6
2022-01-12T18:22:08.000Z
2022-03-25T10:19:27.000Z
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/sol/phys/Phys_Studio_LongRange.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
56
2016-08-02T10:50:50.000Z
2021-07-19T08:57:34.000Z
from pyradioconfig.parts.ocelot.phys.Phys_Studio_LongRange import PHYS_OQPSK_LoRa_Ocelot from pyradioconfig.calculator_model_framework.decorators.phy_decorators import do_not_inherit_phys @do_not_inherit_phys class PHYS_Studio_LongRange_Sol(PHYS_OQPSK_LoRa_Ocelot): # Owner: Casey Weltzin # Jira Link: https://...
46.440678
98
0.75219
from pyradioconfig.parts.ocelot.phys.Phys_Studio_LongRange import PHYS_OQPSK_LoRa_Ocelot from pyradioconfig.calculator_model_framework.decorators.phy_decorators import do_not_inherit_phys @do_not_inherit_phys class PHYS_Studio_LongRange_Sol(PHYS_OQPSK_LoRa_Ocelot): def PHY_Longrange_915M_OQPSK_DSSS8_80p...
true
true
f716119887849d0bffc5971384860939823a8114
4,839
py
Python
tensorflow_datasets/core/dataset_utils.py
Global19-atlassian-net/datasets
db298928fe0e45907fcd61443d2319665a933afc
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/core/dataset_utils.py
Global19-atlassian-net/datasets
db298928fe0e45907fcd61443d2319665a933afc
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/core/dataset_utils.py
Global19-atlassian-net/datasets
db298928fe0e45907fcd61443d2319665a933afc
[ "Apache-2.0" ]
1
2020-08-03T20:19:12.000Z
2020-08-03T20:19:12.000Z
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
34.077465
82
0.701178
import tensorflow.compat.v2 as tf from tensorflow_datasets.core import tf_compat from tensorflow_datasets.core import utils def _eager_dataset_iterator(dataset): for item in dataset: flat = tf.nest.flatten(item) flat = [t if isinstance(t, tf.RaggedTensor) else t.numpy() for t in flat] yi...
true
true
f71611a25dd8760de2e03dd6de23a77dc59b5b29
7,560
py
Python
datary/datasets/test/test_datasets.py
Datary/python-sdk
2790a50e1ad262cbe3210665dc34f497625e923d
[ "MIT" ]
null
null
null
datary/datasets/test/test_datasets.py
Datary/python-sdk
2790a50e1ad262cbe3210665dc34f497625e923d
[ "MIT" ]
null
null
null
datary/datasets/test/test_datasets.py
Datary/python-sdk
2790a50e1ad262cbe3210665dc34f497625e923d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Datary python sdk Datasets test file """ import mock from datary.test.test_datary import DataryTestCase from datary.test.mock_requests import MockRequestResponse class DataryDatasetsTestCase(DataryTestCase): """ DataryDatasets Test case """ @mock.patch('datary.requests.re...
37.98995
79
0.668915
import mock from datary.test.test_datary import DataryTestCase from datary.test.mock_requests import MockRequestResponse class DataryDatasetsTestCase(DataryTestCase): @mock.patch('datary.requests.requests.requests.get') def test_get_kern(self, mock_request): mock_request.return_value = MockRequest...
true
true
f71612467e9b5dc259949c2813d2f39841a075f0
78
py
Python
src/main.py
jadmz/pygame-box2d-template
cd5ef75940b1c919aade5acb11924cbfba8e7c60
[ "MIT" ]
null
null
null
src/main.py
jadmz/pygame-box2d-template
cd5ef75940b1c919aade5acb11924cbfba8e7c60
[ "MIT" ]
null
null
null
src/main.py
jadmz/pygame-box2d-template
cd5ef75940b1c919aade5acb11924cbfba8e7c60
[ "MIT" ]
1
2020-03-22T18:20:54.000Z
2020-03-22T18:20:54.000Z
from game import Game game = Game("Pygame with Box2d Template") game.run()
11.142857
41
0.717949
from game import Game game = Game("Pygame with Box2d Template") game.run()
true
true
f716125d67e85c57e3e02321d8def2b0570ba241
1,953
py
Python
TwitchApiPy/TwitchApiPy.py
xegepa/Twitch-Api-Py
84613dd32654315422481d24bb9afc1ab3967d3d
[ "MIT" ]
2
2020-08-16T12:54:23.000Z
2021-02-11T20:43:42.000Z
TwitchApiPy/TwitchApiPy.py
xegepa/Twitch-Api-Py
84613dd32654315422481d24bb9afc1ab3967d3d
[ "MIT" ]
null
null
null
TwitchApiPy/TwitchApiPy.py
xegepa/Twitch-Api-Py
84613dd32654315422481d24bb9afc1ab3967d3d
[ "MIT" ]
null
null
null
import requests class TwitchApiPy(): def __init__(self): self.ClientID = "" self.OAuth = "" """ You don't really use this its for other requests """ def GetUserID(self,name): r = requests.get(url = "https://api.twitch.tv/helix/users?login={}".format(name), headers = {'Clien...
34.875
165
0.573989
import requests class TwitchApiPy(): def __init__(self): self.ClientID = "" self.OAuth = "" def GetUserID(self,name): r = requests.get(url = "https://api.twitch.tv/helix/users?login={}".format(name), headers = {'Client-ID': self.ClientID,'Authorization': self.OAuth}) r = r.json...
true
true
f71612ddef304fe8e27a1500d0a1c4bde6565bb6
35,689
py
Python
fhirclient/models/medicationrequest.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
fhirclient/models/medicationrequest.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
fhirclient/models/medicationrequest.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/MedicationRequest) on 2019-01-22. # 2019, SMART Health IT. from . import domainresource class MedicationRequest(domainresource.DomainResource): """ O r d e r ...
12.053023
131
0.304548
from . import domainresource class MedicationRequest(domainresource.DomainResource): resource_type = "MedicationRequest" def __init__(self, jsondict=None, strict=True): self.authoredOn = None self.basedOn = None self.category = None ...
true
true
f716130a5e4aa592b5742e419a3914560c7330fc
1,320
py
Python
homeassistant/components/synology_dsm/const.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
1,635
2015-01-01T14:59:18.000Z
2016-04-13T02:36:16.000Z
homeassistant/components/synology_dsm/const.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
1,463
2015-01-06T06:18:07.000Z
2016-04-12T22:30:37.000Z
homeassistant/components/synology_dsm/const.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
659
2015-01-05T14:02:23.000Z
2016-04-12T23:39:31.000Z
"""Constants for Synology DSM.""" from __future__ import annotations from synology_dsm.api.surveillance_station.const import SNAPSHOT_PROFILE_BALANCED from homeassistant.const import Platform DOMAIN = "synology_dsm" ATTRIBUTION = "Data provided by Synology" PLATFORMS = [ Platform.BINARY_SENSOR, Platform.BUTT...
23.571429
81
0.79697
from __future__ import annotations from synology_dsm.api.surveillance_station.const import SNAPSHOT_PROFILE_BALANCED from homeassistant.const import Platform DOMAIN = "synology_dsm" ATTRIBUTION = "Data provided by Synology" PLATFORMS = [ Platform.BINARY_SENSOR, Platform.BUTTON, Platform.CAMERA, Platf...
true
true
f716137a258773159a3f46fb247a0224787d63af
85
py
Python
2020/09/30/Django Pagination Tutorial/library/library/books/apps.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
492
2019-06-25T12:54:31.000Z
2022-03-30T12:38:28.000Z
2020/09/30/Django Pagination Tutorial/library/library/books/apps.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
122
2018-10-06T21:31:24.000Z
2020-11-09T15:04:56.000Z
2020/09/30/Django Pagination Tutorial/library/library/books/apps.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
1,734
2019-06-03T06:25:13.000Z
2022-03-31T23:57:53.000Z
from django.apps import AppConfig class BooksConfig(AppConfig): name = 'books'
14.166667
33
0.741176
from django.apps import AppConfig class BooksConfig(AppConfig): name = 'books'
true
true
f71613f7207decd88d8c0d1641da8ad9b079d689
2,085
py
Python
code/generateTimeline.py
sahilmgandhi/sahilmgandhi.github.io
e2d6aba9d90f53a4ebfbbd36b6b1d301dce039d3
[ "CC-BY-3.0" ]
null
null
null
code/generateTimeline.py
sahilmgandhi/sahilmgandhi.github.io
e2d6aba9d90f53a4ebfbbd36b6b1d301dce039d3
[ "CC-BY-3.0" ]
null
null
null
code/generateTimeline.py
sahilmgandhi/sahilmgandhi.github.io
e2d6aba9d90f53a4ebfbbd36b6b1d301dce039d3
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/python import random, sys, string, csv, argparse, subprocess parser=argparse.ArgumentParser( description='''This script generates the HTML code for the timeline boxes''', epilog="""Have fun!""") parser.add_argument('-i', default='movies.csv', dest='inputFile', help='Name of the csv file. Default is...
40.882353
123
0.617746
import random, sys, string, csv, argparse, subprocess parser=argparse.ArgumentParser( description='''This script generates the HTML code for the timeline boxes''', epilog="""Have fun!""") parser.add_argument('-i', default='movies.csv', dest='inputFile', help='Name of the csv file. Default is movies.csv') par...
true
true
f71614d3da0d9da31c0fa08bb2b57c555c07181a
4,274
py
Python
deprecated/pycqed/instrument_drivers/physical_instruments/_controlbox/xiangs_timing_tape_code.py
nuttamas/PycQED_py3
1ee35c7428d36ed42ba4afb5d4bda98140b2283e
[ "MIT" ]
60
2016-08-03T10:00:18.000Z
2021-11-10T11:46:16.000Z
deprecated/pycqed/instrument_drivers/physical_instruments/_controlbox/xiangs_timing_tape_code.py
nuttamas/PycQED_py3
1ee35c7428d36ed42ba4afb5d4bda98140b2283e
[ "MIT" ]
512
2016-08-03T17:10:02.000Z
2022-03-31T14:03:43.000Z
deprecated/pycqed/instrument_drivers/physical_instruments/_controlbox/xiangs_timing_tape_code.py
nuttamas/PycQED_py3
1ee35c7428d36ed42ba4afb5d4bda98140b2283e
[ "MIT" ]
34
2016-10-19T12:00:52.000Z
2022-03-19T04:43:26.000Z
def set_conditional_tape(self, awg_nr, tape_nr, tape): ''' set the conditional tape content for an awg @param awg : the awg of the dac, (0,1,2). @param tape_nr : the number of the tape, integer ranging (0~6) @param tape : the array of entries, with a maximum number of entries 512. Every ent...
39.943925
96
0.662611
def set_conditional_tape(self, awg_nr, tape_nr, tape): length = len(tape) tape_addr_width = 9 entry_length = 9 + 3 + 1 if awg_nr < 0 or awg_nr > 2: raise ValueError if tape_nr < 0 or tape_nr > 6: raise ValueError if length < 1 or length > 512: raise ValueError ...
true
true
f716155583711d06a3bf11dab07383b6f8697428
1,801
py
Python
securityheaders/checkers/cors/exposeheaders/test_exposesensitiveheaders.py
th3cyb3rc0p/securityheaders
941264be581dc01afe28f6416f2d7bed79aecfb3
[ "Apache-2.0" ]
151
2018-07-29T22:34:43.000Z
2022-03-22T05:08:27.000Z
securityheaders/checkers/cors/exposeheaders/test_exposesensitiveheaders.py
th3cyb3rc0p/securityheaders
941264be581dc01afe28f6416f2d7bed79aecfb3
[ "Apache-2.0" ]
5
2019-04-24T07:31:36.000Z
2021-04-15T14:31:23.000Z
securityheaders/checkers/cors/exposeheaders/test_exposesensitiveheaders.py
th3cyb3rc0p/securityheaders
941264be581dc01afe28f6416f2d7bed79aecfb3
[ "Apache-2.0" ]
42
2018-07-31T08:18:59.000Z
2022-03-28T08:18:32.000Z
import unittest from securityheaders.checkers.cors import AccessControlExposeHeadersSensitiveChecker class AccessControlExposeHeadersSensitiveCheckerTest(unittest.TestCase): def setUp(self): self.x = AccessControlExposeHeadersSensitiveChecker() def test_checkNoHeader(self): nox = dict() ...
31.051724
84
0.655747
import unittest from securityheaders.checkers.cors import AccessControlExposeHeadersSensitiveChecker class AccessControlExposeHeadersSensitiveCheckerTest(unittest.TestCase): def setUp(self): self.x = AccessControlExposeHeadersSensitiveChecker() def test_checkNoHeader(self): nox = dict() ...
true
true
f71617895efc3dfd23246121c700461891099a24
6,196
py
Python
docs/conf.py
EVEprosper/ProsperDatareader
31f0d77074c21222161774f4d653326925611167
[ "MIT" ]
null
null
null
docs/conf.py
EVEprosper/ProsperDatareader
31f0d77074c21222161774f4d653326925611167
[ "MIT" ]
14
2017-08-14T02:25:42.000Z
2018-11-16T19:15:52.000Z
docs/conf.py
EVEprosper/ProsperDatareader
31f0d77074c21222161774f4d653326925611167
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ProsperDatareader documentation build configuration file, created by # sphinx-quickstart on Mon Jul 31 09:30:33 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
29.788462
80
0.675274
th.insert(0, os.path.abspath('../prosper/datareader')) sys.path.insert(0, os.path.abspath('../prosper')) from _version import __version__ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', ...
true
true
f716179af5712ede1126fe27e7a30594aafd8164
5,204
py
Python
sdk/python/pulumi_azure_nextgen/logic/latest/get_integration_account_batch_configuration.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/logic/latest/get_integration_account_batch_configuration.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/logic/latest/get_integration_account_batch_configuration.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 from...
37.438849
236
0.662183
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetIntegrationAccountBatchConfigurationResult', 'AwaitableGetIntegrationAccountBatchConfigurationResult', 'get_integratio...
true
true
f7161889a0f2637bcacb6385931f3df8ce3d1eb6
2,639
py
Python
PYTHON/skyscrapper.py
iamsuryakant/100-days-of-code
eaf4863d98dc273f03a989fe87d010d201d91516
[ "MIT" ]
1
2020-07-04T12:45:50.000Z
2020-07-04T12:45:50.000Z
PYTHON/skyscrapper.py
iamsuryakant/100-days-of-code
eaf4863d98dc273f03a989fe87d010d201d91516
[ "MIT" ]
1
2020-08-08T02:23:46.000Z
2020-08-08T02:47:56.000Z
PYTHON/skyscrapper.py
iamsuryakant/100-days-of-code
eaf4863d98dc273f03a989fe87d010d201d91516
[ "MIT" ]
null
null
null
class Solution: def getSkyline(self, buildings: 'List[List[int]]') -> 'List[List[int]]': """ Divide-and-conquer algorithm to solve skyline problem, which is similar with the merge sort algorithm. """ n = len(buildings) # The base cases if n == 0: r...
32.580247
76
0.497537
class Solution: def getSkyline(self, buildings: 'List[List[int]]') -> 'List[List[int]]': n = len(buildings) if n == 0: return [] if n == 1: x_start, x_end, y = buildings[0] return [[x_start, y], [x_end, 0]] left_skyline ...
true
true
f71618eae8454fc424b1ab0fecf5817c6c652137
31,411
py
Python
tests/models/bloom/test_modeling_bloom.py
JingyaHuang/transformers
6589e510fa4e6c442059de2fab84752535de9b23
[ "Apache-2.0" ]
null
null
null
tests/models/bloom/test_modeling_bloom.py
JingyaHuang/transformers
6589e510fa4e6c442059de2fab84752535de9b23
[ "Apache-2.0" ]
null
null
null
tests/models/bloom/test_modeling_bloom.py
JingyaHuang/transformers
6589e510fa4e6c442059de2fab84752535de9b23
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The HuggingFace Team. 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 requir...
41.439314
155
0.661934
import math import unittest from transformers import BloomConfig, is_torch_available from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device from ...generation.test_generation_utils import GenerationTesterMixin from ...test_configuration_common import ConfigTester f...
true
true
f71619031253fb486e6ba783dca022105538c931
3,935
py
Python
server/website/website/parser/parser.py
mjain2/ottertune
011e896bf89df831fb1189b1ab4c9a7d7dca420a
[ "Apache-2.0" ]
1
2019-08-16T19:35:35.000Z
2019-08-16T19:35:35.000Z
server/website/website/parser/parser.py
mjain2/ottertune
011e896bf89df831fb1189b1ab4c9a7d7dca420a
[ "Apache-2.0" ]
null
null
null
server/website/website/parser/parser.py
mjain2/ottertune
011e896bf89df831fb1189b1ab4c9a7d7dca420a
[ "Apache-2.0" ]
null
null
null
# # OtterTune - parser.py # # Copyright (c) 2017-18, Carnegie Mellon University Database Group # ''' Created on Dec 12, 2017 @author: dvanaken ''' from website.models import DBMSCatalog from website.types import DBMSType from .myrocks import MyRocks56Parser from .mysql import MySql57Parser from .postgres import Pos...
35.45045
96
0.662516
from website.models import DBMSCatalog from website.types import DBMSType from .myrocks import MyRocks56Parser from .mysql import MySql57Parser from .postgres import Postgres96Parser, PostgresOldParser from .oracle import Oracle19Parser class Parser(object): __DBMS_UTILS_IMPLS = None @staticmethod ...
true
true
f716194f5cc205b886a9dd79a6796056afa57b63
15,927
py
Python
old/fastai/structured.py
fjaragones/fastai
be48d209a4526191f71dc7adaef090828897b9ec
[ "Apache-2.0" ]
2
2019-02-19T18:34:29.000Z
2019-12-09T17:51:41.000Z
old/fastai/structured.py
fjaragones/fastai
be48d209a4526191f71dc7adaef090828897b9ec
[ "Apache-2.0" ]
4
2020-02-25T20:46:35.000Z
2022-02-26T04:45:55.000Z
old/fastai/structured.py
fjaragones/fastai
be48d209a4526191f71dc7adaef090828897b9ec
[ "Apache-2.0" ]
1
2019-01-16T08:10:48.000Z
2019-01-16T08:10:48.000Z
from .imports import * from sklearn_pandas import DataFrameMapper from sklearn.preprocessing import LabelEncoder, Imputer, StandardScaler from pandas.api.types import is_string_dtype, is_numeric_dtype from sklearn.ensemble import forest from sklearn.tree import export_graphviz def set_plot_sizes(sml, med, big): ...
32.975155
155
0.585547
from .imports import * from sklearn_pandas import DataFrameMapper from sklearn.preprocessing import LabelEncoder, Imputer, StandardScaler from pandas.api.types import is_string_dtype, is_numeric_dtype from sklearn.ensemble import forest from sklearn.tree import export_graphviz def set_plot_sizes(sml, med, big): ...
true
true