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
f752788cdb2ff9dce16f2500f171f3d1b010ef50
2,069
py
Python
backend/app/literature/routers/editor_router.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
null
null
null
backend/app/literature/routers/editor_router.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
39
2021-10-18T17:02:49.000Z
2022-03-28T20:56:24.000Z
backend/app/literature/routers/editor_router.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
1
2021-10-21T00:11:18.000Z
2021-10-21T00:11:18.000Z
from sqlalchemy.orm import Session from fastapi import APIRouter from fastapi import Depends from fastapi import status from fastapi import Response from fastapi import Security from fastapi_okta import OktaUser from literature import database from literature.user import set_global_user_id from literature.schemas ...
26.87013
59
0.701788
from sqlalchemy.orm import Session from fastapi import APIRouter from fastapi import Depends from fastapi import status from fastapi import Response from fastapi import Security from fastapi_okta import OktaUser from literature import database from literature.user import set_global_user_id from literature.schemas ...
true
true
f75278f3720faf2fcfcd8eb00242e5b77b14a8ab
1,165
py
Python
authlib/repo/provider/base_provider.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
25
2021-08-25T12:51:14.000Z
2022-03-29T22:56:21.000Z
authlib/repo/provider/base_provider.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
6
2021-09-09T23:09:51.000Z
2022-03-11T11:11:23.000Z
authlib/repo/provider/base_provider.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
7
2021-09-04T08:06:21.000Z
2022-03-07T23:40:02.000Z
from abc import ABC, abstractmethod from typing import List, Literal class StorageProvider(ABC): @abstractmethod def __init__(self, allow_db_create=False, if_table_exists: Literal['ignore', 'recreate'] = 'ignore'): pass ### MAIN INTERFACE ### # Function args are the split parts of a typical db...
29.125
105
0.63176
from abc import ABC, abstractmethod from typing import List, Literal class StorageProvider(ABC): @abstractmethod def __init__(self, allow_db_create=False, if_table_exists: Literal['ignore', 'recreate'] = 'ignore'): pass @abstractmethod def close_database(self) -> N...
true
true
f7527a12c2c41a8f79e549ddb94c80e49d3d019a
10,601
py
Python
Board.py
wuemily2/csc290-tut104-mines2019
1f88a459cebfb9a165a88e7aa23d0dc07a22c4fe
[ "MIT" ]
null
null
null
Board.py
wuemily2/csc290-tut104-mines2019
1f88a459cebfb9a165a88e7aa23d0dc07a22c4fe
[ "MIT" ]
null
null
null
Board.py
wuemily2/csc290-tut104-mines2019
1f88a459cebfb9a165a88e7aa23d0dc07a22c4fe
[ "MIT" ]
1
2019-12-19T19:28:08.000Z
2019-12-19T19:28:08.000Z
from __future__ import annotations from typing import List, Dict, Optional from Tile import Tile from EmptyTile import EmptyTile from BombTile import BombTile from NumberTile import NumberTile from random import randint import random # random.seed(0) class Board: """A class representing the state of the Mineswe...
34.871711
80
0.554853
from __future__ import annotations from typing import List, Dict, Optional from Tile import Tile from EmptyTile import EmptyTile from BombTile import BombTile from NumberTile import NumberTile from random import randint import random class Board: _row_size: int _col_size: int _num_bombs: int board: ...
true
true
f7527b50123b6843a044700e3bbd4e7326b2b9aa
1,114
py
Python
search_engine.py
lqzhou123/MasterDuelSimpleTranslateTool
f18e03259582e3c02e76fbe37d5f68314c11e674
[ "MIT" ]
null
null
null
search_engine.py
lqzhou123/MasterDuelSimpleTranslateTool
f18e03259582e3c02e76fbe37d5f68314c11e674
[ "MIT" ]
null
null
null
search_engine.py
lqzhou123/MasterDuelSimpleTranslateTool
f18e03259582e3c02e76fbe37d5f68314c11e674
[ "MIT" ]
null
null
null
import master_duel_auto_scan_version as mda from threading import Thread def start(): """method to start searching """ scan_card = Thread(target=mda.main) scan_card.start() def kill(): """method to exit searching """ mda.status_change(False, False, True,False) def paus...
19.54386
59
0.602334
import master_duel_auto_scan_version as mda from threading import Thread def start(): scan_card = Thread(target=mda.main) scan_card.start() def kill(): mda.status_change(False, False, True,False) def pause(): mda.status_change(False, True, False,False) def switch_mode(): md...
true
true
f7527c98cf172cc1b114fc4569434debf5591c62
5,918
py
Python
kubernetes/client/models/v2beta1_pods_metric_status.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v2beta1_pods_metric_status.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v2beta1_pods_metric_status.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
1
2019-01-10T11:13:52.000Z
2019-01-10T11:13:52.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
31.989189
299
0.62538
from pprint import pformat from six import iteritems import re class V2beta1PodsMetricStatus(object): swagger_types = { 'current_average_value': 'str', 'metric_name': 'str', 'selector': 'V1LabelSelector' } attribute_map = { 'current_average_value': 'currentAverageValu...
true
true
f7527c99f572b247b40e08c464910d0e16c10eaf
411
py
Python
backEnd/interestsProfile/migrations/0004_alter_algoidtouserid_mapping.py
arnavn101/Coterie
b4478f0e3cc799ce40f95a3711e0cdf18809a3e4
[ "MIT" ]
null
null
null
backEnd/interestsProfile/migrations/0004_alter_algoidtouserid_mapping.py
arnavn101/Coterie
b4478f0e3cc799ce40f95a3711e0cdf18809a3e4
[ "MIT" ]
null
null
null
backEnd/interestsProfile/migrations/0004_alter_algoidtouserid_mapping.py
arnavn101/Coterie
b4478f0e3cc799ce40f95a3711e0cdf18809a3e4
[ "MIT" ]
1
2021-11-07T12:57:53.000Z
2021-11-07T12:57:53.000Z
# Generated by Django 3.2.9 on 2021-11-06 07:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interestsProfile', '0003_alter_algoidtouserid_mapping'), ] operations = [ migrations.AlterField( model_name='algoidtouserid', ...
21.631579
66
0.618005
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interestsProfile', '0003_alter_algoidtouserid_mapping'), ] operations = [ migrations.AlterField( model_name='algoidtouserid', name='mapping', field=mode...
true
true
f7527d7958a0ef252c14eb4ca88c24f363659c6e
4,441
py
Python
labour/models/alternative_signup_forms.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
labour/models/alternative_signup_forms.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
labour/models/alternative_signup_forms.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
# encoding: utf-8 from django.db import models from django.utils.translation import ugettext_lazy as _ from core.utils import NONUNIQUE_SLUG_FIELD_PARAMS, is_within_period class AlternativeSignupForm(models.Model): """ Most workers are registered using the default form. However, some workers are "special", ...
35.528
123
0.709075
from django.db import models from django.utils.translation import ugettext_lazy as _ from core.utils import NONUNIQUE_SLUG_FIELD_PARAMS, is_within_period class AlternativeSignupForm(models.Model): event = models.ForeignKey('core.Event', verbose_name=u'Tapahtuma') slug = models.CharField(**NONUNIQUE_SLUG_F...
true
true
f7527d958ba6cf04966ca1eaa5d61b1dc2d77145
2,805
py
Python
catalyst/metrics/accuracy.py
Ditwoo/catalyst
3126390f9f679ebcfedbe01707b416678a2732ac
[ "Apache-2.0" ]
1
2020-11-14T13:35:22.000Z
2020-11-14T13:35:22.000Z
catalyst/metrics/accuracy.py
Ditwoo/catalyst
3126390f9f679ebcfedbe01707b416678a2732ac
[ "Apache-2.0" ]
null
null
null
catalyst/metrics/accuracy.py
Ditwoo/catalyst
3126390f9f679ebcfedbe01707b416678a2732ac
[ "Apache-2.0" ]
null
null
null
""" Various accuracy metrics: * :func:`accuracy` * :func:`multi_label_accuracy` """ from typing import Optional, Sequence, Union import numpy as np import torch from catalyst.metrics.functional import process_multilabel_components from catalyst.utils.torch import get_activation_fn def accuracy( outputs...
28.917526
77
0.64492
from typing import Optional, Sequence, Union import numpy as np import torch from catalyst.metrics.functional import process_multilabel_components from catalyst.utils.torch import get_activation_fn def accuracy( outputs: torch.Tensor, targets: torch.Tensor, topk: Sequence[int] = (1,), activation: O...
true
true
f7527f31353c0a8a56d68088f77fd4f1c5ebad02
1,280
py
Python
layers/spadebn.py
ackness/GazeFlow
ca6b7d548571f85af84bdec77292758ab5d36449
[ "MIT" ]
12
2020-12-29T12:00:20.000Z
2022-02-07T08:26:24.000Z
layers/spadebn.py
ackness/GazeFlow
ca6b7d548571f85af84bdec77292758ab5d36449
[ "MIT" ]
1
2022-02-12T11:26:20.000Z
2022-02-12T11:26:28.000Z
layers/spadebn.py
ackness/GazeFlow
ca6b7d548571f85af84bdec77292758ab5d36449
[ "MIT" ]
2
2021-08-20T14:40:01.000Z
2022-01-02T10:32:04.000Z
#!/usr/bin/env python3 import tensorflow as tf from layers.spectral_normalization import SpectralNormalization class SpadeBN(tf.keras.layers.Layer): """SPADE BatchNormalization Sources: https://towardsdatascience.com/implementing-spade-using-fastai-6ad86b94030a """ def __init__(self, widt...
32
85
0.660938
import tensorflow as tf from layers.spectral_normalization import SpectralNormalization class SpadeBN(tf.keras.layers.Layer): def __init__(self, width: int = 128, kernel_size=3, **kwargs): self.bn = tf.keras.layers.experimental.SyncBatchNormalization() self.conv0 = SpectralNormalization( ...
true
true
f75280750e5f12106c4d3f973f8f5b65844cf248
1,769
py
Python
Project-Directory/app1/views.py
RonBulaon/DockeredDjangoNginx
21abb795ee0680122fb89df7adccc6830a6493c1
[ "MIT" ]
null
null
null
Project-Directory/app1/views.py
RonBulaon/DockeredDjangoNginx
21abb795ee0680122fb89df7adccc6830a6493c1
[ "MIT" ]
null
null
null
Project-Directory/app1/views.py
RonBulaon/DockeredDjangoNginx
21abb795ee0680122fb89df7adccc6830a6493c1
[ "MIT" ]
null
null
null
# from typing_extensions import Required from django.shortcuts import redirect, render from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.contrib import messages from .decorators import allowed_users, unauthenticated_user from .models impor...
31.589286
76
0.702092
from django.shortcuts import redirect, render from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.contrib import messages from .decorators import allowed_users, unauthenticated_user from .models import SiteWide def logoutUser(request): ...
true
true
f75280fec929bfc2024be2003fcc9c5e7cb58a4a
1,162
py
Python
nzmath/plugins.py
turkeydonkey/nzmath3
a48ae9efcf0d9ad1485c2e9863c948a7f1b20311
[ "BSD-3-Clause" ]
1
2021-05-26T19:22:17.000Z
2021-05-26T19:22:17.000Z
nzmath/plugins.py
turkeydonkey/nzmath3
a48ae9efcf0d9ad1485c2e9863c948a7f1b20311
[ "BSD-3-Clause" ]
null
null
null
nzmath/plugins.py
turkeydonkey/nzmath3
a48ae9efcf0d9ad1485c2e9863c948a7f1b20311
[ "BSD-3-Clause" ]
null
null
null
""" plugins -- plug-in mechanism Some function, such as floating point arithmetic, could have several choices of modules. The 'plugins' module provides the mechanism to choose one among these choices. One can *plug-in* one module or another for the function. Usage: The choice among plug-in modules is made through nz...
29.05
68
0.757315
from nzmath.config import PLUGIN_MATH MATH_PLUGIN_CHOICE = ('mpmath', None) if PLUGIN_MATH == MATH_PLUGIN_CHOICE[0]: from nzmath.plugin.math._mpmath import * else: from nzmath.plugin.math.default import * _MATH = ['MATHMODULE', 'CMATHMODULE', 'FLOATTYPE', 'COMPLEXTYPE', 'CHECK_REAL_OR_COMPLEX', ...
true
true
f75281722edbf5873ef258ae1b6daf1918559dba
1,516
py
Python
Obsolete_code/coordinate-filter.py
JorisJoBo/treedentifier
c60fe49cdfea7a7eb5ed2864fbe5d6fd131612d4
[ "Apache-2.0" ]
15
2018-01-31T21:49:04.000Z
2022-01-31T02:29:23.000Z
Obsolete_code/coordinate-filter.py
JorisJoBo/treedentifier
c60fe49cdfea7a7eb5ed2864fbe5d6fd131612d4
[ "Apache-2.0" ]
null
null
null
Obsolete_code/coordinate-filter.py
JorisJoBo/treedentifier
c60fe49cdfea7a7eb5ed2864fbe5d6fd131612d4
[ "Apache-2.0" ]
4
2018-07-29T15:45:46.000Z
2022-02-16T18:56:02.000Z
""" Filters the RD-triangle coordinates from WKT to a min/max-x/y grid. Call from commandline with the name of the file that is to be converted as argument. This file should have a polygonID in the 2nd column (index 1) and the actual WKT in the 6th column (index 5). Returns a .csv file containing the polygon Id's and ...
29.72549
76
0.6781
import numpy as np import sys filename = sys.argv[1] trees = np.loadtxt(open(filename, 'rb'), dtype=str, delimiter=';') raw_polys = [] polys = [] for line in trees: raw_polys.append([line[1], line[5]]) for line in raw_polys: if line not in polys: polys.append(line) indice = polys[0][1].find('(') + 2...
true
true
f75281a60ecb0a4f75d015255b359a7d87c863bb
779
py
Python
3.py
Terebellum/4-case
0c5d53b3aed72d0cc81701a4f566830fa2d6c016
[ "MIT" ]
null
null
null
3.py
Terebellum/4-case
0c5d53b3aed72d0cc81701a4f566830fa2d6c016
[ "MIT" ]
null
null
null
3.py
Terebellum/4-case
0c5d53b3aed72d0cc81701a4f566830fa2d6c016
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 # -*- encoding: utf-8 -*- if __name__ == "__main__": # Ввод s = [] for i in range(0, 10): a = int(input()) s.append(a) # Нахождение позиции наибольшего и наименьшего a = s[0] b = s[0] for i in range(1, 10): if (s[i] > a): ...
21.638889
51
0.456996
if __name__ == "__main__": s = [] for i in range(0, 10): a = int(input()) s.append(a) a = s[0] b = s[0] for i in range(1, 10): if (s[i] > a): posmax = i a = s[i] elif (s[i] < b): posmin = i b =...
true
true
f7528304fc5b9e263f6935a6fc7fadd0fa4fa895
482
py
Python
env/lib/python3.8/site-packages/plotly/validators/scattergeo/marker/_reversescale.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/scattergeo/marker/_reversescale.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/scattergeo/marker/_reversescale.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattergeo.marker", **kwargs ): super(ReversescaleValidator, self).__init__( plotly_name=plotly_name, ...
32.133333
83
0.651452
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattergeo.marker", **kwargs ): super(ReversescaleValidator, self).__init__( plotly_name=plotly_name, ...
true
true
f75283cf8d1be245fa360757f944cfbba20704fd
2,244
py
Python
cricket_db/test/test_parser_match.py
duahimanshu100/cricsheet-db
f25e365cc6597aa3eac80b87d9d29ed408b843ae
[ "MIT" ]
2
2020-01-21T10:50:35.000Z
2020-12-28T11:09:20.000Z
cricket_db/test/test_parser_match.py
duahimanshu100/cricsheet-db
f25e365cc6597aa3eac80b87d9d29ed408b843ae
[ "MIT" ]
null
null
null
cricket_db/test/test_parser_match.py
duahimanshu100/cricsheet-db
f25e365cc6597aa3eac80b87d9d29ed408b843ae
[ "MIT" ]
2
2020-01-21T10:57:16.000Z
2020-05-31T19:13:11.000Z
import unittest from collections import OrderedDict from cricket_db.parsers.match import MatchParser MATCH_ID = 947147 class TestMatchParser(unittest.TestCase): def setUp(self): self.match_id = MATCH_ID self.match_parser = MatchParser(self.match_id) self.fixtures = [ OrderedDi...
37.4
115
0.512478
import unittest from collections import OrderedDict from cricket_db.parsers.match import MatchParser MATCH_ID = 947147 class TestMatchParser(unittest.TestCase): def setUp(self): self.match_id = MATCH_ID self.match_parser = MatchParser(self.match_id) self.fixtures = [ OrderedDi...
true
true
f7528450068b798e1dd972d51674f72650ceb20d
1,649
py
Python
sched.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
1
2020-03-12T16:44:10.000Z
2020-03-12T16:44:10.000Z
sched.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
null
null
null
sched.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.2.4 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] # Embedded file name: sched import heapq from collections import namedtuple __all__ = [ 'scheduler'] Event = namedtuple('Event', 'time, priority, action, arg...
29.981818
104
0.58399
import heapq from collections import namedtuple __all__ = [ 'scheduler'] Event = namedtuple('Event', 'time, priority, action, argument') class scheduler: def __init__(self, timefunc, delayfunc): self._queue = [] self.timefunc = timefunc self.delayfunc = delayfunc def enterabs(self, t...
true
true
f752845674c26214bf3d5d00aaba4581e39e6040
27,612
py
Python
source/deepsecurity/api/policy_log_inspection_rule_details_api.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-10-30T16:40:09.000Z
2021-10-30T16:40:09.000Z
source/deepsecurity/api/policy_log_inspection_rule_details_api.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-07-28T20:19:03.000Z
2021-07-28T20:19:03.000Z
source/deepsecurity/api/policy_log_inspection_rule_details_api.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-10-30T16:40:02.000Z
2021-10-30T16:40:02.000Z
# coding: utf-8 """ Trend Micro Deep Security API Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate De...
52.594286
311
0.649428
from __future__ import absolute_import import re import six from deepsecurity.api_client import ApiClient class PolicyLogInspectionRuleDetailsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_...
true
true
f752848025bf2491551cfa293bd7509ecb06c8ad
1,826
py
Python
Leetcode/Python Solutions/Strings/StringToInteger.py
Mostofa-Najmus-Sakib/Applied-Algorithm
bc656fd655617407856e0ce45b68585fa81c5035
[ "MIT" ]
1
2020-01-06T02:21:56.000Z
2020-01-06T02:21:56.000Z
Leetcode/Python Solutions/Strings/StringToInteger.py
Mostofa-Najmus-Sakib/Applied-Algorithm
bc656fd655617407856e0ce45b68585fa81c5035
[ "MIT" ]
null
null
null
Leetcode/Python Solutions/Strings/StringToInteger.py
Mostofa-Najmus-Sakib/Applied-Algorithm
bc656fd655617407856e0ce45b68585fa81c5035
[ "MIT" ]
3
2021-02-22T17:41:01.000Z
2022-01-13T05:03:19.000Z
""" LeetCode Problem: 8. String to Integer (atoi) Link: https://leetcode.com/problems/string-to-integer-atoi/ Language: Python Written by: Mostofa Adib Shakib Time complexity: O(n) Space Complexity: O(1) """ class Solution: def myAtoi(self, string: str) -> int: # This gets rid of any white spaces ...
26.463768
87
0.457284
class Solution: def myAtoi(self, string: str) -> int: string = string.strip() if len(string) == 0: return 0 if len(string) == 1: if string.isnumeric(): return int(string) else: return 0 ...
true
true
f752851c680dce4a3cfff8d2bfbe8aeef3397ce6
3,224
py
Python
docs/_downloads/295945daa9a2749eebb39cf0af107ee2/polynomial_custom_function.py
woojinsong/PyTorch-tutorials-kr
36fefd556f45c2b1f5db912793172c0369430fd4
[ "BSD-3-Clause" ]
221
2018-04-06T01:42:58.000Z
2021-11-28T10:12:45.000Z
docs/_downloads/295945daa9a2749eebb39cf0af107ee2/polynomial_custom_function.py
woojinsong/PyTorch-tutorials-kr
36fefd556f45c2b1f5db912793172c0369430fd4
[ "BSD-3-Clause" ]
280
2018-05-25T08:53:21.000Z
2021-12-02T05:37:25.000Z
docs/_downloads/295945daa9a2749eebb39cf0af107ee2/polynomial_custom_function.py
woojinsong/PyTorch-tutorials-kr
36fefd556f45c2b1f5db912793172c0369430fd4
[ "BSD-3-Clause" ]
181
2018-05-25T02:00:28.000Z
2021-11-19T11:56:39.000Z
# -*- coding: utf-8 -*- """ PyTorch: 새 autograd Function 정의하기 ---------------------------------------- :math:`y=\sin(x)` 을 예측할 수 있도록, :math:`-\pi` 부터 :math:`pi` 까지 유클리드 거리(Euclidean distance)를 최소화하도록 3차 다항식을 학습합니다. 다항식을 :math:`y=a+bx+cx^2+dx^3` 라고 쓰는 대신 :math:`y=a+b P_3(c+dx)` 로 다항식을 적겠습니다. 여기서 :math:`P_3(x)=\frac{1}{...
30.704762
77
0.618176
import torch import math class LegendrePolynomial3(torch.autograd.Function): @staticmethod def forward(ctx, input): ctx.save_for_backward(input) return 0.5 * (5 * input ** 3 - 3 * input) @staticmethod def backward(ctx, grad_output): input, = ctx.saved_tensors return g...
true
true
f7528584b9f0543301b2d64cc5b2fdf10022790e
9,752
py
Python
pyBannerGrab/bannergrab.py
sasha-kantoriz/py_banner_grabber
c92e35538b2c2787c08baefd2e49c3af55bde45d
[ "Apache-2.0" ]
10
2019-06-04T20:15:57.000Z
2021-09-05T20:14:05.000Z
pyBannerGrab/bannergrab.py
Warlockk/py_banner_grabber
c92e35538b2c2787c08baefd2e49c3af55bde45d
[ "Apache-2.0" ]
3
2019-02-26T06:45:43.000Z
2019-04-09T19:43:30.000Z
pyBannerGrab/bannergrab.py
Warlockk/py_banner_grabber
c92e35538b2c2787c08baefd2e49c3af55bde45d
[ "Apache-2.0" ]
12
2019-02-26T06:32:59.000Z
2021-12-13T11:54:00.000Z
#!/usr/bin/python # ################################################## ######## Please Don't Remove Author Name ######### ############### Thanks ########################### ################################################## # # __author__=''' Suraj Singh surajsinghbisht054@gmail.com http://bitforestinfo.bl...
34.217544
214
0.542453
############### Thanks ########################### ################################################## # # __author__=''' Suraj Singh surajsinghbisht054@gmail.com http://bitforestinfo.blogspot.com/ ''' # =================Other Configuration================ # Usages : usage = "usage: %prog [options] " # Ve...
true
true
f752874bc12e574e3534665d18168ad8f6e9c86f
1,678
py
Python
tests/util/test_util.py
takahi-i/pfm
224ca961ca43f50bd877789e2d8659ae838d517f
[ "MIT" ]
9
2018-01-06T05:44:43.000Z
2020-06-24T00:15:16.000Z
tests/util/test_util.py
takahi-i/pfm
224ca961ca43f50bd877789e2d8659ae838d517f
[ "MIT" ]
27
2018-01-06T09:29:48.000Z
2020-04-10T16:11:59.000Z
tests/util/test_util.py
takahi-i/pfm
224ca961ca43f50bd877789e2d8659ae838d517f
[ "MIT" ]
1
2018-01-09T01:33:42.000Z
2018-01-09T01:33:42.000Z
import unittest from pfm.util.util import create_ordered_2d_array_from_dict from pfm.util.util import convert_dictionary_to_2d_array from pfm.util.util import sort_body_order from pfm.util.util import add_headers import sys py_version = sys.version_info[0] HEADERS = ['name', 'local_port', 'login_user'] JSON_DATA = {...
35.702128
71
0.631704
import unittest from pfm.util.util import create_ordered_2d_array_from_dict from pfm.util.util import convert_dictionary_to_2d_array from pfm.util.util import sort_body_order from pfm.util.util import add_headers import sys py_version = sys.version_info[0] HEADERS = ['name', 'local_port', 'login_user'] JSON_DATA = {...
true
true
f75287ebecb424ef9c0c9d4ad10782411f41e382
3,708
py
Python
scripts/indicator_experiment/calculate-fscores-from-aggregations.py
sarnthil/emotion-classification-roles
1fdd3a8cbdac5ab2ad9598a101b763882df78280
[ "MIT" ]
1
2022-02-17T14:16:20.000Z
2022-02-17T14:16:20.000Z
scripts/indicator_experiment/calculate-fscores-from-aggregations.py
sarnthil/emotion-classification-roles
1fdd3a8cbdac5ab2ad9598a101b763882df78280
[ "MIT" ]
null
null
null
scripts/indicator_experiment/calculate-fscores-from-aggregations.py
sarnthil/emotion-classification-roles
1fdd3a8cbdac5ab2ad9598a101b763882df78280
[ "MIT" ]
null
null
null
import json from pathlib import Path from collections import defaultdict, Counter from sklearn.metrics import precision_recall_fscore_support PRECISION_FALLBACK = RECALL_FALLBACK = 1 # dataset -> setting -> emotion -> measure -> score results = {} for dataset_path in Path("workdata/indicator-experiment/predictions"...
35.314286
80
0.487864
import json from pathlib import Path from collections import defaultdict, Counter from sklearn.metrics import precision_recall_fscore_support PRECISION_FALLBACK = RECALL_FALLBACK = 1 results = {} for dataset_path in Path("workdata/indicator-experiment/predictions").glob("*"): dataset = dataset_path.name for...
true
true
f75288a75126d81fe346261324ecfaccabac5217
5,386
py
Python
kubernetes/client/models/v1_network_policy_ingress_rule.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1_network_policy_ingress_rule.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1_network_policy_ingress_rule.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
1
2019-01-10T11:13:52.000Z
2019-01-10T11:13:52.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
34.748387
395
0.621797
from pprint import pformat from six import iteritems import re class V1NetworkPolicyIngressRule(object): swagger_types = { '_from': 'list[V1NetworkPolicyPeer]', 'ports': 'list[V1NetworkPolicyPort]' } attribute_map = { '_from': 'from', 'ports': 'ports' } def _...
true
true
f752899b389bff33c2cec31f1b01b364af094524
19,450
py
Python
bluerov2_hmi/src/bluerov2_hmi/__init__.py
RikPi/bluerov2
811dcca43241221b918425cf8351219d183f4c03
[ "Apache-2.0" ]
null
null
null
bluerov2_hmi/src/bluerov2_hmi/__init__.py
RikPi/bluerov2
811dcca43241221b918425cf8351219d183f4c03
[ "Apache-2.0" ]
null
null
null
bluerov2_hmi/src/bluerov2_hmi/__init__.py
RikPi/bluerov2
811dcca43241221b918425cf8351219d183f4c03
[ "Apache-2.0" ]
null
null
null
import rospy import cv2 from cv_bridge import CvBridge, CvBridgeError from sensor_msgs.msg import Range, BatteryState, CameraInfo, Temperature, NavSatFix, Image from geometry_msgs.msg import PoseWithCovarianceStamped, PointStamped from std_msgs.msg import Float64, Header from mavros_msgs.msg import State import numpy a...
49.744246
234
0.603753
import rospy import cv2 from cv_bridge import CvBridge, CvBridgeError from sensor_msgs.msg import Range, BatteryState, CameraInfo, Temperature, NavSatFix, Image from geometry_msgs.msg import PoseWithCovarianceStamped, PointStamped from std_msgs.msg import Float64, Header from mavros_msgs.msg import State import numpy a...
true
true
f75289fbff57c286fe08b2abecaa91a6f2f36e24
44,041
py
Python
tests/strategies/test_deepspeed_strategy.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
null
null
null
tests/strategies/test_deepspeed_strategy.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
null
null
null
tests/strategies/test_deepspeed_strategy.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
null
null
null
import contextlib import json import logging import os from typing import Any, Dict, Optional from unittest import mock import pytest import torch import torch.nn.functional as F from torch import nn, Tensor from torch.optim import Optimizer from torch.utils.data import DataLoader from torchmetrics import Accuracy fr...
37.071549
119
0.695783
import contextlib import json import logging import os from typing import Any, Dict, Optional from unittest import mock import pytest import torch import torch.nn.functional as F from torch import nn, Tensor from torch.optim import Optimizer from torch.utils.data import DataLoader from torchmetrics import Accuracy fr...
true
true
f7528c69a52be4994b75ecc1706c279051b253e7
7,914
py
Python
backend/sports_betting_33417/settings.py
crowdbotics-apps/sports-betting-33417
b0628a1bb1d153ac35cd11e57e6f1186337f36a4
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/sports_betting_33417/settings.py
crowdbotics-apps/sports-betting-33417
b0628a1bb1d153ac35cd11e57e6f1186337f36a4
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/sports_betting_33417/settings.py
crowdbotics-apps/sports-betting-33417
b0628a1bb1d153ac35cd11e57e6f1186337f36a4
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for sports_betting_33417 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ ...
30.438462
112
0.737301
import os import io import environ import logging import google.auth from google.cloud import secretmanager from google.auth.exceptions import DefaultCredentialsError from google.api_core.exceptions import PermissionDenied from modules.manifest import get_modules BASE_DIR = os.path.dirname(os.path.dirname(os.path.abs...
true
true
f7528cb18dbeffbf4365e0b76b10b59487df59fc
6,190
py
Python
custom_colormaps.py
groussea/custom_colormap
e92f88d1b5be18509fa6e6204387b10c74b4c8ad
[ "BSD-3-Clause" ]
null
null
null
custom_colormaps.py
groussea/custom_colormap
e92f88d1b5be18509fa6e6204387b10c74b4c8ad
[ "BSD-3-Clause" ]
null
null
null
custom_colormaps.py
groussea/custom_colormap
e92f88d1b5be18509fa6e6204387b10c74b4c8ad
[ "BSD-3-Clause" ]
null
null
null
""" NAME Custom Colormaps for Matplotlib PURPOSE This program shows how to implement make_cmap which is a function that generates a colorbar PROGRAMMER(S) Chris Slocum Gauthier Rousseau REVISION HISTORY 20130411 -- Initial version created 20140313 -- Small changes made and code posted online...
38.6875
135
0.638449
import numpy as np def create_colormap(colors, position=None, bit=False, reverse=False, res=256, name='custom_colormap'): from matplotlib.colors import LinearSegmentedColormap if not isinstance(colors, np.ndarray): colors = np.array(colors, dtype='f') if reverse: colors = colors[::-1] ...
true
true
f7528dc0f7d14f1c6ec2e9b0c47b54a4f3069a95
184,606
py
Python
python/ccxt/async_support/bybit.py
Crypto-Currency-Projects/ccxt
8287748d2c8d8608095164259ad3d3c892056d7d
[ "MIT" ]
3
2021-11-03T15:15:36.000Z
2021-12-06T08:16:44.000Z
python/ccxt/async_support/bybit.py
Crypto-Currency-Projects/ccxt
8287748d2c8d8608095164259ad3d3c892056d7d
[ "MIT" ]
null
null
null
python/ccxt/async_support/bybit.py
Crypto-Currency-Projects/ccxt
8287748d2c8d8608095164259ad3d3c892056d7d
[ "MIT" ]
1
2021-11-03T15:15:23.000Z
2021-11-03T15:15:23.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import hashlib import json from ccxt.base.errors import ExchangeError from ccxt.base....
44.429844
471
0.448236
from ccxt.async_support.base.exchange import Exchange import hashlib import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.ba...
true
true
f7528efb357f8800aad34201e746c2dbc3462389
129
py
Python
data_processing/libmesh/setup.py
vedanthpadigelwar/if-net
81c3068a52c619cf6de800807226d3801cb4d057
[ "Unlicense" ]
209
2020-04-17T02:19:56.000Z
2022-03-01T06:51:22.000Z
data_processing/libmesh/setup.py
vedanthpadigelwar/if-net
81c3068a52c619cf6de800807226d3801cb4d057
[ "Unlicense" ]
39
2020-04-22T09:28:40.000Z
2022-03-28T11:23:48.000Z
data_processing/libmesh/setup.py
vedanthpadigelwar/if-net
81c3068a52c619cf6de800807226d3801cb4d057
[ "Unlicense" ]
45
2020-04-17T06:28:51.000Z
2022-03-22T12:38:56.000Z
from setuptools import setup from Cython.Build import cythonize setup(name = 'libmesh', ext_modules = cythonize("*.pyx"))
21.5
39
0.728682
from setuptools import setup from Cython.Build import cythonize setup(name = 'libmesh', ext_modules = cythonize("*.pyx"))
true
true
f7528f30dc541c11e2ab2226f7baea3efcdefece
993
py
Python
numerical_analysis/regression.py
irevenko/math-playground
41887ba1bf723a092cc577e14cd8cfaee32ed3ba
[ "MIT" ]
3
2021-02-19T16:46:23.000Z
2021-03-25T13:19:01.000Z
numerical_analysis/regression.py
irevenko/labs-playground
41887ba1bf723a092cc577e14cd8cfaee32ed3ba
[ "MIT" ]
null
null
null
numerical_analysis/regression.py
irevenko/labs-playground
41887ba1bf723a092cc577e14cd8cfaee32ed3ba
[ "MIT" ]
null
null
null
from tabulate import tabulate y = [46, 43, 41, 30, 35, 19, 37, 14, 2, 41, 45, 22, 5, 17] x = [10, 13, 15, 25, 20, 35, 18, 40, 51, 15, 11, 32, 48, 37] sum_x = sum(x) sum_y = sum(y) avg_x = sum(x) / len(x) avg_y = sum(y) / len(y) xy = [a * b for a,b in zip(x,y)] sum_xy = sum(xy) avg_xy = sum(xy) / len(xy) x_squared = ...
29.205882
79
0.565962
from tabulate import tabulate y = [46, 43, 41, 30, 35, 19, 37, 14, 2, 41, 45, 22, 5, 17] x = [10, 13, 15, 25, 20, 35, 18, 40, 51, 15, 11, 32, 48, 37] sum_x = sum(x) sum_y = sum(y) avg_x = sum(x) / len(x) avg_y = sum(y) / len(y) xy = [a * b for a,b in zip(x,y)] sum_xy = sum(xy) avg_xy = sum(xy) / len(xy) x_squared = ...
true
true
f7529039e67a6036b7982ee6935ab1ecfa596d92
9,390
py
Python
exchangelib/transport.py
srinivas32/exchangelib
d10d26ae8ce891d346071a4a8c782c44cbbe4be0
[ "BSD-2-Clause" ]
null
null
null
exchangelib/transport.py
srinivas32/exchangelib
d10d26ae8ce891d346071a4a8c782c44cbbe4be0
[ "BSD-2-Clause" ]
null
null
null
exchangelib/transport.py
srinivas32/exchangelib
d10d26ae8ce891d346071a4a8c782c44cbbe4be0
[ "BSD-2-Clause" ]
null
null
null
import logging import time import requests.auth import requests_ntlm import requests_oauthlib from .errors import UnauthorizedError, TransportError from .util import create_element, add_xml_child, xml_to_str, ns_translation, _may_retry_on_error, _back_off_if_needed, \ DummyResponse, CONNECTION_ERRORS log = loggi...
38.170732
120
0.655272
import logging import time import requests.auth import requests_ntlm import requests_oauthlib from .errors import UnauthorizedError, TransportError from .util import create_element, add_xml_child, xml_to_str, ns_translation, _may_retry_on_error, _back_off_if_needed, \ DummyResponse, CONNECTION_ERRORS log = loggi...
true
true
f752904903b08852e778c27a35417f4e93605953
942
py
Python
examples/export-firewall-config/export-firewall-config.py
ilanddev/python-sdk
7f2036c398bc97ebee9664410b0f83e52b72d884
[ "BSD-3-Clause" ]
5
2016-02-06T01:08:56.000Z
2019-02-08T15:07:16.000Z
examples/export-firewall-config/export-firewall-config.py
ilanddev/python-sdk
7f2036c398bc97ebee9664410b0f83e52b72d884
[ "BSD-3-Clause" ]
8
2016-02-23T22:35:00.000Z
2020-03-25T09:47:23.000Z
examples/export-firewall-config/export-firewall-config.py
ilanddev/python-sdk
7f2036c398bc97ebee9664410b0f83e52b72d884
[ "BSD-3-Clause" ]
4
2017-05-17T16:10:10.000Z
2022-03-31T20:16:25.000Z
import iland import time import json CLIENT_ID = '' CLIENT_SECRET = '' USERNAME = '' PASSWORD = '' COMPANY_ID = '' api = iland.Api(client_id=CLIENT_ID, client_secret=CLIENT_SECRET, username=USERNAME, password=PASSWORD) def main(): export_edge_firewalls() def export_edge_firewalls(): # Get all the edges for...
26.914286
103
0.674098
import iland import time import json CLIENT_ID = '' CLIENT_SECRET = '' USERNAME = '' PASSWORD = '' COMPANY_ID = '' api = iland.Api(client_id=CLIENT_ID, client_secret=CLIENT_SECRET, username=USERNAME, password=PASSWORD) def main(): export_edge_firewalls() def export_edge_firewalls(): edges = api.get('/u...
true
true
f752908eb82457eebf976bee2e8e0573517091ac
915
py
Python
Google IT Automation with Python/Google - Using Python to Interact with the Operating System/lab4.py
Akshayp1612/Courses-
0c6bb5e93d0443b0c4de7df220df250b8a2e2b26
[ "Apache-2.0" ]
622
2018-07-17T09:05:41.000Z
2022-03-29T02:57:02.000Z
Google IT Automation with Python/Google - Using Python to Interact with the Operating System/lab4.py
manish-saini/Courses-
11bf16a3d17ca6c284225ef34cd2d24b821c267a
[ "Apache-2.0" ]
21
2019-11-10T02:06:09.000Z
2022-01-22T23:54:11.000Z
Google IT Automation with Python/Google - Using Python to Interact with the Operating System/lab4.py
manish-saini/Courses-
11bf16a3d17ca6c284225ef34cd2d24b821c267a
[ "Apache-2.0" ]
906
2018-07-17T09:05:43.000Z
2022-03-31T12:55:49.000Z
#!/usr/bin/env python3 import sys import os import re def error_search(log_file): error = input("What is the error? ") returned_errors = [] with open(log_file, mode='r',encoding='UTF-8') as file: for log in file.readlines(): error_patterns = ["error"] for i in range(len(error.split(...
30.5
89
0.654645
import sys import os import re def error_search(log_file): error = input("What is the error? ") returned_errors = [] with open(log_file, mode='r',encoding='UTF-8') as file: for log in file.readlines(): error_patterns = ["error"] for i in range(len(error.split(' '))): error_p...
true
true
f75290a2ff7c54a00498e86d3f8742d6703d4a1c
13,297
py
Python
snake.py
ajbrining/snake
a74df51e974423f9b882dab327f5c8f42132b2d9
[ "MIT" ]
1
2021-04-26T07:45:10.000Z
2021-04-26T07:45:10.000Z
snake.py
ajbrining/snake
a74df51e974423f9b882dab327f5c8f42132b2d9
[ "MIT" ]
null
null
null
snake.py
ajbrining/snake
a74df51e974423f9b882dab327f5c8f42132b2d9
[ "MIT" ]
null
null
null
""" Play the classic Snake game. Classes: Game Functions: reset() move(direction) -> boolean run() """ import pygame from random import randint class Game: def __init__(self, graphics=True, starting_size=3): """ This class is everything you need to run the game. If y...
36.430137
81
0.514477
import pygame from random import randint class Game: def __init__(self, graphics=True, starting_size=3): self.COLUMNS = 16 self.ROWS = 16 self.MAX_SIZE = (self.COLUMNS * self.ROWS) - 1 self.GRAPHICS = graphics self.STARTING_SIZE = starting_size self.running = True...
true
true
f75290b390440c6fd86d04487cfd2306e5c324af
3,852
py
Python
solarnet/models/segmenter.py
fedesigno/solar-panel-segmentation
75856be3361bb4904387e6abc986627d1cc98ebb
[ "MIT" ]
null
null
null
solarnet/models/segmenter.py
fedesigno/solar-panel-segmentation
75856be3361bb4904387e6abc986627d1cc98ebb
[ "MIT" ]
null
null
null
solarnet/models/segmenter.py
fedesigno/solar-panel-segmentation
75856be3361bb4904387e6abc986627d1cc98ebb
[ "MIT" ]
null
null
null
import torch from torch import nn from typing import List from .base import ResnetBase class Segmenter(ResnetBase): """A ResNet34 U-Net model, as described in https://github.com/fastai/fastai/blob/master/courses/dl2/carvana-unet-lrg.ipynb Attributes: imagenet_base: boolean, default: False ...
36.685714
103
0.619159
import torch from torch import nn from typing import List from .base import ResnetBase class Segmenter(ResnetBase): def __init__(self, imagenet_base: bool = False) -> None: super().__init__(imagenet_base=imagenet_base) self.target_modules = [str(x) for x in [2, 4, 5, 6]] self.hooks = s...
true
true
f75290cf5654f2d3a709117d7df00b5ff902a0e9
489
py
Python
CursoEmVideo/Exercicio015.py
LucasAlmeida0/Estudos
ae5b498c0bf3dee94f761a5fe49c77b0e270d483
[ "MIT" ]
null
null
null
CursoEmVideo/Exercicio015.py
LucasAlmeida0/Estudos
ae5b498c0bf3dee94f761a5fe49c77b0e270d483
[ "MIT" ]
null
null
null
CursoEmVideo/Exercicio015.py
LucasAlmeida0/Estudos
ae5b498c0bf3dee94f761a5fe49c77b0e270d483
[ "MIT" ]
null
null
null
''' 15 Escreva um programa que pergunte a quantidade de Km percorridos por um carro alugado e a quantidade de dias pelos quais ele foi alugado. Calcule o preço a pagar, sabendo que o carro custa R$60 por dia e R$0,15 por Km rodado.''' quantidade_de_km = float(input("Digite a quantidade de km percorridos: ")) quantid...
54.333333
143
0.756646
quantidade_de_km = float(input("Digite a quantidade de km percorridos: ")) quantidade_de_dias = int(input("Digite a quantidade de dias pelos quais ele foi alugado: ")) print(f"Você deverá pagar R$ {quantidade_de_km*0.15 + quantidade_de_dias*60}")
true
true
f75291b7b8368f099802b4598bd85f7e517f03e3
936
py
Python
app/user/views.py
maxblu/recipe-app-api
ee6ed323f73050d5ffd7499591754618a6d44f5e
[ "MIT" ]
null
null
null
app/user/views.py
maxblu/recipe-app-api
ee6ed323f73050d5ffd7499591754618a6d44f5e
[ "MIT" ]
null
null
null
app/user/views.py
maxblu/recipe-app-api
ee6ed323f73050d5ffd7499591754618a6d44f5e
[ "MIT" ]
null
null
null
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): """Create a new user in the ...
30.193548
66
0.784188
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): serializer_class = UserSeria...
true
true
f75292f32dbca832e1b1d1a6afe34906aff880d9
152,735
py
Python
pandas/core/series.py
rajat315315/pandas
2eec4f7cfa1c45671b9875062343521a53ae8b28
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/series.py
rajat315315/pandas
2eec4f7cfa1c45671b9875062343521a53ae8b28
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/series.py
rajat315315/pandas
2eec4f7cfa1c45671b9875062343521a53ae8b28
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
""" Data structure for 1-dimensional cross-sectional and time series data """ from __future__ import annotations from io import StringIO from shutil import get_terminal_size from textwrap import dedent from typing import ( IO, TYPE_CHECKING, Any, Callable, Hashable, Iterable, List, Opti...
30.571457
88
0.53291
from __future__ import annotations from io import StringIO from shutil import get_terminal_size from textwrap import dedent from typing import ( IO, TYPE_CHECKING, Any, Callable, Hashable, Iterable, List, Optional, Tuple, Type, Union, ) import warnings import numpy as np f...
true
true
f752932a1061621d780dfec1eca57c3c4180dc4d
20,551
py
Python
log_complete_bcl2/model_797.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete_bcl2/model_797.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete_bcl2/model_797.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
95.143519
798
0.804146
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', '...
true
true
f752942048a3cdf032e3e9182ab0f564c41d5056
449
py
Python
data/scripts/templates/object/tangible/lair/brackaset/shared_lair_brackaset.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/lair/brackaset/shared_lair_brackaset.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/lair/brackaset/shared_lair_brackaset.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/lair/brackaset/shared_lair_brackaset.iff" result.attribute_template...
26.411765
77
0.726058
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/lair/brackaset/shared_lair_brackaset.iff" result.attribute_template_id = -1 result.stfName("lair_n","brackaset") return result
true
true
f75294bacf620749518b4e697e452b991572018f
24,878
py
Python
nncf/quantization/metrics.py
krodyush/nncf
476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a
[ "Apache-2.0" ]
1
2022-01-26T09:36:03.000Z
2022-01-26T09:36:03.000Z
nncf/quantization/metrics.py
krodyush/nncf
476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a
[ "Apache-2.0" ]
null
null
null
nncf/quantization/metrics.py
krodyush/nncf
476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a
[ "Apache-2.0" ]
1
2021-04-05T09:33:51.000Z
2021-04-05T09:33:51.000Z
import numpy as np import networkx as nx from copy import deepcopy from texttable import Texttable from collections import deque from nncf.quantization.layers import SymmetricQuantizer from nncf.nncf_network import NNCFNetwork, NNCFGraph from nncf.dynamic_graph.transform_graph import is_nncf_module from nncf.quantizat...
48.589844
116
0.660061
import numpy as np import networkx as nx from copy import deepcopy from texttable import Texttable from collections import deque from nncf.quantization.layers import SymmetricQuantizer from nncf.nncf_network import NNCFNetwork, NNCFGraph from nncf.dynamic_graph.transform_graph import is_nncf_module from nncf.quantizat...
true
true
f75294bbf4fdf96011432d987c87515c558f845e
321
py
Python
Exercices/Secao05/exercicio22.py
Guilt-tech/PythonExercices
e59bffae997a1974d3e3cdcfff7700afbed65e6e
[ "MIT" ]
null
null
null
Exercices/Secao05/exercicio22.py
Guilt-tech/PythonExercices
e59bffae997a1974d3e3cdcfff7700afbed65e6e
[ "MIT" ]
null
null
null
Exercices/Secao05/exercicio22.py
Guilt-tech/PythonExercices
e59bffae997a1974d3e3cdcfff7700afbed65e6e
[ "MIT" ]
null
null
null
print('Digite a idadde e o tempo de serviço, para podeer saber se pode ou não se aposentar') idade = int(input("Idade: ")) tempo_servico = int(input('Tempo de serviço: ')) if idade >= 65 or tempo_servico >= 30 or idade >= 60 and tempo_servico >= 25: print("Pode se aposentar") else: print('Não pode se aposentar'...
45.857143
92
0.697819
print('Digite a idadde e o tempo de serviço, para podeer saber se pode ou não se aposentar') idade = int(input("Idade: ")) tempo_servico = int(input('Tempo de serviço: ')) if idade >= 65 or tempo_servico >= 30 or idade >= 60 and tempo_servico >= 25: print("Pode se aposentar") else: print('Não pode se aposentar'...
true
true
f7529572b2e67dcbd6f3a19428e47be6edd97398
189
py
Python
bertmap/onto/__init__.py
KRR-Oxford/BERTMap
26eb78288885b8749c5bd970d44fa0ec18c6f417
[ "Apache-2.0" ]
10
2021-12-07T09:09:18.000Z
2022-03-28T22:54:25.000Z
bertmap/onto/__init__.py
KRR-Oxford/BERTMap
26eb78288885b8749c5bd970d44fa0ec18c6f417
[ "Apache-2.0" ]
null
null
null
bertmap/onto/__init__.py
KRR-Oxford/BERTMap
26eb78288885b8749c5bd970d44fa0ec18c6f417
[ "Apache-2.0" ]
1
2022-03-24T09:39:36.000Z
2022-03-24T09:39:36.000Z
from bertmap.onto.onto_text import OntoText from bertmap.onto.onto_index import OntoInvertedIndex from bertmap.onto.onto_box import OntoBox from bertmap.onto.onto_eval import OntoEvaluator
37.8
53
0.873016
from bertmap.onto.onto_text import OntoText from bertmap.onto.onto_index import OntoInvertedIndex from bertmap.onto.onto_box import OntoBox from bertmap.onto.onto_eval import OntoEvaluator
true
true
f75297a16f32f0026cc198503ba79052478421ba
3,727
py
Python
generation/DCGAN/train.py
nyw-pathfinder/Deep-Learning-Bootcamp-with-PyTorch
5bf2efd3f921dc95461026df8f105ff7a5822fb5
[ "MIT" ]
15
2019-03-16T10:00:15.000Z
2021-10-04T10:30:26.000Z
generation/DCGAN/train.py
nyw-pathfinder/Deep-Learning-Bootcamp-with-PyTorch
5bf2efd3f921dc95461026df8f105ff7a5822fb5
[ "MIT" ]
null
null
null
generation/DCGAN/train.py
nyw-pathfinder/Deep-Learning-Bootcamp-with-PyTorch
5bf2efd3f921dc95461026df8f105ff7a5822fb5
[ "MIT" ]
6
2019-04-13T02:13:43.000Z
2019-10-05T02:22:55.000Z
if __name__ == '__main__': import os from torchvision.transforms import Compose, Normalize, Resize, ToTensor from torch.utils.data import DataLoader from models import Discriminator, Generator, weights_init import torch import torch.nn as nn import matplotlib.pyplot as plt from time impo...
38.822917
109
0.611484
if __name__ == '__main__': import os from torchvision.transforms import Compose, Normalize, Resize, ToTensor from torch.utils.data import DataLoader from models import Discriminator, Generator, weights_init import torch import torch.nn as nn import matplotlib.pyplot as plt from time impo...
true
true
f7529962e2b12f1a4afece4374d9104c414cf76e
612
py
Python
fixme/routing/get_route_from_steps_diagonal.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
null
null
null
fixme/routing/get_route_from_steps_diagonal.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
null
null
null
fixme/routing/get_route_from_steps_diagonal.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
null
null
null
""" FIXME, shall we allow diagonal route for electrical connections? """ if __name__ == "__main__": import gdsfactory as gf c = gf.Component("pads_route_from_steps") pt = c << gf.components.pad_array(orientation=270, columns=3) pb = c << gf.components.pad_array(orientation=90, columns=3) pt.move(...
25.5
65
0.614379
if __name__ == "__main__": import gdsfactory as gf c = gf.Component("pads_route_from_steps") pt = c << gf.components.pad_array(orientation=270, columns=3) pb = c << gf.components.pad_array(orientation=90, columns=3) pt.move((100, 200)) route = gf.routing.get_route_from_steps( pt.ports[...
true
true
f75299883193578c9a7ad2bd035e4fd02666dd7a
2,658
py
Python
recipes/libdwarf/all/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
1
2021-11-11T03:07:13.000Z
2021-11-11T03:07:13.000Z
recipes/libdwarf/all/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
1
2021-11-22T13:54:48.000Z
2021-11-22T14:09:45.000Z
recipes/libdwarf/all/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
null
null
null
from conans import ConanFile, CMake, tools import functools import os required_conan_version = ">=1.33.0" class LibdwarfConan(ConanFile): name = "libdwarf" description = "A library and a set of command-line tools for reading and writing DWARF2" topics = ("libdwarf", "dwarf2", "debugging", "dwarf") ur...
31.270588
106
0.631678
from conans import ConanFile, CMake, tools import functools import os required_conan_version = ">=1.33.0" class LibdwarfConan(ConanFile): name = "libdwarf" description = "A library and a set of command-line tools for reading and writing DWARF2" topics = ("libdwarf", "dwarf2", "debugging", "dwarf") ur...
true
true
f7529c0300df36f3452a1d0984a2b8e5e476c464
4,410
py
Python
core/utils/flow_viz.py
rioyokotalab/RAFT
d718fe86d11f8ab0d4d6d0b0b5c45fa029104444
[ "BSD-3-Clause" ]
null
null
null
core/utils/flow_viz.py
rioyokotalab/RAFT
d718fe86d11f8ab0d4d6d0b0b5c45fa029104444
[ "BSD-3-Clause" ]
null
null
null
core/utils/flow_viz.py
rioyokotalab/RAFT
d718fe86d11f8ab0d4d6d0b0b5c45fa029104444
[ "BSD-3-Clause" ]
null
null
null
# Flow visualization code # used from https://github.com/tomrunia/OpticalFlow_Visualization # MIT License # # Copyright (c) 2018 Tom Runia # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software w...
32.666667
88
0.613379
import numpy as np def make_colorwheel(): RY = 15 YG = 6 GC = 4 CB = 11 BM = 13 MR = 6 ncols = RY + YG + GC + CB + BM + MR colorwheel = np.zeros((ncols, 3)) col = 0 colorwheel[0:RY, 0] = 255 colorwheel[0:RY, 1] = np.floor(255 * np.arange(0, RY) / RY) col = col ...
true
true
f7529c1cda7df6a10d75d62cad3b470910c470bf
5,849
py
Python
tractseg/models/UNet_Pytorch_DeepSup.py
magreiner/TractSeg
5ac5278fc3a6d3262f9f06924dbdde01b399ccf6
[ "Apache-2.0" ]
null
null
null
tractseg/models/UNet_Pytorch_DeepSup.py
magreiner/TractSeg
5ac5278fc3a6d3262f9f06924dbdde01b399ccf6
[ "Apache-2.0" ]
null
null
null
tractseg/models/UNet_Pytorch_DeepSup.py
magreiner/TractSeg
5ac5278fc3a6d3262f9f06924dbdde01b399ccf6
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ) # # 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 #...
40.061644
167
0.675158
import os import glob from os.path import join import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import Adamax from torch.optim import Adam import torch.optim.lr_scheduler as lr_scheduler from torch.autograd import Variable from tractseg.libs.PytorchUtils import Py...
true
true
f7529c48485cafd403a29715f05d59b18b67d09d
773
py
Python
0x0B-python-input_output/10-student.py
malu17/alx-higher_level_programming
75a24d98c51116b737f339697c75855e34254d3a
[ "MIT" ]
null
null
null
0x0B-python-input_output/10-student.py
malu17/alx-higher_level_programming
75a24d98c51116b737f339697c75855e34254d3a
[ "MIT" ]
null
null
null
0x0B-python-input_output/10-student.py
malu17/alx-higher_level_programming
75a24d98c51116b737f339697c75855e34254d3a
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """Student module. Contains a Student class and some methods. """ class Student(): """Defines a Student.""" def __init__(self, first_name, last_name, age): """Sets the necessary attributes for the Student object. Args: first_name (str): first name of the stude...
27.607143
74
0.605433
class Student(): def __init__(self, first_name, last_name, age): self.first_name = first_name self.last_name = last_name self.age = age def to_json(self, attrs=None): if attrs is not None: return {k: v for k, v in self.__dict__.items() if k in attrs} retur...
true
true
f7529fe9b68d5251d23b5ace495524fda75c1b7b
7,517
py
Python
kenlm_training/cc_net/flat_hash_set.py
ruinunca/data_tooling
297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff
[ "Apache-2.0" ]
435
2019-11-04T22:35:50.000Z
2022-03-29T20:15:07.000Z
kenlm_training/cc_net/flat_hash_set.py
ruinunca/data_tooling
297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff
[ "Apache-2.0" ]
331
2021-11-02T00:30:56.000Z
2022-03-08T16:48:13.000Z
kenlm_training/cc_net/flat_hash_set.py
ruinunca/data_tooling
297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff
[ "Apache-2.0" ]
66
2019-11-06T01:28:12.000Z
2022-03-01T09:18:32.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # import sys import time import warnings from typing import Iterable, Iterator, Sequence, Sized, Tuple, Type import numpy as np HASH_TYPE: T...
30.310484
90
0.598111
import sys import time import warnings from typing import Iterable, Iterator, Sequence, Sized, Tuple, Type import numpy as np HASH_TYPE: Type[np.uint64] = np.uint64 GETPY_WARNING = False class AbstractDedupHashSet(Sized, Iterable[np.uint64]): dtype: Type[np.uint64] = HASH_TYPE def __repr__(self): ...
true
true
f752a26a48d74e9686f9741934cdb49e67e4fde8
453
py
Python
waiting/src/lib/mine/cert/bin/helper/Python/write-BASH.py
rdw20170120/workstation
ed19aa930a83885c2a8cb58eb0bb5afe58f95df3
[ "MIT" ]
null
null
null
waiting/src/lib/mine/cert/bin/helper/Python/write-BASH.py
rdw20170120/workstation
ed19aa930a83885c2a8cb58eb0bb5afe58f95df3
[ "MIT" ]
2
2021-04-06T18:07:32.000Z
2021-06-02T01:50:40.000Z
waiting/src/lib/mine/cert/bin/helper/Python/write-BASH.py
rdw20170120/workstation
ed19aa930a83885c2a8cb58eb0bb5afe58f95df3
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys from my_configuration import * from my_instruction import * from webpage import Html5 def main(): css_class = "support" page = Html5(css_class, "HowTo use Bash") page.add( htmltags.p[ "TODO: Describe how to use Bash command-line completion, editing, a...
17.423077
91
0.640177
import sys from my_configuration import * from my_instruction import * from webpage import Html5 def main(): css_class = "support" page = Html5(css_class, "HowTo use Bash") page.add( htmltags.p[ "TODO: Describe how to use Bash command-line completion, editing, and history", ]...
true
true
f752a2d047d66c4ed1cbdd79376f0d486d98a66d
4,862
py
Python
ifstat/display/sessions.py
aviramc/ifstat
51285c387d5821794b2bdbd4e73d8396ab916baf
[ "Apache-2.0" ]
null
null
null
ifstat/display/sessions.py
aviramc/ifstat
51285c387d5821794b2bdbd4e73d8396ab916baf
[ "Apache-2.0" ]
null
null
null
ifstat/display/sessions.py
aviramc/ifstat
51285c387d5821794b2bdbd4e73d8396ab916baf
[ "Apache-2.0" ]
null
null
null
import curses from itertools import islice, izip from .pad_display_manager import PadDisplayManager from .rate import get_rate_string SESSIONS_HEADER = "| Idx | Type | Details | RX Rate | TX Rate | Activity Time " SESSIONS_BORDER = "+-----+------+-------------...
39.852459
137
0.526532
import curses from itertools import islice, izip from .pad_display_manager import PadDisplayManager from .rate import get_rate_string SESSIONS_HEADER = "| Idx | Type | Details | RX Rate | TX Rate | Activity Time " SESSIONS_BORDER = "+-----+------+-------------...
true
true
f752a4b687ddfd7d3eb3216866dcda2583f688ef
3,238
py
Python
igibson/__init__.py
mamadbiabon/iGibson
d416a470240eb7ad86e04fee475ae4bd67263a7c
[ "MIT" ]
null
null
null
igibson/__init__.py
mamadbiabon/iGibson
d416a470240eb7ad86e04fee475ae4bd67263a7c
[ "MIT" ]
null
null
null
igibson/__init__.py
mamadbiabon/iGibson
d416a470240eb7ad86e04fee475ae4bd67263a7c
[ "MIT" ]
null
null
null
import logging import os import yaml __version__ = "2.0.5" logging.getLogger().setLevel(logging.INFO) with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "global_config.yaml")) as f: global_config = yaml.load(f, Loader=yaml.FullLoader) # can override assets_path and dataset_path from environmen...
40.475
114
0.78042
import logging import os import yaml __version__ = "2.0.5" logging.getLogger().setLevel(logging.INFO) with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "global_config.yaml")) as f: global_config = yaml.load(f, Loader=yaml.FullLoader) if "GIBSON_ASSETS_PATH" in os.environ: assets_path = os...
true
true
f752a63c30482ce83b1c2f74fb8db411227da35b
700
py
Python
pyblock/utils.py
EmuMan/pyblock
d35eaf68ff49fec7423d34b95d919b1a09af3b3f
[ "MIT" ]
null
null
null
pyblock/utils.py
EmuMan/pyblock
d35eaf68ff49fec7423d34b95d919b1a09af3b3f
[ "MIT" ]
null
null
null
pyblock/utils.py
EmuMan/pyblock
d35eaf68ff49fec7423d34b95d919b1a09af3b3f
[ "MIT" ]
null
null
null
import io import base64 import requests from nbt import nbt from .errors import * from .errors import _get_response_exception def decode_item_bytes(item_bytes: bytes) -> nbt.NBTFile: return nbt.NBTFile(fileobj=io.BytesIO(base64.b64decode(item_bytes))) def request_endpoint(endpoint: str, args: dict[str, str] | N...
33.333333
88
0.728571
import io import base64 import requests from nbt import nbt from .errors import * from .errors import _get_response_exception def decode_item_bytes(item_bytes: bytes) -> nbt.NBTFile: return nbt.NBTFile(fileobj=io.BytesIO(base64.b64decode(item_bytes))) def request_endpoint(endpoint: str, args: dict[str, str] | N...
true
true
f752a6e37dc39657eb35e2a6040256c10a9265c9
33
py
Python
mpf/platforms/lisy/__init__.py
Scottacus64/mpf
fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a
[ "MIT" ]
163
2015-01-25T02:19:50.000Z
2022-03-26T12:00:28.000Z
mpf/platforms/lisy/__init__.py
Scottacus64/mpf
fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a
[ "MIT" ]
1,086
2015-03-23T19:53:17.000Z
2022-03-24T20:46:11.000Z
mpf/platforms/lisy/__init__.py
Scottacus64/mpf
fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a
[ "MIT" ]
148
2015-01-28T02:31:39.000Z
2022-03-22T13:54:01.000Z
"""LISY System 1/80 platform."""
16.5
32
0.636364
true
true
f752a710831ddd9175a70eee1fc14d430dcd8c52
22
py
Python
ionic_liquids/visualization/__init__.py
qize/ionic_liquids
64eebaf505b1d89b2e2ef82f8fa8959b0a0c3956
[ "MIT" ]
2
2020-10-21T08:41:41.000Z
2021-08-05T10:20:24.000Z
ionic_liquids/visualization/__init__.py
qize/ionic_liquids
64eebaf505b1d89b2e2ef82f8fa8959b0a0c3956
[ "MIT" ]
null
null
null
ionic_liquids/visualization/__init__.py
qize/ionic_liquids
64eebaf505b1d89b2e2ef82f8fa8959b0a0c3956
[ "MIT" ]
3
2017-11-08T23:03:10.000Z
2020-10-21T08:41:48.000Z
#Visualization Module
11
21
0.863636
true
true
f752a820c85c186245f600d40577c34c4890e711
635
py
Python
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/mixed_precision/__init__.py
Lube-Project/ProgettoLube
cbf33971e2c2e865783ec1a2302625539186a338
[ "MIT" ]
2
2020-09-30T00:11:09.000Z
2021-10-04T13:00:38.000Z
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/mixed_precision/__init__.py
Lube-Project/ProgettoLube
cbf33971e2c2e865783ec1a2302625539186a338
[ "MIT" ]
null
null
null
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/mixed_precision/__init__.py
Lube-Project/ProgettoLube
cbf33971e2c2e865783ec1a2302625539186a338
[ "MIT" ]
1
2021-01-28T01:57:41.000Z
2021-01-28T01:57:41.000Z
# This file is MACHINE GENERATED! Do not edit. # Generated by: tensorflow/python/tools/api/generator/create_python_api.py script. """Public API for tf.keras.mixed_precision namespace. """ from __future__ import print_function as _print_function import sys as _sys from . import experimental del _print_function from...
31.75
90
0.801575
from __future__ import print_function as _print_function import sys as _sys from . import experimental del _print_function from tensorflow.python.util import module_wrapper as _module_wrapper if not isinstance(_sys.modules[__name__], _module_wrapper.TFModuleWrapper): _sys.modules[__name__] = _module_wrapper.TFM...
true
true
f752a84c199321d4db4be936ffa6f5e8775d7582
11,363
py
Python
wavefront_api_client/models/customer_facing_user_object.py
mdennehy/python-client
4d9cfa32075a6a65d88a38fe9e72b282e87b8808
[ "Apache-2.0" ]
null
null
null
wavefront_api_client/models/customer_facing_user_object.py
mdennehy/python-client
4d9cfa32075a6a65d88a38fe9e72b282e87b8808
[ "Apache-2.0" ]
null
null
null
wavefront_api_client/models/customer_facing_user_object.py
mdennehy/python-client
4d9cfa32075a6a65d88a38fe9e72b282e87b8808
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
32.84104
409
0.624747
import pprint import re import six class CustomerFacingUserObject(object): swagger_types = { 'customer': 'str', 'escaped_identifier': 'str', 'gravatar_url': 'str', 'groups': 'list[str]', 'id': 'str', 'identifier': 'str', 'last_successful_login': 'int',...
true
true
f752a953fdc878924a8d06767dd98c77f89ddd8f
3,670
py
Python
test/TestUrlInstaller.py
nitehawck/DevEnvManager
425b0d621be577fe73f22b4641f7099eac65669e
[ "MIT" ]
1
2016-05-16T23:13:47.000Z
2016-05-16T23:13:47.000Z
test/TestUrlInstaller.py
nitehawck/DevEnvManager
425b0d621be577fe73f22b4641f7099eac65669e
[ "MIT" ]
41
2016-01-22T00:56:14.000Z
2016-05-12T14:38:37.000Z
test/TestUrlInstaller.py
nitehawck/DevEnvManager
425b0d621be577fe73f22b4641f7099eac65669e
[ "MIT" ]
null
null
null
import os import unittest import mock from dem.dependency.url import UrlInstaller from dem.project.cache import PackageCache class TestUrlInstaller(unittest.TestCase): @mock.patch('wget.download') def test_will_get_packages_and_download(self, mock_wget): cache = mock.MagicMock(spec = PackageCache) ...
45.308642
113
0.648229
import os import unittest import mock from dem.dependency.url import UrlInstaller from dem.project.cache import PackageCache class TestUrlInstaller(unittest.TestCase): @mock.patch('wget.download') def test_will_get_packages_and_download(self, mock_wget): cache = mock.MagicMock(spec = PackageCache) ...
true
true
f752a969deb31ece7e7159fbb6b61f42287277c4
10,412
py
Python
test/workers/test_websocket_worker.py
shubhamsingh987/PySyft
ff967e3735bd7d47667d1d3e5038ba1493ca2e90
[ "Apache-2.0" ]
1
2020-05-25T13:44:29.000Z
2020-05-25T13:44:29.000Z
test/workers/test_websocket_worker.py
shubhamsingh987/PySyft
ff967e3735bd7d47667d1d3e5038ba1493ca2e90
[ "Apache-2.0" ]
2
2020-03-09T09:17:06.000Z
2020-04-09T13:33:12.000Z
test/workers/test_websocket_worker.py
shubhamsingh987/PySyft
ff967e3735bd7d47667d1d3e5038ba1493ca2e90
[ "Apache-2.0" ]
1
2022-03-06T06:22:21.000Z
2022-03-06T06:22:21.000Z
import io from os.path import exists, join import time from socket import gethostname from OpenSSL import crypto, SSL import pytest import torch import syft as sy from syft.generic.frameworks.hook import hook_args from syft.frameworks.torch.fl import utils from syft.workers.websocket_client import WebsocketClientWorke...
30.623529
151
0.689109
import io from os.path import exists, join import time from socket import gethostname from OpenSSL import crypto, SSL import pytest import torch import syft as sy from syft.generic.frameworks.hook import hook_args from syft.frameworks.torch.fl import utils from syft.workers.websocket_client import WebsocketClientWorke...
true
true
f752aa351e1d134bf0a1b57639df2b692ec1fb2b
5,082
py
Python
service/api/resources/devices.py
alanquillin/rpi-light-controller
a22d1bbe661e9842ac61aea38164b9faf6fa1cc8
[ "MIT" ]
null
null
null
service/api/resources/devices.py
alanquillin/rpi-light-controller
a22d1bbe661e9842ac61aea38164b9faf6fa1cc8
[ "MIT" ]
null
null
null
service/api/resources/devices.py
alanquillin/rpi-light-controller
a22d1bbe661e9842ac61aea38164b9faf6fa1cc8
[ "MIT" ]
null
null
null
from flask import request from resources import BaseResource, ResourceMixinBase from db import session_scope from db.devices import Devices as DevicesDB from lib import devices as devicesLib class DeviceResourceMixin(ResourceMixinBase): def __init__(self): super().__init__() def get_status(self, ...
37.367647
151
0.61039
from flask import request from resources import BaseResource, ResourceMixinBase from db import session_scope from db.devices import Devices as DevicesDB from lib import devices as devicesLib class DeviceResourceMixin(ResourceMixinBase): def __init__(self): super().__init__() def get_status(self, ...
true
true
f752aa71e6a98de7a9e902643ab96eaff7eb972c
1,150
py
Python
bootcamp/articles/migrations/0009_auto_20220323_2348.py
elbakouchi/bootcamp
2c7a0cd2ddb7632acb3009f94d728792ddf9644f
[ "MIT" ]
null
null
null
bootcamp/articles/migrations/0009_auto_20220323_2348.py
elbakouchi/bootcamp
2c7a0cd2ddb7632acb3009f94d728792ddf9644f
[ "MIT" ]
null
null
null
bootcamp/articles/migrations/0009_auto_20220323_2348.py
elbakouchi/bootcamp
2c7a0cd2ddb7632acb3009f94d728792ddf9644f
[ "MIT" ]
null
null
null
# Generated by Django 3.2.12 on 2022-03-23 23:48 import django.core.validators from django.db import migrations, models import django_ckeditor_5.fields class Migration(migrations.Migration): dependencies = [ ('articles', '0008_auto_20220320_1346'), ] operations = [ migrations.AlterField...
31.944444
143
0.612174
import django.core.validators from django.db import migrations, models import django_ckeditor_5.fields class Migration(migrations.Migration): dependencies = [ ('articles', '0008_auto_20220320_1346'), ] operations = [ migrations.AlterField( model_name='article', n...
true
true
f752abd3e7e97e5788172f1002cf0feae4a6c745
5,305
py
Python
ding/hpc_rl/tests/test_lstm.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
464
2021-07-08T07:26:33.000Z
2022-03-31T12:35:16.000Z
ding/hpc_rl/tests/test_lstm.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
177
2021-07-09T08:22:55.000Z
2022-03-31T07:35:22.000Z
ding/hpc_rl/tests/test_lstm.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
92
2021-07-08T12:16:37.000Z
2022-03-31T09:24:41.000Z
import time import torch from hpc_rll.origin.rnn import get_lstm from hpc_rll.torch_utils.network.rnn import LSTM from testbase import mean_relative_error, times assert torch.cuda.is_available() use_cuda = True seq_len = 64 batch_size = 3 input_size = 1792 hidden_size = 384 num_layers = 3 norm_type = 'LN' dropout = 0...
37.624113
145
0.651838
import time import torch from hpc_rll.origin.rnn import get_lstm from hpc_rll.torch_utils.network.rnn import LSTM from testbase import mean_relative_error, times assert torch.cuda.is_available() use_cuda = True seq_len = 64 batch_size = 3 input_size = 1792 hidden_size = 384 num_layers = 3 norm_type = 'LN' dropout = 0...
true
true
f752acf642764fb0cce0183aa4742b306ee49ec4
1,382
py
Python
plugins/better_tables/__init__.py
jeorryb/datarambler
1968ccdc018182f3ad9d34ffaf7c743cebc92357
[ "MIT" ]
13
2015-02-19T22:14:07.000Z
2021-02-07T14:16:34.000Z
plugins/better_tables/__init__.py
jeorryb/datarambler
1968ccdc018182f3ad9d34ffaf7c743cebc92357
[ "MIT" ]
2
2015-07-28T10:02:57.000Z
2017-07-28T18:08:59.000Z
pelican-plugins/better_tables/__init__.py
JN-Blog/jn-blog.com
669bf9a9c6813f2b7980792fb137f6718077aea1
[ "MIT" ]
7
2015-08-26T16:52:00.000Z
2019-10-11T05:32:37.000Z
# Copyright (c) 2015 Alex Waite # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute...
43.1875
79
0.767004
__title__ = 'better-tables' __version__ = '0.1.0' __author__ = 'Alex Waite' __credits__ = ["Alex Waite"] __maintainer__ = "Alex Waite" __email__ = "Alexqw85@gmail.com" __status__ = "Stable" __license__ = 'MIT' __copyright__ = 'Copyright 2015' from .better_tables import *
true
true
f752ad809751257eeefc25facdc6911f8de7aa74
2,010
py
Python
tests/codegen/handlers/test_attribute_effect_choice.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
tests/codegen/handlers/test_attribute_effect_choice.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
tests/codegen/handlers/test_attribute_effect_choice.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
from xsdata.codegen.handlers import AttributeEffectiveChoiceHandler from xsdata.codegen.models import Restrictions from xsdata.utils.testing import AttrFactory from xsdata.utils.testing import ClassFactory from xsdata.utils.testing import FactoryTestCase class AttributeEffectiveChoiceHandlerTests(FactoryTestCase): ...
40.2
86
0.692537
from xsdata.codegen.handlers import AttributeEffectiveChoiceHandler from xsdata.codegen.models import Restrictions from xsdata.utils.testing import AttrFactory from xsdata.utils.testing import ClassFactory from xsdata.utils.testing import FactoryTestCase class AttributeEffectiveChoiceHandlerTests(FactoryTestCase): ...
true
true
f752aedf208bba00b38ad9b975d75f81f1b03eff
424
py
Python
geopy/__init__.py
pivotal-energy-solutions/geopy
f34f14c92224964e6eeb161e65238f9bae50694b
[ "MIT" ]
1
2019-02-16T01:31:41.000Z
2019-02-16T01:31:41.000Z
geopy/__init__.py
pivotal-energy-solutions/geopy
f34f14c92224964e6eeb161e65238f9bae50694b
[ "MIT" ]
null
null
null
geopy/__init__.py
pivotal-energy-solutions/geopy
f34f14c92224964e6eeb161e65238f9bae50694b
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from geopy.point import Point from geopy.location import Location from geopy import geocoders __name__ = 'geopy' __author__ = 'Brian Beck' __version_info__ = (1, 0, 0) __version__ = '.'.join(map(str, __version_info__)) __date__ = '2014/07/22 4:47:00 PM' __credits__ = ['Brian Be...
30.285714
67
0.759434
from __future__ import unicode_literals from geopy.point import Point from geopy.location import Location from geopy import geocoders __name__ = 'geopy' __author__ = 'Brian Beck' __version_info__ = (1, 0, 0) __version__ = '.'.join(map(str, __version_info__)) __date__ = '2014/07/22 4:47:00 PM' __credits__ = ['Brian Be...
true
true
f752aef8dfbdc707b0090811cf85d8b5625cc26b
9,370
py
Python
Tarea2b - CrazyRacer/local_shapes2.py
Nicolas-Francisco/Computer-Graphics
1895f3188c9ff662148a42c082a7191e2c83a06a
[ "CC-BY-4.0" ]
null
null
null
Tarea2b - CrazyRacer/local_shapes2.py
Nicolas-Francisco/Computer-Graphics
1895f3188c9ff662148a42c082a7191e2c83a06a
[ "CC-BY-4.0" ]
null
null
null
Tarea2b - CrazyRacer/local_shapes2.py
Nicolas-Francisco/Computer-Graphics
1895f3188c9ff662148a42c082a7191e2c83a06a
[ "CC-BY-4.0" ]
null
null
null
""" Local shapes module, containing the logic for creating shapes""" import numpy as np import basic_shapes as bs def createColorTriangleIndexation(start_index, a, b, c, color): # Defining locations and colors for each vertex of the shape vertices = [ # positions colors ...
29.373041
96
0.554642
""" Local shapes module, containing the logic for creating shapes""" import numpy as np import basic_shapes as bs def createColorTriangleIndexation(start_index, a, b, c, color): vertices = [ a[0], a[1], a[2], color[0], color[1], color[2], b[0], b[1], b[2], color[0], color[1], color[2], ...
false
true
f752af8d1e84a5d41818f4c70e7b9661f5a949b4
76
py
Python
social/backends/facebook.py
raccoongang/python-social-auth
81c0a542d158772bd3486d31834c10af5d5f08b0
[ "BSD-3-Clause" ]
1,987
2015-01-01T16:12:45.000Z
2022-03-29T14:24:25.000Z
social/backends/facebook.py
raccoongang/python-social-auth
81c0a542d158772bd3486d31834c10af5d5f08b0
[ "BSD-3-Clause" ]
731
2015-01-01T22:55:25.000Z
2022-03-10T15:07:51.000Z
virtual/lib/python3.6/site-packages/social/backends/facebook.py
dennismwaniki67/awards
80ed10541f5f751aee5f8285ab1ad54cfecba95f
[ "MIT" ]
1,082
2015-01-01T16:27:26.000Z
2022-03-22T21:18:33.000Z
from social_core.backends.facebook import FacebookOAuth2, FacebookAppOAuth2
38
75
0.894737
from social_core.backends.facebook import FacebookOAuth2, FacebookAppOAuth2
true
true
f752af965b3c5d1687e51da493cb99eac4ccfd11
2,003
py
Python
django_extensions/management/commands/compile_pyc.py
AsymmetricVentures/django-extensions
4abd62bd33fef2f3685731658a8852085442d8c9
[ "MIT" ]
1
2021-12-23T08:16:17.000Z
2021-12-23T08:16:17.000Z
django_extensions/management/commands/compile_pyc.py
DeronW/django-extensions
40020f5b4788064af3be54b44c1768c5231cf7ee
[ "MIT" ]
null
null
null
django_extensions/management/commands/compile_pyc.py
DeronW/django-extensions
40020f5b4788064af3be54b44c1768c5231cf7ee
[ "MIT" ]
null
null
null
import os import time import fnmatch import warnings import py_compile from django.core.management.base import NoArgsCommand from django.conf import settings from django_extensions.management.utils import get_project_root from optparse import make_option from os.path import join as _j class Command(NoArgsCommand): ...
37.792453
118
0.640539
import os import time import fnmatch import warnings import py_compile from django.core.management.base import NoArgsCommand from django.conf import settings from django_extensions.management.utils import get_project_root from optparse import make_option from os.path import join as _j class Command(NoArgsCommand): ...
true
true
f752afb77ebf990e016020ee433eff5c208736f1
96
py
Python
base/urls.py
frederikkoenigwork/my_python_django_website
1ec644c7c420f119c55d45365ca0ff342bc7e3aa
[ "Unlicense" ]
null
null
null
base/urls.py
frederikkoenigwork/my_python_django_website
1ec644c7c420f119c55d45365ca0ff342bc7e3aa
[ "Unlicense" ]
null
null
null
base/urls.py
frederikkoenigwork/my_python_django_website
1ec644c7c420f119c55d45365ca0ff342bc7e3aa
[ "Unlicense" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.home), ]
10.666667
28
0.65625
from django.urls import path from . import views urlpatterns = [ path('', views.home), ]
true
true
f752b131ed8a09c47a840c5eac4520b6c0910a5e
11,971
py
Python
buzzard/test/test_vectorproxy_opencreate.py
azarz/buzzard
1b61d0455a3e87808040a1d761de2c8935f3fe4d
[ "Apache-2.0" ]
null
null
null
buzzard/test/test_vectorproxy_opencreate.py
azarz/buzzard
1b61d0455a3e87808040a1d761de2c8935f3fe4d
[ "Apache-2.0" ]
null
null
null
buzzard/test/test_vectorproxy_opencreate.py
azarz/buzzard
1b61d0455a3e87808040a1d761de2c8935f3fe4d
[ "Apache-2.0" ]
null
null
null
"""Test: - Vector opening - Vector creation - Attributes validity - Vector deletion """ # pylint: disable=redefined-outer-name from __future__ import division, print_function import itertools import os import uuid import tempfile import operator from pprint import pprint import numpy as np import pytest from osgeo i...
26.66147
279
0.536881
from __future__ import division, print_function import itertools import os import uuid import tempfile import operator from pprint import pprint import numpy as np import pytest from osgeo import gdal import shapely.geometry as sg from .tools import get_srs_by_name, eq from buzzard import Footprint, DataSource, srs...
true
true
f752b2046fa25034d63ea70d9037916af73dbb22
8,008
py
Python
mars/tensor/merge/concatenate.py
wdkwyf/mars
3f750e360e64380eab779301a5103994d4886b6a
[ "Apache-2.0" ]
null
null
null
mars/tensor/merge/concatenate.py
wdkwyf/mars
3f750e360e64380eab779301a5103994d4886b6a
[ "Apache-2.0" ]
null
null
null
mars/tensor/merge/concatenate.py
wdkwyf/mars
3f750e360e64380eab779301a5103994d4886b6a
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2018 Alibaba Group Holding 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...
37.952607
98
0.605894
import itertools import operator from collections import Iterable import numpy as np from ... import opcodes as OperandDef from ...compat import six, lrange, lmap from ...serialize import AnyField from ..array_utils import device, as_same_device from ..utils import validate_axis, unify_chunks from ..datasource impor...
true
true
f752b2b3a9c27bd7e5fe5ddc77d33af8b95e02a2
20,385
py
Python
tensorflow/contrib/learn/python/learn/estimators/estimator.py
ash-vs/tensorflow
303dc341a6300a4a2eee820679bca30547426aa6
[ "Apache-2.0" ]
42
2016-08-22T03:49:32.000Z
2020-06-29T14:00:27.000Z
tensorflow/contrib/learn/python/learn/estimators/estimator.py
alanponce/tensorflow
303dc341a6300a4a2eee820679bca30547426aa6
[ "Apache-2.0" ]
6
2016-09-02T03:44:35.000Z
2018-11-27T13:20:36.000Z
tensorflow/contrib/learn/python/learn/estimators/estimator.py
alanponce/tensorflow
303dc341a6300a4a2eee820679bca30547426aa6
[ "Apache-2.0" ]
12
2017-03-18T22:22:28.000Z
2020-06-19T20:54:53.000Z
# Copyright 2015 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 o...
36.207815
80
0.677312
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import os import tempfile import time import six from tensorflow.contrib import framework as contrib_framework from tensorflow.contrib import layers from tensorflow.contrib import losses from tens...
true
true
f752b3ba726b744c6b780014cd9a1b48978bfed5
6,182
py
Python
basic_skills/views_ex/views_two_scoops_of_django.py
bluebamus/django_miscellaneous_book
22e0851b3a07aeef94bb723b334f036ed5c17f72
[ "MIT" ]
null
null
null
basic_skills/views_ex/views_two_scoops_of_django.py
bluebamus/django_miscellaneous_book
22e0851b3a07aeef94bb723b334f036ed5c17f72
[ "MIT" ]
null
null
null
basic_skills/views_ex/views_two_scoops_of_django.py
bluebamus/django_miscellaneous_book
22e0851b3a07aeef94bb723b334f036ed5c17f72
[ "MIT" ]
null
null
null
from django.views.generic import CreateView, UpdateView, DetailView, ListView from ..models_ex.models_two_scoops_of_django import Flavor from django import forms # reference : https://blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=pjok1122&logNo=221609547295 # sub reference : https://m.blog.naver.com/pjok1...
33.967033
107
0.598997
from django.views.generic import CreateView, UpdateView, DetailView, ListView from ..models_ex.models_two_scoops_of_django import Flavor from django import forms class OrderForm(forms.ModelForm): def __init__(self, request, *args, **kwargs): super().__init__(*args, **kwargs) self.request = reque...
true
true
f752b3d371b92798fe5547bb9503013909c18198
1,305
py
Python
upstream_utils/update_fmt.py
shueja-personal/allwpilib
4b2f6be29e21986703d9c3ddcd2fe07121b2ff6b
[ "BSD-3-Clause" ]
1
2022-01-12T19:59:09.000Z
2022-01-12T19:59:09.000Z
upstream_utils/update_fmt.py
shueja-personal/allwpilib
4b2f6be29e21986703d9c3ddcd2fe07121b2ff6b
[ "BSD-3-Clause" ]
null
null
null
upstream_utils/update_fmt.py
shueja-personal/allwpilib
4b2f6be29e21986703d9c3ddcd2fe07121b2ff6b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import os import shutil from upstream_utils import setup_upstream_repo, comment_out_invalid_includes, walk_cwd_and_copy_if, apply_patches def main(): root, repo = setup_upstream_repo("https://github.com/fmtlib/fmt", "8.1.1") wpiutil = os.path.join(root, "wpiutil") # Delete old in...
32.625
113
0.672031
import os import shutil from upstream_utils import setup_upstream_repo, comment_out_invalid_includes, walk_cwd_and_copy_if, apply_patches def main(): root, repo = setup_upstream_repo("https://github.com/fmtlib/fmt", "8.1.1") wpiutil = os.path.join(root, "wpiutil") for d in ["src/main/native/fmtlib/...
true
true
f752b40291abc4736d03e7b9d78e2cd31a628c60
38,241
py
Python
earth_enterprise/src/google/protobuf-py/mox.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
2,661
2017-03-20T22:12:50.000Z
2022-03-30T09:43:19.000Z
earth_enterprise/src/google/protobuf-py/mox.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
1,531
2017-03-24T17:20:32.000Z
2022-03-16T18:11:14.000Z
earth_enterprise/src/google/protobuf-py/mox.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
990
2017-03-24T11:54:28.000Z
2022-03-22T11:51:47.000Z
#!/usr/bin/env python2.7 # # Copyright 2008 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 l...
27.276034
80
0.683403
"""Mox, an object-mocking framework for Python. Mox works in the record-replay-verify paradigm. When you first create a mock object, it is in record mode. You then programmatically set the expected behavior of the mock object (what methods are to be called on it, with what parameters, what they should return, and ...
false
true
f752b59568a74f56c9b581651e54d1cab2af227f
341
bzl
Python
tensorflow/core/kernels/fuzzing/tf_ops_fuzz_target_lib.bzl
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
850
2018-01-18T05:56:02.000Z
2022-03-31T08:17:34.000Z
tensorflow/core/kernels/fuzzing/tf_ops_fuzz_target_lib.bzl
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/core/kernels/fuzzing/tf_ops_fuzz_target_lib.bzl
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
364
2018-01-22T02:11:16.000Z
2022-03-27T12:58:47.000Z
"""Fuzzing template for TensorFlow ops.""" def tf_ops_fuzz_target_lib(name): native.cc_library( name = name + "_fuzz_lib", srcs = [name + "_fuzz.cc"], deps = [ "//tensorflow/core/kernels/fuzzing:fuzz_session", "//tensorflow/cc:cc_ops", ], tags = ["no_windows"], ...
24.357143
59
0.571848
def tf_ops_fuzz_target_lib(name): native.cc_library( name = name + "_fuzz_lib", srcs = [name + "_fuzz.cc"], deps = [ "//tensorflow/core/kernels/fuzzing:fuzz_session", "//tensorflow/cc:cc_ops", ], tags = ["no_windows"], alwayslink = 1, )
true
true
f752b5c1b3f26154f1a7afd121ce661cf8c9d378
188
py
Python
panacea/__init__.py
klem4/panacea
55c0c9bf89b2d85353bd6480cb5f96fd2b2e8caa
[ "Unlicense" ]
1
2019-04-02T00:16:58.000Z
2019-04-02T00:16:58.000Z
panacea/__init__.py
klem4/panacea
55c0c9bf89b2d85353bd6480cb5f96fd2b2e8caa
[ "Unlicense" ]
null
null
null
panacea/__init__.py
klem4/panacea
55c0c9bf89b2d85353bd6480cb5f96fd2b2e8caa
[ "Unlicense" ]
null
null
null
# coding: utf-8 __author__ = 'klem4' VERSION = (0, 1, 2) __version__ = '.'.join(map(str, VERSION)) from django.conf import settings if settings.DEBUG: print "DEBUG: %s" % __version__
20.888889
41
0.680851
__author__ = 'klem4' VERSION = (0, 1, 2) __version__ = '.'.join(map(str, VERSION)) from django.conf import settings if settings.DEBUG: print "DEBUG: %s" % __version__
false
true
f752b5ddf3ec6808a88716047e6f7c36999ac7ad
8,479
py
Python
networkx/readwrite/adjlist.py
Dosenpfand/networkx
77eb43b8f03fe8afdfdce94a88bc65d7c904b398
[ "BSD-3-Clause" ]
null
null
null
networkx/readwrite/adjlist.py
Dosenpfand/networkx
77eb43b8f03fe8afdfdce94a88bc65d7c904b398
[ "BSD-3-Clause" ]
null
null
null
networkx/readwrite/adjlist.py
Dosenpfand/networkx
77eb43b8f03fe8afdfdce94a88bc65d7c904b398
[ "BSD-3-Clause" ]
1
2019-01-30T17:57:36.000Z
2019-01-30T17:57:36.000Z
# -*- coding: utf-8 -*- """ ************** Adjacency List ************** Read and write NetworkX graphs as adjacency lists. Adjacency list format is useful for graphs without data associated with nodes or edges and for nodes that can be meaningfully represented as strings. Format ------ The adjacency list format cons...
27.003185
76
0.581436
__author__ = '\n'.join(['Aric Hagberg <hagberg@lanl.gov>', 'Dan Schult <dschult@colgate.edu>', 'Loïc Séguin-C. <loicseguin@gmail.com>']) __all__ = ['generate_adjlist', 'write_adjlist', 'parse_adjlist', 'read_adjlist'] from networkx.utils...
true
true
f752b618458066e8641d5b055cac155ae365e097
693
py
Python
ninja/security/base.py
Stamper/django-ninja
39479db2937b0a8a918cfe1c0790ad7016db7edc
[ "MIT" ]
1
2021-05-03T15:38:41.000Z
2021-05-03T15:38:41.000Z
ninja/security/base.py
Stamper/django-ninja
39479db2937b0a8a918cfe1c0790ad7016db7edc
[ "MIT" ]
null
null
null
ninja/security/base.py
Stamper/django-ninja
39479db2937b0a8a918cfe1c0790ad7016db7edc
[ "MIT" ]
null
null
null
from ninja.errors import ConfigError class SecuritySchema(dict): def __init__(self, type: str, **kwargs): super().__init__(type=type, **kwargs) class AuthBase: def __init__(self): if not hasattr(self, "openapi_type"): raise ConfigError("If you extend AuthBase you need to define o...
30.130435
87
0.627706
from ninja.errors import ConfigError class SecuritySchema(dict): def __init__(self, type: str, **kwargs): super().__init__(type=type, **kwargs) class AuthBase: def __init__(self): if not hasattr(self, "openapi_type"): raise ConfigError("If you extend AuthBase you need to define o...
true
true
f752b7d442718cb715c949377b64f1f19f6bd5a6
9,663
py
Python
tests/python/compiler/test_top_level2.py
ThomsonTan/nnvm
dab5ce8ab6adbf4edd8bd2fa89f1a99f343b6e38
[ "Apache-2.0" ]
1,872
2016-09-01T03:31:45.000Z
2022-02-23T08:56:53.000Z
tests/python/compiler/test_top_level2.py
ThomsonTan/nnvm
dab5ce8ab6adbf4edd8bd2fa89f1a99f343b6e38
[ "Apache-2.0" ]
313
2016-09-08T16:18:18.000Z
2018-09-11T09:34:52.000Z
tests/python/compiler/test_top_level2.py
ThomsonTan/nnvm
dab5ce8ab6adbf4edd8bd2fa89f1a99f343b6e38
[ "Apache-2.0" ]
375
2016-09-01T03:50:05.000Z
2022-03-18T16:00:53.000Z
import numpy as np import tvm from tvm.contrib import graph_runtime import topi import topi.testing import nnvm.symbol as sym import nnvm.compiler from nnvm.testing.config import ctx_list def test_conv2d(): x = sym.Variable("x") y = sym.conv2d(x, channels=10, kernel_size=(3,3), name="y", p...
39.765432
88
0.597951
import numpy as np import tvm from tvm.contrib import graph_runtime import topi import topi.testing import nnvm.symbol as sym import nnvm.compiler from nnvm.testing.config import ctx_list def test_conv2d(): x = sym.Variable("x") y = sym.conv2d(x, channels=10, kernel_size=(3,3), name="y", p...
true
true
f752b858b55feab6fe951eb34eab3c8df7e34027
647
py
Python
non_block_client.py
baset-sarker/python-socket-smt
4bfdca5f619d1d0b982f6d9bb31b84e50b7fa8ce
[ "MIT" ]
null
null
null
non_block_client.py
baset-sarker/python-socket-smt
4bfdca5f619d1d0b982f6d9bb31b84e50b7fa8ce
[ "MIT" ]
null
null
null
non_block_client.py
baset-sarker/python-socket-smt
4bfdca5f619d1d0b982f6d9bb31b84e50b7fa8ce
[ "MIT" ]
null
null
null
import websocket import threading from time import sleep def on_message(ws, message): print(message) def on_close(ws): print("closed") if __name__ == "__main__": websocket.enableTrace(True) ws = websocket.WebSocketApp("ws://localhost:9001", on_message = on_message, on_close = on_close) wst = thre...
23.962963
100
0.66306
import websocket import threading from time import sleep def on_message(ws, message): print(message) def on_close(ws): print("closed") if __name__ == "__main__": websocket.enableTrace(True) ws = websocket.WebSocketApp("ws://localhost:9001", on_message = on_message, on_close = on_close) wst = thre...
true
true
f752b8c8b4ee879789503b541ffbf114963d79ab
42
py
Python
src/server/blueprints/exposable/__init__.py
sudo-at-night/palmox
90651be4349ae09c3c1fc77b42eb75901fb10d81
[ "MIT" ]
1
2021-05-18T07:32:37.000Z
2021-05-18T07:32:37.000Z
src/server/blueprints/exposable/__init__.py
sudo-at-night/palmox
90651be4349ae09c3c1fc77b42eb75901fb10d81
[ "MIT" ]
null
null
null
src/server/blueprints/exposable/__init__.py
sudo-at-night/palmox
90651be4349ae09c3c1fc77b42eb75901fb10d81
[ "MIT" ]
null
null
null
from .blueprint import exposable_blueprint
42
42
0.904762
from .blueprint import exposable_blueprint
true
true
f752ba90efddf604225a0ef5c587279b6cb77629
1,582
py
Python
Final/Best_Practices.py
varunkm192002/Pandemic-Warrior
04481b74ebacb0086733a2084bbdf6dbb15c1d1f
[ "BSD-3-Clause" ]
null
null
null
Final/Best_Practices.py
varunkm192002/Pandemic-Warrior
04481b74ebacb0086733a2084bbdf6dbb15c1d1f
[ "BSD-3-Clause" ]
null
null
null
Final/Best_Practices.py
varunkm192002/Pandemic-Warrior
04481b74ebacb0086733a2084bbdf6dbb15c1d1f
[ "BSD-3-Clause" ]
null
null
null
import sys from PyQt5 import QtWidgets from PyQt5.QtCore import (Qt, QRectF) from PyQt5.QtGui import (QCursor, QPainterPath, QRegion) from Best_Practices_gui import Ui_Form class Form(QtWidgets.QWidget, Ui_Form): def __init__(self): super().__init__() self.setupUi(self) self.btn_minimize_...
29.849057
116
0.665613
import sys from PyQt5 import QtWidgets from PyQt5.QtCore import (Qt, QRectF) from PyQt5.QtGui import (QCursor, QPainterPath, QRegion) from Best_Practices_gui import Ui_Form class Form(QtWidgets.QWidget, Ui_Form): def __init__(self): super().__init__() self.setupUi(self) self.btn_minimize_...
true
true
f752ba941e3e058e3c6cbca3957a0e09291f9f00
2,985
py
Python
jsparse/bili/bili_relation.py
PyDee/Spiders
6fc0a414060032b5ba4332302285e3fcc9a6113e
[ "Apache-2.0" ]
6
2020-06-02T16:22:58.000Z
2021-09-18T03:20:16.000Z
jsparse/bili/bili_relation.py
PyDee/Spiders
6fc0a414060032b5ba4332302285e3fcc9a6113e
[ "Apache-2.0" ]
4
2021-03-31T19:54:37.000Z
2022-03-12T00:33:41.000Z
jsparse/bili/bili_relation.py
PyDee/Spiders
6fc0a414060032b5ba4332302285e3fcc9a6113e
[ "Apache-2.0" ]
5
2020-06-02T16:23:00.000Z
2021-09-03T02:16:15.000Z
import os import time import json import redis import requests import signal import random from multiprocessing import Process, Pool from bos_filter import RedisDB, BosFilter from bili_mongo import BosMongo rdb = RedisDB() mbd = BosMongo() bf = BosFilter() r = redis.Redis(host="127.0.0.1") redis_key = "bili_relation_...
30.459184
199
0.574874
import os import time import json import redis import requests import signal import random from multiprocessing import Process, Pool from bos_filter import RedisDB, BosFilter from bili_mongo import BosMongo rdb = RedisDB() mbd = BosMongo() bf = BosFilter() r = redis.Redis(host="127.0.0.1") redis_key = "bili_relation_...
true
true
f752bbb7746f58a2c0509090ae7794a80b91fd18
407
py
Python
QCDAnalysis/Skimming/python/diMuonOutputModule_cfi.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
QCDAnalysis/Skimming/python/diMuonOutputModule_cfi.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
QCDAnalysis/Skimming/python/diMuonOutputModule_cfi.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
import FWCore.ParameterSet.Config as cms from QCDAnalysis.Skimming.diMuonEventContent_cfi import * diMuonOutputModule = cms.OutputModule("PoolOutputModule", diMuonEventSelection, diMuonEventContent, dataset = cms.untracked.PSet( filterName = cms.untracked.string('diMuons'), dataTier = cms.u...
27.133333
57
0.732187
import FWCore.ParameterSet.Config as cms from QCDAnalysis.Skimming.diMuonEventContent_cfi import * diMuonOutputModule = cms.OutputModule("PoolOutputModule", diMuonEventSelection, diMuonEventContent, dataset = cms.untracked.PSet( filterName = cms.untracked.string('diMuons'), dataTier = cms.u...
true
true
f752bc69572188791d98b120dc4ff5953d3c7aa7
1,619
py
Python
video_parallel_processing/ffmpeg_wrapper.py
dadus33/opencv-video-parallel
eb5765bc361161656e022262402390afca11d35f
[ "BSD-3-Clause" ]
null
null
null
video_parallel_processing/ffmpeg_wrapper.py
dadus33/opencv-video-parallel
eb5765bc361161656e022262402390afca11d35f
[ "BSD-3-Clause" ]
null
null
null
video_parallel_processing/ffmpeg_wrapper.py
dadus33/opencv-video-parallel
eb5765bc361161656e022262402390afca11d35f
[ "BSD-3-Clause" ]
1
2019-03-05T14:05:22.000Z
2019-03-05T14:05:22.000Z
import os import re import subprocess class FfmpegWrapper: length_frames_regex = r"frame *\= *(?P<frames>[\d\.]+).*" def __init__(self, ffmpeg_path): self.ffmpeg_path = ffmpeg_path @staticmethod def _read_lines(process): while True: process.stderr.flush() line...
32.38
105
0.610871
import os import re import subprocess class FfmpegWrapper: length_frames_regex = r"frame *\= *(?P<frames>[\d\.]+).*" def __init__(self, ffmpeg_path): self.ffmpeg_path = ffmpeg_path @staticmethod def _read_lines(process): while True: process.stderr.flush() line...
true
true
f752bdd1f32ccef9d81aa782593770a301b84a0f
672
py
Python
setup.py
xyproto/fnu
47e41824ab7ce7746637036d60cf37ac9f381a61
[ "MIT" ]
3
2020-03-11T21:18:55.000Z
2020-10-05T12:42:30.000Z
setup.py
xyproto/minitree
47e41824ab7ce7746637036d60cf37ac9f381a61
[ "MIT" ]
null
null
null
setup.py
xyproto/minitree
47e41824ab7ce7746637036d60cf37ac9f381a61
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys from setuptools import setup setup(name="minitree", version="0.4.1", description="List files in columns", url="https://github.com/xyproto/minitree", author="Alexander F. Rødseth", author_email="xyproto@archlinux.org", license="MIT", ...
24
51
0.541667
import os import sys from setuptools import setup setup(name="minitree", version="0.4.1", description="List files in columns", url="https://github.com/xyproto/minitree", author="Alexander F. Rødseth", author_email="xyproto@archlinux.org", license="MIT", py_modules=["mt"], ...
true
true
f752bdd6e8e00675fb025c05606b980f2f5cccd1
1,053
py
Python
tests/iptables.py
premandfriends/boardfarm-1
3c952c94507fff25ba9955cad993610ea4a95e2e
[ "BSD-3-Clause-Clear" ]
null
null
null
tests/iptables.py
premandfriends/boardfarm-1
3c952c94507fff25ba9955cad993610ea4a95e2e
[ "BSD-3-Clause-Clear" ]
1
2019-02-03T17:06:21.000Z
2019-02-03T17:06:21.000Z
tests/iptables.py
mgualco-contractor/boardfarm
6a033e5dc84c7368fdd8ec2738b08b35ca7b07e7
[ "BSD-3-Clause-Clear" ]
null
null
null
import rootfs_boot import os from devices import board class IPTablesDump(rootfs_boot.RootFSBootTest): '''Dumps all IPTables rules with stats''' def runTest(self): pp = board.get_pp_dev() with open(os.path.join(self.config.output_dir, 'iptables.log'), 'w') as ipt_log: for tbl in [...
31.909091
88
0.614435
import rootfs_boot import os from devices import board class IPTablesDump(rootfs_boot.RootFSBootTest): def runTest(self): pp = board.get_pp_dev() with open(os.path.join(self.config.output_dir, 'iptables.log'), 'w') as ipt_log: for tbl in ['filter', 'nat', 'mangle', 'raw', 'security']:...
true
true
f752bde3d2a1c434047bc3865c3ece5c90f41061
230
py
Python
utilities/utility_logger.py
th3h3d/bubil4s-tool-automation-v2
6741b98dc762d3cb7e8bbd263269bcea37e743a5
[ "MIT" ]
null
null
null
utilities/utility_logger.py
th3h3d/bubil4s-tool-automation-v2
6741b98dc762d3cb7e8bbd263269bcea37e743a5
[ "MIT" ]
null
null
null
utilities/utility_logger.py
th3h3d/bubil4s-tool-automation-v2
6741b98dc762d3cb7e8bbd263269bcea37e743a5
[ "MIT" ]
null
null
null
import time class UtilityLogger: @classmethod def log_this(cls, err_log): fo = open("./utilities/logs/{}.log".format(time.strftime("%Y%m%d", time.localtime())), "a") fo.write(err_log) fo.close()
20.909091
99
0.6
import time class UtilityLogger: @classmethod def log_this(cls, err_log): fo = open("./utilities/logs/{}.log".format(time.strftime("%Y%m%d", time.localtime())), "a") fo.write(err_log) fo.close()
true
true
f752bf4ac87d6747a498098da315ecfcb4e4e9c7
1,018
py
Python
python/cugraph/community/__init__.py
efajardo-nv/cugraph
39565d57f7a4ef71bd511fee1995c12f96b9c32d
[ "Apache-2.0" ]
null
null
null
python/cugraph/community/__init__.py
efajardo-nv/cugraph
39565d57f7a4ef71bd511fee1995c12f96b9c32d
[ "Apache-2.0" ]
null
null
null
python/cugraph/community/__init__.py
efajardo-nv/cugraph
39565d57f7a4ef71bd511fee1995c12f96b9c32d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
40.72
74
0.801572
from cugraph.community.louvain import louvain from cugraph.community.ecg import ecg from cugraph.community.spectral_clustering import ( spectralBalancedCutClustering, spectralModularityMaximizationClustering, analyzeClustering_modularity, analyzeClustering_edge_cut, analyzeClustering_ratio_cut ) fr...
true
true
f752bfd2aedf6e687e92a360def63fe1d50b82e8
8,476
py
Python
scripts/ulogme_serve.py
adamkw/uLogMe
08c12b2d1913fb71a7438a69a95345afd4c1cc1e
[ "MIT" ]
null
null
null
scripts/ulogme_serve.py
adamkw/uLogMe
08c12b2d1913fb71a7438a69a95345afd4c1cc1e
[ "MIT" ]
null
null
null
scripts/ulogme_serve.py
adamkw/uLogMe
08c12b2d1913fb71a7438a69a95345afd4c1cc1e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf8 -*- # ulogme_serve.py for https://github.com/Naereen/uLogMe/ # MIT Licensed, https://lbesson.mit-license.org/ # from __future__ import print_function # Python 2 compatibility from __future__ import absolute_import # Python 2 compatibility import sys import os import subproc...
44.145833
176
0.607362
from __future__ import print_function from __future__ import absolute_import import sys import os import subprocess import cgi import socket try: import socketserver except ImportError: import SocketServer as socketserver try: import http.server as http_server except ImportError: ...
true
true
f752c0bd44139130c3c0c316675544d890d7cf14
3,606
py
Python
tests/examples/minlplib/kall_congruentcircles_c51.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
2
2021-07-03T13:19:10.000Z
2022-02-06T10:48:13.000Z
tests/examples/minlplib/kall_congruentcircles_c51.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
1
2021-07-04T14:52:14.000Z
2021-07-15T10:17:11.000Z
tests/examples/minlplib/kall_congruentcircles_c51.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
null
null
null
# NLP written by GAMS Convert at 04/21/18 13:52:27 # # Equation counts # Total E G L N X C B # 34 2 10 22 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
33.700935
91
0.524681
from pyomo.environ import * model = m = ConcreteModel() m.x1 = Var(within=Reals,bounds=(0.25,32),initialize=0.25) m.x2 = Var(within=Reals,bounds=(0.5,7.5),initialize=0.5) m.x3 = Var(within=Reals,bounds=(0.5,3.5),initialize=0.5) m.x4 = Var(within=Reals,bounds=(0.5,7.5),initialize=0.5) m.x5 = Var(within=Reals,bounds...
true
true
f752c0ea513cf318d7f384255cd8acd341c617d9
446
py
Python
rminst/test.py
tuxzz/codebase
a7279a4b1e782811b12d4adc30f7381e7ed94b70
[ "Unlicense" ]
null
null
null
rminst/test.py
tuxzz/codebase
a7279a4b1e782811b12d4adc30f7381e7ed94b70
[ "Unlicense" ]
null
null
null
rminst/test.py
tuxzz/codebase
a7279a4b1e782811b12d4adc30f7381e7ed94b70
[ "Unlicense" ]
null
null
null
import core from common import * wX, sr = loadWav("x.wav") wY, sr = loadWav("y.wav") out = None for iChannel in range(wX.shape[1]): print("Ch", iChannel) x = wX.T[iChannel] y = wY.T[iChannel] processor = core.Processor(sr, [(0.208, 0.509), (14.579, 15.031)], method = "simple") o = processor(x, y...
21.238095
89
0.585202
import core from common import * wX, sr = loadWav("x.wav") wY, sr = loadWav("y.wav") out = None for iChannel in range(wX.shape[1]): print("Ch", iChannel) x = wX.T[iChannel] y = wY.T[iChannel] processor = core.Processor(sr, [(0.208, 0.509), (14.579, 15.031)], method = "simple") o = processor(x, y...
true
true
f752c19c9c4ac6ad6926b50f82cbb3c21e002228
888
py
Python
superlists/lists/tests.py
kentaro0919/obeythetestinggoat
631b8ffce3c9e5709fa4241a0c484d47af2f9352
[ "MIT" ]
null
null
null
superlists/lists/tests.py
kentaro0919/obeythetestinggoat
631b8ffce3c9e5709fa4241a0c484d47af2f9352
[ "MIT" ]
null
null
null
superlists/lists/tests.py
kentaro0919/obeythetestinggoat
631b8ffce3c9e5709fa4241a0c484d47af2f9352
[ "MIT" ]
null
null
null
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from lists.views import home_page class HomePageTest(TestCase): def test_root_url_resolves_to_home_page_view(self): found = resolve('/') ...
34.153846
67
0.721847
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from lists.views import home_page class HomePageTest(TestCase): def test_root_url_resolves_to_home_page_view(self): found = resolve('/') ...
true
true
f752c21ac580158ec36f4767bb2f38f0dfd5a768
881
py
Python
Products/PloneGlossary/content/__init__.py
collective/Products.PloneGlossary
ae040e0590040a23e20933e588324b9da222918e
[ "Unlicense" ]
null
null
null
Products/PloneGlossary/content/__init__.py
collective/Products.PloneGlossary
ae040e0590040a23e20933e588324b9da222918e
[ "Unlicense" ]
2
2016-03-02T10:45:42.000Z
2021-04-29T09:56:41.000Z
Products/PloneGlossary/content/__init__.py
collective/Products.PloneGlossary
ae040e0590040a23e20933e588324b9da222918e
[ "Unlicense" ]
2
2017-05-21T20:11:42.000Z
2019-08-22T13:13:09.000Z
# -*- coding: utf-8 -*- ## # Copyright (C) 2007 Ingeniweb # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This progr...
35.24
73
0.757094
import PloneGlossary import PloneGlossaryDefinition
true
true
f752c36d24357b015d3ef4166af6ba942cf033dc
2,829
py
Python
third_party/Paste/paste/debug/debugapp.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
third_party/Paste/paste/debug/debugapp.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
4,640
2015-07-08T16:19:08.000Z
2019-12-02T15:01:27.000Z
third_party/Paste/paste/debug/debugapp.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # (c) 2005 Clark C. Evans # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensource.org/licenses...
35.3625
84
0.582185
import time __all__ = ['SimpleApplication', 'SlowConsumer'] class SimpleApplication(object): def __call__(self, environ, start_response): body = b"<html><body>simple</body></html>" start_response("200 OK", [('Content-Type', 'text/html'), ('Content-Length', str(le...
true
true
f752c3771bb7aaf28a89fc1b13414bb0ea0b21ec
825
py
Python
cuppa/methods/filter.py
pwj58/cuppa
6c598a124c5aa52b459637ca1865cda2e2d300bd
[ "BSL-1.0" ]
25
2015-09-24T07:04:45.000Z
2022-02-19T03:31:03.000Z
cuppa/methods/filter.py
pwj58/cuppa
6c598a124c5aa52b459637ca1865cda2e2d300bd
[ "BSL-1.0" ]
46
2015-05-20T12:48:12.000Z
2022-01-10T10:38:55.000Z
cuppa/methods/filter.py
pwj58/cuppa
6c598a124c5aa52b459637ca1865cda2e2d300bd
[ "BSL-1.0" ]
13
2015-07-12T09:55:03.000Z
2021-07-02T15:32:12.000Z
# Copyright Jamie Allsop 2016-2017 # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) #------------------------------------------------------------------------------- # FilterMethod #----------...
30.555556
80
0.563636
import cuppa.utility import cuppa.progress from cuppa.utility.filter import filter_nodes class FilterMethod: def __call__( self, env, nodes, match, exclude=None ): filtered_nodes = filter_nodes( nodes, match, exclude ) cuppa.progress.NotifyProgress.add( env, filtered_nodes ) return fil...
true
true
f752c3eb4038888dd254a450026750f5859aa7ba
867
py
Python
pyEX/_version.py
vishalbelsare/pyEX
254acd2b0cf7cb7183100106f4ecc11d1860c46a
[ "Apache-2.0" ]
107
2021-03-05T05:18:34.000Z
2022-03-30T22:25:13.000Z
pyEX/_version.py
vishalbelsare/pyEX
254acd2b0cf7cb7183100106f4ecc11d1860c46a
[ "Apache-2.0" ]
112
2021-03-05T03:41:21.000Z
2021-12-01T03:24:22.000Z
pyEX/_version.py
vishalbelsare/pyEX
254acd2b0cf7cb7183100106f4ecc11d1860c46a
[ "Apache-2.0" ]
37
2021-03-04T18:32:09.000Z
2022-03-24T02:20:12.000Z
# ***************************************************************************** # # Copyright (c) 2020, the pyEX authors. # # This file is part of the pyEX library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # from collections import namedtuple VersionI...
29.896552
84
0.595156
from collections import namedtuple VersionInfo = namedtuple( "VersionInfo", ["major", "minor", "micro", "releaselevel", "serial"] ) version_info = VersionInfo(0, 6, 0, "candidate", 0) _specifier_ = {"alpha": "a", "beta": "b", "candidate": "rc", "final": ""} __version__ = "{}.{}.{}{}".format( version_info.ma...
true
true
f752c6326ccfbcf62307c7d0289af73510258f7b
25
py
Python
python_practice/thread/__init__.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
python_practice/thread/__init__.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
python_practice/thread/__init__.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
__author__ = 'xubinggui'
12.5
24
0.76
__author__ = 'xubinggui'
true
true