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
f76f99b1fc7c54a5f1d792c22d65471ad6cbc625
1,132
py
Python
pytorch/datasets/cifar100_cls_dataset.py
naviocean/imgclsmob
f2993d3ce73a2f7ddba05da3891defb08547d504
[ "MIT" ]
2,649
2018-08-03T14:18:00.000Z
2022-03-31T08:08:17.000Z
pytorch/datasets/cifar100_cls_dataset.py
naviocean/imgclsmob
f2993d3ce73a2f7ddba05da3891defb08547d504
[ "MIT" ]
95
2018-08-13T01:46:03.000Z
2022-03-13T08:38:14.000Z
pytorch/datasets/cifar100_cls_dataset.py
naviocean/imgclsmob
f2993d3ce73a2f7ddba05da3891defb08547d504
[ "MIT" ]
549
2018-08-06T08:09:22.000Z
2022-03-31T08:08:21.000Z
""" CIFAR-100 classification dataset. """ import os from torchvision.datasets import CIFAR100 from .cifar10_cls_dataset import CIFAR10MetaInfo class CIFAR100Fine(CIFAR100): """ CIFAR-100 image classification dataset. Parameters: ---------- root : str, default '~/.torch/datasets/cifar100' ...
26.952381
74
0.606007
import os from torchvision.datasets import CIFAR100 from .cifar10_cls_dataset import CIFAR10MetaInfo class CIFAR100Fine(CIFAR100): def __init__(self, root=os.path.join("~", ".torch", "datasets", "cifar100"), mode="train", transform=None): super(CIFAR100F...
true
true
f76f99cb8db86c0cd42de2159aaa537df666bc87
4,518
py
Python
lepmlutils/xgbutils/test_recorder.py
Lewington-pitsos/mlutils
c92322a8a2fc0b5342d44b0d92051a93c6eede44
[ "MIT" ]
null
null
null
lepmlutils/xgbutils/test_recorder.py
Lewington-pitsos/mlutils
c92322a8a2fc0b5342d44b0d92051a93c6eede44
[ "MIT" ]
null
null
null
lepmlutils/xgbutils/test_recorder.py
Lewington-pitsos/mlutils
c92322a8a2fc0b5342d44b0d92051a93c6eede44
[ "MIT" ]
null
null
null
import unittest from .recorder import Recorder class TestRecorder(unittest.TestCase): def setUp(self): pass def test_sorts_correctly(self): records = [ {'test_score': 0.8410596026490066, 'params': {'n_estimators': 260, 'subsample': 0.7800000000000002, ...
35.296875
91
0.538513
import unittest from .recorder import Recorder class TestRecorder(unittest.TestCase): def setUp(self): pass def test_sorts_correctly(self): records = [ {'test_score': 0.8410596026490066, 'params': {'n_estimators': 260, 'subsample': 0.7800000000000002, ...
true
true
f76f9b22feb0f51591d5afa6a167a833ab41ab06
28,351
py
Python
app/parser.py
shushantkumar/ci_edit_final
3b13c7a39b2112ed8daaa70bc4f0f50d67909494
[ "Apache-2.0" ]
null
null
null
app/parser.py
shushantkumar/ci_edit_final
3b13c7a39b2112ed8daaa70bc4f0f50d67909494
[ "Apache-2.0" ]
null
null
null
app/parser.py
shushantkumar/ci_edit_final
3b13c7a39b2112ed8daaa70bc4f0f50d67909494
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
43.350153
80
0.522521
from __future__ import absolute_import from __future__ import division from __future__ import print_function try: unicode except NameError: unicode = str unichr = chr import curses.ascii import os import re import sys import time import traceback import third_party.pyperclip as clipboard import app.conf...
true
true
f76f9d303d05868bbb7f90c58dd2e1de5319aab7
490
py
Python
shop/migrations/0007_auto_20191224_2104.py
majestylink/majestyAccencis
41bdde6f9982980609f93a8b44bcaf06cc5f6ea6
[ "MIT" ]
null
null
null
shop/migrations/0007_auto_20191224_2104.py
majestylink/majestyAccencis
41bdde6f9982980609f93a8b44bcaf06cc5f6ea6
[ "MIT" ]
null
null
null
shop/migrations/0007_auto_20191224_2104.py
majestylink/majestyAccencis
41bdde6f9982980609f93a8b44bcaf06cc5f6ea6
[ "MIT" ]
null
null
null
# Generated by Django 2.2.7 on 2019-12-24 20:04 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('shop', '0006_auto_20191224_2048'), ] operations = [ migrations.AlterField( model_name='order', ...
24.5
127
0.642857
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('shop', '0006_auto_20191224_2048'), ] operations = [ migrations.AlterField( model_name='order', name='user', field=model...
true
true
f76f9d7805fdedd41efa0cf7f28e2b39cf0a613c
124
py
Python
models/MainClass.py
rishardcarranza/ClassAnalyzer
952524eaae4d76ba6f911de33d8ba6eabbedf97e
[ "MIT" ]
null
null
null
models/MainClass.py
rishardcarranza/ClassAnalyzer
952524eaae4d76ba6f911de33d8ba6eabbedf97e
[ "MIT" ]
null
null
null
models/MainClass.py
rishardcarranza/ClassAnalyzer
952524eaae4d76ba6f911de33d8ba6eabbedf97e
[ "MIT" ]
null
null
null
class MainClass: def __init__(self): self.name = "" self.lstAttributes = [] self.lstMethods = []
24.8
31
0.548387
class MainClass: def __init__(self): self.name = "" self.lstAttributes = [] self.lstMethods = []
true
true
f76f9ee56aec05b88a76fa5fd7eb6a0066e88766
77,469
py
Python
tests/test_perf_tracking.py
flaght/zipline
15b8832421e2b1ba98ec9938ceb794f64ad581b5
[ "Apache-2.0" ]
null
null
null
tests/test_perf_tracking.py
flaght/zipline
15b8832421e2b1ba98ec9938ceb794f64ad581b5
[ "Apache-2.0" ]
null
null
null
tests/test_perf_tracking.py
flaght/zipline
15b8832421e2b1ba98ec9938ceb794f64ad581b5
[ "Apache-2.0" ]
1
2017-03-27T06:19:04.000Z
2017-03-27T06:19:04.000Z
# # Copyright 2016 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
36.234331
79
0.576695
from __future__ import division import copy from datetime import ( datetime, timedelta, ) import logging import nose.tools as nt import pytz import pandas as pd import numpy as np from six.moves import range, zip from zipline.assets import Asset from zipline.assets.synthetic import make_simple_equity_info ...
true
true
f76f9f1ab356759c86d322cdba8853ff89f731d1
3,039
py
Python
tests/test_power.py
steven-murray/powerbox
315e30b40b22e050304ca3a6600b8a1f28301c0b
[ "MIT" ]
15
2016-10-27T06:40:30.000Z
2021-12-08T08:16:34.000Z
tests/test_power.py
PabloVD/powerbox
09809f3fe9e2b25dfb2f956ca4c2d4d40a0ac693
[ "MIT" ]
12
2018-08-15T03:34:57.000Z
2022-02-22T15:33:38.000Z
tests/test_power.py
PabloVD/powerbox
09809f3fe9e2b25dfb2f956ca4c2d4d40a0ac693
[ "MIT" ]
7
2017-02-23T03:44:07.000Z
2022-02-28T08:00:35.000Z
import numpy as np import os import inspect import sys LOCATION = "/".join(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))).split("/")[:-1]) sys.path.insert(0, LOCATION) from powerbox import PowerBox, get_power def test_power1d(): p = [0] * 40 for i in range(40): pb = PowerB...
30.089109
110
0.576176
import numpy as np import os import inspect import sys LOCATION = "/".join(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))).split("/")[:-1]) sys.path.insert(0, LOCATION) from powerbox import PowerBox, get_power def test_power1d(): p = [0] * 40 for i in range(40): pb = PowerB...
true
true
f76fa13de82dcaa740b6c8fc0d1f0c88006831bc
22,826
py
Python
kloppy/domain/models/common.py
pratikthanki/kloppy
ab3293e03f958720489cd2d9e25a1c9f12b9970c
[ "BSD-3-Clause" ]
null
null
null
kloppy/domain/models/common.py
pratikthanki/kloppy
ab3293e03f958720489cd2d9e25a1c9f12b9970c
[ "BSD-3-Clause" ]
null
null
null
kloppy/domain/models/common.py
pratikthanki/kloppy
ab3293e03f958720489cd2d9e25a1c9f12b9970c
[ "BSD-3-Clause" ]
null
null
null
from abc import ABC, abstractmethod from dataclasses import dataclass, field, replace from enum import Enum, Flag from typing import Dict, List, Optional, Callable, Union, Any, TypeVar, Generic from .pitch import PitchDimensions, Point, Dimension from .formation import FormationType from ...exceptions import ( Ori...
26.236782
103
0.615088
from abc import ABC, abstractmethod from dataclasses import dataclass, field, replace from enum import Enum, Flag from typing import Dict, List, Optional, Callable, Union, Any, TypeVar, Generic from .pitch import PitchDimensions, Point, Dimension from .formation import FormationType from ...exceptions import ( Ori...
true
true
f76fa17a83fae241d9dbc66c89801356d39751a5
3,670
py
Python
setup_extensions.py
jesserobertson/cogj
25f1d85023764ef0cc459a8a715b1b678f971858
[ "MIT" ]
2
2020-08-19T04:06:05.000Z
2020-08-19T19:50:28.000Z
setup_extensions.py
jesserobertson/cogj
25f1d85023764ef0cc459a8a715b1b678f971858
[ "MIT" ]
null
null
null
setup_extensions.py
jesserobertson/cogj
25f1d85023764ef0cc459a8a715b1b678f971858
[ "MIT" ]
null
null
null
""" file: setup_extensions.py (cogj) author: Jess Robertson, @jesserobertson date: Saturday, 16 March 2019 description: Set up Cython extensions for CO-GJ """ from pathlib import Path from logging import getLogger from multiprocessing import cpu_count import numpy from setuptools import Extension ...
31.637931
81
0.655858
from pathlib import Path from logging import getLogger from multiprocessing import cpu_count import numpy from setuptools import Extension from setuptools.command.sdist import sdist # directly from the pyx files using their build_ext class. # If not then we just use the default setuptools version try: from Cytho...
true
true
f76fa1ee56347de0de594dd9d3accd0e4126cc5b
209
py
Python
StockAnalysisSystem/readme.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
null
null
null
StockAnalysisSystem/readme.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
null
null
null
StockAnalysisSystem/readme.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- TEXT = ''' Stock Analysis System ''' ABOUT = ''' Name: Stock Analysis System Author: Sleepy E-Mail: sleepysoft@163.com ''' VERSION = '0.0.5' HISTORY = ''' '''
9.952381
27
0.593301
TEXT = ''' Stock Analysis System ''' ABOUT = ''' Name: Stock Analysis System Author: Sleepy E-Mail: sleepysoft@163.com ''' VERSION = '0.0.5' HISTORY = ''' '''
true
true
f76fa24f7bc502e58b34052ad6157c762efbb7f1
2,388
py
Python
venv/Lib/site-packages/itsdangerous/url_safe.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
37
2019-04-03T07:19:57.000Z
2022-01-09T06:18:41.000Z
venv/Lib/site-packages/itsdangerous/url_safe.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
31
2021-10-11T22:01:11.000Z
2021-12-06T22:40:12.000Z
venv/Lib/site-packages/itsdangerous/url_safe.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
130
2019-10-02T14:40:20.000Z
2022-01-26T17:38:26.000Z
import typing as _t import zlib from ._json import _CompactJSON from .encoding import base64_decode from .encoding import base64_encode from .exc import BadPayload from .serializer import Serializer from .timed import TimedSerializer class URLSafeSerializerMixin(Serializer): """Mixed in with a regular serializer...
29.481481
88
0.612228
import typing as _t import zlib from ._json import _CompactJSON from .encoding import base64_decode from .encoding import base64_encode from .exc import BadPayload from .serializer import Serializer from .timed import TimedSerializer class URLSafeSerializerMixin(Serializer): default_serializer = _CompactJSON ...
true
true
f76fa2f828e3757fd4300a327af4fa7be5418156
135
py
Python
src/util/git.py
Newms226/project_creator
4fda1fd92e3b1e85a3b2f5ba2a78fe3f697213f5
[ "MIT" ]
null
null
null
src/util/git.py
Newms226/project_creator
4fda1fd92e3b1e85a3b2f5ba2a78fe3f697213f5
[ "MIT" ]
null
null
null
src/util/git.py
Newms226/project_creator
4fda1fd92e3b1e85a3b2f5ba2a78fe3f697213f5
[ "MIT" ]
null
null
null
"""class GitHandler(object): def __init__(self): def register(self, path, track=True): def to_gitignore(self, dir):"""
15
41
0.637037
true
true
f76fa3c74e2002d10d8e3e6a6f6cf97777c63d6e
646
py
Python
nursery/curses/setup.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
1,261
2019-03-31T16:28:47.000Z
2022-03-31T09:01:23.000Z
nursery/curses/setup.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
597
2019-04-02T20:02:42.000Z
2022-03-30T10:28:47.000Z
nursery/curses/setup.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
318
2019-03-31T18:32:00.000Z
2022-03-30T18:07:13.000Z
#!/usr/bin/env python import re from setuptools import setup # Version handline needs to be programatic because # we can't import toga_curses to compute the version; # and to support versioned subpackage dependencies with open('toga_curses/__init__.py', encoding='utf8') as version_file: version_match = re.search(...
24.846154
70
0.650155
import re from setuptools import setup # and to support versioned subpackage dependencies with open('toga_curses/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M ) if version_match: v...
true
true
f76fa3ceefc0878b10563332e93e973f1006c773
19,230
py
Python
core/pretreatment.py
Afant1/Kunlun-M
4d179cac55840e7ed12079e987f1a859bdc3aa9a
[ "MIT" ]
1
2021-08-18T07:40:59.000Z
2021-08-18T07:40:59.000Z
core/pretreatment.py
jax777/Kunlun-M
b13876a79dfc129d7374b57696ee90982f23d370
[ "MIT" ]
null
null
null
core/pretreatment.py
jax777/Kunlun-M
b13876a79dfc129d7374b57696ee90982f23d370
[ "MIT" ]
2
2020-12-09T08:26:45.000Z
2021-04-12T03:24:34.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/4/15 14:51 # @Author : LoRexxar # @File : Pretreatment.py # @Contact : lorexxar@gmail.com from phply.phplex import lexer # 词法分析 from phply.phpparse import make_parser # 语法分析 from phply import phpast as php from bs4 import BeautifulSoup import esp...
38.537074
150
0.50936
from phply.phplex import lexer from phply.phpparse import make_parser from phply import phpast as php from bs4 import BeautifulSoup import esprima import jsbeautifier from utils.log import logger from Kunlun_M.const import ext_dict import gc import os import re import json import codecs import traceback import ...
true
true
f76fa45518cfab82573f9211dcc65fc865fd492f
8,148
py
Python
tensorforce/core/optimizers/solvers/line_search.py
CAVED123/Tensorforce
823177f77f9047b1e71eccfffc08315ed1636878
[ "Apache-2.0" ]
1
2019-09-23T18:39:57.000Z
2019-09-23T18:39:57.000Z
tensorforce/core/optimizers/solvers/line_search.py
CAVED123/Tensorforce
823177f77f9047b1e71eccfffc08315ed1636878
[ "Apache-2.0" ]
null
null
null
tensorforce/core/optimizers/solvers/line_search.py
CAVED123/Tensorforce
823177f77f9047b1e71eccfffc08315ed1636878
[ "Apache-2.0" ]
1
2019-09-23T18:40:00.000Z
2019-09-23T18:40:00.000Z
# Copyright 2018 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
42.4375
107
0.635493
import tensorflow as tf from tensorforce import TensorforceError, util from tensorforce.core import parameter_modules from tensorforce.core.optimizers.solvers import Iterative class LineSearch(Iterative): def __init__( self, name, max_iterations, accept_ratio, mode, parameter, unroll_loop=False ): ...
true
true
f76fa4c3a1545fb1688193e17e1bc30d17152754
1,175
py
Python
get_location.py
giulianopa/geolocator
0171e1a4452c9d5e11bb7f65c990d91552ebce74
[ "MIT" ]
null
null
null
get_location.py
giulianopa/geolocator
0171e1a4452c9d5e11bb7f65c990d91552ebce74
[ "MIT" ]
null
null
null
get_location.py
giulianopa/geolocator
0171e1a4452c9d5e11bb7f65c990d91552ebce74
[ "MIT" ]
null
null
null
# # Copyright (C) 2018 Giuliano Pasqualotto (github.com/giulianopa) # This code is licensed under MIT license (see LICENSE.txt for details) # import platform import datetime import geocoder import decimal import socket import boto3 import time import json from urllib2 import urlopen def get_location(): """ Get cu...
23.979592
81
0.642553
import platform import datetime import geocoder import decimal import socket import boto3 import time import json from urllib2 import urlopen def get_location(): g = geocoder.ip('me') return g.latlng def get_utc_time(): ts = time.time() return str(datetime.datetime.fromtimestamp(ts).strftime('%Y-%...
true
true
f76fa51e22ebb9bfcf95a95e805120cf062282ee
4,731
py
Python
ores/wsgi/routes/v3/util.py
groceryheist/ores
2ed740a6a142e4587c87a5b5f3944c3625445b0a
[ "MIT" ]
null
null
null
ores/wsgi/routes/v3/util.py
groceryheist/ores
2ed740a6a142e4587c87a5b5f3944c3625445b0a
[ "MIT" ]
null
null
null
ores/wsgi/routes/v3/util.py
groceryheist/ores
2ed740a6a142e4587c87a5b5f3944c3625445b0a
[ "MIT" ]
null
null
null
import traceback from collections import defaultdict from revscoring.errors import ModelInfoLookupError from .... import errors from ... import responses, util def format_v3_score_response(response): """ { "<context_name>": { "scores": { "<rev_id>": { ...
36.114504
82
0.558022
import traceback from collections import defaultdict from revscoring.errors import ModelInfoLookupError from .... import errors from ... import responses, util def format_v3_score_response(response): context_doc = defaultdict(lambda: defaultdict(dict)) if len(response.scores) > 0 or len(response.errors) > 0...
true
true
f76fa570fbff6d00801cd7dc2d22b67dbeb73f1a
890
py
Python
MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-3/PSET-3/printingOutLetters.py
lilsweetcaligula/MIT6.00.1x
ee2902782a08ff685e388b2f40c09ea8c9c5fcfe
[ "MIT" ]
null
null
null
MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-3/PSET-3/printingOutLetters.py
lilsweetcaligula/MIT6.00.1x
ee2902782a08ff685e388b2f40c09ea8c9c5fcfe
[ "MIT" ]
null
null
null
MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-3/PSET-3/printingOutLetters.py
lilsweetcaligula/MIT6.00.1x
ee2902782a08ff685e388b2f40c09ea8c9c5fcfe
[ "MIT" ]
null
null
null
""" PSET-3 Hangman Part 3: Printing Out all Available Letters Next, implement the function getAvailableLetters that takes in one parameter - a list of letters, lettersGuessed. This function returns a string that is comprised of lowercase English letters - all lowercase English letters that are not in lettersGuessed....
28.709677
79
0.748315
import string def getAvailableLetters(lettersGuessed): chars = string.ascii_lowercase for char in lettersGuessed: chars = chars.replace(char, "") return chars
true
true
f76fa615263120ec8e2a1a17db07b44b55975a0d
4,774
py
Python
test/swe2d/test_steady_state_channel_mms.py
connorjward/thetis
0fcfae106587adf0c71fcdfedb3e3a3cf8c609ff
[ "MIT" ]
45
2016-04-13T22:33:19.000Z
2022-03-17T22:22:15.000Z
test/swe2d/test_steady_state_channel_mms.py
connorjward/thetis
0fcfae106587adf0c71fcdfedb3e3a3cf8c609ff
[ "MIT" ]
188
2016-02-17T06:14:37.000Z
2022-03-18T10:46:49.000Z
test/swe2d/test_steady_state_channel_mms.py
connorjward/thetis
0fcfae106587adf0c71fcdfedb3e3a3cf8c609ff
[ "MIT" ]
26
2016-04-26T15:03:47.000Z
2022-02-04T16:28:01.000Z
from thetis import * import math import pytest @pytest.fixture(params=['rt-dg', 'dg-dg', 'dg-cg', 'bdm-dg']) def element_family(request): return request.param def test_steady_state_channel_mms(element_family, do_exports=False): lx = 5e3 ly = 1e3 order = 1 # minimum resolution min_cells = 48...
37.590551
116
0.647465
from thetis import * import math import pytest @pytest.fixture(params=['rt-dg', 'dg-dg', 'dg-cg', 'bdm-dg']) def element_family(request): return request.param def test_steady_state_channel_mms(element_family, do_exports=False): lx = 5e3 ly = 1e3 order = 1 min_cells = 48 n = 1 dt = ...
true
true
f76fa6773afca3e5ba46c6390ec4a0738c1bdf44
4,383
py
Python
benchmark/startQiskit_noisy1314.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy1314.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy1314.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=5 # total number=54 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
32.227941
82
0.610769
import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floo...
true
true
f76fa6aa85b0f7a4a27adf022da9c67e763a8838
5,252
py
Python
tests/test_calculations.py
spirit-code/aiida-spirit
7a0c0ca7406f958599b691a410201137f9fb94e9
[ "MIT" ]
null
null
null
tests/test_calculations.py
spirit-code/aiida-spirit
7a0c0ca7406f958599b691a410201137f9fb94e9
[ "MIT" ]
null
null
null
tests/test_calculations.py
spirit-code/aiida-spirit
7a0c0ca7406f958599b691a410201137f9fb94e9
[ "MIT" ]
1
2021-07-21T01:20:13.000Z
2021-07-21T01:20:13.000Z
# -*- coding: utf-8 -*- """ Tests for calculations """ import os import numpy as np from aiida.plugins import CalculationFactory from aiida.orm import Dict from aiida.engine import run, run_get_node from aiida_spirit.tools.helpers import prepare_test_inputs from . import TEST_DIR def test_input_para_validator(): ...
31.449102
89
0.658606
import os import numpy as np from aiida.plugins import CalculationFactory from aiida.orm import Dict from aiida.engine import run, run_get_node from aiida_spirit.tools.helpers import prepare_test_inputs from . import TEST_DIR def test_input_para_validator(): for key, val in { 'llg_n_iterations':...
true
true
f76fa752462a4b1508e024876f25d4cc13670b7e
499
py
Python
pwiki.py
lethosor/df-pwiki
543fd54948cf81d69e5db438843c17d7ea11f54b
[ "MIT" ]
null
null
null
pwiki.py
lethosor/df-pwiki
543fd54948cf81d69e5db438843c17d7ea11f54b
[ "MIT" ]
null
null
null
pwiki.py
lethosor/df-pwiki
543fd54948cf81d69e5db438843c17d7ea11f54b
[ "MIT" ]
null
null
null
""" Dwarf Fortress portable wiki """ import os os.chdir(os.path.dirname(os.path.abspath(__file__))) import pwiki.util as util util.add_path('depends/bottle') import pwiki.database as database import pwiki.parser as parser import pwiki.server as server def main(): util.printf('Loading database... ') db = data...
24.95
55
0.705411
import os os.chdir(os.path.dirname(os.path.abspath(__file__))) import pwiki.util as util util.add_path('depends/bottle') import pwiki.database as database import pwiki.parser as parser import pwiki.server as server def main(): util.printf('Loading database... ') db = database.Database(util.find_dump()) u...
true
true
f76fa9cc24455f3071406cfd32edc59aa3356efd
1,138
py
Python
slurmlint/cli.py
appeltel/slurmlint
f135d5ff3af2932c387e899d3e8f4f307e0aebba
[ "MIT" ]
1
2021-09-01T20:35:15.000Z
2021-09-01T20:35:15.000Z
slurmlint/cli.py
appeltel/slurmlint
f135d5ff3af2932c387e899d3e8f4f307e0aebba
[ "MIT" ]
null
null
null
slurmlint/cli.py
appeltel/slurmlint
f135d5ff3af2932c387e899d3e8f4f307e0aebba
[ "MIT" ]
null
null
null
""" The cli entry point for linting slurm configs """ import argparse import sys from slurmlint.linter import lint from slurmlint.__version__ import __version__ def cli(): """ CLI entry point for Slurm Configuration Linter Run ``slurmlint --help`` for usage """ version_msg = 'slurmlint, version {...
25.863636
70
0.637961
import argparse import sys from slurmlint.linter import lint from slurmlint.__version__ import __version__ def cli(): version_msg = 'slurmlint, version {0}'.format(__version__) description = 'Slurm Configuration File Linter' parser = argparse.ArgumentParser(description=description) parser.add_argume...
true
true
f76faa392fb34a30a0d1a1543aac4a7ced9395e2
3,538
py
Python
postgres.py
NickF40/Buisbot
7c16804a864fc43d92aba04f0220dac789059093
[ "MIT" ]
1
2018-11-05T10:33:17.000Z
2018-11-05T10:33:17.000Z
postgres.py
NickF40/Buisbot
7c16804a864fc43d92aba04f0220dac789059093
[ "MIT" ]
null
null
null
postgres.py
NickF40/Buisbot
7c16804a864fc43d92aba04f0220dac789059093
[ "MIT" ]
1
2018-11-05T10:34:53.000Z
2018-11-05T10:34:53.000Z
""" Postgres.py - file with PostgreSQL Database interactions funcs """ import psycopg2 from simplejson import loads, dumps from configs import db_configs from psycopg2.extras import Json db = psycopg2.connect(**db_configs) cur = db.cursor() def upload_link(link, id_): cur.execute("UPDATE seq_table...
29
144
0.624081
import psycopg2 from simplejson import loads, dumps from configs import db_configs from psycopg2.extras import Json db = psycopg2.connect(**db_configs) cur = db.cursor() def upload_link(link, id_): cur.execute("UPDATE seq_table SET link = '%s' WHERE id = %d" % (link, id_)) db.commit() def g...
true
true
f76faa5ceb2b3fcb7af0ba2f2e32c4844ef2cfc9
1,031
py
Python
benedict/core/search.py
fabiocaccamo/python-benedict
da061049164efab95ee4360a9c971c5be248fbf2
[ "MIT" ]
365
2019-05-21T05:50:30.000Z
2022-03-29T11:35:35.000Z
benedict/core/search.py
fabiocaccamo/python-benedict
da061049164efab95ee4360a9c971c5be248fbf2
[ "MIT" ]
78
2019-11-16T12:22:54.000Z
2022-03-14T12:21:30.000Z
benedict/core/search.py
fabiocaccamo/python-benedict
da061049164efab95ee4360a9c971c5be248fbf2
[ "MIT" ]
26
2019-12-16T06:34:12.000Z
2022-02-28T07:16:41.000Z
# -*- coding: utf-8 -*- from benedict.core.traverse import traverse from benedict.utils import type_util def _get_term(value, case_sensitive): v_is_str = type_util.is_string(value) v = value.lower() if (v_is_str and not case_sensitive) else value return (v, v_is_str) def _get_match(query, value, exact,...
31.242424
86
0.703201
from benedict.core.traverse import traverse from benedict.utils import type_util def _get_term(value, case_sensitive): v_is_str = type_util.is_string(value) v = value.lower() if (v_is_str and not case_sensitive) else value return (v, v_is_str) def _get_match(query, value, exact, case_sensitive): q,...
true
true
f76fab142c8da62f1dff570eb592b2f892258fe0
11,856
py
Python
leo/modes/rib.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
1,550
2015-01-14T16:30:37.000Z
2022-03-31T08:55:58.000Z
leo/modes/rib.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
2,009
2015-01-13T16:28:52.000Z
2022-03-31T18:21:48.000Z
leo/modes/rib.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
200
2015-01-05T15:07:41.000Z
2022-03-07T17:05:01.000Z
# Leo colorizer control file for rib mode. # This file is in the public domain. # Properties for rib mode. properties = { "doubleBracketIndent": "false", "indentNextLines": "Begin|WorldBegin|FrameBegin|TransformBegin|AttributeBegin|SolidBegin|ObjectBegin|MotionBegin", "lineComment": "#", "lineU...
28.094787
119
0.553053
properties = { "doubleBracketIndent": "false", "indentNextLines": "Begin|WorldBegin|FrameBegin|TransformBegin|AttributeBegin|SolidBegin|ObjectBegin|MotionBegin", "lineComment": "#", "lineUpClosingBracket": "true", } rib_main_attributes_dict = { "default": "null", "digit_re": "([[:dig...
true
true
f76faccb1cf541ce22196f11a8da4a7e4fddb33c
2,855
py
Python
mindspore/nn/probability/infer/variational/elbo.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
2
2020-11-23T13:46:37.000Z
2020-12-20T02:02:38.000Z
mindspore/nn/probability/infer/variational/elbo.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
1
2020-12-29T06:46:38.000Z
2020-12-29T06:46:38.000Z
mindspore/nn/probability/infer/variational/elbo.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
1
2021-05-12T06:30:29.000Z
2021-05-12T06:30:29.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
43.923077
120
0.650438
from mindspore.ops import operations as P from ...distribution.normal import Normal from ....cell import Cell from ....loss.loss import MSELoss class ELBO(Cell): def __init__(self, latent_prior='Normal', output_prior='Normal'): super(ELBO, self).__init__() self.sum = P.ReduceSum() ...
true
true
f76fada27e5bd1a3ae53db0871ce66fb01ff7eec
21,531
py
Python
ooni/reporter.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
ooni/reporter.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
ooni/reporter.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
import uuid import yaml import os from copy import deepcopy from datetime import datetime from contextlib import contextmanager from yaml.representer import SafeRepresenter from yaml.emitter import Emitter from yaml.serializer import Serializer from yaml.resolver import Resolver from twisted.python.util import unti...
33.589704
108
0.59203
import uuid import yaml import os from copy import deepcopy from datetime import datetime from contextlib import contextmanager from yaml.representer import SafeRepresenter from yaml.emitter import Emitter from yaml.serializer import Serializer from yaml.resolver import Resolver from twisted.python.util import unti...
false
true
f76faf8809d62f9efeed2c13eb453fb5e5e8ee8d
1,994
py
Python
lenstronomy/ImSim/differential_extinction.py
heather999/lenstronomy
8102fe026c1f3ba6e81d8a1f59cceb90e68430b4
[ "MIT" ]
null
null
null
lenstronomy/ImSim/differential_extinction.py
heather999/lenstronomy
8102fe026c1f3ba6e81d8a1f59cceb90e68430b4
[ "MIT" ]
null
null
null
lenstronomy/ImSim/differential_extinction.py
heather999/lenstronomy
8102fe026c1f3ba6e81d8a1f59cceb90e68430b4
[ "MIT" ]
null
null
null
from lenstronomy.LightModel.light_model import LightModel import numpy as np __all__ = ['DifferentialExtinction'] class DifferentialExtinction(object): """ class to compute an extinction (for a specific band/wavelength). This class uses the functionality available in the LightModel module to describe an ...
37.622642
115
0.674022
from lenstronomy.LightModel.light_model import LightModel import numpy as np __all__ = ['DifferentialExtinction'] class DifferentialExtinction(object): def __init__(self, optical_depth_model=None, tau0_index=0): if optical_depth_model is None: optical_depth_model = [] self._profile =...
true
true
f76fafccc9a152769db70adbcfc9cbd360f5a39a
72
py
Python
pyDipole/__init__.py
rakab/pyDipole
2793db6db951e9e5e79e064430a0faf6636d3a2a
[ "BSD-3-Clause" ]
null
null
null
pyDipole/__init__.py
rakab/pyDipole
2793db6db951e9e5e79e064430a0faf6636d3a2a
[ "BSD-3-Clause" ]
null
null
null
pyDipole/__init__.py
rakab/pyDipole
2793db6db951e9e5e79e064430a0faf6636d3a2a
[ "BSD-3-Clause" ]
null
null
null
from .particles import Particle, particles from .process import Process
24
42
0.833333
from .particles import Particle, particles from .process import Process
true
true
f76fb02bee86c78bc33e9ed9c548bf545b59a1c4
1,850
py
Python
examples/visualization/subtract_inflow.py
forestriveral/floris
02c31e121283ad6ccae987cfa3aa1bf1e4b43014
[ "Apache-2.0" ]
null
null
null
examples/visualization/subtract_inflow.py
forestriveral/floris
02c31e121283ad6ccae987cfa3aa1bf1e4b43014
[ "Apache-2.0" ]
null
null
null
examples/visualization/subtract_inflow.py
forestriveral/floris
02c31e121283ad6ccae987cfa3aa1bf1e4b43014
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 NREL # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distri...
29.83871
88
0.76973
import matplotlib.pyplot as plt import floris.tools as wfct import floris.tools.cut_plane as cp fi = wfct.floris_interface.FlorisInterface("../example_input.json") fi.reinitialize_flow_field(layout_array=([0], [0])) fi.calculate_wake() D = 126 cut_plane_base_5 = fi.get_cross_plane(5 * D) cut_plane_base_in = ...
true
true
f76fb076eb1e182fb8d65899d39f8a4a7ebfb6d0
3,108
py
Python
main/settings.py
KeoniGarner/Belt-Reviewer
0eb1cd257270b8b82ff87f29e159c45d399e8651
[ "MIT" ]
null
null
null
main/settings.py
KeoniGarner/Belt-Reviewer
0eb1cd257270b8b82ff87f29e159c45d399e8651
[ "MIT" ]
null
null
null
main/settings.py
KeoniGarner/Belt-Reviewer
0eb1cd257270b8b82ff87f29e159c45d399e8651
[ "MIT" ]
null
null
null
""" Django settings for main project. Generated by 'django-admin startproject' using Django 2.0.3. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os # Bu...
25.47541
91
0.694981
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '*gs*i)n&ci3f-jrcp%vnedt(1br0o%_b$f93r1#92)y3yuhv*v' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'apps.belt_reviewer', 'django.contrib.admin', 'django.contrib.auth', 'd...
true
true
f76fb094825ac1d5d7c9e16cc99f9bf7c8f40de7
978
py
Python
19/test/test_label_response_entity.py
apitore/apitore-sdk-python
c0814c5635ddd09e9a20fcb155b62122bee41d33
[ "Apache-2.0" ]
3
2018-08-21T06:14:33.000Z
2019-10-18T23:05:50.000Z
19/test/test_label_response_entity.py
apitore/apitore-sdk-python
c0814c5635ddd09e9a20fcb155b62122bee41d33
[ "Apache-2.0" ]
null
null
null
19/test/test_label_response_entity.py
apitore/apitore-sdk-python
c0814c5635ddd09e9a20fcb155b62122bee41d33
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Text2Label by word vector APIs Text to label by word2vec of contents.<BR />[Endpoint] https://api.apitore.com/api/19 # noqa: E501 OpenAPI spec version: 0.0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import...
23.853659
103
0.714724
from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.label_response_entity import LabelResponseEntity from swagger_client.rest import ApiException class TestLabelResponseEntity(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
f76fb0a5b3e0f3d94e9cdb13ab456c81eae182fe
2,021
py
Python
dbReports/iondb/bin/cleanup_unusedPlansByAge.py
sequencer2014/TS
465804570349d46b47c1bdf131bdafea5c582dee
[ "Apache-2.0" ]
null
null
null
dbReports/iondb/bin/cleanup_unusedPlansByAge.py
sequencer2014/TS
465804570349d46b47c1bdf131bdafea5c582dee
[ "Apache-2.0" ]
null
null
null
dbReports/iondb/bin/cleanup_unusedPlansByAge.py
sequencer2014/TS
465804570349d46b47c1bdf131bdafea5c582dee
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (C) 2013 Ion Torrent Systems, Inc. All Rights Reserved import logging logging.basicConfig(level=logging.INFO) log = logging.getLogger('cleanup_unusedPlansByAge') # log.setLevel(logging.DEBUG) import iondb.bin.djangoinit from iondb.rundb import models import pytz from datetime impor...
33.131148
114
0.663038
import logging logging.basicConfig(level=logging.INFO) log = logging.getLogger('cleanup_unusedPlansByAge') import iondb.bin.djangoinit from iondb.rundb import models import pytz from datetime import datetime, timedelta class Intents: List, Delete, Mark_as_executed = range(3) if __name__ == '__main__': ...
true
true
f76fb12c045391815df80e1f0905e2723ea5f649
3,927
py
Python
youtube_dl/extractor/shahid.py
builder07/ytdl
2c0a5d50af7ecc7302c813d649ee72dcd457a50a
[ "Unlicense" ]
null
null
null
youtube_dl/extractor/shahid.py
builder07/ytdl
2c0a5d50af7ecc7302c813d649ee72dcd457a50a
[ "Unlicense" ]
null
null
null
youtube_dl/extractor/shahid.py
builder07/ytdl
2c0a5d50af7ecc7302c813d649ee72dcd457a50a
[ "Unlicense" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse from ..utils import ( ExtractorError, int_or_none, parse_iso8601, ) class ShahidIE(InfoExtractor): _VALID_URL = r'https?://shahid\.mbc\.net/ar/episode/(?P<id>\d+)/?' ...
36.361111
245
0.547746
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse from ..utils import ( ExtractorError, int_or_none, parse_iso8601, ) class ShahidIE(InfoExtractor): _VALID_URL = r'https?://shahid\.mbc\.net/ar/episode/(?P<id>\d+)/?' _TESTS = [{ ...
true
true
f76fb293161f0c034162e6bcff9ad1f61018fb5c
5,500
py
Python
docs-src/conf.py
biosimulators/Biosimulators_template_container
12d66f328901e1d14af7adecc54a0ecc96ed9df4
[ "MIT" ]
3
2020-10-06T12:00:04.000Z
2021-06-02T13:26:30.000Z
docs-src/conf.py
biosimulators/Biosimulators_template_container
12d66f328901e1d14af7adecc54a0ecc96ed9df4
[ "MIT" ]
2
2021-09-09T01:14:46.000Z
2021-09-12T17:43:50.000Z
docs-src/conf.py
biosimulators/Biosimulators_template_container
12d66f328901e1d14af7adecc54a0ecc96ed9df4
[ "MIT" ]
3
2020-04-27T03:38:51.000Z
2020-06-01T09:03:06.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html import re import datetime import os import sys # -- Path setup -----------------------...
31.428571
133
0.621091
import re import datetime import os import sys source_dir = os.path.join(os.path.dirname(__file__), '..', '{ my-simulator }') sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) source_base_url = '{ url-to-my-simulator-source-code-repo }' project = '{ my-simulator }' copyright = '{}, {}'.format(dateti...
true
true
f76fb36013d76e00fabd9f052fb9b15ef0659230
1,584
py
Python
simul/plots/failing_time.py
ConsenSys/handel
bc3f6f8194db140a1067ab157fc6bb1fb53a0144
[ "Apache-2.0" ]
48
2018-11-06T16:52:27.000Z
2021-05-25T07:50:52.000Z
simul/plots/failing_time.py
ConsenSys/handel
bc3f6f8194db140a1067ab157fc6bb1fb53a0144
[ "Apache-2.0" ]
39
2018-11-27T10:40:26.000Z
2019-08-04T17:27:45.000Z
simul/plots/failing_time.py
ConsenSys/handel
bc3f6f8194db140a1067ab157fc6bb1fb53a0144
[ "Apache-2.0" ]
4
2018-12-20T15:07:56.000Z
2021-08-08T09:11:33.000Z
#!/usr/bin/env python ## This script generate the graphs that compares handel signature ## generation with different number of failing nodes for a fixed ## number of total nodes, and a fixed threshold 51% ## import sys import matplotlib.pyplot as plt import pandas as pd plt.figure(figsize=(4,2)) from lib import * ...
26.4
71
0.641414
import sys import matplotlib.pyplot as plt import pandas as pd plt.figure(figsize=(4,2)) from lib import * sigColumn = "sigen_wall_avg" nodeColumn = "totalNbOfNodes" failingColumn = "failing" yColumns = { "sigen_wall_avg": "Average", "sigen_wall_max": "Maximum"} threshold = "...
true
true
f76fb4b39483a2f0ea2ad21f57d6a31686accbd7
45,013
py
Python
official/nlp/tools/export_tfhub_lib_test.py
sakibguy/models
662f392677be0e6822eb9852a57f06b3fd1513bf
[ "Apache-2.0" ]
1
2022-02-14T08:47:00.000Z
2022-02-14T08:47:00.000Z
official/nlp/tools/export_tfhub_lib_test.py
mdsaifhaider/models
7214e17eb425963ec3d0295be215d5d26deaeb32
[ "Apache-2.0" ]
8
2020-05-19T00:52:30.000Z
2020-06-04T23:57:20.000Z
official/nlp/tools/export_tfhub_lib_test.py
mdsaifhaider/models
7214e17eb425963ec3d0295be215d5d26deaeb32
[ "Apache-2.0" ]
2
2021-10-07T04:47:04.000Z
2021-12-18T04:18:19.000Z
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
45.330312
80
0.664297
import os import tempfile from absl.testing import parameterized import numpy as np import tensorflow as tf import tensorflow_hub as hub import tensorflow_text as text from sentencepiece import SentencePieceTrainer from official.legacy.bert import configs from official.modeling import tf_utils from official.nlp.con...
true
true
f76fb56995d89d0a5a38fb4bf77f8dd72fd1fba3
7,673
py
Python
ghostvlad/generate_embeddings.py
good5dog5/Speaker-Diarization
4cc38f77a2f2c24ce086323aa37098f6cd0f7f10
[ "Apache-2.0" ]
null
null
null
ghostvlad/generate_embeddings.py
good5dog5/Speaker-Diarization
4cc38f77a2f2c24ce086323aa37098f6cd0f7f10
[ "Apache-2.0" ]
null
null
null
ghostvlad/generate_embeddings.py
good5dog5/Speaker-Diarization
4cc38f77a2f2c24ce086323aa37098f6cd0f7f10
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function import os import sys import numpy as np import librosa import toolkits import random # =========================================== # Parse the argument # =========================================== import argparse parser = argparse.Ar...
34.254464
121
0.587645
from __future__ import absolute_import from __future__ import print_function import os import sys import numpy as np import librosa import toolkits import random import argparse parser = argparse.ArgumentParser() parser.add_argument('--gpu', default='', type=str) parser.add_argument('--resume', default=r'pretrained/w...
true
true
f76fb707703f0e54891b2bbc145b644fd08fca5d
1,821
py
Python
tools/pnnx/tests/test_nn_BatchNorm2d.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
14,886
2017-07-24T02:58:35.000Z
2022-03-31T18:17:04.000Z
tools/pnnx/tests/test_nn_BatchNorm2d.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
3,361
2017-07-24T05:56:31.000Z
2022-03-31T13:26:35.000Z
tools/pnnx/tests/test_nn_BatchNorm2d.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
3,786
2017-07-24T03:09:15.000Z
2022-03-31T16:56:40.000Z
# Tencent is pleased to support the open source community by making ncnn available. # # Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the...
28.453125
91
0.672707
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.bn_0 = nn.BatchNorm2d(num_features=32) self.bn_1 = nn.BatchNorm2d(num_features=32, eps=1e-1, affine=False) self.bn_2 = nn.BatchNorm2d(n...
true
true
f76fb93022ca17447efd878835bf82bae2c1df8f
3,808
py
Python
iphigen/iphigen_nifti.py
ofgulban/iphigen
47c972a5852677e01ab0b120f69d004abc57e478
[ "BSD-3-Clause" ]
17
2019-05-29T08:19:58.000Z
2021-08-17T03:29:34.000Z
iphigen/iphigen_nifti.py
ofgulban/retinex_for_mri
47c972a5852677e01ab0b120f69d004abc57e478
[ "BSD-3-Clause" ]
2
2017-03-31T13:52:31.000Z
2018-08-30T17:43:07.000Z
iphigen/iphigen_nifti.py
ofgulban/iphigen
47c972a5852677e01ab0b120f69d004abc57e478
[ "BSD-3-Clause" ]
4
2019-03-15T11:02:23.000Z
2021-07-18T17:21:39.000Z
"""MRI data processing with retinex and balance methods.""" from __future__ import division import os import numpy as np import nibabel as nb from iphigen import core, utils from iphigen.ui import user_interface, display_welcome_message import iphigen.config as cfg def main(): """Iphigen processes for nifti imag...
37.333333
85
0.620011
from __future__ import division import os import numpy as np import nibabel as nb from iphigen import core, utils from iphigen.ui import user_interface, display_welcome_message import iphigen.config as cfg def main(): user_interface() display_welcome_message() data, affine, dirname, basename, ext = ...
true
true
f76fb95558cae284c5fc2319f94d804a8d2144f5
380
py
Python
Practica02_Adaline/Project_Back/backend_test.py
CodeRevenge/practicas_ia_2
b81e3b68680b61785918b19360cb0afc5b14c26e
[ "MIT" ]
null
null
null
Practica02_Adaline/Project_Back/backend_test.py
CodeRevenge/practicas_ia_2
b81e3b68680b61785918b19360cb0afc5b14c26e
[ "MIT" ]
null
null
null
Practica02_Adaline/Project_Back/backend_test.py
CodeRevenge/practicas_ia_2
b81e3b68680b61785918b19360cb0afc5b14c26e
[ "MIT" ]
null
null
null
from flask import Flask from flask_socketio import SocketIO, emit import os app = Flask(__name__) app.config['SECRET KEY'] = 'secret!' socket = SocketIO(app) @app.route('/') def index(): emit("hola") return "Hola" if __name__ == "__main__": port = int(os.environ.get('PORT',5000)) host = '0.0.0.0' ...
21.111111
62
0.665789
from flask import Flask from flask_socketio import SocketIO, emit import os app = Flask(__name__) app.config['SECRET KEY'] = 'secret!' socket = SocketIO(app) @app.route('/') def index(): emit("hola") return "Hola" if __name__ == "__main__": port = int(os.environ.get('PORT',5000)) host = '0.0.0.0' ...
true
true
f76fba270d6e235fd72d85a54aabd470a9abbd20
16,273
py
Python
bbb-exporter/collector.py
alangecker/bigbluebutton-exporter
86592958b833421cee688071c4f2ad3a80dc1549
[ "MIT" ]
1
2020-05-26T19:19:17.000Z
2020-05-26T19:19:17.000Z
bbb-exporter/collector.py
man10to/bigbluebutton-exporter
56a9fdf5390b63a9b82e5b3098f897fc3be29fd2
[ "MIT" ]
null
null
null
bbb-exporter/collector.py
man10to/bigbluebutton-exporter
56a9fdf5390b63a9b82e5b3098f897fc3be29fd2
[ "MIT" ]
1
2021-05-07T06:48:52.000Z
2021-05-07T06:48:52.000Z
import logging import os from functools import reduce from collections import defaultdict from prometheus_client.metrics_core import GaugeMetricFamily, HistogramMetricFamily, GaugeHistogramMetricFamily from prometheus_client.utils import INF import api import settings from helpers import execution_duration, Histogram...
53.006515
121
0.700793
import logging import os from functools import reduce from collections import defaultdict from prometheus_client.metrics_core import GaugeMetricFamily, HistogramMetricFamily, GaugeHistogramMetricFamily from prometheus_client.utils import INF import api import settings from helpers import execution_duration, Histogram...
true
true
f76fbb0d90b8b15bcf28e3144daca5bc9a52c777
29,073
py
Python
tests/test_loader.py
rr3khan/opsdroid
2436d6fe9e9b0ebb982ad005e238bf5804f80fa9
[ "Apache-2.0" ]
2
2021-09-30T07:43:04.000Z
2021-09-30T07:46:49.000Z
tests/test_loader.py
prakharshreyash15/opsdroid
dc70808ea779fae5b1f1c47434fc323644e297e6
[ "Apache-2.0" ]
2
2021-09-08T02:59:21.000Z
2022-01-13T03:37:31.000Z
tests/test_loader.py
prakharshreyash15/opsdroid
dc70808ea779fae5b1f1c47434fc323644e297e6
[ "Apache-2.0" ]
null
null
null
import os import shutil import subprocess import tempfile import contextlib import unittest import unittest.mock as mock from types import ModuleType import pkg_resources from opsdroid.core import OpsDroid from opsdroid.cli.start import configure_lang from opsdroid.configuration import load_config_file from opsdroid.c...
39.771546
101
0.597014
import os import shutil import subprocess import tempfile import contextlib import unittest import unittest.mock as mock from types import ModuleType import pkg_resources from opsdroid.core import OpsDroid from opsdroid.cli.start import configure_lang from opsdroid.configuration import load_config_file from opsdroid.c...
true
true
f76fbb3b73ec33533b63aab414d553f82c520795
20,697
py
Python
nova/tests/unit/notifications/objects/test_notification.py
tzumainn/nova
dfaa513fe1329aabe6e5d83b6ac42e0e25ad9eb6
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/notifications/objects/test_notification.py
tzumainn/nova
dfaa513fe1329aabe6e5d83b6ac42e0e25ad9eb6
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/notifications/objects/test_notification.py
tzumainn/nova
dfaa513fe1329aabe6e5d83b6ac42e0e25ad9eb6
[ "Apache-2.0" ]
null
null
null
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
42.152749
79
0.674011
import collections import mock from oslo_utils.fixture import uuidsentinel as uuids from oslo_utils import timeutils from oslo_versionedobjects import fixture from nova import exception from nova.notifications.objects import base as notification from nova import objects from nova.objects import base from nova.objects...
true
true
f76fbb747a9562b1d1573ec392433a06dc8d972a
3,330
py
Python
pysnmp-with-texts/Juniper-CBF-CONF.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/Juniper-CBF-CONF.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/Juniper-CBF-CONF.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module Juniper-CBF-CONF (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-CBF-CONF # Produced by pysmi-0.3.4 at Wed May 1 14:02:02 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
107.419355
477
0.775676
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.impo...
true
true
f76fbbfb66c2fc97ef6d8039d4eb1ad89973ea0d
821
py
Python
furport/signals.py
ShunranSasaki/furport-back
e994241d4b9a7395a725a824e37c1602147bd449
[ "MIT" ]
2
2020-07-21T14:14:56.000Z
2020-11-18T18:19:35.000Z
furport/signals.py
ShunranSasaki/furport-back
e994241d4b9a7395a725a824e37c1602147bd449
[ "MIT" ]
12
2020-07-22T10:09:45.000Z
2021-06-25T15:41:08.000Z
furport/signals.py
ShunranSasaki/furport-back
e994241d4b9a7395a725a824e37c1602147bd449
[ "MIT" ]
2
2020-08-11T10:39:04.000Z
2020-08-12T09:04:42.000Z
from django.db.models.signals import post_save from django.dispatch import receiver from allauth.socialaccount.models import SocialAccount from django.contrib.auth.models import User from furport.models import Profile @receiver(post_save, sender=SocialAccount) def socialAccountSaveHandler(sender, instance, created, ...
29.321429
73
0.718636
from django.db.models.signals import post_save from django.dispatch import receiver from allauth.socialaccount.models import SocialAccount from django.contrib.auth.models import User from furport.models import Profile @receiver(post_save, sender=SocialAccount) def socialAccountSaveHandler(sender, instance, created, ...
true
true
f76fbc0bcd4b0a5cd36683066e9ceac2ecf6d1fb
5,923
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/amazon/redshift_subnet_group.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/ansible/modules/cloud/amazon/redshift_subnet_group.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/ansible/modules/cloud/amazon/redshift_subnet_group.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'stat...
33.275281
157
0.652879
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- author: - "Jens Carl (@j-carl), Hothead Games Inc." module: red...
true
true
f76fbedb4e871d878912e009ef669428602403c7
4,194
py
Python
pouta_blueprints/client.py
tourunen/pouta-blueprints-os
9b1a40bfa859d7435ca8fd4db7f9ce323af44aa0
[ "MIT" ]
null
null
null
pouta_blueprints/client.py
tourunen/pouta-blueprints-os
9b1a40bfa859d7435ca8fd4db7f9ce323af44aa0
[ "MIT" ]
null
null
null
pouta_blueprints/client.py
tourunen/pouta-blueprints-os
9b1a40bfa859d7435ca8fd4db7f9ce323af44aa0
[ "MIT" ]
null
null
null
import base64 import requests class PBClient(object): def __init__(self, token, api_base_url, ssl_verify=True): self.token = token self.api_base_url = api_base_url self.ssl_verify = ssl_verify self.auth = base64.encodestring('%s:%s' % (token, '')).replace('\n', '') def do_get(...
39.566038
101
0.611111
import base64 import requests class PBClient(object): def __init__(self, token, api_base_url, ssl_verify=True): self.token = token self.api_base_url = api_base_url self.ssl_verify = ssl_verify self.auth = base64.encodestring('%s:%s' % (token, '')).replace('\n', '') def do_get(...
true
true
f76fbf9a1f338e390ed50b38a0d6b3b328114f7e
1,953
py
Python
tests/nightly-test/utils/buildweb_utils.py
eirinikos/harbor
efb3759d147ad225e00f161a49ab1e9ed4542b1f
[ "Apache-2.0" ]
1
2019-07-29T10:37:18.000Z
2019-07-29T10:37:18.000Z
tests/nightly-test/utils/buildweb_utils.py
hjimmy/harbor
b308c6e4fc3540d03eae7d7c3146f63dab8e52c5
[ "Apache-2.0" ]
2
2018-03-28T14:58:09.000Z
2020-02-19T00:47:42.000Z
tests/nightly-test/utils/buildweb_utils.py
hjimmy/harbor
b308c6e4fc3540d03eae7d7c3146f63dab8e52c5
[ "Apache-2.0" ]
4
2017-10-16T17:34:28.000Z
2018-03-27T15:08:09.000Z
import os import logging from buildwebapi import api as buildapi LOG = logging.getLogger(__name__) def get_build_type(build_id): build = get_build(build_id) LOG.debug('%s is %s build', build_id, build.buildtype) return build.buildtype def get_build_id_and_system(build_id): build_system = 'ob' i...
30.515625
78
0.665131
import os import logging from buildwebapi import api as buildapi LOG = logging.getLogger(__name__) def get_build_type(build_id): build = get_build(build_id) LOG.debug('%s is %s build', build_id, build.buildtype) return build.buildtype def get_build_id_and_system(build_id): build_system = 'ob' i...
false
true
f76fbff0071342cf88eaafda8b7c7673ece4cd1a
2,799
py
Python
src/main/python/org/broadinstitute/hellbender/gcnvkernel/inference/param_tracker.py
raomohan89/GATK
068b7fdd6d983cf0b7611b03bd0028d85de61bc2
[ "BSD-3-Clause" ]
1
2022-01-16T12:58:00.000Z
2022-01-16T12:58:00.000Z
src/main/python/org/broadinstitute/hellbender/gcnvkernel/inference/param_tracker.py
raomohan89/GATK
068b7fdd6d983cf0b7611b03bd0028d85de61bc2
[ "BSD-3-Clause" ]
null
null
null
src/main/python/org/broadinstitute/hellbender/gcnvkernel/inference/param_tracker.py
raomohan89/GATK
068b7fdd6d983cf0b7611b03bd0028d85de61bc2
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pymc3 as pm from typing import Callable, Dict from ..io import io_commons class VariationalParameterTrackerConfig: """Configuration for `VariationalParameterTracker`.""" def __init__(self): self.var_names = [] self.inv_trans_list = [] self.inv_trans_var_names ...
37.824324
96
0.652376
import numpy as np import pymc3 as pm from typing import Callable, Dict from ..io import io_commons class VariationalParameterTrackerConfig: def __init__(self): self.var_names = [] self.inv_trans_list = [] self.inv_trans_var_names = [] def add(self, var_name: str, ...
true
true
f76fc0066dffaf68632913cabdc4ad5c6620fafb
753
py
Python
logger/Logger.py
shigeta-technoface/public-jsp-cam
7e8678bd59527a30bf57246176e9859574f708a6
[ "Apache-2.0" ]
null
null
null
logger/Logger.py
shigeta-technoface/public-jsp-cam
7e8678bd59527a30bf57246176e9859574f708a6
[ "Apache-2.0" ]
null
null
null
logger/Logger.py
shigeta-technoface/public-jsp-cam
7e8678bd59527a30bf57246176e9859574f708a6
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ @title A Python DEAP implementation of Genetic Algorithms with Cluster Averaging Method for Solving Job-Shop Scheduling Problems @see https://www.jstage.jst.go.jp/article/jjsai/10/5/10_769/_article/-char/ja/ @see https://www.personal-media.co.jp/book/comp/173/ @author Shigeta Yosuke @email shigeta@t...
27.888889
128
0.754316
import logging import logging.config from logger.settings import LOGGING class Logger ( object ) : def __init__ ( self, config=LOGGING ) : logging.config.dictConfig ( config ) @staticmethod def getLogger ( label='vnd' ) : return logging.getLogger ( label ) if __name__ == "__main__": pass
true
true
f76fc17f7cb33d29ebe5eb10931cd3d36f8b35be
17,841
py
Python
jinja2htmlcompress.py
eli-collins/jinja2-htmlcompress
b23ed607ebb7b7ad11fb8292e8ff0b31f7ec505a
[ "BSD-3-Clause" ]
6
2017-07-16T14:03:29.000Z
2020-12-22T18:28:09.000Z
jinja2htmlcompress.py
eli-collins/jinja2-htmlcompress
b23ed607ebb7b7ad11fb8292e8ff0b31f7ec505a
[ "BSD-3-Clause" ]
null
null
null
jinja2htmlcompress.py
eli-collins/jinja2-htmlcompress
b23ed607ebb7b7ad11fb8292e8ff0b31f7ec505a
[ "BSD-3-Clause" ]
1
2019-02-27T06:55:44.000Z
2019-02-27T06:55:44.000Z
# -*- coding: utf-8 -*- """ jinja2htmlcompress ~~~~~~~~~~~~~~~~~~ A Jinja2 extension that eliminates useless whitespace at template compilation time without extra overhead. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import print_fun...
40.455782
100
0.574575
from __future__ import print_function import re from warnings import warn assert next from jinja2.ext import Extension from jinja2.lexer import Token, describe_token from jinja2 import TemplateSyntaxError _tag_re = re.compile(r''' (?: < (?P<closes>/?) (?P<tag>[a-zA-Z0-9_-]+) # NO...
true
true
f76fc20e288ef1546543ec27ad48a75dae91e2fb
210
py
Python
service1/app/services.py
sneawo/aiohttp-grpcio-example
2d7842f08816cbbd93ba394c374085176edce712
[ "MIT" ]
null
null
null
service1/app/services.py
sneawo/aiohttp-grpcio-example
2d7842f08816cbbd93ba394c374085176edce712
[ "MIT" ]
null
null
null
service1/app/services.py
sneawo/aiohttp-grpcio-example
2d7842f08816cbbd93ba394c374085176edce712
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__) async def process_name(*, name: str) -> str: name = name.upper() logger.info(f"action=process_name, status=success, name={name}") return name
19.090909
68
0.695238
import logging logger = logging.getLogger(__name__) async def process_name(*, name: str) -> str: name = name.upper() logger.info(f"action=process_name, status=success, name={name}") return name
true
true
f76fc3e978121ce3c234c0484e239a92d011bcb4
2,903
py
Python
src/sima/metocean/contourdatapoint.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/metocean/contourdatapoint.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/metocean/contourdatapoint.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# This an autogenerated file # # Generated with ContourDataPoint from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.contourdatapoint import ContourDataPointBlueprint from typing import Dict from sima.sima.moao import MOAO from sima.sima.scriptableva...
26.633028
110
0.618326
from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.contourdatapoint import ContourDataPointBlueprint from typing import Dict from sima.sima.moao import MOAO from sima.sima.scriptablevalue import ScriptableValue class ContourDataPoint(MOAO): def...
true
true
f76fc52609ba82e52aa087fe1588aacd0256cc14
7,171
py
Python
frappe/custom/doctype/customize_form/test_customize_form.py
AKedar21/frappe
4c9ce1701caea07e595f81414af3a9f219cccb65
[ "MIT" ]
2
2017-08-24T20:25:13.000Z
2017-10-15T13:14:31.000Z
frappe/custom/doctype/customize_form/test_customize_form.py
AKedar21/frappe
4c9ce1701caea07e595f81414af3a9f219cccb65
[ "MIT" ]
19
2018-04-17T09:09:02.000Z
2020-11-17T08:06:25.000Z
frappe/custom/doctype/customize_form/test_customize_form.py
AKedar21/frappe
4c9ce1701caea07e595f81414af3a9f219cccb65
[ "MIT" ]
3
2019-08-09T17:52:18.000Z
2020-07-29T08:23:46.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, unittest, json from frappe.test_runner import make_test_records_for_doctype from frappe.core.doctype.doctype.doctype import InvalidFieldNameError test_dependencies...
36.586735
93
0.719844
from __future__ import unicode_literals import frappe, unittest, json from frappe.test_runner import make_test_records_for_doctype from frappe.core.doctype.doctype.doctype import InvalidFieldNameError test_dependencies = ["Custom Field", "Property Setter"] class TestCustomizeForm(unittest.TestCase): def insert_custo...
true
true
f76fc5779acfa38fbd4a5ae43d11af3926a88fd9
413
py
Python
web/bobapp/migrations/0013_chatmember_latest_weather_city.py
M4R774/bobweb2
87cd320d11883a866bdef4ebe3a614a7a41cef29
[ "MIT" ]
7
2022-01-15T12:02:28.000Z
2022-02-04T11:53:58.000Z
web/bobapp/migrations/0013_chatmember_latest_weather_city.py
M4R774/bobweb2
87cd320d11883a866bdef4ebe3a614a7a41cef29
[ "MIT" ]
131
2022-01-15T14:15:03.000Z
2022-03-21T17:56:09.000Z
web/bobapp/migrations/0013_chatmember_latest_weather_city.py
M4R774/bobweb2
87cd320d11883a866bdef4ebe3a614a7a41cef29
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-02-03 16:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bobapp', '0012_alter_gituser_email'), ] operations = [ migrations.AddField( model_name='chatmember', name='latest_we...
21.736842
62
0.617433
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bobapp', '0012_alter_gituser_email'), ] operations = [ migrations.AddField( model_name='chatmember', name='latest_weather_city', field=models.CharField(...
true
true
f76fc65d645db67aea914b048ff638ff83660241
25,300
py
Python
CondCore/Utilities/python/o2olib.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
13
2015-11-30T15:49:45.000Z
2022-02-08T16:11:30.000Z
CondCore/Utilities/python/o2olib.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
640
2015-02-11T18:55:47.000Z
2022-03-31T14:12:23.000Z
CondCore/Utilities/python/o2olib.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
51
2015-08-11T21:01:40.000Z
2022-03-30T07:31:34.000Z
from __future__ import print_function __author__ = 'Giacomo Govi' import sqlalchemy import sqlalchemy.ext.declarative import subprocess from datetime import datetime import os import sys import logging import string import json import CondCore.Utilities.credentials as auth prod_db_service = 'cms_orcon_prod' dev_db_s...
44.778761
504
0.607233
from __future__ import print_function __author__ = 'Giacomo Govi' import sqlalchemy import sqlalchemy.ext.declarative import subprocess from datetime import datetime import os import sys import logging import string import json import CondCore.Utilities.credentials as auth prod_db_service = 'cms_orcon_prod' dev_db_s...
true
true
f76fc6e378b23e85416b49d5173cfb94eb2eb888
1,873
py
Python
experiments/evaluate.py
johnruth96/privacy-justifiable-fairness
3f5ae92d791df1827cbc8720cf5e7aa33ceed7aa
[ "MIT" ]
null
null
null
experiments/evaluate.py
johnruth96/privacy-justifiable-fairness
3f5ae92d791df1827cbc8720cf5e7aa33ceed7aa
[ "MIT" ]
null
null
null
experiments/evaluate.py
johnruth96/privacy-justifiable-fairness
3f5ae92d791df1827cbc8720cf5e7aa33ceed7aa
[ "MIT" ]
null
null
null
import os import pandas as pd from experiments.conf import Config from fairness import measure_fairness from privacy.models import get_l_distinct, get_k def evaluate_experiment(conf: Config): # Load setup setup = conf.get_setup() A = setup["A"] I = setup["I"] O = setup["O"] S = setup["S"] ...
30.704918
96
0.564335
import os import pandas as pd from experiments.conf import Config from fairness import measure_fairness from privacy.models import get_l_distinct, get_k def evaluate_experiment(conf: Config): setup = conf.get_setup() A = setup["A"] I = setup["I"] O = setup["O"] S = setup["S"] QI = setup[...
true
true
f76fc789589e5bf1c010e6d371e2f43378168b00
390
py
Python
src/schnet/nn/utils.py
Yidansong/SchNet
49a1e6031f50d79a83ea21148b8e8cbcabdaabb7
[ "MIT" ]
155
2017-11-10T19:13:14.000Z
2022-03-25T05:23:30.000Z
src/schnet/nn/utils.py
Yidansong/SchNet
49a1e6031f50d79a83ea21148b8e8cbcabdaabb7
[ "MIT" ]
3
2017-10-30T14:02:56.000Z
2018-06-26T15:04:47.000Z
src/schnet/nn/utils.py
Yidansong/SchNet
49a1e6031f50d79a83ea21148b8e8cbcabdaabb7
[ "MIT" ]
48
2018-01-11T15:50:19.000Z
2022-03-02T20:52:30.000Z
import numpy as np import tensorflow as tf from tensorflow.python.ops.array_grad import _TileGrad from tensorflow.python.framework import ops def shape(x): if isinstance(x, tf.Tensor): return x.get_shape().as_list() return np.shape(x) @ops.RegisterGradient("TileDense") def tile_grad_dense(op, grad):...
22.941176
54
0.738462
import numpy as np import tensorflow as tf from tensorflow.python.ops.array_grad import _TileGrad from tensorflow.python.framework import ops def shape(x): if isinstance(x, tf.Tensor): return x.get_shape().as_list() return np.shape(x) @ops.RegisterGradient("TileDense") def tile_grad_dense(op, grad):...
true
true
f76fc7b4a565f61ed88e54e264a10158b293e7ba
3,382
py
Python
psqlextra/management/commands/pgpartition.py
ckrybus/django-postgres-extra
0e7fd1a0742016691f670796ce06907195426c27
[ "MIT" ]
null
null
null
psqlextra/management/commands/pgpartition.py
ckrybus/django-postgres-extra
0e7fd1a0742016691f670796ce06907195426c27
[ "MIT" ]
null
null
null
psqlextra/management/commands/pgpartition.py
ckrybus/django-postgres-extra
0e7fd1a0742016691f670796ce06907195426c27
[ "MIT" ]
null
null
null
from typing import Optional from django.conf import settings from django.core.management.base import BaseCommand from django.utils.module_loading import import_string from psqlextra.partitioning import PostgresPartitioningError class Command(BaseCommand): """Create new partitions and delete old ones according t...
27.950413
160
0.57806
from typing import Optional from django.conf import settings from django.core.management.base import BaseCommand from django.utils.module_loading import import_string from psqlextra.partitioning import PostgresPartitioningError class Command(BaseCommand): help = "Create new partitions and delete old ones using...
true
true
f76fc82f47422099d83d4fdf73cea5ff3bcfe790
1,075
py
Python
tests/data/arrays/Translation/arrays-sect-19.py
cthoyt/delphi
3df2de639905453f5d28d7a7b3b9f7e5a7a1fb0d
[ "Apache-2.0" ]
null
null
null
tests/data/arrays/Translation/arrays-sect-19.py
cthoyt/delphi
3df2de639905453f5d28d7a7b3b9f7e5a7a1fb0d
[ "Apache-2.0" ]
null
null
null
tests/data/arrays/Translation/arrays-sect-19.py
cthoyt/delphi
3df2de639905453f5d28d7a7b3b9f7e5a7a1fb0d
[ "Apache-2.0" ]
null
null
null
from fortran_format import * from for2py_arrays import * def main(): A = Array([(1,5),(1,5)]) for i in range(1,5+1): for j in range(1,5+1): A.set((i,j), 11*(i+j)) # A(i,j) = 11*(i+j) fmt_obj_10 = Format(['5(I5)']) fmt_obj_11 = Format(['""']) for i in range(1,5+1): ...
31.617647
77
0.444651
from fortran_format import * from for2py_arrays import * def main(): A = Array([(1,5),(1,5)]) for i in range(1,5+1): for j in range(1,5+1): A.set((i,j), 11*(i+j)) fmt_obj_10 = Format(['5(I5)']) fmt_obj_11 = Format(['""']) for i in range(1,5+1): sys.stdout.wr...
true
true
f76fc834802a10c1fe0a7517b5ff23f4db1b3372
8,760
py
Python
src/lib/models/embedding_space_generater.py
Banconxuan/RTS3D
6d2738501eaf90f019eeaa22254cd9756f8d3364
[ "MIT" ]
67
2020-12-31T00:20:50.000Z
2022-03-26T09:21:24.000Z
src/lib/models/embedding_space_generater.py
Banconxuan/RTS3D
6d2738501eaf90f019eeaa22254cd9756f8d3364
[ "MIT" ]
5
2021-01-13T09:28:55.000Z
2022-02-19T21:17:10.000Z
src/lib/models/embedding_space_generater.py
Banconxuan/RTS3D
6d2738501eaf90f019eeaa22254cd9756f8d3364
[ "MIT" ]
7
2021-01-11T02:30:14.000Z
2022-01-06T01:32:35.000Z
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bin Xiao (Bin.Xiao@microsoft.com) # Modified by Xingyi Zhou # ------------------------------------------------------------------------------ from __future__ import a...
45.863874
125
0.627626
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import torch def generate_gridpoint(dim, pos, ori, calib_l, calib_r, trans_output_l, trans_output_r, opt=None): h = dim[0] w = dim[1] l = dim[2] x_axi = -torch.linspace(-l / 2., l ...
true
true
f76fc86a3818d45891960388c0e5c2b500f98ed8
425
py
Python
env/Lib/site-packages/plotly/validators/funnel/outsidetextfont/_colorsrc.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/Lib/site-packages/plotly/validators/funnel/outsidetextfont/_colorsrc.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/Lib/site-packages/plotly/validators/funnel/outsidetextfont/_colorsrc.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnel.outsidetextfont", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent...
30.357143
84
0.661176
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnel.outsidetextfont", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent...
true
true
f76fc8b46cc3de2f5ddd85e6126b3e253447ad49
920
py
Python
managing/log_save.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
1
2019-07-20T09:51:53.000Z
2019-07-20T09:51:53.000Z
managing/log_save.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
11
2019-07-26T02:23:52.000Z
2022-03-11T23:41:09.000Z
managing/log_save.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
1
2019-07-26T02:16:49.000Z
2019-07-26T02:16:49.000Z
class UserLogs(object): def __init__(self,**kwargs): if 'user' in kwargs: self.user = kwargs['user'] if 'url' in kwargs: self.url = kwargs['url'] if 'action' in kwargs: self.action = kwargs['action'] if 'model_name' in kwargs: self.mod...
32.857143
50
0.544565
class UserLogs(object): def __init__(self,**kwargs): if 'user' in kwargs: self.user = kwargs['user'] if 'url' in kwargs: self.url = kwargs['url'] if 'action' in kwargs: self.action = kwargs['action'] if 'model_name' in kwargs: self.mod...
true
true
f76fc989563c4efe32aba6345e5d5be8518c635d
8,271
py
Python
stop_parser.py
OwlSoul/YandexTransportSpider
eca3fa83580bab02e626a12448901a3290953a7f
[ "MIT" ]
null
null
null
stop_parser.py
OwlSoul/YandexTransportSpider
eca3fa83580bab02e626a12448901a3290953a7f
[ "MIT" ]
2
2019-04-18T16:53:22.000Z
2019-05-03T13:33:47.000Z
stop_parser.py
OwlSoul/YandexTransportSpider
eca3fa83580bab02e626a12448901a3290953a7f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import json import datetime import sys import psycopg2 from yandex_transport_webdriver_api import YandexTransportProxy # TODO: Move these two to API def form_stop_url(stop_id): return 'https://yandex.ru/maps/?masstransit[stopId]=' + stop_id def parse_stop(yandex_stop_id, db_settings, ytpro...
33.897541
122
0.519042
import json import datetime import sys import psycopg2 from yandex_transport_webdriver_api import YandexTransportProxy def form_stop_url(stop_id): return 'https://yandex.ru/maps/?masstransit[stopId]=' + stop_id def parse_stop(yandex_stop_id, db_settings, ytproxy_host, ytproxy_port, timeout, force_overwrite=False...
true
true
f76fc9a604bda9ef48b3761e035fb5594c881fe6
1,194
py
Python
txircd/modules/rfc/cmode_l.py
guyguy2001/txircd
d548975a775a3582ebb2f480474cfa3e79a26b8c
[ "BSD-3-Clause" ]
19
2015-07-06T21:24:15.000Z
2021-04-01T13:05:46.000Z
txircd/modules/rfc/cmode_l.py
guyguy2001/txircd
d548975a775a3582ebb2f480474cfa3e79a26b8c
[ "BSD-3-Clause" ]
37
2015-01-16T10:01:28.000Z
2021-06-01T14:17:49.000Z
txircd/modules/rfc/cmode_l.py
guyguy2001/txircd
d548975a775a3582ebb2f480474cfa3e79a26b8c
[ "BSD-3-Clause" ]
4
2016-09-15T02:48:43.000Z
2020-01-14T17:23:50.000Z
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ModeType from zope.interface import implements class LimitMode(ModuleData, Mode): implements(IPlugin, IModuleData, IMode) name = "LimitMode" ...
29.85
123
0.736181
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ModeType from zope.interface import implements class LimitMode(ModuleData, Mode): implements(IPlugin, IModuleData, IMode) name = "LimitMode" ...
true
true
f76fc9c9a85ce720a5f97bdedd7d326c67d478e2
4,056
py
Python
autosklearn/pipeline/components/data_preprocessing/imputation/categorical_imputation.py
FelixNeutatz/auto-sklearn
b5d141603332041475ed746aa1640334f5561aea
[ "BSD-3-Clause" ]
null
null
null
autosklearn/pipeline/components/data_preprocessing/imputation/categorical_imputation.py
FelixNeutatz/auto-sklearn
b5d141603332041475ed746aa1640334f5561aea
[ "BSD-3-Clause" ]
null
null
null
autosklearn/pipeline/components/data_preprocessing/imputation/categorical_imputation.py
FelixNeutatz/auto-sklearn
b5d141603332041475ed746aa1640334f5561aea
[ "BSD-3-Clause" ]
null
null
null
from ConfigSpace.configuration_space import ConfigurationSpace from autosklearn.pipeline.components.base import AutoSklearnPreprocessingAlgorithm from autosklearn.pipeline.constants import DENSE, SPARSE, UNSIGNED_DATA, INPUT from ConfigSpace.hyperparameters import CategoricalHyperparameter, UniformIntegerHyperparameter...
43.148936
123
0.658777
from ConfigSpace.configuration_space import ConfigurationSpace from autosklearn.pipeline.components.base import AutoSklearnPreprocessingAlgorithm from autosklearn.pipeline.constants import DENSE, SPARSE, UNSIGNED_DATA, INPUT from ConfigSpace.hyperparameters import CategoricalHyperparameter, UniformIntegerHyperparameter...
true
true
f76fca5fa721495e033893fc6a54814c5d2254a4
151
py
Python
tsn/model/registry.py
ZJCV/X3D
1635fe4ade5ac5e0bd8f272262cec73c7a12f0fb
[ "Apache-2.0" ]
10
2021-02-08T06:47:09.000Z
2022-03-31T03:02:55.000Z
tsn/model/registry.py
ZJCV/SlowFast
eb049e2d23d60c02b25f20c6ec438e3fd884db46
[ "Apache-2.0" ]
3
2021-05-17T10:19:23.000Z
2021-07-22T05:57:17.000Z
tsn/model/registry.py
ZJCV/SlowFast
eb049e2d23d60c02b25f20c6ec438e3fd884db46
[ "Apache-2.0" ]
2
2021-06-15T02:39:50.000Z
2021-09-30T05:03:29.000Z
from tsn.util.registry import Registry BACKBONE = Registry() HEAD = Registry() RECOGNIZER = Registry() CONSENSU = Registry() CRITERION = Registry()
15.1
38
0.741722
from tsn.util.registry import Registry BACKBONE = Registry() HEAD = Registry() RECOGNIZER = Registry() CONSENSU = Registry() CRITERION = Registry()
true
true
f76fcab7a3f68677a6aa619ad8b920871ec37ac1
357
py
Python
python/0454.rectangle-area.py
Ubastic/lintcode
9f600eece075410221a24859331a810503c76014
[ "MIT" ]
6
2019-10-02T02:24:49.000Z
2021-11-18T10:08:07.000Z
python/0454.rectangle-area.py
Ubastic/lintcode
9f600eece075410221a24859331a810503c76014
[ "MIT" ]
1
2020-02-28T03:42:36.000Z
2020-03-07T09:26:00.000Z
src/0454.rectangle-area/0454.rectangle-area.py
jiangshanmeta/lintcode
7d7003825b5a7b9fd5b0be57aa2d84391e0d1fa5
[ "MIT" ]
2
2020-07-25T08:42:38.000Z
2021-05-07T06:16:46.000Z
class Rectangle: ''' * Define a constructor which expects two parameters width and height here. ''' def __init__(self,width,height): self.area = width*height ''' * Define a public method `getArea` which can calculate the area of the * rectangle and return. ''' def ge...
25.5
79
0.619048
class Rectangle: def __init__(self,width,height): self.area = width*height def getArea(self): return self.area
true
true
f76fcad5b1c09ee12aef38e0edbf2b17efba4788
1,106
py
Python
testproject/shrubberies/factories.py
weber-s/bridgekeeper
035cf8c91ca77ecb2c30d08b7c128ecfe5071af0
[ "MIT" ]
21
2019-05-04T12:56:13.000Z
2022-02-09T10:52:30.000Z
testproject/shrubberies/factories.py
weber-s/bridgekeeper
035cf8c91ca77ecb2c30d08b7c128ecfe5071af0
[ "MIT" ]
18
2019-07-18T11:35:00.000Z
2021-10-05T21:52:32.000Z
testproject/shrubberies/factories.py
BrightpathAssessment/bridgekeeper
22abc3f35e355f6acc87ed398300407d531f1d50
[ "MIT" ]
7
2019-07-24T15:59:23.000Z
2022-02-10T08:59:41.000Z
from decimal import Decimal import factory from django.contrib.auth.models import User from factory.django import DjangoModelFactory from . import models class StoreFactory(DjangoModelFactory): name = factory.Faker("company") class Meta: model = models.Store class BranchFactory(DjangoModelFactory...
22.12
66
0.71519
from decimal import Decimal import factory from django.contrib.auth.models import User from factory.django import DjangoModelFactory from . import models class StoreFactory(DjangoModelFactory): name = factory.Faker("company") class Meta: model = models.Store class BranchFactory(DjangoModelFactory...
true
true
f76fcbb58ddef7aee09659d33ad6bdd6b6db2b74
372
py
Python
tests/views.py
christianwgd/django-activeurl
d6d8b9d04c09e2c2333ed8acbca788b25dc26a0c
[ "Apache-2.0" ]
139
2015-01-03T22:25:26.000Z
2022-01-27T06:48:50.000Z
tests/views.py
christianwgd/django-activeurl
d6d8b9d04c09e2c2333ed8acbca788b25dc26a0c
[ "Apache-2.0" ]
39
2015-08-09T20:04:01.000Z
2022-01-17T05:53:14.000Z
tests/views.py
hellysmile/django-activeurl
d6d8b9d04c09e2c2333ed8acbca788b25dc26a0c
[ "Apache-2.0" ]
27
2015-02-09T09:22:04.000Z
2021-12-10T06:37:25.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.http import HttpResponse from django.shortcuts import render def dummy_view(request): return HttpResponse() def djnago_template_view(request): return render(request, 'django.html', {}) def jinja_template_view(req...
20.666667
56
0.747312
from __future__ import absolute_import, unicode_literals from django.http import HttpResponse from django.shortcuts import render def dummy_view(request): return HttpResponse() def djnago_template_view(request): return render(request, 'django.html', {}) def jinja_template_view(request): return render...
true
true
f76fcbea3b0e48e9bb557be89f1cdfc4e590a57c
586
py
Python
huobi/service/etp/redemption_creation_history.py
Reactive-Capital/huobi_Python
1ba61f50be514b42a9fa3c2fe5d894e496b042e5
[ "Apache-2.0" ]
null
null
null
huobi/service/etp/redemption_creation_history.py
Reactive-Capital/huobi_Python
1ba61f50be514b42a9fa3c2fe5d894e496b042e5
[ "Apache-2.0" ]
null
null
null
huobi/service/etp/redemption_creation_history.py
Reactive-Capital/huobi_Python
1ba61f50be514b42a9fa3c2fe5d894e496b042e5
[ "Apache-2.0" ]
null
null
null
from huobi.connection.restapi_sync_client import RestApiSyncClient from huobi.constant import * from huobi.model.etp.etp_creation_redemption_history import ETPCreationRedemptionHistory class GetETPCreationRedemptionHistoryService: def __init__(self, params): self.params = params def request(self, **...
32.555556
108
0.766212
from huobi.connection.restapi_sync_client import RestApiSyncClient from huobi.constant import * from huobi.model.etp.etp_creation_redemption_history import ETPCreationRedemptionHistory class GetETPCreationRedemptionHistoryService: def __init__(self, params): self.params = params def request(self, **...
true
true
f76fcca45603bbbf43fd70c223447325dd1d57b6
3,838
py
Python
examples/protocols/esp_local_ctrl/example_test.py
mbrunnen/hal_espressif
4f2f7d18a5be962ad0c8bcb3e9fbe010d9df80ee
[ "Apache-2.0" ]
8
2021-04-17T23:30:54.000Z
2022-02-12T19:10:34.000Z
examples/protocols/esp_local_ctrl/example_test.py
mbrunnen/hal_espressif
4f2f7d18a5be962ad0c8bcb3e9fbe010d9df80ee
[ "Apache-2.0" ]
24
2020-12-10T11:29:39.000Z
2022-03-21T16:18:12.000Z
examples/protocols/esp_local_ctrl/example_test.py
mbrunnen/hal_espressif
4f2f7d18a5be962ad0c8bcb3e9fbe010d9df80ee
[ "Apache-2.0" ]
16
2020-12-10T11:11:20.000Z
2022-02-22T12:59:19.000Z
from __future__ import unicode_literals import os import re import sys import ttfw_idf @ttfw_idf.idf_example_test(env_tag='Example_WIFI') def test_examples_esp_local_ctrl(env, extra_data): rel_project_path = os.path.join('examples', 'protocols', 'esp_local_ctrl') dut = env.get_dut('esp_local_ctrl', rel_pro...
47.382716
117
0.683168
from __future__ import unicode_literals import os import re import sys import ttfw_idf @ttfw_idf.idf_example_test(env_tag='Example_WIFI') def test_examples_esp_local_ctrl(env, extra_data): rel_project_path = os.path.join('examples', 'protocols', 'esp_local_ctrl') dut = env.get_dut('esp_local_ctrl', rel_pro...
true
true
f76fcce757b175c43d35da3ddea2e6ed56397ee5
1,474
py
Python
ZaaS-server/fill.py
kakugirai/ZaaS
ebf9f930c70e3d8335c193ed50c8944109f31bfa
[ "MIT" ]
2
2017-02-03T00:23:23.000Z
2017-02-03T05:30:47.000Z
ZaaS-server/fill.py
kakugirai/zanryu
ebf9f930c70e3d8335c193ed50c8944109f31bfa
[ "MIT" ]
null
null
null
ZaaS-server/fill.py
kakugirai/zanryu
ebf9f930c70e3d8335c193ed50c8944109f31bfa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import json from bs4 import BeautifulSoup def fill_html(json_dir, blank_html="blank.html", unit_html="unit.html"): """ The function will read all json files in json_dir and save formatted HTML file to a zanryu.html @type json_data: str @param json_data: location ...
31.361702
72
0.650611
import os import json from bs4 import BeautifulSoup def fill_html(json_dir, blank_html="blank.html", unit_html="unit.html"): """ The function will read all json files in json_dir and save formatted HTML file to a zanryu.html @type json_data: str @param json_data: location of all json files @t...
false
true
f76fcd391470d2b12f0dbfeabbce77a60ea577d2
13,062
py
Python
keras/optimizers/optimizer_v2/rmsprop.py
tsheaff/keras
ee227dda766d769b7499a5549e8ed77b5e88105b
[ "Apache-2.0" ]
null
null
null
keras/optimizers/optimizer_v2/rmsprop.py
tsheaff/keras
ee227dda766d769b7499a5549e8ed77b5e88105b
[ "Apache-2.0" ]
null
null
null
keras/optimizers/optimizer_v2/rmsprop.py
tsheaff/keras
ee227dda766d769b7499a5549e8ed77b5e88105b
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
43.395349
80
0.662915
import tensorflow.compat.v2 as tf import numpy as np from keras import backend_config from keras.optimizers.optimizer_v2 import optimizer_v2 from tensorflow.python.util.tf_export import keras_export @keras_export("keras.optimizers.RMSprop", "keras.optimizers_legacy.RMSprop") class RMSprop(optimizer_v2.OptimizerV2):...
true
true
f76fcd98296eae07279203a5b1fc8742793b014f
732
py
Python
test/ninja/use-console/gyptest-use-console.py
chlorm-forks/gyp
a8921fcaab1a18c8cf7e4ab09ceb940e336918ec
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
test/ninja/use-console/gyptest-use-console.py
chlorm-forks/gyp
a8921fcaab1a18c8cf7e4ab09ceb940e336918ec
[ "BSD-3-Clause" ]
1,432
2017-06-21T04:08:48.000Z
2020-08-25T16:21:15.000Z
test/ninja/use-console/gyptest-use-console.py
chlorm-forks/gyp
a8921fcaab1a18c8cf7e4ab09ceb940e336918ec
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # Copyright (c) 2014 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure 'ninja_use_console' is supported in actions and rules. """ import TestGyp test = TestGyp.TestGyp(formats=['ninja']) test.ru...
24.4
72
0.729508
import TestGyp test = TestGyp.TestGyp(formats=['ninja']) test.run_gyp('use-console.gyp') no_pool = open(test.built_file_path('obj/no_pool.ninja')).read() if 'pool =' in no_pool: test.fail_test() action_pool = open(test.built_file_path('obj/action_pool.ninja')).read() if 'pool = console' not in action_pool: t...
true
true
f76fce4c85cfe4215e3a1c8c6ef7e90224d7a525
3,044
py
Python
models/fetchplugin_dialog_model.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
5
2017-02-28T16:16:06.000Z
2020-07-13T06:49:34.000Z
models/fetchplugin_dialog_model.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
1
2018-08-19T19:08:14.000Z
2018-08-19T19:08:14.000Z
models/fetchplugin_dialog_model.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
4
2017-10-25T20:17:15.000Z
2021-07-26T11:39:50.000Z
"""fetchplugin_dialog_model.py - model for the fetchplugin_dialog Chris R. Coughlin (TRI/Austin, Inc.) """ __author__ = 'Chris R. Coughlin' from models import plugin_installer from models.mainmodel import get_logger module_logger = get_logger(__name__) class FetchPluginDialogModel(object): """Model for the Fet...
39.025641
90
0.643561
__author__ = 'Chris R. Coughlin' from models import plugin_installer from models.mainmodel import get_logger module_logger = get_logger(__name__) class FetchPluginDialogModel(object): def __init__(self, controller): self.controller = controller self.plugin_fetcher = None module_logger.i...
true
true
f76fce76e0235996bec2a5abb894961626a12571
2,354
py
Python
January/Week2/Add Two Numbers.py
vinaykumar7686/Leetcode-August_Challenge
fe1928d8b10a63d7aa561118a70eeaec2f3a2f36
[ "MIT" ]
1
2020-08-02T13:41:38.000Z
2020-08-02T13:41:38.000Z
January/Week2/Add Two Numbers.py
vinaykumar7686/Leetcode-August_Challenge
fe1928d8b10a63d7aa561118a70eeaec2f3a2f36
[ "MIT" ]
null
null
null
January/Week2/Add Two Numbers.py
vinaykumar7686/Leetcode-August_Challenge
fe1928d8b10a63d7aa561118a70eeaec2f3a2f36
[ "MIT" ]
null
null
null
# Add Two Numbers ''' You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, exce...
24.778947
226
0.431606
class Solution: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: s = ListNode(0) ans = s carry = 0 while l1 or l2: if l1 and l2: add = l1.val+l2.val+carry ...
true
true
f76fcf5ec1df7191aff3cdb62b91943a07935a30
6,284
py
Python
include/wxPython/wx/py/interpreter.py
SWEN-712/screen-reader-brandonp728
e30c25ad2d10ce632fac0548696a61a872328f59
[ "bzip2-1.0.6" ]
3
2019-10-06T15:39:39.000Z
2020-09-29T23:51:50.000Z
include/wxPython/wx/py/interpreter.py
SWEN-712/screen-reader-brandonp728
e30c25ad2d10ce632fac0548696a61a872328f59
[ "bzip2-1.0.6" ]
9
2021-03-18T23:10:27.000Z
2022-03-11T23:43:55.000Z
include/wxPython/wx/py/interpreter.py
SWEN-712/screen-reader-brandonp728
e30c25ad2d10ce632fac0548696a61a872328f59
[ "bzip2-1.0.6" ]
2
2019-03-11T05:06:49.000Z
2019-03-22T21:48:49.000Z
"""Interpreter executes Python commands.""" __author__ = "Patrick K. O'Brien <pobrien@orbtech.com> / " __author__ += "David N. Mashburn <david.n.mashburn@gmail.com>" import os import sys from code import InteractiveInterpreter, compile_command from . import dispatcher from . import introspect import wx import six c...
36.748538
79
0.585455
__author__ = "Patrick K. O'Brien <pobrien@orbtech.com> / " __author__ += "David N. Mashburn <david.n.mashburn@gmail.com>" import os import sys from code import InteractiveInterpreter, compile_command from . import dispatcher from . import introspect import wx import six class Interpreter(InteractiveInterpreter): ...
true
true
f76fcf75a33a9e21417ea3b16ce411424b44a8bd
25,033
py
Python
pytorch-frontend/caffe2/python/workspace.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
40
2021-06-01T07:37:59.000Z
2022-03-25T01:42:09.000Z
pytorch-frontend/caffe2/python/workspace.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
14
2021-06-01T11:52:46.000Z
2022-03-25T02:13:08.000Z
pytorch-frontend/caffe2/python/workspace.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
7
2021-07-20T19:34:26.000Z
2022-03-13T21:07:36.000Z
## @package workspace # Module caffe2.python.workspace from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import contextlib from google.protobuf.message import Message from multiprocessing import Process...
32.384217
90
0.694124
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import contextlib from google.protobuf.message import Message from multiprocessing import Process import os from collections import defaultdict import l...
true
true
f76fcfa30313bf8d3299da6b12b504388fe99ffb
22,510
py
Python
djangoappengine/db/compiler.py
haroldl/homeworklog
07f0b1a301091c2d37cbbb7810db267386d4a114
[ "BSD-3-Clause" ]
null
null
null
djangoappengine/db/compiler.py
haroldl/homeworklog
07f0b1a301091c2d37cbbb7810db267386d4a114
[ "BSD-3-Clause" ]
null
null
null
djangoappengine/db/compiler.py
haroldl/homeworklog
07f0b1a301091c2d37cbbb7810db267386d4a114
[ "BSD-3-Clause" ]
null
null
null
from .db_settings import get_model_indexes from .utils import commit_locked from .expressions import ExpressionEvaluator import datetime import sys from django.db.models.sql import aggregates as sqlaggregates from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE from django.db.models.sql.where import A...
40.053381
131
0.561706
from .db_settings import get_model_indexes from .utils import commit_locked from .expressions import ExpressionEvaluator import datetime import sys from django.db.models.sql import aggregates as sqlaggregates from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE from django.db.models.sql.where import A...
false
true
f76fd000923a038ac59c600f0e90e2b07d9c12da
22,531
py
Python
PyEMD/EMD_matlab.py
helloworldpark/PyEMD
d28481b3244f317c196dbfe92af7e2d776b64382
[ "Apache-2.0" ]
null
null
null
PyEMD/EMD_matlab.py
helloworldpark/PyEMD
d28481b3244f317c196dbfe92af7e2d776b64382
[ "Apache-2.0" ]
null
null
null
PyEMD/EMD_matlab.py
helloworldpark/PyEMD
d28481b3244f317c196dbfe92af7e2d776b64382
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # coding: UTF-8 # # Author: Dawid Laszuk # Contact: laszukdawid@gmail.com # # Edited: 11/05/2017 # # Feel free to contact for any information. from __future__ import division, print_function import logging import numpy as np import time from scipy.interpolate import interp1d f...
33.379259
109
0.484444
from __future__ import division, print_function import logging import numpy as np import time from scipy.interpolate import interp1d from PyEMD.PyEMD.splines import * class EMD: logger = logging.getLogger(__name__) def __init__(self): self.splineKind = 'cubic' self.nbsy...
true
true
f76fd0975711a6ad94b1dd6293baf49f2dc4f89a
2,372
py
Python
torchmetrics/classification/__init__.py
lucadiliello/metrics
e98fbafd2af5d217596958f9cfe6152543a00b7f
[ "Apache-2.0" ]
4
2021-03-22T09:02:31.000Z
2021-03-23T07:35:39.000Z
torchmetrics/classification/__init__.py
lucadiliello/metrics
e98fbafd2af5d217596958f9cfe6152543a00b7f
[ "Apache-2.0" ]
4
2021-06-14T08:40:18.000Z
2021-07-27T20:01:08.000Z
torchmetrics/classification/__init__.py
lucadiliello/metrics
e98fbafd2af5d217596958f9cfe6152543a00b7f
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
65.888889
106
0.828836
from torchmetrics.classification.accuracy import Accuracy from torchmetrics.classification.auc import AUC from torchmetrics.classification.auroc import AUROC from torchmetrics.classification.avg_precision import AveragePrecision from torchmetrics.classification.binned_precision_recall import BinnedAveragePrecision ...
true
true
f76fd0f5e2d9785be1b3214633cdd82ccea63f92
3,659
py
Python
rbql_core/vscode_rbql.py
larsonmars/vscode_rainbow_csv
ac5c2c36bd907b2e58c3dda5cd11e37837a73d3b
[ "MIT" ]
null
null
null
rbql_core/vscode_rbql.py
larsonmars/vscode_rainbow_csv
ac5c2c36bd907b2e58c3dda5cd11e37837a73d3b
[ "MIT" ]
null
null
null
rbql_core/vscode_rbql.py
larsonmars/vscode_rainbow_csv
ac5c2c36bd907b2e58c3dda5cd11e37837a73d3b
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import unicode_literals from __future__ import print_function import os import sys import codecs import time import tempfile import subprocess import argparse import json import base64 import rbql def report_error_and_exit(error_type, error_details): sys.stdout.write(json.d...
34.196262
111
0.679694
from __future__ import unicode_literals from __future__ import print_function import os import sys import codecs import time import tempfile import subprocess import argparse import json import base64 import rbql def report_error_and_exit(error_type, error_details): sys.stdout.write(json.dumps({'error_type': er...
true
true
f76fd1c1b156ce335f1e2ed1767c114bf4bc38fe
688
py
Python
server/sql/schemas/questions.py
michellopes338/historia
e31995963b81852fb14bcb982499356cf786df11
[ "MIT" ]
null
null
null
server/sql/schemas/questions.py
michellopes338/historia
e31995963b81852fb14bcb982499356cf786df11
[ "MIT" ]
null
null
null
server/sql/schemas/questions.py
michellopes338/historia
e31995963b81852fb14bcb982499356cf786df11
[ "MIT" ]
null
null
null
from typing import Optional, Tuple from pydantic import BaseModel class AlternativesBase(BaseModel): id: int alternative: str class AlternativesUpdate(BaseModel): alternative: Optional[str] class AlternativesIn(BaseModel): alternative: str is_correct: bool question_fk: int class Alternat...
16.380952
41
0.728198
from typing import Optional, Tuple from pydantic import BaseModel class AlternativesBase(BaseModel): id: int alternative: str class AlternativesUpdate(BaseModel): alternative: Optional[str] class AlternativesIn(BaseModel): alternative: str is_correct: bool question_fk: int class Alternat...
true
true
f76fd1cbf5f9bacb2fc67f4df07653fe08936642
1,007
py
Python
djsniper/contrib/sites/migrations/0003_set_site_domain_and_name.py
justdjango/django-nft-sniper
75306fa223493ec60cf621489c264b43110970c8
[ "MIT" ]
18
2021-12-24T05:45:35.000Z
2022-03-30T05:18:53.000Z
djsniper/contrib/sites/migrations/0003_set_site_domain_and_name.py
zevcc-gh/nft-sniper
7ba41adffe7b5157b98a162aa72272a89fb9bda2
[ "MIT" ]
1
2022-03-05T05:58:27.000Z
2022-03-05T05:58:27.000Z
djsniper/contrib/sites/migrations/0003_set_site_domain_and_name.py
zevcc-gh/nft-sniper
7ba41adffe7b5157b98a162aa72272a89fb9bda2
[ "MIT" ]
3
2022-01-09T16:58:02.000Z
2022-02-23T11:53:46.000Z
""" To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """ from django.conf import settings from django.db import migrations def update_site_forward(apps, schema_editor): """Set site d...
28.771429
129
0.686197
from django.conf import settings from django.db import migrations def update_site_forward(apps, schema_editor): Site = apps.get_model("sites", "Site") Site.objects.update_or_create( id=settings.SITE_ID, defaults={ "domain": "djsniper.com", "name": "djsniper", },...
true
true
f76fd2315d75b4b6e77f041c01d5190acfe87631
4,957
py
Python
examples/obsolete/putslice_eq.py
simpla-fusion/spdb
be6667eb6c7d464f68b0fd51ca2a8f021581eb84
[ "MIT" ]
null
null
null
examples/obsolete/putslice_eq.py
simpla-fusion/spdb
be6667eb6c7d464f68b0fd51ca2a8f021581eb84
[ "MIT" ]
null
null
null
examples/obsolete/putslice_eq.py
simpla-fusion/spdb
be6667eb6c7d464f68b0fd51ca2a8f021581eb84
[ "MIT" ]
null
null
null
# Definition of the class structures in file imas.py import imas import numpy import sys import os ''' This sample program will create a pulse file (shot 13, run 1) and will put an example of equilibirium IDS using put_slice methods. ''' # This routine reads an array of pfsystems IDSs in the database, filling # some ...
32.398693
88
0.557394
import imas import numpy import sys import os TEST_DATABASE_NAME = 'test' def put_ids(): shot = 13 time = 1 interp = 1 imas_obj = imas.ids(13, 1, 13, 1) imas_obj.create_env("fydev", "test", "3") if imas_obj.isConnected(): print('Creation of data entry OK!') else: ...
true
true
f76fd26e0ae2fce30dbb14bfe8b63b060196e927
152
py
Python
mposp_root/pages/views.py
hanshendrickx/gitDP002
9703791a2270495830142917a7b12ba1eb2ca3f5
[ "CC0-1.0" ]
null
null
null
mposp_root/pages/views.py
hanshendrickx/gitDP002
9703791a2270495830142917a7b12ba1eb2ca3f5
[ "CC0-1.0" ]
null
null
null
mposp_root/pages/views.py
hanshendrickx/gitDP002
9703791a2270495830142917a7b12ba1eb2ca3f5
[ "CC0-1.0" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse def homePageView(request): return HttpResponse('Hello, World!')
19
41
0.743421
from django.shortcuts import render from django.http import HttpResponse def homePageView(request): return HttpResponse('Hello, World!')
true
true
f76fd2efbdf2369ae4472b21ed90dbf9d6e35fe8
16,848
py
Python
HexStatistics.py
karomamczi/hexagonal_simplification
6f1649596d5dfaa9b9432fcdb1906489e57be4e2
[ "MIT" ]
1
2021-07-20T05:19:59.000Z
2021-07-20T05:19:59.000Z
HexStatistics.py
karomamczi/hexagonal_simplification
6f1649596d5dfaa9b9432fcdb1906489e57be4e2
[ "MIT" ]
null
null
null
HexStatistics.py
karomamczi/hexagonal_simplification
6f1649596d5dfaa9b9432fcdb1906489e57be4e2
[ "MIT" ]
null
null
null
####################################################################### # Filename: HexStatistics.py # # Author: Karolina Mamczarz # # Institution: AGH University of Science and Technology in Cracow, # # Poland ...
49.994065
79
0.572472
from sys import exit import arcpy from math import sqrt class HexStatistics(object): def __init__(self, original, simplified, report_file_path): self.original = original self.simplified = simplified self.report_file_path = report_file_path self.report = open(self.report_file_path...
true
true
f76fd3b10033797be69830ac23219356b67ac5bb
4,703
py
Python
nmt/utils/common_test_utils.py
ChuanTianML/learn_gnmt
19e97e04feaecd7682abaf6247a0f9e3f37f9892
[ "Apache-2.0" ]
126
2018-07-26T07:06:56.000Z
2022-01-25T08:11:25.000Z
nmt/utils/common_test_utils.py
ChuanTianML/learn_gnmt
19e97e04feaecd7682abaf6247a0f9e3f37f9892
[ "Apache-2.0" ]
20
2018-08-07T04:51:16.000Z
2020-05-15T04:47:20.000Z
nmt/utils/common_test_utils.py
ChuanTianML/learn_gnmt
19e97e04feaecd7682abaf6247a0f9e3f37f9892
[ "Apache-2.0" ]
30
2018-08-01T13:25:43.000Z
2022-02-28T01:28:34.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
34.580882
80
0.698065
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.ops import lookup_ops from ..utils import iterator_utils from ..utils import standard_hparams_utils def create_test_hparams(unit_type="lstm", ...
true
true
f76fd644807c487f953926e800227e75889258ba
4,309
py
Python
crabageprediction/venv/Lib/site-packages/numpy/f2py/tests/test_compile_function.py
13rianlucero/CrabAgePrediction
92bc7fbe1040f49e820473e33cc3902a5a7177c7
[ "MIT" ]
20,453
2015-01-02T09:00:47.000Z
2022-03-31T23:35:56.000Z
crabageprediction/venv/Lib/site-packages/numpy/f2py/tests/test_compile_function.py
13rianlucero/CrabAgePrediction
92bc7fbe1040f49e820473e33cc3902a5a7177c7
[ "MIT" ]
14,862
2015-01-01T01:28:34.000Z
2022-03-31T23:48:52.000Z
bot/lib/python3.7/site-packages/numpy/f2py/tests/test_compile_function.py
carlosrh18/DavinciBot
d73a6b7f68d7bab25d134d3f85c6b63a86c206c5
[ "MIT" ]
9,362
2015-01-01T15:49:43.000Z
2022-03-31T21:26:51.000Z
"""See https://github.com/numpy/numpy/pull/11937. """ import sys import os import uuid from importlib import import_module import pytest import numpy.f2py from numpy.testing import assert_equal from . import util def setup_module(): if not util.has_c_compiler(): pytest.skip("Needs C compiler") if n...
34.198413
76
0.65282
import sys import os import uuid from importlib import import_module import pytest import numpy.f2py from numpy.testing import assert_equal from . import util def setup_module(): if not util.has_c_compiler(): pytest.skip("Needs C compiler") if not util.has_f77_compiler(): pytest.skip('Needs ...
true
true
f76fd747926233fa85c891e699a5825608727c5f
33,240
py
Python
allennlp/semparse/type_declarations/type_declaration.py
MrMao/allennlp
ffab3201c14bf0f4ce04a4c6b1e77b10c20020fd
[ "Apache-2.0" ]
1
2019-06-11T11:44:05.000Z
2019-06-11T11:44:05.000Z
allennlp/semparse/type_declarations/type_declaration.py
MrMao/allennlp
ffab3201c14bf0f4ce04a4c6b1e77b10c20020fd
[ "Apache-2.0" ]
null
null
null
allennlp/semparse/type_declarations/type_declaration.py
MrMao/allennlp
ffab3201c14bf0f4ce04a4c6b1e77b10c20020fd
[ "Apache-2.0" ]
null
null
null
""" This module defines some classes that are generally useful for defining a type system for a new domain. We inherit the type logic in ``nltk.sem.logic`` and add some functionality on top of it here. There are two main improvements: 1) Firstly, we allow defining multiple basic types with their own names (see ``NamedB...
49.098966
114
0.676324
from typing import Dict, List, Optional, Set, Tuple, Union from collections import defaultdict from overrides import overrides from nltk.sem.logic import Expression, ApplicationExpression, ConstantExpression, LogicParser, Variable from nltk.sem.logic import Type, BasicType, ComplexType as NltkComplexType, ANY_TYPE fr...
true
true
f76fd7d5ec11bfb52081c5d16c6101d41b96e1ac
8,269
py
Python
ibis/expr/operations/temporal.py
jayceslesar/ibis
3c950a225883d8077b20497cdc3a9a0fb35a46c9
[ "Apache-2.0" ]
1
2022-03-22T10:39:37.000Z
2022-03-22T10:39:37.000Z
ibis/expr/operations/temporal.py
marlenezw/ibis
14b9baf3e1021e8698e7f0ae3c0ae5747543431c
[ "Apache-2.0" ]
null
null
null
ibis/expr/operations/temporal.py
marlenezw/ibis
14b9baf3e1021e8698e7f0ae3c0ae5747543431c
[ "Apache-2.0" ]
null
null
null
import operator import toolz from public import public from ibis import util from ibis.common.validators import immutable_property from ibis.expr import datatypes as dt from ibis.expr import rules as rlz from ibis.expr import types as ir from ibis.expr.operations.core import BinaryOp, Node, UnaryOp, ValueOp from ibis...
19.275058
79
0.630548
import operator import toolz from public import public from ibis import util from ibis.common.validators import immutable_property from ibis.expr import datatypes as dt from ibis.expr import rules as rlz from ibis.expr import types as ir from ibis.expr.operations.core import BinaryOp, Node, UnaryOp, ValueOp from ibis...
true
true
f76fd97e96eea434e157b83745455388c65f1f42
962
py
Python
runtests.py
prefeiturasp/SME-VagasNaCreche-API
20ae8862375124c7459fe6ff2d2d33ed34d136fb
[ "0BSD" ]
null
null
null
runtests.py
prefeiturasp/SME-VagasNaCreche-API
20ae8862375124c7459fe6ff2d2d33ed34d136fb
[ "0BSD" ]
9
2020-06-06T00:20:46.000Z
2022-02-10T10:57:35.000Z
runtests.py
giusepper11/DjangoRestDockerRecipe
4934e84264d140af7c1e5d74f740b4eb49f412c7
[ "0BSD" ]
1
2020-09-17T14:46:24.000Z
2020-09-17T14:46:24.000Z
import sys import os from os.path import abspath, dirname, join try: from django.conf import settings from django.test.utils import get_runner if not os.environ.get('DJANGO_SETTINGS_MODULE'): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") try: import django s...
21.863636
72
0.660083
import sys import os from os.path import abspath, dirname, join try: from django.conf import settings from django.test.utils import get_runner if not os.environ.get('DJANGO_SETTINGS_MODULE'): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") try: import django s...
true
true
f76fda1cd932b673b0771e70ba129859366c0454
18,468
py
Python
GPy/plotting/gpy_plot/latent_plots.py
floyebolu/GPy
d493b200642196c6d211ea1bcb052f3fbf396f24
[ "BSD-3-Clause" ]
9
2019-06-16T01:18:52.000Z
2021-11-03T15:43:55.000Z
GPy/plotting/gpy_plot/latent_plots.py
floyebolu/GPy
d493b200642196c6d211ea1bcb052f3fbf396f24
[ "BSD-3-Clause" ]
3
2020-09-09T06:12:51.000Z
2021-06-01T23:46:18.000Z
GPy/plotting/gpy_plot/latent_plots.py
floyebolu/GPy
d493b200642196c6d211ea1bcb052f3fbf396f24
[ "BSD-3-Clause" ]
6
2016-10-27T08:41:27.000Z
2022-01-29T21:33:10.000Z
#=============================================================================== # Copyright (c) 2015, Max Zwiessele # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source...
52.615385
202
0.669536
import numpy as np from . import plotting_library as pl from .plot_util import get_x_y_var,\ update_not_existing_kwargs, \ helper_for_plot_data, scatter_label_generator, subsample_X,\ find_best_layout_for_subplots def _wait_for_updates(view, updates): if view is not None: try: if up...
true
true
f76fdb19328efdeda65ba8a1d50ee93ffccdfcea
985
py
Python
lego/apps/quotes/serializers.py
HoboKristian/lego
2729dcef770ad1105f53e087c07ece3f9e9dbc67
[ "MIT" ]
null
null
null
lego/apps/quotes/serializers.py
HoboKristian/lego
2729dcef770ad1105f53e087c07ece3f9e9dbc67
[ "MIT" ]
2
2021-02-02T23:09:32.000Z
2021-06-10T23:43:39.000Z
lego/apps/quotes/serializers.py
HoboKristian/lego
2729dcef770ad1105f53e087c07ece3f9e9dbc67
[ "MIT" ]
null
null
null
from rest_framework.fields import CharField from lego.apps.comments.serializers import CommentSerializer from lego.apps.content.fields import ContentSerializerField from lego.apps.quotes.models import Quote from lego.apps.tags.serializers import TagSerializerMixin from lego.utils.serializers import BasisModelSerialize...
26.621622
64
0.669036
from rest_framework.fields import CharField from lego.apps.comments.serializers import CommentSerializer from lego.apps.content.fields import ContentSerializerField from lego.apps.quotes.models import Quote from lego.apps.tags.serializers import TagSerializerMixin from lego.utils.serializers import BasisModelSerialize...
true
true
f76fdb3a2d828b62f50e3867b3574d88538f216a
1,320
py
Python
setup.py
c0yote/mehrp
9f828c7964f93c82817cc02cf638405b522e8196
[ "MIT" ]
1
2019-11-01T17:50:38.000Z
2019-11-01T17:50:38.000Z
setup.py
c0yote/mehrp
9f828c7964f93c82817cc02cf638405b522e8196
[ "MIT" ]
2
2019-02-13T21:16:59.000Z
2019-02-20T14:56:17.000Z
setup.py
c0yote/mehrp
9f828c7964f93c82817cc02cf638405b522e8196
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from os import path from io import open here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='mehrp', version='0.0.1', description='Easy beeping (merhp) from the ...
30
63
0.616667
from setuptools import setup, find_packages from os import path from io import open here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='mehrp', version='0.0.1', description='Easy beeping (merhp) from the ...
true
true
f76fdc518c0dc79f04a88923d21445f13f3ca2fb
1,650
py
Python
OpenCV/video_flow.py
swpucwf/Deeplearning
be19885d52b7ce8782949d931a1b2994de36679f
[ "Apache-2.0" ]
1
2020-06-06T03:13:05.000Z
2020-06-06T03:13:05.000Z
OpenCV/video_flow.py
swpucwf/deeplearning
be19885d52b7ce8782949d931a1b2994de36679f
[ "Apache-2.0" ]
null
null
null
OpenCV/video_flow.py
swpucwf/deeplearning
be19885d52b7ce8782949d931a1b2994de36679f
[ "Apache-2.0" ]
null
null
null
import numpy as np import cv2 cap = cv2.VideoCapture('car.mp4') # params for ShiTomasi corner detection feature_params = dict(maxCorners=100, qualityLevel=0.3, minDistance=7, blockSize=7) # Parameters for lucas kanade optical flow lk_params = dict(win...
28.448276
87
0.627273
import numpy as np import cv2 cap = cv2.VideoCapture('car.mp4') feature_params = dict(maxCorners=100, qualityLevel=0.3, minDistance=7, blockSize=7) lk_params = dict(winSize=(15, 15), maxLevel=2, criteria=(cv2.TERM_CRI...
true
true
f76fdd0da87546a600220fae37aa28677891a9b8
833
py
Python
oto/urls.py
Elmartin913/one-time-offer
c2ed1231e19cde1ad17c173906b030c733b114b9
[ "MIT" ]
null
null
null
oto/urls.py
Elmartin913/one-time-offer
c2ed1231e19cde1ad17c173906b030c733b114b9
[ "MIT" ]
null
null
null
oto/urls.py
Elmartin913/one-time-offer
c2ed1231e19cde1ad17c173906b030c733b114b9
[ "MIT" ]
null
null
null
"""oto URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vie...
33.32
77
0.707083
from django.contrib import admin from django.urls import path from otoapp.views import HomeView urlpatterns = [ path('admin/', admin.site.urls), path('panel/', HomeView.as_view(), name='panel') ]
true
true