hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f74c49dc60c99db3a2cd56ddac964da75b317686
50
py
Python
dygie/predictors/__init__.py
AumPandya95/dygiepp
b2cd7f5d8f2269c16fdeb7562d2d72b2cb4ee218
[ "MIT" ]
410
2019-09-10T01:27:17.000Z
2022-03-28T23:22:43.000Z
dygie/predictors/__init__.py
AumPandya95/dygiepp
b2cd7f5d8f2269c16fdeb7562d2d72b2cb4ee218
[ "MIT" ]
94
2019-09-12T01:46:39.000Z
2022-03-21T19:16:46.000Z
dygie/predictors/__init__.py
AumPandya95/dygiepp
b2cd7f5d8f2269c16fdeb7562d2d72b2cb4ee218
[ "MIT" ]
110
2019-09-17T07:28:34.000Z
2022-03-20T05:33:27.000Z
from dygie.predictors.dygie import DyGIEPredictor
25
49
0.88
from dygie.predictors.dygie import DyGIEPredictor
true
true
f74c4a56c35c38e3290890ac2500e8cc6102cd50
1,783
py
Python
configs/_base_/datasets/potsdam.py
heytanay/mmsegmentation
7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8
[ "Apache-2.0" ]
11
2022-02-04T01:09:45.000Z
2022-03-08T05:49:16.000Z
configs/_base_/datasets/potsdam.py
heytanay/mmsegmentation
7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8
[ "Apache-2.0" ]
1
2021-11-25T01:20:11.000Z
2021-11-25T01:20:29.000Z
configs/_base_/datasets/potsdam.py
heytanay/mmsegmentation
7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8
[ "Apache-2.0" ]
1
2021-12-01T01:31:25.000Z
2021-12-01T01:31:25.000Z
# dataset settings dataset_type = 'PotsdamDataset' data_root = 'data/potsdam' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) crop_size = (512, 512) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', reduce_zero_label=True), dic...
32.418182
77
0.613012
dataset_type = 'PotsdamDataset' data_root = 'data/potsdam' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) crop_size = (512, 512) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', reduce_zero_label=True), dict(type='Resize', im...
true
true
f74c4b4bf0380c7f3e67b94f62ac5880e26088e1
102,865
py
Python
salt/minion.py
wt/salt
91c74d068680eee62e285a4e2b0d7c4d2f99c8e5
[ "Apache-2.0" ]
null
null
null
salt/minion.py
wt/salt
91c74d068680eee62e285a4e2b0d7c4d2f99c8e5
[ "Apache-2.0" ]
null
null
null
salt/minion.py
wt/salt
91c74d068680eee62e285a4e2b0d7c4d2f99c8e5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Routines to set up a minion ''' # Import python libs from __future__ import print_function import copy import errno import fnmatch import hashlib import logging import multiprocessing import os import re import salt import signal import sys import threading import time import traceback impo...
39.112167
127
0.534205
''' Routines to set up a minion ''' from __future__ import print_function import copy import errno import fnmatch import hashlib import logging import multiprocessing import os import re import salt import signal import sys import threading import time import traceback import types from random import randint, shuffle ...
false
true
f74c4c486465c1b521636860c573a5e50bfdd556
16,691
py
Python
circletracking/algebraic.py
caspervdw/circletracking
2d981a1bd3f2982d5d36932d7d5a38e912fcdba3
[ "BSD-3-Clause" ]
4
2016-03-08T14:10:05.000Z
2022-02-03T21:26:51.000Z
circletracking/algebraic.py
caspervdw/circletracking
2d981a1bd3f2982d5d36932d7d5a38e912fcdba3
[ "BSD-3-Clause" ]
2
2016-03-29T12:40:28.000Z
2016-04-01T09:36:58.000Z
circletracking/algebraic.py
caspervdw/circletracking
2d981a1bd3f2982d5d36932d7d5a38e912fcdba3
[ "BSD-3-Clause" ]
2
2016-03-08T14:10:48.000Z
2020-12-23T05:59:26.000Z
""" Functions for algebraic fitting """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np MODE_DICT_ELLIPSE = {'circle': 'xy', 'ellipse_aligned': '0', 'ellipse': ''} MODE_DICT_ELLIPSOID = {'sphere': 'xyz', 'prolate': 'xy', 'oblate...
35.817597
86
0.533581
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np MODE_DICT_ELLIPSE = {'circle': 'xy', 'ellipse_aligned': '0', 'ellipse': ''} MODE_DICT_ELLIPSOID = {'sphere': 'xyz', 'prolate': 'xy', 'oblate': 'xy', 'ellipso...
true
true
f74c4e1f80f825bd92d56c627e268d4c99f0f4fd
2,905
py
Python
get_results.py
lwj5/simple-amt
9af304f2dda3da818158c21554ede4f9fae0a89d
[ "MIT" ]
null
null
null
get_results.py
lwj5/simple-amt
9af304f2dda3da818158c21554ede4f9fae0a89d
[ "MIT" ]
null
null
null
get_results.py
lwj5/simple-amt
9af304f2dda3da818158c21554ede4f9fae0a89d
[ "MIT" ]
null
null
null
import argparse import json import os import re import sys import simpleamt def process_assignments(mtc, hit_id, status): results = [] paginator = mtc.get_paginator("list_assignments_for_hit") try: for a_page in paginator.paginate( HITId=hit_id, PaginationConfig={"PageSize": 100} ...
33.011364
77
0.536317
import argparse import json import os import re import sys import simpleamt def process_assignments(mtc, hit_id, status): results = [] paginator = mtc.get_paginator("list_assignments_for_hit") try: for a_page in paginator.paginate( HITId=hit_id, PaginationConfig={"PageSize": 100} ...
true
true
f74c4e79064234217414697ba87113665a26918e
2,846
py
Python
src/AHP/src/example_3.py
RichardOkubo/PythonScripts
86090465f739a2fc3f1f8ef22977efd241f97361
[ "MIT" ]
null
null
null
src/AHP/src/example_3.py
RichardOkubo/PythonScripts
86090465f739a2fc3f1f8ef22977efd241f97361
[ "MIT" ]
null
null
null
src/AHP/src/example_3.py
RichardOkubo/PythonScripts
86090465f739a2fc3f1f8ef22977efd241f97361
[ "MIT" ]
null
null
null
from itertools import combinations from pprint import pprint # noqa from ahpy import Compare criteria_comparisons = { ('Cost', 'Safety'): 3, ('Cost', 'Style'): 7, ('Cost', 'Capacity'): 3, ('Safety', 'Style'): 9, ('Safety', 'Capacity'): 1, ('Style', 'Capacity'): 1/7 } criteria = Compare('Crit...
37.447368
112
0.673928
from itertools import combinations from pprint import pprint from ahpy import Compare criteria_comparisons = { ('Cost', 'Safety'): 3, ('Cost', 'Style'): 7, ('Cost', 'Capacity'): 3, ('Safety', 'Style'): 9, ('Safety', 'Capacity'): 1, ('Style', 'Capacity'): 1/7 } criteria = Compare('Criteria', ...
true
true
f74c4fae64045620c7d946091086db095763ff8e
3,308
py
Python
datasets/mnist.py
chunchentu/EvadeML-Zoo
dd8e85b9424871496a4dfb62f603f97e733f2433
[ "MIT" ]
164
2017-08-18T16:24:44.000Z
2022-03-18T19:32:17.000Z
datasets/mnist.py
chunchentu/EvadeML-Zoo
dd8e85b9424871496a4dfb62f603f97e733f2433
[ "MIT" ]
14
2018-12-19T20:58:54.000Z
2022-03-13T14:34:41.000Z
datasets/mnist.py
chunchentu/EvadeML-Zoo
dd8e85b9424871496a4dfb62f603f97e733f2433
[ "MIT" ]
74
2017-11-06T15:35:19.000Z
2022-02-09T05:53:09.000Z
from keras.datasets import mnist from keras.utils import np_utils import sys, os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from models.carlini_models import carlini_mnist_model from models.cleverhans_models import cleverhans_mnist_model from models.pgdtrained_models import pgdtraine...
42.961039
117
0.688029
from keras.datasets import mnist from keras.utils import np_utils import sys, os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from models.carlini_models import carlini_mnist_model from models.cleverhans_models import cleverhans_mnist_model from models.pgdtrained_models import pgdtraine...
true
true
f74c4fefac9ba7b97021531b06da4c4b18824dc9
777
py
Python
byemail/storage/__init__.py
jrmi/byemail
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
[ "MIT" ]
10
2018-03-03T16:12:56.000Z
2021-01-18T10:52:45.000Z
byemail/storage/__init__.py
jrmi/byemail
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
[ "MIT" ]
69
2018-03-01T20:08:46.000Z
2019-05-05T18:53:30.000Z
byemail/storage/__init__.py
jrmi/byemail
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
[ "MIT" ]
3
2018-03-12T15:17:26.000Z
2020-04-17T14:19:47.000Z
from importlib import import_module from byemail.conf import settings class DoesntExists(Exception): pass class MultipleResults(Exception): pass class Storage(): def __init__(self, loop=None): self.loop = loop self._storage = None def load_storage(self, loop=None): global st...
22.852941
71
0.656371
from importlib import import_module from byemail.conf import settings class DoesntExists(Exception): pass class MultipleResults(Exception): pass class Storage(): def __init__(self, loop=None): self.loop = loop self._storage = None def load_storage(self, loop=None): global st...
true
true
f74c507307dbf6c175e0651753194a29d1feb1f8
38,578
py
Python
PhenNorm/src/Similar_finding_v2.py
DBMI/iSeeDELVE
72b51b275bd8ae2e1587f4b6709f24307dd6560f
[ "BSD-4-Clause-UC" ]
null
null
null
PhenNorm/src/Similar_finding_v2.py
DBMI/iSeeDELVE
72b51b275bd8ae2e1587f4b6709f24307dd6560f
[ "BSD-4-Clause-UC" ]
null
null
null
PhenNorm/src/Similar_finding_v2.py
DBMI/iSeeDELVE
72b51b275bd8ae2e1587f4b6709f24307dd6560f
[ "BSD-4-Clause-UC" ]
null
null
null
# This script cluster similar variables # Written by Son Doan, January 2014 # Version 2.0 March 2014 # RUN: # Example # python Similar_finding_v2.py -d 1 -o "LabTest" -i ../data/200test/500LabTests_random_KWL.txt2_cat """ RULE SETS: 1. Medical History Type=Medical History AND SOI= {Study Subject, Participant, Patien...
30.233542
357
0.618461
""" RULE SETS: 1. Medical History Type=Medical History AND SOI= {Study Subject, Participant, Patient}={C0030705, C0679646, AND Topic_CUI (Var1) = Topic_CUI (Var2), where topic_CUIs in {dsyn, neop, sosy, acab, anab, biof, cgab, inpo, orgf, patf, phsf, mobd} 2. Demographics Type=Demographics AND SOI= {Study Subjec...
false
true
f74c5152cbb975dde780f592b79085e585faa3ad
1,871
py
Python
comment/views.py
28harishkumar/Social-website-django
0b72ce34241112b87921ef095f6f47d4f958117c
[ "MIT" ]
3
2015-07-15T07:01:29.000Z
2020-03-29T09:12:39.000Z
comment/views.py
28harishkumar/Social-website-django
0b72ce34241112b87921ef095f6f47d4f958117c
[ "MIT" ]
null
null
null
comment/views.py
28harishkumar/Social-website-django
0b72ce34241112b87921ef095f6f47d4f958117c
[ "MIT" ]
null
null
null
from django.shortcuts import render , render_to_response, RequestContext, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse , Http404 from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse fro...
35.301887
91
0.639765
from django.shortcuts import render , render_to_response, RequestContext, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse , Http404 from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse fro...
true
true
f74c519f489d3c7875561b51c472993297f0037f
4,471
py
Python
elementpath/xpath30/xpath30_parser.py
sthagen/sissaschool-elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
1
2021-09-16T14:44:42.000Z
2021-09-16T14:44:42.000Z
elementpath/xpath30/xpath30_parser.py
sthagen/elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
null
null
null
elementpath/xpath30/xpath30_parser.py
sthagen/elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
null
null
null
# # Copyright (c), 2018-2021, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
35.204724
90
0.611273
from copy import deepcopy from typing import Any, Dict, Optional from ..namespaces import XPATH_MATH_FUNCTIONS_NAMESPACE from ..xpath2 import XPath2Parser DecimalFormatsType = Dict[Optional[str], Dict[str, str]] class XPath30Parser(XPath2Parser): version = '3.0' SYMBOLS = XPath2Parser.SYMBOLS | { ...
true
true
f74c5372a951d6328624b116b0d2baefbbf0a3a6
606
py
Python
src/TwitterStreamer.py
Rafii-Ayoub/Twitter-Advertising-Bot
0b9f34f6ceb134f020c45d671f26f193ca4663f2
[ "MIT" ]
null
null
null
src/TwitterStreamer.py
Rafii-Ayoub/Twitter-Advertising-Bot
0b9f34f6ceb134f020c45d671f26f193ca4663f2
[ "MIT" ]
null
null
null
src/TwitterStreamer.py
Rafii-Ayoub/Twitter-Advertising-Bot
0b9f34f6ceb134f020c45d671f26f193ca4663f2
[ "MIT" ]
null
null
null
from TwitterAuthenticater import TwitterAuthenticator from TwitterListener import TwitterListener from tweepy import Stream class TwitterStreamer(): """ Class for streaming and processing live tweets. """ # Constructor def __init__(self): self.twitter_autenticator = TwitterAuthenticato...
30.3
68
0.742574
from TwitterAuthenticater import TwitterAuthenticator from TwitterListener import TwitterListener from tweepy import Stream class TwitterStreamer(): def __init__(self): self.twitter_autenticator = TwitterAuthenticator() def stream_tweets(self, fetched_tweets_filename, hash_tag_list): ...
true
true
f74c54da4cce6b3b7efa8a1039f86dd6fc6458d8
2,034
py
Python
paddlehub/compat/task/checkpoint.py
chunzhang-hub/PaddleHub
c5cfd021f77fd59340fb26e223e09a592e6a345f
[ "Apache-2.0" ]
8,360
2019-01-18T10:46:45.000Z
2022-03-31T14:50:02.000Z
paddlehub/compat/task/checkpoint.py
dwuping/PaddleHub
9a3b23295947e22149cc85c17cb4cf23c03f9e06
[ "Apache-2.0" ]
1,158
2019-04-11T09:22:43.000Z
2022-03-31T12:12:09.000Z
paddlehub/compat/task/checkpoint.py
dwuping/PaddleHub
9a3b23295947e22149cc85c17cb4cf23c03f9e06
[ "Apache-2.0" ]
1,677
2019-04-09T15:07:40.000Z
2022-03-31T06:41:10.000Z
# coding:utf-8 # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
35.684211
113
0.717306
import os from typing import Tuple import paddle from paddlehub.compat.task import checkpoint_pb2 from paddlehub.utils.log import logger CKPT_FILE_NAME = 'ckpt.meta' def load_checkpoint(checkpoint_dir: str, exe: paddle.static.Executor, main_program: paddle.static.Program) -> Tuple[bool, int, i...
true
true
f74c55096ebee2d02a6aa231b036cb368e54bb27
965
py
Python
problems/algoexpert/searching/shifted_binary_search.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
problems/algoexpert/searching/shifted_binary_search.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
problems/algoexpert/searching/shifted_binary_search.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
from typing import List def shifted_binary_search(nums: List[int], target: int) -> int: left_idx = 0 right_idx = len(nums) - 1 while left_idx <= right_idx: mid_idx = left_idx + (right_idx - left_idx) // 2 potential_match = nums[mid_idx] left_bound = nums[left_idx] right_bou...
33.275862
78
0.57513
from typing import List def shifted_binary_search(nums: List[int], target: int) -> int: left_idx = 0 right_idx = len(nums) - 1 while left_idx <= right_idx: mid_idx = left_idx + (right_idx - left_idx) // 2 potential_match = nums[mid_idx] left_bound = nums[left_idx] right_bou...
true
true
f74c5528b1b68ef70cab124bedac889fe044265d
7,676
py
Python
scripts/bert/fp16_utils.py
StrayBird-ATSH/gluon-nlp
5dc6b9c9fab9e99b155554a50466c514b879ea84
[ "Apache-2.0" ]
1
2021-06-17T12:59:25.000Z
2021-06-17T12:59:25.000Z
scripts/bert/fp16_utils.py
StrayBird-ATSH/gluon-nlp
5dc6b9c9fab9e99b155554a50466c514b879ea84
[ "Apache-2.0" ]
3
2020-09-01T05:45:57.000Z
2020-10-22T23:14:20.000Z
scripts/bert/fp16_utils.py
ZiyueHuang/gluon-nlp
0d5c61992180f41eab590e74c7b679980f429292
[ "Apache-2.0" ]
3
2021-07-20T07:40:15.000Z
2021-08-03T08:39:17.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
45.690476
97
0.649297
import warnings import mxnet as mx import gluonnlp as nlp class FP16Trainer: def __init__(self, trainer, dynamic_loss_scale=True, loss_scaler_params=None): if trainer._kvstore_params['update_on_kvstore'] is not False and trainer._kvstore: err = 'Only gluon.Trainer created with update_on_kvstor...
true
true
f74c57555fad80a4e98234546e67d3c9cbcccf10
259,212
py
Python
jax/_src/numpy/lax_numpy.py
fengwang/jax
88f888d498ee5a063c7fbdf96ea593ab8bd01849
[ "Apache-2.0" ]
null
null
null
jax/_src/numpy/lax_numpy.py
fengwang/jax
88f888d498ee5a063c7fbdf96ea593ab8bd01849
[ "Apache-2.0" ]
null
null
null
jax/_src/numpy/lax_numpy.py
fengwang/jax
88f888d498ee5a063c7fbdf96ea593ab8bd01849
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.529312
145
0.672843
import abc import builtins import collections from functools import partial import operator import types from typing import Sequence, FrozenSet, Optional, Tuple, Union, Set, Type, Callable from textwrap import dedent as _dedent import warnings import numpy as np import opt_einsum import jax from jax import jit, cus...
true
true
f74c5857878635706e78808a32e1dc5b8ed7d924
898
py
Python
POOUber/Python/main.py
bl00p1ng/Curso_POO
04545ebf99e64b0533277cf4cfd8d9e449be5fe8
[ "CNRI-Python" ]
7
2021-01-27T18:34:15.000Z
2022-03-21T05:08:57.000Z
POOUber/Python/main.py
bl00p1ng/Curso_POO
04545ebf99e64b0533277cf4cfd8d9e449be5fe8
[ "CNRI-Python" ]
null
null
null
POOUber/Python/main.py
bl00p1ng/Curso_POO
04545ebf99e64b0533277cf4cfd8d9e449be5fe8
[ "CNRI-Python" ]
3
2021-02-27T23:07:09.000Z
2022-01-15T06:55:07.000Z
from uberX import UberX from uberPool import UberPool from uberBlack import UberBlack from uberSUV import UberSUV from account import Account if __name__ == "__main__": # UBER X uberX = UberX("ADF875", Account("Felipe López", "GSG458"), "Chevrolet", "Spark") print(vars(uberX)) print(vars(...
34.538462
122
0.657016
from uberX import UberX from uberPool import UberPool from uberBlack import UberBlack from uberSUV import UberSUV from account import Account if __name__ == "__main__": uberX = UberX("ADF875", Account("Felipe López", "GSG458"), "Chevrolet", "Spark") print(vars(uberX)) print(vars(uberX.driv...
true
true
f74c589616a63a74531e470e69c83592247d55b4
699
py
Python
src/utilities/string_functions.py
seadavis/StoryNode
e863e68e4b95b92a074554c2399492dbfb54cbab
[ "Apache-2.0" ]
null
null
null
src/utilities/string_functions.py
seadavis/StoryNode
e863e68e4b95b92a074554c2399492dbfb54cbab
[ "Apache-2.0" ]
null
null
null
src/utilities/string_functions.py
seadavis/StoryNode
e863e68e4b95b92a074554c2399492dbfb54cbab
[ "Apache-2.0" ]
null
null
null
""" Swaprs token1, for token2 in the sentence token2 should belong in sentence for this to work """ def swap(token1, token2, sentence): index = token2.idx length = len(token2.text) if index == 0: prepend = '' else: prepend = sentence[:(index)] append = sentence[(index + length):] ...
25.888889
67
0.642346
def swap(token1, token2, sentence): index = token2.idx length = len(token2.text) if index == 0: prepend = '' else: prepend = sentence[:(index)] append = sentence[(index + length):] return prepend + token1.text + append def remove(token, sentence): return remove(token.idx, to...
true
true
f74c58d0e111496911acb94dd86676847751749c
8,429
py
Python
detectron2/evaluation/cityscapes_evaluation.py
Zeinab-Haroon/detectron2
6a56c9cadaf392697c4bdef00325e415d07a459f
[ "Apache-2.0" ]
null
null
null
detectron2/evaluation/cityscapes_evaluation.py
Zeinab-Haroon/detectron2
6a56c9cadaf392697c4bdef00325e415d07a459f
[ "Apache-2.0" ]
null
null
null
detectron2/evaluation/cityscapes_evaluation.py
Zeinab-Haroon/detectron2
6a56c9cadaf392697c4bdef00325e415d07a459f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. import glob import logging import numpy as np import os import tempfile from collections import OrderedDict import torch from PIL import Image from detectron2.data import MetadataCatalog from detectron2.utils import comm from detectron2.utils.file_io import PathManage...
41.522167
139
0.632815
import glob import logging import numpy as np import os import tempfile from collections import OrderedDict import torch from PIL import Image from detectron2.data import MetadataCatalog from detectron2.utils import comm from detectron2.utils.file_io import PathManager from .evaluator import DatasetEvaluator class ...
true
true
f74c590e21721ebfcfe0ea736fb9a484513bc883
321
py
Python
Library_Tester/CalculatingModules/mvmd_slli.py
mendlin/SIMD-libgen
0f386bb639c829275a00f46c4b31d59c5ed84a28
[ "AFL-1.1" ]
1
2021-01-07T03:18:27.000Z
2021-01-07T03:18:27.000Z
Library_Tester/CalculatingModules/mvmd_slli.py
Logicalmars/SIMD-libgen
0f386bb639c829275a00f46c4b31d59c5ed84a28
[ "AFL-1.1" ]
null
null
null
Library_Tester/CalculatingModules/mvmd_slli.py
Logicalmars/SIMD-libgen
0f386bb639c829275a00f46c4b31d59c5ed84a28
[ "AFL-1.1" ]
1
2021-11-29T07:28:13.000Z
2021-11-29T07:28:13.000Z
# Copyright (c) 2011, Hua Huang and Robert D. Cameron. # Licensed under the Academic Free License 3.0. def GetResult(fw, sh, data): arg1 = data[0] (i, sz, ans) = (0, len(arg1), "") blockNum = int(sz/fw) while i<blockNum: ans += arg1[(i+sh)*fw:(i+sh+1)*fw] if (i+sh)<blockNum else "0"*fw i += 1 return ans...
21.4
67
0.613707
def GetResult(fw, sh, data): arg1 = data[0] (i, sz, ans) = (0, len(arg1), "") blockNum = int(sz/fw) while i<blockNum: ans += arg1[(i+sh)*fw:(i+sh+1)*fw] if (i+sh)<blockNum else "0"*fw i += 1 return ans
true
true
f74c592104b43da1a836ea1c416cfbffdd907710
28,061
py
Python
pytorchvideo/models/x3d.py
kalyanvasudev/ptv_temp
85c2282bed9aa4eadc3454bd7e8f2a8e8c4b4ec6
[ "Apache-2.0" ]
null
null
null
pytorchvideo/models/x3d.py
kalyanvasudev/ptv_temp
85c2282bed9aa4eadc3454bd7e8f2a8e8c4b4ec6
[ "Apache-2.0" ]
null
null
null
pytorchvideo/models/x3d.py
kalyanvasudev/ptv_temp
85c2282bed9aa4eadc3454bd7e8f2a8e8c4b4ec6
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from typing import Callable, Tuple import numpy as np import torch import torch.nn as nn from fvcore.nn.squeeze_excitation import SqueezeExcitation from pytorchvideo.layers.convolutions import Conv2plus1d from pytorchvideo.layers.swish import Swi...
35.032459
94
0.575247
from typing import Callable, Tuple import numpy as np import torch import torch.nn as nn from fvcore.nn.squeeze_excitation import SqueezeExcitation from pytorchvideo.layers.convolutions import Conv2plus1d from pytorchvideo.layers.swish import Swish from pytorchvideo.layers.utils import round_repeats, round_width, set...
true
true
f74c592be950fa4a547e43ad707d257356841c56
274
py
Python
profile.py
einsfr/pyffwrapper
e1cade44590ed62184dd8f56c75b3c3c7835fd21
[ "MIT" ]
1
2017-05-28T23:22:07.000Z
2017-05-28T23:22:07.000Z
profile.py
einsfr/pyffwrapper
e1cade44590ed62184dd8f56c75b3c3c7835fd21
[ "MIT" ]
null
null
null
profile.py
einsfr/pyffwrapper
e1cade44590ed62184dd8f56c75b3c3c7835fd21
[ "MIT" ]
null
null
null
class FFmpegProfile: def __init__(self, profile_dict: dict): self._profile_dict = profile_dict @property def inputs(self): return self._profile_dict['inputs'] @property def outputs(self): return self._profile_dict['outputs']
18.266667
44
0.656934
class FFmpegProfile: def __init__(self, profile_dict: dict): self._profile_dict = profile_dict @property def inputs(self): return self._profile_dict['inputs'] @property def outputs(self): return self._profile_dict['outputs']
true
true
f74c5995c22bacf8d41508111722330ee8f86aac
2,029
py
Python
examples/run_time_tests/compare.py
pmehta08/MulensModel
261738c445a8d116d09c90e65f6e847cfc8a7ad8
[ "MIT" ]
30
2016-08-30T23:32:43.000Z
2022-03-07T20:06:25.000Z
examples/run_time_tests/compare.py
pmehta08/MulensModel
261738c445a8d116d09c90e65f6e847cfc8a7ad8
[ "MIT" ]
25
2018-08-22T19:14:22.000Z
2022-03-28T17:22:56.000Z
examples/run_time_tests/compare.py
pmehta08/MulensModel
261738c445a8d116d09c90e65f6e847cfc8a7ad8
[ "MIT" ]
11
2016-10-03T16:00:50.000Z
2022-03-23T16:53:54.000Z
import os import sys import numpy as np import matplotlib.pyplot as plt from astropy.coordinates import SkyCoord from astropy import units as u sys.path.append("/usr/custom/pyLIMA-1.0.0") from pyLIMA import event, telescopes, microlmodels import MulensModel as mm # Common settings: t_0 = 2456900. u_0 = 0.1 t_E = 150...
29.838235
79
0.741252
import os import sys import numpy as np import matplotlib.pyplot as plt from astropy.coordinates import SkyCoord from astropy import units as u sys.path.append("/usr/custom/pyLIMA-1.0.0") from pyLIMA import event, telescopes, microlmodels import MulensModel as mm t_0 = 2456900. u_0 = 0.1 t_E = 150. pi_E_N = 1. pi_E_...
true
true
f74c5a97f6f797a89180d33d6ed4898951cc1ef3
13,003
py
Python
ego/optimization/neighborhood_graph_grammar.py
fabriziocosta/EGO
d89e88183cce1ff24dca9333c09fa11597a45c7a
[ "MIT" ]
null
null
null
ego/optimization/neighborhood_graph_grammar.py
fabriziocosta/EGO
d89e88183cce1ff24dca9333c09fa11597a45c7a
[ "MIT" ]
null
null
null
ego/optimization/neighborhood_graph_grammar.py
fabriziocosta/EGO
d89e88183cce1ff24dca9333c09fa11597a45c7a
[ "MIT" ]
1
2022-01-24T09:53:20.000Z
2022-01-24T09:53:20.000Z
#!/usr/bin/env python """Provides scikit interface.""" import numpy as np import networkx as nx import random from ego.decompose import do_decompose from ego.decomposition.positive_and_negative import decompose_positive, decompose_negative from ego.decomposition.union import decompose_all_union from graphlearn.sample ...
38.699405
124
0.640621
import numpy as np import networkx as nx import random from ego.decompose import do_decompose from ego.decomposition.positive_and_negative import decompose_positive, decompose_negative from ego.decomposition.union import decompose_all_union from graphlearn.sample import LocalSubstitutionGraphGrammarSample as lsgg from...
true
true
f74c5b825f4b051b7a22839cf0f5671bc01a1193
647
py
Python
Module 1/Chapter08/db_setup.py
nikitabrazhnik/flask2
fd7a7e26f00402da09ee2159253cc1958df54814
[ "MIT" ]
40
2017-02-11T18:28:53.000Z
2021-10-04T04:52:49.000Z
Module 1/Chapter08/db_setup.py
nikitabrazhnik/flask2
fd7a7e26f00402da09ee2159253cc1958df54814
[ "MIT" ]
1
2018-06-15T13:46:47.000Z
2018-06-15T13:46:47.000Z
Module 1/Chapter08/db_setup.py
nikitabrazhnik/flask2
fd7a7e26f00402da09ee2159253cc1958df54814
[ "MIT" ]
40
2017-04-11T12:01:22.000Z
2021-05-30T18:05:27.000Z
import pymysql import dbconfig connection = pymysql.connect(host='localhost', user=dbconfig.db_user, passwd=dbconfig.db_password) try: with connection.cursor() as cursor: sql = "CREATE DATABASE IF NOT EXISTS crimemap" cursor.execute(sql) ...
25.88
61
0.655332
import pymysql import dbconfig connection = pymysql.connect(host='localhost', user=dbconfig.db_user, passwd=dbconfig.db_password) try: with connection.cursor() as cursor: sql = "CREATE DATABASE IF NOT EXISTS crimemap" cursor.execute(sql) ...
true
true
f74c5bb920a2045707be25fe41f211528b4453e0
871
py
Python
fifo/entries/api_urls.py
luftdanmark/fifo.li
c51fb4732345cd1a4985260617562ea538e8c49e
[ "MIT" ]
1
2016-04-29T23:09:13.000Z
2016-04-29T23:09:13.000Z
fifo/entries/api_urls.py
luftdanmark/fifo.li
c51fb4732345cd1a4985260617562ea538e8c49e
[ "MIT" ]
null
null
null
fifo/entries/api_urls.py
luftdanmark/fifo.li
c51fb4732345cd1a4985260617562ea538e8c49e
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import api_views urlpatterns = [ # {% url "api:entries" %} url( regex=r'entries/$', view=api_views.EntryListView.as_view(), name='entries' ), url( regex=r'entries/create/$', view=api_views.EntryCreateVi...
24.885714
65
0.514351
from django.conf.urls import url from . import api_views urlpatterns = [ url( regex=r'entries/$', view=api_views.EntryListView.as_view(), name='entries' ), url( regex=r'entries/create/$', view=api_views.EntryCreateView.as_view(), ...
true
true
f74c5c6c678bf2127ccb402f2b58fc4a4b9bc30a
1,892
py
Python
src/dev/lupio/LupioIPI.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
765
2015-01-14T16:17:04.000Z
2022-03-28T07:46:28.000Z
src/dev/lupio/LupioIPI.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
30
2015-01-01T21:49:38.000Z
2021-04-20T19:01:54.000Z
src/dev/lupio/LupioIPI.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
807
2015-01-06T09:55:38.000Z
2022-03-30T10:23:36.000Z
# Copyright (c) 2021 The Regents of the University of California # 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 lis...
51.135135
72
0.78277
from m5.objects.Device import BasicPioDevice from m5.params import Param class LupioIPI(BasicPioDevice): type = 'LupioIPI' cxx_class='gem5::LupioIPI' cxx_header = 'dev/lupio/lupio_ipi.hh' pio_size = Param.Addr(0x1000, "PIO Size") int_type = Param.Int("Type of interrupt") num_threads = Param.In...
true
true
f74c5d29c8477ea55166d0b74e05d58bb0e258aa
688
py
Python
nystrompca/__init__.py
fredhallgren/nystrompca
7f8923af08551ad477a446c383822b555326f4bf
[ "Apache-2.0" ]
4
2021-09-14T08:46:10.000Z
2021-10-31T09:44:06.000Z
nystrompca/__init__.py
fredhallgren/nystrompca
7f8923af08551ad477a446c383822b555326f4bf
[ "Apache-2.0" ]
null
null
null
nystrompca/__init__.py
fredhallgren/nystrompca
7f8923af08551ad477a446c383822b555326f4bf
[ "Apache-2.0" ]
null
null
null
""" Implementation of Nyström Kernel PCA and a confidence bound on its accuracy Experiments to evaluate the methods and confidence bound Also implements a few other methods used for comparison """ from .algorithms.kernel_RR import KernelRR from .algorithms.kernel_PCA import KernelPCA from .algorithms.nyst...
34.4
75
0.77907
from .algorithms.kernel_RR import KernelRR from .algorithms.kernel_PCA import KernelPCA from .algorithms.nystrom_KPCA import NystromKPCA from .algorithms.nystrom_KPCR import NystromKPCR from .algorithms.nystrom_KRR import NystromKRR from .algorithms.kernel_PCR import KernelPCR from .algorithms.bou...
true
true
f74c5ea81f6e3d727ca6bafcbcd584e050d3ed2f
1,469
py
Python
src/imagetagger/base/checks.py
EKivutha/imagetagger
91697aa0a5cfc2f1bbe69566b026730881fdc76d
[ "MIT" ]
212
2017-07-06T23:01:44.000Z
2022-03-24T04:44:49.000Z
src/imagetagger/base/checks.py
EKivutha/imagetagger
91697aa0a5cfc2f1bbe69566b026730881fdc76d
[ "MIT" ]
157
2017-07-24T10:03:41.000Z
2022-03-12T01:03:47.000Z
src/imagetagger/base/checks.py
EKivutha/imagetagger
91697aa0a5cfc2f1bbe69566b026730881fdc76d
[ "MIT" ]
54
2017-11-07T00:40:50.000Z
2022-02-26T14:22:13.000Z
from typing import List from os.path import join, dirname from django.core.checks import register, CheckMessage, Error from django.conf import settings from fs.base import FS from . import filesystem def _create_check_file(fs: FS, path: str): fs.makedirs(dirname(path), recreate=True) fs.create(path, wipe=True...
35.829268
114
0.6855
from typing import List from os.path import join, dirname from django.core.checks import register, CheckMessage, Error from django.conf import settings from fs.base import FS from . import filesystem def _create_check_file(fs: FS, path: str): fs.makedirs(dirname(path), recreate=True) fs.create(path, wipe=True...
true
true
f74c5efa9cfe7f6d99e3ba7edf7c6998845ee631
1,568
py
Python
layers/layer_functions.py
OliverT1/gnina_tensorflow
339310c643a85e6df1248d03dbbe4ae78cf59f19
[ "MIT" ]
null
null
null
layers/layer_functions.py
OliverT1/gnina_tensorflow
339310c643a85e6df1248d03dbbe4ae78cf59f19
[ "MIT" ]
null
null
null
layers/layer_functions.py
OliverT1/gnina_tensorflow
339310c643a85e6df1248d03dbbe4ae78cf59f19
[ "MIT" ]
1
2020-11-30T12:08:20.000Z
2020-11-30T12:08:20.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 11 09:12:15 2020 @author: scantleb @brief: Functions for generating keras layers. """ import tensorflow as tf from tensorflow.keras import layers def generate_activation_layers(block_name, activation, append_name_info=True): """Generate activ...
34.844444
78
0.662628
import tensorflow as tf from tensorflow.keras import layers def generate_activation_layers(block_name, activation, append_name_info=True): name_template = '{0}_{{0}}_{1}'.format(block_name, activation) block_name_index = 0 while True: if append_name_info: act_name = name_template.form...
true
true
f74c5f1dd3eb6daa533d64fb8d5770b7190411d2
16,553
py
Python
notebooks/103.0-BDP-cascade-invert.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
notebooks/103.0-BDP-cascade-invert.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
notebooks/103.0-BDP-cascade-invert.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
# %% [markdown] # # import itertools import os import time from itertools import chain import colorcet as cc import matplotlib as mpl import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import seaborn as sns from anytree import LevelOrderGroupIter, Node, RenderTree from joblib ...
28.103565
107
0.657403
import itertools import os import time from itertools import chain import colorcet as cc import matplotlib as mpl import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import seaborn as sns from anytree import LevelOrderGroupIter, Node, RenderTree from joblib import Parallel, del...
true
true
f74c5f8feb6ebc1078aec97247368d8db5f7922f
1,277
py
Python
examples/smiles_vocab_creator.py
PaccMann/paccmann_datasets
0cb0cee349ffab8e227f09f7df0a8bca6a71f22e
[ "MIT" ]
14
2019-11-01T12:45:56.000Z
2022-03-11T15:38:31.000Z
examples/smiles_vocab_creator.py
PaccMann/paccmann_datasets
0cb0cee349ffab8e227f09f7df0a8bca6a71f22e
[ "MIT" ]
74
2019-11-12T19:36:27.000Z
2022-02-28T08:19:37.000Z
examples/smiles_vocab_creator.py
PaccMann/paccmann_datasets
0cb0cee349ffab8e227f09f7df0a8bca6a71f22e
[ "MIT" ]
2
2021-08-14T11:15:07.000Z
2021-08-25T06:42:01.000Z
#!/usr/bin/env python3 """Export vocabulary of SMILESLanguage from .smi files in directory.""" import argparse import os from pytoda.smiles.smiles_language import SMILESLanguage # define the parser arguments parser = argparse.ArgumentParser() parser.add_argument('smi_path', type=str, help='path to a folder with .smi ...
29.697674
82
0.702428
import argparse import os from pytoda.smiles.smiles_language import SMILESLanguage parser = argparse.ArgumentParser() parser.add_argument('smi_path', type=str, help='path to a folder with .smi files') parser.add_argument( 'pretrained_path', type=str, help='path to a folder to store the language as text fi...
true
true
f74c60a4cb1dc9d0ad1234281a16930eb7bcd37b
1,248
py
Python
src/ambianic/webapp/server/config_sources.py
ivelin/ambianic-edge
a0cbb2a2369024735ea896b15b93d3d50d58cac1
[ "Apache-2.0" ]
95
2019-12-12T02:20:40.000Z
2022-03-30T18:23:52.000Z
src/ambianic/webapp/server/config_sources.py
ambianic/ambianic
cad14a3ae8a2149c9e17e1bd41ee7d1b75568271
[ "Apache-2.0" ]
313
2019-11-04T21:31:26.000Z
2022-01-01T11:00:38.000Z
src/ambianic/webapp/server/config_sources.py
ambianic/ambianic
cad14a3ae8a2149c9e17e1bd41ee7d1b75568271
[ "Apache-2.0" ]
49
2020-02-28T22:09:36.000Z
2022-03-23T03:26:33.000Z
import logging from ambianic.configuration import get_root_config from dynaconf.vendor.box.exceptions import BoxKeyError from fastapi import HTTPException, status from pydantic import BaseModel log = logging.getLogger(__name__) # Base class for pipeline input sources such as cameras and microphones class SensorSour...
25.469388
79
0.708333
import logging from ambianic.configuration import get_root_config from dynaconf.vendor.box.exceptions import BoxKeyError from fastapi import HTTPException, status from pydantic import BaseModel log = logging.getLogger(__name__) class SensorSource(BaseModel): id: str uri: str type: str live: bool = T...
true
true
f74c60cf075232f8f597005e20c662bc3f60864e
788
py
Python
src/practices/practice/subarray_sum_k/script.py
rahul38888/coding_practice
8445c379310aa189147c4805c43bed80aa9e9fac
[ "Apache-2.0" ]
1
2021-08-06T11:22:12.000Z
2021-08-06T11:22:12.000Z
src/practices/practice/subarray_sum_k/script.py
rahul38888/coding_practice
8445c379310aa189147c4805c43bed80aa9e9fac
[ "Apache-2.0" ]
null
null
null
src/practices/practice/subarray_sum_k/script.py
rahul38888/coding_practice
8445c379310aa189147c4805c43bed80aa9e9fac
[ "Apache-2.0" ]
null
null
null
#User function Template for python3 # 10 2 -2 -20 10 # -10 class Solution: def findSubArraySum(self, Arr, N, k): sums = [] count = 0 for i in range(N): if i is 0: sums[i]=Arr[i] else: sums[i] = sums[i-1]+Arr[i] if sum[i] =...
21.297297
44
0.469543
class Solution: def findSubArraySum(self, Arr, N, k): sums = [] count = 0 for i in range(N): if i is 0: sums[i]=Arr[i] else: sums[i] = sums[i-1]+Arr[i] if sum[i] == k: count+=1 for i in range(1, n):...
true
true
f74c615471184ac9ab3bf5511e84c837815443df
930
py
Python
odfdo/version.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
18
2018-04-19T08:30:48.000Z
2022-02-14T11:00:27.000Z
odfdo/version.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
15
2018-04-22T00:52:41.000Z
2021-07-05T10:16:38.000Z
odfdo/version.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
6
2018-04-22T00:14:12.000Z
2021-12-06T01:42:07.000Z
# Copyright 2018-2020 Jérôme Dumonteil # Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend. # # 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/LI...
38.75
74
0.755914
__version__ = "3.3.1"
true
true
f74c61dd6a8b3193d295463a256f77406f7d615f
5,631
py
Python
magenta/models/gansynth/lib/data_helpers.py
hologerry/magenta
c08c17a548f97a3f5d294a010c28ea2803718d6f
[ "Apache-2.0" ]
null
null
null
magenta/models/gansynth/lib/data_helpers.py
hologerry/magenta
c08c17a548f97a3f5d294a010c28ea2803718d6f
[ "Apache-2.0" ]
null
null
null
magenta/models/gansynth/lib/data_helpers.py
hologerry/magenta
c08c17a548f97a3f5d294a010c28ea2803718d6f
[ "Apache-2.0" ]
1
2021-09-09T15:30:36.000Z
2021-09-09T15:30:36.000Z
# Copyright 2020 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
32.177143
75
0.703072
from __future__ import absolute_import from __future__ import division from __future__ import print_function from magenta.models.gansynth.lib import datasets from magenta.models.gansynth.lib import train_util from magenta.models.gansynth.lib.specgrams_helper import SpecgramsHelper import tensorflow.compat.v1 as tf ...
true
true
f74c6218e1df672aa077cd2b3fc58a75b1bfe0eb
1,685
py
Python
trace/google/cloud/trace_v2/types.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
1
2018-06-29T17:53:28.000Z
2018-06-29T17:53:28.000Z
trace/google/cloud/trace_v2/types.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
null
null
null
trace/google/cloud/trace_v2/types.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
1
2021-06-30T11:44:03.000Z
2021-06-30T11:44:03.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
28.083333
74
0.75727
from __future__ import absolute_import import sys from google.api import http_pb2 from google.protobuf import any_pb2 from google.protobuf import descriptor_pb2 from google.protobuf import empty_pb2 from google.protobuf import timestamp_pb2 from google.protobuf import wrappers_pb2 from google.rpc import status_pb2 f...
true
true
f74c628ce6159aa2ca961543297beddaa76ac53a
1,192
py
Python
meiduoshop/meiduoshop/apps/contents/models.py
juntao66/meiduoshopping
30f2f3c508ce4e50680f805f1ca8b64162cd926d
[ "MIT" ]
null
null
null
meiduoshop/meiduoshop/apps/contents/models.py
juntao66/meiduoshopping
30f2f3c508ce4e50680f805f1ca8b64162cd926d
[ "MIT" ]
null
null
null
meiduoshop/meiduoshop/apps/contents/models.py
juntao66/meiduoshopping
30f2f3c508ce4e50680f805f1ca8b64162cd926d
[ "MIT" ]
null
null
null
from django.db import models from meiduoshop.utils.models import BaseModel # Create your models here. class ContentCategory(BaseModel): """广告内容类别""" name = models.CharField(max_length=50, verbose_name='名称') key = models.CharField(max_length=50, verbose_name='类别键名') class Meta: db_table = 'tb_...
32.216216
94
0.69547
from django.db import models from meiduoshop.utils.models import BaseModel class ContentCategory(BaseModel): name = models.CharField(max_length=50, verbose_name='名称') key = models.CharField(max_length=50, verbose_name='类别键名') class Meta: db_table = 'tb_content_category' verbose_name = '广告...
true
true
f74c63159cbb5d15225e5f15fe3c27795435ab99
673
py
Python
nmslearn/_nbdev.py
AlanGanem/NMSLearn
a82b133e8d7677d99db739d97b3bbf1873a9110a
[ "Apache-2.0" ]
null
null
null
nmslearn/_nbdev.py
AlanGanem/NMSLearn
a82b133e8d7677d99db739d97b3bbf1873a9110a
[ "Apache-2.0" ]
null
null
null
nmslearn/_nbdev.py
AlanGanem/NMSLearn
a82b133e8d7677d99db739d97b3bbf1873a9110a
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"sparsify": "neighbors.ipynb", "hstack": "neighbors.ipynb", "vstack": "neighbors.ipynb", "stack": "neighbors.ipynb", "NMSLibSklearnWrapper": "neighbors.ipynb", "Fa...
30.590909
62
0.64636
__all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"sparsify": "neighbors.ipynb", "hstack": "neighbors.ipynb", "vstack": "neighbors.ipynb", "stack": "neighbors.ipynb", "NMSLibSklearnWrapper": "neighbors.ipynb", "FastCosineNN": "neighbors.ipynb", ...
true
true
f74c647961a8417eef7db452d911c7e8c8f5c31e
5,979
py
Python
sdk/python/pulumi_azure_native/apimanagement/v20191201preview/get_api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20191201preview/get_api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20191201preview/get_api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
33.402235
146
0.624185
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetApiIssueResult', 'AwaitableGetApiIssueResult', 'get_api_issue', ] @pulumi.output_type class GetApiIssueResult: def __init__(__self__, api_...
true
true
f74c64e5b0ff2c80950da0b48253dd788b1952fe
3,400
py
Python
eyeD3-0.7.8/examples/chapters.py
FosterFromGloster/PeskyDuplicates
293749a05033e10dc182c07eb8c378fc18356991
[ "BSD-3-Clause" ]
null
null
null
eyeD3-0.7.8/examples/chapters.py
FosterFromGloster/PeskyDuplicates
293749a05033e10dc182c07eb8c378fc18356991
[ "BSD-3-Clause" ]
null
null
null
eyeD3-0.7.8/examples/chapters.py
FosterFromGloster/PeskyDuplicates
293749a05033e10dc182c07eb8c378fc18356991
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # Copyright (C) 2012 Travis Shirk <travis@pobox.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
35.789474
80
0.647353
from __future__ import print_function import sys from eyed3.id3.tag import Tag def printChapter(chapter): print("== Chapter '%s'" % chapter.element_id) print("-- Title:", chapter.title) print("-- subtitle:", chapter.subtitle) print("-- url:", chapter.user_url) print("-- Start ti...
true
true
f74c6514329fb821e3cece8da1672a0bac4c28dc
2,334
py
Python
dashboard.py
bcgodev/taiwan-reservoir-data
365c87f6bf845a9afa61f25d14008fdb7d2bf484
[ "MIT" ]
null
null
null
dashboard.py
bcgodev/taiwan-reservoir-data
365c87f6bf845a9afa61f25d14008fdb7d2bf484
[ "MIT" ]
null
null
null
dashboard.py
bcgodev/taiwan-reservoir-data
365c87f6bf845a9afa61f25d14008fdb7d2bf484
[ "MIT" ]
null
null
null
from pytz import timezone from utils import now_with_timezone __additional_tag_for_area_reservoirs__ = { '苗栗': { '10501': '支援新竹', }, '臺中': { '20101': '支援苗栗', '20202': '支援彰雲投', }, '彰雲投': { '30502': '支援嘉義', '30501': '支援嘉義', '30503': '支援高雄', }, ...
29.175
191
0.430163
from pytz import timezone from utils import now_with_timezone __additional_tag_for_area_reservoirs__ = { '苗栗': { '10501': '支援新竹', }, '臺中': { '20101': '支援苗栗', '20202': '支援彰雲投', }, '彰雲投': { '30502': '支援嘉義', '30501': '支援嘉義', '30503': '支援高雄', }, ...
true
true
f74c6567c1f376a109435e3ae75a5d3b757e3398
7,990
py
Python
tests/forms_tests/field_tests/test_urlfield.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
tests/forms_tests/field_tests/test_urlfield.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
tests/forms_tests/field_tests/test_urlfield.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
from django.core.exceptions import ValidationError from django.forms import URLField from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class URLFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_urlfield_1(self): f = URLField() self.assertWidgetRendersTo(f, ...
44.143646
91
0.589987
from django.core.exceptions import ValidationError from django.forms import URLField from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class URLFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_urlfield_1(self): f = URLField() self.assertWidgetRendersTo(f, ...
true
true
f74c65cd12543a8f427e86a0eb32d6b76d0630e7
228
py
Python
src/helper/index.py
devsapp/fc-warm
fcecde18ecfe30db943e52ddcc0494027a821870
[ "MIT" ]
1
2022-03-30T13:44:00.000Z
2022-03-30T13:44:00.000Z
src/helper/index.py
devsapp/fc-warm
fcecde18ecfe30db943e52ddcc0494027a821870
[ "MIT" ]
1
2022-03-30T13:00:39.000Z
2022-03-30T19:50:07.000Z
src/helper/index.py
devsapp/fc-warm
fcecde18ecfe30db943e52ddcc0494027a821870
[ "MIT" ]
null
null
null
# coding=utf-8 import requests import os def handler(event, context): url = os.environ['KEEP_WARM_FC_URL'] method = os.environ['KEEP_WARM_FC_METHOD'] res = requests.request(method, url) print(res.status_code)
19
46
0.710526
import requests import os def handler(event, context): url = os.environ['KEEP_WARM_FC_URL'] method = os.environ['KEEP_WARM_FC_METHOD'] res = requests.request(method, url) print(res.status_code)
true
true
f74c667d019617345e7f185ef96de908c6e9df70
1,037
py
Python
DCHUC/utils/txt_module.py
BMC-SDNU/Cross-Modal-Hashing-Retrieval
0196e313aad0a93ebf93e1150f024d6a07f8363a
[ "Apache-2.0" ]
1
2022-03-08T01:45:17.000Z
2022-03-08T01:45:17.000Z
DCHUC/utils/txt_module.py
YimuWang96/Cross-Modal-Hashing-Retrieval
0196e313aad0a93ebf93e1150f024d6a07f8363a
[ "Apache-2.0" ]
5
2021-11-11T08:13:30.000Z
2022-03-09T16:37:57.000Z
DCHUC/utils/txt_module.py
YimuWang96/Cross-Modal-Hashing-Retrieval
0196e313aad0a93ebf93e1150f024d6a07f8363a
[ "Apache-2.0" ]
2
2021-11-25T01:52:46.000Z
2022-03-21T07:11:14.000Z
import torch from torch import nn from torch.nn import functional as F LAYER1_NODE = 10240 def weights_init(m): if type(m) == nn.Conv2d: nn.init.xavier_uniform(m.weight.data) nn.init.constant(m.bias.data, 0.01) class TxtModule(nn.Module): def __init__(self, y_dim, bit): """ ...
25.292683
85
0.571842
import torch from torch import nn from torch.nn import functional as F LAYER1_NODE = 10240 def weights_init(m): if type(m) == nn.Conv2d: nn.init.xavier_uniform(m.weight.data) nn.init.constant(m.bias.data, 0.01) class TxtModule(nn.Module): def __init__(self, y_dim, bit): super(TxtMod...
true
true
f74c669b4f5494bc421a211cbf661c45bfe0f7a3
318
py
Python
Programa que le 5 numeros.py
Nuel631/Aulas_de_python
777a4107b12472579c1a4916fcec012535b2adde
[ "MIT" ]
1
2017-05-04T05:17:40.000Z
2017-05-04T05:17:40.000Z
Programa que le 5 numeros.py
Nuel631/Aulas_de_python
777a4107b12472579c1a4916fcec012535b2adde
[ "MIT" ]
null
null
null
Programa que le 5 numeros.py
Nuel631/Aulas_de_python
777a4107b12472579c1a4916fcec012535b2adde
[ "MIT" ]
null
null
null
#Faça um programa que leia 5 números e informe a soma e a média dos números. cont = 0 s = 0 m = 0 for i in range(5): n = float(input("Digite nota : ")) s=s+n cont=cont+1 m=(s)/cont print(s) print(m) ''' ''' # 4) i = 0 while i < 50: if (i % 2) == 1: print (i) i=i+1
15.142857
77
0.490566
cont = 0 s = 0 m = 0 for i in range(5): n = float(input("Digite nota : ")) s=s+n cont=cont+1 m=(s)/cont print(s) print(m) i = 0 while i < 50: if (i % 2) == 1: print (i) i=i+1
true
true
f74c66b270d9510b0e0dacbf73dda50be82f5479
5,902
py
Python
packages/regression_model/regression_model/processing/preprocessors.py
onhrs/deploying-machine-learning-models
92cad9d14c602506075c536484f6351d445dd036
[ "BSD-3-Clause" ]
null
null
null
packages/regression_model/regression_model/processing/preprocessors.py
onhrs/deploying-machine-learning-models
92cad9d14c602506075c536484f6351d445dd036
[ "BSD-3-Clause" ]
null
null
null
packages/regression_model/regression_model/processing/preprocessors.py
onhrs/deploying-machine-learning-models
92cad9d14c602506075c536484f6351d445dd036
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin from regression_model.processing.errors import InvalidModelInputError class CategoricalImputer(BaseEstimator, TransformerMixin): """Categorical data missing value imputer.""" def __init__(self, variables=None) ->...
29.51
86
0.589461
import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin from regression_model.processing.errors import InvalidModelInputError class CategoricalImputer(BaseEstimator, TransformerMixin): """Categorical data missing value imputer.""" def __init__(self, variables=None) ->...
false
true
f74c677935a0f2ec2616883da11c14f1bf9aabd0
3,274
py
Python
app.py
Poo-ja942/Auth_api
5420d346f7586ceff1711afc915bd26f0ef6edcf
[ "Apache-2.0" ]
null
null
null
app.py
Poo-ja942/Auth_api
5420d346f7586ceff1711afc915bd26f0ef6edcf
[ "Apache-2.0" ]
null
null
null
app.py
Poo-ja942/Auth_api
5420d346f7586ceff1711afc915bd26f0ef6edcf
[ "Apache-2.0" ]
null
null
null
from flask import Flask, request, jsonify, make_response from flask_sqlalchemy import SQLAlchemy import uuid import jwt import os from flask_marshmallow import Marshmallow from datetime import datetime, timedelta from werkzeug.security import generate_password_hash, check_password_hash from functools import wra...
29.495495
95
0.59102
from flask import Flask, request, jsonify, make_response from flask_sqlalchemy import SQLAlchemy import uuid import jwt import os from flask_marshmallow import Marshmallow from datetime import datetime, timedelta from werkzeug.security import generate_password_hash, check_password_hash from functools import wra...
true
true
f74c678bde6368571cb4edfd0723a3dd5792569c
15,608
py
Python
Extensions/Handler/Command-Handler.py
Drageast/Adenn
f7bc54ec35f02cac562f64a65d8a38c5aca9b2bb
[ "BSD-3-Clause" ]
null
null
null
Extensions/Handler/Command-Handler.py
Drageast/Adenn
f7bc54ec35f02cac562f64a65d8a38c5aca9b2bb
[ "BSD-3-Clause" ]
null
null
null
Extensions/Handler/Command-Handler.py
Drageast/Adenn
f7bc54ec35f02cac562f64a65d8a38c5aca9b2bb
[ "BSD-3-Clause" ]
null
null
null
# Import import traceback from datetime import datetime import aiohttp import discord from discord import Webhook, AsyncWebhookAdapter from discord.ext import commands import psutil # Framework import Framework # Cog Initialising class HANDLER(commands.Cog): def __init__(self, client): self.client = c...
42.761644
165
0.52896
import traceback from datetime import datetime import aiohttp import discord from discord import Webhook, AsyncWebhookAdapter from discord.ext import commands import psutil import Framework class HANDLER(commands.Cog): def __init__(self, client): self.client = client @commands.command() ...
true
true
f74c67bbec45d546222b3887d38d6ed142259891
477
py
Python
.history/chapter01/python_03_list_20201124213319.py
KustomApe/nerdape
aef6fb2d1f8c364b26d91bf8570b4487a24de69a
[ "MIT" ]
null
null
null
.history/chapter01/python_03_list_20201124213319.py
KustomApe/nerdape
aef6fb2d1f8c364b26d91bf8570b4487a24de69a
[ "MIT" ]
null
null
null
.history/chapter01/python_03_list_20201124213319.py
KustomApe/nerdape
aef6fb2d1f8c364b26d91bf8570b4487a24de69a
[ "MIT" ]
null
null
null
"""[リストについて] リストの構文とリストの使い方について 配列とリストは同じ意味 """ # リストの定義 ['apple', 'banana', 'orange'] [1, 2, 3, 4, 5] # リストを変数に代入 fruits = ['apple', 'banana', 'orange'] numbers = [1, 2, 3, 4, 5] # インデックスとを指定して要素を取り出す # 一番最初0はじまり fruits[0] # リストの最後を指定する -1 # 昨日と今日の気温差をリストを使って計算してみる weather = [13, 15, 18, 13, 16] # リストの連結 ['スカイライン...
13.628571
41
0.643606
['apple', 'banana', 'orange'] [1, 2, 3, 4, 5] fruits = ['apple', 'banana', 'orange'] numbers = [1, 2, 3, 4, 5] fruits[0] weather = [13, 15, 18, 13, 16] ['スカイライン', 'シビック'] ['フェラーリ', 'ランボルギーニ']
true
true
f74c680fa60f6b5a9a3e22b46aa34c2ddb0def0f
2,388
py
Python
aux_0.99_10.0.py
csherstan/DeepRL
fbf8da1f158792a0b9d29728c9d407ae40573070
[ "MIT" ]
1
2019-08-20T19:52:50.000Z
2019-08-20T19:52:50.000Z
aux_0.99_10.0.py
csherstan/DeepRL
fbf8da1f158792a0b9d29728c9d407ae40573070
[ "MIT" ]
null
null
null
aux_0.99_10.0.py
csherstan/DeepRL
fbf8da1f158792a0b9d29728c9d407ae40573070
[ "MIT" ]
null
null
null
import argparse import torch from deep_rl import random_seed, set_one_thread, select_device, Config, generate_tag, Task, TDAuxNet, NatureConvBody, \ LinearSchedule, AsyncReplay, ImageNormalizer, SignNormalizer, run_steps, mkdir from deep_rl.agent.TDAux_agent import TDAuxAgent import os def td_aux_many(config: Co...
34.608696
119
0.68928
import argparse import torch from deep_rl import random_seed, set_one_thread, select_device, Config, generate_tag, Task, TDAuxNet, NatureConvBody, \ LinearSchedule, AsyncReplay, ImageNormalizer, SignNormalizer, run_steps, mkdir from deep_rl.agent.TDAux_agent import TDAuxAgent import os def td_aux_many(config: Co...
true
true
f74c6873d7d0d06e3277969d5668a35e10aafcfb
4,545
py
Python
checkers/piece.py
agayev169/checkers
dabeb0bb60f9dcb93fd8f46bdd6ea764fab37ec1
[ "MIT" ]
null
null
null
checkers/piece.py
agayev169/checkers
dabeb0bb60f9dcb93fd8f46bdd6ea764fab37ec1
[ "MIT" ]
null
null
null
checkers/piece.py
agayev169/checkers
dabeb0bb60f9dcb93fd8f46bdd6ea764fab37ec1
[ "MIT" ]
null
null
null
from math import ceil class Piece: def __init__(self): self.player = None self.other_player = None self.king = False self.captured = False self.position = None self.board = None self.capture_move_enemies = {} self.reset_for_new_board() def reset_for_new_board(self): self.possible_capture_moves = ...
36.653226
167
0.776898
from math import ceil class Piece: def __init__(self): self.player = None self.other_player = None self.king = False self.captured = False self.position = None self.board = None self.capture_move_enemies = {} self.reset_for_new_board() def reset_for_new_board(self): self.possible_capture_moves = ...
true
true
f74c689eb925e3ffde659276de6523ef1932f1e6
3,002
py
Python
release/stubs.min/System/Windows/Forms/__init___parts/StatusBarDrawItemEventHandler.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
release/stubs.min/System/Windows/Forms/__init___parts/StatusBarDrawItemEventHandler.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
release/stubs.min/System/Windows/Forms/__init___parts/StatusBarDrawItemEventHandler.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
class StatusBarDrawItemEventHandler(MulticastDelegate,ICloneable,ISerializable): """ Represents the method that will handle the System.Windows.Forms.StatusBar.DrawItem event of a System.Windows.Forms.StatusBar. StatusBarDrawItemEventHandler(object: object,method: IntPtr) """ def Instance(self): """ Th...
44.80597
215
0.741173
class StatusBarDrawItemEventHandler(MulticastDelegate,ICloneable,ISerializable): return StatusBarDrawItemEventHandler() def BeginInvoke(self,sender,sbdevent,callback,object): """ BeginInvoke(self: StatusBarDrawItemEventHandler,sender: object,sbdevent: StatusBarDrawItemEventArgs,callback: AsyncCallback,object: o...
true
true
f74c69b329b1cd09df7ca22bcd3e7482fd8bf44a
16,516
py
Python
nephoria/aws/s3/s3ops.py
Corymbia/nephoria
fe8ad7beba479e7a8de70f09cf1fdb4d640b4987
[ "BSD-2-Clause" ]
5
2016-08-31T06:51:18.000Z
2018-04-25T20:50:25.000Z
nephoria/aws/s3/s3ops.py
Corymbia/nephoria
fe8ad7beba479e7a8de70f09cf1fdb4d640b4987
[ "BSD-2-Clause" ]
49
2016-04-19T07:01:46.000Z
2017-11-17T23:57:18.000Z
nephoria/aws/s3/s3ops.py
Corymbia/nephoria
fe8ad7beba479e7a8de70f09cf1fdb4d640b4987
[ "BSD-2-Clause" ]
14
2016-04-14T17:01:35.000Z
2021-07-13T13:35:38.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2009-2014, Eucalyptus Systems, Inc. # All rights reserved. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions # are met: # # Redistributions of source ...
43.122715
183
0.610196
from boto.s3.bucket import Bucket from boto.s3.prefix import Prefix import os import hashlib from boto.s3.connection import OrdinaryCallingFormat, S3Connection from boto.s3.key import Key from boto.s3.acl import ACL, Grant from boto.exception import S3ResponseError from boto.s3.deletemarker import DeleteMarker import...
false
true
f74c6ad3570022f4d60543e4ba61b62b3a6df6aa
569
py
Python
license/migrations/0003_alter_licensepurchase_no_of_licenses_purchased.py
KieranSweeden/fol.io
a6f231e3f9fb96841387b04d72131470c5fc3239
[ "OLDAP-2.5", "OLDAP-2.4", "OLDAP-2.3" ]
null
null
null
license/migrations/0003_alter_licensepurchase_no_of_licenses_purchased.py
KieranSweeden/fol.io
a6f231e3f9fb96841387b04d72131470c5fc3239
[ "OLDAP-2.5", "OLDAP-2.4", "OLDAP-2.3" ]
null
null
null
license/migrations/0003_alter_licensepurchase_no_of_licenses_purchased.py
KieranSweeden/fol.io
a6f231e3f9fb96841387b04d72131470c5fc3239
[ "OLDAP-2.5", "OLDAP-2.4", "OLDAP-2.3" ]
null
null
null
# Generated by Django 4.0.3 on 2022-04-25 07:38 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('license', '0002_licensepurchase_order_number'), ] operations = [ migrations.AlterField( model_name...
28.45
166
0.690685
import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('license', '0002_licensepurchase_order_number'), ] operations = [ migrations.AlterField( model_name='licensepurchase', name='no_of_lice...
true
true
f74c6c17b45651f122a2f9d5cebcc60ae635249c
29,313
py
Python
mesonbuild/mesonlib.py
nostream/meson
d5a6ab31bfbcec9838805c598be75abb036aff87
[ "Apache-2.0" ]
null
null
null
mesonbuild/mesonlib.py
nostream/meson
d5a6ab31bfbcec9838805c598be75abb036aff87
[ "Apache-2.0" ]
null
null
null
mesonbuild/mesonlib.py
nostream/meson
d5a6ab31bfbcec9838805c598be75abb036aff87
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-2015 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
35.021505
152
0.587964
import sys import stat import time import platform, subprocess, operator, os, shutil, re import collections from glob import glob import threading an_unpicklable_object = threading.Lock() class MesonException(Exception): class EnvironmentException(MesonException): class FileMode: ...
true
true
f74c6cd8ce4248cf1655d71ead090f03fe6d4849
37,065
py
Python
private/templates/SandyRelief/config.py
waidyanatha/deprecated.sambro-eden
62e180703a2f16d5f8fcd532335d8287b76a8175
[ "MIT" ]
1
2016-12-22T09:31:22.000Z
2016-12-22T09:31:22.000Z
private/templates/SandyRelief/config.py
waidyanatha/deprecated.sambro-eden
62e180703a2f16d5f8fcd532335d8287b76a8175
[ "MIT" ]
null
null
null
private/templates/SandyRelief/config.py
waidyanatha/deprecated.sambro-eden
62e180703a2f16d5f8fcd532335d8287b76a8175
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current, TR, TD, DIV from gluon.storage import Storage T = current.T settings = current.deployment_settings """ Templ...
37.782875
151
0.520626
try: from collections import OrderedDict except: from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current, TR, TD, DIV from gluon.storage import Storage T = current.T settings = current.deployment_settings settings.base.prepopulate = ["SandyRelief"] settings.base.sys...
true
true
f74c6d381e23d344fc762cefcfe4551ffa46b882
5,235
py
Python
primitives/tf_encrypted/primitives/paillier/primitives_test.py
wqruan/tf-encrypted
50ee4ae3ba76b7c1f70a90e18f875191adea0a07
[ "Apache-2.0" ]
825
2019-04-18T09:21:32.000Z
2022-03-30T05:55:26.000Z
primitives/tf_encrypted/primitives/paillier/primitives_test.py
wqruan/tf-encrypted
50ee4ae3ba76b7c1f70a90e18f875191adea0a07
[ "Apache-2.0" ]
354
2019-04-18T08:42:40.000Z
2022-03-31T18:06:31.000Z
primitives/tf_encrypted/primitives/paillier/primitives_test.py
wqruan/tf-encrypted
50ee4ae3ba76b7c1f70a90e18f875191adea0a07
[ "Apache-2.0" ]
161
2019-05-02T16:43:31.000Z
2022-03-31T01:35:03.000Z
# pylint: disable=missing-docstring import unittest import numpy as np import tensorflow as tf from absl.testing import parameterized from tf_encrypted.primitives import paillier from tf_encrypted.test import tf_execution_context class EncryptionTest(parameterized.TestCase): @parameterized.parameters( {...
35.612245
79
0.584527
import unittest import numpy as np import tensorflow as tf from absl.testing import parameterized from tf_encrypted.primitives import paillier from tf_encrypted.test import tf_execution_context class EncryptionTest(parameterized.TestCase): @parameterized.parameters( { "run_eagerly": run_eage...
true
true
f74c6e27da1ba356e0af4ba665bf30530115c707
18,283
py
Python
catalyst/pipeline/mixins.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
catalyst/pipeline/mixins.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
catalyst/pipeline/mixins.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
""" Mixins classes for use with Filters and Factors. """ from textwrap import dedent from numpy import ( array, full, recarray, vstack, ) from pandas import NaT as pd_NaT from catalyst.errors import ( WindowLengthNotPositive, UnsupportedDataType, NoFurtherDataError, ) fro...
34.173832
80
0.5597
from textwrap import dedent from numpy import ( array, full, recarray, vstack, ) from pandas import NaT as pd_NaT from catalyst.errors import ( WindowLengthNotPositive, UnsupportedDataType, NoFurtherDataError, ) from catalyst.utils.control_flow import nullctx from catalyst....
true
true
f74c6e8dceb21ba17dff932bcd6f83a9efbe982e
5,970
py
Python
bfg9000/backends/msbuild/solution.py
Mattlk13/bfg9000
2d897db09ea81a0ffef0a52f2e06cb9cb4a70a02
[ "BSD-3-Clause" ]
72
2015-06-23T02:35:13.000Z
2021-12-08T01:47:40.000Z
bfg9000/backends/msbuild/solution.py
jimporter/bfg9000
c206646ecfed0d1a510e993b93e6a15677f45a14
[ "BSD-3-Clause" ]
139
2015-03-01T18:48:17.000Z
2021-06-18T15:45:14.000Z
bfg9000/backends/msbuild/solution.py
Mattlk13/bfg9000
2d897db09ea81a0ffef0a52f2e06cb9cb4a70a02
[ "BSD-3-Clause" ]
19
2015-12-23T21:24:33.000Z
2022-01-06T04:04:41.000Z
import json import uuid from collections import OrderedDict from ... import path from ...iterutils import first __all__ = ['SlnBuilder', 'SlnElement', 'SlnVariable', 'Solution', 'UuidMap'] class SlnElement: def __init__(self, name, arg=None, value=None): if (arg is None) != (value is None): ...
29.554455
79
0.552429
import json import uuid from collections import OrderedDict from ... import path from ...iterutils import first __all__ = ['SlnBuilder', 'SlnElement', 'SlnVariable', 'Solution', 'UuidMap'] class SlnElement: def __init__(self, name, arg=None, value=None): if (arg is None) != (value is None): ...
true
true
f74c6ec6d100e318aebe11e8df86e2cd919e3dd8
109
py
Python
timeseria/models/__init__.py
sarusso/Timeseria
fdf9990ab68e20f75a64f090a2c43979266dcba9
[ "Apache-2.0" ]
8
2021-01-02T17:43:13.000Z
2022-02-22T09:07:22.000Z
timeseria/models/__init__.py
sarusso/Timeseria
fdf9990ab68e20f75a64f090a2c43979266dcba9
[ "Apache-2.0" ]
20
2020-07-15T11:29:41.000Z
2022-03-29T22:51:52.000Z
timeseria/models/__init__.py
sarusso/Timeseria
fdf9990ab68e20f75a64f090a2c43979266dcba9
[ "Apache-2.0" ]
null
null
null
from .base import * from .reconstructors import * from .forecasters import * from .anomaly_detectors import *
27.25
32
0.788991
from .base import * from .reconstructors import * from .forecasters import * from .anomaly_detectors import *
true
true
f74c6ec7a291c13d0569f6b30b726871955cfca9
1,994
py
Python
web_app/routes/company_routes.py
ssbyrne89/DIYInvestmentPrimer
eae81d9e7c67b5d912bc7ed7037432f03ee4792c
[ "MIT" ]
null
null
null
web_app/routes/company_routes.py
ssbyrne89/DIYInvestmentPrimer
eae81d9e7c67b5d912bc7ed7037432f03ee4792c
[ "MIT" ]
null
null
null
web_app/routes/company_routes.py
ssbyrne89/DIYInvestmentPrimer
eae81d9e7c67b5d912bc7ed7037432f03ee4792c
[ "MIT" ]
null
null
null
# web_app/routes/company_routes.py import pandas as pd from flask import Blueprint, jsonify, request, render_template #, flash, redirect from web_app.models import * company_routes = Blueprint("company_routes", __name__) @company_routes.route("/div_yield") def seeDivYield(): return render_template("highest_DivYi...
35.607143
95
0.65998
import pandas as pd from flask import Blueprint, jsonify, request, render_template from web_app.models import * company_routes = Blueprint("company_routes", __name__) @company_routes.route("/div_yield") def seeDivYield(): return render_template("highest_DivYield_charts.html") @company_routes.route("/highest_inc...
true
true
f74c7161dc95bdaf4c7f06fac8e27235e29f57d0
2,260
py
Python
Image/GDALCovertImagery/ConvertImageryTIFFfloat.py
petebunting/rsgis_scripts
b35b0403cdfad6c63824d4f8c038f190cdb5978d
[ "MIT" ]
4
2020-09-16T10:45:15.000Z
2021-05-06T04:34:32.000Z
Image/GDALCovertImagery/ConvertImageryTIFFfloat.py
petebunting/rsgis_scripts
b35b0403cdfad6c63824d4f8c038f190cdb5978d
[ "MIT" ]
null
null
null
Image/GDALCovertImagery/ConvertImageryTIFFfloat.py
petebunting/rsgis_scripts
b35b0403cdfad6c63824d4f8c038f190cdb5978d
[ "MIT" ]
2
2020-07-06T18:03:40.000Z
2022-02-15T12:45:34.000Z
#! /usr/bin/env python ####################################### # ConvertImagery.py # A python script to convert remote # imagery to GeoTIFF unsigned 16 bit. # Author: Pete Bunting # Email: pete.bunting@aber.ac.uk # Date: 12/12/2007 # Version: 1.0 ####################################### import os import sys class Con...
27.560976
142
0.64469
import os import sys class ConvertImagery (object): def removeExtension(self, name, ext): outName = name count = name.find(ext.lower(), 0, len(name.lower())) if not count == -1: outName = name.replace(ext.lower(), '', name.count(ext.lower())) return outName def removeFilePathUNIX(self, name): name...
false
true
f74c72c4b5a67cd58e4ce860a5f4310b2643c726
679
py
Python
app/models.py
Kipkorir2017/News-Site
425e148d8202e7ca981768dc78961e91fd56acb5
[ "MIT" ]
null
null
null
app/models.py
Kipkorir2017/News-Site
425e148d8202e7ca981768dc78961e91fd56acb5
[ "MIT" ]
null
null
null
app/models.py
Kipkorir2017/News-Site
425e148d8202e7ca981768dc78961e91fd56acb5
[ "MIT" ]
null
null
null
class Sources: ''' sources class to define news sources objects ''' def __init__(self,id,name,description,url,category,country): self.id = id self.name = name self.description=description self.url=url self.category=category self.country=country cla...
22.633333
78
0.633284
class Sources: def __init__(self,id,name,description,url,category,country): self.id = id self.name = name self.description=description self.url=url self.category=category self.country=country class Articles: def __init__(self,id,author,title,description,url,urlT...
true
true
f74c72d9b578ed7d8a63cf9011f4c4b9ebbba9a4
955
py
Python
e_website/flask_site/__init__.py
EthanH43/text_generator
363361b3320ec731401518d0bb428d00a9194d2b
[ "MIT" ]
null
null
null
e_website/flask_site/__init__.py
EthanH43/text_generator
363361b3320ec731401518d0bb428d00a9194d2b
[ "MIT" ]
null
null
null
e_website/flask_site/__init__.py
EthanH43/text_generator
363361b3320ec731401518d0bb428d00a9194d2b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from flask import Flask, render_template import flask_site.model as model def create_app(test_config=None): """Create and configure the app. Parameters ---------- test_config - Defaults to None, but can be used to set up config for testing. Returns ------- Returns the app. ""...
18.365385
61
0.684817
from flask import Flask, render_template import flask_site.model as model def create_app(test_config=None): app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='dev' ) if test_config is None: app.config.from_pyfile('config.py', silent=True) else: app.config.from...
true
true
f74c73866a0e27c090988b9059c67ead782e6f4f
244
py
Python
OS_Script/core.py
yunleopard/data_py
c98fc075569732bac67a8f60719a39b1e1cc6eeb
[ "Apache-2.0" ]
null
null
null
OS_Script/core.py
yunleopard/data_py
c98fc075569732bac67a8f60719a39b1e1cc6eeb
[ "Apache-2.0" ]
null
null
null
OS_Script/core.py
yunleopard/data_py
c98fc075569732bac67a8f60719a39b1e1cc6eeb
[ "Apache-2.0" ]
null
null
null
''' Created on Nov 12, 2018 @author: yangzh ''' from . import helpers def say_hi(): """Get a thought.""" return 'Hi, my friend ...' def saySomething(): """Contemplation...""" if helpers.get_answer(): print(say_hi())
15.25
31
0.577869
from . import helpers def say_hi(): return 'Hi, my friend ...' def saySomething(): if helpers.get_answer(): print(say_hi())
true
true
f74c74a9352658dfc1a5f87355bb43409e55bd8d
15,451
py
Python
trove/common/strategies/cluster/experimental/cassandra/taskmanager.py
a4913994/openstack_trove
3b550048dd1e5841ad0f3295679e0f0b913a5687
[ "Apache-2.0" ]
244
2015-01-01T12:04:44.000Z
2022-03-25T23:38:39.000Z
trove/common/strategies/cluster/experimental/cassandra/taskmanager.py
ttcong/trove
1db2dc63fdd5409eafccebe79ff2900d0535ed13
[ "Apache-2.0" ]
6
2015-08-18T08:19:10.000Z
2022-03-05T02:32:36.000Z
trove/common/strategies/cluster/experimental/cassandra/taskmanager.py
ttcong/trove
1db2dc63fdd5409eafccebe79ff2900d0535ed13
[ "Apache-2.0" ]
178
2015-01-02T15:16:58.000Z
2022-03-23T03:30:20.000Z
# Copyright 2015 Tesora 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 a...
41.534946
79
0.589541
from eventlet.timeout import Timeout from oslo_log import log as logging from trove.common import cfg from trove.common.strategies.cluster import base from trove.common import utils from trove.instance.models import DBInstance from trove.instance.models import Instance from trove.instance import tasks as inst_tasks f...
true
true
f74c764fe71bef2147f00a9ea1ac6568815a83e4
484
py
Python
pavo_cristatus/tests/doubles/module_fakes/non_annotated/module_fake_class_with_nested_annotated_callables.py
MATTHEWFRAZER/pavo_cristatus
a4b96c0eb6c454fbe38d2092e29f63457a4ee955
[ "MIT" ]
null
null
null
pavo_cristatus/tests/doubles/module_fakes/non_annotated/module_fake_class_with_nested_annotated_callables.py
MATTHEWFRAZER/pavo_cristatus
a4b96c0eb6c454fbe38d2092e29f63457a4ee955
[ "MIT" ]
null
null
null
pavo_cristatus/tests/doubles/module_fakes/non_annotated/module_fake_class_with_nested_annotated_callables.py
MATTHEWFRAZER/pavo_cristatus
a4b96c0eb6c454fbe38d2092e29f63457a4ee955
[ "MIT" ]
null
null
null
from pavo_cristatus.tests.doubles.module_fakes.module_fake_class import ModuleFakeClass from trochilidae.interoperable_with_metaclass import interoperable_with_metaclass_future __all__ = ["ModuleFakeClassWithNestedAnnotatedCallables"] class ModuleFakeClassWithNestedAnnotatedCallables(interoperable_with_metaclass_fut...
40.333333
104
0.82438
from pavo_cristatus.tests.doubles.module_fakes.module_fake_class import ModuleFakeClass from trochilidae.interoperable_with_metaclass import interoperable_with_metaclass_future __all__ = ["ModuleFakeClassWithNestedAnnotatedCallables"] class ModuleFakeClassWithNestedAnnotatedCallables(interoperable_with_metaclass_fut...
true
true
f74c76ea5922547b91469675ced5f92f452e80b7
2,348
py
Python
tests/wrappers/time_limit_wrappers_test.py
sahirgomez1/CompilerGym
9987fbdfcf8ac9af076baf0ffd695e48f0e804cf
[ "MIT" ]
null
null
null
tests/wrappers/time_limit_wrappers_test.py
sahirgomez1/CompilerGym
9987fbdfcf8ac9af076baf0ffd695e48f0e804cf
[ "MIT" ]
1
2022-03-01T15:16:24.000Z
2022-03-01T15:16:24.000Z
tests/wrappers/time_limit_wrappers_test.py
sahirgomez1/CompilerGym
9987fbdfcf8ac9af076baf0ffd695e48f0e804cf
[ "MIT" ]
2
2022-02-01T08:42:57.000Z
2022-03-01T19:11:13.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Unit tests for //compiler_gym/wrappers.""" from compiler_gym.envs.llvm import LlvmEnv from compiler_gym.wrappers import TimeLimit from tests...
27.302326
69
0.6546
from compiler_gym.envs.llvm import LlvmEnv from compiler_gym.wrappers import TimeLimit from tests.test_main import main pytest_plugins = ["tests.pytest_plugins.llvm"] def test_wrapped_close(env: LlvmEnv): env = TimeLimit(env, max_episode_steps=5) env.close() assert env.service is None def test_wrapped_...
true
true
f74c788e4c38ce6fc49c293faa48a3d2846ce2dd
1,037
py
Python
setup.py
bexl/bexl-py
8142163d10e07bac65ff8efdf5391108626115b8
[ "MIT" ]
1
2020-11-27T05:24:06.000Z
2020-11-27T05:24:06.000Z
setup.py
bexl/bexl-py
8142163d10e07bac65ff8efdf5391108626115b8
[ "MIT" ]
null
null
null
setup.py
bexl/bexl-py
8142163d10e07bac65ff8efdf5391108626115b8
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='bexl', version='0.1.0', description='A parser and interpreter for the Basic EXpression Language' ' (BEXL)', long_description=open('README.rst', 'r').read(), keywords='bexl basic expression language', author='Jason Simeone', autho...
27.289474
76
0.590164
from setuptools import setup, find_packages setup( name='bexl', version='0.1.0', description='A parser and interpreter for the Basic EXpression Language' ' (BEXL)', long_description=open('README.rst', 'r').read(), keywords='bexl basic expression language', author='Jason Simeone', autho...
true
true
f74c79486fecfba7970cce97d96a8b5d5046097b
1,203
py
Python
samples/client_publish_ws.py
petnet-independence-project/hbmq
72947007235040720cc2d1ecf51fa61ffa63c347
[ "MIT" ]
null
null
null
samples/client_publish_ws.py
petnet-independence-project/hbmq
72947007235040720cc2d1ecf51fa61ffa63c347
[ "MIT" ]
2
2020-12-31T06:37:20.000Z
2021-01-07T21:36:02.000Z
samples/client_publish_ws.py
petnet-independence-project/hbmqtt
72947007235040720cc2d1ecf51fa61ffa63c347
[ "MIT" ]
null
null
null
import logging import asyncio from hbmqtt.client import MQTTClient from hbmqtt.mqtt.constants import QOS_1, QOS_2 # # This sample shows how to publish messages to broker using different QOS # Debug outputs shows the message flows # logger = logging.getLogger(__name__) config = { "will": { "topic": "/wi...
27.340909
87
0.664173
import logging import asyncio from hbmqtt.client import MQTTClient from hbmqtt.mqtt.constants import QOS_1, QOS_2 logger = logging.getLogger(__name__) config = { "will": { "topic": "/will/client", "message": b"Dead or alive", "qos": 0x01, "retain": True, }, "capath": "."...
true
true
f74c7a61f7ad601fec8529d67523c2fec79853dc
5,069
py
Python
src/save_to_google_team_drive.py
ndlib/marble-web-kiosk-export
03d44c64681c96e4166bae037e1cc894f78e0fa8
[ "Apache-2.0" ]
null
null
null
src/save_to_google_team_drive.py
ndlib/marble-web-kiosk-export
03d44c64681c96e4166bae037e1cc894f78e0fa8
[ "Apache-2.0" ]
null
null
null
src/save_to_google_team_drive.py
ndlib/marble-web-kiosk-export
03d44c64681c96e4166bae037e1cc894f78e0fa8
[ "Apache-2.0" ]
null
null
null
# save_to_google_team_drive.py """ Saves a file to a Google Team Drive, in a given parent folder """ import os import sys where_i_am = os.path.dirname(os.path.realpath(__file__)) sys.path.append(where_i_am) sys.path.append(where_i_am + "/dependencies") from google.oauth2 import service_account # noqa: E402 from googl...
47.373832
118
0.674492
import os import sys where_i_am = os.path.dirname(os.path.realpath(__file__)) sys.path.append(where_i_am) sys.path.append(where_i_am + "/dependencies") from google.oauth2 import service_account from googleapiclient.discovery import build from googleapiclient.http import MediaFileUpload def _get_credentials_from_s...
true
true
f74c7abdf217a720a0f8db63087ef899e54b1cae
1,514
py
Python
setup.py
ethru/bookmejster
b0708c8cd50450a978270c24eee2d4f980cefea6
[ "MIT" ]
1
2021-09-22T22:58:33.000Z
2021-09-22T22:58:33.000Z
setup.py
ethru/bookmejster
b0708c8cd50450a978270c24eee2d4f980cefea6
[ "MIT" ]
4
2021-06-08T21:05:07.000Z
2022-03-12T00:19:25.000Z
setup.py
ethru/bookmejster
b0708c8cd50450a978270c24eee2d4f980cefea6
[ "MIT" ]
null
null
null
from setuptools import setup from sys import platform from bookmeister import __version__ with open('README.md') as readme: long_description = readme.read() with open('requirements.txt') as required: requirements = required.read() data_files = [] if platform == 'linux': data_files.append(('share/applica...
32.212766
91
0.628798
from setuptools import setup from sys import platform from bookmeister import __version__ with open('README.md') as readme: long_description = readme.read() with open('requirements.txt') as required: requirements = required.read() data_files = [] if platform == 'linux': data_files.append(('share/applica...
true
true
f74c7b6c9bba897ed1a00c9b5890f88117a0780e
1,802
py
Python
python/getting-started/list.py
mprzybylak/python2-minefield
6dd1a3b70db6f7d1fbe7a7838337839ec1573ac6
[ "MIT" ]
null
null
null
python/getting-started/list.py
mprzybylak/python2-minefield
6dd1a3b70db6f7d1fbe7a7838337839ec1573ac6
[ "MIT" ]
null
null
null
python/getting-started/list.py
mprzybylak/python2-minefield
6dd1a3b70db6f7d1fbe7a7838337839ec1573ac6
[ "MIT" ]
null
null
null
# create list a = ['a', 'b', 10, 1000] # Sublists, Indexes of List # Slice range notation generates shallow copy of list simple_list = ['first', 'second', "third"] print 'simple list: ' + str(simple_list) # list index print 'simple index: ' + simple_list[0] # negative index print 'negative index: ' + simple_list[-...
22.525
81
0.701443
a = ['a', 'b', 10, 1000] simple_list = ['first', 'second', "third"] print 'simple list: ' + str(simple_list) print 'simple index: ' + simple_list[0] print 'negative index: ' + simple_list[-1] print 'range 0:1 : ' + str(simple_list[0:1]) print 'range -2:-1 : ' + str(simple_list[-2: -1]) print 'range :1 : ' + str...
false
true
f74c7bd9a54cc09d37f3f673d3fd2d7cff7a604c
3,096
py
Python
openapi_genclient/models/portfolio.py
nicholasid7/tnk_open_api
25829e974ef45a925568278c02df701979526a28
[ "Unlicense" ]
null
null
null
openapi_genclient/models/portfolio.py
nicholasid7/tnk_open_api
25829e974ef45a925568278c02df701979526a28
[ "Unlicense" ]
null
null
null
openapi_genclient/models/portfolio.py
nicholasid7/tnk_open_api
25829e974ef45a925568278c02df701979526a28
[ "Unlicense" ]
null
null
null
# coding: utf-8 """ OpenAPI tinkoff.ru/invest OpenAPI. # noqa: E501 The version of the OpenAPI document: 1.0.0 Contact: n.v.melnikov@tinkoff.ru Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class Portfolio(object): """NOTE: This class ...
26.921739
95
0.562984
import pprint import re import six class Portfolio(object): openapi_types = { 'positions': 'list[PortfolioPosition]' } attribute_map = { 'positions': 'positions' } def __init__(self, positions=None): self._positions = None self.discriminator = None ...
true
true
f74c7c3f1a9bcdbb3a8fd3cffb9abcdfe5d3239f
62
py
Python
source/__init__.py
vilaras/PyINSECT
4cc20659c47bd5f9c394d175cb041b729f6eb132
[ "Apache-2.0" ]
2
2020-12-20T01:05:23.000Z
2021-09-17T08:53:30.000Z
source/__init__.py
vilaras/PyINSECT
4cc20659c47bd5f9c394d175cb041b729f6eb132
[ "Apache-2.0" ]
2
2021-05-27T19:47:25.000Z
2021-05-28T17:11:23.000Z
source/__init__.py
vilaras/PyINSECT
4cc20659c47bd5f9c394d175cb041b729f6eb132
[ "Apache-2.0" ]
1
2021-04-21T17:21:39.000Z
2021-04-21T17:21:39.000Z
from documentModel import * from NGramGraphCollector import *
20.666667
33
0.83871
from documentModel import * from NGramGraphCollector import *
true
true
f74c7c7b4af66d691d7df06caf520cb49144a00f
5,743
py
Python
qolo/viz_traj.py
epfl-lasa/crowdbot-evaluation-tools
0e98c76428f6af5a4caa6b83b91ac05b3ed300ce
[ "MIT" ]
4
2022-01-26T13:10:23.000Z
2022-03-02T19:42:11.000Z
qolo/viz_traj.py
epfl-lasa/crowdbot-evaluation-tools
0e98c76428f6af5a4caa6b83b91ac05b3ed300ce
[ "MIT" ]
null
null
null
qolo/viz_traj.py
epfl-lasa/crowdbot-evaluation-tools
0e98c76428f6af5a4caa6b83b91ac05b3ed300ce
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*-coding:utf-8 -*- # ============================================================================= """ @Author : Yujie He @File : viz_traj.py @Date created : 2022/02/25 @Maintainer : Yujie He @Email : yujie.he@epfl.ch """ # ================================...
31.554945
96
0.590284
import os import sys import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt from qolo.core.crowdbot_data import CrowdBotDatabase from qolo.utils.geo_util import quat2yaw from qolo.utils.file_io_util import ( load_json2dict, load_pkl2dict, ) from qolo.utils.res_plot_util import...
true
true
f74c7c9970f5554131bc47cbfde728f714e7fa1a
5,693
py
Python
code/main_GUI.py
EvelynVoce/Film-suggestion-algorithm
d3ba498e68cbea26eb7c19d7eee77edb16feda34
[ "MIT" ]
null
null
null
code/main_GUI.py
EvelynVoce/Film-suggestion-algorithm
d3ba498e68cbea26eb7c19d7eee77edb16feda34
[ "MIT" ]
null
null
null
code/main_GUI.py
EvelynVoce/Film-suggestion-algorithm
d3ba498e68cbea26eb7c19d7eee77edb16feda34
[ "MIT" ]
null
null
null
import tkinter as tk from tkinter import messagebox import utility from table_management import create_table, insert_media_table from suggestion_algorithm import main_algorithm, suggestion_algorithm_single_use, selecting_media, list_of_media_classes from account_handling import updating_account_data from filters import...
41.253623
120
0.694713
import tkinter as tk from tkinter import messagebox import utility from table_management import create_table, insert_media_table from suggestion_algorithm import main_algorithm, suggestion_algorithm_single_use, selecting_media, list_of_media_classes from account_handling import updating_account_data from filters import...
true
true
f74c7cf6114de82e3a9531291339e36a03cff92b
1,637
py
Python
lifegame_lj.py
muzudho/collatz
da99c1cf4cc65c42eeb3ea07134c0e25fc35e606
[ "MIT" ]
null
null
null
lifegame_lj.py
muzudho/collatz
da99c1cf4cc65c42eeb3ea07134c0e25fc35e606
[ "MIT" ]
null
null
null
lifegame_lj.py
muzudho/collatz
da99c1cf4cc65c42eeb3ea07134c0e25fc35e606
[ "MIT" ]
null
null
null
""" 左寄せ表記(Left justified) """ import os import numpy as np # 環境変数 RADIX = int(os.getenv("RADIX", 2)) # 桁揃えに利用。10進数27 を指定したときの見やすさをデフォルトにするぜ(^~^) count_width = 3 count_str = "" dec_width = 4 dec_str = "" radix_str = "" # 表示した数の個数 count = 0 def update_print_number(dec): """表示するテキストの更新""" global count_width ...
17.602151
51
0.62248
import os import numpy as np RADIX = int(os.getenv("RADIX", 2)) count_width = 3 count_str = "" dec_width = 4 dec_str = "" radix_str = "" count = 0 def update_print_number(dec): global count_width global count_str global dec_width global dec_str global radix_str global count global RADIX ...
true
true
f74c7d8f625bddd31c8445696ac6328e23d47184
3,490
py
Python
conans/test/integration/build_requires_test.py
nesono/conan
1fd70a2e43ef3cc6eacf9b9f8b802d90bcd92d52
[ "MIT" ]
null
null
null
conans/test/integration/build_requires_test.py
nesono/conan
1fd70a2e43ef3cc6eacf9b9f8b802d90bcd92d52
[ "MIT" ]
null
null
null
conans/test/integration/build_requires_test.py
nesono/conan
1fd70a2e43ef3cc6eacf9b9f8b802d90bcd92d52
[ "MIT" ]
null
null
null
import unittest from nose_parameterized.parameterized import parameterized from conans.test.utils.tools import TestClient from conans.paths import CONANFILE tool_conanfile = """ import os from conans import ConanFile class Tool(ConanFile): name = "Tool" version = "0.1" def package_info(self): s...
35.979381
93
0.678797
import unittest from nose_parameterized.parameterized import parameterized from conans.test.utils.tools import TestClient from conans.paths import CONANFILE tool_conanfile = """ import os from conans import ConanFile class Tool(ConanFile): name = "Tool" version = "0.1" def package_info(self): s...
true
true
f74c7da14d5d5d8737fb278ca6bf9d0741d533e0
4,235
py
Python
mcarch/views/mods.py
Scotsguy/MCArchive
89847bab722c6782fa53c7b11ee83f1f5b2d9f05
[ "MIT" ]
null
null
null
mcarch/views/mods.py
Scotsguy/MCArchive
89847bab722c6782fa53c7b11ee83f1f5b2d9f05
[ "MIT" ]
null
null
null
mcarch/views/mods.py
Scotsguy/MCArchive
89847bab722c6782fa53c7b11ee83f1f5b2d9f05
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template, jsonify, request, url_for, redirect, flash, \ abort, current_app as app from mcarch.model.mod import Mod, ModAuthor, ModVersion, GameVersion from mcarch.model.mod.draft import DraftMod from mcarch.model.mod.logs import LogMod, gen_diffs from mcarch.model.user impor...
36.508621
98
0.691854
from flask import Blueprint, render_template, jsonify, request, url_for, redirect, flash, \ abort, current_app as app from mcarch.model.mod import Mod, ModAuthor, ModVersion, GameVersion from mcarch.model.mod.draft import DraftMod from mcarch.model.mod.logs import LogMod, gen_diffs from mcarch.model.user impor...
true
true
f74c7e98bf6ea8f6f18f29b6a69bd1c363d45f96
7,054
py
Python
protorpc/wsgi/service_test.py
Zoramite/protorpc
965c9e6711bfa1d27af09fddb196a55ff2d42bf6
[ "Apache-2.0" ]
null
null
null
protorpc/wsgi/service_test.py
Zoramite/protorpc
965c9e6711bfa1d27af09fddb196a55ff2d42bf6
[ "Apache-2.0" ]
null
null
null
protorpc/wsgi/service_test.py
Zoramite/protorpc
965c9e6711bfa1d27af09fddb196a55ff2d42bf6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2011 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 o...
34.242718
77
0.714772
__author__ = 'rafek@google.com (Rafe Kaplan)' import unittest from protorpc import end2end_test from protorpc import protojson from protorpc import remote from protorpc import registry from protorpc import transport from protorpc import test_util from protorpc import webapp_test_util from protorpc.wsgi import ser...
true
true
f74c7ed085da8637189b861e76caf9835907a0e5
281
py
Python
tests/base_tests/expression_tests/test_pickle.py
lycantropos/symba
279bf86311d50fde55d17c843391f9f83ea31ddf
[ "MIT" ]
2
2021-03-15T12:23:15.000Z
2022-03-26T21:20:54.000Z
tests/base_tests/expression_tests/test_pickle.py
lycantropos/symba
279bf86311d50fde55d17c843391f9f83ea31ddf
[ "MIT" ]
null
null
null
tests/base_tests/expression_tests/test_pickle.py
lycantropos/symba
279bf86311d50fde55d17c843391f9f83ea31ddf
[ "MIT" ]
null
null
null
from hypothesis import given from symba.base import Expression from tests.utils import pickle_round_trip from . import strategies @given(strategies.definite_expressions) def test_round_trip(expression: Expression) -> None: assert pickle_round_trip(expression) == expression
25.545455
54
0.822064
from hypothesis import given from symba.base import Expression from tests.utils import pickle_round_trip from . import strategies @given(strategies.definite_expressions) def test_round_trip(expression: Expression) -> None: assert pickle_round_trip(expression) == expression
true
true
f74c7eee2dda25266ad68c6597ee9077cbc931a3
184
py
Python
RestAdm/apps/system/apps.py
xeroCBW/testmodel
6000d79f91d11bcf6ba76befb3a94a007231ecdc
[ "MIT" ]
null
null
null
RestAdm/apps/system/apps.py
xeroCBW/testmodel
6000d79f91d11bcf6ba76befb3a94a007231ecdc
[ "MIT" ]
54
2020-06-24T07:12:19.000Z
2022-03-12T00:43:57.000Z
RestAdm/apps/system/apps.py
xeroCBW/testmodel
6000d79f91d11bcf6ba76befb3a94a007231ecdc
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SystemConfig(AppConfig): name = 'system' verbose_name = '系统' # 通过ready 来导入信号量 def ready(self): import system.signals
16.727273
33
0.668478
from django.apps import AppConfig class SystemConfig(AppConfig): name = 'system' verbose_name = '系统' def ready(self): import system.signals
true
true
f74c7f0b56ac57a5a78ed62b1db67141d187186f
758
py
Python
src/utils/image.py
danifarre/pneumonia-detection
4e852beed7173fa68f645b276edc9b1895b3a026
[ "MIT" ]
null
null
null
src/utils/image.py
danifarre/pneumonia-detection
4e852beed7173fa68f645b276edc9b1895b3a026
[ "MIT" ]
null
null
null
src/utils/image.py
danifarre/pneumonia-detection
4e852beed7173fa68f645b276edc9b1895b3a026
[ "MIT" ]
null
null
null
from lime import lime_image from skimage.segmentation import mark_boundaries class Image(object): @staticmethod def explainer(images, model, image_size): output = list() for image in images: explainer = lime_image.LimeImageExplainer(random_state=42) explanation = expl...
28.074074
71
0.575198
from lime import lime_image from skimage.segmentation import mark_boundaries class Image(object): @staticmethod def explainer(images, model, image_size): output = list() for image in images: explainer = lime_image.LimeImageExplainer(random_state=42) explanation = expl...
true
true
f74c7f34779201cbb89dd444eee8ccf075f682fe
645
py
Python
codegen/python/fixtures/method/special_chars/client/__init__.py
feeltheajf/go-raml
57ce1f4c47bca464efee03cb4a7a28efcd00bea2
[ "BSD-2-Clause" ]
null
null
null
codegen/python/fixtures/method/special_chars/client/__init__.py
feeltheajf/go-raml
57ce1f4c47bca464efee03cb4a7a28efcd00bea2
[ "BSD-2-Clause" ]
null
null
null
codegen/python/fixtures/method/special_chars/client/__init__.py
feeltheajf/go-raml
57ce1f4c47bca464efee03cb4a7a28efcd00bea2
[ "BSD-2-Clause" ]
null
null
null
# DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml. from .escape_type_service import Escape_typeService from .http_client import HTTPClient from .uri_service import UriService from .User2_0 import User2_0 BASE_URI = "http://localhost:5000" class Client: """ auto-generated. don't ...
25.8
79
0.708527
from .escape_type_service import Escape_typeService from .http_client import HTTPClient from .uri_service import UriService from .User2_0 import User2_0 BASE_URI = "http://localhost:5000" class Client: @staticmethod def _get_services(): return ("escape_type", "uri") def __init__(self, base_uri...
true
true
f74c8009ca3882c06b6d0bfb2d4e80102a8a9918
8,323
py
Python
test/python/transpiler/test_collect_2q_blocks.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
1
2021-06-09T11:22:21.000Z
2021-06-09T11:22:21.000Z
test/python/transpiler/test_collect_2q_blocks.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
1
2019-10-03T12:22:41.000Z
2019-10-03T12:22:41.000Z
test/python/transpiler/test_collect_2q_blocks.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
35.875
100
0.490448
import unittest from math import pi from ddt import ddt, data, unpack from qiskit.circuit import Gate, QuantumCircuit from qiskit.circuit import QuantumRegister, ClassicalRegister from qiskit.converters import circuit_to_dag from qiskit.transpiler import PassManager from qiskit.transpiler.passes import Collect2qBlo...
true
true
f74c807978dfacd5e5ebfa01984d8b59c8a30854
15,044
py
Python
travel/docs/Amadeus-master/pactravel-master/swagger_client/models/hotel_property_response.py
shopglobal/api
176e1858d3f93e8e7854ba194698b6b9825841da
[ "CC-BY-4.0" ]
null
null
null
travel/docs/Amadeus-master/pactravel-master/swagger_client/models/hotel_property_response.py
shopglobal/api
176e1858d3f93e8e7854ba194698b6b9825841da
[ "CC-BY-4.0" ]
1
2021-06-01T22:04:28.000Z
2021-06-01T22:04:28.000Z
travel/docs/Amadeus-master/pactravel-master/swagger_client/models/hotel_property_response.py
shopglobal/api
176e1858d3f93e8e7854ba194698b6b9825841da
[ "CC-BY-4.0" ]
null
null
null
# coding: utf-8 """ Amadeus Travel Innovation Sandbox No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import ...
34.583908
356
0.63979
from pprint import pformat from six import iteritems import re class HotelPropertyResponse(object): swagger_types = { 'property_code': 'str', 'property_name': 'str', 'location': 'Geolocation', 'address': 'Address', 'total_price': 'Amount', 'min_daily_rate': 'Am...
true
true
f74c80bbe586c52e4f8909ede1e5c969737ecd1d
2,576
py
Python
udemy/Deep Learning A-Z/Volume 2 - Unsupervised Deep Learning/Part 4 - Self Organizing Maps (SOM)/mega_case_study.py
balazssimon/ml-playground
c2eba497bebc53e5a03807bdd8873c55f0ec73e1
[ "Apache-2.0" ]
null
null
null
udemy/Deep Learning A-Z/Volume 2 - Unsupervised Deep Learning/Part 4 - Self Organizing Maps (SOM)/mega_case_study.py
balazssimon/ml-playground
c2eba497bebc53e5a03807bdd8873c55f0ec73e1
[ "Apache-2.0" ]
null
null
null
udemy/Deep Learning A-Z/Volume 2 - Unsupervised Deep Learning/Part 4 - Self Organizing Maps (SOM)/mega_case_study.py
balazssimon/ml-playground
c2eba497bebc53e5a03807bdd8873c55f0ec73e1
[ "Apache-2.0" ]
null
null
null
# Mega Case Study - Make a Hybrid Deep Learning Model # Part 1 - Identify the Frauds with the Self-Organizing Map # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('Credit_Card_Applications.csv') X = dataset.iloc[:, :-1].v...
27.698925
101
0.712345
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('Credit_Card_Applications.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values from sklearn.preprocessing import MinMaxScaler sc = MinMaxScaler(feature_range = (0, 1)) X = sc.fit_transform(X) from minisom...
true
true
f74c8158f85e714a316144224e9a707d1deded4e
1,689
py
Python
tests/Advanced/typeof-vardecl-udt.py
aws-lumberyard-dev/o3de-azslc
bafacbe822da625da22ceba09e8fcdcf18d8d09b
[ "Apache-2.0", "MIT" ]
13
2021-07-23T00:11:20.000Z
2022-02-09T07:59:20.000Z
tests/Advanced/typeof-vardecl-udt.py
aws-lumberyard-dev/o3de-azslc
bafacbe822da625da22ceba09e8fcdcf18d8d09b
[ "Apache-2.0", "MIT" ]
10
2021-09-14T12:12:22.000Z
2022-03-30T21:27:10.000Z
tests/Advanced/typeof-vardecl-udt.py
aws-lumberyard-dev/o3de-azslc
bafacbe822da625da22ceba09e8fcdcf18d8d09b
[ "Apache-2.0", "MIT" ]
5
2021-07-19T23:49:51.000Z
2021-12-02T05:13:35.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- """ Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ import sys import os from clr import * sys.path.append("..") import te...
35.1875
106
0.647128
import sys import os from clr import * sys.path.append("..") import testfuncs def test(thefile, compilerPath, silent): symbols, ok = testfuncs.buildAndGetSymbols(thefile, compilerPath, silent) if ok: try: ok = symbols["Symbol '/g_s'"]['kind'] == 'Variable' ok = ok and symbols["S...
true
true
f74c8247ef9fd9d46d2921cdaca7f41f0dec4c22
1,443
py
Python
build/lib/adam/templates/french.py
NateveLang/Adam
172e512e0d66003ed81730917f2d351271e47611
[ "MIT" ]
6
2021-11-18T14:34:41.000Z
2021-12-26T18:43:20.000Z
nate/templates/french.py
NateveLang/Nate
1714ecaf7b8ebd62daf060c7ea85444916d24091
[ "MIT" ]
7
2021-11-24T07:04:09.000Z
2022-03-09T11:32:22.000Z
nate/templates/french.py
NateveLang/Nate
1714ecaf7b8ebd62daf060c7ea85444916d24091
[ "MIT" ]
1
2021-11-29T08:49:23.000Z
2021-11-29T08:49:23.000Z
transpiler_name = "adam" mayusc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" alphabet = mayusc + mayusc.lower() + "_" digits = "0123456789" alphanum = alphabet + digits blanks = "/t /n" strings = ["'", '"', '"""', "'''"] matrices = "$" vectors = "[]" embedded = "#" commentaries = "~" floating = "." one_char_symbols = "+-*/%=<>()[]{...
24.05
72
0.62578
transpiler_name = "adam" mayusc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" alphabet = mayusc + mayusc.lower() + "_" digits = "0123456789" alphanum = alphabet + digits blanks = "/t /n" strings = ["'", '"', '"""', "'''"] matrices = "$" vectors = "[]" embedded = "#" commentaries = "~" floating = "." one_char_symbols = "+-*/%=<>()[]{...
true
true
f74c825c44d0c5c7c6bae90b4a9fd47139e25f5e
657
py
Python
skfem/generic_utils.py
gatling-nrl/scikit-fem
04730d80d612470b7e802eed4c21dd96b89cef61
[ "BSD-3-Clause" ]
null
null
null
skfem/generic_utils.py
gatling-nrl/scikit-fem
04730d80d612470b7e802eed4c21dd96b89cef61
[ "BSD-3-Clause" ]
3
2022-01-07T00:56:47.000Z
2022-01-12T20:06:34.000Z
skfem/generic_utils.py
gatling-nrl/scikit-fem
04730d80d612470b7e802eed4c21dd96b89cef61
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from numpy import ndarray def hash_args(*args): """Return a tuple of hashes, with numpy support.""" return tuple(hash(arg.tobytes()) if isinstance(arg, ndarray) else hash(arg) for arg in args) class OrientedBoundary(ndarray): """An array of facet ind...
25.269231
55
0.601218
import numpy as np from numpy import ndarray def hash_args(*args): return tuple(hash(arg.tobytes()) if isinstance(arg, ndarray) else hash(arg) for arg in args) class OrientedBoundary(ndarray): def __new__(cls, indices, ori): obj = np.asarray(indices).view(cls) ...
true
true
f74c83389266bb17e3b51417cea4b6a7c13da262
1,068
py
Python
test/ext/restapi/resources.py
YakovBoiev/test
03143082978d10f048578089da10a0263c98383e
[ "Unlicense" ]
null
null
null
test/ext/restapi/resources.py
YakovBoiev/test
03143082978d10f048578089da10a0263c98383e
[ "Unlicense" ]
null
null
null
test/ext/restapi/resources.py
YakovBoiev/test
03143082978d10f048578089da10a0263c98383e
[ "Unlicense" ]
null
null
null
from flask import abort, jsonify from flask_restful import Resource from flask_simplelogin import login_required from test.models import Product class ProductResource(Resource): def get(self): products = Product.query.all() or abort(204) return jsonify( {"products": [product.to_dict()...
29.666667
78
0.657303
from flask import abort, jsonify from flask_restful import Resource from flask_simplelogin import login_required from test.models import Product class ProductResource(Resource): def get(self): products = Product.query.all() or abort(204) return jsonify( {"products": [product.to_dict()...
true
true
f74c83762f9048d5189f885ce174c9769e767e6d
300
py
Python
Mundo 1/aula08a.py
lucashsbarros/Python_Curso
01f7b5c89636cacc774d38b39951ac2b73272c63
[ "MIT" ]
null
null
null
Mundo 1/aula08a.py
lucashsbarros/Python_Curso
01f7b5c89636cacc774d38b39951ac2b73272c63
[ "MIT" ]
null
null
null
Mundo 1/aula08a.py
lucashsbarros/Python_Curso
01f7b5c89636cacc774d38b39951ac2b73272c63
[ "MIT" ]
null
null
null
''' from math import sqrt, floor num = int(input('Digite um número: ')) raiz = sqrt(num) print('A raiz de {} é igual a {:.2f}'.format(num,floor(raiz))) ''' ''' import random num = random.randint(1, 10) print(num)''' import emoji print(emoji.emojize('Olá, Mundo :earth_americas:', use_aliases=True))
21.428571
69
0.673333
import emoji print(emoji.emojize('Olá, Mundo :earth_americas:', use_aliases=True))
true
true
f74c869cab2a7c2ee30863c9f5398180ca79186c
1,002
py
Python
misc/google_cloud.py
Jason-George/irn
b75441b5fb8080c1dbd8dbcb9b05720a4ceb2246
[ "MIT" ]
null
null
null
misc/google_cloud.py
Jason-George/irn
b75441b5fb8080c1dbd8dbcb9b05720a4ceb2246
[ "MIT" ]
null
null
null
misc/google_cloud.py
Jason-George/irn
b75441b5fb8080c1dbd8dbcb9b05720a4ceb2246
[ "MIT" ]
null
null
null
from google.cloud import storage def upload_blob(bucket_name, source_file_name, destination_blob_name): storage_client = storage.Client('liquid-force-295404') """Uploads a file to the bucket. https://cloud.google.com/storage/docs/ """ bucket = storage_client.get_bucket(bucket_name) blob = bucket.blob(d...
47.714286
108
0.757485
from google.cloud import storage def upload_blob(bucket_name, source_file_name, destination_blob_name): storage_client = storage.Client('liquid-force-295404') bucket = storage_client.get_bucket(bucket_name) blob = bucket.blob(destination_blob_name) blob.upload_from_filename(source_file_name) print(...
true
true
f74c87813a82e0b8fcaad6fa88479e5ed5ff3c27
3,572
py
Python
utilize/__main__.py
copyrighthero/pypi.utilize
a289d04c18a1323725544e64825e11922cfbe81a
[ "BSD-2-Clause" ]
2
2018-03-22T04:41:09.000Z
2018-12-31T09:37:12.000Z
utilize/__main__.py
copyrighthero/pypi.utilize
a289d04c18a1323725544e64825e11922cfbe81a
[ "BSD-2-Clause" ]
null
null
null
utilize/__main__.py
copyrighthero/pypi.utilize
a289d04c18a1323725544e64825e11922cfbe81a
[ "BSD-2-Clause" ]
null
null
null
# Author: Hansheng Zhao <copyrighthero@gmail.com> (https://www.zhs.me) from configparser import RawConfigParser from argparse import ArgumentParser def create_config(file_path): # create config parser instance configparser = RawConfigParser(allow_no_value = True) # create required sections configparser.add_...
33.074074
88
0.652016
from configparser import RawConfigParser from argparse import ArgumentParser def create_config(file_path): configparser = RawConfigParser(allow_no_value = True) configparser.add_section('global') configparser.add_section('basecon') configparser.add_section('seco') configparser.add_section('redis') c...
true
true
f74c89fd1e7dbda84eadcb32bcf18df5fe1f5ca5
353
py
Python
tests/test_app/urls.py
wullerot/django-filebase
21a3bf7a6749afc6760e6c57707be1b43feb344d
[ "MIT" ]
null
null
null
tests/test_app/urls.py
wullerot/django-filebase
21a3bf7a6749afc6760e6c57707be1b43feb344d
[ "MIT" ]
9
2019-03-10T13:06:01.000Z
2021-06-10T21:26:53.000Z
tests/test_app/urls.py
wullerot/django-filebase
21a3bf7a6749afc6760e6c57707be1b43feb344d
[ "MIT" ]
4
2019-04-11T09:33:35.000Z
2019-12-14T00:47:32.000Z
"""URLs to run the tests.""" from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.views import static urlpatterns = [ url(r'^admin/', admin.site.urls), ] if settings.DEBUG: urlpatterns += [ url(r'^media/(?P<path>.*)$', static.serve, {'document...
23.533333
93
0.685552
from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.views import static urlpatterns = [ url(r'^admin/', admin.site.urls), ] if settings.DEBUG: urlpatterns += [ url(r'^media/(?P<path>.*)$', static.serve, {'document_root': settings.MEDIA_ROOT})...
true
true
f74c8a3ad7f17e05c51f44e353ea6434f0d14b6b
8,582
py
Python
python/setupcache_test.py
danielforgacs/houdini_tools
b23f2b13baac6881da7e8f0cbb421fde3fc616ce
[ "MIT" ]
2
2017-07-07T08:48:43.000Z
2020-05-01T10:45:58.000Z
python/setupcache_test.py
danielforgacs/houdini_tools
b23f2b13baac6881da7e8f0cbb421fde3fc616ce
[ "MIT" ]
null
null
null
python/setupcache_test.py
danielforgacs/houdini_tools
b23f2b13baac6881da7e8f0cbb421fde3fc616ce
[ "MIT" ]
2
2017-07-07T08:48:44.000Z
2019-08-22T05:42:35.000Z
""" tests for cache setup module """ import unittest import random import hou import setupcache reload(setupcache) class HipTest(unittest.TestCase): """ base class to initiate empty houdini scene across tests with a basic node network """ def setUp(self): hou.hipFile.clear(suppress_save...
34.465863
89
0.663249
import unittest import random import hou import setupcache reload(setupcache) class HipTest(unittest.TestCase): def setUp(self): hou.hipFile.clear(suppress_save_prompt=True) geo = hou.node('/obj').createNode('geo', 'TEST_geo') geo.node('file1').destroy() name = ''. join([rando...
true
true
f74c8b6d185483e535dc51a39a196c49f414a09e
12,297
py
Python
stanza/models/parser.py
asears/stanza
f91ca215e175d4f7b202259fe789374db7829395
[ "Apache-2.0" ]
3,633
2016-01-21T17:29:13.000Z
2022-03-31T13:36:47.000Z
stanza/models/parser.py
asears/stanza
f91ca215e175d4f7b202259fe789374db7829395
[ "Apache-2.0" ]
593
2016-01-19T07:16:05.000Z
2022-03-31T20:23:58.000Z
stanza/models/parser.py
asears/stanza
f91ca215e175d4f7b202259fe789374db7829395
[ "Apache-2.0" ]
525
2016-01-20T03:22:19.000Z
2022-03-24T05:51:56.000Z
""" Entry point for training and evaluating a dependency parser. This implementation combines a deep biaffine graph-based parser with linearization and distance features. For details please refer to paper: https://nlp.stanford.edu/pubs/qi2018universal.pdf. """ """ Training and evaluation for the parser. """ import s...
43.452297
211
0.667561
import sys import os import shutil import time import argparse import logging import numpy as np import random import torch from torch import nn, optim import stanza.models.depparse.data as data from stanza.models.depparse.data import DataLoader from stanza.models.depparse.trainer import Trainer from stanza.models.d...
true
true
f74c8d9694f3bed1e51928a24b4ed2869f6f4dda
22,314
py
Python
arcade/tilemap.py
thecodinghyrax/arcade
3d38ab42ce06e737f48240223484aa7706ffa11c
[ "MIT" ]
null
null
null
arcade/tilemap.py
thecodinghyrax/arcade
3d38ab42ce06e737f48240223484aa7706ffa11c
[ "MIT" ]
null
null
null
arcade/tilemap.py
thecodinghyrax/arcade
3d38ab42ce06e737f48240223484aa7706ffa11c
[ "MIT" ]
null
null
null
""" Functions and classes for managing a map saved in the .tmx format. Typically these .tmx maps are created using the `Tiled Map Editor`_. For more information, see the `Platformer Tutorial`_. .. _Tiled Map Editor: https://www.mapeditor.org/ .. _Platformer Tutorial: http://arcade.academy/examples/platform_tutorial/...
39.846429
116
0.586045
from typing import Optional, List, cast, Union import math import copy import pytiled_parser import os from pathlib import Path from arcade import Sprite from arcade import AnimatedTimeBasedSprite from arcade import AnimationKeyframe from arcade import SpriteList from arcade import load_texture from arcade.arcade_typ...
true
true