hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c34679bf1e7909cfa7290e79c3a1b6a773fcca3
1,227
py
Python
MultiAnalysis/lexical-analysis.py
Aczy156/compiler-theory-algorithm
fb8ab65a1315fb206bfa788038dbc61a96957ec9
[ "MIT" ]
6
2020-12-15T18:37:58.000Z
2021-09-27T13:47:39.000Z
MultiAnalysis/lexical-analysis.py
Aczy156/Compiling-Principle-Work
fb8ab65a1315fb206bfa788038dbc61a96957ec9
[ "MIT" ]
null
null
null
MultiAnalysis/lexical-analysis.py
Aczy156/Compiling-Principle-Work
fb8ab65a1315fb206bfa788038dbc61a96957ec9
[ "MIT" ]
3
2020-06-22T05:33:38.000Z
2020-07-20T13:54:05.000Z
import re # valid token token_dict = { 'int': 1, 'double': 1, 'string': 1, 'if': 1, 'else': 1, 'return': 1, 'main': 1, 'void': 1, 'while': 1, 'for': 1, 'break': 1, '+': 4, '-': 4, '*': 4, '/': 4, '<': 4, '>': 4, '=': 4, '==': 4, ',': 5, ';': 5, '(': 5, ')': 5, '{': 5, } # invalid token invalid_token =...
24.54
116
0.431948
import re token_dict = { 'int': 1, 'double': 1, 'string': 1, 'if': 1, 'else': 1, 'return': 1, 'main': 1, 'void': 1, 'while': 1, 'for': 1, 'break': 1, '+': 4, '-': 4, '*': 4, '/': 4, '<': 4, '>': 4, '=': 4, '==': 4, ',': 5, ';': 5, '(': 5, ')': 5, '{': 5, } invalid_token = [',', ';', '!', '(', ')'] d...
true
true
1c3467f60c4ad981307c06f1b929e3d0ecb18b38
37,402
py
Python
pkgs/conf-pkg/src/genie/libs/conf/rip/nxos/tests/test_rip.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/conf-pkg/src/genie/libs/conf/rip/nxos/tests/test_rip.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/conf-pkg/src/genie/libs/conf/rip/nxos/tests/test_rip.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
#!/usr/bin/env python # Import unittest module import unittest from unittest.mock import Mock from pyats.datastructures import WeakList # And import what's needed from genie.tests.conf import TestCase from genie.conf import Genie from genie.conf.base import Testbed, Device, Link, Interface from genie.conf.base.attri...
40.044968
115
0.594273
import unittest from unittest.mock import Mock from pyats.datastructures import WeakList from genie.tests.conf import TestCase from genie.conf import Genie from genie.conf.base import Testbed, Device, Link, Interface from genie.conf.base.attributes import SubAttributesDict from genie.libs.conf.rip import Rip from g...
true
true
1c34696f1cfdec0956bb16ca716e88db0d45eff0
45
py
Python
agescx/utilities/__init__.py
dderevjanik/agescx
32e1b11c7c4205a63a156b0014ec7143c0d0c13b
[ "MIT" ]
15
2016-02-08T19:35:46.000Z
2021-11-24T06:52:04.000Z
agescx/utilities/__init__.py
heinezen/agescx
32e1b11c7c4205a63a156b0014ec7143c0d0c13b
[ "MIT" ]
1
2016-01-03T02:54:46.000Z
2016-01-03T02:54:46.000Z
agescx/utilities/__init__.py
heinezen/agescx
32e1b11c7c4205a63a156b0014ec7143c0d0c13b
[ "MIT" ]
5
2016-10-05T03:55:29.000Z
2021-05-14T10:15:57.000Z
from .decoder import * from .encoder import *
22.5
22
0.755556
from .decoder import * from .encoder import *
true
true
1c3469fafd50acdfdbefde198aacc4a1c9a4969b
5,482
py
Python
model/densenet169/model3_val1.py
wan-h/JD-AI-Fashion-Challenge
817f693672f418745e3a4c89a0417a3165b08130
[ "MIT" ]
3
2018-05-06T15:15:21.000Z
2018-05-13T12:31:42.000Z
model/densenet169/model3_val1.py
wan-h/JD-AI-Fashion-Challenge
817f693672f418745e3a4c89a0417a3165b08130
[ "MIT" ]
null
null
null
model/densenet169/model3_val1.py
wan-h/JD-AI-Fashion-Challenge
817f693672f418745e3a4c89a0417a3165b08130
[ "MIT" ]
null
null
null
import math import os import queue import time import keras from keras.layers import Dense, BatchNormalization, Activation import config from util import data_loader from util import keras_util from util.keras_util import KerasModelConfig model_config = KerasModelConfig(k_fold_file="1.txt", ...
48.513274
119
0.541955
import math import os import queue import time import keras from keras.layers import Dense, BatchNormalization, Activation import config from util import data_loader from util import keras_util from util.keras_util import KerasModelConfig model_config = KerasModelConfig(k_fold_file="1.txt", ...
true
true
1c346a04d5deace26f5d13429cd06afeab172022
1,196
py
Python
tests/formatters/winlnk.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
27
2019-04-05T12:01:49.000Z
2022-02-08T02:26:25.000Z
tests/formatters/winlnk.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
null
null
null
tests/formatters/winlnk.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
8
2019-11-28T08:06:34.000Z
2020-08-29T13:53:30.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Windows Shortcut (LNK) event formatter.""" from __future__ import unicode_literals import unittest from plaso.formatters import winlnk from tests.formatters import test_lib class WinLnkLinkFormatterTest(test_lib.EventFormatterTestCase): """Tests fo...
29.170732
73
0.736622
from __future__ import unicode_literals import unittest from plaso.formatters import winlnk from tests.formatters import test_lib class WinLnkLinkFormatterTest(test_lib.EventFormatterTestCase): def testInitialization(self): event_formatter = winlnk.WinLnkLinkFormatter() self.assertIsNotNone(event_forma...
true
true
1c346c37b76708e41519df306a01018e1fdc6a4c
59,987
py
Python
pygments/lexers/_mapping.py
eric-wieser/pygments
97dce6024f82402916c8212172180227630b9fdb
[ "BSD-2-Clause" ]
null
null
null
pygments/lexers/_mapping.py
eric-wieser/pygments
97dce6024f82402916c8212172180227630b9fdb
[ "BSD-2-Clause" ]
null
null
null
pygments/lexers/_mapping.py
eric-wieser/pygments
97dce6024f82402916c8212172180227630b9fdb
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ pygments.lexers._mapping ~~~~~~~~~~~~~~~~~~~~~~~~ Lexer mapping definitions. This file is generated by itself. Everytime you change something on a builtin lexer definition, run this script from the lexers folder to update it. Do not alter the LEXERS dictionary by ha...
109.265938
351
0.577975
LEXERS = { 'ABAPLexer': ('pygments.lexers.business', 'ABAP', ('abap',), ('*.abap', '*.ABAP'), ('text/x-abap',)), 'APLLexer': ('pygments.lexers.apl', 'APL', ('apl',), ('*.apl',), ()), 'AbnfLexer': ('pygments.lexers.grammar_notation', 'ABNF', ('abnf',), ('*.abnf',), ('text/x-abnf',)), 'ActionScript3Lexer...
true
true
1c346ccbc2ec03e804b8690df4aaf5a79f452a53
4,003
py
Python
torchtext/datasets/multi30k.py
abhinavarora/text
69f67f3a775f3d3c6f85cfaa4ac3819500b90696
[ "BSD-3-Clause" ]
1
2022-01-03T17:30:57.000Z
2022-01-03T17:30:57.000Z
torchtext/datasets/multi30k.py
abhinavarora/text
69f67f3a775f3d3c6f85cfaa4ac3819500b90696
[ "BSD-3-Clause" ]
null
null
null
torchtext/datasets/multi30k.py
abhinavarora/text
69f67f3a775f3d3c6f85cfaa4ac3819500b90696
[ "BSD-3-Clause" ]
null
null
null
import os from typing import Union, Tuple from torchtext._internal.module_utils import is_module_available from torchtext.data.datasets_utils import ( _wrap_split_argument, _create_dataset_directory, ) if is_module_available("torchdata"): from torchdata.datapipes.iter import FileOpener, HttpReader, Iterab...
36.390909
120
0.697977
import os from typing import Union, Tuple from torchtext._internal.module_utils import is_module_available from torchtext.data.datasets_utils import ( _wrap_split_argument, _create_dataset_directory, ) if is_module_available("torchdata"): from torchdata.datapipes.iter import FileOpener, HttpReader, Iterab...
true
true
1c346ccc639aafba00553b5a8aedab756185ab64
523
py
Python
neuroscout/schemas/run.py
jdkent/neuroscout
67aaafdf883988e2048197dc9ce4559a28e3b7b6
[ "BSD-3-Clause" ]
null
null
null
neuroscout/schemas/run.py
jdkent/neuroscout
67aaafdf883988e2048197dc9ce4559a28e3b7b6
[ "BSD-3-Clause" ]
null
null
null
neuroscout/schemas/run.py
jdkent/neuroscout
67aaafdf883988e2048197dc9ce4559a28e3b7b6
[ "BSD-3-Clause" ]
null
null
null
from marshmallow import fields, Schema class RunSchema(Schema): id = fields.Int() session = fields.Str(description='Session number') acquisition = fields.Str(description='Acquisition') subject = fields.Str(description='Subject id') number = fields.Int(description='Run id') duration = fields.Nu...
37.357143
74
0.705545
from marshmallow import fields, Schema class RunSchema(Schema): id = fields.Int() session = fields.Str(description='Session number') acquisition = fields.Str(description='Acquisition') subject = fields.Str(description='Subject id') number = fields.Int(description='Run id') duration = fields.Nu...
true
true
1c346d4bffe12f88b08655315c1a9c1a84f8d177
3,207
py
Python
Python Code/Wh_manage-master/Wh_manage-master/wh_manage/wh_manage/settings.py
AkashKV-1998/Warehouse-Management-System
33d96c52064262156ddcd459a36e2f63d4df2c30
[ "Apache-2.0" ]
3
2021-09-05T16:09:58.000Z
2022-03-25T14:32:34.000Z
Python Code/Wh_manage-master/Wh_manage-master/wh_manage/wh_manage/settings.py
AkashKV-1998/Warehouse-Management-System
33d96c52064262156ddcd459a36e2f63d4df2c30
[ "Apache-2.0" ]
null
null
null
Python Code/Wh_manage-master/Wh_manage-master/wh_manage/wh_manage/settings.py
AkashKV-1998/Warehouse-Management-System
33d96c52064262156ddcd459a36e2f63d4df2c30
[ "Apache-2.0" ]
null
null
null
""" Django settings for Warehouse_management project. Generated by 'django-admin startproject' using Django 1.11.29. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ ...
25.251969
91
0.691612
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'h1x!iw)3+3pm9#(u(1i&gnzz$5pf(cqtdxh4)=oc(i6mpvel1x' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
1c346d5c9d8f8b214e1fb56b7cc527962c4a55ce
428
py
Python
losses/loss_utils.py
kevinleestone/mmstereo
6757847000ed19cce607ce7537f2f38eed305cdd
[ "MIT" ]
null
null
null
losses/loss_utils.py
kevinleestone/mmstereo
6757847000ed19cce607ce7537f2f38eed305cdd
[ "MIT" ]
null
null
null
losses/loss_utils.py
kevinleestone/mmstereo
6757847000ed19cce607ce7537f2f38eed305cdd
[ "MIT" ]
null
null
null
# Copyright 2021 Toyota Research Institute. All rights reserved. import torch import torch.nn.functional as F def null_loss(): return None, False def dummy_loss(tensor): tensor[torch.isnan(tensor)] = 0.0 return F.mse_loss(tensor, torch.zeros_like(tensor)) * 0.0, False def valid_loss(tensor): if ...
20.380952
68
0.698598
import torch import torch.nn.functional as F def null_loss(): return None, False def dummy_loss(tensor): tensor[torch.isnan(tensor)] = 0.0 return F.mse_loss(tensor, torch.zeros_like(tensor)) * 0.0, False def valid_loss(tensor): if not torch.any(torch.isnan(tensor)): return tensor, True ...
true
true
1c346daf5b5dda3bfe5c92e80639f17d67137efc
1,275
py
Python
setup.py
bradleycwojcik/euchre-cli
e4ffcdb16720d8dafe6b5b00b50eb923c1fcfe27
[ "MIT" ]
3
2020-10-07T08:23:12.000Z
2021-11-20T16:33:40.000Z
setup.py
bradleycwojcik/euchre-cli
e4ffcdb16720d8dafe6b5b00b50eb923c1fcfe27
[ "MIT" ]
28
2020-07-14T01:29:33.000Z
2021-11-20T04:48:09.000Z
setup.py
boldandbrad/euchre-cli
6e03f76c5feb50d677ab2558707182fa7dd5d127
[ "MIT" ]
4
2020-09-07T04:25:04.000Z
2021-11-11T07:20:01.000Z
from setuptools import setup, find_packages # parse version number from euchre/__init__.py: with open("euchre/__init__.py") as f: info = {} for line in f.readlines(): if line.startswith("version"): exec(line, info) break setup_info = dict( name="euchre-cli", version=inf...
31.097561
88
0.630588
from setuptools import setup, find_packages with open("euchre/__init__.py") as f: info = {} for line in f.readlines(): if line.startswith("version"): exec(line, info) break setup_info = dict( name="euchre-cli", version=info["version"], author="Bradley Wojcik", a...
true
true
1c346df455707f69e3f5aae30b421c4f65357cdb
6,382
py
Python
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/4-extending_bound_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/4-extending_bound_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/4-extending_bound_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_mak...
37.763314
89
0.629583
from typing import Tuple, FrozenSet from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_mak...
true
true
1c346f4f180311b92db628086017ec37d9afda89
181,096
py
Python
wagtail/core/models/__init__.py
swilltec/wagtail
7e41ee8706caa65d94b0c59676a7f614bb9ae4d1
[ "BSD-3-Clause" ]
null
null
null
wagtail/core/models/__init__.py
swilltec/wagtail
7e41ee8706caa65d94b0c59676a7f614bb9ae4d1
[ "BSD-3-Clause" ]
null
null
null
wagtail/core/models/__init__.py
swilltec/wagtail
7e41ee8706caa65d94b0c59676a7f614bb9ae4d1
[ "BSD-3-Clause" ]
null
null
null
""" wagtail.core.models is split into submodules for maintainability. All definitions intended as public should be imported here (with 'noqa' comments as required) and outside code should continue to import them from wagtail.core.models (e.g. `from wagtail.core.models import Site`, not `from wagtail.core.models.sites i...
40.163229
278
0.631461
import functools import json import logging import uuid from io import StringIO from urllib.parse import urlparse from django import forms from django.apps import apps from django.conf import settings from django.contrib.auth.models import Group from django.contrib.contenttypes.models import ContentType from django....
true
true
1c346f8c3402e5acc7704116e8651576d52dd5b9
141
py
Python
glim_extensions/db/utils.py
aacanakin/glim-extensions
75cf1e857abd717645db85f273650c0d883c55f2
[ "MIT" ]
2
2015-01-06T19:21:44.000Z
2019-06-14T13:04:51.000Z
glim_extensions/db/utils.py
aacanakin/glim-extensions
75cf1e857abd717645db85f273650c0d883c55f2
[ "MIT" ]
2
2015-02-20T07:40:47.000Z
2015-02-20T07:44:42.000Z
glim_extensions/db/utils.py
aacanakin/glim-extensions
75cf1e857abd717645db85f273650c0d883c55f2
[ "MIT" ]
null
null
null
import os def touch(path): fhandle = open(path, 'a') try: os.utime(path, None) finally: fhandle.close() return os.path.isfile(path)
14.1
28
0.673759
import os def touch(path): fhandle = open(path, 'a') try: os.utime(path, None) finally: fhandle.close() return os.path.isfile(path)
true
true
1c34700a448f47b1743fd71647ab3fbfaa3323ec
2,400
py
Python
test.py
speedcell4/pytorch-noreward-rl
b889d78b7b2115feb80198c90e75e35956eae284
[ "MIT" ]
null
null
null
test.py
speedcell4/pytorch-noreward-rl
b889d78b7b2115feb80198c90e75e35956eae284
[ "MIT" ]
null
null
null
test.py
speedcell4/pytorch-noreward-rl
b889d78b7b2115feb80198c90e75e35956eae284
[ "MIT" ]
null
null
null
import pickle import time from collections import deque import torch import torch.nn.functional as F from torch.autograd import Variable import env_wrapper from model import ActorCritic def test(rank, args, shared_model): torch.manual_seed(args.seed + rank) env = env_wrapper.create_doom(args.record, outdir=...
30
91
0.585833
import pickle import time from collections import deque import torch import torch.nn.functional as F from torch.autograd import Variable import env_wrapper from model import ActorCritic def test(rank, args, shared_model): torch.manual_seed(args.seed + rank) env = env_wrapper.create_doom(args.record, outdir=...
true
true
1c3470d827c40a69d453b9d1c08c8a9036f3fde5
703
py
Python
benchmarks/benchmark_msgpackrpc.py
brglng/aiorpc
575a898e54e61cd73ec5cf2b48348e70cfaa5b41
[ "WTFPL" ]
66
2016-10-17T19:16:44.000Z
2022-02-26T01:10:06.000Z
benchmarks/benchmark_msgpackrpc.py
webclinic017/aiorpc
a46929d70f17a6a98ee8f071012656f57bcd073b
[ "WTFPL" ]
25
2018-05-13T03:14:43.000Z
2022-03-03T03:29:04.000Z
benchmarks/benchmark_msgpackrpc.py
webclinic017/aiorpc
a46929d70f17a6a98ee8f071012656f57bcd073b
[ "WTFPL" ]
20
2017-09-13T17:04:21.000Z
2022-02-03T12:26:25.000Z
# -*- coding: utf-8 -*- import time import msgpackrpc import multiprocessing NUM_CALLS = 10000 def run_sum_server(): class SumServer(object): def sum(self, x, y): return x + y server = msgpackrpc.Server(SumServer()) server.listen(msgpackrpc.Address("localhost", 6000)) server.star...
19
69
0.633001
import time import msgpackrpc import multiprocessing NUM_CALLS = 10000 def run_sum_server(): class SumServer(object): def sum(self, x, y): return x + y server = msgpackrpc.Server(SumServer()) server.listen(msgpackrpc.Address("localhost", 6000)) server.start() def call(): cl...
true
true
1c34723774ef88f3e523e0d9e0ebd06168f81247
4,183
py
Python
nypdbot/dotplacer.py
artdent/nypdbot
6b2cc459aa9fa326dbb5297836eb6b3e92e53397
[ "Apache-2.0" ]
null
null
null
nypdbot/dotplacer.py
artdent/nypdbot
6b2cc459aa9fa326dbb5297836eb6b3e92e53397
[ "Apache-2.0" ]
null
null
null
nypdbot/dotplacer.py
artdent/nypdbot
6b2cc459aa9fa326dbb5297836eb6b3e92e53397
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Jacob Lee. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
36.373913
79
0.593354
import cgi import tempfile import pygraphviz as pgv _TABLE_HTML = """< <table cellspacing="0" cellborder="0"> <tr>%s</tr> <tr><td colspan="%d">%s</td></tr> <tr>%s</tr> </table> >""" class DotPlacer(object): def __init__(self): self.node_id = 0 self.node_names = {} self.graph = pgv.A...
true
true
1c3473d2b9d25fbb8ba2ff4fdf3423f69a3d79d6
369
py
Python
pkg/auth/schema.py
Krishap-s/Encrypt-Everywhere
cf1f6f32b856685e3d29679dbf66e20876d30313
[ "MIT" ]
null
null
null
pkg/auth/schema.py
Krishap-s/Encrypt-Everywhere
cf1f6f32b856685e3d29679dbf66e20876d30313
[ "MIT" ]
null
null
null
pkg/auth/schema.py
Krishap-s/Encrypt-Everywhere
cf1f6f32b856685e3d29679dbf66e20876d30313
[ "MIT" ]
null
null
null
from pydantic import BaseModel, EmailStr class AddUserSchema(BaseModel): name:str email:EmailStr salt:str encrypted_master_password:str derived_key:str class SignInSchema(BaseModel): email:EmailStr derived_key:str class GetUserSchema(BaseModel): _id:str name:str email:EmailStr...
18.45
40
0.739837
from pydantic import BaseModel, EmailStr class AddUserSchema(BaseModel): name:str email:EmailStr salt:str encrypted_master_password:str derived_key:str class SignInSchema(BaseModel): email:EmailStr derived_key:str class GetUserSchema(BaseModel): _id:str name:str email:EmailStr...
true
true
1c34748d620a653ca09649749f7210e101fd1278
1,234
py
Python
allennlp/training/metrics/average.py
MSLars/allennlp
2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475
[ "Apache-2.0" ]
1
2022-01-06T02:06:23.000Z
2022-01-06T02:06:23.000Z
allennlp/training/metrics/average.py
MSLars/allennlp
2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475
[ "Apache-2.0" ]
52
2020-11-11T13:08:25.000Z
2021-12-16T13:04:30.000Z
allennlp/training/metrics/average.py
MSLars/allennlp
2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475
[ "Apache-2.0" ]
null
null
null
from allennlp.training.metrics.metric import Metric from allennlp.nn.util import dist_reduce_sum @Metric.register("average") class Average(Metric): """ This [`Metric`](./metric.md) breaks with the typical `Metric` API and just stores values that were computed in some fashion outside of a `Metric`. If you...
28.697674
102
0.622366
from allennlp.training.metrics.metric import Metric from allennlp.nn.util import dist_reduce_sum @Metric.register("average") class Average(Metric): def __init__(self) -> None: self._total_value = 0.0 self._count = 0 def __call__(self, value): self._count += dist_reduce_sum(1) ...
true
true
1c3474e689134df0fd4ac4bf9c158084911a2b25
12,265
py
Python
inference-engine/ie_bridges/python/tests/test_IENetwork.py
NikDemoShow/openvino
31907e51e96f1603753dc69811bdf738374ca5e6
[ "Apache-2.0" ]
1
2022-02-10T08:05:09.000Z
2022-02-10T08:05:09.000Z
inference-engine/ie_bridges/python/tests/test_IENetwork.py
NikDemoShow/openvino
31907e51e96f1603753dc69811bdf738374ca5e6
[ "Apache-2.0" ]
105
2020-06-04T00:23:29.000Z
2022-02-21T13:04:33.000Z
inference-engine/ie_bridges/python/tests/test_IENetwork.py
NikDemoShow/openvino
31907e51e96f1603753dc69811bdf738374ca5e6
[ "Apache-2.0" ]
3
2021-04-25T06:52:41.000Z
2021-05-07T02:01:44.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import pytest import warnings from openvino.inference_engine import IECore, IENetwork, DataPtr, InputInfoPtr, PreProcessInfo from conftest import model_path test_net_xml, test_net_bin = model_path() def test_create_ie_netw...
39.310897
106
0.613208
import os import pytest import warnings from openvino.inference_engine import IECore, IENetwork, DataPtr, InputInfoPtr, PreProcessInfo from conftest import model_path test_net_xml, test_net_bin = model_path() def test_create_ie_network_deprecated(): with warnings.catch_warnings(record=True) as w: net ...
true
true
1c34782fa214c3c817dce5a5206ad0051feb3f7b
5,311
py
Python
pettingzoo/classic/tictactoe/tictactoe.py
AbhijeetKrishnan/PettingZoo
d1a68923cef108b92012bfaaf2f083c839213d9f
[ "Apache-2.0" ]
1
2021-05-27T05:30:10.000Z
2021-05-27T05:30:10.000Z
pettingzoo/classic/tictactoe/tictactoe.py
AbhijeetKrishnan/PettingZoo
d1a68923cef108b92012bfaaf2f083c839213d9f
[ "Apache-2.0" ]
null
null
null
pettingzoo/classic/tictactoe/tictactoe.py
AbhijeetKrishnan/PettingZoo
d1a68923cef108b92012bfaaf2f083c839213d9f
[ "Apache-2.0" ]
null
null
null
from pettingzoo import AECEnv from pettingzoo.utils import agent_selector from gym import spaces import numpy as np import warnings from pettingzoo.utils import wrappers from .board import Board def env(): env = raw_env() env = wrappers.CaptureStdoutWrapper(env) env = wrappers.TerminateIllegalWrapper(en...
35.172185
113
0.548296
from pettingzoo import AECEnv from pettingzoo.utils import agent_selector from gym import spaces import numpy as np import warnings from pettingzoo.utils import wrappers from .board import Board def env(): env = raw_env() env = wrappers.CaptureStdoutWrapper(env) env = wrappers.TerminateIllegalWrapper(en...
true
true
1c3478685033008557db52af634886c3a839281b
12,397
py
Python
src/oci/bds/models/bds_metastore_configuration.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/bds/models/bds_metastore_configuration.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/bds/models/bds_metastore_configuration.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
36.037791
245
0.674034
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class BdsMetastoreConfiguration(object): METASTORE_TYPE_LOCAL = "LOCAL" METASTORE_TYPE_EXTERNAL = "EXTERNAL" ...
true
true
1c3478bbe14778e56f347b0fc81f273cc23619f8
37,447
py
Python
run_classifier.py
kunde122/bert
def0a6534b77de915c5d39b2ffd05fd19ac3f2f2
[ "Apache-2.0" ]
null
null
null
run_classifier.py
kunde122/bert
def0a6534b77de915c5d39b2ffd05fd19ac3f2f2
[ "Apache-2.0" ]
null
null
null
run_classifier.py
kunde122/bert
def0a6534b77de915c5d39b2ffd05fd19ac3f2f2
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
35.194549
82
0.681603
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import csv import os import modeling import optimization import tokenization import tensorflow as tf flags = tf.flags FLAGS = flags.FLAGS flags.DEFINE_string( "data_dir", None, "T...
true
true
1c34792b7c909732c8e6e2de13ded7b83a1de10b
35,897
py
Python
scripts/bicorr_plot.py
pfschus/fission_bicorrelation
103d1d6e93f722c73e33a9af773dd7ebbf4c6f25
[ "MIT" ]
1
2018-02-26T00:40:29.000Z
2018-02-26T00:40:29.000Z
scripts/bicorr_plot.py
pfschus/fission_bicorrelation
103d1d6e93f722c73e33a9af773dd7ebbf4c6f25
[ "MIT" ]
null
null
null
scripts/bicorr_plot.py
pfschus/fission_bicorrelation
103d1d6e93f722c73e33a9af773dd7ebbf4c6f25
[ "MIT" ]
null
null
null
""" Plotting functions for Bicorr project Moving them here to keep the bicorr.py file cleaner PFS, March 2018 Changelog: 2018_03_15: Move a few functions here """ import matplotlib #matplotlib.use('agg') # for flux import matplotlib.pyplot as plt from matplotlib import rcParams from matplotlib.pyplot import cm fro...
35.682903
162
0.608853
import matplotlib import matplotlib.pyplot as plt from matplotlib import rcParams from matplotlib.pyplot import cm from matplotlib.ticker import (MultipleLocator, FormatStrFormatter, AutoMinorLocator) import seaborn as sns sns.set(style='ticks') import sys import os import os.path import scipy.io as sio import time...
true
true
1c3479b242c45478096faa4c288a0868f284cab4
960
py
Python
ICHSACTF2021/Crypto/Baby_Homework.py
yl-ang/CTF
a075231a3dc32630a26f3b2d4dfc1dd9b9f1e0b9
[ "MIT" ]
null
null
null
ICHSACTF2021/Crypto/Baby_Homework.py
yl-ang/CTF
a075231a3dc32630a26f3b2d4dfc1dd9b9f1e0b9
[ "MIT" ]
null
null
null
ICHSACTF2021/Crypto/Baby_Homework.py
yl-ang/CTF
a075231a3dc32630a26f3b2d4dfc1dd9b9f1e0b9
[ "MIT" ]
3
2021-06-28T09:52:07.000Z
2021-09-22T03:28:40.000Z
# AES ECB -- One byte at a time attack from pwn import * def main(data): host = 'baby_homework.ichsa.ctf.today' port = 8010 t = remote(host, port) t.sendline(data) t.recvuntil("Hello! What do you want to encrypt today?\n") a = t.recvline()[36:38] return a if __name__ == '__main__': ...
26.666667
62
0.496875
from pwn import * def main(data): host = 'baby_homework.ichsa.ctf.today' port = 8010 t = remote(host, port) t.sendline(data) t.recvuntil("Hello! What do you want to encrypt today?\n") a = t.recvline()[36:38] return a if __name__ == '__main__': flag ="d0n7_7ruzt_DeF4uL7_V4lu3...
true
true
1c3479bd4399e34cb2e02d3a0bdb6bf445aa0d20
2,367
py
Python
compressor/utils/__init__.py
gatherhealth/django-compressor
2eea7b1a71855cfc8e44f12301d85057f2bb70e6
[ "Apache-2.0" ]
10
2016-09-14T21:58:51.000Z
2019-01-28T21:56:37.000Z
compressor/utils/__init__.py
gatherhealth/django-compressor
2eea7b1a71855cfc8e44f12301d85057f2bb70e6
[ "Apache-2.0" ]
6
2020-06-05T18:44:19.000Z
2022-01-13T00:48:56.000Z
compressor/utils/__init__.py
gatherhealth/django-compressor
2eea7b1a71855cfc8e44f12301d85057f2bb70e6
[ "Apache-2.0" ]
1
2020-10-01T04:11:41.000Z
2020-10-01T04:11:41.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.utils import six from compressor.exceptions import FilterError def get_class(class_string, exception=FilterError): """ Convert a string version of a function name to the callable object. """ if not hasattr(class_st...
31.986486
83
0.634981
from __future__ import unicode_literals import os from django.utils import six from compressor.exceptions import FilterError def get_class(class_string, exception=FilterError): if not hasattr(class_string, '__bases__'): try: class_string = str(class_string) mod_name, class_name =...
true
true
1c347a5748f1cbdeca0be005d1cc1b785ac0a408
1,305
py
Python
tools/perf/measurements/skpicture_printer_unittest.py
google-ar/chromium
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
777
2017-08-29T15:15:32.000Z
2022-03-21T05:29:41.000Z
tools/perf/measurements/skpicture_printer_unittest.py
harrymarkovskiy/WebARonARCore
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
66
2017-08-30T18:31:18.000Z
2021-08-02T10:59:35.000Z
tools/perf/measurements/skpicture_printer_unittest.py
harrymarkovskiy/WebARonARCore
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
123
2017-08-30T01:19:34.000Z
2022-03-17T22:55:31.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import shutil import tempfile from telemetry import decorators from telemetry.testing import options_for_unittests from telemetry.testing import page_test_t...
33.461538
75
0.783908
import shutil import tempfile from telemetry import decorators from telemetry.testing import options_for_unittests from telemetry.testing import page_test_test_case from measurements import skpicture_printer class SkpicturePrinterUnitTest(page_test_test_case.PageTestTestCase): def setUp(self): self._options...
true
true
1c347aeb2574f0b090ef4fa205fee79639bf5b68
1,312
py
Python
Semana8/Vehiculos/controllers/vehiculo.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
null
null
null
Semana8/Vehiculos/controllers/vehiculo.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
40
2021-03-10T16:58:17.000Z
2022-03-26T01:55:17.000Z
Semana8/Vehiculos/controllers/vehiculo.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
null
null
null
from flask_restful import Resource, reqparse from Vehiculos.models.vehiculo import VehiculoModel class Vehiculo(Resource): parser = reqparse.RequestParser() parser.add_argument( 'marca_vehiculo', type= str, required = True, help = "Falta la marca_vehiculo" ) ...
29.818182
101
0.586128
from flask_restful import Resource, reqparse from Vehiculos.models.vehiculo import VehiculoModel class Vehiculo(Resource): parser = reqparse.RequestParser() parser.add_argument( 'marca_vehiculo', type= str, required = True, help = "Falta la marca_vehiculo" ) ...
true
true
1c347af37a69df9363c6020ad91cc40569857713
323
py
Python
vulcan/builder/__init__.py
exrny/vulcan-builder
b0b397202e2a82acc2794a01fc2029e61f411f1c
[ "MIT" ]
null
null
null
vulcan/builder/__init__.py
exrny/vulcan-builder
b0b397202e2a82acc2794a01fc2029e61f411f1c
[ "MIT" ]
null
null
null
vulcan/builder/__init__.py
exrny/vulcan-builder
b0b397202e2a82acc2794a01fc2029e61f411f1c
[ "MIT" ]
null
null
null
''' Lightweight Python Build Tool ''' from vulcan.builder.common import nsh, dump, dumps, safe_cd from ._vb import task, async_task, main import sh import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) __all__ = [ 'task', 'async_task', 'main', 'nsh', 'sh', 'dump', 'dumps', 'safe_cd' ...
17
59
0.662539
from vulcan.builder.common import nsh, dump, dumps, safe_cd from ._vb import task, async_task, main import sh import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) __all__ = [ 'task', 'async_task', 'main', 'nsh', 'sh', 'dump', 'dumps', 'safe_cd' ]
true
true
1c347b4c2c1741836278dc153755824a8a53fc7f
6,954
py
Python
sdk/python/kubeflow/training/models/v1_tf_job_spec.py
pingsutw/tf-operator
abfecef0ac5d84ba62705de556f392e9b6f60027
[ "Apache-2.0" ]
null
null
null
sdk/python/kubeflow/training/models/v1_tf_job_spec.py
pingsutw/tf-operator
abfecef0ac5d84ba62705de556f392e9b6f60027
[ "Apache-2.0" ]
null
null
null
sdk/python/kubeflow/training/models/v1_tf_job_spec.py
pingsutw/tf-operator
abfecef0ac5d84ba62705de556f392e9b6f60027
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ tensorflow Python SDK for tensorflow # noqa: E501 The version of the OpenAPI document: v1.3.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from kubeflow.training.configuration import Configuration class V1TFJobSpec(object...
33.594203
190
0.628415
import pprint import re import six from kubeflow.training.configuration import Configuration class V1TFJobSpec(object): openapi_types = { 'enable_dynamic_worker': 'bool', 'run_policy': 'V1RunPolicy', 'success_policy': 'str', 'tf_replica_specs': 'dict(str, V1ReplicaSpec)' ...
true
true
1c347c16656536df69e4c8817e1ab4b095cd912d
6,220
py
Python
MoodleMediaConverter.py
MichaelMueller/MoodleMediaConverter
f6087942146d312088417badf406aacca95764fb
[ "Apache-2.0" ]
null
null
null
MoodleMediaConverter.py
MichaelMueller/MoodleMediaConverter
f6087942146d312088417badf406aacca95764fb
[ "Apache-2.0" ]
null
null
null
MoodleMediaConverter.py
MichaelMueller/MoodleMediaConverter
f6087942146d312088417badf406aacca95764fb
[ "Apache-2.0" ]
null
null
null
import argparse import datetime import hashlib import os import shutil import subprocess import sys import tempfile import zipfile from time import sleep, time import time from zipfile import ZipFile import xml.etree.ElementTree as ET def find_file(name, path): for root, dirs, files in os.walk(path): if n...
36.162791
117
0.632958
import argparse import datetime import hashlib import os import shutil import subprocess import sys import tempfile import zipfile from time import sleep, time import time from zipfile import ZipFile import xml.etree.ElementTree as ET def find_file(name, path): for root, dirs, files in os.walk(path): if n...
true
true
1c347ce204585efb3f6cd25b73a53ec550c91616
10,256
py
Python
docs/source/conf.py
Shray64/pytorch_connectomics
d6c814f11ac2f8418ede5ae220a93016f50214fc
[ "MIT" ]
null
null
null
docs/source/conf.py
Shray64/pytorch_connectomics
d6c814f11ac2f8418ede5ae220a93016f50214fc
[ "MIT" ]
null
null
null
docs/source/conf.py
Shray64/pytorch_connectomics
d6c814f11ac2f8418ede5ae220a93016f50214fc
[ "MIT" ]
null
null
null
# Based on https://www.sphinx-doc.org/en/master/usage/configuration.html # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are comment...
29.136364
92
0.699883
import sys, os import datetime import sphinx_rtd_theme import doctest import connectomics needs_sphinx = '3.0' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode', 'sphinx.ext.githubpages...
true
true
1c347ce2892aa8cfa6ed998db4ec47574d239ba8
43,747
py
Python
tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/cashflow_streams.py
slowy07/tf-quant-finance
0976f720fb58a2d7bfd863640c12a2425cd2f94f
[ "Apache-2.0" ]
1
2021-03-04T01:07:48.000Z
2021-03-04T01:07:48.000Z
tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/cashflow_streams.py
Aarif1430/tf-quant-finance
9372eb1ddf2b48cb1a3d4283bc67a10647ddc7a6
[ "Apache-2.0" ]
null
null
null
tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/cashflow_streams.py
Aarif1430/tf-quant-finance
9372eb1ddf2b48cb1a3d4283bc67a10647ddc7a6
[ "Apache-2.0" ]
1
2021-02-16T12:08:41.000Z
2021-02-16T12:08:41.000Z
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
43.058071
107
0.68135
from typing import Optional, Tuple, Callable, Any, List, Union import numpy as np import tensorflow.compat.v2 as tf from tf_quant_finance import datetime as dateslib from tf_quant_finance.experimental.pricing_platform.framework.core import curve_types as curve_types_lib from tf_quant_finance.experimental.pricing_pla...
true
true
1c347d0430732c04a85547fa02506a3e4316f01c
22,159
py
Python
external/devlib/devlib/module/cpufreq.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
null
null
null
external/devlib/devlib/module/cpufreq.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
null
null
null
external/devlib/devlib/module/cpufreq.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
1
2021-01-27T05:21:15.000Z
2021-01-27T05:21:15.000Z
# Copyright 2014-2018 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
41.574109
115
0.601381
from contextlib import contextmanager from devlib.module import Module from devlib.exception import TargetStableError from devlib.utils.misc import memoized WRITE_ONLY_TUNABLES = { 'interactive': ['boostpulse'] } class CpufreqModule(Module): name = 'cpufreq' @staticmethod def probe(target): ...
true
true
1c347d42305e260a0aaab0ad7a76123148f6e3b1
45,320
py
Python
irrd/integration_tests/run.py
irrdnet/irrd
6ba27f3bea4fa179525f9b1af68b2fa631d0b644
[ "BSD-2-Clause" ]
94
2015-02-03T22:50:51.000Z
2022-03-16T08:24:44.000Z
irrd/integration_tests/run.py
irrdnet/irrd
6ba27f3bea4fa179525f9b1af68b2fa631d0b644
[ "BSD-2-Clause" ]
286
2015-02-08T15:16:35.000Z
2022-03-31T22:38:38.000Z
irrd/integration_tests/run.py
irrdnet/irrd
6ba27f3bea4fa179525f9b1af68b2fa631d0b644
[ "BSD-2-Clause" ]
33
2015-02-03T22:50:57.000Z
2022-03-30T00:46:07.000Z
# flake8: noqa: W293 import sys import time import unittest import ujson import base64 import email import os import requests import signal import socket import sqlalchemy as sa import subprocess import textwrap import yaml from alembic import command, config from pathlib import Path from python_graphql_client impor...
46.915114
152
0.610989
import sys import time import unittest import ujson import base64 import email import os import requests import signal import socket import sqlalchemy as sa import subprocess import textwrap import yaml from alembic import command, config from pathlib import Path from python_graphql_client import GraphqlClient from...
true
true
1c347e036313375a8dd918e7c672b537554f1142
625
py
Python
cultr/database/__init__.py
TrixiS/cultr
fe059fdf7838ad250bcdad7db5a88e3c3e789d9c
[ "MIT" ]
null
null
null
cultr/database/__init__.py
TrixiS/cultr
fe059fdf7838ad250bcdad7db5a88e3c3e789d9c
[ "MIT" ]
null
null
null
cultr/database/__init__.py
TrixiS/cultr
fe059fdf7838ad250bcdad7db5a88e3c3e789d9c
[ "MIT" ]
null
null
null
from typing import Generator from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession from sqlalchemy.orm import sessionmaker from . import db_models from ..config import settings engine = create_async_engine(settings.DATABASE_URI, echo=True) async_session = sessionmaker( engine, expire_on_commit=Fal...
25
68
0.7504
from typing import Generator from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession from sqlalchemy.orm import sessionmaker from . import db_models from ..config import settings engine = create_async_engine(settings.DATABASE_URI, echo=True) async_session = sessionmaker( engine, expire_on_commit=Fal...
true
true
1c347ea6db0106869ce0b9be812e2121fd128eed
6,417
py
Python
venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_stateful_set_list.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_stateful_set_list.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_stateful_set_list.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: release-1.15 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1bet...
32.739796
295
0.620228
import pprint import re import six class V1beta2StatefulSetList(object): openapi_types = { 'api_version': 'str', 'items': 'list[V1beta2StatefulSet]', 'kind': 'str', 'metadata': 'V1ListMeta' } attribute_map = { 'api_version': 'apiVersion', 'items': 'it...
true
true
1c347f5388c0292a8711ba961b56081b3d0bf22a
15,766
py
Python
view/ui/plaster.py
cmh1027/everytimeUtility
3d274113a6fd212a3f5d7ee957411ca11a93e960
[ "MIT" ]
null
null
null
view/ui/plaster.py
cmh1027/everytimeUtility
3d274113a6fd212a3f5d7ee957411ca11a93e960
[ "MIT" ]
4
2018-07-11T04:57:54.000Z
2020-10-12T14:23:54.000Z
view/ui/plaster.py
cmh1027/everytimeUtility
3d274113a6fd212a3f5d7ee957411ca11a93e960
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'plaster.ui' # # Created by: PyQt5 UI code generator 5.11.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("...
56.307143
114
0.736141
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(231, 223) self.verticalLayoutWidget = QtWidgets.QWidget(Form) self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 231, 221)) self.vertical...
true
true
1c347f8817ee448d054612a79d5d81ae0a082ff1
4,500
py
Python
nengo/tests/test_simulator.py
ConorPQuinn/NengoDecimal
ef798db409417b23da6dcda761654b93a2b44342
[ "BSD-2-Clause" ]
null
null
null
nengo/tests/test_simulator.py
ConorPQuinn/NengoDecimal
ef798db409417b23da6dcda761654b93a2b44342
[ "BSD-2-Clause" ]
null
null
null
nengo/tests/test_simulator.py
ConorPQuinn/NengoDecimal
ef798db409417b23da6dcda761654b93a2b44342
[ "BSD-2-Clause" ]
null
null
null
import numpy as np import nengo import nengo.simulator from nengo.builder import Model from nengo.builder.node import build_pyfunc from nengo.builder.operator import Copy, Reset, DotInc, SimNoise from nengo.builder.signal import Signal from nengo.utils.compat import range, iteritems def test_steps(RefSimulator): ...
30.405405
79
0.606
import numpy as np import nengo import nengo.simulator from nengo.builder import Model from nengo.builder.node import build_pyfunc from nengo.builder.operator import Copy, Reset, DotInc, SimNoise from nengo.builder.signal import Signal from nengo.utils.compat import range, iteritems def test_steps(RefSimulator): ...
true
true
1c3480f4bf36cf025a44cc3f87ffafe292096841
464
py
Python
mapshader/tests/test_transforms.py
SapirLastimoza-Dooley/mapshader
9a7a893dd3fdfa7e20666d32c3788003393ffa10
[ "MIT" ]
1
2021-02-01T18:03:49.000Z
2021-02-01T18:03:49.000Z
mapshader/tests/test_transforms.py
SapirLastimoza-Dooley/mapshader
9a7a893dd3fdfa7e20666d32c3788003393ffa10
[ "MIT" ]
null
null
null
mapshader/tests/test_transforms.py
SapirLastimoza-Dooley/mapshader
9a7a893dd3fdfa7e20666d32c3788003393ffa10
[ "MIT" ]
null
null
null
import json from os import path from io import BytesIO import pytest import xarray as xr from datashader.transfer_functions import Image from mapshader.sources import MapSource from mapshader.core import render_map from mapshader.core import render_geojson from mapshader.sources import get_user_datasets from maps...
21.090909
54
0.846983
import json from os import path from io import BytesIO import pytest import xarray as xr from datashader.transfer_functions import Image from mapshader.sources import MapSource from mapshader.core import render_map from mapshader.core import render_geojson from mapshader.sources import get_user_datasets from maps...
true
true
1c34810189be8eac3c587ba7a479a0f467bda3e4
3,773
py
Python
auth/views.py
zand-yasin/BlogBook-Backend
01eebe2353f06261ab5045e481e10ec291b852ea
[ "MIT" ]
3
2020-08-25T18:40:16.000Z
2020-10-20T03:51:49.000Z
auth/views.py
zand-yasin/BlogBook-Backend
01eebe2353f06261ab5045e481e10ec291b852ea
[ "MIT" ]
12
2021-07-05T09:23:28.000Z
2021-07-30T03:47:41.000Z
auth/views.py
Nandan-unni/KeyBlogs-Django-Backend
4031e5e22fb27bf777f5f43a7faa1ed1389284dd
[ "MIT" ]
null
null
null
from rest_framework import views, status from rest_framework.response import Response from rest_framework_simplejwt.tokens import RefreshToken from django.contrib.auth import get_user_model, authenticate, login, logout from django.utils.http import urlsafe_base64_decode from django.utils.encoding import force_bytes fr...
38.111111
122
0.627087
from rest_framework import views, status from rest_framework.response import Response from rest_framework_simplejwt.tokens import RefreshToken from django.contrib.auth import get_user_model, authenticate, login, logout from django.utils.http import urlsafe_base64_decode from django.utils.encoding import force_bytes fr...
true
true
1c3481d8f7be27a6d80eacb0aadf14080eca9bc0
2,665
py
Python
tests/ons-mock/server.py
uk-gov-mirror/alphagov.govuk-shielded-vulnerable-people-service
5b191980dec554155e9d431a514a945072032e7c
[ "MIT" ]
3
2020-08-16T19:36:26.000Z
2020-10-29T14:35:01.000Z
tests/ons-mock/server.py
uk-gov-mirror/alphagov.govuk-shielded-vulnerable-people-service
5b191980dec554155e9d431a514a945072032e7c
[ "MIT" ]
101
2020-09-03T11:10:00.000Z
2021-10-01T03:03:46.000Z
tests/ons-mock/server.py
alphagov-mirror/govuk-shielded-vulnerable-people-service
f9cb4ae9046fc402f0878503733a23d42546cc53
[ "MIT" ]
6
2020-07-28T09:03:20.000Z
2021-04-10T18:04:56.000Z
from http.server import HTTPServer, BaseHTTPRequestHandler import json import re from fake_os_places_api_entry import FakeOSPlacesAPIEntry _postcode_to_uprn = {"LS287TQ": 10000000, "BB11TA": 1000000, "LE674AY": 1000, "L244AD": 2000, ...
38.071429
141
0.454034
from http.server import HTTPServer, BaseHTTPRequestHandler import json import re from fake_os_places_api_entry import FakeOSPlacesAPIEntry _postcode_to_uprn = {"LS287TQ": 10000000, "BB11TA": 1000000, "LE674AY": 1000, "L244AD": 2000, ...
true
true
1c3481fdb8ef31e875f8f06ce2d01a73abf4bb77
7,882
py
Python
tensorflow/contrib/keras/python/keras/utils/layer_utils.py
DEVESHTARASIA/tensorflow
d3edb8c60ed4fd831d62833ed22f5c23486c561c
[ "Apache-2.0" ]
384
2017-02-21T18:38:04.000Z
2022-02-22T07:30:25.000Z
tensorflow/contrib/keras/python/keras/utils/layer_utils.py
DEVESHTARASIA/tensorflow
d3edb8c60ed4fd831d62833ed22f5c23486c561c
[ "Apache-2.0" ]
15
2017-03-01T20:18:43.000Z
2020-05-07T10:33:51.000Z
udacity-car/lib/python2.7/site-packages/tensorflow/contrib/keras/python/keras/utils/layer_utils.py
808brick/CarND-Capstone
f9e536b4a9d96322d7e971073602c8969dbd9369
[ "MIT" ]
81
2017-02-21T19:31:19.000Z
2022-02-22T07:30:24.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.827273
81
0.65897
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.contrib.keras.python.keras import backend as K from tensorflow.contrib.keras.python.keras.utils.conv_utils import convert_kernel def print_summary(model, line_length=None, ...
true
true
1c34825a8ee5c966c486000b4d04fc9340575a66
1,903
py
Python
Commands/doublexp/doublexp.py
Chromeilion/kyoshi
ee7a448dde73831edbd0bc5e829cdf77f3a9a20d
[ "MIT" ]
1
2021-07-18T15:21:09.000Z
2021-07-18T15:21:09.000Z
Commands/doublexp/doublexp.py
Chromeilion/kyoshi
ee7a448dde73831edbd0bc5e829cdf77f3a9a20d
[ "MIT" ]
6
2021-07-18T14:37:07.000Z
2021-09-27T15:51:13.000Z
Commands/doublexp/doublexp.py
Chromeilion/kyoshi
ee7a448dde73831edbd0bc5e829cdf77f3a9a20d
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from Systems.levelsys import levelling import os from Systems.gettext_init import GettextInit # Set up environment variables: PREFIX = os.environ["BOT_PREFIX"] ERROR_EMB_COLOUR = discord.Colour(int(os.environ["ERROR_EMB_COLOUR"])) SUCCESS_EMB_COLOUR = discord.Colour(int...
36.596154
116
0.612717
import discord from discord.ext import commands from Systems.levelsys import levelling import os from Systems.gettext_init import GettextInit PREFIX = os.environ["BOT_PREFIX"] ERROR_EMB_COLOUR = discord.Colour(int(os.environ["ERROR_EMB_COLOUR"])) SUCCESS_EMB_COLOUR = discord.Colour(int(os.environ["SUCCESS_EMB_COLOUR"...
true
true
1c3482a0f1bb99d8764898b5f1cd9e655b4f5b36
3,567
py
Python
gobiko/apns/exceptions.py
belkka/python-apns
35b0962eb50faf99d678d42ccec8cc3013a60eac
[ "MIT" ]
null
null
null
gobiko/apns/exceptions.py
belkka/python-apns
35b0962eb50faf99d678d42ccec8cc3013a60eac
[ "MIT" ]
null
null
null
gobiko/apns/exceptions.py
belkka/python-apns
35b0962eb50faf99d678d42ccec8cc3013a60eac
[ "MIT" ]
1
2018-08-27T04:04:02.000Z
2018-08-27T04:04:02.000Z
class APNsException(Exception): pass class InternalException(APNsException): pass class ImproperlyConfigured(APNsException): pass class BadCollapseId(APNsException): "The collapse identifier exceeds the maximum allowed size" pass class BadDeviceToken(APNsException): "The specified devi...
22.575949
193
0.746285
class APNsException(Exception): pass class InternalException(APNsException): pass class ImproperlyConfigured(APNsException): pass class BadCollapseId(APNsException): pass class BadDeviceToken(APNsException): pass class BadExpirationDate(APNsException): pass class BadMessageId(APNsE...
true
true
1c348353cae1e5d2994c4be5b943e32ee0ffda79
9,868
py
Python
tests/providers/microsoft/azure/transfers/test_sftp_to_wasb.py
takuti/airflow
0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e
[ "Apache-2.0" ]
27
2019-02-25T14:20:36.000Z
2022-03-22T09:35:13.000Z
tests/providers/microsoft/azure/transfers/test_sftp_to_wasb.py
takuti/airflow
0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e
[ "Apache-2.0" ]
200
2019-01-09T15:33:06.000Z
2022-01-12T09:13:42.000Z
tests/providers/microsoft/azure/transfers/test_sftp_to_wasb.py
takuti/airflow
0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e
[ "Apache-2.0" ]
14
2019-06-25T17:08:29.000Z
2022-03-29T13:25:53.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
38.396887
110
0.681901
import unittest from unittest import mock from airflow import AirflowException from airflow.providers.microsoft.azure.transfers.sftp_to_wasb import SftpFile, SFTPToWasbOperator TASK_ID = "test-gcs-to-sftp-operator" WASB_CONN_ID = "wasb_default" SFTP_CONN_ID = "ssh_default" CONTAINER_NAME = "test-container" WILDCARD...
true
true
1c34836839975671d78d43f89aec68536e835df9
654
py
Python
character.py
Aposhian/mystery
23429f0d5c207ce531edca1480455aedd15cf811
[ "BSD-2-Clause" ]
1
2020-07-27T23:54:27.000Z
2020-07-27T23:54:27.000Z
character.py
Aposhian/mystery
23429f0d5c207ce531edca1480455aedd15cf811
[ "BSD-2-Clause" ]
null
null
null
character.py
Aposhian/mystery
23429f0d5c207ce531edca1480455aedd15cf811
[ "BSD-2-Clause" ]
1
2021-11-09T19:54:33.000Z
2021-11-09T19:54:33.000Z
from eliza import Eliza class Character: def __init__(self, name, avatar, sprite, scriptfile): self.name = name self.coordinates = (0,0) self.avatar = avatar self.sprite = sprite self.eliza = Eliza() #self.outputbox = OutputBox() #self.inputbox = InputBox() ...
29.727273
57
0.608563
from eliza import Eliza class Character: def __init__(self, name, avatar, sprite, scriptfile): self.name = name self.coordinates = (0,0) self.avatar = avatar self.sprite = sprite self.eliza = Eliza() self.leadinfulfilled = False with open(scri...
true
true
1c3484259cce61701ac3aec64e03dc08151fe4b5
17,771
py
Python
onmt/utils/loss.py
USE-sum/usesum
eaf6dae0c451459551f728c0a8866777c20ed707
[ "MIT" ]
null
null
null
onmt/utils/loss.py
USE-sum/usesum
eaf6dae0c451459551f728c0a8866777c20ed707
[ "MIT" ]
1
2020-08-16T13:47:24.000Z
2020-08-16T13:47:24.000Z
onmt/utils/loss.py
USE-sum/usesum
eaf6dae0c451459551f728c0a8866777c20ed707
[ "MIT" ]
null
null
null
""" This file handles the details of the loss function during training. This includes: LossComputeBase and the standard NMTLossCompute, and sharded loss compute stuff. """ from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F import onmt import onmt.inputter...
39.057143
143
0.606381
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F import onmt import onmt.inputters as inputters from onmt.modules.sparse_losses import SparsemaxLoss from math import isnan def build_loss_compute(model, tgt_vocab, opt, train=True): device = torch.device("cuda" if ...
true
true
1c34857d0c2d2e15ec8e14ed43ddedd917058814
200
py
Python
pykrita/glTF_editor/bu_glTF/material/__init__.py
akirfin/krita_python_fun
74173d140b39f7f80f43f9474381e4adfa3b5f01
[ "MIT" ]
1
2021-10-01T00:25:43.000Z
2021-10-01T00:25:43.000Z
pykrita/glTF_editor/bu_glTF/material/__init__.py
akirfin/krita_python_fun
74173d140b39f7f80f43f9474381e4adfa3b5f01
[ "MIT" ]
null
null
null
pykrita/glTF_editor/bu_glTF/material/__init__.py
akirfin/krita_python_fun
74173d140b39f7f80f43f9474381e4adfa3b5f01
[ "MIT" ]
null
null
null
from .normalTextureInfo import NormalTextureInfo from .occlusionTextureInfo import OcclusionTextureInfo from .pbrMetallicRoughness import PbrMetallicRoughness class Material(object): """ """
25
54
0.815
from .normalTextureInfo import NormalTextureInfo from .occlusionTextureInfo import OcclusionTextureInfo from .pbrMetallicRoughness import PbrMetallicRoughness class Material(object):
true
true
1c3486b4d3ab68bff3a647585d6669d171d9367f
286
py
Python
traiders/backend/api/views/token.py
rdilruba/bounswe2019group2
b373908a4a8e92481f359297aba07245f0a23c1c
[ "Apache-2.0" ]
11
2019-02-15T12:08:32.000Z
2019-11-14T19:25:09.000Z
traiders/backend/api/views/token.py
bounswe/bounswe2019group2
05d41cf7b6bc1b3f994e82495d2a885a6eaa7cf3
[ "Apache-2.0" ]
279
2019-02-13T14:57:39.000Z
2022-03-12T00:02:30.000Z
traiders/backend/api/views/token.py
rdilruba/bounswe2019group2
b373908a4a8e92481f359297aba07245f0a23c1c
[ "Apache-2.0" ]
13
2019-03-20T08:30:55.000Z
2021-01-31T16:49:14.000Z
from rest_framework.viewsets import GenericViewSet from rest_framework import mixins from ..serializers import TokenSerializer class TokenViewSet(mixins.CreateModelMixin, GenericViewSet): """ Create or get already created token """ serializer_class = TokenSerializer
23.833333
60
0.79021
from rest_framework.viewsets import GenericViewSet from rest_framework import mixins from ..serializers import TokenSerializer class TokenViewSet(mixins.CreateModelMixin, GenericViewSet): serializer_class = TokenSerializer
true
true
1c3486e574d48b1b6e56d62abd94484044dca39e
64,507
py
Python
ffiwrappers/src/arlwrap.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
ffiwrappers/src/arlwrap.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
ffiwrappers/src/arlwrap.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
# Author: Bojan Nikolic <b.nikolic@mrao.cam.ac.uk> # ARL Wrapping Interface # In this file we declare the functions that need to be exposed to C (wrapped) --with the callback modifier # and the needed structs -- with cdef import numpy import collections import sys from astropy.coordinates import SkyCoord from astropy...
47.853858
165
0.750508
import numpy import collections import sys from astropy.coordinates import SkyCoord from astropy import units as u from processing_components.calibration.operations import apply_gaintable, create_gaintable_from_blockvisibility, qa_gaintable from processing_components.visibility.base import create_visibility, copy_vi...
true
true
1c3486e97720206517862fb40985bad2ec8551e4
577
py
Python
test.py
tnemelck/kmeans
c1095c6bfc134f4fc9e2c79a781b42d5ee38620f
[ "OML" ]
null
null
null
test.py
tnemelck/kmeans
c1095c6bfc134f4fc9e2c79a781b42d5ee38620f
[ "OML" ]
null
null
null
test.py
tnemelck/kmeans
c1095c6bfc134f4fc9e2c79a781b42d5ee38620f
[ "OML" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 7 00:42:53 2018 @author: elvex """ import numpy as np import numpy.random as npr import random def init_board(N, mini = -1, maxi = 1): X = npr.uniform(mini, maxi (N, 2)) return X def init_board_gauss(N, k, mini = -1, maxi = -1, ecart_mi...
23.08
85
0.582322
import numpy as np import numpy.random as npr import random def init_board(N, mini = -1, maxi = 1): X = npr.uniform(mini, maxi (N, 2)) return X def init_board_gauss(N, k, mini = -1, maxi = -1, ecart_min = 0.05, ecart_max = 0.10): n = N//k X = [] for i in range(k): centre, s = npr.uniform...
true
true
1c348712057f34dba1eac147defbb4d6ce2a05b4
25,054
py
Python
awx/main/models/projects.py
SysBind/awx
2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f
[ "Apache-2.0" ]
1
2021-05-13T17:38:03.000Z
2021-05-13T17:38:03.000Z
awx/main/models/projects.py
SysBind/awx
2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f
[ "Apache-2.0" ]
11
2021-04-20T15:03:55.000Z
2021-07-14T21:34:16.000Z
awx/main/models/projects.py
TinLe/awx
73d8c12e3bf5b193305ed1202549331ea00088c1
[ "Apache-2.0" ]
1
2021-08-30T02:41:32.000Z
2021-08-30T02:41:32.000Z
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import datetime import os import urllib.parse as urlparse # Django from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_str, smart_text from djang...
38.485407
156
0.646963
import datetime import os import urllib.parse as urlparse from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_str, smart_text from django.utils.text import slugify from django.core.exceptions import ValidationErr...
true
true
1c3487ce1eb2d05b3106d67969bad7dcec987da5
28,051
py
Python
tests/mxnet/test_nn.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
null
null
null
tests/mxnet/test_nn.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
null
null
null
tests/mxnet/test_nn.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
null
null
null
import mxnet as mx import networkx as nx import numpy as np import scipy as sp import pytest import dgl import dgl.nn.mxnet as nn import dgl.function as fn import backend as F from test_utils.graph_cases import get_cases, random_graph, random_bipartite, random_dglgraph from test_utils import parametrize_idtype from mxn...
33.960048
110
0.593597
import mxnet as mx import networkx as nx import numpy as np import scipy as sp import pytest import dgl import dgl.nn.mxnet as nn import dgl.function as fn import backend as F from test_utils.graph_cases import get_cases, random_graph, random_bipartite, random_dglgraph from test_utils import parametrize_idtype from mxn...
true
true
1c3487cecc72f7c00dd34da8362cdb9ba0a14b65
2,127
py
Python
comparison/eval/metrics.py
killianlevacher/defenseInvGAN-src
8fa398536773c5bc00c906562d2d9359572b8157
[ "MIT" ]
14
2019-12-12T11:28:18.000Z
2022-03-09T11:56:04.000Z
comparison/eval/metrics.py
killianlevacher/defenseInvGAN-src
8fa398536773c5bc00c906562d2d9359572b8157
[ "MIT" ]
7
2019-12-16T22:20:01.000Z
2022-02-10T00:45:21.000Z
comparison/eval/metrics.py
killianlevacher/defenseInvGAN-src
8fa398536773c5bc00c906562d2d9359572b8157
[ "MIT" ]
2
2020-04-01T09:02:00.000Z
2021-08-01T14:27:11.000Z
import cPickle import tensorflow as tf from classifiers.cifar_model import Model as CIFARModel import utils import numpy as np import inception import fid def ComputeClassificationAccuracy(images, recons, labels, args, debug=True): model_paths = {'CIFAR': 'classifiers/model/cifar-10', 'CelebA'...
29.957746
111
0.657734
import cPickle import tensorflow as tf from classifiers.cifar_model import Model as CIFARModel import utils import numpy as np import inception import fid def ComputeClassificationAccuracy(images, recons, labels, args, debug=True): model_paths = {'CIFAR': 'classifiers/model/cifar-10', 'CelebA'...
true
true
1c34888dd7c4c965f8b0a566fa7ca6256d71885e
1,905
py
Python
src/rozbieznosci_dyscyplin/models.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
null
null
null
src/rozbieznosci_dyscyplin/models.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
41
2019-11-07T00:07:02.000Z
2022-02-27T22:09:39.000Z
src/rozbieznosci_dyscyplin/models.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.db.models import DO_NOTHING from bpp.fields import YearField from bpp.models import BazaModeluOdpowiedzialnosciAutorow, TupleField class RozbieznosciViewBase(models.Model): id = TupleField(models.IntegerField(), size=3, primary_key=True) rekord = models.ForeignKey("bp...
37.352941
108
0.728609
from django.db import models from django.db.models import DO_NOTHING from bpp.fields import YearField from bpp.models import BazaModeluOdpowiedzialnosciAutorow, TupleField class RozbieznosciViewBase(models.Model): id = TupleField(models.IntegerField(), size=3, primary_key=True) rekord = models.ForeignKey("bp...
true
true
1c348a468a745f1994d97461eb60b2dee436b18a
9,194
py
Python
sovrin/common/txn.py
sovrin-foundation/old-sovrin
d4e705054b7252c62fea00114060035c6eb314a4
[ "Apache-2.0" ]
3
2017-07-19T14:26:31.000Z
2020-05-16T16:09:37.000Z
sovrin/common/txn.py
sovrin-foundation/old-sovrin
d4e705054b7252c62fea00114060035c6eb314a4
[ "Apache-2.0" ]
null
null
null
sovrin/common/txn.py
sovrin-foundation/old-sovrin
d4e705054b7252c62fea00114060035c6eb314a4
[ "Apache-2.0" ]
3
2017-10-28T08:19:00.000Z
2021-06-06T10:48:55.000Z
import json from collections import OrderedDict from plenum.common.txn import TXN_TYPE, TARGET_NYM, ORIGIN, DATA, TXN_ID, TXN_TIME, \ RAW, ENC, HASH, NAME, VERSION, TYPE, POOL_TXN_TYPES, ALIAS, \ STEWARD, NYM, VERKEY from plenum.common.types import f, TaggedTuple ROLE = 'role' NONCE = 'nonce' ATTRIBUTES = "at...
40.148472
240
0.684359
import json from collections import OrderedDict from plenum.common.txn import TXN_TYPE, TARGET_NYM, ORIGIN, DATA, TXN_ID, TXN_TIME, \ RAW, ENC, HASH, NAME, VERSION, TYPE, POOL_TXN_TYPES, ALIAS, \ STEWARD, NYM, VERKEY from plenum.common.types import f, TaggedTuple ROLE = 'role' NONCE = 'nonce' ATTRIBUTES = "at...
true
true
1c348a5acb86adb0a976856e0be07a0ff3b78da9
504
py
Python
cnn_code/cuda.py
neurocaience/deepfreeze
2a8c7da7519df2bacb640917695bd7d226e8d4f4
[ "MIT" ]
1
2020-11-17T06:41:10.000Z
2020-11-17T06:41:10.000Z
cnn_code/cuda.py
neurocaience/DeepFreeze
2a8c7da7519df2bacb640917695bd7d226e8d4f4
[ "MIT" ]
null
null
null
cnn_code/cuda.py
neurocaience/DeepFreeze
2a8c7da7519df2bacb640917695bd7d226e8d4f4
[ "MIT" ]
1
2020-06-18T04:25:48.000Z
2020-06-18T04:25:48.000Z
"""============================================================================= Manage CUDA-related utility functions. =============================================================================""" import torch # ------------------------------------------------------------------------------ def device(): """R...
31.5
80
0.343254
import torch def device(): if torch.cuda.is_available(): return torch.cuda.current_device() else: return torch.device('cpu')
true
true
1c348b2a617346f4892a06a93923aa29bbc60222
121
py
Python
app/multiplication.py
magicalcarpet/python_modules_and_packages
663a957674c41d0dc33e3f6ca7eefe4c808606b4
[ "MIT" ]
null
null
null
app/multiplication.py
magicalcarpet/python_modules_and_packages
663a957674c41d0dc33e3f6ca7eefe4c808606b4
[ "MIT" ]
null
null
null
app/multiplication.py
magicalcarpet/python_modules_and_packages
663a957674c41d0dc33e3f6ca7eefe4c808606b4
[ "MIT" ]
null
null
null
def multiply(x, y): ''' Multiply two numbers x and y ''' print('multiplying x: {} * y: {}'.format(x, y))
20.166667
51
0.512397
def multiply(x, y): print('multiplying x: {} * y: {}'.format(x, y))
true
true
1c348d45c3fb17732c03fd82af2a1c1cdf2c030f
415
py
Python
acmicpc/9506/9506.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
3
2019-03-09T05:19:23.000Z
2019-04-06T09:26:36.000Z
acmicpc/9506/9506.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2020-02-23T10:38:04.000Z
2020-02-23T10:38:04.000Z
acmicpc/9506/9506.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2019-05-22T13:47:53.000Z
2019-05-22T13:47:53.000Z
def get_divisor(k): divisors = [] for i in range(1, k): if k % i == 0: divisors.append(i) return divisors while True: n = int(input()) if n == -1: break divisors = get_divisor(n) if n == sum(divisors): print(f'{n}', end=' = ') print(' + '.join...
23.055556
51
0.489157
def get_divisor(k): divisors = [] for i in range(1, k): if k % i == 0: divisors.append(i) return divisors while True: n = int(input()) if n == -1: break divisors = get_divisor(n) if n == sum(divisors): print(f'{n}', end=' = ') print(' + '.join...
true
true
1c348da64d28394f354e57927ffd94baebc17e4a
2,973
py
Python
src/data/traffic_data.py
r-anime/modbot
52e8f251273435e0146bd8d6633ff22549e138aa
[ "MIT" ]
3
2020-07-06T08:26:12.000Z
2021-04-20T05:31:38.000Z
src/data/traffic_data.py
r-anime/modbot
52e8f251273435e0146bd8d6633ff22549e138aa
[ "MIT" ]
8
2021-06-01T03:49:28.000Z
2022-03-18T02:27:43.000Z
src/data/traffic_data.py
r-anime/modbot
52e8f251273435e0146bd8d6633ff22549e138aa
[ "MIT" ]
1
2021-04-20T05:30:46.000Z
2021-04-20T05:30:46.000Z
import datetime from typing import Optional from sqlalchemy.sql import text from data.base_data import BaseModel, BaseData class TrafficMonthlyModel(BaseModel): """ Note: date is the first day of the month. """ _table = "traffic_monthly" _pk_field = "id" _columns = ["id", "date", "unique_pa...
29.147059
120
0.636394
import datetime from typing import Optional from sqlalchemy.sql import text from data.base_data import BaseModel, BaseData class TrafficMonthlyModel(BaseModel): _table = "traffic_monthly" _pk_field = "id" _columns = ["id", "date", "unique_pageviews", "total_pageviews"] class TrafficDailyModel(BaseMod...
true
true
1c348ea078265e308375f04362e7559419d8dd01
3,788
py
Python
homeassistant/components/mobile_app/__init__.py
headcode/home-assistant
ef338fa8803c9691c545cb335503723d271c652c
[ "Apache-2.0" ]
null
null
null
homeassistant/components/mobile_app/__init__.py
headcode/home-assistant
ef338fa8803c9691c545cb335503723d271c652c
[ "Apache-2.0" ]
null
null
null
homeassistant/components/mobile_app/__init__.py
headcode/home-assistant
ef338fa8803c9691c545cb335503723d271c652c
[ "Apache-2.0" ]
null
null
null
"""Integrates Native Apps to Home Assistant.""" from homeassistant import config_entries from homeassistant.const import CONF_WEBHOOK_ID from homeassistant.components.webhook import async_register as webhook_register from homeassistant.helpers import device_registry as dr from homeassistant.helpers.discovery import loa...
34.436364
79
0.693506
from homeassistant import config_entries from homeassistant.const import CONF_WEBHOOK_ID from homeassistant.components.webhook import async_register as webhook_register from homeassistant.helpers import device_registry as dr from homeassistant.helpers.discovery import load_platform from homeassistant.helpers.typing imp...
true
true
1c348ea9086c7076385dadaf15b2832eea654037
14,939
py
Python
tests/manage/pv_services/test_dynamic_pvc_accessmodes_with_reclaim_policies.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
tests/manage/pv_services/test_dynamic_pvc_accessmodes_with_reclaim_policies.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
tests/manage/pv_services/test_dynamic_pvc_accessmodes_with_reclaim_policies.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
import logging import pytest from ocs_ci.framework.testlib import ManageTest, tier1, tier3, acceptance from ocs_ci.ocs import constants from ocs_ci.ocs.exceptions import UnexpectedBehaviour from ocs_ci.ocs.resources import pod from ocs_ci.utility.retry import retry from tests import helpers from tests.fixtures import ...
34.501155
84
0.624674
import logging import pytest from ocs_ci.framework.testlib import ManageTest, tier1, tier3, acceptance from ocs_ci.ocs import constants from ocs_ci.ocs.exceptions import UnexpectedBehaviour from ocs_ci.ocs.resources import pod from ocs_ci.utility.retry import retry from tests import helpers from tests.fixtures import ...
true
true
1c34901541213febf90ddc158ba76566cb2e4c41
1,192
py
Python
fastai2/callback/data.py
mrT23/fastai2
7eaa4a6a10a8836fbbb90360a7df92d170d1bba3
[ "Apache-2.0" ]
null
null
null
fastai2/callback/data.py
mrT23/fastai2
7eaa4a6a10a8836fbbb90360a7df92d170d1bba3
[ "Apache-2.0" ]
null
null
null
fastai2/callback/data.py
mrT23/fastai2
7eaa4a6a10a8836fbbb90360a7df92d170d1bba3
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/14a_callback.data.ipynb (unless otherwise specified). __all__ = ['CollectDataCallback', 'WeightedDL', 'weighted_databunch'] # Cell from ..basics import * # Cell class CollectDataCallback(Callback): "Collect all batches, along with `pred` and `loss`, into `self.data...
37.25
105
0.685403
__all__ = ['CollectDataCallback', 'WeightedDL', 'weighted_databunch'] from ..basics import * class CollectDataCallback(Callback): def begin_fit(self): self.data = L() def after_batch(self): self.data.append(to_detach((self.xb,self.yb,self.pred,self.loss))) @delegates() class WeightedDL(TfmdDL): def __in...
true
true
1c3490a494e5f7b00a2da5b5586d9f7d65b58fbd
336
py
Python
backend/base/urls/order_urls.py
drcan94/Dj-React-eCommerce
498395c2f03528bce8348e5f0aa88221a01b9df8
[ "MIT" ]
1
2022-01-08T14:11:03.000Z
2022-01-08T14:11:03.000Z
backend/base/urls/order_urls.py
drcan94/Dj-React-eCommerce
498395c2f03528bce8348e5f0aa88221a01b9df8
[ "MIT" ]
null
null
null
backend/base/urls/order_urls.py
drcan94/Dj-React-eCommerce
498395c2f03528bce8348e5f0aa88221a01b9df8
[ "MIT" ]
null
null
null
from django.urls import path from base.views import order_views as views urlpatterns = [ path('add/', views.addOrderItems, name="order-add"), path('myorders/', views.getMyOrders, name="myorders"), path('<str:pk>/', views.getOrderItem, name="user-order"), path('<str:pk>/pay/', views.updateOrderToPaid,...
28
63
0.681548
from django.urls import path from base.views import order_views as views urlpatterns = [ path('add/', views.addOrderItems, name="order-add"), path('myorders/', views.getMyOrders, name="myorders"), path('<str:pk>/', views.getOrderItem, name="user-order"), path('<str:pk>/pay/', views.updateOrderToPaid,...
true
true
1c3492f1e73b1b96940d9fdf764f48a4114cc549
41,729
py
Python
tests/accelerators/test_accelerator_connector.py
JanSellner/pytorch-lightning
0e0da8c3fc2c6d5e7ac54900621a82d213f8ebbf
[ "Apache-2.0" ]
null
null
null
tests/accelerators/test_accelerator_connector.py
JanSellner/pytorch-lightning
0e0da8c3fc2c6d5e7ac54900621a82d213f8ebbf
[ "Apache-2.0" ]
null
null
null
tests/accelerators/test_accelerator_connector.py
JanSellner/pytorch-lightning
0e0da8c3fc2c6d5e7ac54900621a82d213f8ebbf
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
40.592412
117
0.733231
import os from typing import Optional from unittest import mock from unittest.mock import Mock import pytest import torch import torch.distributed import pytorch_lightning from pytorch_lightning import Trainer from pytorch_lightning.accelerators.accelerator import Accelerator from pytorch_lightning.accelerators.cpu ...
true
true
1c3493c81efda6be8fd6097e672472ea11706c75
2,360
py
Python
examples/federated_learning/yolov5_coco128_mistnet/train.py
davedavedavid/sedna
7ba3da9f85559ee842ba28d6785f885d38ca49fb
[ "Apache-2.0" ]
null
null
null
examples/federated_learning/yolov5_coco128_mistnet/train.py
davedavedavid/sedna
7ba3da9f85559ee842ba28d6785f885d38ca49fb
[ "Apache-2.0" ]
null
null
null
examples/federated_learning/yolov5_coco128_mistnet/train.py
davedavedavid/sedna
7ba3da9f85559ee842ba28d6785f885d38ca49fb
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The KubeEdge Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
46.27451
131
0.749576
import os from interface import mistnet, s3_transmitter from interface import Dataset, Estimator_edge from sedna.common.config import BaseConfig from sedna.core.federated_learning import FederatedLearningV2 from examples.ms_nnrt.ms_nnrt_models.ms_acl_inference import Inference from examples.ms_nnrt.ms_nnrt_trainer_yolo...
true
true
1c349402dc067fdf30894110cdcb17c3fa320b58
2,343
py
Python
meta_policy_search/envs/point_envs/point_env_2d.py
behzadhaghgoo/cml
e659c7ae10a52bbe1cbabf9d359aea43af19eb12
[ "MIT" ]
210
2018-10-17T01:04:48.000Z
2022-03-09T16:17:06.000Z
meta_policy_search/envs/point_envs/point_env_2d.py
behzadhaghgoo/cml
e659c7ae10a52bbe1cbabf9d359aea43af19eb12
[ "MIT" ]
13
2018-10-25T20:01:09.000Z
2022-01-24T13:11:24.000Z
meta_policy_search/envs/point_envs/point_env_2d.py
behzadhaghgoo/cml
e659c7ae10a52bbe1cbabf9d359aea43af19eb12
[ "MIT" ]
55
2018-10-18T22:00:51.000Z
2021-11-24T00:06:31.000Z
from meta_policy_search.envs.base import MetaEnv import numpy as np from gym.spaces import Box class MetaPointEnv(MetaEnv): def step(self, action): """ Run one timestep of the environment's dynamics. When end of episode is reached, reset() should be called to reset the environment's inte...
33
96
0.597098
from meta_policy_search.envs.base import MetaEnv import numpy as np from gym.spaces import Box class MetaPointEnv(MetaEnv): def step(self, action): prev_state = self._state self._state = prev_state + np.clip(action, -0.1, 0.1) reward = self.reward(prev_state, action, self._state) ...
true
true
1c34945971e73b95ec4287a210d713f7431f69e6
3,570
py
Python
Hybrid_Neuron_Simulation.py
emdgroup/brain_waves_for_planning_problems
4b4356f40470d8ecfb6152960d9c4f25a7a11b46
[ "Apache-2.0" ]
null
null
null
Hybrid_Neuron_Simulation.py
emdgroup/brain_waves_for_planning_problems
4b4356f40470d8ecfb6152960d9c4f25a7a11b46
[ "Apache-2.0" ]
null
null
null
Hybrid_Neuron_Simulation.py
emdgroup/brain_waves_for_planning_problems
4b4356f40470d8ecfb6152960d9c4f25a7a11b46
[ "Apache-2.0" ]
null
null
null
""" Attractor Network for 2DoF Robot Arm Author: Henry Powell and Mathias Winkel """ import sys import numpy as np from graphics import Graphics from ContinuousAttractorLayer import ContinuousAttractorLayer from WavePropagationLayer import WavePropagationLayer from setups import SETUPS if len(sys.argv) > 1: sele...
36.804124
137
0.713165
import sys import numpy as np from graphics import Graphics from ContinuousAttractorLayer import ContinuousAttractorLayer from WavePropagationLayer import WavePropagationLayer from setups import SETUPS if len(sys.argv) > 1: selected_setup = sys.argv[1] else: selected_setup = 's_maze' try: setup = SETUPS[...
true
true
1c34962ea4c82ad76bb790502dd26afe10c37022
6,345
py
Python
pecos/simulators/sparsesim/logical_sign.py
quantum-pecos/PECOS
44bc614a9152f3b316bacef6ca034f6a8a611293
[ "Apache-2.0" ]
15
2019-04-11T16:02:38.000Z
2022-03-15T16:56:36.000Z
pecos/simulators/sparsesim/logical_sign.py
quantum-pecos/PECOS
44bc614a9152f3b316bacef6ca034f6a8a611293
[ "Apache-2.0" ]
4
2018-10-04T19:30:09.000Z
2019-03-12T19:00:34.000Z
pecos/simulators/sparsesim/logical_sign.py
quantum-pecos/PECOS
44bc614a9152f3b316bacef6ca034f6a8a611293
[ "Apache-2.0" ]
3
2020-10-07T16:47:16.000Z
2022-02-01T05:34:54.000Z
# ========================================================================= # # Copyright 2018 National Technology & Engineering Solutions of Sandia, # LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, # the U.S. Government retains certain rights in this software. # # Licensed under the Apache...
37.544379
118
0.622695
def find_logical_signs(state, logical_circuit, delogical_circuit=None): if len(logical_circuit) != 1: raise Exception('Logical operators are expected to only have one tick.') if delogical_circuit and len(delogical_circuit) != 1: raise Exception('Delogical operators are expected to only have...
true
true
1c3496b8cbe1d3ec4b9afe9a121970b48f4fb661
20,937
py
Python
main/Sapphire/Post_Process/DistFuncs.py
JonesRobM/SAPPHIRE
64fd62634279800642d21b959d0e8f2efd360ad4
[ "MIT" ]
null
null
null
main/Sapphire/Post_Process/DistFuncs.py
JonesRobM/SAPPHIRE
64fd62634279800642d21b959d0e8f2efd360ad4
[ "MIT" ]
2
2022-03-30T12:33:42.000Z
2022-03-30T12:34:41.000Z
main/Sapphire/Post_Process/DistFuncs.py
JonesRobM/Sapphire
fba875af56e48e2c5a4a3cf6788f51f359f63800
[ "MIT" ]
null
null
null
import numpy as np import os def distance(a, b): dx = abs(a[0] - b[0]) dy = abs(a[1] - b[1]) dz = abs(a[2] - b[2]) return np.sqrt(dx**2 + dy**2 + dz**2) def CoMDist(positions, CoM = None, homo = False, specie = None, elements = None): if homo == False: return [dista...
44.264271
132
0.558151
import numpy as np import os def distance(a, b): dx = abs(a[0] - b[0]) dy = abs(a[1] - b[1]) dz = abs(a[2] - b[2]) return np.sqrt(dx**2 + dy**2 + dz**2) def CoMDist(positions, CoM = None, homo = False, specie = None, elements = None): if homo == False: return [dista...
true
true
1c3497047196a31028998ae4617a866c66a753ef
4,399
py
Python
pygasus/model/decorators/lazy_property.py
talismud/pygasus
fb01c8bd51003b5a008b572182a96bad86ef769f
[ "BSD-3-Clause" ]
2
2021-11-18T09:35:10.000Z
2021-11-18T14:46:32.000Z
pygasus/model/decorators/lazy_property.py
talismud/pygasus
fb01c8bd51003b5a008b572182a96bad86ef769f
[ "BSD-3-Clause" ]
null
null
null
pygasus/model/decorators/lazy_property.py
talismud/pygasus
fb01c8bd51003b5a008b572182a96bad86ef769f
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 20201, LE GOFF Vincent # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and ...
33.838462
78
0.674926
_MISSING = object() class LazyPropertyDescriptor: def __init__(self, fget, fset=None): self.fget = fget self.fset = fset self.memory = {} def __get__(self, instance, owner=None): if instance is None: return self try: identifier...
true
true
1c34970ee35e01abe21bae0efd3466ad024f3479
298
py
Python
Lab 1. Routes/polyeditor/setup.py
Panda-Lewandowski/Software-engineering
f514c31bc665a54e4894bc6fab39f5cb4b2cbd70
[ "MIT" ]
1
2019-03-15T12:16:07.000Z
2019-03-15T12:16:07.000Z
Lab 1. Routes/polyeditor/setup.py
Panda-Lewandowski/Software-engineering
f514c31bc665a54e4894bc6fab39f5cb4b2cbd70
[ "MIT" ]
null
null
null
Lab 1. Routes/polyeditor/setup.py
Panda-Lewandowski/Software-engineering
f514c31bc665a54e4894bc6fab39f5cb4b2cbd70
[ "MIT" ]
1
2019-10-19T11:33:03.000Z
2019-10-19T11:33:03.000Z
from setuptools import setup, find_packages setup( name='polyeditor', version='polyeditor.__version__', packages=find_packages(), entry_points={ 'console_scripts': ['polyeditor = main:run_editor'] }, install_requires=[ 'PyQt5==5.10' ] )
19.866667
44
0.607383
from setuptools import setup, find_packages setup( name='polyeditor', version='polyeditor.__version__', packages=find_packages(), entry_points={ 'console_scripts': ['polyeditor = main:run_editor'] }, install_requires=[ 'PyQt5==5.10' ] )
true
true
1c349711beedf8b2182208c0042e23eada19e095
1,942
py
Python
old_python/ClassExpoSin.py
ChrisAndre/expsin
ab6960c009894989d668d13ab48f2517abf377a7
[ "MIT" ]
null
null
null
old_python/ClassExpoSin.py
ChrisAndre/expsin
ab6960c009894989d668d13ab48f2517abf377a7
[ "MIT" ]
null
null
null
old_python/ClassExpoSin.py
ChrisAndre/expsin
ab6960c009894989d668d13ab48f2517abf377a7
[ "MIT" ]
1
2020-04-10T10:24:01.000Z
2020-04-10T10:24:01.000Z
import math from ExpoSin import ExpoSin class ClassExpoSin(object): """ Represents the class of sinusoids defined by S_k2[r1, r2, psi, N]. An ExpoSin object can be constructed with this class using an initial tan(y1). """ def __init__(self, k2, r1, r2, angle, N=0): self.k2 = float(k2...
28.558824
90
0.553038
import math from ExpoSin import ExpoSin class ClassExpoSin(object): def __init__(self, k2, r1, r2, angle, N=0): self.k2 = float(k2) self.r1 = float(r1) self.r2 = float(r2) self.N = N self.psi = 2 * math.pi * N + angle def tany1Range(self): k2 = self.k2...
true
true
1c3499010d88c6042fb15ac3dc48e94eb92db3d9
2,915
py
Python
pluginbase.py
haizaar/iris
1efe07181cb0ec2307b1385d65160b534b40f9a7
[ "MIT" ]
50
2018-05-29T13:49:41.000Z
2022-03-31T03:19:14.000Z
pluginbase.py
haizaar/iris
1efe07181cb0ec2307b1385d65160b534b40f9a7
[ "MIT" ]
22
2018-06-25T13:39:53.000Z
2021-02-02T08:30:55.000Z
pluginbase.py
haizaar/iris
1efe07181cb0ec2307b1385d65160b534b40f9a7
[ "MIT" ]
7
2018-08-12T06:02:59.000Z
2021-02-05T05:01:29.000Z
# a simple Python plugin loading system # see http://stackoverflow.com/questions/14510286/plugin-architecture-plugin # -manager-vs-inspecting-from-plugins-import import logging from utils import utils class PluginMount(type): """ A plugin mount point derived from: http://martyalchin.com/2008/jan/10/...
24.70339
79
0.606518
import logging from utils import utils class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): cls.plugins = [] else: cls.register_plugin(cls) def register_plugin(cls, plugin): ...
true
true
1c349a8db700b8c7abfa0a3b61b22bc079dd4091
313
py
Python
electrum_mona/plugins/coldcard/__init__.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
61
2017-08-06T08:51:49.000Z
2021-12-28T06:25:36.000Z
electrum_mona/plugins/coldcard/__init__.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
15
2017-09-12T07:15:01.000Z
2021-12-28T06:25:15.000Z
electrum_mona/plugins/coldcard/__init__.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
27
2017-08-18T19:40:30.000Z
2021-03-01T11:16:02.000Z
from electrum_mona.i18n import _ fullname = 'Coldcard Wallet' description = 'Provides support for the Coldcard hardware wallet from Coinkite' requires = [('ckcc-protocol', 'github.com/Coldcard/ckcc-protocol')] registers_keystore = ('hardware', 'coldcard', _("Coldcard Wallet")) available_for = ['qt', 'cmdline']
39.125
79
0.753994
from electrum_mona.i18n import _ fullname = 'Coldcard Wallet' description = 'Provides support for the Coldcard hardware wallet from Coinkite' requires = [('ckcc-protocol', 'github.com/Coldcard/ckcc-protocol')] registers_keystore = ('hardware', 'coldcard', _("Coldcard Wallet")) available_for = ['qt', 'cmdline']
true
true
1c349bd13a11bf740063716d405c8f522ae73dfc
23,198
py
Python
tests/test_ext.py
iomintz/jinja
6b9eb6df5a7804ec4210bf449296aae71eb5cd3e
[ "BSD-3-Clause" ]
1
2020-07-06T05:53:18.000Z
2020-07-06T05:53:18.000Z
tests/test_ext.py
iomintz/jinja
6b9eb6df5a7804ec4210bf449296aae71eb5cd3e
[ "BSD-3-Clause" ]
null
null
null
tests/test_ext.py
iomintz/jinja
6b9eb6df5a7804ec4210bf449296aae71eb5cd3e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ jinja2.testsuite.ext ~~~~~~~~~~~~~~~~~~~~ Tests for the extensions. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import pytest from jinja2 import Environment, DictLoader, contextfunction, nodes from jinja2.exception...
38.857621
81
0.541254
import re import pytest from jinja2 import Environment, DictLoader, contextfunction, nodes from jinja2.exceptions import TemplateAssertionError from jinja2.ext import Extension from jinja2.lexer import Token, count_newlines from jinja2._compat import BytesIO, itervalues, text_type importable_object = 23 _gettext_re ...
true
true
1c349c39467a3ca68dc775d9b3b1980ea1bd73a5
7,700
py
Python
light_mappo-main/algorithms/algorithm/rMAPPOPolicy.py
daixiangxiang/Reinforcement_learning
90aabba61c609c5afd445205b94ebd87a309ff7c
[ "MIT" ]
null
null
null
light_mappo-main/algorithms/algorithm/rMAPPOPolicy.py
daixiangxiang/Reinforcement_learning
90aabba61c609c5afd445205b94ebd87a309ff7c
[ "MIT" ]
null
null
null
light_mappo-main/algorithms/algorithm/rMAPPOPolicy.py
daixiangxiang/Reinforcement_learning
90aabba61c609c5afd445205b94ebd87a309ff7c
[ "MIT" ]
null
null
null
""" # @Time : 2021/7/1 6:53 下午 # @Author : hezhiqiang01 # @Email : hezhiqiang01@baidu.com # @File : rMAPPOPolicy.py """ import torch from algorithms.algorithm.r_actor_critic import R_Actor, R_Critic from utils.util import update_linear_schedule #策略网络,网络定义 #每一个智能体的观测obs_space为一个14维的向量, # 有两个智能体,cent_obs_space...
54.225352
120
0.623117
import torch from algorithms.algorithm.r_actor_critic import R_Actor, R_Critic from utils.util import update_linear_schedule class RMAPPOPolicy: def __init__(self, args, obs_space, cent_obs_space, act_space, device=torch.device("cpu")): self.device = device self.lr = args.lr self.critic_l...
true
true
1c349d1c7cd02e86d19efc0c7a149bb9a4420182
160
py
Python
scripts/class-3/espiral_quadrado_colorido.py
GabrielMMelo/python4teens
287f79ada2f8ded669f6e26210e1407202e8ff80
[ "CC-BY-4.0" ]
2
2021-04-15T13:23:16.000Z
2022-02-01T18:31:58.000Z
scripts/class-3/espiral_quadrado_colorido.py
GabrielMMelo/python4teens
287f79ada2f8ded669f6e26210e1407202e8ff80
[ "CC-BY-4.0" ]
null
null
null
scripts/class-3/espiral_quadrado_colorido.py
GabrielMMelo/python4teens
287f79ada2f8ded669f6e26210e1407202e8ff80
[ "CC-BY-4.0" ]
null
null
null
import turtle t = turtle.Pen() colors = ['red', 'yellow', 'blue', 'green'] for x in range(100): t.pencolor(colors[x % 4]) t.forward(x) t.left(91)
16
43
0.58125
import turtle t = turtle.Pen() colors = ['red', 'yellow', 'blue', 'green'] for x in range(100): t.pencolor(colors[x % 4]) t.forward(x) t.left(91)
true
true
1c349db75db5924d77d96f3fb786e6ae7ddd3095
2,193
py
Python
py/winnt/ntpfapi.py
gregzakh/sketches
acbc573b9e67228dac21a94b597d89e2ea5cd755
[ "MIT" ]
1
2022-01-07T13:18:51.000Z
2022-01-07T13:18:51.000Z
py/winnt/ntpfapi.py
gregzakh/sketches
acbc573b9e67228dac21a94b597d89e2ea5cd755
[ "MIT" ]
null
null
null
py/winnt/ntpfapi.py
gregzakh/sketches
acbc573b9e67228dac21a94b597d89e2ea5cd755
[ "MIT" ]
4
2020-02-11T01:00:11.000Z
2022-01-07T14:24:38.000Z
import wintypes as nt from enum import IntEnum # ==================================================================================== PREFETCHER_INFORMATION_CLASS = IntEnum('PREFETCHER_INFORMATION_CLASS', ( 'PrefetcherRetrieveTrace', 'PrefetcherSystemParameters', 'PrefetcherBootPhase', 'PrefetcherR...
34.265625
87
0.652987
import wintypes as nt from enum import IntEnum PREFETCHER_INFORMATION_CLASS = IntEnum('PREFETCHER_INFORMATION_CLASS', ( 'PrefetcherRetrieveTrace', 'PrefetcherSystemParameters', 'PrefetcherBootPhase', 'PrefetcherRetrieveBootLoaderTrace', 'PrefetcherBootControl', ), start=1) class PREFETCHER_I...
true
true
1c349e0ca0b1a13e7b3972f3338a8e065eead2a7
4,430
py
Python
scripts/linreg_2d_bayes_demo.py
GSxiongkun/pyprobml
71b2ce90632b80206760f93ab2a1926ce6c8c490
[ "MIT" ]
1
2020-03-01T09:01:37.000Z
2020-03-01T09:01:37.000Z
scripts/linreg_2d_bayes_demo.py
etarakci-hvl/pyprobml
a3fe8086844ae0885e3f21d30be5f2e6448cdeba
[ "MIT" ]
null
null
null
scripts/linreg_2d_bayes_demo.py
etarakci-hvl/pyprobml
a3fe8086844ae0885e3f21d30be5f2e6448cdeba
[ "MIT" ]
null
null
null
#Bayesian inference for simple linear regression with known noise variance #The goal is to reproduce fig 3.7 from Bishop's book. #We fit the linear model f(x,w) = w0 + w1*x and plot the posterior over w. import numpy as np import matplotlib.pyplot as plt import os figdir = os.path.join(os.environ["PYPROBML"], "figures...
33.308271
110
0.669074
#We fit the linear model f(x,w) = w0 + w1*x and plot the posterior over w. import numpy as np import matplotlib.pyplot as plt import os figdir = os.path.join(os.environ["PYPROBML"], "figures") def save_fig(fname): plt.savefig(os.path.join(figdir, fname)) from scipy.stats import uniform, norm, multivariate_normal np...
true
true
1c349ebd61d9069a9e48f5a9811d7b1aa8425dc1
2,095
py
Python
api/app/resources/bookings/booking/booking_recurring_delete.py
sumesh-aot/queue-management
d8de45c2d94c1a557c8f8d207d73a067709d5abb
[ "Apache-2.0" ]
null
null
null
api/app/resources/bookings/booking/booking_recurring_delete.py
sumesh-aot/queue-management
d8de45c2d94c1a557c8f8d207d73a067709d5abb
[ "Apache-2.0" ]
null
null
null
api/app/resources/bookings/booking/booking_recurring_delete.py
sumesh-aot/queue-management
d8de45c2d94c1a557c8f8d207d73a067709d5abb
[ "Apache-2.0" ]
null
null
null
'''Copyright 2018 Province of British Columbia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
36.12069
98
0.692601
from flask import abort, g, request from flask_restx import Resource from app.models.bookings import Booking from app.schemas.bookings import BookingSchema from app.models.theq import CSR from qsystem import api, db, oidc from datetime import datetime, timedelta, date import pytz from app.utilities.auth_util import Ro...
true
true
1c349f75e2a32387801b8a5e9f6d1335ce053c3a
1,139
py
Python
docs/examples/tar_and_transfer.py
rohithj494/gladier
00fc1cfd0a05f6f18b94b8afd9fef2503d2d3189
[ "Apache-2.0" ]
null
null
null
docs/examples/tar_and_transfer.py
rohithj494/gladier
00fc1cfd0a05f6f18b94b8afd9fef2503d2d3189
[ "Apache-2.0" ]
null
null
null
docs/examples/tar_and_transfer.py
rohithj494/gladier
00fc1cfd0a05f6f18b94b8afd9fef2503d2d3189
[ "Apache-2.0" ]
null
null
null
from gladier import GladierBaseClient, generate_flow_definition from pprint import pprint @generate_flow_definition class TarAndTransfer(GladierBaseClient): gladier_tools = [ 'gladier_tools.posix.Tar', 'gladier_tools.globus.Transfer', ] if __name__ == '__main__': flow_input = { '...
33.5
88
0.652327
from gladier import GladierBaseClient, generate_flow_definition from pprint import pprint @generate_flow_definition class TarAndTransfer(GladierBaseClient): gladier_tools = [ 'gladier_tools.posix.Tar', 'gladier_tools.globus.Transfer', ] if __name__ == '__main__': flow_input = { '...
true
true
1c349fa995d70055f33e2ce41fb93d7724b0fda2
6,569
py
Python
CenterNet/src/lib/datasets/sample/ctdet.py
Kalana304/KORSAL
b7a0c7cf5428f632e99d2ca5c5e10a8288f10cc0
[ "MIT" ]
null
null
null
CenterNet/src/lib/datasets/sample/ctdet.py
Kalana304/KORSAL
b7a0c7cf5428f632e99d2ca5c5e10a8288f10cc0
[ "MIT" ]
null
null
null
CenterNet/src/lib/datasets/sample/ctdet.py
Kalana304/KORSAL
b7a0c7cf5428f632e99d2ca5c5e10a8288f10cc0
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch.utils.data as data import numpy as np import torch import json import cv2 import os from utils.image import flip, color_aug from utils.image import get_affine_transform, affine_transform from utils...
39.812121
109
0.601309
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch.utils.data as data import numpy as np import torch import json import cv2 import os from utils.image import flip, color_aug from utils.image import get_affine_transform, affine_transform from utils...
true
true
1c349fb946612a0b2377a7062161d9e4e668d838
11,090
py
Python
src/pymordemos/parabolic_mor.py
pdiercks/pymor
e94f05714d666a929113543c49e88f8f494d64e1
[ "Unlicense" ]
null
null
null
src/pymordemos/parabolic_mor.py
pdiercks/pymor
e94f05714d666a929113543c49e88f8f494d64e1
[ "Unlicense" ]
4
2022-03-17T10:07:38.000Z
2022-03-30T12:41:06.000Z
src/pymordemos/parabolic_mor.py
pdiercks/pymor
e94f05714d666a929113543c49e88f8f494d64e1
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) """Reduced basis approximation of the heat equation. Usage: parabolic_mor...
36.966667
120
0.543823
from functools import partial import numpy as np from pymor.basic import * from pymor.algorithms.timestepping import ImplicitEulerTimeStepper GRID_INTERVALS = 100 FENICS_ORDER = 2 NT = 100 DT = 1. / NT def discretize_pymor(): problem = InstationaryProblem( StationaryProblem( ...
true
true
1c34a019bc2a84af2cf1508a4ea7650b0bff1654
1,918
py
Python
python/leetcode/92.py
ParkinWu/leetcode
b31312bdefbb2be795f3459e1a76fbc927cab052
[ "MIT" ]
null
null
null
python/leetcode/92.py
ParkinWu/leetcode
b31312bdefbb2be795f3459e1a76fbc927cab052
[ "MIT" ]
null
null
null
python/leetcode/92.py
ParkinWu/leetcode
b31312bdefbb2be795f3459e1a76fbc927cab052
[ "MIT" ]
null
null
null
# Definition for singly-linked list. from typing import List class ListNode: def __init__(self, x): self.val = x self.next = None def __str__(self): s = "" current = self s = s + str(current.val) while current.next: current = current.next ...
23.679012
73
0.48488
from typing import List class ListNode: def __init__(self, x): self.val = x self.next = None def __str__(self): s = "" current = self s = s + str(current.val) while current.next: current = current.next s = s + " -> " s = s + s...
true
true
1c34a0cb90a2d100b1f2c378ba1603f1e5f1e482
4,443
py
Python
ethereumetl/mappers/transaction_mapper.py
spicehq/ethereum-etl
ab76507fa32e9c89620b158b5448696daa87c6f4
[ "MIT" ]
null
null
null
ethereumetl/mappers/transaction_mapper.py
spicehq/ethereum-etl
ab76507fa32e9c89620b158b5448696daa87c6f4
[ "MIT" ]
1
2022-03-29T07:21:53.000Z
2022-03-29T07:21:53.000Z
ethereumetl/mappers/transaction_mapper.py
spicehq/ethereum-etl
ab76507fa32e9c89620b158b5448696daa87c6f4
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018 Evgeny Medvedev, evge.medvedev@gmail.com # # 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 # ...
53.53012
109
0.720684
from ethereumetl.domain.transaction import EthTransaction from ethereumetl.utils import hex_to_dec, to_normalized_address class EthTransactionMapper: @staticmethod def json_dict_to_transaction(json_dict, **kwargs): transaction = EthTransaction() transaction.hash = json_dict.get('hash') ...
true
true
1c34a0f87d311d932eeb2628cecf25e5e20da33e
1,619
py
Python
tests/calc_area_of_bbox.py
hitfee01/rtm3d
9e872c1bf857234d17c8863be6006722d4aab283
[ "MIT" ]
2
2021-01-22T01:21:24.000Z
2021-04-14T02:46:29.000Z
tests/calc_area_of_bbox.py
hitfee01/rtm3d
9e872c1bf857234d17c8863be6006722d4aab283
[ "MIT" ]
5
2021-01-14T03:18:44.000Z
2021-05-26T02:24:45.000Z
tests/calc_area_of_bbox.py
hitfee01/rtm3d
9e872c1bf857234d17c8863be6006722d4aab283
[ "MIT" ]
2
2021-04-14T02:46:35.000Z
2021-08-09T01:49:11.000Z
import argparse from utils import utils import yaml from datasets.dataset_reader import DatasetReader import os from preprocess.data_preprocess import TestTransform import random import cv2 import numpy as np import tqdm from models.configs.detault import CONFIGS as config from datasets.data.kitti.devkit_object import ...
34.446809
102
0.696109
import argparse from utils import utils import yaml from datasets.dataset_reader import DatasetReader import os from preprocess.data_preprocess import TestTransform import random import cv2 import numpy as np import tqdm from models.configs.detault import CONFIGS as config from datasets.data.kitti.devkit_object import ...
true
true
1c34a32c354ce518d6cd601a25f2b12820f04509
9,167
py
Python
docs/conf.py
ttutko/python_oidc
d090e29278533a367dfd2a91f8ecca0fa53fc5e2
[ "MIT" ]
null
null
null
docs/conf.py
ttutko/python_oidc
d090e29278533a367dfd2a91f8ecca0fa53fc5e2
[ "MIT" ]
null
null
null
docs/conf.py
ttutko/python_oidc
d090e29278533a367dfd2a91f8ecca0fa53fc5e2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import os impo...
33.578755
85
0.703502
import os import sys import inspect import shutil __location__ = os.path.join(os.getcwd(), os.path.dirname( inspect.getfile(inspect.currentframe()))) sys.path.insert(0, os.path.join(__location__, '../src')) # setup.py install" in the RTD Advanced Settings. # Additionally it helps us to avoid running apidoc manu...
true
true
1c34a3939c7708c6b8b63b555e8b62e83c9f1c76
3,179
py
Python
hacksec_cli/mechanism/upcoming/upcoming.py
hacksec-in/hacksec-cli
18c1c350c21fcab9c5d1c1d799ffda80ac655251
[ "MIT" ]
4
2021-08-30T16:02:05.000Z
2022-01-05T14:49:05.000Z
hacksec_cli/mechanism/upcoming/upcoming.py
ScRiPt1337/hacksec-cli
18c1c350c21fcab9c5d1c1d799ffda80ac655251
[ "MIT" ]
1
2021-09-11T07:35:28.000Z
2021-09-11T16:09:30.000Z
hacksec_cli/mechanism/upcoming/upcoming.py
ScRiPt1337/hacksec-cli
18c1c350c21fcab9c5d1c1d799ffda80ac655251
[ "MIT" ]
2
2021-09-03T02:40:49.000Z
2022-01-05T14:49:08.000Z
from rich.console import Console from rich.table import Table import os console = Console() class upcoming_machine(): """upcoming machines class""" def get_data(self, request): """fetch upcoming machines data""" data = request.get(endpoint="/machines/upcoming") return da...
46.072464
122
0.568732
from rich.console import Console from rich.table import Table import os console = Console() class upcoming_machine(): def get_data(self, request): data = request.get(endpoint="/machines/upcoming") return data[0], data[1] def show_upcoming_machines(self, data): table = ...
true
true
1c34a504c04161e81ae8c9a241e05d32bdea3088
335
py
Python
Py Apple Dynamics V7.3 SRC/PA-Dynamics V7.3/config_s.py
musen142/py-apple-dynamics
95f831ecf9c9167e9709c63deabc989eda6bf669
[ "Apache-2.0" ]
1
2022-01-18T11:47:29.000Z
2022-01-18T11:47:29.000Z
Py Apple Dynamics V7.3 SRC/PA-Dynamics V7.3/config_s.py
musen142/py-apple-dynamics
95f831ecf9c9167e9709c63deabc989eda6bf669
[ "Apache-2.0" ]
null
null
null
Py Apple Dynamics V7.3 SRC/PA-Dynamics V7.3/config_s.py
musen142/py-apple-dynamics
95f831ecf9c9167e9709c63deabc989eda6bf669
[ "Apache-2.0" ]
null
null
null
init_1h=90 init_1s=90 init_2h=90 init_2s=90 init_3h=90 init_3s=90 init_4h=90 init_4s=90 l1=80 l2=69 l=142 b=92.8 w=108 speed=0.05 h=30 Kp_H=0.06 pit_Kp_G=0.04 pit_Kd_G=0.6 rol_Kp_G=0.04 rol_Kd_G=0.35 tran_mov_kp=0.1 CC_M=0 walk_h=50 walk_speed=0.02 ma_case=0 trot_cg_f=4 trot_cg_b=4 trot_cg_t...
5.403226
15
0.704478
init_1h=90 init_1s=90 init_2h=90 init_2s=90 init_3h=90 init_3s=90 init_4h=90 init_4s=90 l1=80 l2=69 l=142 b=92.8 w=108 speed=0.05 h=30 Kp_H=0.06 pit_Kp_G=0.04 pit_Kd_G=0.6 rol_Kp_G=0.04 rol_Kd_G=0.35 tran_mov_kp=0.1 CC_M=0 walk_h=50 walk_speed=0.02 ma_case=0 trot_cg_f=4 trot_cg_b=4 trot_cg_t...
true
true
1c34a549cd57e117fc5dda9459bde878e19744b6
2,581
py
Python
astrodom/gui/dashBoardWindowGui.py
fenriques/AstroDom
84b54d3299cf591c39b214248339a201ae8ae6ca
[ "MIT" ]
8
2020-05-17T14:57:08.000Z
2020-12-20T12:29:43.000Z
astrodom/gui/dashBoardWindowGui.py
fenriques/AstroDom
84b54d3299cf591c39b214248339a201ae8ae6ca
[ "MIT" ]
2
2020-06-04T20:49:09.000Z
2020-09-04T12:35:07.000Z
astrodom/gui/dashBoardWindowGui.py
fenriques/AstroDom
84b54d3299cf591c39b214248339a201ae8ae6ca
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'dashBoardWindow.ui' # # Created by: PyQt5 UI code generator 5.13.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog...
47.796296
108
0.74351
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(865, 741) self.verticalLayout_3 = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout_3.setObjectName("verticalLayout_3") self.groupB...
true
true
1c34a628700e2282d78c8d67525397d4f4fbeb16
1,558
py
Python
core/migrations/0021_pumping.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
922
2017-10-26T13:15:40.000Z
2020-02-05T19:06:13.000Z
core/migrations/0021_pumping.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
109
2017-10-26T14:00:30.000Z
2020-02-05T23:37:11.000Z
core/migrations/0021_pumping.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
87
2017-10-26T13:15:54.000Z
2020-01-25T12:49:46.000Z
# Generated by Django 4.0.3 on 2022-04-04 15:34 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("core", "0020_bmi_tags_diaperchange_tags_feeding_tags_and_more"), ] operations = [ migrations.CreateModel( ...
31.16
82
0.425546
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("core", "0020_bmi_tags_diaperchange_tags_feeding_tags_and_more"), ] operations = [ migrations.CreateModel( name="Pumping", fields=[ ...
true
true
1c34a6291a643e3bbac29e4c5019e462216187d0
7,879
py
Python
scaffold/scaffold.py
q0w/stg44
47fa2d9a5161b4e9165aa916eee24782f46679b1
[ "MIT" ]
null
null
null
scaffold/scaffold.py
q0w/stg44
47fa2d9a5161b4e9165aa916eee24782f46679b1
[ "MIT" ]
21
2020-11-13T17:06:52.000Z
2020-12-06T15:40:30.000Z
scaffold/scaffold.py
q0w/manny
47fa2d9a5161b4e9165aa916eee24782f46679b1
[ "MIT" ]
null
null
null
import os import subprocess import sys from django.core.management import CommandError from scaffold.kit.colors import TermColor from scaffold.kit.templates import ( FieldTemplate, ModelTemplate, SerializerTemplate, UrlTemplate, ViewTemplate, CommonTemplate, ) from scaffold.kit.utils import Wa...
36.308756
99
0.584846
import os import subprocess import sys from django.core.management import CommandError from scaffold.kit.colors import TermColor from scaffold.kit.templates import ( FieldTemplate, ModelTemplate, SerializerTemplate, UrlTemplate, ViewTemplate, CommonTemplate, ) from scaffold.kit.utils import Wa...
true
true
1c34a696474756e5c7ec2ad619cef2ac54d11268
1,077
py
Python
ddb/feature/ytt/__init__.py
gfi-centre-ouest/docker-devbox-ddb
1597d85ef6e9e8322cce195a454de54186ce9ec7
[ "MIT" ]
4
2020-06-11T20:54:47.000Z
2020-09-22T13:07:17.000Z
ddb/feature/ytt/__init__.py
gfi-centre-ouest/docker-devbox-ddb
1597d85ef6e9e8322cce195a454de54186ce9ec7
[ "MIT" ]
113
2019-11-07T00:40:36.000Z
2021-01-18T12:50:16.000Z
ddb/feature/ytt/__init__.py
inetum-orleans/docker-devbox-ddb
20c713cf7bfcaf289226a17a9648c17d16003b4d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from typing import ClassVar, Iterable from dotty_dict import Dotty from ddb.action import Action from ddb.feature import Feature from .actions import YttAction from .schema import YttSchema from ...utils.file import TemplateFinder class YttFeature(Feature): """ Render template files ...
24.477273
75
0.630455
from typing import ClassVar, Iterable from dotty_dict import Dotty from ddb.action import Action from ddb.feature import Feature from .actions import YttAction from .schema import YttSchema from ...utils.file import TemplateFinder class YttFeature(Feature): @property def name(self) -> str: return "...
true
true
1c34a90004311f67906c6ddffd962fb446f1d3c1
12,670
py
Python
python/fetch_stats.py
IFTS/ads-platform-tools
e6a1a4bcc2e3bbfc902565bfea9004a2ec80c0b8
[ "Apache-2.0" ]
null
null
null
python/fetch_stats.py
IFTS/ads-platform-tools
e6a1a4bcc2e3bbfc902565bfea9004a2ec80c0b8
[ "Apache-2.0" ]
null
null
null
python/fetch_stats.py
IFTS/ads-platform-tools
e6a1a4bcc2e3bbfc902565bfea9004a2ec80c0b8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # import requests import oauth2 as oauth import yaml # import urllib import json import os import time # import pytz import datetime import argparse import re import sys DOMAIN = 'https://ads-api.twitter.com' VERBOSE = 0 NON_SUB_PARAM_SEGMENTATION_TYPES = ['PLATFORMS', 'LOCATIONS', 'GENDER', 'I...
36.2
100
0.627309
import oauth2 as oauth import yaml import json import os import time import datetime import argparse import re import sys DOMAIN = 'https://ads-api.twitter.com' VERBOSE = 0 NON_SUB_PARAM_SEGMENTATION_TYPES = ['PLATFORMS', 'LOCATIONS', 'GENDER', 'INTERESTS', 'KEYWORDS'] def main(options): global VERBOSE acc...
true
true
1c34a93ae2bd9277a4dc8c36d811381ee461f571
20,333
py
Python
tensorflow/python/keras/legacy_tf_layers/pooling.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/python/keras/legacy_tf_layers/pooling.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/python/keras/legacy_tf_layers/pooling.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
41.837449
80
0.680962
import warnings from tensorflow.python.keras import layers as keras_layers from tensorflow.python.keras.legacy_tf_layers import base from tensorflow.python.util.tf_export import keras_export from tensorflow.python.util.tf_export import tf_export @keras_export(v1=['keras.__internal__.legacy.layers.AveragePooling1D'])...
true
true
1c34a9d14522f5765d93c55935a02b61f39cd5a8
4,949
py
Python
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
46.252336
109
0.736108
from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.deployments_operations import DeploymentsOperations from .operations.providers_operations import ProvidersOperations from .operations.resource...
true
true
1c34aa2b27f5bb6516cbd5dc6fc230dfc8b8ad9b
260
py
Python
lang/py/rfc/20/multiprocessing/connection_client_20_3_6.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/20/multiprocessing/connection_client_20_3_6.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/20/multiprocessing/connection_client_20_3_6.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:UTF-8 from multiprocessing.connection import Client conn = Client(('45.77.93.132', 15000), authkey=b'12345') conn.send((3, 5)) r = conn.recv() print(r) conn.send(("hello", "world")) r = conn.recv() print(r) conn.close()
16.25
56
0.657692
from multiprocessing.connection import Client conn = Client(('45.77.93.132', 15000), authkey=b'12345') conn.send((3, 5)) r = conn.recv() print(r) conn.send(("hello", "world")) r = conn.recv() print(r) conn.close()
true
true
1c34aa6b9a93347f198a6efead0a8d1dfecf2e32
2,671
py
Python
jarviscli/plugins/quote.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
1
2019-10-03T13:39:19.000Z
2019-10-03T13:39:19.000Z
jarviscli/plugins/quote.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
null
null
null
jarviscli/plugins/quote.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
null
null
null
import requests import bs4 from six.moves import input import json from plugin import plugin, require @require(network=True) @plugin('quote') class Quote(): """ quote prints quote for the day for you or quotes based on a given keyword """ def __call__(self, jarvis, s): prompt = 'Press 1 to ge...
31.797619
97
0.565331
import requests import bs4 from six.moves import input import json from plugin import plugin, require @require(network=True) @plugin('quote') class Quote(): def __call__(self, jarvis, s): prompt = 'Press 1 to get the quote of the day \n or 2 to get quotes based on a keyword: ' user_input = self.g...
true
true