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
08ff555917ea95fb44e21716f11f204f648a1a7a
1,425
py
Python
ooobuild/dyn/datatransfer/clipboard/x_clipboard_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/datatransfer/clipboard/x_clipboard_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/datatransfer/clipboard/x_clipboard_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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...
38.513514
96
0.774737
from typing import TYPE_CHECKING from ooo.oenv.env_const import UNO_ENVIRONMENT, UNO_RUNTIME _DYNAMIC = False if (not TYPE_CHECKING) and UNO_RUNTIME and UNO_ENVIRONMENT: _DYNAMIC = True if not TYPE_CHECKING and _DYNAMIC: from com.sun.star.datatransfer.clipboard import XClipboardEx as XClipboardEx setattr(X...
true
true
08ff568e3761fd55c461e0e9d51a958da304e590
423
py
Python
contests/atcoder/abc226/b.py
conao3/coder
2cdb610fec013da88a3470d460108e8a9b462445
[ "CC0-1.0" ]
null
null
null
contests/atcoder/abc226/b.py
conao3/coder
2cdb610fec013da88a3470d460108e8a9b462445
[ "CC0-1.0" ]
null
null
null
contests/atcoder/abc226/b.py
conao3/coder
2cdb610fec013da88a3470d460108e8a9b462445
[ "CC0-1.0" ]
null
null
null
N = int(input()) L = [0 for _ in range(N)] a = [[] for _ in range(N)] for i in range(N): tmp = list(map(int, input().split())) L[i] = tmp[0] a[i] = tmp[1:] cache = [] cache_sum = [] for i in range(N): if sum(a[i]) not in cache_sum: cache.append(a[i]) cache_sum.append(sum(a[i])) eli...
20.142857
41
0.531915
N = int(input()) L = [0 for _ in range(N)] a = [[] for _ in range(N)] for i in range(N): tmp = list(map(int, input().split())) L[i] = tmp[0] a[i] = tmp[1:] cache = [] cache_sum = [] for i in range(N): if sum(a[i]) not in cache_sum: cache.append(a[i]) cache_sum.append(sum(a[i])) eli...
true
true
08ff56eb9287be16db884afd8e0fe0de09b3c88c
1,859
py
Python
openproblems/patch.py
scottgigante/SingleCellOpenProblems
f7ce88881e49d130354720f92260d41d0009c4b5
[ "MIT" ]
1
2021-04-23T10:01:25.000Z
2021-04-23T10:01:25.000Z
openproblems/patch.py
scottgigante/SingleCellOpenProblems
f7ce88881e49d130354720f92260d41d0009c4b5
[ "MIT" ]
null
null
null
openproblems/patch.py
scottgigante/SingleCellOpenProblems
f7ce88881e49d130354720f92260d41d0009c4b5
[ "MIT" ]
null
null
null
from . import utils import anndata import contextlib import logging import subprocess import tempfile log = logging.getLogger("openproblems") def _write_h5ad_patch(self, *args, **kwargs): self.obs.columns = self.obs.columns.astype(str) self.var.columns = self.var.columns.astype(str) self._write_h5ad(*ar...
25.819444
74
0.684777
from . import utils import anndata import contextlib import logging import subprocess import tempfile log = logging.getLogger("openproblems") def _write_h5ad_patch(self, *args, **kwargs): self.obs.columns = self.obs.columns.astype(str) self.var.columns = self.var.columns.astype(str) self._write_h5ad(*ar...
true
true
08ff5725849fac4247b729755f509bb614af627a
103
py
Python
inheritance/lab/hierarchical_inheritance/project/cat.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
3
2021-11-16T04:52:53.000Z
2022-02-07T20:28:41.000Z
inheritance/lab/hierarchical_inheritance/project/cat.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
null
null
null
inheritance/lab/hierarchical_inheritance/project/cat.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
1
2021-12-07T07:04:38.000Z
2021-12-07T07:04:38.000Z
from project.animal import Animal class Cat(Animal): def meow(self): return 'meowing...'
14.714286
33
0.650485
from project.animal import Animal class Cat(Animal): def meow(self): return 'meowing...'
true
true
08ff575d4314684a7aa50aeafc9ee4570e5e9049
77
py
Python
generalvector/__init__.py
ManderaGeneral/generalvector
f604fbe5c5f006f0ccdcb67b64e7ecfc615efc40
[ "MIT" ]
null
null
null
generalvector/__init__.py
ManderaGeneral/generalvector
f604fbe5c5f006f0ccdcb67b64e7ecfc615efc40
[ "MIT" ]
null
null
null
generalvector/__init__.py
ManderaGeneral/generalvector
f604fbe5c5f006f0ccdcb67b64e7ecfc615efc40
[ "MIT" ]
null
null
null
from generalvector.vector2 import Vec2 from generalvector.vector import Vec
19.25
38
0.857143
from generalvector.vector2 import Vec2 from generalvector.vector import Vec
true
true
08ff57daf81ca3b63ddb833eaf6ad4b1c9a6a724
2,084
py
Python
Forritun/Forritun 3/timaverkefni1klasar_einar.py
EinarK2/einark2.github.io
ec121871d381fe62e29573e67b57baf80f31e90d
[ "CC-BY-4.0" ]
null
null
null
Forritun/Forritun 3/timaverkefni1klasar_einar.py
EinarK2/einark2.github.io
ec121871d381fe62e29573e67b57baf80f31e90d
[ "CC-BY-4.0" ]
null
null
null
Forritun/Forritun 3/timaverkefni1klasar_einar.py
EinarK2/einark2.github.io
ec121871d381fe62e29573e67b57baf80f31e90d
[ "CC-BY-4.0" ]
1
2018-09-12T15:12:34.000Z
2018-09-12T15:12:34.000Z
# Einar Karl Pétursson # 27/9/2019 class Account: def __init__(self, balance): self.balance = balance def credit(self, amount): self.balance = self.balance + amount print("Transaction completed. Current balance:", self.balance) # add an amount to the current balance def de...
35.322034
92
0.634357
class Account: def __init__(self, balance): self.balance = balance def credit(self, amount): self.balance = self.balance + amount print("Transaction completed. Current balance:", self.balance) def debit(self, amount): if self.balance - amount >= 0: self...
true
true
08ff5882d01ef4f535a01899fb2a7bfec47d7c34
12,274
py
Python
twisted/spread/banana.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
twisted/spread/banana.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
twisted/spread/banana.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
# -*- test-case-name: twisted.test.test_banana -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Banana -- s-exp based protocol. Future Plans: This module is almost entirely stable. The same caveat applies to it as applies to L{twisted.spread.jelly}, however. Read its future plans for ...
30.916877
116
0.529412
import copy, struct from io import BytesIO from twisted.internet import protocol from twisted.persisted import styles from twisted.python import log from twisted.python.compat import iterbytes, long, _bytesChr as chr from twisted.python.reflect import fullyQualifiedName class BananaError(Exception): pass def i...
true
true
08ff595424377d818f7b9d6bb30f5d372bb57826
6,934
py
Python
sleap/nn/data/utils.py
hectorcarrion/sleap
1150c2d0b64543e07d4b2429ea245a5afaa07cee
[ "BSD-3-Clause-Clear" ]
156
2020-05-01T18:43:43.000Z
2022-03-25T10:31:18.000Z
sleap/nn/data/utils.py
oeway/sleap
1eb06f81eb8f0bc1beedd1c3dd10902f8ff9e724
[ "BSD-3-Clause-Clear" ]
299
2020-04-20T16:37:52.000Z
2022-03-31T23:54:48.000Z
sleap/nn/data/utils.py
oeway/sleap
1eb06f81eb8f0bc1beedd1c3dd10902f8ff9e724
[ "BSD-3-Clause-Clear" ]
41
2020-05-14T15:25:21.000Z
2022-03-25T12:44:54.000Z
"""Miscellaneous utility functions for data processing.""" import tensorflow as tf import numpy as np from typing import Any, List, Tuple, Dict, Text, Optional def ensure_list(x: Any) -> List[Any]: """Convert the input into a list if it is not already.""" if not isinstance(x, list): return [x] re...
39.397727
88
0.664696
import tensorflow as tf import numpy as np from typing import Any, List, Tuple, Dict, Text, Optional def ensure_list(x: Any) -> List[Any]: if not isinstance(x, list): return [x] return x def expand_to_rank(x: tf.Tensor, target_rank: int, prepend: bool = True) -> tf.Tensor: n_singleton_dims = tf...
true
true
08ff59a0c4e43b7572f858eff639282327f60fb6
3,615
py
Python
Backends/scripts/BOSS/configs/pythia_8_212.py
aaronvincent/gambit_aaron
a38bd6fc10d781e71f2adafd401c76e1e3476b05
[ "Unlicense" ]
1
2019-01-21T19:59:18.000Z
2019-01-21T19:59:18.000Z
Backends/scripts/BOSS/configs/pythia_8_212.py
aaronvincent/gambit_aaron
a38bd6fc10d781e71f2adafd401c76e1e3476b05
[ "Unlicense" ]
4
2019-10-06T14:03:41.000Z
2020-08-06T11:53:54.000Z
Backends/scripts/BOSS/configs/pythia_8_212.py
aaronvincent/gambit_aaron
a38bd6fc10d781e71f2adafd401c76e1e3476b05
[ "Unlicense" ]
null
null
null
################################### # # # Configuration module for BOSS # # # ################################### # ~~~~~ CASTXML options ~~~~~ # See CastXML documentation for details on these options: # # https://github.com/CastXML/CastXML/blob/mas...
27.59542
124
0.637344
castxml_cc_id = 'gnu' castxml_cc = 'g++' castxml_cc_opt = '-std=c++11' gambit_backend_name = 'Pythia' gambit_backend_version = '8.212' gambit_base_namespace = '' input_files = ['../../../Backends/installed/pythia/'+gambit_backend_version+'/include/Pythia8/Pythia.h'] include_paths ...
true
true
08ff59a3083243a6dedeecc1b96d27892a5379ca
3,755
py
Python
app/app_issue.py
whatifrussian/api
4695b0c159ba4564a76e6faec2a04a3274356b5a
[ "Unlicense" ]
null
null
null
app/app_issue.py
whatifrussian/api
4695b0c159ba4564a76e6faec2a04a3274356b5a
[ "Unlicense" ]
null
null
null
app/app_issue.py
whatifrussian/api
4695b0c159ba4564a76e6faec2a04a3274356b5a
[ "Unlicense" ]
null
null
null
import re from traceback import format_exc from flask import Blueprint, request from flask import current_app as app from github import GitHubAPI from utils import get_base_dir, get_config, dump_to_json from app_log import log_request app_issue = Blueprint('issue', __name__) gitHub = GitHubAPI(base_dir=get_base_dir()...
33.526786
78
0.600533
import re from traceback import format_exc from flask import Blueprint, request from flask import current_app as app from github import GitHubAPI from utils import get_base_dir, get_config, dump_to_json from app_log import log_request app_issue = Blueprint('issue', __name__) gitHub = GitHubAPI(base_dir=get_base_dir()...
true
true
08ff5b095e3e304fc591f70eef21be00a56abd90
2,303
py
Python
scripts/update_changelog.py
fullrobot/cookiecutter-django
3a53dc09571335de9060db46756cefb0426d93ea
[ "BSD-3-Clause" ]
8,899
2015-01-01T01:21:35.000Z
2021-10-20T21:42:07.000Z
scripts/update_changelog.py
fullrobot/cookiecutter-django
3a53dc09571335de9060db46756cefb0426d93ea
[ "BSD-3-Clause" ]
1,707
2015-01-04T13:45:08.000Z
2021-10-21T17:31:46.000Z
scripts/update_changelog.py
fullrobot/cookiecutter-django
3a53dc09571335de9060db46756cefb0426d93ea
[ "BSD-3-Clause" ]
3,023
2015-01-01T20:26:21.000Z
2021-10-22T04:13:30.000Z
import os from pathlib import Path from github import Github from jinja2 import Template import datetime as dt CURRENT_FILE = Path(__file__) ROOT = CURRENT_FILE.parents[1] GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", None) # Generate changelog for PRs merged yesterday MERGED_DATE = dt.date.today() - dt.timedelta(days=1) ...
29.151899
86
0.672167
import os from pathlib import Path from github import Github from jinja2 import Template import datetime as dt CURRENT_FILE = Path(__file__) ROOT = CURRENT_FILE.parents[1] GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", None) MERGED_DATE = dt.date.today() - dt.timedelta(days=1) def main() -> None: merged_pulls = list(...
true
true
08ff5b12592cfe79b3fd172460fa0e6972a24a23
2,543
py
Python
dbix/builder.py
alexbodn/python-dbix
769298cc510a95437d9d7e7641b616b6aec97ced
[ "Apache-2.0" ]
null
null
null
dbix/builder.py
alexbodn/python-dbix
769298cc510a95437d9d7e7641b616b6aec97ced
[ "Apache-2.0" ]
3
2021-03-25T21:40:41.000Z
2021-11-15T17:46:46.000Z
dbix/builder.py
alexbodn/python-dbix
769298cc510a95437d9d7e7641b616b6aec97ced
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from future.utils import with_metaclass import sys, os from .perlconv import treeconv class BuilderMetaClass(type): @property def load_namespaces(self): if not self.__load_namespaces__: return pytext = treeconv( os.path.dirname(self.__sourcepath__), self.__sou...
23.990566
72
0.692882
from __future__ import print_function from future.utils import with_metaclass import sys, os from .perlconv import treeconv class BuilderMetaClass(type): @property def load_namespaces(self): if not self.__load_namespaces__: return pytext = treeconv( os.path.dirname(self.__sourcepath__), self.__sou...
true
true
08ff5c0688f48fcea96b3cf8a1ff68e95faaf397
2,141
wsgi
Python
salt/moin/configs/moin.wsgi
ammaraskar/psf-salt
a1ec8511a2d2d242cd6ffe174bfe4b9c2fb26c5e
[ "MIT" ]
103
2015-01-26T22:22:29.000Z
2022-03-09T06:18:19.000Z
salt/moin/configs/moin.wsgi
ammaraskar/psf-salt
a1ec8511a2d2d242cd6ffe174bfe4b9c2fb26c5e
[ "MIT" ]
97
2015-01-08T16:02:04.000Z
2022-03-23T08:53:20.000Z
salt/moin/configs/moin.wsgi
ammaraskar/psf-salt
a1ec8511a2d2d242cd6ffe174bfe4b9c2fb26c5e
[ "MIT" ]
72
2015-01-12T16:49:11.000Z
2022-03-10T03:26:08.000Z
# -*- coding: iso-8859-1 -*- """ MoinMoin - mod_wsgi driver script To use this, add those statements to your Apache's VirtualHost definition: # you will invoke your moin wiki at the root url, like http://servername/FrontPage: WSGIScriptAlias / /some/path/moin.wsgi # create some wsgi daemons -...
40.396226
118
0.747314
import sys, os # If you already have set up the PYTHONPATH environment variable for the # stuff you see below, you don't need to do a1) and a2). #sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages') # a2) Path of the directory where wikiconfig.py / farmconfig.py is located. # See wiki/config/... for s...
true
true
08ff5c6d52137259f0b356bab7622e008ccccd56
38,817
py
Python
django/template/base.py
mradziej/django
5d38965743a369981c9a738a298f467f854a2919
[ "BSD-3-Clause" ]
1
2016-05-09T15:03:04.000Z
2016-05-09T15:03:04.000Z
django/template/base.py
mradziej/django
5d38965743a369981c9a738a298f467f854a2919
[ "BSD-3-Clause" ]
null
null
null
django/template/base.py
mradziej/django
5d38965743a369981c9a738a298f467f854a2919
[ "BSD-3-Clause" ]
null
null
null
import imp import re from functools import partial from inspect import getargspec from django.conf import settings from django.template.context import Context, RequestContext, ContextPopException from django.utils.importlib import import_module from django.utils.itercompat import is_iterable from django.utils.function...
37.944282
142
0.590669
import imp import re from functools import partial from inspect import getargspec from django.conf import settings from django.template.context import Context, RequestContext, ContextPopException from django.utils.importlib import import_module from django.utils.itercompat import is_iterable from django.utils.function...
false
true
08ff5c7d96547b65c0957ac2645cda96422df7c0
613
py
Python
AlgoExpert-Array/FirstDuplicateValue.py
betaSolver05609/LeetCode
0e7386e7ead80597e2893ec45f6dc6dfcd5d694b
[ "MIT" ]
null
null
null
AlgoExpert-Array/FirstDuplicateValue.py
betaSolver05609/LeetCode
0e7386e7ead80597e2893ec45f6dc6dfcd5d694b
[ "MIT" ]
null
null
null
AlgoExpert-Array/FirstDuplicateValue.py
betaSolver05609/LeetCode
0e7386e7ead80597e2893ec45f6dc6dfcd5d694b
[ "MIT" ]
null
null
null
#First Duplicate Value #O(n) time and O(1) solution #This Solution will only work if it is guarenteed that numbers in array #will always be between 1 and n where n is the length of the array def firstDuplicateValue(array): # Write your code here. for value in array: absValue=abs(value) if array[absValue-1]<...
19.15625
71
0.693312
def firstDuplicateValue(array): for value in array: absValue=abs(value) if array[absValue-1]<0: return value else: array[absValue-1]*=-1 return [] def firstDuplicateValue(array): HashMap={} for i in range(len(array)): if array[i] in HashMap: return array[i] else: HashMap[arr...
false
true
08ff5c825df1bc12896d476bdc459231bb893927
4,033
py
Python
nba_api/stats/endpoints/videodetails.py
adureja/nba_api
2e1f8ee55e513689aea410bf663a09a3d7c34283
[ "MIT" ]
1
2019-02-20T19:19:19.000Z
2019-02-20T19:19:19.000Z
nba_api/stats/endpoints/videodetails.py
adureja/nba_api
2e1f8ee55e513689aea410bf663a09a3d7c34283
[ "MIT" ]
null
null
null
nba_api/stats/endpoints/videodetails.py
adureja/nba_api
2e1f8ee55e513689aea410bf663a09a3d7c34283
[ "MIT" ]
2
2020-08-09T06:00:19.000Z
2022-03-04T16:39:30.000Z
from nba_api.stats.endpoints._base import Endpoint from nba_api.stats.library.http import NBAStatsHTTP from nba_api.stats.library.parameters import ContextMeasureDetailed, LastNGames, Month, Period, Season, SeasonTypeAllStar, AheadBehindNullable, ClutchTimeNullable, EndPeriodNullable, EndRangeNullable, GameSegmentNulla...
51.050633
429
0.626333
from nba_api.stats.endpoints._base import Endpoint from nba_api.stats.library.http import NBAStatsHTTP from nba_api.stats.library.parameters import ContextMeasureDetailed, LastNGames, Month, Period, Season, SeasonTypeAllStar, AheadBehindNullable, ClutchTimeNullable, EndPeriodNullable, EndRangeNullable, GameSegmentNulla...
true
true
08ff5cfe817ef82dc21312ddf41e9bec536b7280
380
py
Python
catch/datasets/enterovirus_b.py
broadinstitute/catch
2fedca15f921116f580de8b2ae7ac9972932e59e
[ "MIT" ]
58
2018-01-24T16:31:37.000Z
2022-02-25T07:46:35.000Z
catch/datasets/enterovirus_b.py
broadinstitute/catch
2fedca15f921116f580de8b2ae7ac9972932e59e
[ "MIT" ]
29
2018-04-17T17:36:06.000Z
2022-02-25T11:48:58.000Z
catch/datasets/enterovirus_b.py
broadinstitute/catch
2fedca15f921116f580de8b2ae7ac9972932e59e
[ "MIT" ]
16
2018-05-23T12:19:41.000Z
2021-08-09T04:16:00.000Z
"""Dataset with 'Enterovirus B' sequences. A dataset with 529 'Enterovirus B' genomes. THIS PYTHON FILE WAS GENERATED BY A COMPUTER PROGRAM! DO NOT EDIT! """ import sys from catch.datasets import GenomesDatasetSingleChrom ds = GenomesDatasetSingleChrom(__name__, __file__, __spec__) ds.add_fasta_path("data/enterov...
23.75
66
0.786842
import sys from catch.datasets import GenomesDatasetSingleChrom ds = GenomesDatasetSingleChrom(__name__, __file__, __spec__) ds.add_fasta_path("data/enterovirus_b.fasta.gz", relative=True) sys.modules[__name__] = ds
true
true
08ff5d1bfb8c95875a9bc48fae0dc7e6e3a485b3
3,958
py
Python
demo/http_logs/apps/loadgen.py
guylapid/materialize
8629a120a5a628b6ef06f379b48ba723797db944
[ "MIT" ]
3,840
2020-02-13T18:28:21.000Z
2022-03-31T17:25:04.000Z
demo/http_logs/apps/loadgen.py
guylapid/materialize
8629a120a5a628b6ef06f379b48ba723797db944
[ "MIT" ]
5,802
2020-02-13T18:59:27.000Z
2022-03-31T21:50:24.000Z
demo/http_logs/apps/loadgen.py
guylapid/materialize
8629a120a5a628b6ef06f379b48ba723797db944
[ "MIT" ]
295
2020-02-13T18:49:32.000Z
2022-03-30T10:55:12.000Z
#!/usr/bin/env python3 # Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source Licen...
26.039474
82
0.608893
import bisect import random import string import sys import time from collections import namedtuple from enum import Enum, auto import numpy as np import requests class State(Enum): GATEWAY = 0 SEARCH = auto() DETAIL = auto() QUIT = auto() DO_NOTHING = auto() def default_sampler(): return...
true
true
08ff5eb1a29e05904c02f3fa1d9a93d6388587d2
201
py
Python
hardware/misc/transpose-csv.py
cojocar/mfit
4ade3002e41b3fa8d3ddf6b99a742a933502c194
[ "MIT" ]
3
2021-11-23T00:39:13.000Z
2022-02-17T19:08:22.000Z
hardware/misc/transpose-csv.py
microsoft/mfit
7a2401b5d3b6a3eb25df2ac23e8375e23595e57e
[ "MIT" ]
null
null
null
hardware/misc/transpose-csv.py
microsoft/mfit
7a2401b5d3b6a3eb25df2ac23e8375e23595e57e
[ "MIT" ]
null
null
null
with open('../fault-injector-sim/simulate-inj.csv') as file: lis = [x.replace('\n', '').split(';') for x in file] for x in zip(*lis): for y in x: print(y + ', ', end="") print('')
25.125
60
0.517413
with open('../fault-injector-sim/simulate-inj.csv') as file: lis = [x.replace('\n', '').split(';') for x in file] for x in zip(*lis): for y in x: print(y + ', ', end="") print('')
true
true
08ff5f3716061267f3b67a1b059688730f5e578a
3,529
py
Python
monai/losses/contrastive.py
tatuanb/monai_V1
41e492b61c78bb3c303f38b03fe9fdc74a3c2e96
[ "Apache-2.0" ]
1
2020-11-13T23:13:23.000Z
2020-11-13T23:13:23.000Z
monai/losses/contrastive.py
tatuanb/monai_V1
41e492b61c78bb3c303f38b03fe9fdc74a3c2e96
[ "Apache-2.0" ]
2
2020-11-13T23:15:00.000Z
2020-11-16T14:54:08.000Z
monai/losses/contrastive.py
tatuanb/monai_V1
41e492b61c78bb3c303f38b03fe9fdc74a3c2e96
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 - 2021 MONAI Consortium # 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...
39.651685
113
0.668461
import torch from torch.nn import functional as F from torch.nn.modules.loss import _Loss from monai.utils import deprecated_arg class ContrastiveLoss(_Loss): @deprecated_arg(name="reduction", since="0.8", msg_suffix="`reduction` is no longer supported.") def __init__(self, temperature: float = 0.5, batch...
true
true
08ff607c9a20e955614ed5a231cf66ae857debbe
2,681
py
Python
examples/simulation.py
pints-team/markov-builder
7accb6e7bc64a2a2afa35d4594c3f4dc3284923c
[ "BSD-3-Clause" ]
1
2018-09-21T10:15:34.000Z
2018-09-21T10:15:34.000Z
examples/simulation.py
pints-team/markov-builder
7accb6e7bc64a2a2afa35d4594c3f4dc3284923c
[ "BSD-3-Clause" ]
null
null
null
examples/simulation.py
pints-team/markov-builder
7accb6e7bc64a2a2afa35d4594c3f4dc3284923c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Simulate data from the Beattie model and M10 model using a Gillespie # algorithm output plots into examples/example_output or # MARKOVBUILDER_EXAMPLE_OUTPUT if it exists import logging import os import sys import matplotlib.pyplot as plt import pandas as pd from markov_builder import exampl...
33.098765
119
0.669153
import logging import os import sys import matplotlib.pyplot as plt import pandas as pd from markov_builder import example_models def main(): mc = example_models.construct_four_state_chain() protocol = ((-80, 100), (20, 200)) SimulateStepProtocol(mc, protocol, name="Beattie") def Simulat...
true
true
08ff6092826fda810a51e27ff81ab016aefdd9d4
6,953
py
Python
saleor/dashboard/forms.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
8
2018-07-17T13:13:21.000Z
2022-03-01T17:02:34.000Z
saleor/dashboard/forms.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
13
2020-03-24T17:57:29.000Z
2021-12-13T20:33:54.000Z
saleor/dashboard/forms.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
1
2019-12-04T22:24:13.000Z
2019-12-04T22:24:13.000Z
import json from typing import Optional from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django_prices.forms import MoneyField from draftjs_sanitizer import SafeJSONEncoder from prices import Money def set_initial_money(ins...
34.59204
86
0.641306
import json from typing import Optional from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django_prices.forms import MoneyField from draftjs_sanitizer import SafeJSONEncoder from prices import Money def set_initial_money(ins...
true
true
08ff60df90c876eaf57c41964b924648c24539c0
16,215
py
Python
models/local_model.py
hummat/if-net
6eb6b3860159ba0a46167844020d8cbc7717fbb4
[ "Unlicense" ]
null
null
null
models/local_model.py
hummat/if-net
6eb6b3860159ba0a46167844020d8cbc7717fbb4
[ "Unlicense" ]
null
null
null
models/local_model.py
hummat/if-net
6eb6b3860159ba0a46167844020d8cbc7717fbb4
[ "Unlicense" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F # 1D convolution is used for the decoder. It acts as a standard FC, but allows to use a batch of point samples features, # additionally to the batch over the input objects. # The dimensions are used as follows: # batch_size (N) = #3D objects , channel...
41.364796
120
0.569904
import torch import torch.nn as nn import torch.nn.functional as F class ShapeNet32Vox(nn.Module): def __init__(self, hidden_dim=256): super(ShapeNet32Vox, self).__init__() self.conv_1 = nn.Conv3d(1, 32, 3, padding=1) self.conv_1_1 = nn.Conv3d(32, 64, 3, padding=1) self.conv_...
true
true
08ff61aa584d89019d074ab34171c245952084d1
34,421
py
Python
search/search_service/proxy/elasticsearch.py
kokizzu/amundsen
710786443125e513f6d23ecda7442fe47a2a6523
[ "Apache-2.0" ]
1
2022-01-09T03:23:59.000Z
2022-01-09T03:23:59.000Z
search/search_service/proxy/elasticsearch.py
kokizzu/amundsen
710786443125e513f6d23ecda7442fe47a2a6523
[ "Apache-2.0" ]
null
null
null
search/search_service/proxy/elasticsearch.py
kokizzu/amundsen
710786443125e513f6d23ecda7442fe47a2a6523
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import logging import uuid from typing import ( Any, Dict, List, Union, ) from amundsen_common.models.api import health_check from amundsen_common.models.index_map import ( FEATURE_INDEX_MAP, TABLE_INDEX_MAP, USER_INDEX_MA...
40.880048
144
0.534557
import logging import uuid from typing import ( Any, Dict, List, Union, ) from amundsen_common.models.api import health_check from amundsen_common.models.index_map import ( FEATURE_INDEX_MAP, TABLE_INDEX_MAP, USER_INDEX_MAP, ) from amundsen_common.models.search import ( Filter, HighlightOptions, SearchRes...
true
true
08ff61e4cc1f0942df3ec3ca855e6285030c0ebd
1,667
py
Python
apis/migrations/0001_initial.py
jeffshek/betterself
51468253fc31373eb96e0e82189b9413f3d76ff5
[ "MIT" ]
98
2017-07-29T14:26:36.000Z
2022-02-28T04:10:15.000Z
apis/migrations/0001_initial.py
jeffshek/betterself
51468253fc31373eb96e0e82189b9413f3d76ff5
[ "MIT" ]
1,483
2017-05-30T00:05:56.000Z
2022-03-31T12:37:06.000Z
apis/migrations/0001_initial.py
lawrendran/betterself
51468253fc31373eb96e0e82189b9413f3d76ff5
[ "MIT" ]
13
2017-11-08T00:02:35.000Z
2022-02-28T04:10:32.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-25 12:51 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migration...
37.886364
121
0.622675
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
true
true
08ff6282cd7b6b74204f0ebf34229c924d49b9bb
805
py
Python
src/forums/serializers/posts.py
earth-emoji/august
065d4b449a138ead1557293bffcb20cd2db90a41
[ "BSD-2-Clause" ]
null
null
null
src/forums/serializers/posts.py
earth-emoji/august
065d4b449a138ead1557293bffcb20cd2db90a41
[ "BSD-2-Clause" ]
10
2021-03-19T10:47:13.000Z
2022-03-12T00:28:30.000Z
src/forums/serializers/posts.py
earth-emoji/august
065d4b449a138ead1557293bffcb20cd2db90a41
[ "BSD-2-Clause" ]
null
null
null
from django.utils import formats from rest_framework import serializers from accounts.models import Professional from forums.models import Post, Topic class PostSerializer(serializers.ModelSerializer): author_pk = serializers.PrimaryKeyRelatedField( queryset=Professional.objects.all(), source='author', wr...
36.590909
113
0.725466
from django.utils import formats from rest_framework import serializers from accounts.models import Professional from forums.models import Post, Topic class PostSerializer(serializers.ModelSerializer): author_pk = serializers.PrimaryKeyRelatedField( queryset=Professional.objects.all(), source='author', wr...
true
true
08ff62986988957ffa5aa211bd4b70d9df09c3c3
543
py
Python
2016/day_16/16-1.py
zigapk/adventofcode
693b03014ae1dc6c303e717b3d7e9b7658d6211b
[ "MIT" ]
null
null
null
2016/day_16/16-1.py
zigapk/adventofcode
693b03014ae1dc6c303e717b3d7e9b7658d6211b
[ "MIT" ]
null
null
null
2016/day_16/16-1.py
zigapk/adventofcode
693b03014ae1dc6c303e717b3d7e9b7658d6211b
[ "MIT" ]
null
null
null
import re input_data = "00111101111101000" length = 272 data = input_data while len(data) < length: a = data b = a b = b[::-1] new_b = "" for char in b: if char == "1": new_b += "0" else: new_b += "1" b = new_b data = a + "0" + b data = data[:length] checksum = data while ...
18.724138
49
0.519337
import re input_data = "00111101111101000" length = 272 data = input_data while len(data) < length: a = data b = a b = b[::-1] new_b = "" for char in b: if char == "1": new_b += "0" else: new_b += "1" b = new_b data = a + "0" + b data = data[:length] checksum = data while ...
true
true
08ff639632b207fd201def2c8d6af656d2596173
6,978
py
Python
spyhook/__init__.py
andrekeller/spyhook
f119b1d0f210fdd78728a265e77c249be71e35c5
[ "MIT" ]
null
null
null
spyhook/__init__.py
andrekeller/spyhook
f119b1d0f210fdd78728a265e77c249be71e35c5
[ "MIT" ]
4
2020-03-24T16:22:08.000Z
2020-11-15T14:43:02.000Z
spyhook/__init__.py
andrekeller/spyhook
f119b1d0f210fdd78728a265e77c249be71e35c5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """spyhook - simple python (gitlab) webhook receiver""" # stdlib import argparse import configparser import logging import re import socket import ssl import subprocess import sys import tempfile import time import uuid from fnmatch import fnmatch from functools import partial # 3rd-party from...
37.315508
99
0.589997
import argparse import configparser import logging import re import socket import ssl import subprocess import sys import tempfile import time import uuid from fnmatch import fnmatch from functools import partial from aiohttp import web from spyhook.log import RequestLoggerAdapter from spyhook.version import __vers...
true
true
08ff64d9048b2c0f50473a5a284694b55ae60c9f
4,007
py
Python
panda_gym/envs/tasks/pick_and_place.py
hannahaih/panda-gym
cbbe9deb85f53d6f4f805917781857cdce0af957
[ "MIT" ]
1
2021-12-24T01:43:14.000Z
2021-12-24T01:43:14.000Z
panda_gym/envs/tasks/pick_and_place.py
hannahaih/panda-gym
cbbe9deb85f53d6f4f805917781857cdce0af957
[ "MIT" ]
null
null
null
panda_gym/envs/tasks/pick_and_place.py
hannahaih/panda-gym
cbbe9deb85f53d6f4f805917781857cdce0af957
[ "MIT" ]
null
null
null
from typing import Any, Dict, Union import numpy as np from panda_gym.envs.core import Task from panda_gym.pybullet import PyBullet from panda_gym.utils import distance class PickAndPlace(Task): def __init__( self, sim: PyBullet, reward_type: str = "sparse", distance_threshold: f...
41.309278
114
0.627652
from typing import Any, Dict, Union import numpy as np from panda_gym.envs.core import Task from panda_gym.pybullet import PyBullet from panda_gym.utils import distance class PickAndPlace(Task): def __init__( self, sim: PyBullet, reward_type: str = "sparse", distance_threshold: f...
true
true
08ff667952d227be57c750d5da88dec354f70ce4
4,439
py
Python
xain/grpc/hellonumproto_pb2.py
matklad/xain
e3520d481459820b35dccc540ac9948555cbb8cb
[ "Apache-2.0" ]
1
2020-05-30T20:34:19.000Z
2020-05-30T20:34:19.000Z
xain/grpc/hellonumproto_pb2.py
danieljanes/ox-msc-diss-code-freeze
20c6881cabdf1e3ed7a9ddb40bbdcc7a7fd22f78
[ "Apache-2.0" ]
null
null
null
xain/grpc/hellonumproto_pb2.py
danieljanes/ox-msc-diss-code-freeze
20c6881cabdf1e3ed7a9ddb40bbdcc7a7fd22f78
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: xain/grpc/hellonumproto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goo...
32.166667
442
0.776526
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
08ff69b4ff0fbd20ff707558218dd5060092ed72
4,047
py
Python
nova/tests/functional/api_sample_tests/test_quota_sets.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
5
2016-04-28T16:20:38.000Z
2021-04-25T11:19:03.000Z
nova/tests/functional/api_sample_tests/test_quota_sets.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
5
2016-07-11T20:59:47.000Z
2020-07-28T09:56:35.000Z
nova/tests/functional/api_sample_tests/test_quota_sets.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
5
2020-04-08T20:24:45.000Z
2020-10-05T19:02:13.000Z
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
43.98913
78
0.623672
from oslo_config import cfg from nova.tests.functional.api_sample_tests import api_sample_base CONF = cfg.CONF CONF.import_opt('osapi_compute_extension', 'nova.api.openstack.compute.legacy_v2.extensions') class QuotaSetsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21): ADMIN_API = True ...
true
true
08ff6a217bf60833dcd1c9d16a6d59bdfb6e5655
6,828
py
Python
rnn.py
tommccoy1/copynet
6bc6f3a81a4922d06bdd9e86dcd7125251282076
[ "MIT" ]
null
null
null
rnn.py
tommccoy1/copynet
6bc6f3a81a4922d06bdd9e86dcd7125251282076
[ "MIT" ]
null
null
null
rnn.py
tommccoy1/copynet
6bc6f3a81a4922d06bdd9e86dcd7125251282076
[ "MIT" ]
null
null
null
import math import torch import torch.nn as nn import torch.nn.functional as F import random use_cuda = torch.cuda.is_available() if use_cuda: available_device = torch.device('cuda') else: available_device = torch.device('cpu') # Generic sequential encoder class EncoderRNN(nn.Module): def __init__(sel...
37.311475
193
0.65993
import math import torch import torch.nn as nn import torch.nn.functional as F import random use_cuda = torch.cuda.is_available() if use_cuda: available_device = torch.device('cuda') else: available_device = torch.device('cpu') class EncoderRNN(nn.Module): def __init__(self, input_size, hidden_size, r...
true
true
08ff6b2659f5dee9c411e3cb6cfb927747bc30ea
682
py
Python
programmers/lv2/42888.py
KLumy/Basic-Algorithm
e52e4200c1955a9062569814ff3418dd06666845
[ "MIT" ]
1
2021-01-22T15:58:32.000Z
2021-01-22T15:58:32.000Z
programmers/lv2/42888.py
KLumy/Basic-Algorithm
e52e4200c1955a9062569814ff3418dd06666845
[ "MIT" ]
null
null
null
programmers/lv2/42888.py
KLumy/Basic-Algorithm
e52e4200c1955a9062569814ff3418dd06666845
[ "MIT" ]
null
null
null
from typing import List def solution(records: List[str]): logger = [] id_name = dict() message = {"Enter": "님이 들어왔습니다.", "Leave": "님이 나갔습니다."} for record in records: op, id, *name = record.split() if name: id_name[id] = name[0] if op in message: logger....
22
59
0.532258
from typing import List def solution(records: List[str]): logger = [] id_name = dict() message = {"Enter": "님이 들어왔습니다.", "Leave": "님이 나갔습니다."} for record in records: op, id, *name = record.split() if name: id_name[id] = name[0] if op in message: logger....
true
true
08ff6b4824bb04da269eab7c707593c75464823d
1,868
py
Python
Python tips/format.py
LouisdeBruijn/Medium
afc66ee061c10b7107ba1661d2b9dfed0559dfc3
[ "MIT" ]
41
2020-05-03T19:32:37.000Z
2022-02-02T22:03:07.000Z
Python tips/format.py
LouisdeBruijn/Medium
afc66ee061c10b7107ba1661d2b9dfed0559dfc3
[ "MIT" ]
2
2021-11-11T03:11:52.000Z
2021-12-16T01:51:13.000Z
Python tips/format.py
LouisdeBruijn/Medium
afc66ee061c10b7107ba1661d2b9dfed0559dfc3
[ "MIT" ]
45
2020-03-29T02:43:24.000Z
2022-03-15T02:14:27.000Z
#!/usr/bin/env python3 # File name: format.py # Description: Basic format for Python scripts # Author: Louis de Bruijn # Date: 19-05-2020 import argparse import logging import sys from logging import error, info def parse_arguments(): """Read arguments from a command line.""" parser = argparse.ArgumentParser...
23.35
108
0.642398
import argparse import logging import sys from logging import error, info def parse_arguments(): parser = argparse.ArgumentParser(description="Arguments get parsed via --commands") parser.add_argument( "-v", metavar="verbosity", type=int, default=2, help="Verbosity of ...
true
true
08ff6bb279fd7a01695f7ecca0a764c541087bc5
7,902
py
Python
apps/amo/tests/test_amo_utils.py
clouserw/olympia
1d5755b08a526372ec66e6bc64ab636018181969
[ "BSD-3-Clause" ]
1
2017-07-14T19:22:39.000Z
2017-07-14T19:22:39.000Z
apps/amo/tests/test_amo_utils.py
clouserw/olympia
1d5755b08a526372ec66e6bc64ab636018181969
[ "BSD-3-Clause" ]
6
2021-02-02T23:08:48.000Z
2021-09-08T02:47:17.000Z
apps/amo/tests/test_amo_utils.py
clouserw/olympia
1d5755b08a526372ec66e6bc64ab636018181969
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os import tempfile import unittest from django.conf import settings from django.core.cache import cache from django.core.validators import ValidationError from django.utils import translation import mock from nose.tools import eq_, assert_raises, raises from amo.utils import (cache_ns_...
31.482072
78
0.574158
import os import tempfile import unittest from django.conf import settings from django.core.cache import cache from django.core.validators import ValidationError from django.utils import translation import mock from nose.tools import eq_, assert_raises, raises from amo.utils import (cache_ns_key, escape_all, find_la...
true
true
08ff6c13e88dfbeb8b7348462da0c6acd46baade
3,934
py
Python
django/contrib/gis/geos/tests/test_io.py
devops2014/djangosite
db77915c9fd35a203edd8206f702ee4082f04d4a
[ "BSD-3-Clause" ]
null
null
null
django/contrib/gis/geos/tests/test_io.py
devops2014/djangosite
db77915c9fd35a203edd8206f702ee4082f04d4a
[ "BSD-3-Clause" ]
null
null
null
django/contrib/gis/geos/tests/test_io.py
devops2014/djangosite
db77915c9fd35a203edd8206f702ee4082f04d4a
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import binascii import unittest from unittest import skipUnless from django.utils.six import memoryview from ..import HAS_GEOS # isort:skip if HAS_GEOS: from .. import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter @skipUnless(HAS_GEOS, "Geos is required.") c...
34.508772
90
0.651754
from __future__ import unicode_literals import binascii import unittest from unittest import skipUnless from django.utils.six import memoryview from ..import HAS_GEOS if HAS_GEOS: from .. import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter @skipUnless(HAS_GEOS, "Geos is required.") class GEOSIOTe...
true
true
08ff6cf574eef46300f5d792cc0a1b6cb60b3373
236,339
py
Python
install/InstallTools.py
grimpy/jumpscaleX_core
c24d6d47fccc0801e578fedb376ef110f7a00bad
[ "Apache-2.0" ]
null
null
null
install/InstallTools.py
grimpy/jumpscaleX_core
c24d6d47fccc0801e578fedb376ef110f7a00bad
[ "Apache-2.0" ]
null
null
null
install/InstallTools.py
grimpy/jumpscaleX_core
c24d6d47fccc0801e578fedb376ef110f7a00bad
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import getpass import pickle import re import copy import time try: import msgpack except: msgpack = None try: import redis except: redis = None DEFAULT_BRANCH = "development" GITREPOS = {} GITREPOS["builders_extra"] = [ "https://github.com/threefoldtech/ju...
33.513755
183
0.532511
from __future__ import unicode_literals import getpass import pickle import re import copy import time try: import msgpack except: msgpack = None try: import redis except: redis = None DEFAULT_BRANCH = "development" GITREPOS = {} GITREPOS["builders_extra"] = [ "https://github.com/threefoldtech/ju...
true
true
08ff6cfd8471b4baacc22ee3e1f632d4349dc2e9
2,636
py
Python
officy/jsonfile.py
liujuanjuan1984/officepy
79782cd12024e6a81bbc15d0ac31da7591d055dd
[ "MIT" ]
null
null
null
officy/jsonfile.py
liujuanjuan1984/officepy
79782cd12024e6a81bbc15d0ac31da7591d055dd
[ "MIT" ]
null
null
null
officy/jsonfile.py
liujuanjuan1984/officepy
79782cd12024e6a81bbc15d0ac31da7591d055dd
[ "MIT" ]
null
null
null
import datetime import json import os from officy.jsonlist import JsonList class MyEncoder(json.JSONEncoder): def default(self, obj): import numpy as np if isinstance(obj, np.integer): return int(obj) elif isinstance(obj, np.floating): return float(obj) el...
29.288889
86
0.562215
import datetime import json import os from officy.jsonlist import JsonList class MyEncoder(json.JSONEncoder): def default(self, obj): import numpy as np if isinstance(obj, np.integer): return int(obj) elif isinstance(obj, np.floating): return float(obj) el...
true
true
08ff6d30bc2b71a0c779c2b3b356c749fefae8d4
53,963
py
Python
Assets/Python/Screens/PlatyBuilder/WBUnitScreen.py
macaurther/DOCUSA
40586727c351d1b1130c05c2d4648cca3a8bacf5
[ "MIT" ]
93
2015-11-20T04:13:36.000Z
2022-03-24T00:03:08.000Z
Assets/Python/Screens/PlatyBuilder/WBUnitScreen.py
macaurther/DOCUSA
40586727c351d1b1130c05c2d4648cca3a8bacf5
[ "MIT" ]
206
2015-11-09T00:27:15.000Z
2021-12-04T19:05:18.000Z
Assets/Python/Screens/PlatyBuilder/WBUnitScreen.py
dguenms/Dawn-of-Civilization
1c4f510af97a869637cddb4c0859759158cea5ce
[ "MIT" ]
117
2015-11-08T02:43:46.000Z
2022-02-12T06:29:00.000Z
from CvPythonExtensions import * import CvUtil import ScreenInput import CvScreenEnums import WBPromotionScreen import WBPlayerScreen import WBTeamScreen import WBPlotScreen import WBEventScreen import WBPlayerUnits import CvPlatyBuilderScreen import WBInfoScreen import Popup gc = CyGlobalContext() from CvPlatyBuilderS...
53.008841
320
0.715713
from CvPythonExtensions import * import CvUtil import ScreenInput import CvScreenEnums import WBPromotionScreen import WBPlayerScreen import WBTeamScreen import WBPlotScreen import WBEventScreen import WBPlayerUnits import CvPlatyBuilderScreen import WBInfoScreen import Popup gc = CyGlobalContext() from CvPlatyBuilderS...
true
true
08ff6d3e94438d88d060e71e13b35e1f983a6a15
8,033
py
Python
steamdb-bot/main.py
MrMarble/steamdb-telegram-bot
0fa5a856c1cebc4e276a834561c3f7687ca9a120
[ "MIT" ]
1
2021-05-25T23:14:03.000Z
2021-05-25T23:14:03.000Z
steamdb-bot/main.py
MrMarble/steamdb-telegram-bot
0fa5a856c1cebc4e276a834561c3f7687ca9a120
[ "MIT" ]
null
null
null
steamdb-bot/main.py
MrMarble/steamdb-telegram-bot
0fa5a856c1cebc4e276a834561c3f7687ca9a120
[ "MIT" ]
1
2020-08-20T06:46:48.000Z
2020-08-20T06:46:48.000Z
import logging import time import telebot from telebot import types from utils import admin from utils import database from utils import settings from utils import steam logging.basicConfig(level=logging.INFO) bot = telebot.TeleBot(settings.TELEGRAM_TOKEN, skip_pending=True) steam = steam.Steam() db = database.DB() ...
43.421622
130
0.643097
import logging import time import telebot from telebot import types from utils import admin from utils import database from utils import settings from utils import steam logging.basicConfig(level=logging.INFO) bot = telebot.TeleBot(settings.TELEGRAM_TOKEN, skip_pending=True) steam = steam.Steam() db = database.DB() ...
true
true
08ff6d4a2709c0a6697bbd75327a648c6fc9b2da
13,618
py
Python
pycatia/hybrid_shape_interfaces/hybrid_shape_circle.py
evereux/catia_python
08948585899b12587b0415ce3c9191a408b34897
[ "MIT" ]
90
2019-02-21T10:05:28.000Z
2022-03-19T01:53:41.000Z
pycatia/hybrid_shape_interfaces/hybrid_shape_circle.py
Luanee/pycatia
ea5eef8178f73de12404561c00baf7a7ca30da59
[ "MIT" ]
99
2019-05-21T08:29:12.000Z
2022-03-25T09:55:15.000Z
pycatia/hybrid_shape_interfaces/hybrid_shape_circle.py
Luanee/pycatia
ea5eef8178f73de12404561c00baf7a7ca30da59
[ "MIT" ]
26
2019-04-04T06:31:36.000Z
2022-03-30T07:24:47.000Z
#! usr/bin/python3.6 """ Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-07-06 14:02:20.222384 .. warning:: The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. They are there as a guide as to how the visual basic / catscript function...
35.18863
111
0.477677
from pycatia.hybrid_shape_interfaces.hybrid_shape_direction import HybridShapeDirection from pycatia.in_interfaces.reference import Reference from pycatia.knowledge_interfaces.angle import Angle from pycatia.mec_mod_interfaces.hybrid_shape import HybridShape from pycatia.system_interfaces.system_service import SystemS...
true
true
08ff7001f18d9d4afaba135f89063302a4ec9163
2,075
py
Python
iblrig/blocks.py
jennan/iblrig
46591429951f5cec6deb307318c7c63616c240f3
[ "MIT" ]
null
null
null
iblrig/blocks.py
jennan/iblrig
46591429951f5cec6deb307318c7c63616c240f3
[ "MIT" ]
null
null
null
iblrig/blocks.py
jennan/iblrig
46591429951f5cec6deb307318c7c63616c240f3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Author: Niccolò Bonacchi # @Date: Friday, February 8th 2019, 11:39:30 am import numpy as np import iblrig.misc as misc def get_block_len(factor, min_, max_): return int(misc.texp(factor=factor, min_=min_, max_=max_)) def update_block_params(tph): tph.block_tr...
27.666667
76
0.660241
import numpy as np import iblrig.misc as misc def get_block_len(factor, min_, max_): return int(misc.texp(factor=factor, min_=min_, max_=max_)) def update_block_params(tph): tph.block_trial_num += 1 if tph.block_trial_num > tph.block_len: tph.block_num += 1 tph.block_trial_num = 1 ...
true
true
08ff707751895778bc28ccd12a6acb34c471baab
7,649
py
Python
tests/unit-tests/environment/test_environment.py
tum-ei-eda/mlonmcu
0d5c114b85f2ae9e48e7d815bfce8df04c2bdb46
[ "Apache-2.0" ]
3
2022-03-07T09:38:12.000Z
2022-03-24T09:28:36.000Z
tests/unit-tests/environment/test_environment.py
tum-ei-eda/mlonmcu
0d5c114b85f2ae9e48e7d815bfce8df04c2bdb46
[ "Apache-2.0" ]
24
2022-03-07T16:09:32.000Z
2022-03-31T08:08:51.000Z
tests/unit-tests/environment/test_environment.py
tum-ei-eda/mlonmcu
0d5c114b85f2ae9e48e7d815bfce8df04c2bdb46
[ "Apache-2.0" ]
1
2022-03-07T09:38:17.000Z
2022-03-07T09:38:17.000Z
# # Copyright (c) 2022 TUM Department of Electrical and Computer Engineering. # # This file is part of MLonMCU. # See https://github.com/tum-ei-eda/mlonmcu.git for further info. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You m...
37.495098
108
0.693947
import os import mock import pytest import configparser from mlonmcu.environment.init import ( create_environment_directories, create_venv_directory, ask_user, initialize_environment, ) from mlonmcu.environment.list import get_alternative_name from mlonmcu.environment.templates import fill_template, wr...
true
true
08ff70f44f4eb47110ada914e4f08e549543402a
132,615
py
Python
mrcnn/model.py
lazy-turtle/SharpMask-RCNN
f6a3106b029b8147cecec429ec9a3d747449274f
[ "MIT" ]
1
2019-08-29T16:50:49.000Z
2019-08-29T16:50:49.000Z
mrcnn/model.py
lazy-turtle/SharpMask-RCNN
f6a3106b029b8147cecec429ec9a3d747449274f
[ "MIT" ]
null
null
null
mrcnn/model.py
lazy-turtle/SharpMask-RCNN
f6a3106b029b8147cecec429ec9a3d747449274f
[ "MIT" ]
null
null
null
""" Mask R-CNN The main Mask R-CNN model implementation. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import os import random import datetime import re import math import logging from collections import OrderedDict import multiprocessing im...
44.442024
128
0.616069
import os import random import datetime import re import math import logging from collections import OrderedDict import multiprocessing import numpy as np import tensorflow as tf import keras import keras.backend as K import keras.layers as KL import keras.engine as KE import keras.models as KM import keras.backend as...
true
true
08ff711b395cd4c17ad0e4faa37f6ff93ad1e010
488
py
Python
ke2daira/kana2mora.py
otariidae/ke2daira.py
6eceff29b623bb1a5e98c46b79b4d2fbfb1db5d1
[ "Apache-2.0" ]
null
null
null
ke2daira/kana2mora.py
otariidae/ke2daira.py
6eceff29b623bb1a5e98c46b79b4d2fbfb1db5d1
[ "Apache-2.0" ]
null
null
null
ke2daira/kana2mora.py
otariidae/ke2daira.py
6eceff29b623bb1a5e98c46b79b4d2fbfb1db5d1
[ "Apache-2.0" ]
null
null
null
# Python port of https://github.com/otariidae/kana2mora from typing import List SUTEKANA = {"ァ", "ィ", "ゥ", "ェ", "ォ", "ャ", "ュ", "ョ", "ヮ"} def katakana2mora(kana: str) -> List[str]: chars = list(kana) moras: List[str] = [] for char in chars: if char in SUTEKANA: previous_char = "" if l...
25.684211
66
0.557377
from typing import List SUTEKANA = {"ァ", "ィ", "ゥ", "ェ", "ォ", "ャ", "ュ", "ョ", "ヮ"} def katakana2mora(kana: str) -> List[str]: chars = list(kana) moras: List[str] = [] for char in chars: if char in SUTEKANA: previous_char = "" if len(moras) == 0 else moras.pop() mora = previ...
true
true
08ff714c8dda7fb59624ec442e3310905c5b2872
6,946
py
Python
tcapy/excel/tcapy_xl.py
Ahrvo-Trading-Systems/tcapy
df8439aa5c754fc9a7fde463c44c489b27112f76
[ "Apache-2.0" ]
189
2020-03-20T17:03:04.000Z
2022-03-30T13:33:27.000Z
tcapy/excel/tcapy_xl.py
Ahrvo-Trading-Systems/tcapy
df8439aa5c754fc9a7fde463c44c489b27112f76
[ "Apache-2.0" ]
4
2020-06-06T14:58:21.000Z
2022-03-10T22:31:15.000Z
tcapy/excel/tcapy_xl.py
Ahrvo-Trading-Systems/tcapy
df8439aa5c754fc9a7fde463c44c489b27112f76
[ "Apache-2.0" ]
60
2020-03-20T17:06:56.000Z
2022-03-26T02:48:58.000Z
__author__ = 'saeedamen' # Saeed Amen / saeed@cuemacro.com # # Copyright 2020 Cuemacro Ltd. - http//www.cuemacro.com / @cuemacro # # See the License for the specific language governing permissions and limitations under the License. # import time import datetime import xlwings as xw from tcapy.analysis.tcarequest im...
45.697368
120
0.609991
__author__ = 'saeedamen' import time import datetime import xlwings as xw from tcapy.analysis.tcarequest import TCARequest from tcapy.analysis.tcaengine import TCAEngineImpl from tcapy.analysis.algos.metric import * from tcapy.analysis.algos.resultsform import * from tcapy.analysis.algos.benchmark import * from t...
true
true
08ff717413b610b30455a187a5d333297eda4c8c
4,465
py
Python
custom_components/shelly/configuration_schema.py
Cleming/ShellyForHASS
9e624b7497cfd2ae4c6d8cabd783841c4ffb19a2
[ "MIT" ]
null
null
null
custom_components/shelly/configuration_schema.py
Cleming/ShellyForHASS
9e624b7497cfd2ae4c6d8cabd783841c4ffb19a2
[ "MIT" ]
null
null
null
custom_components/shelly/configuration_schema.py
Cleming/ShellyForHASS
9e624b7497cfd2ae4c6d8cabd783841c4ffb19a2
[ "MIT" ]
null
null
null
"""Shelly Configuration Schemas.""" # pylint: disable=dangerous-default-value from homeassistant.const import ( CONF_DEVICES, CONF_DISCOVERY, CONF_ID, CONF_NAME, CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP) import voluptuous as vol import homeassistant.helpers.config_validat...
43.77451
79
0.670325
from homeassistant.const import ( CONF_DEVICES, CONF_DISCOVERY, CONF_ID, CONF_NAME, CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP) import voluptuous as vol import homeassistant.helpers.config_validation as cv from .const import * ALL_SENSORS_W_EXTRA = list(ALL_SENSORS.keys()...
true
true
08ff71b1a59c0c88ff09fc31de54d1b8f4e97448
4,819
py
Python
controlm_client/models/passwords_object.py
apsinha-equinix/controlm-client
f24e0f935c82306074f4e4025cf62c217348dc3f
[ "MIT" ]
1
2021-12-02T08:49:25.000Z
2021-12-02T08:49:25.000Z
controlm_client/models/passwords_object.py
apsinha-equinix/controlm-client
f24e0f935c82306074f4e4025cf62c217348dc3f
[ "MIT" ]
null
null
null
controlm_client/models/passwords_object.py
apsinha-equinix/controlm-client
f24e0f935c82306074f4e4025cf62c217348dc3f
[ "MIT" ]
null
null
null
# coding: utf-8 """ Control-M Services Provides access to BMC Control-M Services # noqa: E501 OpenAPI spec version: 9.18.3 Contact: support@bmc.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class PasswordsObject(obj...
27.695402
92
0.579373
import pprint import re import six class PasswordsObject(object): swagger_types = { 'user': 'str', 'current_password': 'str', 'new_password': 'str' } attribute_map = { 'user': 'user', 'current_password': 'currentPassword', 'new_password': 'newPassword...
true
true
08ff725ff399cd1cac7daf03bb1eda9d8c14415f
1,223
py
Python
setup.py
denmat/colorteller-aws-cdk
87644f01cbd4293d5efaab530056e368b2f14603
[ "MIT" ]
3
2020-01-24T13:53:33.000Z
2021-07-01T15:46:12.000Z
setup.py
denmat/colorteller-aws-cdk
87644f01cbd4293d5efaab530056e368b2f14603
[ "MIT" ]
null
null
null
setup.py
denmat/colorteller-aws-cdk
87644f01cbd4293d5efaab530056e368b2f14603
[ "MIT" ]
1
2020-07-03T13:19:43.000Z
2020-07-03T13:19:43.000Z
import setuptools with open("README.md") as fp: long_description = fp.read() setuptools.setup( name="colorteller-appmesh", version="0.0.1", description="Example of CDK and AppMesh, based off https://github.com/aws/aws-app-mesh-examples", long_description=long_description, long_description_c...
24.46
101
0.60834
import setuptools with open("README.md") as fp: long_description = fp.read() setuptools.setup( name="colorteller-appmesh", version="0.0.1", description="Example of CDK and AppMesh, based off https://github.com/aws/aws-app-mesh-examples", long_description=long_description, long_description_c...
true
true
08ff73346d605d307b5171d895709fbb28ae8a72
443
py
Python
src/sfctl/helps/__init__.py
vshan/service-fabric-cli
f491a301a03db3e0c11bb17b2a2315949ff40ba3
[ "MIT" ]
17
2019-07-01T05:03:02.000Z
2022-03-12T11:22:55.000Z
src/sfctl/helps/__init__.py
vshan/service-fabric-cli
f491a301a03db3e0c11bb17b2a2315949ff40ba3
[ "MIT" ]
86
2018-05-30T13:31:54.000Z
2019-04-04T22:08:22.000Z
src/sfctl/helps/__init__.py
vshan/service-fabric-cli
f491a301a03db3e0c11bb17b2a2315949ff40ba3
[ "MIT" ]
20
2019-05-16T22:55:08.000Z
2021-09-13T12:31:19.000Z
# ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- ""...
40.272727
79
0.501129
from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
true
true
08ff74463bb3f3ec4f36708a013e81bb5d1ee192
12,594
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_network_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_network_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_network_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.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 may ...
61.135922
180
0.779419
from typing import TYPE_CHECKING from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: from typing import Any, Optional from azure.core.credentials import TokenCredential from azure.core.pipeline.transport import HttpRequest, HttpResponse from ....
true
true
08ff74b0e40f8c3aef9dd8f6a5246e08aaae9668
1,576
py
Python
986_IntervalListIntersections.py
satwiksabharwal01/LeetcodeProblemSolutions
c08fb77b76519f9c543d74f84cb2c0477aeddcd9
[ "MIT" ]
1
2020-06-03T22:00:54.000Z
2020-06-03T22:00:54.000Z
986_IntervalListIntersections.py
AmiGandhi/leetcode
238186f1e4dd7f243caab47173ebc2511ae5902e
[ "MIT" ]
null
null
null
986_IntervalListIntersections.py
AmiGandhi/leetcode
238186f1e4dd7f243caab47173ebc2511ae5902e
[ "MIT" ]
null
null
null
# Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order. # Return the intersection of these two interval lists. # (Formally, a closed interval [a, b] (with a <= b) denotes the set of real numbers x with a <= x <= b. The intersection of two closed intervals is a set of r...
35.818182
300
0.564721
class Solution: def intervalIntersection(self, A, B): i = j = 0 interval = [] while i < len(A) and j < len(B): low = max(A[i][0], B[j][0]) high = min(A[i][1], B[j][1]) if low <= high: interval.append([low,high]) ...
true
true
08ff774717edb00e83a7c03b05fb963f627d8c5a
3,235
py
Python
magenta/common/beam_search_test.py
laurens-in/magenta
be6ed8d5b1eb2986ca277aa9c574a7912dd5ed0f
[ "Apache-2.0" ]
1
2021-12-27T10:43:39.000Z
2021-12-27T10:43:39.000Z
magenta/common/beam_search_test.py
kyungyunlee/magenta
cf80d19fc0c2e935821f284ebb64a8885f793717
[ "Apache-2.0" ]
null
null
null
magenta/common/beam_search_test.py
kyungyunlee/magenta
cf80d19fc0c2e935821f284ebb64a8885f793717
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
36.348315
79
0.702318
from magenta.common import beam_search import tensorflow.compat.v1 as tf class BeamSearchTest(tf.test.TestCase): def _generate_step_fn(self, sequences, states, scores): value = 0 for i, seq in enumerate(sequences): seq.append(value) if value == 0: states[i] *= 2 else...
true
true
08ff78ffd23b026acad1634ebf86528b02362640
511
py
Python
docs/sphinx-theme/caer_sphinx_theme/__init__.py
jasmcaus/image-deep-learning-keras
11ff37867c2cb86a92aceb0ac24accb3607e3635
[ "MIT" ]
681
2020-08-13T09:34:41.000Z
2022-03-19T15:38:04.000Z
docs/sphinx-theme/caer_sphinx_theme/__init__.py
jasmcaus/image-deep-learning-keras
11ff37867c2cb86a92aceb0ac24accb3607e3635
[ "MIT" ]
30
2020-11-03T19:23:14.000Z
2021-10-13T17:19:34.000Z
docs/sphinx-theme/caer_sphinx_theme/__init__.py
jasmcaus/image-deep-learning-keras
11ff37867c2cb86a92aceb0ac24accb3607e3635
[ "MIT" ]
127
2020-11-03T19:14:30.000Z
2022-03-17T12:01:32.000Z
"""Caer Sphinx theme. From https://github.com/shiftlab/lightning_sphinx_theme. """ from os import path __version__ = '0.0.1' __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" cur_dir = path.abspath(path.dirname(path.dirname(__file__))) return cur_dir # Se...
25.55
96
0.74364
from os import path __version__ = '0.0.1' __version_full__ = __version__ def get_html_theme_path(): cur_dir = path.abspath(path.dirname(path.dirname(__file__))) return cur_dir def setup(app): app.add_html_theme('caer_sphinx_theme', path.abspath(path.dirname(__file__)))
true
true
08ff792d82fcd6de808c39b42ddce5fb53052915
680
py
Python
config.py
HumaticsLAB/AttentionBasedMultiModalRNN
0c060a97cdddf1348938a5f2d456e83e5f8bf887
[ "MIT" ]
5
2021-09-21T12:32:06.000Z
2022-03-19T05:15:09.000Z
config.py
HumaticsLAB/AttentionBasedMultiModalRNN
0c060a97cdddf1348938a5f2d456e83e5f8bf887
[ "MIT" ]
1
2021-11-15T09:14:58.000Z
2021-11-15T09:15:11.000Z
config.py
HumaticsLAB/AttentionBasedMultiModalRNN
0c060a97cdddf1348938a5f2d456e83e5f8bf887
[ "MIT" ]
2
2021-09-30T19:22:20.000Z
2021-10-16T08:33:48.000Z
import torch DEVICE = torch.device('cuda:0') DATASET_PATH = "dataset/images" TRAIN_DATASET = "dataset/train.csv" TEST_DATASET = "dataset/test.csv" COMPOSED_GTREND = "dataset/gtrends.csv" CATEG_DICT = "category_labels.pt" COLOR_DICT = "color_labels.pt" FAB_DICT = "fabric_labels.pt" NUM_EPOCHS = 50 USE_TEACHERFORCING = ...
24.285714
61
0.770588
import torch DEVICE = torch.device('cuda:0') DATASET_PATH = "dataset/images" TRAIN_DATASET = "dataset/train.csv" TEST_DATASET = "dataset/test.csv" COMPOSED_GTREND = "dataset/gtrends.csv" CATEG_DICT = "category_labels.pt" COLOR_DICT = "color_labels.pt" FAB_DICT = "fabric_labels.pt" NUM_EPOCHS = 50 USE_TEACHERFORCING = ...
true
true
08ff794827af1677f3b0d9e6d123e06193464760
522
py
Python
nctrader/price_handler/sqlite_db/__init__.py
nwillemse/nctrader
4754ccdeae465ef4674a829f35fc3f78cf1d3ea4
[ "MIT" ]
1
2019-11-13T06:38:12.000Z
2019-11-13T06:38:12.000Z
nctrader/price_handler/sqlite_db/__init__.py
nwillemse/nctrader
4754ccdeae465ef4674a829f35fc3f78cf1d3ea4
[ "MIT" ]
null
null
null
nctrader/price_handler/sqlite_db/__init__.py
nwillemse/nctrader
4754ccdeae465ef4674a829f35fc3f78cf1d3ea4
[ "MIT" ]
1
2021-05-11T11:24:08.000Z
2021-05-11T11:24:08.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Nov 1 10:53:38 2016 @author: nwillemse """ from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, create_session from sqlalchemy.ext.declarative import declarative_base engine = None db_session = scoped_session(lambda: create_...
22.695652
64
0.752874
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, create_session from sqlalchemy.ext.declarative import declarative_base engine = None db_session = scoped_session(lambda: create_session(bind=engine)) Base = declarative_base() Base.query = db_session.query_property() def init_engine(uri...
true
true
08ff79691d2d55188a409e63800809126c4fe448
629
py
Python
ui/mainwindow/svgbutton.py
turalaksel/cadnano2.1
5e5b0e9085755c2e810346d3e580994bf4fad174
[ "MIT" ]
23
2018-11-26T12:00:22.000Z
2022-03-27T14:38:43.000Z
ui/mainwindow/svgbutton.py
turalaksel/cadnano2.1
5e5b0e9085755c2e810346d3e580994bf4fad174
[ "MIT" ]
23
2018-12-20T20:04:42.000Z
2022-03-04T03:58:23.000Z
ui/mainwindow/svgbutton.py
turalaksel/cadnano2.1
5e5b0e9085755c2e810346d3e580994bf4fad174
[ "MIT" ]
23
2018-07-04T02:06:00.000Z
2022-03-27T14:31:00.000Z
import util util.qtWrapImport('QtCore', globals(), ['QObject', 'pyqtSignal', 'Qt']) util.qtWrapImport('QtWidgets', globals(), ['QGraphicsObject']) util.qtWrapImport('QtSvg', globals(), ['QSvgRenderer']) class SVGButton(QGraphicsObject): def __init__(self, fname, parent=None): super(SVGButton, self).__init...
31.45
71
0.678855
import util util.qtWrapImport('QtCore', globals(), ['QObject', 'pyqtSignal', 'Qt']) util.qtWrapImport('QtWidgets', globals(), ['QGraphicsObject']) util.qtWrapImport('QtSvg', globals(), ['QSvgRenderer']) class SVGButton(QGraphicsObject): def __init__(self, fname, parent=None): super(SVGButton, self).__init...
true
true
08ff797b358c8bc505a4ef4dc4d6a117c8ef0c5c
613
py
Python
1]. DSA + CP/1]. DSA/1]. Data Structures/03]. Recursion/Python/Climbing_Stairs.py
geeknarendra/The-Complete-FAANG-Preparation
3ed22719022bc66bd05c5c1ed091fe605e979908
[ "MIT" ]
null
null
null
1]. DSA + CP/1]. DSA/1]. Data Structures/03]. Recursion/Python/Climbing_Stairs.py
geeknarendra/The-Complete-FAANG-Preparation
3ed22719022bc66bd05c5c1ed091fe605e979908
[ "MIT" ]
null
null
null
1]. DSA + CP/1]. DSA/1]. Data Structures/03]. Recursion/Python/Climbing_Stairs.py
geeknarendra/The-Complete-FAANG-Preparation
3ed22719022bc66bd05c5c1ed091fe605e979908
[ "MIT" ]
null
null
null
# You are climbing a staircase. It takes n steps to reach the top. # Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? # Constraints: ## 1 <= n <= 45 # Memoization (Top Down) class Solution: def __init__(self): self.ways = [0] * 46 def climbStairs(self, n...
29.190476
98
0.58075
class Solution: def __init__(self): self.ways = [0] * 46 def climbStairs(self, n: int) -> int: if (n <= 2): return n elif self.ways[n] != 0: return self.ways[n] else: self.ways[n] = self.climbStairs(n - 1) + self.climbStairs(n - 2) ...
true
true
08ff79c1fae46028f949227b771995298e7477d3
22,704
py
Python
cdp_backend/database/models.py
Shak2000/cdp-backend
b3d342e39bd8144172af54448f2abbf2180d8f63
[ "MIT" ]
null
null
null
cdp_backend/database/models.py
Shak2000/cdp-backend
b3d342e39bd8144172af54448f2abbf2180d8f63
[ "MIT" ]
null
null
null
cdp_backend/database/models.py
Shak2000/cdp-backend
b3d342e39bd8144172af54448f2abbf2180d8f63
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import unicodedata from datetime import datetime from typing import Dict from fireo import fields from fireo.models import Model from ..utils import file_utils from . import validators from .constants import ( EventMinutesItemDecision, MatterStatusDecis...
30.681081
88
0.634514
import re import unicodedata from datetime import datetime from typing import Dict from fireo import fields from fireo.models import Model from ..utils import file_utils from . import validators from .constants import ( EventMinutesItemDecision, MatterStatusDecision, Order, VoteDecision, ) from .type...
true
true
08ff7acd21fa91b9086fa93c4d7f11d1d36638f1
136
py
Python
backend/ml/apps.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
backend/ml/apps.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
backend/ml/apps.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
from django.apps import AppConfig class MlConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "ml"
19.428571
56
0.742647
from django.apps import AppConfig class MlConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "ml"
true
true
08ff7ada991db8ae37fb19d14024e7b49b45deaa
29,912
py
Python
Neural-Networks-and-Deep-Learning/Logistic Regression as a Neural Network/Logistic Regression with a Neural Network mindset.py
PauloCirino/deep-learning-coursera
69a89206bf4b0ec3148a1b69a2b31fb79e6adc7c
[ "MIT" ]
null
null
null
Neural-Networks-and-Deep-Learning/Logistic Regression as a Neural Network/Logistic Regression with a Neural Network mindset.py
PauloCirino/deep-learning-coursera
69a89206bf4b0ec3148a1b69a2b31fb79e6adc7c
[ "MIT" ]
null
null
null
Neural-Networks-and-Deep-Learning/Logistic Regression as a Neural Network/Logistic Regression with a Neural Network mindset.py
PauloCirino/deep-learning-coursera
69a89206bf4b0ec3148a1b69a2b31fb79e6adc7c
[ "MIT" ]
null
null
null
# coding: utf-8 # # Logistic Regression with a Neural Network mindset # # Welcome to your first (required) programming assignment! You will build a logistic regression classifier to recognize cats. This assignment will step you through how to do this with a Neural Network mindset, and so will also hone your intuiti...
36.746929
427
0.639777
# - [numpy](www.numpy.org) is the fundamental package for scientific computing with Python. # - [h5py](http://www.h5py.org) is a common package to interact with a dataset that is stored on an H5 file. # - [matplotlib](http://matplotlib.org) is a famous library to plot graphs in Python. # - [PIL](http://www.pythonwar...
true
true
08ff7b4efb104b2035e378ccc989147acb973d9b
15,958
py
Python
src/slimit/lexer.py
ContextLogic/slimit
406f95b33170f5e2f80118d64475ee169bc621d7
[ "MIT" ]
null
null
null
src/slimit/lexer.py
ContextLogic/slimit
406f95b33170f5e2f80118d64475ee169bc621d7
[ "MIT" ]
null
null
null
src/slimit/lexer.py
ContextLogic/slimit
406f95b33170f5e2f80118d64475ee169bc621d7
[ "MIT" ]
1
2017-11-13T00:44:41.000Z
2017-11-13T00:44:41.000Z
############################################################################### # # Copyright (c) 2011 Ruslan Spivak # # 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, inc...
34.025586
79
0.452876
__author__ = 'Ruslan Spivak <ruslan.spivak@gmail.com>' import ply.lex from slimit.unicode import ( LETTER, DIGIT, COMBINING_MARK, CONNECTOR_PUNCTUATION, ) TOKENS_THAT_IMPLY_DIVISON = frozenset([ 'ID', 'NUMBER', 'STRING', 'REGEX', 'TRUE', 'FALSE', 'NULL', 'THIS', ...
false
true
08ff7b87d9d1412cdd7b25b02e62f06a49905954
952
py
Python
pepega/src/pyPEG/pyPEGElements.py
dendy1/pepega
f95a138c000bc90f7cd6c38496de441107b42dbc
[ "MIT" ]
null
null
null
pepega/src/pyPEG/pyPEGElements.py
dendy1/pepega
f95a138c000bc90f7cd6c38496de441107b42dbc
[ "MIT" ]
null
null
null
pepega/src/pyPEG/pyPEGElements.py
dendy1/pepega
f95a138c000bc90f7cd6c38496de441107b42dbc
[ "MIT" ]
null
null
null
from pypeg2 import * from src.AST.ASTNode import ASTNode from src.Visitor.VisitorElement import VisitorElement class CustomNamespace(Namespace, ASTNode, VisitorElement): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) ASTNode.__init__(self) class CustomList(List, ASTNode, Vi...
34
58
0.683824
from pypeg2 import * from src.AST.ASTNode import ASTNode from src.Visitor.VisitorElement import VisitorElement class CustomNamespace(Namespace, ASTNode, VisitorElement): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) ASTNode.__init__(self) class CustomList(List, ASTNode, Vi...
true
true
08ff7bd2eae66194a5f6df523d4e1744f3f715e8
2,886
py
Python
script/finetune_all_models.py
lthamm/concept-embeddings-and-ilp
27592c6424147a2fbb54d7daebc92cd72b3f4a0c
[ "MIT" ]
3
2020-11-02T12:21:29.000Z
2021-08-02T14:01:37.000Z
script/finetune_all_models.py
lthamm/concept-embeddings-and-ilp
27592c6424147a2fbb54d7daebc92cd72b3f4a0c
[ "MIT" ]
2
2020-11-06T07:58:13.000Z
2022-03-13T16:11:30.000Z
script/finetune_all_models.py
lthamm/concept-embeddings-and-ilp
27592c6424147a2fbb54d7daebc92cd72b3f4a0c
[ "MIT" ]
1
2020-11-03T14:54:16.000Z
2020-11-03T14:54:16.000Z
"""Fine-tune all available models on picasso with default settings dataset if .pkl is missing. Call as `python script/finetune_all_models.py` to fine-tune all known models with default values. Resulting .pkl files are stored in MODELS_ROOT folder. """ import argparse import os import sys PROJECT_ROOT = "." # assume, ...
50.631579
96
0.665974
import argparse import os import sys PROJECT_ROOT = "." MODELS_ROOT = os.path.join(PROJECT_ROOT, 'models') PICASSO_ROOT = os.path.join(PROJECT_ROOT, "dataset", "picasso_dataset") sys.path.insert(0, PROJECT_ROOT) from sources.model.finetuning import picasso_data_loader, finetune from sources.model.finetuning import d...
true
true
08ff7bf22209f4abdfa458bd5e2056db75bd73cb
508
py
Python
neural/util/exception.py
Hengle/face-nn
edc4ae1e3aedac88b99d3216693aa81406a519b1
[ "MIT" ]
319
2019-10-09T05:34:22.000Z
2022-03-31T07:52:28.000Z
neural/util/exception.py
CFengFeng/face-nn
a76a689774b5101959d3c5b8a04898ae82c7bfc2
[ "MIT" ]
19
2019-11-08T01:41:02.000Z
2022-03-24T11:46:05.000Z
neural/util/exception.py
CFengFeng/face-nn
a76a689774b5101959d3c5b8a04898ae82c7bfc2
[ "MIT" ]
103
2019-10-05T08:33:56.000Z
2022-03-29T13:38:20.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: penghuailiang # @Date : 2019-09-20 import traceback import util.logit as log class NeuralException(Exception): """docstring for NnException""" def __init__(self, message): log.info("neural error: " + message) self.message = "neural e...
20.32
53
0.637795
import traceback import util.logit as log class NeuralException(Exception): def __init__(self, message): log.info("neural error: " + message) self.message = "neural exception: " + message class IOException(Exception): def __init__(self, message): log.error("io error: " + message)...
true
true
08ff7bfdcca3f3e3a0dedeeaf82f7167a55704df
1,346
py
Python
scCloud/scCloud/annotate_cluster/run_annotate_cluster.py
broadinstitute/scRNA-Seq
03aafb92274a97f4d634ac9e42f0e0feca91ed98
[ "BSD-3-Clause" ]
12
2019-04-08T11:39:33.000Z
2022-02-22T02:50:27.000Z
scCloud/scCloud/annotate_cluster/run_annotate_cluster.py
broadinstitute/scRNA-Seq
03aafb92274a97f4d634ac9e42f0e0feca91ed98
[ "BSD-3-Clause" ]
null
null
null
scCloud/scCloud/annotate_cluster/run_annotate_cluster.py
broadinstitute/scRNA-Seq
03aafb92274a97f4d634ac9e42f0e0feca91ed98
[ "BSD-3-Clause" ]
3
2019-03-06T20:44:33.000Z
2020-02-17T13:43:46.000Z
import time import pkg_resources from scCloud.tools import read_input from . import annotate_cluster def run_annotate_cluster(input_file, output_file, threshold, ignoreNA = False, json_file = "human"): start = time.time() if json_file == "human_immune": json_file = pkg_resources.resource_filename('scCloud.annotat...
44.866667
107
0.768945
import time import pkg_resources from scCloud.tools import read_input from . import annotate_cluster def run_annotate_cluster(input_file, output_file, threshold, ignoreNA = False, json_file = "human"): start = time.time() if json_file == "human_immune": json_file = pkg_resources.resource_filename('scCloud.annotat...
true
true
08ff7db7bdfb18c09984274cd673bffe02b05803
1,353
py
Python
cluster.py
mfatihaktas/load-flow-control
440fedab3c1bab13c491fef315507a20a1664bae
[ "MIT" ]
null
null
null
cluster.py
mfatihaktas/load-flow-control
440fedab3c1bab13c491fef315507a20a1664bae
[ "MIT" ]
null
null
null
cluster.py
mfatihaktas/load-flow-control
440fedab3c1bab13c491fef315507a20a1664bae
[ "MIT" ]
null
null
null
import threading, time, random from collections import deque from debug_utils import * from msg import * from controller import * class Cluster(): def __init__(self, _id, fc_server, fc_client, handle_result, max_delay): self._id = _id self.fc_server = fc_server self.fc_client = fc_client self.handle_result =...
23.736842
73
0.707317
import threading, time, random from collections import deque from debug_utils import * from msg import * from controller import * class Cluster(): def __init__(self, _id, fc_server, fc_client, handle_result, max_delay): self._id = _id self.fc_server = fc_server self.fc_client = fc_client self.handle_result =...
true
true
08ff7e58ce1e1f75221d4b721c894b292e46dfad
1,668
py
Python
models/ModelSet/settings.py
Easonyesheng/StereoCameraToolk
660e43019d0687e96e6da3aca48c1c423ae5abff
[ "MIT" ]
27
2020-10-16T07:21:35.000Z
2022-03-11T02:56:13.000Z
models/ModelSet/settings.py
Easonyesheng/StereoCamera
9319b7f4e5ce36833de722a15e1074e82b8b4f84
[ "MIT" ]
null
null
null
models/ModelSet/settings.py
Easonyesheng/StereoCamera
9319b7f4e5ce36833de722a15e1074e82b8b4f84
[ "MIT" ]
6
2021-02-01T09:54:40.000Z
2022-03-11T03:16:39.000Z
import os import yaml # Normal # IMGPATH = r'D:\DeepCalib\CalibrationNet\Dataset\ForCalibAc30_newdata\img' # IMGPATH = r'D:\DeepCalib\CalibrationNet\Dataset\ForCalibAc5_bgdata\img' # IMGPATH = r'D:\DeepCalib\CalibrationNet\Dataset\data_vs_noise\data_vs_noise_radius1.5_bg\ForCalibAc5_bg\img' # IMGPATH = r'D:\DeepC...
39.714286
110
0.791966
import os import yaml IMGPATH = r'D:\DeepCalib\CalibrationNet\Dataset\data_vs_dist\data_dist045\ForCalibAc0_dist045\dist_img' GT_path = r'D:\DeepCalib\CalibrationNet\Dataset\data_vs_dist\data_dist045\ForCalibAc0_dist045\GT\0-0.npy' CAMERANAME = 'test' STEREOIMGPATH = '/Users/zhangyesheng/Desktop/Dataset/Stereo...
true
true
08ff8015b2645e7d139a4899579db125c1acaad2
1,316
py
Python
lantz/drivers/microsoft/usbcam.py
mtsolmn/lantz-drivers
f48caf9000ddd08f2abb837d832e341410af4788
[ "BSD-3-Clause" ]
4
2019-05-04T00:10:53.000Z
2020-10-22T18:08:40.000Z
lantz/drivers/microsoft/usbcam.py
mtsolmn/lantz-drivers
f48caf9000ddd08f2abb837d832e341410af4788
[ "BSD-3-Clause" ]
3
2019-07-12T13:44:17.000Z
2020-10-22T19:32:08.000Z
lantz/drivers/microsoft/usbcam.py
mtsolmn/lantz-drivers
f48caf9000ddd08f2abb837d832e341410af4788
[ "BSD-3-Clause" ]
9
2019-04-03T17:07:03.000Z
2021-02-15T21:53:55.000Z
import cv2 import numpy as np from lantz.core import Action, Driver, Feat class USBCam(Driver): def __init__(self, device_id): self.device_id = device_id self._flipud = False self._fliplr = False self._rotation = 0 return def initialize(self): self.capture = c...
21.933333
59
0.588146
import cv2 import numpy as np from lantz.core import Action, Driver, Feat class USBCam(Driver): def __init__(self, device_id): self.device_id = device_id self._flipud = False self._fliplr = False self._rotation = 0 return def initialize(self): self.capture = c...
true
true
08ff80c55830ddffd71bd003af55a7458e31c5a5
294
py
Python
fastafl/variants.py
kevaday/alphazero-general
f01a386a84e1561e5e89ea779be192739a11ba73
[ "MIT" ]
15
2021-06-01T16:38:27.000Z
2022-02-08T03:13:00.000Z
fastafl/variants.py
kevaday/alphazero-general
f01a386a84e1561e5e89ea779be192739a11ba73
[ "MIT" ]
2
2021-07-16T15:32:06.000Z
2021-07-30T02:20:24.000Z
fastafl/variants.py
kevaday/alphazero-general
f01a386a84e1561e5e89ea779be192739a11ba73
[ "MIT" ]
6
2021-06-14T10:24:15.000Z
2021-11-24T12:56:25.000Z
hnefatafl = """50022222005 00000200000 00000000000 20000100002 20001110002 22011711022 20001110002 20000100002 00000000000 00000200000 50022222005""" brandubh = """5002005 0002000 0001000 2217122 0001000 0002000 5002005""" hnefatafl_args = (hnefatafl, False) brandubh_args = (brandubh, True)
12.782609
35
0.816327
hnefatafl = """50022222005 00000200000 00000000000 20000100002 20001110002 22011711022 20001110002 20000100002 00000000000 00000200000 50022222005""" brandubh = """5002005 0002000 0001000 2217122 0001000 0002000 5002005""" hnefatafl_args = (hnefatafl, False) brandubh_args = (brandubh, True)
true
true
08ff812601c5227ca9c5ff485e402612d2cfda44
925
py
Python
examples/Graph_Neural_Networks/TensorFlow/GCN-Jaccard.py
Jie-Re/GraphGallery
37a2e807bb21e5ed986ade935ac9619b62bfdd90
[ "MIT" ]
null
null
null
examples/Graph_Neural_Networks/TensorFlow/GCN-Jaccard.py
Jie-Re/GraphGallery
37a2e807bb21e5ed986ade935ac9619b62bfdd90
[ "MIT" ]
null
null
null
examples/Graph_Neural_Networks/TensorFlow/GCN-Jaccard.py
Jie-Re/GraphGallery
37a2e807bb21e5ed986ade935ac9619b62bfdd90
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import graphgallery import tensorflow as tf from graphgallery import functional as gf graphgallery.set_memory_growth() print("GraphGallery version: ", graphgallery.__version__) print("TensorFlow version: ", tf.__version__) ''' Load Datasets - cora/citeseer/pubmed/dblp/polblogs/...
33.035714
99
0.778378
import graphgallery import tensorflow as tf from graphgallery import functional as gf graphgallery.set_memory_growth() print("GraphGallery version: ", graphgallery.__version__) print("TensorFlow version: ", tf.__version__) from graphgallery.datasets import Planetoid, NPZDataset data = NPZDataset('cora', root="~/Gra...
true
true
08ff838b6fd2f7d78b6eeda8c76770c52c1b43c8
701
py
Python
tests/tests_io/test_buffered_file_iterator.py
jjj999/bamboo
92f0bd7f6b3dbaf4452850ec5c8b2cbc550e810a
[ "MIT" ]
4
2021-03-08T14:22:05.000Z
2022-01-21T14:17:51.000Z
tests/tests_io/test_buffered_file_iterator.py
jjj999/bamboo
92f0bd7f6b3dbaf4452850ec5c8b2cbc550e810a
[ "MIT" ]
5
2021-06-28T11:52:18.000Z
2021-07-19T10:39:34.000Z
tests/tests_io/test_buffered_file_iterator.py
jjj999/bamboo
92f0bd7f6b3dbaf4452850ec5c8b2cbc550e810a
[ "MIT" ]
null
null
null
import os import unittest from bamboo import BufferedFileIterator from .. import PATH_IMAGE class TestBufferedFileIterator(unittest.TestCase): def setUp(self) -> None: self.total = os.path.getsize(PATH_IMAGE) self.bufsize = 8192 self.iter = BufferedFileIterator(PATH_IMAGE, self.bufsize)...
22.612903
66
0.603424
import os import unittest from bamboo import BufferedFileIterator from .. import PATH_IMAGE class TestBufferedFileIterator(unittest.TestCase): def setUp(self) -> None: self.total = os.path.getsize(PATH_IMAGE) self.bufsize = 8192 self.iter = BufferedFileIterator(PATH_IMAGE, self.bufsize)...
true
true
08ff84030d7e282ae48fd8198566e4aa16949651
5,010
py
Python
basicsr/data/paired_image_dataset.py
daobook/BasicSR
87f8d9cd528e3edc478c8edcc11016545a5b58ef
[ "Apache-2.0" ]
null
null
null
basicsr/data/paired_image_dataset.py
daobook/BasicSR
87f8d9cd528e3edc478c8edcc11016545a5b58ef
[ "Apache-2.0" ]
1
2022-02-22T14:46:14.000Z
2022-02-22T14:46:14.000Z
basicsr/data/paired_image_dataset.py
daobook/BasicSR
87f8d9cd528e3edc478c8edcc11016545a5b58ef
[ "Apache-2.0" ]
null
null
null
from torch.utils import data as data from torchvision.transforms.functional import normalize from basicsr.data.data_util import paired_paths_from_folder, paired_paths_from_lmdb, paired_paths_from_meta_info_file from basicsr.data.transforms import augment, paired_random_crop from basicsr.utils import FileClient, imfrom...
47.264151
117
0.638723
from torch.utils import data as data from torchvision.transforms.functional import normalize from basicsr.data.data_util import paired_paths_from_folder, paired_paths_from_lmdb, paired_paths_from_meta_info_file from basicsr.data.transforms import augment, paired_random_crop from basicsr.utils import FileClient, imfrom...
true
true
08ff84694f7f061e8aecbe471df4104519a2049e
5,187
py
Python
app/recipe/tests/test_recipe_api.py
grihenrik/django-recipe-app
fd14dada08f164529d9562233e08beb790870eba
[ "MIT" ]
1
2021-04-09T08:31:13.000Z
2021-04-09T08:31:13.000Z
app/recipe/tests/test_recipe_api.py
grihenrik/django-recipe-app
fd14dada08f164529d9562233e08beb790870eba
[ "MIT" ]
null
null
null
app/recipe/tests/test_recipe_api.py
grihenrik/django-recipe-app
fd14dada08f164529d9562233e08beb790870eba
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from core.models import Recipe, Tag, Ingredient from recipe.serializers import RecipeSerializer, RecipeDetailSerializer RECIPES...
32.217391
71
0.646231
from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from core.models import Recipe, Tag, Ingredient from recipe.serializers import RecipeSerializer, RecipeDetailSerializer RECIPES...
true
true
08ff8577112d3a523af7b7148a4fb6f29a6ab7da
80
py
Python
shap/explainers/other/__init__.py
JiechengZhao/shap
ec26a1e0ccdf0a3885943e63502cf479194c13d1
[ "MIT" ]
null
null
null
shap/explainers/other/__init__.py
JiechengZhao/shap
ec26a1e0ccdf0a3885943e63502cf479194c13d1
[ "MIT" ]
null
null
null
shap/explainers/other/__init__.py
JiechengZhao/shap
ec26a1e0ccdf0a3885943e63502cf479194c13d1
[ "MIT" ]
null
null
null
from .coefficent import CoefficentExplainer from .random import RandomExplainer
26.666667
43
0.875
from .coefficent import CoefficentExplainer from .random import RandomExplainer
true
true
08ff85b4f043bf2bf4d4737470b745a7d6209c13
541
py
Python
0/jump_game2.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
4
2018-03-07T02:56:03.000Z
2021-06-15T05:43:31.000Z
0/jump_game2.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
null
null
null
0/jump_game2.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
1
2021-09-02T12:05:15.000Z
2021-09-02T12:05:15.000Z
class Solution(object): def jump(self, nums): """ :type nums: List[int] :rtype: int """ step_count = 0 last_jump_max = 0 current_jump_max = 0 for i in range(0, len(nums) - 1): current_jump_max = max(current_jump_max, i + nums[i]) ...
28.473684
65
0.508318
class Solution(object): def jump(self, nums): step_count = 0 last_jump_max = 0 current_jump_max = 0 for i in range(0, len(nums) - 1): current_jump_max = max(current_jump_max, i + nums[i]) if current_jump_max >= len(nums) - 1: return step_count ...
true
true
08ff8602dd20465827b020b8d29bbbc2cc9cb061
7,067
py
Python
auto_pose/ae/ae_train.py
HsiaoTsan/AugmentedAutoencoder
c60a96c4c29cf867a797d98bce34ee4dea5f2149
[ "MIT" ]
1
2020-12-06T03:43:53.000Z
2020-12-06T03:43:53.000Z
auto_pose/ae/ae_train.py
HsiaoTsan/AugmentedAutoencoder
c60a96c4c29cf867a797d98bce34ee4dea5f2149
[ "MIT" ]
null
null
null
auto_pose/ae/ae_train.py
HsiaoTsan/AugmentedAutoencoder
c60a96c4c29cf867a797d98bce34ee4dea5f2149
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import configparser import argparse import numpy as np import signal import shutil import cv2 os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import progressbar import tensorflow as tf import ae_factory as factory import utils as u def main(): workspace_path = os.environ.get('AE_WORK...
37.391534
132
0.632234
import os import configparser import argparse import numpy as np import signal import shutil import cv2 os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import progressbar import tensorflow as tf import ae_factory as factory import utils as u def main(): workspace_path = os.environ.get('AE_WORKSPACE_PATH') if wor...
false
true
08ff862be097f252f590062bf64b78c8a730a84b
6,231
py
Python
nasapi/tests/test_api.py
lockwooddev/python-nasapi
b487dd834c91b8a125a10c9b4b996ed2380da498
[ "MIT" ]
null
null
null
nasapi/tests/test_api.py
lockwooddev/python-nasapi
b487dd834c91b8a125a10c9b4b996ed2380da498
[ "MIT" ]
null
null
null
nasapi/tests/test_api.py
lockwooddev/python-nasapi
b487dd834c91b8a125a10c9b4b996ed2380da498
[ "MIT" ]
null
null
null
import os from datetime import date, datetime import mock import pytest import requests from requests.exceptions import RequestException from nasapi import Nasapi, NasapiError os.environ['NASA_API_KEY'] = 'testkey' class TestNasapi(object): def setup(self): self.api = Nasapi('foo') self.resp...
32.118557
99
0.599583
import os from datetime import date, datetime import mock import pytest import requests from requests.exceptions import RequestException from nasapi import Nasapi, NasapiError os.environ['NASA_API_KEY'] = 'testkey' class TestNasapi(object): def setup(self): self.api = Nasapi('foo') self.resp...
true
true
08ff8696be6ac4d59e82f501a4700e869584fe9c
16,717
py
Python
python/ccxt/async_support/braziliex.py
MBottjer/ccxt
c4644d5a8f6389222df3a36545404d16d0e592f2
[ "MIT" ]
null
null
null
python/ccxt/async_support/braziliex.py
MBottjer/ccxt
c4644d5a8f6389222df3a36545404d16d0e592f2
[ "MIT" ]
null
null
null
python/ccxt/async_support/braziliex.py
MBottjer/ccxt
c4644d5a8f6389222df3a36545404d16d0e592f2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base....
37.482063
126
0.485733
from ccxt.async_support.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import InvalidOrder class braziliex (Exchange): def describe(self): return self.deep_extend(super(braziliex,...
true
true
08ff87541e832565f6ab910390d18a3d49f43258
689
py
Python
maharashtra/maharashtra_sanityCheck.py
vahini01/electoral_rolls
82e42a6ee68844b1c8ac7899e8e7bf7a24e48d44
[ "MIT" ]
16
2018-01-22T02:03:09.000Z
2022-02-24T07:16:47.000Z
maharashtra/maharashtra_sanityCheck.py
vahini01/electoral_rolls
82e42a6ee68844b1c8ac7899e8e7bf7a24e48d44
[ "MIT" ]
2
2019-02-01T02:48:17.000Z
2020-09-06T06:09:35.000Z
maharashtra/maharashtra_sanityCheck.py
vahini01/electoral_rolls
82e42a6ee68844b1c8ac7899e8e7bf7a24e48d44
[ "MIT" ]
8
2018-01-22T06:48:07.000Z
2021-08-08T16:26:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jan 7 15:05:06 2018 @author: dhingratul """ import os import sys import pandas as pd sys.path.insert(0, '../tools/') import utils mdir = '../data/Maharashtra/' direc = os.listdir(mdir) for i in range(len(direc)): print(i, "/", len(direc)) fla...
22.225806
60
0.629898
import os import sys import pandas as pd sys.path.insert(0, '../tools/') import utils mdir = '../data/Maharashtra/' direc = os.listdir(mdir) for i in range(len(direc)): print(i, "/", len(direc)) flag = utils.is_valid_pdf(mdir + direc[i]) if flag is False: with open("maharashtra3.txt", "a") as myfi...
true
true
08ff87845b455d05d57b370d3e60048716820304
40,240
py
Python
py/desispec/database/redshift.py
ameisner/desispec
d18974396ff2e916e0d8a102cca83607f78f22ce
[ "BSD-3-Clause" ]
null
null
null
py/desispec/database/redshift.py
ameisner/desispec
d18974396ff2e916e0d8a102cca83607f78f22ce
[ "BSD-3-Clause" ]
null
null
null
py/desispec/database/redshift.py
ameisner/desispec
d18974396ff2e916e0d8a102cca83607f78f22ce
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ desispec.database.redshift ========================== Code for loading spectroscopic pipeline results (specifically redshifts) into a database. """ from __future__ import absolute_import, division, print_function import os impo...
40.687563
110
0.614637
from __future__ import absolute_import, division, print_function import os import re import glob import numpy as np from astropy.io import fits from astropy.table import Table from pytz import utc from sqlalchemy import (create_engine, event, ForeignKey, Column, DDL, BigInteger, Boolean, Integ...
true
true
08ff87c647d75d95c2310ec10be1d2607e2507a5
549
py
Python
blogposts/migrations/0006_auto_20180706_1951.py
prithaupadhyay/code-talk
1140e78d128c7cf7f7cf08039f3310bcd7cf0a52
[ "MIT" ]
null
null
null
blogposts/migrations/0006_auto_20180706_1951.py
prithaupadhyay/code-talk
1140e78d128c7cf7f7cf08039f3310bcd7cf0a52
[ "MIT" ]
null
null
null
blogposts/migrations/0006_auto_20180706_1951.py
prithaupadhyay/code-talk
1140e78d128c7cf7f7cf08039f3310bcd7cf0a52
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2018-07-06 14:21 from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('blogposts', '0005_auto_20180706_1924'), ] operations = [ migratio...
24.954545
134
0.653916
from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('blogposts', '0005_auto_20180706_1924'), ] operations = [ migrations.AlterField( model_name='question', name='que...
true
true
08ff89066afedf8459b736a96b8ce5997c1121ad
2,194
py
Python
openGaussBase/testcase/SYSTEM_CATALOGS&SYSTEM_VIEWS/SYSTEM_TABLE/Opengauss_Function_System_Table_Case0056.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SYSTEM_CATALOGS&SYSTEM_VIEWS/SYSTEM_TABLE/Opengauss_Function_System_Table_Case0056.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SYSTEM_CATALOGS&SYSTEM_VIEWS/SYSTEM_TABLE/Opengauss_Function_System_Table_Case0056.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
34.28125
119
0.623063
import sys import unittest from yat.test import Node from yat.test import macro sys.path.append(sys.path[0] + "/../") from testcase.utils.Logger import Logger from testcase.utils.Common import Common from testcase.utils.CommonSH import CommonSH logger = Logger() class IndexFileDamaged(unittest.TestCase): def s...
true
true
08ff89346b78a59ab5f5f7055cf78ceee7e8db21
1,985
py
Python
setup.py
Aokigahara23/flask-sqlalchemy
24350589c4cb5b25769a7b6b3aac7a2f6644fccc
[ "BSD-3-Clause" ]
2
2020-04-09T15:28:49.000Z
2020-04-18T02:55:16.000Z
setup.py
Aokigahara23/flask-sqlalchemy
24350589c4cb5b25769a7b6b3aac7a2f6644fccc
[ "BSD-3-Clause" ]
null
null
null
setup.py
Aokigahara23/flask-sqlalchemy
24350589c4cb5b25769a7b6b3aac7a2f6644fccc
[ "BSD-3-Clause" ]
1
2020-06-19T11:49:30.000Z
2020-06-19T11:49:30.000Z
import io import re from setuptools import setup with io.open("README.rst", "rt", encoding="utf8") as f: readme = f.read() with io.open("flask_sqlalchemy/__init__.py", "rt", encoding="utf8") as f: version = re.search(r'__version__ = "(.*?)"', f.read(), re.M).group(1) setup( name="Flask-SQLAlchemy", ...
38.921569
78
0.623678
import io import re from setuptools import setup with io.open("README.rst", "rt", encoding="utf8") as f: readme = f.read() with io.open("flask_sqlalchemy/__init__.py", "rt", encoding="utf8") as f: version = re.search(r'__version__ = "(.*?)"', f.read(), re.M).group(1) setup( name="Flask-SQLAlchemy", ...
true
true
08ff893ccbc78b254dd3c4d85cf48585e2974714
3,649
py
Python
functioning_implementations/own_algorithm_no_trigger/run_mujoco.py
DDTR/learning_task2
3a235edb6515d1c83dee996d90df7da11661fb61
[ "CNRI-Python" ]
null
null
null
functioning_implementations/own_algorithm_no_trigger/run_mujoco.py
DDTR/learning_task2
3a235edb6515d1c83dee996d90df7da11661fb61
[ "CNRI-Python" ]
null
null
null
functioning_implementations/own_algorithm_no_trigger/run_mujoco.py
DDTR/learning_task2
3a235edb6515d1c83dee996d90df7da11661fb61
[ "CNRI-Python" ]
null
null
null
# Copyright (c) 2020 Max Planck Gesellschaft # !/usr/bin/env python from baselines.common import set_global_seeds, tf_util as U from baselines import bench import os.path as osp import gym, logging import pdb import os dirname_rel = os.path.dirname(__file__) splitted = dirname_rel.split("/") dirname_rel = ("/".join(di...
37.234694
157
0.653604
from baselines.common import set_global_seeds, tf_util as U from baselines import bench import os.path as osp import gym, logging import pdb import os dirname_rel = os.path.dirname(__file__) splitted = dirname_rel.split("/") dirname_rel = ("/".join(dirname_rel.split("/")[:len(splitted)-3])+"/") from baselines import l...
true
true
08ff8a216ec583ee2b2223dc9ba95260619965a6
2,596
py
Python
src/Final-NeuralFBProphet/prop_two_optim.py
uniLee1119/Final-NeuralFBProphet
40caac12a1805da6a061452ea5571b48d6f2bb8f
[ "Apache-2.0" ]
1
2021-05-20T04:12:53.000Z
2021-05-20T04:12:53.000Z
src/Final-NeuralFBProphet/prop_two_optim.py
uniLee1119/Final-NeuralFBProphet
40caac12a1805da6a061452ea5571b48d6f2bb8f
[ "Apache-2.0" ]
null
null
null
src/Final-NeuralFBProphet/prop_two_optim.py
uniLee1119/Final-NeuralFBProphet
40caac12a1805da6a061452ea5571b48d6f2bb8f
[ "Apache-2.0" ]
null
null
null
import argparse import joblib import numpy as np import optuna from fbprophet import Prophet from optuna import Trial from optuna.samplers import TPESampler from sklearn.metrics import mean_squared_error from data.dataset import two_seconds_dataset parse = argparse.ArgumentParser("Optimize") parse.add_argument("--pa...
32.860759
80
0.673729
import argparse import joblib import numpy as np import optuna from fbprophet import Prophet from optuna import Trial from optuna.samplers import TPESampler from sklearn.metrics import mean_squared_error from data.dataset import two_seconds_dataset parse = argparse.ArgumentParser("Optimize") parse.add_argument("--pa...
true
true
08ff8a3a76dbf42d203a3c5b893122aa33d23897
10,528
py
Python
configs/common/CacheConfig.py
fwillard/gem5_arc
a874f6d918351111cfbec93bfc5a4f7156b835dd
[ "BSD-3-Clause" ]
null
null
null
configs/common/CacheConfig.py
fwillard/gem5_arc
a874f6d918351111cfbec93bfc5a4f7156b835dd
[ "BSD-3-Clause" ]
null
null
null
configs/common/CacheConfig.py
fwillard/gem5_arc
a874f6d918351111cfbec93bfc5a4f7156b835dd
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2012-2013, 2015-2016 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the...
45.184549
79
0.634498
from __future__ import print_function from __future__ import absolute_import import m5 from m5.objects import * from .Caches import * from common import ObjectList def config_cache(options, system): if options.external_memory_system and (options.caches or options.l2cache): print("External caches and int...
true
true
08ff8aeab2b8ead46193ee48ec62b7631b0e1f72
870
py
Python
python/ch_16_send_tweet.py
huaiyang/raspberrypi_cookbook_ed3
faf63b37bf94332120f3d3a9cb31d8b0990d2f17
[ "MIT" ]
65
2018-11-23T08:52:42.000Z
2022-03-25T23:19:21.000Z
python/ch_16_send_tweet.py
zeitguy/raspberrypi_cookbook_ed3
bccf35ea309f493c1a45c3b96dec45dc7cebb0d9
[ "MIT" ]
1
2020-11-27T15:04:33.000Z
2020-11-27T15:04:33.000Z
python/ch_16_send_tweet.py
zeitguy/raspberrypi_cookbook_ed3
bccf35ea309f493c1a45c3b96dec45dc7cebb0d9
[ "MIT" ]
26
2019-07-02T16:10:37.000Z
2022-03-11T16:30:22.000Z
import time, os import requests MAX_TEMP = 37.0 MIN_T_BETWEEN_WARNINGS = 60 # Minutes BASE_URL = 'https://api.thingspeak.com/apps/thingtweet/1/statuses/update/' KEY = 'your_key_here' def send_notification(temp): status = 'Thingtweet: Raspberry Pi getting hot. CPU temp=' + str(temp) data = {'api_key' : KEY, ...
28.064516
84
0.663218
import time, os import requests MAX_TEMP = 37.0 MIN_T_BETWEEN_WARNINGS = 60 BASE_URL = 'https://api.thingspeak.com/apps/thingtweet/1/statuses/update/' KEY = 'your_key_here' def send_notification(temp): status = 'Thingtweet: Raspberry Pi getting hot. CPU temp=' + str(temp) data = {'api_key' : KEY, 'status' :...
true
true
08ff8bf81623b6f46121c3c30309d17fce902d67
1,461
py
Python
alipay/aop/api/domain/AnttechAiCvTfjsModelQueryModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AnttechAiCvTfjsModelQueryModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AnttechAiCvTfjsModelQueryModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AnttechAiCvTfjsModelQueryModel(object): def __init__(self): self._model_code = None self._model_version = None @property def model_code(self): return self._model_...
26.089286
77
0.609856
import json from alipay.aop.api.constant.ParamConstants import * class AnttechAiCvTfjsModelQueryModel(object): def __init__(self): self._model_code = None self._model_version = None @property def model_code(self): return self._model_code @model_code.setter def model_cod...
true
true
08ff8c4479f3814b431e87e0e72ad53c9fd9cdf2
324
py
Python
tests/urls.py
brat000012001/django-oscar-paypal
37ea5c71c1d4f1e8f0edacfa32561bb521ccc0db
[ "BSD-3-Clause" ]
4
2019-12-26T17:27:12.000Z
2021-04-30T04:04:47.000Z
tests/urls.py
brat000012001/django-oscar-paypal
37ea5c71c1d4f1e8f0edacfa32561bb521ccc0db
[ "BSD-3-Clause" ]
null
null
null
tests/urls.py
brat000012001/django-oscar-paypal
37ea5c71c1d4f1e8f0edacfa32561bb521ccc0db
[ "BSD-3-Clause" ]
3
2016-12-04T08:27:58.000Z
2018-01-25T05:53:45.000Z
from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from oscar.app import application urlpatterns = [ url(r'^i18n/', include('django.conf.urls.i18n')), ] urlpatterns += i18n_patterns( url(r'^checkout/paypal/', include('paypal.express.urls')), url(r'', application.urls)...
27
62
0.719136
from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from oscar.app import application urlpatterns = [ url(r'^i18n/', include('django.conf.urls.i18n')), ] urlpatterns += i18n_patterns( url(r'^checkout/paypal/', include('paypal.express.urls')), url(r'', application.urls)...
true
true
08ff8c468e34e3d741617c6c6208cd0ade6cb653
4,516
py
Python
lib/parameters.py
Xutete/Intellectual-Variable-Speed-Limit-Controller
48ef118fbfe3ce7861bf8172afe27cfe1a7d5d44
[ "MIT" ]
1
2022-03-15T04:00:36.000Z
2022-03-15T04:00:36.000Z
lib/parameters.py
Xutete/Intellectual-Variable-Speed-Limit-Controller
48ef118fbfe3ce7861bf8172afe27cfe1a7d5d44
[ "MIT" ]
null
null
null
lib/parameters.py
Xutete/Intellectual-Variable-Speed-Limit-Controller
48ef118fbfe3ce7861bf8172afe27cfe1a7d5d44
[ "MIT" ]
2
2021-03-29T19:57:20.000Z
2022-01-08T05:15:39.000Z
import sys import time import numpy as np import torch import torch.nn as nn # Define Constants that could be modified Constants = { 'training_name':'training', 'evaluate_name':'evaluation', ### MEMORY HYPERPARAMETERS 'replay_size': 200000, # number of previo...
48.55914
130
0.622453
import sys import time import numpy as np import torch import torch.nn as nn Constants = { 'training_name':'training', 'evaluate_name':'evaluation', 'replay_size': 200000, 'replay_initial': 200000, 'epsilon_frames': 400000, ...
true
true
08ff8c6c0bf6ac8d3839accfedb1a05e75a32743
3,571
py
Python
tests/test_exceptions.py
patrick-gxg/mashumaro
a6bd88477d30deeb130b19856c0fe9e6e78a78d9
[ "Apache-2.0" ]
1
2021-04-20T22:40:40.000Z
2021-04-20T22:40:40.000Z
tests/test_exceptions.py
patrick-gxg/mashumaro
a6bd88477d30deeb130b19856c0fe9e6e78a78d9
[ "Apache-2.0" ]
null
null
null
tests/test_exceptions.py
patrick-gxg/mashumaro
a6bd88477d30deeb130b19856c0fe9e6e78a78d9
[ "Apache-2.0" ]
null
null
null
from typing import List from mashumaro.exceptions import ( InvalidFieldValue, MissingField, ThirdPartyModuleNotFoundError, UnserializableField, ) def test_missing_field_simple_field_type_name(): exc = MissingField("x", int, object) assert exc.field_type_name == "builtins.int" def test_missi...
31.052174
75
0.698964
from typing import List from mashumaro.exceptions import ( InvalidFieldValue, MissingField, ThirdPartyModuleNotFoundError, UnserializableField, ) def test_missing_field_simple_field_type_name(): exc = MissingField("x", int, object) assert exc.field_type_name == "builtins.int" def test_missi...
true
true
08ff8ccbbb2517e4e2e6ac46e2eab5a7ba709b0a
1,281
py
Python
configs/_base_/datasets/cityscapes_512x512.py
Myyyr/transseg2d
7664653dec0bf63d96ad3c76fc225d2d7f607e41
[ "Apache-2.0" ]
null
null
null
configs/_base_/datasets/cityscapes_512x512.py
Myyyr/transseg2d
7664653dec0bf63d96ad3c76fc225d2d7f607e41
[ "Apache-2.0" ]
null
null
null
configs/_base_/datasets/cityscapes_512x512.py
Myyyr/transseg2d
7664653dec0bf63d96ad3c76fc225d2d7f607e41
[ "Apache-2.0" ]
null
null
null
_base_ = './cityscapes.py' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) crop_size = (512, 512) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations'), dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)), dict(...
35.583333
77
0.619048
_base_ = './cityscapes.py' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) crop_size = (512, 512) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations'), dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)), dict(...
true
true
08ff8d26620471a0cb824f21b1ae77cf0e65b22a
340
py
Python
ex085.py
renatocortez/ExerciciosPython
9095e1666953faf18c8e5d20b8d0fc3b2493a092
[ "MIT" ]
null
null
null
ex085.py
renatocortez/ExerciciosPython
9095e1666953faf18c8e5d20b8d0fc3b2493a092
[ "MIT" ]
null
null
null
ex085.py
renatocortez/ExerciciosPython
9095e1666953faf18c8e5d20b8d0fc3b2493a092
[ "MIT" ]
null
null
null
num = [[], []] valor = 0 for c in range(1, 8): valor = int(input(f'Digite o {c}º valor: ')) if valor % 2 == 0: num[0].append(valor) else: num[1].append(valor) print('-=' * 30) num[0].sort() num[1].sort() print(f'Os valores pares digitados foram {num[0]}.') print(f'Os valores ímpares digitado...
24.285714
54
0.570588
num = [[], []] valor = 0 for c in range(1, 8): valor = int(input(f'Digite o {c}º valor: ')) if valor % 2 == 0: num[0].append(valor) else: num[1].append(valor) print('-=' * 30) num[0].sort() num[1].sort() print(f'Os valores pares digitados foram {num[0]}.') print(f'Os valores ímpares digitado...
true
true
08ff8d3082758f226246aa97202315c88cc1bbff
2,106
py
Python
full_incidents/vendors_to_dwh/main.py
Infosecurity-LLC/ETL
d4a431559d8c56ed3826dfe87113fabe9388a114
[ "Apache-2.0" ]
1
2022-02-04T09:59:57.000Z
2022-02-04T09:59:57.000Z
full_incidents/vendors_to_dwh/main.py
Infosecurity-LLC/ETL
d4a431559d8c56ed3826dfe87113fabe9388a114
[ "Apache-2.0" ]
null
null
null
full_incidents/vendors_to_dwh/main.py
Infosecurity-LLC/ETL
d4a431559d8c56ed3826dfe87113fabe9388a114
[ "Apache-2.0" ]
1
2022-02-04T09:59:58.000Z
2022-02-04T09:59:58.000Z
import logging from airflow.hooks.base_hook import BaseHook from exceptions import SettingFieldMissingError from full_incidents.vendors_to_dwh.extract import extract from full_incidents.vendors_to_dwh.load import load from postgresql_utils.session import create_session logger = logging.getLogger('vendors_to_dwh') ...
48.976744
110
0.801045
import logging from airflow.hooks.base_hook import BaseHook from exceptions import SettingFieldMissingError from full_incidents.vendors_to_dwh.extract import extract from full_incidents.vendors_to_dwh.load import load from postgresql_utils.session import create_session logger = logging.getLogger('vendors_to_dwh') ...
true
true
08ff8d652e6877c3843864a694f8848e0f735ef4
734
py
Python
flask_appbuilder/__init__.py
imcj/Flask-AppBuilder
60185df7a53026ce344ef71fc6e191386d53dfd2
[ "BSD-3-Clause" ]
null
null
null
flask_appbuilder/__init__.py
imcj/Flask-AppBuilder
60185df7a53026ce344ef71fc6e191386d53dfd2
[ "BSD-3-Clause" ]
null
null
null
flask_appbuilder/__init__.py
imcj/Flask-AppBuilder
60185df7a53026ce344ef71fc6e191386d53dfd2
[ "BSD-3-Clause" ]
null
null
null
__author__ = "Daniel Vaz Gaspar" __version__ = "2.1.7" from .actions import action # noqa: F401 from .api import ModelRestApi # noqa: F401 from .base import AppBuilder # noqa: F401 from .baseviews import BaseView, expose # noqa: F401 from .charts.views import DirectByChartView, GroupByChartView # noqa: F401 from ...
33.363636
85
0.739782
__author__ = "Daniel Vaz Gaspar" __version__ = "2.1.7" from .actions import action from .api import ModelRestApi from .base import AppBuilder from .baseviews import BaseView, expose from .charts.views import DirectByChartView, GroupByChartView from .models.group import aggregate_avg, aggregate_count, aggregate_su...
true
true
08ff8d7df2d0efefeb75df0b063b69a7d43a769e
2,016
py
Python
tests/tests/__init__.py
qdqmedia/django-templation
30f2e71f317bf635ace8cce119aface3fe89e876
[ "BSD-3-Clause" ]
7
2015-12-14T23:22:12.000Z
2021-04-15T20:24:23.000Z
tests/tests/__init__.py
qdqmedia/django-templation
30f2e71f317bf635ace8cce119aface3fe89e876
[ "BSD-3-Clause" ]
null
null
null
tests/tests/__init__.py
qdqmedia/django-templation
30f2e71f317bf635ace8cce119aface3fe89e876
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil import base64 import unittest from django.contrib.auth import get_user_model from django.test.client import Client from webtest import TestApp from templation import settings from templation.models import ResourcePointer class SetUpFolders(unittes...
31.015385
122
0.657738
import os import shutil import base64 import unittest from django.contrib.auth import get_user_model from django.test.client import Client from webtest import TestApp from templation import settings from templation.models import ResourcePointer class SetUpFolders(unittest.TestCase): def setUp(self): if o...
true
true
08ff8e32f546d66f9cdb947b5018979ee4b9667e
1,533
py
Python
esv/inlines.py
mintchaos/django_esv
4393f631e3137f2ad9d38ad13a594ea49655c8c4
[ "BSD-3-Clause" ]
1
2016-05-09T11:41:57.000Z
2016-05-09T11:41:57.000Z
esv/inlines.py
mintchaos/django_esv
4393f631e3137f2ad9d38ad13a594ea49655c8c4
[ "BSD-3-Clause" ]
null
null
null
esv/inlines.py
mintchaos/django_esv
4393f631e3137f2ad9d38ad13a594ea49655c8c4
[ "BSD-3-Clause" ]
null
null
null
from django_inlines.inlines import TemplateInline, InlineUnrenderableError from esv import esv, PassageNotFoundError, EsvQuotaExceededError class InlineQuotaExceededError(InlineUnrenderableError): pass class InlinePassageNotFoundError(InlineUnrenderableError): pass class PassageInline(TemplateInline): ...
31.285714
117
0.658839
from django_inlines.inlines import TemplateInline, InlineUnrenderableError from esv import esv, PassageNotFoundError, EsvQuotaExceededError class InlineQuotaExceededError(InlineUnrenderableError): pass class InlinePassageNotFoundError(InlineUnrenderableError): pass class PassageInline(TemplateInline): ...
true
true
08ff8e876d591045fd93d4a6e17df3ae27900c9f
16,597
py
Python
seaborn/rcmod.py
millerda/seaborn
5a67fa98ed4efa5b3761f2d9d184fb8addfac6de
[ "MIT", "BSD-3-Clause" ]
1
2021-12-21T01:08:20.000Z
2021-12-21T01:08:20.000Z
seaborn/rcmod.py
millerda/seaborn
5a67fa98ed4efa5b3761f2d9d184fb8addfac6de
[ "MIT", "BSD-3-Clause" ]
1
2021-03-30T17:43:55.000Z
2021-03-30T21:02:47.000Z
seaborn/rcmod.py
millerda/seaborn
5a67fa98ed4efa5b3761f2d9d184fb8addfac6de
[ "MIT", "BSD-3-Clause" ]
null
null
null
"""Control plot style and scaling using the matplotlib rcParams interface.""" import warnings import functools import matplotlib as mpl from cycler import cycler from . import palettes __all__ = ["set_theme", "set", "reset_defaults", "reset_orig", "axes_style", "set_style", "plotting_context", "set_context...
30.067029
79
0.605109
import warnings import functools import matplotlib as mpl from cycler import cycler from . import palettes __all__ = ["set_theme", "set", "reset_defaults", "reset_orig", "axes_style", "set_style", "plotting_context", "set_context", "set_palette"] _style_keys = [ "axes.facecolor", "axe...
true
true
08ff8fb99875a31fc1478ee6c7a217d7617bf366
251
py
Python
modules/nou.py
Iangecko/arbys
5b2e4b4e511d5721d6a1cc447b8fbf9be43fa909
[ "MIT" ]
null
null
null
modules/nou.py
Iangecko/arbys
5b2e4b4e511d5721d6a1cc447b8fbf9be43fa909
[ "MIT" ]
null
null
null
modules/nou.py
Iangecko/arbys
5b2e4b4e511d5721d6a1cc447b8fbf9be43fa909
[ "MIT" ]
null
null
null
from client import client import discord @client.message() async def nou(message: discord.Message): if message.content.lower().endswith("arbys shut down"): try: await message.channel.send("no u") except: # that's fine, we don't care pass
22.818182
56
0.717131
from client import client import discord @client.message() async def nou(message: discord.Message): if message.content.lower().endswith("arbys shut down"): try: await message.channel.send("no u") except: pass
true
true