hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f703a432e4ed647c1bb292ffa21bc5f491234419
628
py
Python
manage.py
dyhmzall/budget
693ed201ce65ec5f2656759c8d417ca24a49416b
[ "MIT" ]
null
null
null
manage.py
dyhmzall/budget
693ed201ce65ec5f2656759c8d417ca24a49416b
[ "MIT" ]
1
2021-02-02T10:03:33.000Z
2021-02-02T10:03:33.000Z
manage.py
dyhmzall/budget
693ed201ce65ec5f2656759c8d417ca24a49416b
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "geekshop.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise Impor...
28.545455
73
0.683121
import os import sys def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "geekshop.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f703a44c1907fc72f119630ad4366b80be2e6fbf
3,795
py
Python
wb/main/jobs/export_inference_report/export_inference_report_job.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
23
2022-03-17T12:24:09.000Z
2022-03-31T09:13:30.000Z
wb/main/jobs/export_inference_report/export_inference_report_job.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
18
2022-03-21T08:17:44.000Z
2022-03-30T12:42:30.000Z
wb/main/jobs/export_inference_report/export_inference_report_job.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
16
2022-03-17T12:24:14.000Z
2022-03-31T12:15:12.000Z
""" OpenVINO DL Workbench Class for creation job for creating and exporting inference report Copyright (c) 2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://...
46.851852
110
0.680896
import csv import json import os from contextlib import closing from sqlalchemy.orm import Session from wb.extensions_factories.database import get_db_session_for_celery from wb.main.enumerates import JobTypesEnum, StatusEnum from wb.main.jobs.interfaces.ijob import IJob from wb.main.jobs.interfaces.job_observers imp...
true
true
f703a44ccaf83acb8a92c16a75f05aff6da856a0
109
py
Python
caffe-tensorflow/kaffe/errors.py
petercheng00/PSPNet-Keras-tensorflow
d50583786a3e8782dd1b735d268e57392cd8c646
[ "MIT" ]
3,209
2015-11-10T06:52:59.000Z
2022-03-10T05:17:28.000Z
caffe-tensorflow/kaffe/errors.py
petercheng00/PSPNet-Keras-tensorflow
d50583786a3e8782dd1b735d268e57392cd8c646
[ "MIT" ]
207
2017-01-01T17:58:57.000Z
2021-11-06T21:40:14.000Z
caffe-tensorflow/kaffe/errors.py
petercheng00/PSPNet-Keras-tensorflow
d50583786a3e8782dd1b735d268e57392cd8c646
[ "MIT" ]
1,218
2015-11-10T23:55:48.000Z
2022-01-07T07:36:57.000Z
import sys class KaffeError(Exception): pass def print_stderr(msg): sys.stderr.write('%s\n' % msg)
13.625
34
0.678899
import sys class KaffeError(Exception): pass def print_stderr(msg): sys.stderr.write('%s\n' % msg)
true
true
f703a55785709def35ca98b2131d75c174529cbf
1,241
py
Python
tests/test_handler.py
priyanshu-kumar02/personfinder
d5390b60709cd0ccaaade9a3b6224a60cd523ed9
[ "Apache-2.0" ]
561
2015-02-16T07:59:42.000Z
2022-03-30T17:31:21.000Z
tests/test_handler.py
Anthonymcqueen21/personfinder
ee7791fbc434eb4ec5cfad449288a1e884db5b1e
[ "Apache-2.0" ]
591
2015-01-30T05:09:30.000Z
2022-02-26T09:31:25.000Z
tests/test_handler.py
Anthonymcqueen21/personfinder
ee7791fbc434eb4ec5cfad449288a1e884db5b1e
[ "Apache-2.0" ]
258
2015-01-25T18:35:12.000Z
2021-12-25T01:44:14.000Z
# Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
34.472222
74
0.734085
__author__ = 'lschumacher@google.com (Lee Schumacher)' import main import webob import urllib from google.appengine.ext import webapp def initialize_handler( handler_class, action, repo='haiti', environ=None, params=None): params_str = ('?' + urllib.urlencode(params)) if params else '' ...
true
true
f703a5c45317e7de4cb67aaa0ea6702a7d8961c4
1,832
py
Python
chainer/functions/array/copy.py
Evanc123/chainer
929af7189b1271683200aa9b0ba6da2dd3dee110
[ "MIT" ]
90
2017-02-23T04:04:47.000Z
2020-04-09T12:06:50.000Z
chainer/functions/array/copy.py
Evanc123/chainer
929af7189b1271683200aa9b0ba6da2dd3dee110
[ "MIT" ]
7
2017-07-23T13:38:06.000Z
2018-07-10T07:09:03.000Z
chainer/functions/array/copy.py
Evanc123/chainer
929af7189b1271683200aa9b0ba6da2dd3dee110
[ "MIT" ]
32
2017-02-28T07:40:38.000Z
2021-02-17T11:33:09.000Z
from chainer.backends import cuda from chainer import function_node from chainer.utils import type_check class Copy(function_node.FunctionNode): """Copies the input variable onto the specified device.""" def __init__(self, out_device): self.out_device = out_device def check_type_forward(self, i...
29.079365
78
0.617358
from chainer.backends import cuda from chainer import function_node from chainer.utils import type_check class Copy(function_node.FunctionNode): def __init__(self, out_device): self.out_device = out_device def check_type_forward(self, in_types): type_check.expect( in_types.size(...
true
true
f703a604a7bd2e331c356593203c89fd82af1046
1,031
py
Python
program_helper/ast/ops/leaf_ops/DSymtabMod.py
jajajaqlt/nsg
1873f2b5e10441110c3c69940ceb4650f9684ac0
[ "Apache-2.0" ]
10
2021-11-02T18:30:38.000Z
2022-03-21T06:31:33.000Z
program_helper/ast/ops/leaf_ops/DSymtabMod.py
rohanmukh/nag
f2c4b8e60a97c58a6a1c549cc8b4753ebfe8a5e3
[ "Apache-2.0" ]
2
2021-11-05T18:40:42.000Z
2022-03-30T04:33:08.000Z
program_helper/ast/ops/leaf_ops/DSymtabMod.py
rohanmukh/nag
f2c4b8e60a97c58a6a1c549cc8b4753ebfe8a5e3
[ "Apache-2.0" ]
2
2021-11-03T19:14:06.000Z
2021-11-03T23:47:09.000Z
# Copyright 2017 Rice University # # 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 writin...
33.258065
76
0.71775
from program_helper.ast.ops import Node from utilities.vocab_building_dictionary import DELIM class DSymtabMod(Node): def __init__(self, val, type_helper=None, child=None, sibling=None): super().__init__(val, child, sibling) self.type_helper = type_h...
true
true
f703a64b7295f2cbaa086ee03b51c095d6f49bc4
263
py
Python
app/forms/producao_finalizada_form.py
pedroferronato/gerenciamento-rural
5ed873caf9fdf1da2a26938b8cee57b55e7636f0
[ "MIT" ]
null
null
null
app/forms/producao_finalizada_form.py
pedroferronato/gerenciamento-rural
5ed873caf9fdf1da2a26938b8cee57b55e7636f0
[ "MIT" ]
null
null
null
app/forms/producao_finalizada_form.py
pedroferronato/gerenciamento-rural
5ed873caf9fdf1da2a26938b8cee57b55e7636f0
[ "MIT" ]
null
null
null
from datetime import date from flask_wtf import FlaskForm from wtforms import StringField class ProducaoFinalizadasForm(FlaskForm): nome = StringField('Nome:') data_comeco = StringField('Data de início:') data_coleta = StringField('Data de coleta:')
29.222222
48
0.768061
from datetime import date from flask_wtf import FlaskForm from wtforms import StringField class ProducaoFinalizadasForm(FlaskForm): nome = StringField('Nome:') data_comeco = StringField('Data de início:') data_coleta = StringField('Data de coleta:')
true
true
f703a650e127f5b3b3e5ba7bf6a53f3f2cf81f06
2,501
py
Python
automox_console_sdk/models/one_of_device_filters_inner_value_items.py
AutomoxCommunity/automox-console-sdk-python
9e921b138d63f90750e071d0a40e1d7edfa06733
[ "MIT" ]
1
2021-10-05T22:09:10.000Z
2021-10-05T22:09:10.000Z
automox_console_sdk/models/one_of_device_filters_inner_value_items.py
AutomoxCommunity/automox-console-sdk-python
9e921b138d63f90750e071d0a40e1d7edfa06733
[ "MIT" ]
1
2021-09-16T06:00:51.000Z
2021-09-16T06:00:51.000Z
automox_console_sdk/models/one_of_device_filters_inner_value_items.py
AutomoxCommunity/automox-console-sdk-python
9e921b138d63f90750e071d0a40e1d7edfa06733
[ "MIT" ]
4
2021-09-16T02:35:32.000Z
2022-02-16T01:09:57.000Z
# coding: utf-8 """ Automox Console API API for use with the Automox Console # noqa: E501 OpenAPI spec version: 2021-11-16 Contact: support@automox.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class OneOfDeviceFilter...
29.423529
90
0.565774
import pprint import re import six class OneOfDeviceFiltersInnerValueItems(object): swagger_types = { } attribute_map = { } def __init__(self): self.discriminator = None def to_dict(self): result = {} for attr, _ in six.iteritems(self.swagger_types): ...
true
true
f703a6f04b8a6b8bcf74cd1faf596071853ca5d0
13,045
py
Python
src/TDRPG.py
codysandahl/pygamer-simple-rpg
ebb7be7e474a95dfa29c1f7055ad0f7ed2b3101e
[ "MIT" ]
null
null
null
src/TDRPG.py
codysandahl/pygamer-simple-rpg
ebb7be7e474a95dfa29c1f7055ad0f7ed2b3101e
[ "MIT" ]
null
null
null
src/TDRPG.py
codysandahl/pygamer-simple-rpg
ebb7be7e474a95dfa29c1f7055ad0f7ed2b3101e
[ "MIT" ]
null
null
null
import ugame import stage import utils GAME = None ####################################################### # Game class Game(stage.Stage): """Base class for a game and its display""" # TODO: add game state machine # TODO: make each screen a state, and make a transition between them when player overlaps with t...
32.289604
164
0.630433
import ugame import stage import utils GAME = None pauseObject): self._pauseObject = pauseObject def resume(self): self._pauseObject = None self._curFramesWaiting = 0 def gameLoop(self): while True: if self._pauseObject: self._pauseObject.update() elif self._curFramesWaiting ...
true
true
f703a7594603428c46c23789bb1ed339b09979a3
1,136
py
Python
kubi_ecs_logger/models/root_schema.py
kumina/kubi_ecs_logger
64d9519e0759a24253a4edc53e0c024675033d1c
[ "BSD-3-Clause" ]
6
2019-12-15T12:47:06.000Z
2022-01-11T08:54:58.000Z
kubi_ecs_logger/models/root_schema.py
kumina/kubi_ecs_logger
64d9519e0759a24253a4edc53e0c024675033d1c
[ "BSD-3-Clause" ]
null
null
null
kubi_ecs_logger/models/root_schema.py
kumina/kubi_ecs_logger
64d9519e0759a24253a4edc53e0c024675033d1c
[ "BSD-3-Clause" ]
null
null
null
""" TODO: Add doc what this file is doing """ from marshmallow import Schema, post_dump class RootSchema(Schema): SKIP_VALUES = [None] @post_dump def remove_skip_values(self, data, many, **kwargs): return { key: value for key, value in data.items() if value not in self.SKI...
32.457143
66
0.553697
from marshmallow import Schema, post_dump class RootSchema(Schema): SKIP_VALUES = [None] @post_dump def remove_skip_values(self, data, many, **kwargs): return { key: value for key, value in data.items() if value not in self.SKIP_VALUES } @post_dump(pass_origin...
true
true
f703a7955d6abdc825910fe297297ee33f76baef
830
py
Python
tensorflow/super_resolution/syndicai.py
muchemwal/models
49fd0a8a61b0e5dab196014bf47de7f62d97c884
[ "MIT" ]
2
2021-09-25T04:24:15.000Z
2022-01-19T14:04:36.000Z
tensorflow/super_resolution/syndicai.py
muchemwal/models
49fd0a8a61b0e5dab196014bf47de7f62d97c884
[ "MIT" ]
53
2020-11-13T19:07:45.000Z
2022-01-19T14:04:24.000Z
tensorflow/super_resolution/syndicai.py
muchemwal/models
49fd0a8a61b0e5dab196014bf47de7f62d97c884
[ "MIT" ]
12
2020-10-16T11:41:35.000Z
2022-03-16T05:58:10.000Z
import os import io import time import base64 import functools from PIL import Image import numpy as np import tensorflow as tf import tensorflow_hub as hub from helpers import * os.environ["TFHUB_DOWNLOAD_PROGRESS"] = "True" class PythonPredictor: def __init__(self, config): # Import TF-Hub module ...
23.055556
81
0.674699
import os import io import time import base64 import functools from PIL import Image import numpy as np import tensorflow as tf import tensorflow_hub as hub from helpers import * os.environ["TFHUB_DOWNLOAD_PROGRESS"] = "True" class PythonPredictor: def __init__(self, config): self.hub_module =...
true
true
f703a8de7f659bb95c04b8627c44e3b904c79da1
7,768
py
Python
sc2_academy/ppo/my_epsilon_greedy_policy.py
Ricechrispi/sc2_academy
9ffed467fe019262035ac61d10c5cc3ee64a7bb2
[ "Apache-2.0" ]
2
2020-09-24T12:02:01.000Z
2022-01-24T11:05:41.000Z
sc2_academy/ppo/my_epsilon_greedy_policy.py
Ricechrispi/sc2_academy
9ffed467fe019262035ac61d10c5cc3ee64a7bb2
[ "Apache-2.0" ]
null
null
null
sc2_academy/ppo/my_epsilon_greedy_policy.py
Ricechrispi/sc2_academy
9ffed467fe019262035ac61d10c5cc3ee64a7bb2
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The TF-Agents 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...
44.136364
109
0.686535
from __future__ import absolute_import from __future__ import division from __future__ import print_function from typing import Optional, Text import tensorflow as tf import tensorflow_probability as tfp from tf_agents.bandits.policies import policy_utilities from tf_agents.policies import ...
true
true
f703a9c862cb7b5a61c531b4c724bf4d85a76283
792
py
Python
Perro/tienda.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
Perro/tienda.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
Perro/tienda.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
from os import system def comprar(comida, juguetes): comprado = "" while not comprado: system("cls") comprar = (input("Que quiere comprar? Alimentos | Juguetes : ")).lower() if comprar == "alimento": print(f"Carne: {comida['carne']['cantidad']}|Agua: {comida['agua']['cantidad']}|Huesos: {comida['hueso'...
24.75
122
0.638889
from os import system def comprar(comida, juguetes): comprado = "" while not comprado: system("cls") comprar = (input("Que quiere comprar? Alimentos | Juguetes : ")).lower() if comprar == "alimento": print(f"Carne: {comida['carne']['cantidad']}|Agua: {comida['agua']['cantidad']}|Huesos: {comida['hueso'...
true
true
f703ab7f383253a03a598122cf344f36aac5f4c1
671
py
Python
mlfinlab/microstructural_features/third_generation.py
scibol/mlfinlab
3c80f269bc68b8cb9bcf863ceb3dc77fc14b6984
[ "BSD-3-Clause" ]
8
2020-04-19T08:09:34.000Z
2022-03-30T20:49:40.000Z
mlfinlab/microstructural_features/third_generation.py
scibol/mlfinlab
3c80f269bc68b8cb9bcf863ceb3dc77fc14b6984
[ "BSD-3-Clause" ]
1
2019-07-24T17:52:30.000Z
2019-07-24T17:52:30.000Z
mlfinlab/microstructural_features/third_generation.py
scibol/mlfinlab
3c80f269bc68b8cb9bcf863ceb3dc77fc14b6984
[ "BSD-3-Clause" ]
8
2020-08-09T02:25:04.000Z
2022-03-20T15:08:11.000Z
""" Third generation models implementation (VPIN) """ import pandas as pd def get_vpin(volume: pd.Series, buy_volume: pd.Series, window: int = 1) -> pd.Series: """ Get Volume-Synchronized Probability of Informed Trading (VPIN) from bars, p. 292-293. :param volume: (pd.Series) bar volume :param buy_vo...
35.315789
121
0.710879
import pandas as pd def get_vpin(volume: pd.Series, buy_volume: pd.Series, window: int = 1) -> pd.Series: sell_volume = volume - buy_volume volume_imbalance = abs(buy_volume - sell_volume) return volume_imbalance.rolling(window=window).mean() / volume
true
true
f703abc44854a43f352a92f4fe2b31a889a7c5f4
938
py
Python
github3/gists/comment.py
kbakba/github3.py
ab5d6a59a3e3f3c7022184b0e5dd17968809dc03
[ "BSD-3-Clause" ]
null
null
null
github3/gists/comment.py
kbakba/github3.py
ab5d6a59a3e3f3c7022184b0e5dd17968809dc03
[ "BSD-3-Clause" ]
7
2021-02-08T20:22:15.000Z
2022-03-11T23:19:41.000Z
venv/lib/python2.7/site-packages/github3/gists/comment.py
mutaihillary/mycalculator
55685dd7c968861f18ae0701129f5af2bc682d67
[ "MIT" ]
null
null
null
""" github3.gists.comment --------------------- Module containing the logic for a GistComment """ from github3.models import BaseComment from github3.users import User class GistComment(BaseComment): """This object represents a comment on a gist. Two comment instances can be checked like so:: c1...
22.333333
72
0.613006
from github3.models import BaseComment from github3.users import User class GistComment(BaseComment): def __init__(self, comment, session=None): super(GistComment, self).__init__(comment, session) self.user = None if comment.get('user'): self.user = User(c...
true
true
f703adb6f717d60f71886dce78d79117e78f66ac
5,223
py
Python
NeuralNetwork.py
ronnith24/NeuralNetworksFromScratch
5c831de8954a4b84fef7b70b16f9d9e6c1cb24b9
[ "MIT" ]
null
null
null
NeuralNetwork.py
ronnith24/NeuralNetworksFromScratch
5c831de8954a4b84fef7b70b16f9d9e6c1cb24b9
[ "MIT" ]
null
null
null
NeuralNetwork.py
ronnith24/NeuralNetworksFromScratch
5c831de8954a4b84fef7b70b16f9d9e6c1cb24b9
[ "MIT" ]
null
null
null
import numpy as np class NeuralNetwork(object): def __init__(self, topology, epsilon, numLabels): self.theta = [] self.topology = topology self.numLabels = numLabels self.gradientChecking = False for layer in range(len(self.topology)): if layer == 0: ...
39.568182
121
0.450699
import numpy as np class NeuralNetwork(object): def __init__(self, topology, epsilon, numLabels): self.theta = [] self.topology = topology self.numLabels = numLabels self.gradientChecking = False for layer in range(len(self.topology)): if layer == 0: ...
true
true
f703ae182509e8225f54eb3a2bec3dbf5e9423a8
282
py
Python
chapter09/exercise02.py
YordanIH/Intro_to_CS_w_Python
eebbb8efd7ef0d07be9bc45b6b1e8f20737ce01a
[ "MIT" ]
null
null
null
chapter09/exercise02.py
YordanIH/Intro_to_CS_w_Python
eebbb8efd7ef0d07be9bc45b6b1e8f20737ce01a
[ "MIT" ]
null
null
null
chapter09/exercise02.py
YordanIH/Intro_to_CS_w_Python
eebbb8efd7ef0d07be9bc45b6b1e8f20737ce01a
[ "MIT" ]
null
null
null
"""“Write a for loop to print all the values in the half_lives list from ​Operations on Lists​, all on a single line. half_lives refers to [87.74, 24110.0, 6537.0, 14.4, 376000.0].""" half_lives = [87.74, 24110.0, 6537.0, 14.4, 376000.0] for i in half_lives: print(i , end=' ')
56.4
183
0.677305
half_lives = [87.74, 24110.0, 6537.0, 14.4, 376000.0] for i in half_lives: print(i , end=' ')
true
true
f703ae2bb9e374037093786ce006ceb2ba2185c3
3,238
py
Python
swagger_to/bin/swagger_style.py
abingham/swagger-to
a1ef9f46561d39809da0e6ab356427a247815d92
[ "MIT" ]
38
2018-08-06T15:11:10.000Z
2022-02-13T22:43:00.000Z
swagger_to/bin/swagger_style.py
abingham/swagger-to
a1ef9f46561d39809da0e6ab356427a247815d92
[ "MIT" ]
42
2018-08-07T08:25:07.000Z
2021-11-28T19:32:48.000Z
swagger_to/bin/swagger_style.py
abingham/swagger-to
a1ef9f46561d39809da0e6ab356427a247815d92
[ "MIT" ]
16
2019-02-26T12:39:43.000Z
2022-01-29T06:38:41.000Z
#!/usr/bin/env python3 """Read a correct swagger file and check whether it conforms to a style guide.""" import argparse import pathlib from typing import List import sys import swagger_to.intermediate import swagger_to.style import swagger_to.swagger def main() -> int: """Execute the main routine.""" parse...
33.381443
116
0.679432
import argparse import pathlib from typing import List import sys import swagger_to.intermediate import swagger_to.style import swagger_to.swagger def main() -> int: parser = argparse.ArgumentParser("Reads a correct swagger file and checks that it conforms to the style guide.") parser.add_argument("--swagg...
true
true
f703ae464ea3f820d910eceb27441786cfb8c1dd
12,829
py
Python
sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py
oneconvergence/katib
16e0574647ace79ccedd248d072c77139feab5e5
[ "Apache-2.0" ]
1,177
2018-04-23T08:45:19.000Z
2022-03-23T19:09:13.000Z
sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py
oneconvergence/katib
16e0574647ace79ccedd248d072c77139feab5e5
[ "Apache-2.0" ]
1,791
2018-04-20T00:10:17.000Z
2022-03-31T18:18:36.000Z
sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py
oneconvergence/katib
16e0574647ace79ccedd248d072c77139feab5e5
[ "Apache-2.0" ]
349
2018-04-20T01:03:28.000Z
2022-03-30T16:11:35.000Z
# coding: utf-8 """ Katib Swagger description for Katib # noqa: E501 The version of the OpenAPI document: v1beta1-0.1 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from kubeflow.katib.configuration import Configuration class V1beta1Experiment...
32.810742
303
0.654377
import pprint import re import six from kubeflow.katib.configuration import Configuration class V1beta1ExperimentSpec(object): openapi_types = { 'algorithm': 'V1beta1AlgorithmSpec', 'early_stopping': 'V1beta1EarlyStoppingSpec', 'max_failed_trial_count': 'int', 'max_trial_c...
true
true
f703ae4c4ee6db57ecd36e86072f030656e6cc07
6,325
py
Python
image-segmentation/data_generators/kitti/kitti_dataset.py
swcho84/image-segmentation
ef9b9b3d832e9efe6f43522cc5ca0e17279d6608
[ "MIT" ]
64
2019-03-09T08:55:11.000Z
2022-01-27T07:08:02.000Z
image-segmentation/data_generators/kitti/kitti_dataset.py
swcho84/image-segmentation
ef9b9b3d832e9efe6f43522cc5ca0e17279d6608
[ "MIT" ]
2
2019-11-07T11:49:13.000Z
2020-01-16T14:39:03.000Z
image-segmentation/data_generators/kitti/kitti_dataset.py
swcho84/image-segmentation
ef9b9b3d832e9efe6f43522cc5ca0e17279d6608
[ "MIT" ]
21
2019-03-09T08:56:35.000Z
2022-03-02T12:24:43.000Z
from collections import namedtuple import os import json import numpy as np from tqdm import tqdm from data_generators.utils import load_image_rgb # Copied from: https://github.com/mcordts/cityscapesScripts/blob/master/cityscapesscripts/helpers/labels.py # # Cityscapes labels # #-------------------------------------...
43.027211
139
0.606482
from collections import namedtuple import os import json import numpy as np from tqdm import tqdm from data_generators.utils import load_image_rgb Label = namedtuple( 'Label' , [ 'name' , 'id' , ...
true
true
f703af1b52c4cc4a7f8d2dbe1ec2c5715036e113
5,921
py
Python
pymc4/distributions/tensorflow/continuous.py
byblian/pymc4
5de890ed7f22de878eb48c92d3e9b8fe87c25e61
[ "Apache-2.0" ]
null
null
null
pymc4/distributions/tensorflow/continuous.py
byblian/pymc4
5de890ed7f22de878eb48c92d3e9b8fe87c25e61
[ "Apache-2.0" ]
null
null
null
pymc4/distributions/tensorflow/continuous.py
byblian/pymc4
5de890ed7f22de878eb48c92d3e9b8fe87c25e61
[ "Apache-2.0" ]
null
null
null
"""PyMC4 continuous random variables for tensorflow.""" import tensorflow_probability as tfp from pymc4.distributions import abstract from pymc4.distributions.tensorflow.distribution import BackendDistribution tfd = tfp.distributions __all__ = [ "Beta", "Cauchy", "ChiSquared", "Exponential", "Gam...
32.005405
98
0.694308
import tensorflow_probability as tfp from pymc4.distributions import abstract from pymc4.distributions.tensorflow.distribution import BackendDistribution tfd = tfp.distributions __all__ = [ "Beta", "Cauchy", "ChiSquared", "Exponential", "Gamma", "Gumbel", "HalfCauchy", "HalfNormal", ...
true
true
f703afa79c2f13ad674c5444dff05b92c244c586
5,047
py
Python
src/datadog/azext_datadog/vendored_sdks/datadog/models/__init__.py
YingXue/azure-cli-extensions
30086b7fe22ed591daaae9019920db6c16aef9de
[ "MIT" ]
1
2020-09-16T03:47:44.000Z
2020-09-16T03:47:44.000Z
src/datadog/azext_datadog/vendored_sdks/datadog/models/__init__.py
YingXue/azure-cli-extensions
30086b7fe22ed591daaae9019920db6c16aef9de
[ "MIT" ]
null
null
null
src/datadog/azext_datadog/vendored_sdks/datadog/models/__init__.py
YingXue/azure-cli-extensions
30086b7fe22ed591daaae9019920db6c16aef9de
[ "MIT" ]
1
2019-05-02T00:55:30.000Z
2019-05-02T00:55:30.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
43.886957
94
0.753913
try: from ._models_py3 import DatadogApiKey from ._models_py3 import DatadogApiKeyListResponse from ._models_py3 import DatadogHost from ._models_py3 import DatadogHostListResponse from ._models_py3 import DatadogHostMetadata from ._models_py3 import DatadogInstallMethod from ._model...
true
true
f703aff308996d0e92ba59c7db66cb2f74eb84ca
4,079
py
Python
vertica_python/vertica/messages/frontend_messages/startup.py
alonme/vertica-python
208685ce6285bde1edab6d18500ef0887d36bf91
[ "Apache-2.0" ]
183
2015-01-20T14:57:22.000Z
2018-08-09T21:13:19.000Z
vertica_python/vertica/messages/frontend_messages/startup.py
alonme/vertica-python
208685ce6285bde1edab6d18500ef0887d36bf91
[ "Apache-2.0" ]
139
2015-01-09T18:37:53.000Z
2018-08-13T07:09:26.000Z
vertica_python/vertica/messages/frontend_messages/startup.py
alonme/vertica-python
208685ce6285bde1edab6d18500ef0887d36bf91
[ "Apache-2.0" ]
110
2015-03-02T15:46:11.000Z
2018-07-27T15:50:29.000Z
# Copyright (c) 2018-2022 Micro Focus or one of its affiliates. # Copyright (c) 2018 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licen...
39.221154
94
0.694778
from __future__ import print_function, division, absolute_import import platform import os from struct import pack import vertica_python from ..message import BulkFrontendMessage class Startup(BulkFrontendMessage): message_id = None def __init__(self, user, database, s...
true
true
f703b03b42284b2d7a546b98872dcbf83ea9965f
7,279
py
Python
virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_router_setting.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
1
2020-03-29T18:41:01.000Z
2020-03-29T18:41:01.000Z
ansible/ansible/modules/network/fortios/fortios_router_setting.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
7
2020-09-07T17:27:56.000Z
2022-03-02T06:25:46.000Z
ansible/ansible/modules/network/fortios/fortios_router_setting.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
1
2020-03-22T01:04:48.000Z
2020-03-22T01:04:48.000Z
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
27.467925
97
0.637862
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_router_setting short_description...
true
true
f703b06ebc1168ba15e4a98c0a1b74b76c56faf5
1,243
py
Python
app/file/config/__init__.py
SystemLight/T-fastapi
a1d50f8bdb403939b4d38cbf8113951ae54a0b17
[ "MIT" ]
null
null
null
app/file/config/__init__.py
SystemLight/T-fastapi
a1d50f8bdb403939b4d38cbf8113951ae54a0b17
[ "MIT" ]
null
null
null
app/file/config/__init__.py
SystemLight/T-fastapi
a1d50f8bdb403939b4d38cbf8113951ae54a0b17
[ "MIT" ]
null
null
null
import os import posixpath from enum import Enum from fastapi import Path, HTTPException from utils import security class UploadPath(str, Enum): default = "default" UPLOAD_PATH_DICT = { UploadPath.default: "default/" } def get_upload(upload_key: UploadPath = Path(..., description="上传文件块位置")): """ ...
18.833333
80
0.665326
import os import posixpath from enum import Enum from fastapi import Path, HTTPException from utils import security class UploadPath(str, Enum): default = "default" UPLOAD_PATH_DICT = { UploadPath.default: "default/" } def get_upload(upload_key: UploadPath = Path(..., description="上传文件块位置")): root_p...
true
true
f703b19dc731fc9829fbf4343624e5debf96ab76
2,254
py
Python
var/spack/repos/builtin/packages/repeatmodeler/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-10T13:47:48.000Z
2019-04-17T13:05:17.000Z
var/spack/repos/builtin/packages/repeatmodeler/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-12-15T17:29:20.000Z
2022-03-21T15:08:31.000Z
var/spack/repos/builtin/packages/repeatmodeler/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-04-07T18:27:09.000Z
2022-03-31T22:52:38.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Repeatmodeler(Package): """RepeatModeler is a de-novo repeat family identification and mod...
33.641791
96
0.582076
from spack import * class Repeatmodeler(Package): homepage = "http://www.repeatmasker.org/RepeatModeler/" url = "http://www.repeatmasker.org/RepeatModeler/RepeatModeler-open-1.0.11.tar.gz" version('1.0.11', sha256='7ff0d588b40f9ad5ce78876f3ab8d2332a20f5128f6357413f741bb7fa172193') depends...
true
true
f703b1b06e104a60a7e9c722a084a851230c80a8
421
py
Python
4° Período/Programação de Computadores/lista 1/CONCEITOS DE LÓGICA DE PROGRAMAÇÃO/Conceitos básicos/Exercício 1) H.py
sullyvan15/UVV
2390cc2881792d036db1d8b098fe366f47cd98c3
[ "MIT" ]
null
null
null
4° Período/Programação de Computadores/lista 1/CONCEITOS DE LÓGICA DE PROGRAMAÇÃO/Conceitos básicos/Exercício 1) H.py
sullyvan15/UVV
2390cc2881792d036db1d8b098fe366f47cd98c3
[ "MIT" ]
1
2020-10-07T23:33:21.000Z
2020-10-08T01:15:11.000Z
4° Período/Programação de Computadores/lista 1/CONCEITOS DE LÓGICA DE PROGRAMAÇÃO/Conceitos básicos/Exercício 1) H.py
sullyvan15/Universidade-Vila-Velha
2390cc2881792d036db1d8b098fe366f47cd98c3
[ "MIT" ]
null
null
null
import math pi = math.pi raio = float(input('Qual é o raio da esfera?: ')) volume_esf = 4/3*pi*math.pow(raio, 3) litro = 1 lata = litro*5 precolata = 50.00 totaltinta = volume_esf *lata totalpreco = totaltinta * precolata print(f'O volume da esfera é {volume_esf: .2f}') print(f'A quantidade de tinta necessária é...
19.136364
73
0.700713
import math pi = math.pi raio = float(input('Qual é o raio da esfera?: ')) volume_esf = 4/3*pi*math.pow(raio, 3) litro = 1 lata = litro*5 precolata = 50.00 totaltinta = volume_esf *lata totalpreco = totaltinta * precolata print(f'O volume da esfera é {volume_esf: .2f}') print(f'A quantidade de tinta necessária é...
true
true
f703b4b4ac6ac29bfe11a24a10c983a91d3b6406
3,498
py
Python
catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py
aroundble/onap
d049ca05bbfb6fa6b86b2a093b09ffc1fc0a6e37
[ "Apache-2.0" ]
null
null
null
catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py
aroundble/onap
d049ca05bbfb6fa6b86b2a093b09ffc1fc0a6e37
[ "Apache-2.0" ]
null
null
null
catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py
aroundble/onap
d049ca05bbfb6fa6b86b2a093b09ffc1fc0a6e37
[ "Apache-2.0" ]
null
null
null
import pycurl import sys, getopt from StringIO import StringIO import json import copy from importCommon import * from importNormativeTypes import * import importCommon ######################################################################################################################################################...
34.98
197
0.468268
import pycurl import sys, getopt from StringIO import StringIO import json import copy from importCommon import * from importNormativeTypes import * import importCommon
false
true
f703b505c46b46244fbbbf933a32d40f16d598b2
30,332
py
Python
halos/halos.py
lconaboy/seren3
5a2ec80adf0d69664d2ee874f5ba12cc02d6c337
[ "CNRI-Python" ]
1
2017-09-21T14:58:23.000Z
2017-09-21T14:58:23.000Z
halos/halos.py
lconaboy/seren3
5a2ec80adf0d69664d2ee874f5ba12cc02d6c337
[ "CNRI-Python" ]
1
2020-09-09T08:52:43.000Z
2020-09-09T08:52:43.000Z
halos/halos.py
lconaboy/seren3
5a2ec80adf0d69664d2ee874f5ba12cc02d6c337
[ "CNRI-Python" ]
1
2019-01-21T10:57:41.000Z
2019-01-21T10:57:41.000Z
import numpy as np from seren3 import config from seren3.halos import Halo, HaloCatalogue import logging logger = logging.getLogger('seren3.halos.halos') class AHFCatalogue(HaloCatalogue): ''' Class to handle catalogues produced by AHF. ''' # assume file structure like this # ID(1) hostHalo(2) ...
41.722146
155
0.462284
import numpy as np from seren3 import config from seren3.halos import Halo, HaloCatalogue import logging logger = logging.getLogger('seren3.halos.halos') class AHFCatalogue(HaloCatalogue): ''' Class to handle catalogues produced by AHF. ''' ...
false
true
f703b74ac5d58a4ebdf04bf28c7ab476758aa9d5
9,599
py
Python
tests/test_notify_slack.py
linz/geospatial-data-lake
e92fb2fc0e050da471e3ecbc1c0331c551612092
[ "MIT" ]
5
2021-02-04T01:07:20.000Z
2021-04-16T09:35:21.000Z
tests/test_notify_slack.py
linz/geospatial-data-lake
e92fb2fc0e050da471e3ecbc1c0331c551612092
[ "MIT" ]
252
2020-10-26T10:34:43.000Z
2021-05-17T04:21:08.000Z
tests/test_notify_slack.py
linz/geospatial-data-lake
e92fb2fc0e050da471e3ecbc1c0331c551612092
[ "MIT" ]
1
2021-05-05T04:23:32.000Z
2021-05-05T04:23:32.000Z
from datetime import datetime, timezone from http import HTTPStatus from json import dumps, load from logging import getLogger from os import environ from unittest.mock import MagicMock, patch from mypy_boto3_events import EventBridgeClient from mypy_boto3_lambda import LambdaClient from mypy_boto3_sns.type_defs impor...
34.405018
95
0.679446
from datetime import datetime, timezone from http import HTTPStatus from json import dumps, load from logging import getLogger from os import environ from unittest.mock import MagicMock, patch from mypy_boto3_events import EventBridgeClient from mypy_boto3_lambda import LambdaClient from mypy_boto3_sns.type_defs impor...
true
true
f703bac82a9f2a7e37f961023a6241cdb63ca46d
458
py
Python
lib/twl.py
riandakarizal/ITeung
2d3fc7e4974c9a9b67ff61f2a77a528988b55820
[ "MIT" ]
null
null
null
lib/twl.py
riandakarizal/ITeung
2d3fc7e4974c9a9b67ff61f2a77a528988b55820
[ "MIT" ]
37
2020-03-22T23:21:14.000Z
2020-09-16T15:07:06.000Z
lib/twl.py
riandakarizal/ITeung
2d3fc7e4974c9a9b67ff61f2a77a528988b55820
[ "MIT" ]
1
2020-09-08T11:31:30.000Z
2020-09-08T11:31:30.000Z
# -*- coding: utf-8 -*- """ Created on Sat Mar 14 08:55:39 2020 @author: rolly """ import config from twilio.rest import Client #https://api.whatsapp.com/send?phone=14155238886&text=join%20actual-nor&source=&data= def sendMsg(num,msg): client = Client(config.account_sid, config.auth_token) message = client.m...
24.105263
85
0.657205
import config from twilio.rest import Client def sendMsg(num,msg): client = Client(config.account_sid, config.auth_token) message = client.messages.create( to="whatsapp:+"+num, from_="whatsapp:+14155238886", body=msg) print(message.sid)
true
true
f703bb46c6369210b5bbac4b3c528d3ee60d82b6
1,416
py
Python
aws_lambda_powertools/utilities/parser/envelopes/sns.py
n2N8Z/aws-lambda-powertools-python
0cb5d506f534ac76b42f2d5959d93c7b2bb4d8e9
[ "MIT-0" ]
null
null
null
aws_lambda_powertools/utilities/parser/envelopes/sns.py
n2N8Z/aws-lambda-powertools-python
0cb5d506f534ac76b42f2d5959d93c7b2bb4d8e9
[ "MIT-0" ]
null
null
null
aws_lambda_powertools/utilities/parser/envelopes/sns.py
n2N8Z/aws-lambda-powertools-python
0cb5d506f534ac76b42f2d5959d93c7b2bb4d8e9
[ "MIT-0" ]
null
null
null
import logging from typing import Any, Dict, List, Optional, Union from ..models import SnsModel from ..types import Model from .base import BaseEnvelope logger = logging.getLogger(__name__) class SnsEnvelope(BaseEnvelope): """SNS Envelope to extract array of Records The record's body parameter is a string...
32.930233
103
0.655367
import logging from typing import Any, Dict, List, Optional, Union from ..models import SnsModel from ..types import Model from .base import BaseEnvelope logger = logging.getLogger(__name__) class SnsEnvelope(BaseEnvelope): def parse(self, data: Optional[Union[Dict[str, Any], Any]], model: Model) -> List[Optio...
true
true
f703bc9d08a5ff497c1674f4e927bd52424324e7
6,522
py
Python
ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_datacenter.py
otus-devops-2019-02/yyashkin_infra
0cd0c003884155ac922e3e301305ac202de7028c
[ "MIT" ]
1
2020-03-29T18:41:01.000Z
2020-03-29T18:41:01.000Z
ansible/ansible/modules/cloud/vmware/vmware_datacenter.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
7
2020-09-07T17:27:56.000Z
2022-03-02T06:25:46.000Z
ansible/ansible/modules/cloud/vmware/vmware_datacenter.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
1
2020-03-22T01:04:48.000Z
2020-03-22T01:04:48.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ...
38.364706
109
0.58939
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: vmware_datacenter short_description: Manage VMware vSphere Datacenters descripti...
true
true
f703bdae29f09a662a7398ff7215e7e7a58112a9
1,142
py
Python
quick_reports_demo/blog/migrations/0001_initial.py
brsbilgic/django-quick-reports
d69a532711d23f3640874c1c5fcacdbe328c6805
[ "MIT" ]
7
2015-07-12T14:45:18.000Z
2020-12-25T04:38:22.000Z
quick_reports_demo/blog/migrations/0001_initial.py
brsbilgic/django_jooy_reporting
d69a532711d23f3640874c1c5fcacdbe328c6805
[ "MIT" ]
1
2021-03-19T21:49:50.000Z
2021-03-19T21:49:50.000Z
quick_reports_demo/blog/migrations/0001_initial.py
brsbilgic/django-quick-reports
d69a532711d23f3640874c1c5fcacdbe328c6805
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
34.606061
114
0.590193
from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations....
true
true
f703be8eb9c4bf6ae4bb900027692d9f03afd640
4,804
py
Python
third_party/py/gflags/gflags/flags_modules_for_testing/module_bar.py
sevki/bazel
b18915752a69fbbc6ed94e1710198167593565fc
[ "Apache-2.0" ]
218
2015-04-01T07:12:40.000Z
2021-12-28T05:02:06.000Z
third_party/py/gflags/gflags/flags_modules_for_testing/module_bar.py
sevki/bazel
b18915752a69fbbc6ed94e1710198167593565fc
[ "Apache-2.0" ]
67
2022-01-12T18:22:13.000Z
2022-01-12T18:24:28.000Z
third_party/py/gflags/gflags/flags_modules_for_testing/module_bar.py
sevki/bazel
b18915752a69fbbc6ed94e1710198167593565fc
[ "Apache-2.0" ]
72
2015-04-01T07:12:41.000Z
2021-10-21T00:36:27.000Z
#!/usr/bin/env python # Copyright 2014 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of c...
35.323529
72
0.720025
__author__ = 'salcianu@google.com (Alex Salcianu)' import gflags from gflags import _helpers FLAGS = gflags.FLAGS def DefineFlags(flag_values=FLAGS): gflags.DEFINE_boolean('tmod_bar_x', True, 'Boolean flag.', flag_values=flag_values) gflags.DEFINE_stri...
true
true
f703bef3cc58393e1a48a25c34a53fe8a2773f4a
603
py
Python
pluto/control/modes/live_mode.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
pluto/control/modes/live_mode.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
pluto/control/modes/live_mode.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
from pluto.control.modes import mode from pluto.control.modes.processes import process_manager from protos import broker_pb2_grpc class LiveControlMode(mode.ControlCommandHandler): def __init__(self, server, framework_url, process_factory): super(LiveControlMode, self).__init__(framework_url, process_fact...
33.5
77
0.772803
from pluto.control.modes import mode from pluto.control.modes.processes import process_manager from protos import broker_pb2_grpc class LiveControlMode(mode.ControlCommandHandler): def __init__(self, server, framework_url, process_factory): super(LiveControlMode, self).__init__(framework_url, process_fact...
true
true
f703c0dd2d885c53936772b4024a7a0e280f7489
1,998
py
Python
docs/conf.py
Hiteshsuhas/err-stackstorm
7579350ac50d9324b64a73b86d57e094270cb275
[ "Apache-2.0" ]
15
2016-09-19T12:06:12.000Z
2021-11-30T12:04:44.000Z
docs/conf.py
Hiteshsuhas/err-stackstorm
7579350ac50d9324b64a73b86d57e094270cb275
[ "Apache-2.0" ]
22
2017-06-19T18:13:54.000Z
2021-05-28T09:25:01.000Z
docs/conf.py
Hiteshsuhas/err-stackstorm
7579350ac50d9324b64a73b86d57e094270cb275
[ "Apache-2.0" ]
7
2017-06-19T17:03:59.000Z
2021-09-27T11:06:31.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
34.448276
79
0.667167
project = 'err-stackstorm' copyright = '2019, err-stackstorm contributors' author = 'err-stackstorm contributors' release = '2.1.4' master_doc = "index" extensions = [ ] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] html_theme = "sphinx...
true
true
f703c29a090948372a1d23e566dfa29ce36df4e3
45,631
py
Python
third_party/virtualbox/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Common/InfClassObject.py
Fimbure/icebox-1
0b81992a53e1b410955ca89bdb6f8169d6f2da86
[ "MIT" ]
521
2019-03-29T15:44:08.000Z
2022-03-22T09:46:19.000Z
third_party/virtualbox/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Common/InfClassObject.py
Fimbure/icebox-1
0b81992a53e1b410955ca89bdb6f8169d6f2da86
[ "MIT" ]
30
2019-06-04T17:00:49.000Z
2021-09-08T20:44:19.000Z
third_party/virtualbox/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Common/InfClassObject.py
Fimbure/icebox-1
0b81992a53e1b410955ca89bdb6f8169d6f2da86
[ "MIT" ]
99
2019-03-29T16:04:13.000Z
2022-03-28T16:59:34.000Z
## @file # This file is used to define each component of INF file # # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full ...
40.851388
261
0.574697
import Common.LongFilePathOs as os import re import EdkLogger from CommonDataClass.CommonClass import LibraryClassClass from CommonDataClass.ModuleClass import * from String import * from DataType import * from Identification import * from Dictionary import * from BuildToolError import * from Misc import sdict ...
false
true
f703c31023fc04137e38d2d20e70db35d5885d77
19,181
py
Python
tests/devices/test_default_qubit_jax.py
pearcandy/pennylane
dfa35989cd0798496e41999a197bcf0eb26185df
[ "Apache-2.0" ]
null
null
null
tests/devices/test_default_qubit_jax.py
pearcandy/pennylane
dfa35989cd0798496e41999a197bcf0eb26185df
[ "Apache-2.0" ]
null
null
null
tests/devices/test_default_qubit_jax.py
pearcandy/pennylane
dfa35989cd0798496e41999a197bcf0eb26185df
[ "Apache-2.0" ]
null
null
null
import pytest jax = pytest.importorskip("jax", minversion="0.2") jnp = jax.numpy import numpy as np import pennylane as qml from pennylane.devices.default_qubit_jax import DefaultQubitJax pytestmark = pytest.mark.usefixtures("tape_mode") class TestQNodeIntegration: """Integration tests for default.q...
38.671371
105
0.57265
import pytest jax = pytest.importorskip("jax", minversion="0.2") jnp = jax.numpy import numpy as np import pennylane as qml from pennylane.devices.default_qubit_jax import DefaultQubitJax pytestmark = pytest.mark.usefixtures("tape_mode") class TestQNodeIntegration: def test_defines_correct_capabil...
true
true
f703c319ac98938777a90feb59bfeb1ef81ebb42
2,199
py
Python
src/pytest_mock_resources/fixture/database/relational/redshift/__init__.py
schireson/pytest-mock-resources
a09fc18eeeac06c5589854ce200fa45f64c81cb5
[ "MIT" ]
49
2020-01-24T21:08:43.000Z
2022-03-31T23:55:21.000Z
src/pytest_mock_resources/fixture/database/relational/redshift/__init__.py
schireson/pytest-mock-resources
a09fc18eeeac06c5589854ce200fa45f64c81cb5
[ "MIT" ]
29
2020-03-11T19:07:50.000Z
2022-03-30T16:49:06.000Z
src/pytest_mock_resources/fixture/database/relational/redshift/__init__.py
schireson/pytest-mock-resources
a09fc18eeeac06c5589854ce200fa45f64c81cb5
[ "MIT" ]
10
2020-01-23T19:04:09.000Z
2022-02-22T19:57:54.000Z
import pytest from pytest_mock_resources.fixture.database.generic import assign_fixture_credentials from pytest_mock_resources.fixture.database.relational.generic import EngineManager from pytest_mock_resources.fixture.database.relational.postgresql import ( _create_clean_database, get_sqlalchemy_engine, ) fro...
39.267857
95
0.729877
import pytest from pytest_mock_resources.fixture.database.generic import assign_fixture_credentials from pytest_mock_resources.fixture.database.relational.generic import EngineManager from pytest_mock_resources.fixture.database.relational.postgresql import ( _create_clean_database, get_sqlalchemy_engine, ) fro...
true
true
f703c343b85bbcb32c648a5f8668d2512894a13a
2,586
py
Python
IMLearn/learners/regressors/polynomial_fitting.py
RotemBadash/IML.HUJI
2b20d074c159123f61b321a7e84312ab82400949
[ "MIT" ]
null
null
null
IMLearn/learners/regressors/polynomial_fitting.py
RotemBadash/IML.HUJI
2b20d074c159123f61b321a7e84312ab82400949
[ "MIT" ]
null
null
null
IMLearn/learners/regressors/polynomial_fitting.py
RotemBadash/IML.HUJI
2b20d074c159123f61b321a7e84312ab82400949
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import NoReturn from . import LinearRegression from ...base import BaseEstimator import numpy as np class PolynomialFitting(BaseEstimator): """ Polynomial Fitting using Least Squares estimation """ def __init__(self, k: int) -> PolynomialFitting: ...
28.108696
68
0.5785
from __future__ import annotations from typing import NoReturn from . import LinearRegression from ...base import BaseEstimator import numpy as np class PolynomialFitting(BaseEstimator): def __init__(self, k: int) -> PolynomialFitting: super().__init__() self.degree = k self.linear_regress...
true
true
f703c371c00b4a55d09b7b95a4b1da666bb17541
1,532
py
Python
examples/AdAccountCampaignsPostPageLikes.py
Novabae/facebook-python-business-sdk
1aa614d88a7cacbd26dafba8b549b9ea7a6c9522
[ "CNRI-Python" ]
null
null
null
examples/AdAccountCampaignsPostPageLikes.py
Novabae/facebook-python-business-sdk
1aa614d88a7cacbd26dafba8b549b9ea7a6c9522
[ "CNRI-Python" ]
null
null
null
examples/AdAccountCampaignsPostPageLikes.py
Novabae/facebook-python-business-sdk
1aa614d88a7cacbd26dafba8b549b9ea7a6c9522
[ "CNRI-Python" ]
null
null
null
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
37.365854
76
0.774151
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.campaign import Campaign from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<ID>' FacebookAdsApi.init(access_token=access_...
false
true
f703c645aa7c72fe4e04cdbf60f8a8cc84e7b617
1,238
py
Python
alipay/aop/api/domain/PriceInformation.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/PriceInformation.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/PriceInformation.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class PriceInformation(object): def __init__(self): self._amount = None self._type = None @property def amount(self): return self._amount @amount.setter def am...
22.107143
63
0.53958
import json from alipay.aop.api.constant.ParamConstants import * class PriceInformation(object): def __init__(self): self._amount = None self._type = None @property def amount(self): return self._amount @amount.setter def amount(self, value): self._amount = va...
true
true
f703c684e0729337f837439e10d1d599b1cb1d38
8,121
py
Python
tests/unit/controllers/api/v1/test_traces_rbac.py
ankita-orchestral/st2-rbac-backend
c90191dd1ff126362f9fdecca0fa1b694288641f
[ "Apache-2.0" ]
1
2020-09-21T16:05:31.000Z
2020-09-21T16:05:31.000Z
tests/unit/controllers/api/v1/test_traces_rbac.py
ankita-orchestral/st2-rbac-backend
c90191dd1ff126362f9fdecca0fa1b694288641f
[ "Apache-2.0" ]
18
2020-09-18T19:07:03.000Z
2022-02-25T07:02:17.000Z
tests/unit/controllers/api/v1/test_traces_rbac.py
ankita-orchestral/st2-rbac-backend
c90191dd1ff126362f9fdecca0fa1b694288641f
[ "Apache-2.0" ]
4
2020-08-27T12:24:51.000Z
2021-09-22T10:09:18.000Z
# Copyright 2020 The StackStorm Authors. # Copyright (C) 2020 Extreme Networks, Inc - All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/license...
44.377049
95
0.695111
import six from st2common.rbac.types import PermissionType from st2common.rbac.types import ResourceType from st2common.persistence.auth import User from st2common.persistence.rbac import Role from st2common.persistence.rbac import UserRoleAssignment from st2common.persistence.rbac import PermissionGran...
true
true
f703c79631f36821717c501608afedc68f7f2caf
154
py
Python
Lesson_2.py
Justmove08/Lesson_2
8f88619c0bf0140be9f4b8e24f7a7852758de55a
[ "MIT" ]
null
null
null
Lesson_2.py
Justmove08/Lesson_2
8f88619c0bf0140be9f4b8e24f7a7852758de55a
[ "MIT" ]
null
null
null
Lesson_2.py
Justmove08/Lesson_2
8f88619c0bf0140be9f4b8e24f7a7852758de55a
[ "MIT" ]
null
null
null
import requests import json url = "https://www.cbr-xml-daily.ru/daily_json.js" response = requests.get(url) data = json.loads(response.text) print(data)
19.25
50
0.753247
import requests import json url = "https://www.cbr-xml-daily.ru/daily_json.js" response = requests.get(url) data = json.loads(response.text) print(data)
true
true
f703c7f57d121c0c204bdc8eea1d7ea29ffacb56
727
py
Python
authors/apps/reports/models.py
andela/ah-backend-dojo
f2b14f15c4af906da846cafe722f13868d58371f
[ "BSD-3-Clause" ]
3
2019-05-01T10:41:09.000Z
2021-04-25T22:17:20.000Z
authors/apps/reports/models.py
andela/ah-backend-dojo
f2b14f15c4af906da846cafe722f13868d58371f
[ "BSD-3-Clause" ]
24
2019-04-23T14:56:21.000Z
2021-12-13T19:58:37.000Z
authors/apps/reports/models.py
andela/ah-backend-dojo
f2b14f15c4af906da846cafe722f13868d58371f
[ "BSD-3-Clause" ]
4
2019-06-29T10:40:32.000Z
2022-01-04T11:44:53.000Z
from django.db import models from authors import settings from authors.apps.articles.models import Article from authors.apps.profiles.models import Profile # Create your models here. class ReportArticle(models.Model): """model for reporting an article""" reporter = models.ForeignKey(Profile, on_delete=models.C...
45.4375
83
0.779917
from django.db import models from authors import settings from authors.apps.articles.models import Article from authors.apps.profiles.models import Profile class ReportArticle(models.Model): reporter = models.ForeignKey(Profile, on_delete=models.CASCADE) article = models.ForeignKey(Article, to_field="slug", o...
true
true
f703c8360e791059085f84845e7382a4d897f455
3,203
py
Python
code_demo/python_framework/3_app_class.py
PegasusWang/notebooks
78a88de2ed2e858d3b1f997d0e5155a37e70b82c
[ "MIT" ]
38
2018-02-14T05:40:17.000Z
2021-09-26T10:14:57.000Z
code_demo/python_framework/3_app_class.py
PegasusWang/notebooks
78a88de2ed2e858d3b1f997d0e5155a37e70b82c
[ "MIT" ]
null
null
null
code_demo/python_framework/3_app_class.py
PegasusWang/notebooks
78a88de2ed2e858d3b1f997d0e5155a37e70b82c
[ "MIT" ]
11
2018-02-13T22:52:59.000Z
2020-07-14T04:04:54.000Z
# -*- coding: utf-8 -*- import re from six.moves import http_client from six.moves import urllib from wsgiref.headers import Headers class Request(object): def __init__(self, environ): self.environ = environ @property def path(self): return self.environ['PATH_INFO'] @property de...
27.612069
109
0.634093
import re from six.moves import http_client from six.moves import urllib from wsgiref.headers import Headers class Request(object): def __init__(self, environ): self.environ = environ @property def path(self): return self.environ['PATH_INFO'] @property def args(self): g...
true
true
f703c881bdbf9a59f2cf3170b2e0a56ebc6c9201
9,841
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_ips_rule_settings.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_ips_rule_settings.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_ips_rule_settings.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
29.641566
99
0.612031
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_ips_rule_settings short_description...
true
true
f703ca77a30ca7350baf7d44bc4292d83426e83a
392
py
Python
MyModule.py
LvJC/cpp-libtorch
4a56dda616bde50423591e7a4d4d7be6a978f6bf
[ "Apache-2.0" ]
1
2020-03-05T10:07:44.000Z
2020-03-05T10:07:44.000Z
MyModule.py
LvJC/cpp-libtorch
4a56dda616bde50423591e7a4d4d7be6a978f6bf
[ "Apache-2.0" ]
1
2020-06-23T14:05:29.000Z
2020-06-23T14:05:29.000Z
MyModule.py
LvJC/cpp-libtorch
4a56dda616bde50423591e7a4d4d7be6a978f6bf
[ "Apache-2.0" ]
1
2019-12-19T14:01:28.000Z
2019-12-19T14:01:28.000Z
import torch import torchvision # An instance of your model. model = torchvision.models.resnet18() # An example input you would normally provide to your model's forward() method. example = torch.rand(1, 3, 224, 224) # Use torch.jit.trace to generate a torch.jit.ScriptModule via tracing. traced_script_module = torch....
26.133333
79
0.770408
import torch import torchvision model = torchvision.models.resnet18() example = torch.rand(1, 3, 224, 224) # Use torch.jit.trace to generate a torch.jit.ScriptModule via tracing. traced_script_module = torch.jit.trace(model, example) # save traced_script_module.save("model.pt")
true
true
f703cad52db07a4720007227ed997cccd7842588
3,153
py
Python
zerver/lib/dev_ldap_directory.py
ross-sysadm/zulip
674158b8170eddb71aa2210052f0d598752581ed
[ "Apache-2.0" ]
null
null
null
zerver/lib/dev_ldap_directory.py
ross-sysadm/zulip
674158b8170eddb71aa2210052f0d598752581ed
[ "Apache-2.0" ]
null
null
null
zerver/lib/dev_ldap_directory.py
ross-sysadm/zulip
674158b8170eddb71aa2210052f0d598752581ed
[ "Apache-2.0" ]
null
null
null
import glob import logging import os from typing import Any, Dict, List, Optional from django.conf import settings from zerver.lib.storage import static_path # See https://jackstromberg.com/2013/01/useraccountcontrol-attributeflag-values/ # for docs on what these values mean. LDAP_USER_ACCOUNT_CONTROL_NORMAL = '512'...
38.925926
99
0.625119
import glob import logging import os from typing import Any, Dict, List, Optional from django.conf import settings from zerver.lib.storage import static_path LDAP_USER_ACCOUNT_CONTROL_NORMAL = '512' LDAP_USER_ACCOUNT_CONTROL_DISABLED = '514' def generate_dev_ldap_dir(mode: str, num_users: int=8) -> Dict[str, Dict...
true
true
f703cb62e2704a49458ad5c25825835775dc1de1
6,656
py
Python
yatube/posts/views.py
VladimirDip/Yatube
2652bd1e73677ec6d10e7fd1153f65fa48ee8a35
[ "BSD-3-Clause" ]
null
null
null
yatube/posts/views.py
VladimirDip/Yatube
2652bd1e73677ec6d10e7fd1153f65fa48ee8a35
[ "BSD-3-Clause" ]
null
null
null
yatube/posts/views.py
VladimirDip/Yatube
2652bd1e73677ec6d10e7fd1153f65fa48ee8a35
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.auth.decorators import login_required from django.contrib.auth.models import AnonymousUser from django.core.paginator import Paginator from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.views.decorators.cache import cache_page from django...
39.856287
93
0.629207
from django.contrib.auth.decorators import login_required from django.contrib.auth.models import AnonymousUser from django.core.paginator import Paginator from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.views.decorators.cache import cache_page from django...
true
true
f703cb77ea9e43fc26b5d0b603d2a528e44aeee5
1,608
py
Python
extviews/connections.py
BilalAlpaslan/fastapi-extviews
e3ce1c4916d86009705a09e165e5ee21a197962f
[ "MIT" ]
16
2022-01-01T16:00:58.000Z
2022-03-21T09:42:35.000Z
extviews/connections.py
BilalAlpaslan/fastapi-extviews
e3ce1c4916d86009705a09e165e5ee21a197962f
[ "MIT" ]
null
null
null
extviews/connections.py
BilalAlpaslan/fastapi-extviews
e3ce1c4916d86009705a09e165e5ee21a197962f
[ "MIT" ]
null
null
null
from motor.motor_asyncio import AsyncIOMotorClient from pymongo import MongoClient __all__ = ['PymongoConnection', 'MotorConnection'] class PymongoConnection: def __init__(self, host="127.0.0.1", port="27017", db="default", user=None, password=None): """Create database connection.""" if user and...
32.816327
95
0.626866
from motor.motor_asyncio import AsyncIOMotorClient from pymongo import MongoClient __all__ = ['PymongoConnection', 'MotorConnection'] class PymongoConnection: def __init__(self, host="127.0.0.1", port="27017", db="default", user=None, password=None): if user and password: self.db_client = Mo...
true
true
f703cbd34235ec29b24264756ef19d8f43b8582f
13,776
py
Python
env/lib/python3.8/site-packages/docker/utils/utils.py
projeto-de-algoritmos/Grafos2_IMDBConnection
5bcd9a631f6d871d2d9d3038a9904b9e930ac64a
[ "MIT" ]
1
2021-10-04T18:22:12.000Z
2021-10-04T18:22:12.000Z
env/lib/python3.8/site-packages/docker/utils/utils.py
projeto-de-algoritmos/Grafos2_IMDBConnection
5bcd9a631f6d871d2d9d3038a9904b9e930ac64a
[ "MIT" ]
10
2021-06-16T20:48:32.000Z
2021-10-04T18:22:02.000Z
env/lib/python3.8/site-packages/docker/utils/utils.py
projeto-de-algoritmos/Grafos2_IMDBConnection
5bcd9a631f6d871d2d9d3038a9904b9e930ac64a
[ "MIT" ]
null
null
null
import base64 import json import os import os.path import shlex import string from datetime import datetime from distutils.version import StrictVersion from .. import errors from .. import tls from ..constants import DEFAULT_HTTP_HOST from ..constants import DEFAULT_UNIX_SOCKET from ..constants import DEFAULT_NPIPE fr...
27.830303
78
0.564387
import base64 import json import os import os.path import shlex import string from datetime import datetime from distutils.version import StrictVersion from .. import errors from .. import tls from ..constants import DEFAULT_HTTP_HOST from ..constants import DEFAULT_UNIX_SOCKET from ..constants import DEFAULT_NPIPE fr...
true
true
f703cbd8080c7a50635529e13a3dc9a8386266d3
13,462
py
Python
airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py
Danucas/airbyte
9e77879a7a3b1a5a559a3df9fa85056365b6fbef
[ "MIT" ]
1
2022-03-29T01:08:58.000Z
2022-03-29T01:08:58.000Z
airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py
Danucas/airbyte
9e77879a7a3b1a5a559a3df9fa85056365b6fbef
[ "MIT" ]
5
2022-02-22T14:49:48.000Z
2022-03-19T10:43:08.000Z
airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py
Danucas/airbyte
9e77879a7a3b1a5a559a3df9fa85056365b6fbef
[ "MIT" ]
1
2022-03-11T06:21:24.000Z
2022-03-11T06:21:24.000Z
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # # generated by datamodel-codegen: # filename: airbyte_protocol.yaml from __future__ import annotations from enum import Enum from typing import Any, Dict, List, Optional, Union from pydantic import AnyUrl, BaseModel, Extra, Field class Type(Enum): ...
53
1,333
0.726267
from __future__ import annotations from enum import Enum from typing import Any, Dict, List, Optional, Union from pydantic import AnyUrl, BaseModel, Extra, Field class Type(Enum): RECORD = "RECORD" STATE = "STATE" LOG = "LOG" SPEC = "SPEC" CONNECTION_STATUS = "CONNECTION_STATUS" CATAL...
true
true
f703cc16c1bc121575b31193db24ab7d64ed8f56
3,337
py
Python
app/waypointapp.py
shinwachi/waypointapp
c7a5f8fda76b64fc0a8124bf5737dab2ca7e8301
[ "MIT", "Unlicense" ]
null
null
null
app/waypointapp.py
shinwachi/waypointapp
c7a5f8fda76b64fc0a8124bf5737dab2ca7e8301
[ "MIT", "Unlicense" ]
null
null
null
app/waypointapp.py
shinwachi/waypointapp
c7a5f8fda76b64fc0a8124bf5737dab2ca7e8301
[ "MIT", "Unlicense" ]
null
null
null
import os, collections, sqlite3 from flask import Flask, render_template from flask.ext.bootstrap import Bootstrap from AsciiDammit import asciiDammit app = Flask(__name__) bootstrap = Bootstrap(app) import util as wpu configDict = {} appDataDirDict = {} appName = "waypointapp" @app.route('/') def index(): appName...
36.271739
212
0.712017
import os, collections, sqlite3 from flask import Flask, render_template from flask.ext.bootstrap import Bootstrap from AsciiDammit import asciiDammit app = Flask(__name__) bootstrap = Bootstrap(app) import util as wpu configDict = {} appDataDirDict = {} appName = "waypointapp" @app.route('/') def index(): appName...
true
true
f703ce91cf2543bf6e32692a3a3e81e02753760e
7,646
py
Python
python/deepLearningTorch.py
demarley/leopard
52c5eb2dd732798972d429887c273f8449039c8f
[ "MIT" ]
null
null
null
python/deepLearningTorch.py
demarley/leopard
52c5eb2dd732798972d429887c273f8449039c8f
[ "MIT" ]
1
2018-08-26T16:48:47.000Z
2018-08-26T16:48:47.000Z
python/deepLearningTorch.py
demarley/leopard
52c5eb2dd732798972d429887c273f8449039c8f
[ "MIT" ]
1
2018-09-06T07:57:03.000Z
2018-09-06T07:57:03.000Z
""" Created: 16 August 2018 Last Updated: 16 August 2018 Dan Marley daniel.edison.marley@cernSPAMNOT.ch Texas A&M University ----- Class for performing deep learning in pytorch Designed for running on desktop at TAMU with specific set of software installed --> not guaranteed to work in CMSSW environment! D...
34.913242
132
0.615747
import json import util import datetime import collections from deepLearning import DeepLearning import uproot import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as tf from torch.autograd import Variable from sklearn.model_selection import StratifiedKFold from sklea...
true
true
f703ced66ac13bee7f8100c8b3e3b18e720c8fc6
793
py
Python
core/csrc/torch_nndistance/test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
33
2021-12-15T07:11:47.000Z
2022-03-29T08:58:32.000Z
core/csrc/torch_nndistance/test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
3
2021-12-15T11:39:54.000Z
2022-03-29T07:24:23.000Z
core/csrc/torch_nndistance/test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
null
null
null
import torch import os.path as osp import sys from torch.autograd import Variable cur_dir = osp.dirname(osp.abspath(__file__)) sys.path.insert(0, cur_dir) import torch_nndistance as NND p1 = torch.rand(10, 1000, 3) p2 = torch.rand(10, 1500, 3) points1 = Variable(p1, requires_grad=True) points2 = p2 points1 = points1...
23.323529
49
0.725095
import torch import os.path as osp import sys from torch.autograd import Variable cur_dir = osp.dirname(osp.abspath(__file__)) sys.path.insert(0, cur_dir) import torch_nndistance as NND p1 = torch.rand(10, 1000, 3) p2 = torch.rand(10, 1500, 3) points1 = Variable(p1, requires_grad=True) points2 = p2 points1 = points1...
true
true
f703cfe3cdfc3e3b298ee7f07fe599e74fbf88d9
1,608
py
Python
linesman/geo.py
burrscurr/linesman
ace4b38ac54e2cec29e49023cb725afe040c017a
[ "MIT" ]
3
2021-01-05T21:00:26.000Z
2021-01-26T00:08:26.000Z
linesman/geo.py
burrscurr/linesman
ace4b38ac54e2cec29e49023cb725afe040c017a
[ "MIT" ]
47
2021-01-04T17:31:26.000Z
2022-02-14T04:03:47.000Z
linesman/geo.py
burrscurr/linesman
ace4b38ac54e2cec29e49023cb725afe040c017a
[ "MIT" ]
1
2021-01-05T21:02:23.000Z
2021-01-05T21:02:23.000Z
from geographiclib.geodesic import Geodesic from pyproj import CRS, Transformer from .geometry import Vector, Line def azimuth(p1: Vector, p2: Vector): """:return: azimuth of geodesic through p1 and p2 in p1 with WGS84""" res = Geodesic.WGS84.Inverse(p1.y, p1.x, p2.y, p2.x) return res['azi1'] def dist...
35.733333
79
0.670398
from geographiclib.geodesic import Geodesic from pyproj import CRS, Transformer from .geometry import Vector, Line def azimuth(p1: Vector, p2: Vector): res = Geodesic.WGS84.Inverse(p1.y, p1.x, p2.y, p2.x) return res['azi1'] def dist_m(a, b): res = Geodesic.WGS84.Inverse(a.y, a.x, b.y, b.x) return ...
true
true
f703d16b31f5ff425ee3027eb528ae11f8e09ab5
591
py
Python
python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/a.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/a.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/a.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
from enum import Enum class Color(Enum): red = 1 green = 2 blue = 3 print(Color.red.name, Color.red.name.upper()) print(Color.red.name.<warning descr="Unresolved attribute reference 'foo' for class 'str'">foo</warning>) print(Color.red.value.<warning descr="Unresolved attribute reference 'foo' for class...
32.833333
109
0.736041
from enum import Enum class Color(Enum): red = 1 green = 2 blue = 3 print(Color.red.name, Color.red.name.upper()) print(Color.red.name.<warning descr="Unresolved attribute reference 'foo' for class 'str'">foo</warning>) print(Color.red.value.<warning descr="Unresolved attribute reference 'foo' for class...
false
true
f703d29d936bbe5b59762ca968f7b33cb9db5fbd
1,466
py
Python
WEEKS/CD_Sata-Structures/_MISC/algorithms/tree/segment_tree/segment_tree.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
11
2021-02-18T04:53:44.000Z
2022-01-16T10:57:39.000Z
WEEKS/CD_Sata-Structures/_MISC/algorithms/tree/segment_tree/segment_tree.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
162
2021-03-09T01:52:11.000Z
2022-03-12T01:09:07.000Z
WEEKS/CD_Sata-Structures/_MISC/algorithms/tree/segment_tree/segment_tree.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
8
2021-02-18T05:12:34.000Z
2022-03-06T19:02:14.000Z
""" Segment_tree creates a segment tree with a given array and function, allowing queries to be done later in log(N) time function takes 2 values and returns a same type value """ class SegmentTree: def __init__(self, arr, function): self.segment = [0 for x in range(3 * len(arr) + 3)] self.arr = a...
28.192308
87
0.514325
class SegmentTree: def __init__(self, arr, function): self.segment = [0 for x in range(3 * len(arr) + 3)] self.arr = arr self.fn = function self.maketree(0, 0, len(arr) - 1) def make_tree(self, i, l, r): if l == r: self.segment[i] = self.arr[l] elif...
true
true
f703d2a9f3424c2ad908f8b302031b072df6c8fa
426
py
Python
rfapi/test/test_errors.py
cestrada-rf/rfapi-python
ca813d652fbfd02e90df2d4b7d280a981bd8d5c3
[ "Apache-2.0" ]
32
2016-12-09T13:31:31.000Z
2022-02-12T00:59:44.000Z
rfapi/test/test_errors.py
cestrada-rf/rfapi-python
ca813d652fbfd02e90df2d4b7d280a981bd8d5c3
[ "Apache-2.0" ]
5
2019-03-21T10:01:19.000Z
2020-02-13T14:06:54.000Z
rfapi/test/test_errors.py
cestrada-rf/rfapi-python
ca813d652fbfd02e90df2d4b7d280a981bd8d5c3
[ "Apache-2.0" ]
10
2018-06-25T15:49:28.000Z
2021-12-03T12:39:44.000Z
import unittest from rfapi.error import JsonParseError, MissingAuthError class ApiClientTest(unittest.TestCase): def test_json_parse_error(self): resp = type('', (object,), {"content": ""})() msg = "Could not parse" e = JsonParseError(msg, resp) self.assertEqual(str(e), msg) d...
28.4
56
0.650235
import unittest from rfapi.error import JsonParseError, MissingAuthError class ApiClientTest(unittest.TestCase): def test_json_parse_error(self): resp = type('', (object,), {"content": ""})() msg = "Could not parse" e = JsonParseError(msg, resp) self.assertEqual(str(e), msg) d...
true
true
f703d2c19fb0503f4ba11caa93e47284e1be03ce
899
py
Python
src/awkward/_v2/operations/describe/is_valid.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
519
2019-10-17T12:36:22.000Z
2022-03-26T23:28:19.000Z
src/awkward/_v2/operations/describe/is_valid.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
924
2019-11-03T21:05:01.000Z
2022-03-31T22:44:30.000Z
src/awkward/_v2/operations/describe/is_valid.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
56
2019-12-17T15:49:22.000Z
2022-03-09T20:34:06.000Z
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE from __future__ import absolute_import import awkward as ak np = ak.nplike.NumpyMetadata.instance() def is_valid(array, exception=False): pass # """ # Args: # array (#ak.Array, #ak.Record, #ak.layout.Conte...
29.966667
122
0.679644
from __future__ import absolute_import import awkward as ak np = ak.nplike.NumpyMetadata.instance() def is_valid(array, exception=False): pass # Args: # array (#ak.Array, #ak.Record, #ak.layout.Content, #ak.layout.Record, #ak.ArrayBuilder, #ak.layout.ArrayBuilder): # Array or record...
true
true
f703d2e046e620c84768df767fae33740a8a8fed
1,338
py
Python
project/correctiondemos/pythag_test.py
gorff/Toric-Code-Correlated-Error-Decoder
c43cf34c22f03334add078f5d02e6604e5c89cba
[ "MIT" ]
1
2017-11-21T02:55:30.000Z
2017-11-21T02:55:30.000Z
project/correctiondemos/pythag_test.py
gorff/Toric-Code-Correlated-Error-Decoder
c43cf34c22f03334add078f5d02e6604e5c89cba
[ "MIT" ]
null
null
null
project/correctiondemos/pythag_test.py
gorff/Toric-Code-Correlated-Error-Decoder
c43cf34c22f03334add078f5d02e6604e5c89cba
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import matplotlib.mlab as mlab import numpy as np import os,sys,inspect import imageio sys.path.insert(1, os.path.join(sys.path[0], '..')) #go up a dir to import import CodePy2.funmath as funmath #import imageio n = 1.0 sizes = [i/n for i in range(33*int(n))] xvals = sizes filenames ...
29.086957
92
0.675635
import matplotlib.pyplot as plt import matplotlib.mlab as mlab import numpy as np import os,sys,inspect import imageio sys.path.insert(1, os.path.join(sys.path[0], '..')) import CodePy2.funmath as funmath n = 1.0 sizes = [i/n for i in range(33*int(n))] xvals = sizes filenames = [] for expectedlength in sizes: ...
true
true
f703d2f1fc5bfee57fcd5d4184762ae275517939
11,005
py
Python
models/Transformer.py
SunYanCN/nlp-experiments-in-pytorch
5d05a53146dffd707e4d037230656f980d7be05c
[ "MIT" ]
35
2018-11-19T14:08:16.000Z
2021-12-23T22:51:43.000Z
models/Transformer.py
SunYanCN/nlp-experiments-in-pytorch
5d05a53146dffd707e4d037230656f980d7be05c
[ "MIT" ]
null
null
null
models/Transformer.py
SunYanCN/nlp-experiments-in-pytorch
5d05a53146dffd707e4d037230656f980d7be05c
[ "MIT" ]
11
2019-01-12T06:48:39.000Z
2021-05-09T16:59:58.000Z
import copy import math import matplotlib.pyplot as plt import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from utils.utils import clones class LayerNormGoogle(nn.Module): def __init__(self, features, epsilon=1e-6): super(LayerNormGo...
37.948276
119
0.6408
import copy import math import matplotlib.pyplot as plt import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from utils.utils import clones class LayerNormGoogle(nn.Module): def __init__(self, features, epsilon=1e-6): super(LayerNormGo...
true
true
f703d2f45a05feea75027e7f0d41d7453e9b6fc3
3,283
py
Python
program/model/version/ver1_2.py
donyori/2018ccf_bdci_inter_fund_correlation_prediction
6e06a3e192e05ae1e9822111cf323eda3a61bf4e
[ "MIT" ]
null
null
null
program/model/version/ver1_2.py
donyori/2018ccf_bdci_inter_fund_correlation_prediction
6e06a3e192e05ae1e9822111cf323eda3a61bf4e
[ "MIT" ]
1
2018-12-18T05:14:08.000Z
2019-01-16T06:31:35.000Z
program/model/version/ver1_2.py
donyori/2018ccf_bdci_inter_fund_correlation_prediction
6e06a3e192e05ae1e9822111cf323eda3a61bf4e
[ "MIT" ]
null
null
null
from tensorflow import keras from constants import TRADING_DAYS_PER_WEEK, INDEX_RETURN_INDICATOR_NUMBER from ..constants import * MODEL_NAME = 'ifcp_model_ver1_2' ROLLING_WINDOW_SIZE = TRADING_DAYS_PER_WEEK def build_model(): fund1_return = keras.Input(shape=(ROLLING_WINDOW_SIZE, 1), name=FUND1_RETURN_NAME) ...
49.742424
114
0.73378
from tensorflow import keras from constants import TRADING_DAYS_PER_WEEK, INDEX_RETURN_INDICATOR_NUMBER from ..constants import * MODEL_NAME = 'ifcp_model_ver1_2' ROLLING_WINDOW_SIZE = TRADING_DAYS_PER_WEEK def build_model(): fund1_return = keras.Input(shape=(ROLLING_WINDOW_SIZE, 1), name=FUND1_RETURN_NAME) ...
true
true
f703d302b98ab56a3febdd91cdf7285c913024e2
134
py
Python
fugue/extensions/creator/__init__.py
WangCHX/fugue
bb9758d23b0041d4ed00f6195f317d097a9dd683
[ "Apache-2.0" ]
null
null
null
fugue/extensions/creator/__init__.py
WangCHX/fugue
bb9758d23b0041d4ed00f6195f317d097a9dd683
[ "Apache-2.0" ]
null
null
null
fugue/extensions/creator/__init__.py
WangCHX/fugue
bb9758d23b0041d4ed00f6195f317d097a9dd683
[ "Apache-2.0" ]
null
null
null
# flake8: noqa from fugue.extensions.creator.creator import Creator from fugue.extensions.creator.convert import creator, _to_creator
33.5
65
0.843284
from fugue.extensions.creator.creator import Creator from fugue.extensions.creator.convert import creator, _to_creator
true
true
f703d38691891112aa274bc0ec16962638b37767
2,140
py
Python
app/utils/process.py
duzhangqiong/AutoLine
9c32261eb9a47610ee01787420c300b42eee26ac
[ "Apache-2.0" ]
249
2018-05-11T08:43:17.000Z
2021-08-13T09:32:57.000Z
app/utils/process.py
duzhangqiong/AutoLine
9c32261eb9a47610ee01787420c300b42eee26ac
[ "Apache-2.0" ]
31
2018-05-15T01:25:18.000Z
2022-03-12T00:11:29.000Z
app/utils/process.py
duzhangqiong/AutoLine
9c32261eb9a47610ee01787420c300b42eee26ac
[ "Apache-2.0" ]
132
2018-03-01T02:34:52.000Z
2021-02-08T02:00:40.000Z
# -*- coding: utf-8 -*- __author__ = "苦叶子" """ 公众号: 开源优测 Email: lymking@foxmail.com """ import os import time import tempfile import subprocess class Process: def __init__(self, command): self._command = command self._process = None self._error = None self._out_file = None ...
26.097561
99
0.600467
__author__ = "苦叶子" import os import time import tempfile import subprocess class Process: def __init__(self, command): self._command = command self._process = None self._error = None self._out_file = None self._out_path = None self._out_fd = None print(c...
true
true
f703d3e86257aec1a99970afe7f847828a980f0d
8,382
py
Python
linnapi/requests/inventory.py
stcstores/linnapi
88cc1d73444f44b7d901dc1086790a300066ea6e
[ "MIT" ]
null
null
null
linnapi/requests/inventory.py
stcstores/linnapi
88cc1d73444f44b7d901dc1086790a300066ea6e
[ "MIT" ]
null
null
null
linnapi/requests/inventory.py
stcstores/linnapi
88cc1d73444f44b7d901dc1086790a300066ea6e
[ "MIT" ]
null
null
null
"""Inventory requests.""" from collections import defaultdict from typing import Any, MutableMapping import requests from linnapi.request import LinnworksAPIRequest class GetStockItemIDsBySKU(LinnworksAPIRequest): """Return the stock item ID for a SKU.""" URL = "https://eu-ext.linnworks.net/api/Inventory/...
34.780083
91
0.636722
from collections import defaultdict from typing import Any, MutableMapping import requests from linnapi.request import LinnworksAPIRequest class GetStockItemIDsBySKU(LinnworksAPIRequest): URL = "https://eu-ext.linnworks.net/api/Inventory/GetStockItemIdsBySKU" METHOD = LinnworksAPIRequest.POST @classm...
true
true
f703d55dccf3102a6d3ac6083df3373cec870017
9,334
py
Python
www/Webserver.py
william-stearns/E_ink_dashboard
1625b213baef336833497c4593157485cfffdad4
[ "MIT" ]
67
2020-10-06T11:03:51.000Z
2022-02-14T23:07:45.000Z
www/Webserver.py
william-stearns/E_ink_dashboard
1625b213baef336833497c4593157485cfffdad4
[ "MIT" ]
11
2020-11-20T17:44:36.000Z
2021-03-28T19:10:34.000Z
www/Webserver.py
william-stearns/E_ink_dashboard
1625b213baef336833497c4593157485cfffdad4
[ "MIT" ]
9
2020-10-06T15:10:47.000Z
2021-07-12T14:14:51.000Z
from flask import Flask, render_template, request from dashboard_forms import Dashform #import create_pickle as p_j import json import os app = Flask(__name__) app.secret_key = 'dash_flask_key' creddir = os.path.join(os.path.dirname( os.path.dirname(os.path.realpath(__file__))), 'credentials/dash_id.json'...
43.821596
89
0.604885
from flask import Flask, render_template, request from dashboard_forms import Dashform import json import os app = Flask(__name__) app.secret_key = 'dash_flask_key' creddir = os.path.join(os.path.dirname( os.path.dirname(os.path.realpath(__file__))), 'credentials/dash_id.json') tempdir = os.path.join(o...
true
true
f703d5bcb5149ae9902f6dabfb5129e5c54b227c
548
py
Python
Thesis@3.9.1/Lib/site-packages/django/db/backends/base/client.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/django/db/backends/base/client.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/django/db/backends/base/client.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
class BaseDatabaseClient: """Encapsulate backend-specific methods for opening a client shell.""" # This should be a string representing the name of the executable # (e.g., "psql"). Subclasses must override this. executable_name = None def __init__(self, connection): # connection is an inst...
34.25
79
0.691606
class BaseDatabaseClient: executable_name = None def __init__(self, connection): self.connection = connection def runshell(self, parameters): raise NotImplementedError( "subclasses of BaseDatabaseClient must provide a runshell() method" )
true
true
f703d886c8b787f5722852a6e7cd7aa2d38d2ecf
2,072
py
Python
tests/abstractions/test_observer.py
symuvia/symupy
e6604c59bb4474f594ef5c997508f0407c9b3870
[ "MIT" ]
2
2019-07-01T09:58:53.000Z
2020-06-12T12:12:46.000Z
tests/abstractions/test_observer.py
licit-lab/symupy
942a17ee78cd12a363a4cd7b7f8363e239ccf7fe
[ "MIT" ]
33
2021-01-18T13:59:01.000Z
2021-11-29T13:21:10.000Z
tests/abstractions/test_observer.py
licit-lab/symupy
942a17ee78cd12a363a4cd7b7f8363e239ccf7fe
[ "MIT" ]
7
2018-07-12T13:34:38.000Z
2019-10-02T13:37:31.000Z
""" Unit tests for symupy.api.stream """ # ============================================================================ # STANDARD IMPORTS # ============================================================================ import pytest # ============================================================================ #...
25.9
78
0.533784
import pytest from symupy.runtime.logic.publisher import Publisher from symupy.runtime.logic.subscriber import Subscriber @pytest.fixture def default_channel(): return ("default",) @pytest.fixture def channels(): return ("channel 1", "channel 2") def test_default_constructor(default_channel)...
true
true
f703d887e5f0d59a66cda0527be6937a58680515
1,666
gyp
Python
ion/image/tests/image_tests.gyp
RobLoach/ion
9e659416fb04bb3d3a67df1e018d7c2ccab9d468
[ "Apache-2.0" ]
null
null
null
ion/image/tests/image_tests.gyp
RobLoach/ion
9e659416fb04bb3d3a67df1e018d7c2ccab9d468
[ "Apache-2.0" ]
null
null
null
ion/image/tests/image_tests.gyp
RobLoach/ion
9e659416fb04bb3d3a67df1e018d7c2ccab9d468
[ "Apache-2.0" ]
null
null
null
# # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
28.724138
74
0.620048
{ 'includes': [ '../../common.gypi', ], 'targets': [ { 'target_name': 'ionimage_test', 'includes': [ '../../dev/test_target.gypi' ], 'sources' : [ 'conversionutils_test.cc', 'ninepatch_test.cc', 'renderutils_test.cc', ], 'dependencies' ...
true
true
f703d8ac1afa839366c06b687eddbcf3c2cbd0eb
50
py
Python
test/SIM_test_ip/Modified_data/nested_includes.py
iamthad/trick
88ac5b5990228e42a653347c9d7a103acea4d137
[ "NASA-1.3" ]
647
2015-05-07T16:08:16.000Z
2022-03-30T02:33:21.000Z
test/SIM_test_ip/Modified_data/nested_includes.py
tanglemontree/trick
f182c723495185708434e67789457eb29d52ad58
[ "NASA-1.3" ]
995
2015-04-30T19:44:31.000Z
2022-03-31T20:14:44.000Z
test/SIM_test_ip/Modified_data/nested_includes.py
tanglemontree/trick
f182c723495185708434e67789457eb29d52ad58
[ "NASA-1.3" ]
251
2015-05-15T09:24:34.000Z
2022-03-22T20:39:05.000Z
exec(open("Modified_data/next_level.py").read())
16.666667
48
0.74
exec(open("Modified_data/next_level.py").read())
true
true
f703d8cbc3d8b80905b75b7ed799f9b2c558bc79
101
py
Python
stlearn/tools/microenv/cci/__init__.py
duypham2108/dev_st
47adcfa5803eba7549b1185ec69d2317b386d9ff
[ "BSD-3-Clause" ]
67
2020-06-01T05:19:23.000Z
2022-03-31T20:47:50.000Z
stlearn/tools/microenv/cci/__init__.py
duypham2108/dev_st
47adcfa5803eba7549b1185ec69d2317b386d9ff
[ "BSD-3-Clause" ]
34
2020-11-02T18:01:43.000Z
2022-03-16T21:58:54.000Z
stlearn/tools/microenv/cci/__init__.py
duypham2108/dev_st
47adcfa5803eba7549b1185ec69d2317b386d9ff
[ "BSD-3-Clause" ]
13
2020-05-14T05:10:22.000Z
2022-03-09T14:05:38.000Z
from .base import lr from . import het from .merge import merge from .permutation import permutation
20.2
36
0.80198
from .base import lr from . import het from .merge import merge from .permutation import permutation
true
true
f703da02f25d5ed4cc390c9c56ecc410d25fc0b9
2,488
py
Python
events/tracon8/management/commands/setup_tracon8.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
events/tracon8/management/commands/setup_tracon8.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
events/tracon8/management/commands/setup_tracon8.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
# encoding: utf-8 from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from dateutil.tz import tzlocal from core.models import Event, Venue from programme.models import ProgrammeEventMeta, TimeBlock...
33.621622
107
0.592042
from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from dateutil.tz import tzlocal from core.models import Event, Venue from programme.models import ProgrammeEventMeta, TimeBlock, SpecialStartTim...
true
true
f703da2c8363ee59f03ded7651a552589e14a980
470
py
Python
ml_tutorial/test.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
ml_tutorial/test.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
ml_tutorial/test.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
import svm as SVM import numpy as np data_dict = { -1:np.array( [[10,9,1], [2,8,1], [3,8,1],]), 1:np.array( [[5,1,1], [6,-1,1], [7,3,1],])} svm = SVM.Support_Vector_Machine() svm.fit(data=data_dict) predict_us = [[0,10,1], [1,3,1], ...
16.785714
37
0.412766
import svm as SVM import numpy as np data_dict = { -1:np.array( [[10,9,1], [2,8,1], [3,8,1],]), 1:np.array( [[5,1,1], [6,-1,1], [7,3,1],])} svm = SVM.Support_Vector_Machine() svm.fit(data=data_dict) predict_us = [[0,10,1], [1,3,1], ...
true
true
f703db006bf2006e44c7efb17e8369f7a87596e3
3,745
py
Python
scripts/webui-sc/confeditor.py
lucywitherall/eve-pi
14f4555d0b89eaf8b4a9aed9f629c9358c4b121d
[ "MIT" ]
null
null
null
scripts/webui-sc/confeditor.py
lucywitherall/eve-pi
14f4555d0b89eaf8b4a9aed9f629c9358c4b121d
[ "MIT" ]
null
null
null
scripts/webui-sc/confeditor.py
lucywitherall/eve-pi
14f4555d0b89eaf8b4a9aed9f629c9358c4b121d
[ "MIT" ]
1
2019-10-07T12:56:55.000Z
2019-10-07T12:56:55.000Z
#!/usr/bin/python3 import configparser config = configparser.ConfigParser() config.read('eve-conf.ini') def int_imp(inp): while True: try: int(inp) break except ValueError: print('Input has to be a number.') inp = input('Select again: ') return i...
27.137681
81
0.5247
import configparser config = configparser.ConfigParser() config.read('eve-conf.ini') def int_imp(inp): while True: try: int(inp) break except ValueError: print('Input has to be a number.') inp = input('Select again: ') return int(inp) def secti...
true
true
f703db3a5054be83b8f321fde2dfcb1f74eb3ea4
3,132
py
Python
examples/distancePlusAmplitude.py
OnionIoT/tau-lidar-camera
a70b24e18be8e4c5abfe525c6768fbc10a492fd8
[ "MIT" ]
31
2020-12-18T16:35:15.000Z
2022-03-25T18:41:19.000Z
examples/distancePlusAmplitude.py
OnionIoT/tau-lidar-camera
a70b24e18be8e4c5abfe525c6768fbc10a492fd8
[ "MIT" ]
17
2020-11-18T16:10:36.000Z
2022-02-01T22:19:11.000Z
examples/distancePlusAmplitude.py
OnionIoT/tau-lidar-camera
a70b24e18be8e4c5abfe525c6768fbc10a492fd8
[ "MIT" ]
4
2021-01-18T17:25:02.000Z
2021-11-01T13:25:45.000Z
import argparse import numpy as np import cv2 from TauLidarCommon.frame import FrameType from TauLidarCamera.camera import Camera def setup(serialPort=None): port = None camera = None # if no serial port is specified, scan for available Tau Camera devices if serialPort is None: ports = Camera...
33.319149
170
0.618455
import argparse import numpy as np import cv2 from TauLidarCommon.frame import FrameType from TauLidarCamera.camera import Camera def setup(serialPort=None): port = None camera = None if serialPort is None: ports = Camera.scan() port = ports[0] else: port =...
true
true
f703dc1425cb1df6daa7defbf0f85faec7d5dac6
5,614
py
Python
minqlx-plugins/branding.py
tjone270/Quake-Live
f3864ab74752218044fbe6f43fba3978d519e3f1
[ "RSA-MD" ]
35
2015-11-23T22:46:40.000Z
2021-11-26T08:11:02.000Z
minqlx-plugins/branding.py
tjone270/Quake-Live
f3864ab74752218044fbe6f43fba3978d519e3f1
[ "RSA-MD" ]
14
2016-01-21T22:17:19.000Z
2017-12-30T06:34:08.000Z
minqlx-plugins/branding.py
tjone270/Quake-Live
f3864ab74752218044fbe6f43fba3978d519e3f1
[ "RSA-MD" ]
24
2015-12-10T16:49:28.000Z
2021-08-15T00:24:25.000Z
# Created by Thomas Jones on 06/11/15 - thomas@tomtecsolutions.com # branding.py, a plugin for minqlx to brand your server. # This plugin is released to everyone, for any purpose. It comes with no warranty, no guarantee it works, it's released AS IS. # You can modify everything, except for lines 1-4 and the !tomtec_ver...
48.817391
167
0.63876
# You can modify everything, except for lines 1-4 and the !tomtec_versions code. They're there to indicate I whacked this together originally. Please make it better :D import minqlx class branding(minqlx.Plugin): def __init__(self): self.add_hook("new_game", self.brand_map) self.add_hook("play...
true
true
f703dcb4a2d04a5dcb8b6f0e5e190bc6173390ca
13,974
py
Python
cartridge/project_template/project_name/settings.py
dsanders11/cartridge
d3a14da3fbbd0c36c589c2abef1bb3364ef28faf
[ "BSD-2-Clause" ]
null
null
null
cartridge/project_template/project_name/settings.py
dsanders11/cartridge
d3a14da3fbbd0c36c589c2abef1bb3364ef28faf
[ "BSD-2-Clause" ]
null
null
null
cartridge/project_template/project_name/settings.py
dsanders11/cartridge
d3a14da3fbbd0c36c589c2abef1bb3364ef28faf
[ "BSD-2-Clause" ]
null
null
null
import os from django.utils.translation import gettext_lazy as _ ###################### # CARTRIDGE SETTINGS # ###################### # The following settings are already defined in cartridge.shop.defaults # with default values, but are common enough to be put here, commented # out, for conveniently overriding. Plea...
35.467005
87
0.696508
import os from django.utils.translation import gettext_lazy as _ is successful and all of the order # object's data has been created. This is where any custom order (_("Shop"), ("shop.Product", "shop.ProductOption", "shop.DiscountCode", # "shop.Sale", "shop.Order")), # ("Site",...
true
true
f703dd557ff0c6601e9b1327d30fb5ee5f8ded6a
3,770
py
Python
main/hit_object.py
MBmasher/weighted-object
eaaf25338240873b7c4197097b2bb73be256b702
[ "MIT" ]
null
null
null
main/hit_object.py
MBmasher/weighted-object
eaaf25338240873b7c4197097b2bb73be256b702
[ "MIT" ]
null
null
null
main/hit_object.py
MBmasher/weighted-object
eaaf25338240873b7c4197097b2bb73be256b702
[ "MIT" ]
null
null
null
# HitObject class class HitObject: def __init__(self, start_x, start_y, end_x, end_y, time, object_type): self.start_x = start_x self.start_y = start_y self.end_x = end_x self.end_y = end_y self.time = time self.object_type = object_type # hit_circle, eve...
35.233645
110
0.659947
class HitObject: def __init__(self, start_x, start_y, end_x, end_y, time, object_type): self.start_x = start_x self.start_y = start_y self.end_x = end_x self.end_y = end_y self.time = time self.object_type = object_type def find_start(lines): ...
true
true
f703ddc91411d775bc61ad267063c63f00cf2580
20,786
py
Python
src/sage/schemes/elliptic_curves/weierstrass_morphism.py
bopopescu/classic_diff_geom
2b1d88becbc8cb30962e0995cc78e429e0f5589f
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/elliptic_curves/weierstrass_morphism.py
bopopescu/classic_diff_geom
2b1d88becbc8cb30962e0995cc78e429e0f5589f
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/elliptic_curves/weierstrass_morphism.py
bopopescu/classic_diff_geom
2b1d88becbc8cb30962e0995cc78e429e0f5589f
[ "BSL-1.0" ]
1
2020-07-24T12:08:30.000Z
2020-07-24T12:08:30.000Z
r""" Isomorphisms between Weierstrass models of elliptic curves AUTHORS: - Robert Bradshaw (2007): initial version - John Cremona (Jan 2008): isomorphisms, automorphisms and twists in all characteristics """ #***************************************************************************** # Copyright (C) 2007 Rober...
33.964052
150
0.531415
from sage.categories.morphism import Morphism from constructor import EllipticCurve from sage.categories.homset import Hom class baseWI: def __init__(self, u=1, r=0, s=0, t=0): if u==0: raise ValueError("u!=0 required for baseWI") self.u=u; self.r=r; self.s=s; self.t=t...
true
true
f703de5e7d7acf281786e68b60e43bb7dc901b58
3,336
py
Python
conf/configs/deploy.py
HeliumEdu/template-project
f5da3f35d6aa4ba4c3d162e59d195720e8c2101b
[ "MIT" ]
2
2018-12-22T19:09:04.000Z
2019-01-23T19:09:31.000Z
conf/configs/deploy.py
HeliumEdu/template-project
f5da3f35d6aa4ba4c3d162e59d195720e8c2101b
[ "MIT" ]
20
2019-07-03T20:56:42.000Z
2022-03-02T22:16:29.000Z
conf/configs/deploy.py
HeliumEdu/template-project
f5da3f35d6aa4ba4c3d162e59d195720e8c2101b
[ "MIT" ]
null
null
null
""" Settings specific to prod-like deployable code, reading values from system environment variables. """ import os from conf.configs import common from conf.settings import PROJECT_ID __author__ = "Alex Laird" __copyright__ = "Copyright 2018, Helium Edu" __version__ = "1.1.15" # Define the base working directory o...
26.0625
97
0.566847
import os from conf.configs import common from conf.settings import PROJECT_ID __author__ = "Alex Laird" __copyright__ = "Copyright 2018, Helium Edu" __version__ = "1.1.15" BASE_DIR = os.path.normpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "..")) INSTALLED_APPS = common.INSTALLED_APPS M...
true
true
f703dec0139b9f6b76143414797f05175d6cbaa4
7,986
py
Python
recipes/views.py
4dragunov/foodgram-project
7a5691522047fe6715e1e560c17dcf77852558fc
[ "MIT" ]
null
null
null
recipes/views.py
4dragunov/foodgram-project
7a5691522047fe6715e1e560c17dcf77852558fc
[ "MIT" ]
null
null
null
recipes/views.py
4dragunov/foodgram-project
7a5691522047fe6715e1e560c17dcf77852558fc
[ "MIT" ]
null
null
null
import operator from functools import reduce from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.db.models import Q, Sum from django.shortcuts import HttpResponse, get_object_or_404, redirect, render from django.views.generic import View from django.view...
36.972222
79
0.576258
import operator from functools import reduce from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.db.models import Q, Sum from django.shortcuts import HttpResponse, get_object_or_404, redirect, render from django.views.generic import View from django.view...
true
true
f703df5f0c91bc68a4c4c50b7014ee977351bac8
4,958
py
Python
backend/services/toxic_comment_jigsaw/application/ai/training/src/train.py
R-aryan/Jigsaw-Toxic-Comment-Classification
e5e4da7df379ac1b315f2bde655386180f39c517
[ "MIT" ]
null
null
null
backend/services/toxic_comment_jigsaw/application/ai/training/src/train.py
R-aryan/Jigsaw-Toxic-Comment-Classification
e5e4da7df379ac1b315f2bde655386180f39c517
[ "MIT" ]
1
2021-07-08T14:57:25.000Z
2021-07-08T14:57:25.000Z
backend/services/toxic_comment_jigsaw/application/ai/training/src/train.py
R-aryan/Jigsaw-Toxic-Comment-Classification
e5e4da7df379ac1b315f2bde655386180f39c517
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import torch from sklearn.model_selection import train_test_split from backend.services.toxic_comment_jigsaw.application.ai.model import BERTClassifier from backend.services.toxic_comment_jigsaw.application.ai.training.src.dataset import BERTDataset from backend.services.toxic_co...
42.741379
120
0.587535
import pandas as pd import numpy as np import torch from sklearn.model_selection import train_test_split from backend.services.toxic_comment_jigsaw.application.ai.model import BERTClassifier from backend.services.toxic_comment_jigsaw.application.ai.training.src.dataset import BERTDataset from backend.services.toxic_co...
true
true
f703dfbac51316faf74f9bc6a25208bbba2a78b2
22,168
py
Python
tests/hacking/checks.py
msimonin/rally-openstack
fc899c7262125e4739139f708a830ef975f386a6
[ "Apache-2.0" ]
null
null
null
tests/hacking/checks.py
msimonin/rally-openstack
fc899c7262125e4739139f708a830ef975f386a6
[ "Apache-2.0" ]
null
null
null
tests/hacking/checks.py
msimonin/rally-openstack
fc899c7262125e4739139f708a830ef975f386a6
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
35.243243
79
0.621391
import functools import re import tokenize re_assert_equal_end_with_true_or_false = re.compile( r"assertEqual\(.*?, \s+(True|False)\)$") re_assert_equal_start_with_true_or_false = re.compile( r"assertEqual\((True|False),") re_assert_true_instance = re.compile( r"(.)*assertTrue\(isinstance\((\...
true
true
f703e067097e7fd54be3a51d8ada504b3532e390
357
py
Python
carafe_layer/setup.py
chensnathan/CARAFE_CUDA
33d3d3af69b24fc679f6a3a071a19070dc46664b
[ "MIT" ]
1
2019-10-28T15:05:30.000Z
2019-10-28T15:05:30.000Z
carafe_layer/setup.py
chensnathan/CARAFE_CUDA
33d3d3af69b24fc679f6a3a071a19070dc46664b
[ "MIT" ]
1
2021-03-25T10:24:19.000Z
2021-06-08T15:07:34.000Z
carafe_layer/setup.py
chensnathan/CARAFE_CUDA
33d3d3af69b24fc679f6a3a071a19070dc46664b
[ "MIT" ]
1
2020-01-03T09:42:22.000Z
2020-01-03T09:42:22.000Z
from setuptools import setup from torch.utils.cpp_extension import BuildExtension, CUDAExtension setup( name='carafe_layer_cuda', ext_modules=[ CUDAExtension('carafe_layer_cuda', [ 'src/carafe_layer_cuda.cpp', 'src/carafe_layer_kernel.cu', ]) ], cmdclass={ ...
23.8
67
0.644258
from setuptools import setup from torch.utils.cpp_extension import BuildExtension, CUDAExtension setup( name='carafe_layer_cuda', ext_modules=[ CUDAExtension('carafe_layer_cuda', [ 'src/carafe_layer_cuda.cpp', 'src/carafe_layer_kernel.cu', ]) ], cmdclass={ ...
true
true
f703e2683a06f78f7c2643f6719d0e4cc5da5092
429
py
Python
src/saffine/detrending_coeff.py
AU-DATALAB/newsFluxus
20522b2c8c830d2377a9620d149a515baaaa9cf4
[ "MIT" ]
3
2020-06-17T07:56:27.000Z
2021-09-30T09:50:50.000Z
src/saffine/detrending_coeff.py
AU-DATALAB/newsFluxus
20522b2c8c830d2377a9620d149a515baaaa9cf4
[ "MIT" ]
null
null
null
src/saffine/detrending_coeff.py
AU-DATALAB/newsFluxus
20522b2c8c830d2377a9620d149a515baaaa9cf4
[ "MIT" ]
2
2021-02-23T11:36:55.000Z
2021-03-04T10:36:19.000Z
from numpy import * import numpy as np # from numba import jit # @jit def detrending_coeff(win_len , order): #win_len = 51 #order = 2 n = (win_len-1)/2 A = mat(ones((win_len,order+1))) x = np.arange(-n , n+1) for j in range(0 , order + 1): A[:,j] = mat(x ** j).T coeff_output = (A.T * A).I * A...
18.652174
41
0.599068
from numpy import * import numpy as np def detrending_coeff(win_len , order): n = (win_len-1)/2 A = mat(ones((win_len,order+1))) x = np.arange(-n , n+1) for j in range(0 , order + 1): A[:,j] = mat(x ** j).T coeff_output = (A.T * A).I * A.T return coeff_output , A
true
true
f703e2c70bc3ec943e58a06933c76b53f568ea8b
3,851
py
Python
opentraj/toolkit/loaders/loader_pets.py
RedTachyon/OpenTraj
8277f526d714a4e77d0f9f354259ff5b74e59fd2
[ "MIT" ]
null
null
null
opentraj/toolkit/loaders/loader_pets.py
RedTachyon/OpenTraj
8277f526d714a4e77d0f9f354259ff5b74e59fd2
[ "MIT" ]
null
null
null
opentraj/toolkit/loaders/loader_pets.py
RedTachyon/OpenTraj
8277f526d714a4e77d0f9f354259ff5b74e59fd2
[ "MIT" ]
null
null
null
# Author: Javad Amirian # Email: amiryan.j@gmail.com import xml.etree.ElementTree as et import numpy as np import pandas as pd from opentraj.toolkit.core.trajdataset import TrajDataset from opentraj.toolkit.utils.calibration.camera_calibration_tsai import * def load_pets(path, **kwargs): """ :param path: a...
34.693694
96
0.622176
import xml.etree.ElementTree as et import numpy as np import pandas as pd from opentraj.toolkit.core.trajdataset import TrajDataset from opentraj.toolkit.utils.calibration.camera_calibration_tsai import * def load_pets(path, **kwargs): traj_dataset = TrajDataset() annot_xtree = et.parse(path) annot_...
true
true
f703e382437464750f398a5b77d27612a40e8529
7,578
py
Python
config/settings/production.py
danieldourado/estatisticas_facebook_cookiecutter
896903825998f0dee5a6b5d9aa34160f123bd15d
[ "MIT" ]
2
2017-12-22T01:00:22.000Z
2017-12-22T11:14:40.000Z
config/settings/production.py
danieldourado/estatisticas_facebook_cookiecutter
896903825998f0dee5a6b5d9aa34160f123bd15d
[ "MIT" ]
18
2017-12-14T12:04:45.000Z
2022-03-11T23:23:05.000Z
config/settings/production.py
danieldourado/estatisticas_facebook_cookiecutter
896903825998f0dee5a6b5d9aa34160f123bd15d
[ "MIT" ]
1
2021-03-27T16:18:56.000Z
2021-03-27T16:18:56.000Z
""" Production settings for Estatisticas Facebook project. - Use WhiteNoise for serving static files - Use Amazon's S3 for storing uploaded media - Use mailgun to send emails - Use Redis for cache - Use sentry for error logging """ import logging from .base import * # noqa # SECRET CONFIGURATION # -----------...
34.921659
117
0.624571
import logging from .base import * Y = env('DJANGO_SECRET_KEY') SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') INSTALLED_APPS += ['raven.contrib.django.raven_compat', ] WHITENOISE_MIDDLEWARE = ['whitenoise.middleware.WhiteNoiseMiddleware', ] MIDDLEWARE = WHITENOISE_MIDDLEWARE + MIDDLEWA...
true
true
f703e3a077b4e41b0e27387b9ed3ca54503418ad
18,606
py
Python
pyiron/vasp/potential.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
null
null
null
pyiron/vasp/potential.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
1
2021-11-02T09:22:56.000Z
2021-11-02T09:22:56.000Z
pyiron/vasp/potential.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
1
2021-11-02T08:35:47.000Z
2021-11-02T08:35:47.000Z
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. import os import posixpath import numpy as np import pandas import tables import warnings from pyiron_base import Gener...
37.063745
125
0.581587
import os import posixpath import numpy as np import pandas import tables import warnings from pyiron_base import GenericParameters, Settings from pyiron.atomistics.job.potentials import PotentialAbstract, find_potential_file_base __author__ = "Jan Janssen" __copyright__ = ( "Copyright 2020, Max-Planck-Instit...
true
true
f703e4a7028f63373e16c31d94c3f103f420f77b
18,454
py
Python
kubernetes/client/models/v1beta1_event.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1beta1_event.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1beta1_event.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
1
2019-01-10T11:13:52.000Z
2019-01-10T11:13:52.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
32.149826
339
0.634117
from pprint import pformat from six import iteritems import re class V1beta1Event(object): swagger_types = { 'action': 'str', 'api_version': 'str', 'deprecated_count': 'int', 'deprecated_first_timestamp': 'datetime', 'deprecated_last_timestamp': 'datetime', 'd...
true
true
f703e4dad2354c26235f39a5db5e721bba4fa7e8
788
py
Python
Lab2/task[1-3].py
ValeriyMartsyshyn/HelloPython
badcf85bc54e889eed0286b420e5cabe68da8572
[ "MIT" ]
null
null
null
Lab2/task[1-3].py
ValeriyMartsyshyn/HelloPython
badcf85bc54e889eed0286b420e5cabe68da8572
[ "MIT" ]
null
null
null
Lab2/task[1-3].py
ValeriyMartsyshyn/HelloPython
badcf85bc54e889eed0286b420e5cabe68da8572
[ "MIT" ]
null
null
null
#task 1 nyaam = float (input('enter a length in cm: ')) if nyaam < 0: print ('entry is invalid') else: res = nyaam / 2.54 print (res, 'inch') #task 2 whoosh = int (input ('how many credits have you taken? ')) if whoosh > 0 and whoosh < 24: print ('congrats, you a freshman!') elif whoosh > 23 and wh...
21.888889
58
0.628173
nyaam = float (input('enter a length in cm: ')) if nyaam < 0: print ('entry is invalid') else: res = nyaam / 2.54 print (res, 'inch') whoosh = int (input ('how many credits have you taken? ')) if whoosh > 0 and whoosh < 24: print ('congrats, you a freshman!') elif whoosh > 23 and whoosh < 54: ...
true
true
f703e4f4b3879387dd8d422d53b101ca0ddef7f8
16,603
py
Python
mp/models/continual/model_utils.py
MECLabTUDA/ACS
bb418c5479a3585138c48c63112352f5cc8f64b1
[ "MIT" ]
5
2021-07-20T16:57:14.000Z
2022-03-21T23:52:59.000Z
mp/models/continual/model_utils.py
MECLabTUDA/ACS
bb418c5479a3585138c48c63112352f5cc8f64b1
[ "MIT" ]
null
null
null
mp/models/continual/model_utils.py
MECLabTUDA/ACS
bb418c5479a3585138c48c63112352f5cc8f64b1
[ "MIT" ]
1
2021-07-20T16:57:15.000Z
2021-07-20T16:57:15.000Z
import torch import torch.nn as nn import torch.nn.functional as F from mp.models.segmentation.unet_fepegar import UNet2D ### UNet Wrapper ### class UNet2D_dis(UNet2D): r"""Wrapper for UNet2D to access encoder and decoder seperately. """ def __init__(self, *args, **kwargs): super(UNet2D_dis, self)....
45.487671
172
0.671565
import torch import torch.nn as nn import torch.nn.functional as F from mp.models.segmentation.unet_fepegar import UNet2D (self, *args, **kwargs): super(UNet2D_dis, self).__init__(*args, **kwargs) def forward_enc(self, x): skip_connections, encoding = self.encoder(x) encoding = self.bottom...
true
true
f703e668f221af1cbe47550132535735de0842cf
4,121
py
Python
e2xgrader/server_extensions/assignment_list/handlers.py
divindevaiah/e2xgrader
19eb4662e4eee5ddef673097517e4bd4fb469e62
[ "MIT" ]
2
2021-10-02T10:48:47.000Z
2022-03-02T14:00:48.000Z
e2xgrader/server_extensions/assignment_list/handlers.py
divindevaiah/e2xgrader
19eb4662e4eee5ddef673097517e4bd4fb469e62
[ "MIT" ]
70
2020-10-23T16:42:01.000Z
2022-03-14T16:33:54.000Z
e2xgrader/server_extensions/assignment_list/handlers.py
divindevaiah/e2xgrader
19eb4662e4eee5ddef673097517e4bd4fb469e62
[ "MIT" ]
10
2020-11-22T16:36:16.000Z
2022-03-02T15:51:24.000Z
"""Tornado handlers for nbgrader assignment list web service.""" import os import json import contextlib import traceback from tornado import web from notebook.utils import url_path_join as ujoin from nbgrader.exchange import ExchangeFactory from nbgrader.coursedir import CourseDirectory from nbgrader.auth import A...
34.341667
87
0.61587
import os import json import contextlib import traceback from tornado import web from notebook.utils import url_path_join as ujoin from nbgrader.exchange import ExchangeFactory from nbgrader.coursedir import CourseDirectory from nbgrader.auth import Authenticator from nbgrader.server_extensions.assignment_list.han...
true
true
f703e74b18a0079809bb062fa0b290421b09da2b
1,815
py
Python
os_xenapi/client/exception.py
mail2nsrajesh/os-xenapi
7ac84ec31dd1df6af90b2bf333253848cb4de2c3
[ "Apache-2.0" ]
null
null
null
os_xenapi/client/exception.py
mail2nsrajesh/os-xenapi
7ac84ec31dd1df6af90b2bf333253848cb4de2c3
[ "Apache-2.0" ]
null
null
null
os_xenapi/client/exception.py
mail2nsrajesh/os-xenapi
7ac84ec31dd1df6af90b2bf333253848cb4de2c3
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Citrix Systems # # 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 agr...
32.410714
78
0.680441
from os_xenapi.client.i18n import _ class OsXenApiException(Exception): msg_fmt = _("An unknown exception occurred.") code = 500 def __init__(self, message=None, **kwargs): self.kwargs = kwargs if 'code' not in self.kwargs: try: self.kwargs['code...
true
true
f703e984390443eba9c7a013798f01dd9ac3fa6f
2,924
py
Python
dataset/7scenes-export/7scenes-export-color.py
hashi0203/deep-video-mvs
b3943a9249d522dca3e6cd603e427f611cc7bad5
[ "MIT" ]
null
null
null
dataset/7scenes-export/7scenes-export-color.py
hashi0203/deep-video-mvs
b3943a9249d522dca3e6cd603e427f611cc7bad5
[ "MIT" ]
null
null
null
dataset/7scenes-export/7scenes-export-color.py
hashi0203/deep-video-mvs
b3943a9249d522dca3e6cd603e427f611cc7bad5
[ "MIT" ]
null
null
null
import os import shutil from multiprocessing.pool import Pool import cv2 import numpy as np from functools import partial from path import Path def process_scene(input_directory, output_folder): K = np.array([[525.0, 0.0, 320.0], [0.0, 525.0, 240.0], [0.0, 0.0, 1.0]]) prin...
33.227273
136
0.647059
import os import shutil from multiprocessing.pool import Pool import cv2 import numpy as np from functools import partial from path import Path def process_scene(input_directory, output_folder): K = np.array([[525.0, 0.0, 320.0], [0.0, 525.0, 240.0], [0.0, 0.0, 1.0]]) prin...
true
true
f703e990bc149d473a221b9a2f1254c9d2a428c5
891
py
Python
interactive_map.py
webmsgr/OneLifeMapper
9c94f2820c8605372ff4127f8fb2dfd411db3388
[ "MIT" ]
null
null
null
interactive_map.py
webmsgr/OneLifeMapper
9c94f2820c8605372ff4127f8fb2dfd411db3388
[ "MIT" ]
2
2019-10-18T19:19:04.000Z
2019-10-18T19:59:09.000Z
interactive_map.py
webmsgr/OneLifeMapper
9c94f2820c8605372ff4127f8fb2dfd411db3388
[ "MIT" ]
null
null
null
import pygame import math import glob import os tilesize = 128 # pixels per tile def tiletosurface(tile): pass def maptosurface(sx,sy,ex,ey,oholmap): pass def main(windowsize,tilepipe,OHOLMap): wt = math.floor(windowsize/tilesize) cx,cy,first = 0,0,True if OHOLMap.data != {}: for x in OHOL...
26.205882
62
0.597082
import pygame import math import glob import os tilesize = 128 def tiletosurface(tile): pass def maptosurface(sx,sy,ex,ey,oholmap): pass def main(windowsize,tilepipe,OHOLMap): wt = math.floor(windowsize/tilesize) cx,cy,first = 0,0,True if OHOLMap.data != {}: for x in OHOLMap.data: ...
true
true
f703e9c0d1a0c2a1c793b2889510d7c6d314ac38
58,491
py
Python
newscout_web/api/v1/views.py
Arch-020/newscout_web
76b3885f27a346806baf60f5d9a72931140f9e78
[ "Apache-2.0" ]
3
2019-10-30T07:15:59.000Z
2021-12-26T20:59:05.000Z
newscout_web/api/v1/views.py
Arch-020/newscout_web
76b3885f27a346806baf60f5d9a72931140f9e78
[ "Apache-2.0" ]
322
2019-10-30T07:12:36.000Z
2022-02-10T10:55:32.000Z
newscout_web/api/v1/views.py
Arch-020/newscout_web
76b3885f27a346806baf60f5d9a72931140f9e78
[ "Apache-2.0" ]
7
2019-10-30T13:34:54.000Z
2021-12-27T12:08:07.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.http import Http404 from core.models import (Category, Article, Source, BaseUserProfile, BookmarkArticle, ArticleLike, HashTag, Menu, Notification, Devices, SocialAccount, Category, CategoryAss...
37.736129
121
0.601306
from __future__ import unicode_literals from django.http import Http404 from core.models import (Category, Article, Source, BaseUserProfile, BookmarkArticle, ArticleLike, HashTag, Menu, Notification, Devices, SocialAccount, Category, CategoryAssociation, ...
true
true
f703ed2aa1c7638b37cd9459328cc99a0a5f16f3
34,077
py
Python
main.py
RedaLegzali/mr-driller
c944b10ff17ece1445b55cf3b44a4aca411dcc0d
[ "MIT" ]
null
null
null
main.py
RedaLegzali/mr-driller
c944b10ff17ece1445b55cf3b44a4aca411dcc0d
[ "MIT" ]
null
null
null
main.py
RedaLegzali/mr-driller
c944b10ff17ece1445b55cf3b44a4aca411dcc0d
[ "MIT" ]
null
null
null
import pygame, time from pygame.locals import * from random import * pygame.init() # Variables Pygame white = (255, 255, 255) crystal = (162,162,162) black = (0, 0, 0) rose = (236,28,115) red = pygame.Color('#ff0000') green = pygame.Color('#00ff62') blue = pygame.Color('#0026ff') yellow = (222,207,...
28.186104
158
0.601726
import pygame, time from pygame.locals import * from random import * pygame.init() white = (255, 255, 255) crystal = (162,162,162) black = (0, 0, 0) rose = (236,28,115) red = pygame.Color('#ff0000') green = pygame.Color('#00ff62') blue = pygame.Color('#0026ff') yellow = (222,207,4) width = 800 he...
true
true