hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c29ae0376038f121d79510208eecea8a9719e24
7,149
py
Python
cea/tests/test_schedules.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
121
2017-08-15T20:10:22.000Z
2022-03-24T01:25:42.000Z
cea/tests/test_schedules.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
2,121
2017-07-27T12:02:01.000Z
2022-03-31T16:39:28.000Z
cea/tests/test_schedules.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
42
2017-09-19T09:59:56.000Z
2022-02-19T20:19:56.000Z
""" This module contains unit tests for the schedules used by the CEA. The schedule code is tested against data in the file `test_schedules.config` that can be created by running this file. Note, however, that this will overwrite the test data - you should only do this if you are sure that the new data is correct. """ ...
51.064286
186
0.662191
import configparser import json import os import unittest import pandas as pd import cea.config from cea.datamanagement.archetypes_mapper import calculate_average_multiuse from cea.demand.building_properties import BuildingProperties from cea.demand.schedule_maker.schedule_maker import schedule_maker_main from cea.i...
true
true
1c29b06918e85a8ee383e68f0b08efe5251bc8b7
3,667
py
Python
src/kolibree-changelog/generate_changelog.py
kolibree-git/gitchangelog
267c29104b68db2b6665a8e6414876f7fe73d5dc
[ "BSD-3-Clause" ]
2
2021-01-12T15:10:37.000Z
2021-09-15T03:41:45.000Z
src/kolibree-changelog/generate_changelog.py
kolibree-git/gitchangelog
267c29104b68db2b6665a8e6414876f7fe73d5dc
[ "BSD-3-Clause" ]
5
2021-01-13T11:14:43.000Z
2021-04-22T08:06:47.000Z
src/kolibree-changelog/generate_changelog.py
kolibree-git/gitchangelog
267c29104b68db2b6665a8e6414876f7fe73d5dc
[ "BSD-3-Clause" ]
null
null
null
import argparse import getpass from dataclasses import dataclass from changelog_writer import Changelog, ChangelogWriter, VersionChanges from commit_parser import CommitParser from jira_parser import JiraParser @dataclass class Arguments: start_tag: str end_tag: str title: str filename: str githu...
28.648438
115
0.681484
import argparse import getpass from dataclasses import dataclass from changelog_writer import Changelog, ChangelogWriter, VersionChanges from commit_parser import CommitParser from jira_parser import JiraParser @dataclass class Arguments: start_tag: str end_tag: str title: str filename: str githu...
true
true
1c29b148c1268e67f4ed811e0aff364532614eb5
1,132
py
Python
python_Project/Day_09/test_3.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
python_Project/Day_09/test_3.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
python_Project/Day_09/test_3.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
""" 静态方法和类方法 之前,我们在类中定义的方法都是对象方法,也就是说这些方法都是发送给对象的消息。 实际上,我们写在类中的方法并不需要都是对象方法, 例如我们定义一个“三角形”类,通过传入三条边长来构造三角形,并提供计算周长和面积的方法, 但是传入的三条边长未必能构造出三角形对象, 因此我们可以先写一个方法来验证三条边长是否可以构成三角形,这个方法很显然就不是对象方法, 因为在调用这个方法时三角形对象尚未创建出来(因为都不知道三条边能不能构成三角形), 所以这个方法是属于三角形类而并不属于三角形对象的。 我们可以使用静态方法来解决这类问题,代码如下所示 """ from math import sqrt class T...
21.358491
56
0.610424
from math import sqrt class Triangle(object): def __init__(self, a, b, c): self._a = a self._b = b self._c = c @staticmethod def is_valid(a, b, c): return a + b > c and a + c > b and b + c > a def perimeter(self): return self._a + self._b + self._c def ...
true
true
1c29b2513630b9477ca30e9d1a9c0d4e4250981e
7,502
py
Python
Spatial-Transformer-PCD/point_based/part_seg/part_seg_model_deform.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
Spatial-Transformer-PCD/point_based/part_seg/part_seg_model_deform.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
Spatial-Transformer-PCD/point_based/part_seg/part_seg_model_deform.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import math import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.dirname(BASE_DIR)) sys.path.append(os.path.join(BASE_DIR, '../utils')) sys.path.append(os.path.join(BASE_DIR, '../models')) sys.path.append(os.path.join(BASE_DIR, '.....
60.5
232
0.565716
import tensorflow as tf import numpy as np import math import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.dirname(BASE_DIR)) sys.path.append(os.path.join(BASE_DIR, '../utils')) sys.path.append(os.path.join(BASE_DIR, '../models')) sys.path.append(os.path.join(BASE_DIR, '.....
true
true
1c29b2ba997e4fec7096766107aac36997b5aece
2,046
py
Python
test_env.py
rmqlife/SPIRAL-tensorflow
54fce656656a0a7468e57077a26676f8add2f44a
[ "MIT" ]
null
null
null
test_env.py
rmqlife/SPIRAL-tensorflow
54fce656656a0a7468e57077a26676f8add2f44a
[ "MIT" ]
null
null
null
test_env.py
rmqlife/SPIRAL-tensorflow
54fce656656a0a7468e57077a26676f8add2f44a
[ "MIT" ]
null
null
null
# from __future__ import print_functions from colorenv import ColorEnv, PaintMode import os from os.path import join, basename import numpy as np import sys sys.path.append('/home/dprasad/notebooks/SPIRAL-tensorflow') sys.path.append('/home/dprasad/notebooks/SPIRAL-tensorflow/libs/mypaint') from lib import surface, t...
28.816901
86
0.652493
from colorenv import ColorEnv, PaintMode import os from os.path import join, basename import numpy as np import sys sys.path.append('/home/dprasad/notebooks/SPIRAL-tensorflow') sys.path.append('/home/dprasad/notebooks/SPIRAL-tensorflow/libs/mypaint') from lib import surface, tiledsurface, brush import cv2 def test_...
true
true
1c29b2c0d7fa07e7e8f8753626f394e6a275e1cb
18,362
py
Python
test/augmenters/test_blur.py
Rahul-Venugopal/Image-augmentation
0b0125d29003981709bdb8230170c851367a3995
[ "MIT" ]
4
2018-11-24T15:31:36.000Z
2020-06-23T02:52:45.000Z
test/augmenters/test_blur.py
Rahul-Venugopal/Image-augmentation_1
0b0125d29003981709bdb8230170c851367a3995
[ "MIT" ]
null
null
null
test/augmenters/test_blur.py
Rahul-Venugopal/Image-augmentation_1
0b0125d29003981709bdb8230170c851367a3995
[ "MIT" ]
null
null
null
from __future__ import print_function, division, absolute_import import time import matplotlib matplotlib.use('Agg') # fix execution of tests involving matplotlib on travis import numpy as np import six.moves as sm import cv2 import imgaug as ia from imgaug import augmenters as iaa from imgaug import parameters as ...
33.144404
115
0.562466
from __future__ import print_function, division, absolute_import import time import matplotlib matplotlib.use('Agg') import numpy as np import six.moves as sm import cv2 import imgaug as ia from imgaug import augmenters as iaa from imgaug import parameters as iap from imgaug.testutils import keypoints_equal, resee...
true
true
1c29b2c3d66e3fd1c9540f1f27e2b7bbcd133e89
5,178
py
Python
tests/unit/channel/test_base_channel.py
dmulyalin/scrapli_netconf
7c9e5e74a1afac7955177db759e54d2211637d42
[ "MIT" ]
61
2020-05-17T19:57:25.000Z
2022-03-30T01:10:32.000Z
tests/unit/channel/test_base_channel.py
dmulyalin/scrapli_netconf
7c9e5e74a1afac7955177db759e54d2211637d42
[ "MIT" ]
79
2020-05-17T20:22:05.000Z
2022-03-02T14:37:28.000Z
tests/unit/channel/test_base_channel.py
dmulyalin/scrapli_netconf
7c9e5e74a1afac7955177db759e54d2211637d42
[ "MIT" ]
6
2021-01-07T16:45:28.000Z
2022-02-11T19:31:49.000Z
import pytest from scrapli_netconf.constants import NetconfClientCapabilities, NetconfVersion from scrapli_netconf.exceptions import CapabilityNotSupported, CouldNotExchangeCapabilities SERVER_CAPABILITIES_1_0 = b"""<?xml version="1.0" encoding="UTF-8"?> <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ca...
36.20979
99
0.742758
import pytest from scrapli_netconf.constants import NetconfClientCapabilities, NetconfVersion from scrapli_netconf.exceptions import CapabilityNotSupported, CouldNotExchangeCapabilities SERVER_CAPABILITIES_1_0 = b"""<?xml version="1.0" encoding="UTF-8"?> <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ca...
true
true
1c29b4c396d464de5a9cb1a404ebe04eb6885479
2,105
py
Python
setup.py
elcinchu27/cnvkit
59ed0950024172c1b6b7543ac0c236d6a0f4b971
[ "Apache-2.0" ]
null
null
null
setup.py
elcinchu27/cnvkit
59ed0950024172c1b6b7543ac0c236d6a0f4b971
[ "Apache-2.0" ]
null
null
null
setup.py
elcinchu27/cnvkit
59ed0950024172c1b6b7543ac0c236d6a0f4b971
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Copy number variation toolkit for high-throughput sequencing.""" import sys from os.path import dirname, join from glob import glob from setuptools import setup setup_args = {} # Dependencies for easy_install and pip: install_requires=[ 'biopython >= 1.62', "cython == 0.29.20...
31.41791
76
0.593349
import sys from os.path import dirname, join from glob import glob from setuptools import setup setup_args = {} install_requires=[ 'biopython >= 1.62', "cython == 0.29.20", 'pomegranate @ git+https://github.com/jmschrei/pomegranate@v0.13.4', 'matplotlib >= 1.3.1', 'numpy >= ...
true
true
1c29b71583407d533138cb4f8f09dd1dba61c1bd
2,439
py
Python
config.py
HsqHHH/RTNet4DRlesion
41607860579b349ef40cdff9afc2d36d7d9f5348
[ "MIT" ]
null
null
null
config.py
HsqHHH/RTNet4DRlesion
41607860579b349ef40cdff9afc2d36d7d9f5348
[ "MIT" ]
null
null
null
config.py
HsqHHH/RTNet4DRlesion
41607860579b349ef40cdff9afc2d36d7d9f5348
[ "MIT" ]
null
null
null
import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--seed', type=int, default=1234) parser.add_argument('--outf', default=' ', help='trained model will be saved at here') parser.add_argument('--save', default='UNet_test', help='save name of experiment in args.outf...
55.431818
109
0.705617
import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--seed', type=int, default=1234) parser.add_argument('--outf', default=' ', help='trained model will be saved at here') parser.add_argument('--save', default='UNet_test', help='save name of experiment in args.outf...
true
true
1c29b89b84c306ee57132ff884aa5925b7d291a7
1,667
py
Python
compiler/definitions/ir/nodes/r_split.py
reikdas/pash
5eac7b98f16786dfee5be83acd079c46c9e5b68d
[ "MIT" ]
89
2021-07-12T16:15:39.000Z
2022-02-20T10:01:41.000Z
compiler/definitions/ir/nodes/r_split.py
reikdas/pash
5eac7b98f16786dfee5be83acd079c46c9e5b68d
[ "MIT" ]
226
2021-07-12T16:41:00.000Z
2022-03-31T22:52:52.000Z
compiler/definitions/ir/nodes/r_split.py
reikdas/pash
5eac7b98f16786dfee5be83acd079c46c9e5b68d
[ "MIT" ]
23
2021-07-12T14:23:23.000Z
2022-03-29T07:21:31.000Z
import os import config from definitions.ir.dfg_node import * from definitions.ir.file_id import * from ir_utils import string_to_argument class RSplit(DFGNode): def __init__(self, inputs, outputs, com_name, com_category, com_options = [], com_redirs = [], com_assignments=[]): super().__...
39.690476
104
0.639472
import os import config from definitions.ir.dfg_node import * from definitions.ir.file_id import * from ir_utils import string_to_argument class RSplit(DFGNode): def __init__(self, inputs, outputs, com_name, com_category, com_options = [], com_redirs = [], com_assignments=[]): super().__...
true
true
1c29b9ba3df8e3010480cd88d176d92b9a408deb
3,803
py
Python
test/functional/wallet_encryption.py
ucacoin/Ucacoin2
bc39105adbf648114f55f9f90976af2d2b7cd087
[ "MIT" ]
4
2020-07-31T12:27:23.000Z
2021-06-05T23:07:37.000Z
test/functional/wallet_encryption.py
ucacoin/Ucacoin2
bc39105adbf648114f55f9f90976af2d2b7cd087
[ "MIT" ]
3
2020-08-02T10:47:08.000Z
2021-07-07T06:41:54.000Z
test/functional/wallet_encryption.py
ucacoin/Ucacoin2
bc39105adbf648114f55f9f90976af2d2b7cd087
[ "MIT" ]
3
2020-08-24T15:36:47.000Z
2020-10-13T15:51:47.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Wallet encryption""" import time from test_framework.test_framework import UCACoinTestFramework ...
43.712644
138
0.70497
import time from test_framework.test_framework import UCACoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, assert_greater_than, assert_greater_than_or_equal, ) class WalletEncryptionTest(UCACoinTestFramework): def set_test_params(self): self.se...
true
true
1c29ba07c5793a27879a3a1f0e32deb8cfd10faf
3,032
py
Python
catalog/packages/serializers/vnf_pkg_subscription.py
onap/modeling-etsicatalog
b16b4579ea80bf82fa497e4934b2bb8728845b58
[ "Apache-2.0" ]
null
null
null
catalog/packages/serializers/vnf_pkg_subscription.py
onap/modeling-etsicatalog
b16b4579ea80bf82fa497e4934b2bb8728845b58
[ "Apache-2.0" ]
3
2021-02-03T08:59:39.000Z
2022-03-18T02:18:12.000Z
catalog/packages/serializers/vnf_pkg_subscription.py
onap/modeling-etsicatalog
b16b4579ea80bf82fa497e4934b2bb8728845b58
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2019 Verizon. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
32.255319
81
0.692612
from rest_framework import serializers from catalog.packages.serializers import subscription_auth_data from catalog.packages.serializers import vnf_pkg_notifications class LinkSerializer(serializers.Serializer): href = serializers.CharField( help_text="URI of the referenced resource.", ...
true
true
1c29baf27604baf6e3381541d541d7b6e2460f87
312
py
Python
utils/scripts/db_check.py
gogasca/news_ml
29f461551c964882ee3a607ec9123a76082c11bd
[ "Apache-2.0" ]
4
2018-11-15T08:57:13.000Z
2020-11-15T14:32:10.000Z
utils/scripts/db_check.py
gogasca/news_ml
29f461551c964882ee3a607ec9123a76082c11bd
[ "Apache-2.0" ]
14
2019-11-21T08:38:14.000Z
2021-04-15T05:49:58.000Z
utils/scripts/db_check.py
newsml/newsml
5f4dae8890b2497530b0f3c246d7a407fc18ffe0
[ "Apache-2.0" ]
1
2019-12-23T19:22:42.000Z
2019-12-23T19:22:42.000Z
"""Verify DB connection.""" import os import sys FILEPATH = os.environ.get('NEWSML_ENV') if not FILEPATH: raise Exception('Define NEWSML_ENV first') sys.path.append(FILEPATH) from api.version1_0.database import DbHelper def main(): DbHelper.test_connection() if __name__ == "__main__": main()
15.6
46
0.721154
import os import sys FILEPATH = os.environ.get('NEWSML_ENV') if not FILEPATH: raise Exception('Define NEWSML_ENV first') sys.path.append(FILEPATH) from api.version1_0.database import DbHelper def main(): DbHelper.test_connection() if __name__ == "__main__": main()
true
true
1c29bba8c30c6ff7fcaa11da5247897308ab3ee2
1,795
py
Python
habits/cron/__main__.py
jsvana/habits
b277ce93971d05de4029f3e71464bab61515c011
[ "MIT" ]
null
null
null
habits/cron/__main__.py
jsvana/habits
b277ce93971d05de4029f3e71464bab61515c011
[ "MIT" ]
1
2017-01-03T03:01:49.000Z
2017-01-03T14:44:22.000Z
habits/cron/__main__.py
jsvana/habits
b277ce93971d05de4029f3e71464bab61515c011
[ "MIT" ]
null
null
null
""" Quick tool to pull from a Trello board and text the user a reminder every day. Meant to be run in cron. """ import argparse import datetime import random import sys import time import schedule from twilio.rest import TwilioRestClient from .. import ( config, db, trello, ) def send_message(client, ...
19.51087
72
0.63844
import argparse import datetime import random import sys import time import schedule from twilio.rest import TwilioRestClient from .. import ( config, db, trello, ) def send_message(client, text): message = client.messages.create( body=text, to=config.phone_numbers['user'], ...
true
true
1c29bbef88e6c70528b0ac3965ae3604fdd4a16d
2,140
py
Python
docs/conf.py
burrelle/streetmix
853da98d0d3f2693bb1cc15cf3c439a10b17c4a9
[ "BSD-3-Clause" ]
4
2021-03-30T08:35:08.000Z
2021-06-29T14:14:39.000Z
docs/conf.py
burrelle/streetmix
853da98d0d3f2693bb1cc15cf3c439a10b17c4a9
[ "BSD-3-Clause" ]
49
2021-09-22T04:32:02.000Z
2022-03-28T12:55:22.000Z
docs/conf.py
burrelle/streetmix
853da98d0d3f2693bb1cc15cf3c439a10b17c4a9
[ "BSD-3-Clause" ]
1
2021-04-03T17:42:02.000Z
2021-04-03T17:42:02.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
33.968254
79
0.668692
def setup(app): app.add_stylesheet('css/sphinx_prompt_css.css') app.add_stylesheet('css/custom.css') project = 'Streetmix' copyright = '2019, Streetmix LLC' extensions = [ 'sphinx-prompt' ] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store...
true
true
1c29bc1590cfa93464c4a08c0a9c7fdd22699ce4
832
py
Python
setup.py
kapsali29/StackStatsAPI
5181bd5275129080206350e147ce6b1db18a0b69
[ "MIT" ]
null
null
null
setup.py
kapsali29/StackStatsAPI
5181bd5275129080206350e147ce6b1db18a0b69
[ "MIT" ]
null
null
null
setup.py
kapsali29/StackStatsAPI
5181bd5275129080206350e147ce6b1db18a0b69
[ "MIT" ]
null
null
null
from setuptools import setup requirements = [ 'beautifulsoup4==4.7.1', 'bs4==0.0.1', 'certifi==2018.11.29', 'chardet==3.0.4', 'idna==2.8', 'json2html==1.2.1', 'nose==1.3.7', 'python-dateutil==2.7.5', 'requests==2.21.0', 'six==1.12.0', 'soupsieve==1.7.1', 'tabulate==0.8.2...
23.771429
68
0.575721
from setuptools import setup requirements = [ 'beautifulsoup4==4.7.1', 'bs4==0.0.1', 'certifi==2018.11.29', 'chardet==3.0.4', 'idna==2.8', 'json2html==1.2.1', 'nose==1.3.7', 'python-dateutil==2.7.5', 'requests==2.21.0', 'six==1.12.0', 'soupsieve==1.7.1', 'tabulate==0.8.2...
true
true
1c29bc53bb502121756fdebae63f7649a32fe3d7
1,899
py
Python
scripts/add_site_ids.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
13
2016-01-14T02:43:10.000Z
2020-11-25T20:43:05.000Z
scripts/add_site_ids.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
84
2015-11-20T02:03:33.000Z
2021-10-14T19:24:24.000Z
scripts/add_site_ids.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
5
2015-11-25T19:29:53.000Z
2019-09-04T17:37:52.000Z
# # Copyright 2015-2019, Institute for Systems Biology # # 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 ...
34.527273
167
0.707741
from __future__ import print_function import os import MySQLdb import logging import traceback import sys from isb_cgc import secret_settings logging.basicConfig(level=logging.INFO) db = None cursor = None try: db_settings = secret_settings.get('DATABASE')['default'] ssl = None if 'OPTIO...
true
true
1c29bc8fc87e7fa37b1a012a0b58c2f4d77122ff
827
py
Python
src/tests/common/forms/test_cfp_forms_utils.py
xhub/pretalx
33bd07ec98ddeb5b7ff35fe7e30c4d38bef57d7e
[ "Apache-2.0" ]
null
null
null
src/tests/common/forms/test_cfp_forms_utils.py
xhub/pretalx
33bd07ec98ddeb5b7ff35fe7e30c4d38bef57d7e
[ "Apache-2.0" ]
1
2019-07-05T20:03:42.000Z
2019-07-05T20:03:42.000Z
src/tests/common/forms/test_cfp_forms_utils.py
xhub/pretalx
33bd07ec98ddeb5b7ff35fe7e30c4d38bef57d7e
[ "Apache-2.0" ]
null
null
null
import pytest from pretalx.common.forms.utils import get_help_text @pytest.mark.parametrize('text,min_length,max_length,_type,warning', ( ('t', 1, 3, 'chars', 't Please write between 1 and 3 characters.'), ('', 1, 3, 'chars', 'Please write between 1 and 3 characters.'), ('t', 0, 3, 'chars', 't Please wri...
45.944444
81
0.644498
import pytest from pretalx.common.forms.utils import get_help_text @pytest.mark.parametrize('text,min_length,max_length,_type,warning', ( ('t', 1, 3, 'chars', 't Please write between 1 and 3 characters.'), ('', 1, 3, 'chars', 'Please write between 1 and 3 characters.'), ('t', 0, 3, 'chars', 't Please wri...
true
true
1c29bcf8c8760602be645b62d0a63ad3ed652a8b
18,936
py
Python
app/api/features.py
ldesousa/ogcldapi
e2fa386933b3003181c48b628e7f8daf1d0a2120
[ "Apache-2.0" ]
1
2022-01-23T14:29:40.000Z
2022-01-23T14:29:40.000Z
app/api/features.py
ldesousa/ogcldapi
e2fa386933b3003181c48b628e7f8daf1d0a2120
[ "Apache-2.0" ]
4
2021-11-05T18:16:43.000Z
2021-11-26T01:59:47.000Z
app/api/features.py
ldesousa/ogcldapi
e2fa386933b3003181c48b628e7f8daf1d0a2120
[ "Apache-2.0" ]
1
2021-11-08T22:36:52.000Z
2021-11-08T22:36:52.000Z
import re from typing import List from SPARQLWrapper import SPARQLWrapper, JSON from fastapi import Response from fastapi.responses import JSONResponse from fastapi.templating import Jinja2Templates from pyldapi import ContainerRenderer, RDF_MEDIATYPES from rdflib import Graph, Literal, URIRef from rdflib.namespace im...
36.768932
118
0.521493
import re from typing import List from SPARQLWrapper import SPARQLWrapper, JSON from fastapi import Response from fastapi.responses import JSONResponse from fastapi.templating import Jinja2Templates from pyldapi import ContainerRenderer, RDF_MEDIATYPES from rdflib import Graph, Literal, URIRef from rdflib.namespace im...
true
true
1c29bd4b593ed5639ea563cb6bdac3d6e6b33791
2,491
py
Python
ravenframework/CodeInterfaces.py
khurrumsaleem/raven
3a158f9ae3851d3eca51b4bd91ea6494e5c0ed89
[ "Apache-2.0" ]
null
null
null
ravenframework/CodeInterfaces.py
khurrumsaleem/raven
3a158f9ae3851d3eca51b4bd91ea6494e5c0ed89
[ "Apache-2.0" ]
null
null
null
ravenframework/CodeInterfaces.py
khurrumsaleem/raven
3a158f9ae3851d3eca51b4bd91ea6494e5c0ed89
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
46.12963
101
0.62786
from __future__ import division, print_function, unicode_literals, absolute_import import os from glob import glob import inspect from .EntityFactoryBase import EntityFactory from .utils import utils __moduleInterfaceList = [] startDir = os.path.join(os.path.dirname(__file__),'CodeInterfaces') for...
true
true
1c29bd57b94ab4877591158ce98b83bac52dc757
527
py
Python
leetcode/0168 Excel Sheet Column Title.py
jaredliw/python-question-bank
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2021-04-08T07:49:15.000Z
2021-04-08T07:49:15.000Z
leetcode/0168 Excel Sheet Column Title.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
null
null
null
leetcode/0168 Excel Sheet Column Title.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2022-01-23T02:12:24.000Z
2022-01-23T02:12:24.000Z
class Solution(object): def convertToTitle(self, columnNumber): """ :type columnNumber: int :rtype: str """ # Runtime: 20 ms # Memory: 13.3 MB colname = "" while True: columnNumber, mod = divmod(columnNumber, 26) if mod == 0: ...
26.35
56
0.440228
class Solution(object): def convertToTitle(self, columnNumber): colname = "" while True: columnNumber, mod = divmod(columnNumber, 26) if mod == 0: colname += "Z" columnNumber -= 1 else: colname += c...
true
true
1c29bd6eb0865b6126533f8866730494df975538
4,633
py
Python
src/openeo_grass_gis_driver/actinia_processing/reduce_time_process.py
marcjansen/openeo-grassgis-driver
57b309819fdc456fba02cd1ab8fe6731ddfbb66a
[ "Apache-2.0" ]
7
2018-03-16T17:26:14.000Z
2022-03-09T08:19:10.000Z
src/openeo_grass_gis_driver/actinia_processing/reduce_time_process.py
marcjansen/openeo-grassgis-driver
57b309819fdc456fba02cd1ab8fe6731ddfbb66a
[ "Apache-2.0" ]
70
2018-03-09T11:28:12.000Z
2022-02-17T09:06:17.000Z
src/openeo_grass_gis_driver/actinia_processing/reduce_time_process.py
marcjansen/openeo-grassgis-driver
57b309819fdc456fba02cd1ab8fe6731ddfbb66a
[ "Apache-2.0" ]
13
2018-03-12T09:58:24.000Z
2022-02-23T10:40:11.000Z
# -*- coding: utf-8 -*- from random import randint import json from openeo_grass_gis_driver.models.process_graph_schemas import \ ProcessGraphNode, ProcessGraph from openeo_grass_gis_driver.actinia_processing.base import \ Node, check_node_parents, DataObject, GrassDataType, \ create_output_name from op...
30.682119
92
0.641917
from random import randint import json from openeo_grass_gis_driver.models.process_graph_schemas import \ ProcessGraphNode, ProcessGraph from openeo_grass_gis_driver.actinia_processing.base import \ Node, check_node_parents, DataObject, GrassDataType, \ create_output_name from openeo_grass_gis_driver.a...
true
true
1c29bde8a80ba0fa2a1d31c2f542755f7cac9242
1,510
py
Python
bot/convert_stablecoins.py
jnarowski/crypto-index-fund-bot
95c2ffeb8e05a46aa8cc0e74d8cfb1077a5ae1ca
[ "MIT" ]
null
null
null
bot/convert_stablecoins.py
jnarowski/crypto-index-fund-bot
95c2ffeb8e05a46aa8cc0e74d8cfb1077a5ae1ca
[ "MIT" ]
null
null
null
bot/convert_stablecoins.py
jnarowski/crypto-index-fund-bot
95c2ffeb8e05a46aa8cc0e74d8cfb1077a5ae1ca
[ "MIT" ]
null
null
null
import typing as t from . import exchanges from .data_types import CryptoBalance, SupportedExchanges from .user import User from .utils import log # convert all stablecoins of the purchasing currency into the purchasing currency so we can use it # in binance, you need to purchase in USD and cannot purchase most curr...
35.952381
138
0.731126
import typing as t from . import exchanges from .data_types import CryptoBalance, SupportedExchanges from .user import User from .utils import log def convert_stablecoins(user: User, exchange: SupportedExchanges, portfolio: t.List[CryptoBalance]) -> t.List[t.Dict]: purchasing_currency = user.purchasing_currenc...
true
true
1c29bf451ba9b5ddf7d5298169d60ea4e3492ee0
1,629
py
Python
Medium/1027.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
6
2017-09-25T18:05:50.000Z
2019-03-27T00:23:15.000Z
Medium/1027.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
1
2017-10-29T12:04:41.000Z
2018-08-16T18:00:37.000Z
Medium/1027.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
null
null
null
# ------------------------------ # 1027. Longest Arithmetic Sequence # # Description: # Given an array A of integers, return the length of the longest arithmetic subsequence in A. # Recall that a subsequence of A is a list A[i_1], A[i_2], ..., A[i_k] with 0 <= i_1 < i_2 < # ... < i_k <= A.length - 1, and that a sequ...
29.618182
134
0.578269
class Solution: def longestArithSeqLength(self, A: List[int]) -> int: dp = {} for i in range(len(A)): for j in range(i+1, len(A)): dp[j, A[j] - A[i]] = dp.get((i, A[j] - A[i]), 1) + 1 return max(dp.values()) ...
true
true
1c29bfb6e8eb003b61bb65b49ac464ce306171bb
25,020
py
Python
tests/test_response_parser.py
diabolical-ninja/smart-property-search
0931c7c8195ec21cbd56768c9c84cea2927a9e1d
[ "MIT" ]
5
2021-04-12T04:10:42.000Z
2021-04-28T05:54:22.000Z
tests/test_response_parser.py
diabolical-ninja/smart-property-search
0931c7c8195ec21cbd56768c9c84cea2927a9e1d
[ "MIT" ]
35
2020-05-26T14:21:37.000Z
2022-03-29T16:14:42.000Z
tests/test_response_parser.py
diabolical-ninja/smart-property-search
0931c7c8195ec21cbd56768c9c84cea2927a9e1d
[ "MIT" ]
2
2020-05-26T14:02:12.000Z
2022-01-10T08:19:49.000Z
"""Unit tests for src/response_parser.py.""" import os import sys import pytest sys.path.append(os.path.join(os.getcwd(), "src")) from response_parser import ( # noqa clean_domain, clean_response, clean_travel_info, clean_walkscore, ) sample_one = { "type": "PropertyListing", "listing":...
36.472303
303
0.464189
import os import sys import pytest sys.path.append(os.path.join(os.getcwd(), "src")) from response_parser import ( clean_domain, clean_response, clean_travel_info, clean_walkscore, ) sample_one = { "type": "PropertyListing", "listing": { "promo_level": None, "listing_ty...
true
true
1c29c067f1a9c6a0529e23342783af60c926028c
3,187
py
Python
ProblemSolving/Algorithms/Sorting/lilysHomework.py
ScottGarland/HackerRank
984610e00c3244ec59a1c922147e964699fe2ec4
[ "MIT" ]
null
null
null
ProblemSolving/Algorithms/Sorting/lilysHomework.py
ScottGarland/HackerRank
984610e00c3244ec59a1c922147e964699fe2ec4
[ "MIT" ]
null
null
null
ProblemSolving/Algorithms/Sorting/lilysHomework.py
ScottGarland/HackerRank
984610e00c3244ec59a1c922147e964699fe2ec4
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/lilys-homework/problem def swap_count(arr, ascend = True, descend = False): """ The function counts the minimum number of swaps needed. :param: arr is the input array given by HackerRank :param: ascend is a boolean value for sorting in ascending order :param...
41.934211
110
0.684029
def swap_count(arr, ascend = True, descend = False): arr = arr[:] ascend = ascend # boolean value to determine to do the algo in ascending sort order descend = descend # same as above but descending sort order reverse = None # direction for sorted() function error = None # we want to ke...
true
true
1c29c0755ff8d98da82a0a22b463fd7663943113
5,447
py
Python
surrogate/selection/selSPEA2.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
3
2021-01-06T03:01:18.000Z
2022-03-21T03:02:55.000Z
surrogate/selection/selSPEA2.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
null
null
null
surrogate/selection/selSPEA2.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Quan Pan # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
38.907143
89
0.568753
import math from .utils import randomizedSelect def selSPEA2(individuals, k): N = len(individuals) L = len(individuals[0].fitness.values) K = math.sqrt(N) strength_fits = [0] * N fits = [0] * N dominating_inds = [list() for i in xrange(N)] for i, ind_i in enumerate(indiv...
true
true
1c29c20717cc8e325f37e0064dfb224760b3f0b1
1,604
py
Python
datasets/UCY/students03/px2ground.py
fengzileee/OpenTraj
71fdfd1e3420d6a3859ae0acaa4acf85abbc1f64
[ "MIT" ]
232
2020-08-26T10:16:10.000Z
2022-03-26T08:39:44.000Z
datasets/UCY/students03/px2ground.py
fengzileee/OpenTraj
71fdfd1e3420d6a3859ae0acaa4acf85abbc1f64
[ "MIT" ]
15
2020-09-25T15:50:05.000Z
2022-03-28T19:06:07.000Z
datasets/UCY/students03/px2ground.py
fengzileee/OpenTraj
71fdfd1e3420d6a3859ae0acaa4acf85abbc1f64
[ "MIT" ]
63
2020-08-24T13:45:57.000Z
2022-03-26T08:39:52.000Z
import numpy as np def project(Hinv, loc): locHomogenous = np.hstack((loc, 1)) locHomogenous = np.dot(Hinv, locHomogenous) # to camera frame locXYZ = locHomogenous / locHomogenous[2] # to pixels (from millimeters) return locXYZ[:2] annot_file = './obsmat_px.txt' annot_file_out = './obsmat.txt' H_i...
24.676923
102
0.568579
import numpy as np def project(Hinv, loc): locHomogenous = np.hstack((loc, 1)) locHomogenous = np.dot(Hinv, locHomogenous) locXYZ = locHomogenous / locHomogenous[2] return locXYZ[:2] annot_file = './obsmat_px.txt' annot_file_out = './obsmat.txt' H_iw = np.loadtxt('./H.txt') in_file = open(annot...
true
true
1c29c2b9e130f60615c0116828a1834784565b3e
9,937
py
Python
gym_rock_paper_scissors/envs/rock_paper_scissors_env.py
kyuhyoung/gym-rock-paper-scissors
f527c9f0835193008f04575bca1b63a815c44c8a
[ "MIT" ]
5
2020-02-17T16:29:22.000Z
2022-01-24T15:42:49.000Z
gym_rock_paper_scissors/envs/rock_paper_scissors_env.py
kyuhyoung/gym-rock-paper-scissors
f527c9f0835193008f04575bca1b63a815c44c8a
[ "MIT" ]
1
2019-01-15T16:09:36.000Z
2019-01-15T16:09:36.000Z
gym_rock_paper_scissors/envs/rock_paper_scissors_env.py
kyuhyoung/gym-rock-paper-scissors
f527c9f0835193008f04575bca1b63a815c44c8a
[ "MIT" ]
3
2019-01-09T09:44:54.000Z
2021-09-06T01:04:25.000Z
from enum import Enum from copy import deepcopy import numpy as np import gym from gym.spaces import Discrete, Tuple from .one_hot_space import OneHotEncoding class Action(Enum): ROCK = 0 PAPER = 1 SCISSORS = 2 class RockPaperScissorsEnv(gym.Env): ''' Repeated game of Rock Paper scissor...
49.193069
131
0.686626
from enum import Enum from copy import deepcopy import numpy as np import gym from gym.spaces import Discrete, Tuple from .one_hot_space import OneHotEncoding class Action(Enum): ROCK = 0 PAPER = 1 SCISSORS = 2 class RockPaperScissorsEnv(gym.Env): def __init__(self, stacked_observations=3,...
true
true
1c29c33eda3db8f3f2f37eec0e4d8788db80d1a5
236
py
Python
Cursos-Extras/Python/ex011.py
talessantos49/Primeiros_Passos
7eac781fb3663c8cf71629611981d0ebd9f0216f
[ "MIT" ]
null
null
null
Cursos-Extras/Python/ex011.py
talessantos49/Primeiros_Passos
7eac781fb3663c8cf71629611981d0ebd9f0216f
[ "MIT" ]
null
null
null
Cursos-Extras/Python/ex011.py
talessantos49/Primeiros_Passos
7eac781fb3663c8cf71629611981d0ebd9f0216f
[ "MIT" ]
null
null
null
n1 = float(input('Qual a altura da parede? ')) n2 = float(input('Qual a largura da parede? ')) n3 = n1 * n2 n4 = n3/2 print('A area da parede é {:.2f}m², será necessario {:.2f} litros de tinta para pinta-lá por completo'.format(n3, n4))
47.2
118
0.669492
n1 = float(input('Qual a altura da parede? ')) n2 = float(input('Qual a largura da parede? ')) n3 = n1 * n2 n4 = n3/2 print('A area da parede é {:.2f}m², será necessario {:.2f} litros de tinta para pinta-lá por completo'.format(n3, n4))
true
true
1c29c43a83be06fa143e5584bca7154d4b9b09f9
11,202
py
Python
synapse/handlers/appservice.py
TheJJ/synapse
1032393dfb0c865fc540539dfe649e7b1a32037a
[ "Apache-2.0" ]
null
null
null
synapse/handlers/appservice.py
TheJJ/synapse
1032393dfb0c865fc540539dfe649e7b1a32037a
[ "Apache-2.0" ]
null
null
null
synapse/handlers/appservice.py
TheJJ/synapse
1032393dfb0c865fc540539dfe649e7b1a32037a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.789137
89
0.593823
from twisted.internet import defer from six import itervalues import synapse from synapse.api.constants import EventTypes from synapse.util.metrics import Measure from synapse.util.logcontext import ( make_deferred_yieldable, run_in_background, ) from prometheus_client import Counter import loggin...
true
true
1c29c44870318b430c48fec56eae577e9da1e6d0
3,329
py
Python
photomanip/tests/test_grouper.py
whlteXbread/photoManip
623b1ca99dd2bde4082717d51e0f02a239b4f4ff
[ "MIT" ]
5
2017-01-19T23:14:58.000Z
2020-03-31T14:10:07.000Z
photomanip/tests/test_grouper.py
whlteXbread/photoManip
623b1ca99dd2bde4082717d51e0f02a239b4f4ff
[ "MIT" ]
12
2019-11-03T20:07:57.000Z
2020-09-11T00:09:32.000Z
photomanip/tests/test_grouper.py
whlteXbread/photoManip
623b1ca99dd2bde4082717d51e0f02a239b4f4ff
[ "MIT" ]
null
null
null
from nose import tools from photomanip import PAD, CROP from photomanip.grouper import FileSystemGrouper class TestFileSystemGrouper: @classmethod def setup_class(cls): cls.fs_grouper_tag = FileSystemGrouper( 'photomanip/tests/', 'faceit365:date=' ) cls.fs_grou...
35.042105
71
0.632923
from nose import tools from photomanip import PAD, CROP from photomanip.grouper import FileSystemGrouper class TestFileSystemGrouper: @classmethod def setup_class(cls): cls.fs_grouper_tag = FileSystemGrouper( 'photomanip/tests/', 'faceit365:date=' ) cls.fs_grou...
true
true
1c29c456058b64daf81535b24186642985b724b3
164
py
Python
math/signal.py
CospanDesign/python
9f911509aae7abd9237c14a4635294c7719c9129
[ "MIT" ]
5
2015-12-12T20:16:45.000Z
2020-02-21T19:50:31.000Z
math/signal.py
CospanDesign/python
9f911509aae7abd9237c14a4635294c7719c9129
[ "MIT" ]
null
null
null
math/signal.py
CospanDesign/python
9f911509aae7abd9237c14a4635294c7719c9129
[ "MIT" ]
2
2020-06-01T06:27:06.000Z
2022-03-10T13:21:03.000Z
class Signal(object): def __init__(self): self.V = 0 self.I = 0 self.RIMP = 0 self.JIMP = 0 def step(self): pass
13.666667
23
0.469512
class Signal(object): def __init__(self): self.V = 0 self.I = 0 self.RIMP = 0 self.JIMP = 0 def step(self): pass
true
true
1c29c4b0a43fa9e772e2e95c344af1a042fa9376
7,521
py
Python
core/slack.py
nqb/Osmedeus
cb14c98d823a3bb13bd266aacc3d01b957c360dc
[ "MIT" ]
2
2019-05-19T18:05:10.000Z
2019-06-15T10:19:54.000Z
core/slack.py
nhanledinh/Osmedeus
6e9c259774abb672ef2ffa5770b865880623af54
[ "MIT" ]
null
null
null
core/slack.py
nhanledinh/Osmedeus
6e9c259774abb672ef2ffa5770b865880623af54
[ "MIT" ]
1
2019-05-19T18:05:24.000Z
2019-05-19T18:05:24.000Z
''' Sending message to Slack ''' import os import requests import json import time import random ###Slack printing def slack_seperate(options): if options['BOT_TOKEN'] == "None": return mess = { 'title': "Just Seperated stuff", 'color': "#44475A", 'image_url': get_emoji(), ...
30.084
184
0.570004
import os import requests import json import time import random if options['BOT_TOKEN'] == "None": return mess = { 'title': "Just Seperated stuff", 'color': "#44475A", 'image_url': get_emoji(), 'icon': get_emoji(), } sm = Messages(options) mess['channel'] = ...
true
true
1c29c551aac3871c2d69970512e9b2d4594c5190
7,465
py
Python
tests/test_cookies.py
myuz/sanic
58e15134fdc934ff423a0c710dad76d45368d493
[ "MIT" ]
2
2021-02-20T12:22:10.000Z
2021-02-20T12:26:15.000Z
tests/test_cookies.py
myuz/sanic
58e15134fdc934ff423a0c710dad76d45368d493
[ "MIT" ]
11
2021-07-10T17:14:47.000Z
2022-02-24T07:32:36.000Z
tests/test_cookies.py
myuz/sanic
58e15134fdc934ff423a0c710dad76d45368d493
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta from http.cookies import SimpleCookie import pytest from sanic.cookies import Cookie from sanic.response import text # ------------------------------------------------------------ # # GET # ------------------------------------------------------------ # def test_cookies(ap...
31.23431
79
0.634293
from datetime import datetime, timedelta from http.cookies import SimpleCookie import pytest from sanic.cookies import Cookie from sanic.response import text def test_cookies(app): @app.route("/") def handler(request): cookie_value = request.cookies["test"] response = text(f"Cookies are: ...
true
true
1c29c5b93b3e1d6d3bf48ff2e83761b8f2908c93
3,952
py
Python
src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_oauth.py
chef-davin/azure-cli
2ebd33d5f69a27d07404cc48cf475d5fbdda6378
[ "MIT" ]
1
2020-07-02T23:41:03.000Z
2020-07-02T23:41:03.000Z
src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_oauth.py
cindywu/azure-cli
bd011cb91ac6e0ac89f53e1105d76ea30b6609a0
[ "MIT" ]
1
2021-06-02T04:24:22.000Z
2021-06-02T04:24:22.000Z
src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_oauth.py
cindywu/azure-cli
bd011cb91ac6e0ac89f53e1105d76ea30b6609a0
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
51.324675
119
0.615891
import os from azure.cli.testsdk import (ScenarioTest, JMESPathCheck, ResourceGroupPreparer, StorageAccountPreparer, api_version_constraint, record_only) from azure_devtools.scenario_tests import AllowLargeResponse from azure.cli.core.profiles import ResourceType from ..storage_test_u...
true
true
1c29c63e818ca4004aecee8d5f3c7797ecf5612e
3,816
py
Python
airbyte-integrations/connectors/source-posthog/source_posthog/source.py
dsdorazio/airbyte
078c6604a499c5ab68beb403d80b3068e6bef4ab
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-posthog/source_posthog/source.py
dsdorazio/airbyte
078c6604a499c5ab68beb403d80b3068e6bef4ab
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-posthog/source_posthog/source.py
dsdorazio/airbyte
078c6604a499c5ab68beb403d80b3068e6bef4ab
[ "MIT" ]
null
null
null
# # MIT License # # Copyright (c) 2020 Airbyte # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
42.4
118
0.718291
from typing import Any, List, Mapping, Tuple import pendulum import requests from airbyte_cdk.logger import AirbyteLogger from airbyte_cdk.models import SyncMode from airbyte_cdk.sources import AbstractSource from airbyte_cdk.sources.streams import Stream from airbyte_cdk.sources.streams.http.a...
true
true
1c29c6717099eef5374f68ca8190022df79ffc51
4,574
py
Python
Footy/UnsupportedBantzStrings.py
schleising/banter-bot
3e51453ae993d2c26dc51464a3cef3875a6be3c9
[ "Apache-2.0" ]
null
null
null
Footy/UnsupportedBantzStrings.py
schleising/banter-bot
3e51453ae993d2c26dc51464a3cef3875a6be3c9
[ "Apache-2.0" ]
2
2022-03-27T10:44:38.000Z
2022-03-28T19:24:39.000Z
Footy/UnsupportedBantzStrings.py
schleising/banter-bot
3e51453ae993d2c26dc51464a3cef3875a6be3c9
[ "Apache-2.0" ]
1
2022-03-28T11:45:47.000Z
2022-03-28T11:45:47.000Z
# {team} -> Name of team # {name} -> Name of person who supports team teamMatchStarted: list[str] = [ "{team} are shit", "{team} cunts", "Dirty {team}", "Dirty {team}, dirty {name}", ] drawing: list[str] = [ "{team} level, this is a shit match", "Boring old {team}", "Happy with how it's go...
34.390977
131
0.622868
teamMatchStarted: list[str] = [ "{team} are shit", "{team} cunts", "Dirty {team}", "Dirty {team}, dirty {name}", ] drawing: list[str] = [ "{team} level, this is a shit match", "Boring old {team}", "Happy with how it's going, {name}?", "Yawn...", "{team} wankers", "How can you...
true
true
1c29c682ec78eb50512307eb0d02b343ed275476
42,006
py
Python
wo/cli/plugins/debug.py
vctocloud/WordOps
ad9505482a380d3433c642dad4e2cdb64bf4ca7e
[ "MIT" ]
1
2019-07-13T10:25:15.000Z
2019-07-13T10:25:15.000Z
wo/cli/plugins/debug.py
umahmadx/WordOps
f7360687f379bdd711c51b746dfa358317a880bd
[ "MIT" ]
null
null
null
wo/cli/plugins/debug.py
umahmadx/WordOps
f7360687f379bdd711c51b746dfa358317a880bd
[ "MIT" ]
null
null
null
"""Debug Plugin for WordOps""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from wo.core.aptget import WOAptGet from wo.core.shellexec import * from wo.core.mysql import WOMysql from wo.core.services import WOService from wo.core.logging import Log from wo.cli.p...
49.418824
89
0.45284
from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from wo.core.aptget import WOAptGet from wo.core.shellexec import * from wo.core.mysql import WOMysql from wo.core.services import WOService from wo.core.logging import Log from wo.cli.plugins.site_functions import lo...
true
true
1c29c7924f8339173debbb5b7aa90f9fd84d5e44
143
py
Python
odp_sdk/utils/__init__.py
C4IROcean/odp-sdk-python
3ae4cc565dd6d7be75b3bc5df09371f75b47dd0d
[ "Apache-2.0" ]
6
2020-09-29T14:35:03.000Z
2021-06-02T07:33:15.000Z
odp_sdk/utils/__init__.py
C4IROcean/odp-sdk-python
3ae4cc565dd6d7be75b3bc5df09371f75b47dd0d
[ "Apache-2.0" ]
2
2020-11-13T12:24:57.000Z
2021-01-25T12:00:50.000Z
odp_sdk/utils/__init__.py
C4IROcean/odp-sdk-python
3ae4cc565dd6d7be75b3bc5df09371f75b47dd0d
[ "Apache-2.0" ]
1
2020-12-05T12:15:44.000Z
2020-12-05T12:15:44.000Z
from .odp_geo import ( index_to_gcs, index_to_grid, gcs_to_index, gcs_to_grid, grid_rect_members, index_rect_members )
15.888889
22
0.699301
from .odp_geo import ( index_to_gcs, index_to_grid, gcs_to_index, gcs_to_grid, grid_rect_members, index_rect_members )
true
true
1c29ca416750bfa0887471e15d0a098f40a35f97
17,015
py
Python
src/cc_catalog_airflow/dags/provider_api_scripts/test_flickr.py
AyanChoudhary/cccatalog
ca2b247fffc0f38ec6b73574f963dd94a9505c86
[ "MIT" ]
1
2020-05-16T01:56:40.000Z
2020-05-16T01:56:40.000Z
src/cc_catalog_airflow/dags/provider_api_scripts/test_flickr.py
AyanChoudhary/cccatalog
ca2b247fffc0f38ec6b73574f963dd94a9505c86
[ "MIT" ]
null
null
null
src/cc_catalog_airflow/dags/provider_api_scripts/test_flickr.py
AyanChoudhary/cccatalog
ca2b247fffc0f38ec6b73574f963dd94a9505c86
[ "MIT" ]
null
null
null
import json import logging import os import requests from unittest.mock import patch, MagicMock import flickr RESOURCES = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'tests/resources/flickr' ) logging.basicConfig( format='%(asctime)s - %(name)s - %(levelname)s: %(message)s', level=logging....
33.038835
142
0.681693
import json import logging import os import requests from unittest.mock import patch, MagicMock import flickr RESOURCES = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'tests/resources/flickr' ) logging.basicConfig( format='%(asctime)s - %(name)s - %(levelname)s: %(message)s', level=logging....
true
true
1c29cb0137a8731e7e6fafdfdad716c65b8a86b4
94
py
Python
apps/account/apps.py
martinlehoux/django_bike
05373d2649647fe8ebadb0aad54b9a7ec1900fe7
[ "MIT" ]
1
2020-08-12T17:53:37.000Z
2020-08-12T17:53:37.000Z
apps/account/apps.py
martinlehoux/django_bike
05373d2649647fe8ebadb0aad54b9a7ec1900fe7
[ "MIT" ]
12
2020-07-03T03:52:00.000Z
2021-09-22T18:00:44.000Z
apps/account/apps.py
martinlehoux/django_bike
05373d2649647fe8ebadb0aad54b9a7ec1900fe7
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AccountConfig(AppConfig): name = "apps.account"
15.666667
33
0.755319
from django.apps import AppConfig class AccountConfig(AppConfig): name = "apps.account"
true
true
1c29cb6db043ab8c970992f064b7c218cd51b81f
2,111
py
Python
examples/python/mg811.py
moredu/upm
d6f76ff8c231417666594214679c49399513112e
[ "MIT" ]
619
2015-01-14T23:50:18.000Z
2019-11-08T14:04:33.000Z
examples/python/mg811.py
moredu/upm
d6f76ff8c231417666594214679c49399513112e
[ "MIT" ]
576
2015-01-02T09:55:14.000Z
2019-11-12T15:31:10.000Z
examples/python/mg811.py
moredu/upm
d6f76ff8c231417666594214679c49399513112e
[ "MIT" ]
494
2015-01-14T18:33:56.000Z
2019-11-07T10:08:15.000Z
#!/usr/bin/env python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2015 Intel Corporation. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # witho...
37.035088
82
0.730933
from __future__ import print_function import time, sys, signal, atexit from upm import pyupm_mg811 as sensorObj def main(): sensor = sensorObj.MG811(0, 2, 5.0) andler(signum, frame): raise SystemExit def exitHandler(): print("Exiting") sys.ex...
true
true
1c29cb9cb876e935c9d4169b91a8667fd6acd458
502
py
Python
crudbuilder/signals.py
xlfds/django-crudbuilder
dd491ae4802a54802d41e62444fa8fab93be1670
[ "Apache-2.0" ]
1
2016-08-09T09:16:22.000Z
2016-08-09T09:16:22.000Z
crudbuilder/signals.py
xlfds/django-crudbuilder
dd491ae4802a54802d41e62444fa8fab93be1670
[ "Apache-2.0" ]
null
null
null
crudbuilder/signals.py
xlfds/django-crudbuilder
dd491ae4802a54802d41e62444fa8fab93be1670
[ "Apache-2.0" ]
1
2021-07-27T07:21:42.000Z
2021-07-27T07:21:42.000Z
from django.dispatch import Signal # post save signals for single model instance post_create_signal = Signal() post_update_signal = Signal() # post save signals for inline formset post_inline_create_signal = Signal() post_inline_update_signal = Signal() crudbuilder_signals = { 'inlineformset': { 'create...
22.818182
45
0.713147
from django.dispatch import Signal post_create_signal = Signal() post_update_signal = Signal() post_inline_create_signal = Signal() post_inline_update_signal = Signal() crudbuilder_signals = { 'inlineformset': { 'create': post_inline_create_signal, 'update': post_inline_update_signal }, ...
true
true
1c29cbbc4dde67e11d4b5769628b985d63d87dfd
3,012
py
Python
moodle/__main__.py
4ndu-7h4k/MoodleAutoAttedence
f4e7540a484511d3d310e37cc180d277f31caf83
[ "MIT" ]
null
null
null
moodle/__main__.py
4ndu-7h4k/MoodleAutoAttedence
f4e7540a484511d3d310e37cc180d277f31caf83
[ "MIT" ]
null
null
null
moodle/__main__.py
4ndu-7h4k/MoodleAutoAttedence
f4e7540a484511d3d310e37cc180d277f31caf83
[ "MIT" ]
1
2021-11-24T13:50:51.000Z
2021-11-24T13:50:51.000Z
from moodle import log, ENDC, GREEN, WARNING, START_TIME, END_TIME, CYAN, RED from urllib.parse import urlparse, parse_qs from moodle.attendence import attendence from moodle.telegrambot import send from bs4 import BeautifulSoup from datetime import datetime from pytz import timezone import schedule, time import reques...
35.023256
95
0.515936
from moodle import log, ENDC, GREEN, WARNING, START_TIME, END_TIME, CYAN, RED from urllib.parse import urlparse, parse_qs from moodle.attendence import attendence from moodle.telegrambot import send from bs4 import BeautifulSoup from datetime import datetime from pytz import timezone import schedule, time import reques...
true
true
1c29cbf9975872cf0d5d6f186c2c777243f439eb
76
py
Python
ocd_backend/utils/__init__.py
ngi-nix/poliscoops
491d12f83a44afbb4f1ee525b29ae70dc564e0f7
[ "CC-BY-4.0" ]
13
2015-02-27T01:46:31.000Z
2021-12-27T18:08:31.000Z
ocd_backend/utils/__init__.py
ngi-nix/poliscoops
491d12f83a44afbb4f1ee525b29ae70dc564e0f7
[ "CC-BY-4.0" ]
68
2015-01-05T15:15:30.000Z
2022-03-11T23:13:05.000Z
ocd_backend/utils/__init__.py
acidburn0zzz/open-cultuur-data
59af74f2fcb97b53f250518f46882d8ec7613ec3
[ "CC-BY-4.0" ]
10
2015-01-09T14:01:07.000Z
2018-04-13T14:27:07.000Z
from .misc import DatetimeJSONEncoder json_encoder = DatetimeJSONEncoder()
19
37
0.842105
from .misc import DatetimeJSONEncoder json_encoder = DatetimeJSONEncoder()
true
true
1c29cc050060e69bd463c907f44d8118d9a948d1
8,612
py
Python
docs/source/topics/transport_template.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
1
2016-09-12T10:51:00.000Z
2016-09-12T10:51:00.000Z
docs/source/topics/transport_template.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
17
2020-03-11T17:04:05.000Z
2020-05-01T09:34:45.000Z
docs/source/topics/transport_template.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from aiida.transports import Transport class NewTransport(Transport): def __init__(self, machine, **kwargs): """Initialize the Transport class. :param machine: the machine to connect to """ def __enter__(self): """Open the connection.""" def __ex...
35.295082
120
0.645611
from aiida.transports import Transport class NewTransport(Transport): def __init__(self, machine, **kwargs): def __enter__(self): def __exit__(self, type, value, traceback): def chdir(self, path): def chmod(self, path, mode): def copy(self, remotesource, remotedestination, *args, **kwar...
true
true
1c29cc55824b1e78335f2a4cee35358a5f4ad53f
3,847
py
Python
djangox/lib/python3.8/site-packages/oauthlib/openid/connect/core/endpoints/userinfo.py
DemarcusL/django_wiki_lab
3b7cf18af7e0f89c94d10eb953ca018a150a2f55
[ "MIT" ]
954
2018-01-27T11:00:51.000Z
2022-03-31T16:04:42.000Z
djangox/lib/python3.8/site-packages/oauthlib/openid/connect/core/endpoints/userinfo.py
DemarcusL/django_wiki_lab
3b7cf18af7e0f89c94d10eb953ca018a150a2f55
[ "MIT" ]
274
2018-01-27T08:36:01.000Z
2022-03-22T04:40:40.000Z
djangox/lib/python3.8/site-packages/oauthlib/openid/connect/core/endpoints/userinfo.py
DemarcusL/django_wiki_lab
3b7cf18af7e0f89c94d10eb953ca018a150a2f55
[ "MIT" ]
191
2018-02-15T12:12:45.000Z
2022-03-31T22:38:13.000Z
""" oauthlib.openid.connect.core.endpoints.userinfo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of userinfo endpoint. """ import json import logging from oauthlib.common import Request from oauthlib.oauth2.rfc6749 import errors from oauthlib.oauth2.rfc6749.endpoints.base imp...
38.47
88
0.660515
import json import logging from oauthlib.common import Request from oauthlib.oauth2.rfc6749 import errors from oauthlib.oauth2.rfc6749.endpoints.base import ( BaseEndpoint, catch_errors_and_unavailability, ) from oauthlib.oauth2.rfc6749.tokens import BearerToken log = logging.getLogger(__name__) class UserInfoE...
true
true
1c29cc733fccc1516fe57357e8090152e8143c32
2,321
py
Python
ins/ins_registry/ins_registry.py
PhyrexTsai/ins
ad136424a372a3671ab8aa8004c915c26aa6e3d2
[ "MIT" ]
null
null
null
ins/ins_registry/ins_registry.py
PhyrexTsai/ins
ad136424a372a3671ab8aa8004c915c26aa6e3d2
[ "MIT" ]
null
null
null
ins/ins_registry/ins_registry.py
PhyrexTsai/ins
ad136424a372a3671ab8aa8004c915c26aa6e3d2
[ "MIT" ]
null
null
null
from iconservice import * import re class INSRegistry(IconScoreBase): __HOLDER = 'holder' __RESOLVER = 'resolver' __TTL = 'ttl' @eventlog(indexed=2) def Transfer(self, node: str, holder: Address): pass @eventlog(indexed=3) def NewHolder(self, node: str, label: str, holder: Address): pass...
31.364865
83
0.617837
from iconservice import * import re class INSRegistry(IconScoreBase): __HOLDER = 'holder' __RESOLVER = 'resolver' __TTL = 'ttl' @eventlog(indexed=2) def Transfer(self, node: str, holder: Address): pass @eventlog(indexed=3) def NewHolder(self, node: str, label: str, holder: Address): pass...
true
true
1c29cd725d84cf362de4c0b82dab4a78ea1506c5
128
py
Python
bench/fibrec.py
codr7/alisp
05ac47ab2c28683373af4ec80e5a94937390fa6c
[ "MIT" ]
8
2021-09-04T10:18:49.000Z
2022-01-10T01:05:13.000Z
bench/fibrec.py
codr7/alisp
05ac47ab2c28683373af4ec80e5a94937390fa6c
[ "MIT" ]
null
null
null
bench/fibrec.py
codr7/alisp
05ac47ab2c28683373af4ec80e5a94937390fa6c
[ "MIT" ]
2
2021-10-05T11:00:14.000Z
2021-10-11T05:54:59.000Z
from bench import bench print(bench(100, ''' def fib(n): return n if n < 2 else fib(n-1) + fib(n-2) ''', ''' fib(20) '''))
14.222222
44
0.546875
from bench import bench print(bench(100, ''' def fib(n): return n if n < 2 else fib(n-1) + fib(n-2) ''', ''' fib(20) '''))
true
true
1c29ce13bd5f5fe3f449da09a2d8e60e2ac65c3c
955
py
Python
scripts/vt-uploader.py
forkd/corsair
c854aed4b8b7f5d4b29610fc2b65881db6a0fb8f
[ "MIT" ]
7
2019-05-01T00:04:02.000Z
2019-10-04T18:22:59.000Z
scripts/vt-uploader.py
lopes/corsair
c854aed4b8b7f5d4b29610fc2b65881db6a0fb8f
[ "MIT" ]
null
null
null
scripts/vt-uploader.py
lopes/corsair
c854aed4b8b7f5d4b29610fc2b65881db6a0fb8f
[ "MIT" ]
3
2019-05-04T04:05:15.000Z
2020-01-20T17:29:30.000Z
#!/usr/bin/env python3 # This script uploads large files (between 32 and 200 MB) to # VirusTotal for further analysis. # # Usage: # $ python vt-uploader.py file # # Author: José Lopes # License: MIT ## from sys import argv from pprint import pprint from time import sleep from requests import post from corsair.chron...
25.131579
72
0.640838
from sys import argv from pprint import pprint from time import sleep from requests import post from corsair.chronicle.virustotal import Api vt_apikey = '' vt_apiurl = 'https://www.virustotal.com/vtapi/v2' wait_time = 20 if __name__ == '__main__': with open(argv[1], 'rb') as f: vt = Api(vt...
true
true
1c29cf17a0b38fd8f1018095f77aa016cfbf9f8d
2,993
py
Python
ocs_ci/ocs/defaults.py
annagitel/ocs-ci
284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5
[ "MIT" ]
130
2019-04-08T06:22:53.000Z
2022-03-23T06:11:19.000Z
ocs_ci/ocs/defaults.py
annagitel/ocs-ci
284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5
[ "MIT" ]
4,359
2019-04-09T18:48:47.000Z
2022-03-31T20:04:55.000Z
ocs_ci/ocs/defaults.py
annagitel/ocs-ci
284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5
[ "MIT" ]
183
2019-04-18T15:55:30.000Z
2022-03-11T06:16:50.000Z
""" Defaults module. All the defaults used by OSCCI framework should reside in this module. PYTEST_DONT_REWRITE - avoid pytest to rewrite, keep this msg here please! """ import os from ocs_ci.ocs import constants STORAGE_API_VERSION = "storage.k8s.io/v1" ROOK_API_VERSION = "ceph.rook.io/v1" OCP_API_VERSION = "project...
32.182796
78
0.748079
import os from ocs_ci.ocs import constants STORAGE_API_VERSION = "storage.k8s.io/v1" ROOK_API_VERSION = "ceph.rook.io/v1" OCP_API_VERSION = "project.openshift.io/v1" OPENSHIFT_REST_CLIENT_API_VERSION = "v1" INSTALLER_VERSION = "4.1.4" CLIENT_VERSION = INSTALLER_VERSION SRE_BUILD_TEST_NAMESPACE = "openshift-build-...
true
true
1c29cf8e9b80c135888c6593eb4898178ca30abe
7,501
py
Python
frontend/main.py
maxbbraun/wittgenstein
1692a5cb71682565f8d2fb723267f7d087868b43
[ "MIT" ]
13
2022-01-07T20:58:05.000Z
2022-03-23T12:26:08.000Z
frontend/main.py
maxbbraun/wittgenstein
1692a5cb71682565f8d2fb723267f7d087868b43
[ "MIT" ]
null
null
null
frontend/main.py
maxbbraun/wittgenstein
1692a5cb71682565f8d2fb723267f7d087868b43
[ "MIT" ]
2
2022-01-18T16:23:09.000Z
2022-01-29T15:46:44.000Z
from flask import abort from flask import Flask from flask import make_response from flask import render_template from flask import redirect from flask import request from flask import send_from_directory from flask import url_for from flask_minify import decorators from flask_minify import minify from google.cloud imp...
29.648221
79
0.669377
from flask import abort from flask import Flask from flask import make_response from flask import render_template from flask import redirect from flask import request from flask import send_from_directory from flask import url_for from flask_minify import decorators from flask_minify import minify from google.cloud imp...
true
true
1c29d1295a6fabc485ea50dae5674b306f8ace57
2,122
py
Python
nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
2
2018-04-17T19:18:16.000Z
2020-03-04T22:05:02.000Z
nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py
oesteban/nipype
c14f24eba1da08711bbb894e049ee858ed740096
[ "Apache-2.0" ]
null
null
null
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..registration import RigidRegistration def test_RigidRegistration_inputs(): input_map = dict( FixedImageFileName=dict( argstr='%s', extensions=None, position=-2, ...
32.646154
74
0.581998
from __future__ import unicode_literals from ..registration import RigidRegistration def test_RigidRegistration_inputs(): input_map = dict( FixedImageFileName=dict( argstr='%s', extensions=None, position=-2, ), MovingImageFileName=dict( args...
true
true
1c29d378befbbe49ed621160d6b3b6a0d5914c55
79,394
py
Python
test/unit/obj/test_ssync.py
aguirguis/swift
2aaeab6f5ddfdbcd75eeee970287f08f19de19ef
[ "Apache-2.0" ]
null
null
null
test/unit/obj/test_ssync.py
aguirguis/swift
2aaeab6f5ddfdbcd75eeee970287f08f19de19ef
[ "Apache-2.0" ]
null
null
null
test/unit/obj/test_ssync.py
aguirguis/swift
2aaeab6f5ddfdbcd75eeee970287f08f19de19ef
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013 - 2015 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
44.107778
79
0.598761
from collections import defaultdict import mock import os import time import unittest import eventlet import itertools from six.moves import urllib from swift.common.exceptions import DiskFileNotExist, DiskFileError, \ DiskFileDeleted, DiskFileExpired from swift.common import swob from swift.common...
true
true
1c29d3c04019fed305b8e87c17d900df837321f3
13,924
py
Python
tests/test_api.py
para2x/sciann
510a632f01a1db593e9c38338561c08826adcb34
[ "MIT" ]
139
2019-07-20T20:04:19.000Z
2022-03-20T16:01:34.000Z
tests/test_api.py
para2x/sciann
510a632f01a1db593e9c38338561c08826adcb34
[ "MIT" ]
34
2019-08-14T20:12:59.000Z
2022-02-10T06:05:34.000Z
tests/test_api.py
para2x/sciann
510a632f01a1db593e9c38338561c08826adcb34
[ "MIT" ]
67
2019-11-07T02:38:04.000Z
2022-03-29T13:08:45.000Z
import pytest import sciann as sn import json import os import shutil from tensorflow.keras import optimizers as tf_optimizers import numpy as np @pytest.fixture(scope="module") def variable_x(): return sn.Variable('x') @pytest.fixture(scope="module") def variable_y(): return sn.Variable('y') @pytest.fix...
35.250633
194
0.686225
import pytest import sciann as sn import json import os import shutil from tensorflow.keras import optimizers as tf_optimizers import numpy as np @pytest.fixture(scope="module") def variable_x(): return sn.Variable('x') @pytest.fixture(scope="module") def variable_y(): return sn.Variable('y') @pytest.fix...
true
true
1c29d7fbc6a66431f3ee7919138841046964a09a
444
py
Python
example/market/get_symbol_price_ticker.py
marioanloru/Binance_Futures_python
948b86e0531c6d3584392be031fdcfb528fe1a6b
[ "MIT" ]
1
2021-08-11T14:05:47.000Z
2021-08-11T14:05:47.000Z
example/market/get_symbol_price_ticker.py
marioanloru/Binance_Futures_python
948b86e0531c6d3584392be031fdcfb528fe1a6b
[ "MIT" ]
null
null
null
example/market/get_symbol_price_ticker.py
marioanloru/Binance_Futures_python
948b86e0531c6d3584392be031fdcfb528fe1a6b
[ "MIT" ]
null
null
null
from binance_f import RequestClient from binance_f.constant.test import * from binance_f.base.printobject import * request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key) result = request_client.get_symbol_price_ticker() # result = request_client.get_symbol_price_ticker(symbol="BTCUSDT") ...
34.153846
75
0.702703
from binance_f import RequestClient from binance_f.constant.test import * from binance_f.base.printobject import * request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key) result = request_client.get_symbol_price_ticker()
true
true
1c29d8737027e28746c2d8146c52b9e7c7287b47
321
py
Python
ext/ply/test/lex_rule2.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
9,724
2015-01-01T02:06:30.000Z
2019-01-17T15:13:51.000Z
ext/ply/test/lex_rule2.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
7,584
2019-01-17T22:58:27.000Z
2022-03-31T23:10:22.000Z
ext/ply/test/lex_rule2.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# lex_rule2.py # # Rule function with incorrect number of arguments import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = [ "PLUS", "MINUS", "NUMBER", ] t_PLUS = r'\+' t_MINUS = r'-' def t_NUMBER(): r'\d+' return t def t_error(t): pass lex.lex() ...
10.7
50
0.573209
import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = [ "PLUS", "MINUS", "NUMBER", ] t_PLUS = r'\+' t_MINUS = r'-' def t_NUMBER(): return t def t_error(t): pass lex.lex()
true
true
1c29d91db5f4dc5d978ddcd1c9d48c5de15ab7a8
761
py
Python
ex73 futebol.py
joaoschweikart/python_projects
a30361551ec71ac3bef6d38e4b6ffc7bad21f1cc
[ "MIT" ]
null
null
null
ex73 futebol.py
joaoschweikart/python_projects
a30361551ec71ac3bef6d38e4b6ffc7bad21f1cc
[ "MIT" ]
null
null
null
ex73 futebol.py
joaoschweikart/python_projects
a30361551ec71ac3bef6d38e4b6ffc7bad21f1cc
[ "MIT" ]
null
null
null
brasileirao = ('Palmeiras', 'Flamengo', 'Internacional', 'Grêmio', 'São Paulo', 'Atlético Mineiro', 'Atlético-PR', 'Cruzeiro', 'Botafogo', 'Santos', 'Bahia', 'Corinthians', 'Fluminense', 'Ceará', 'Vasco da Gama', 'Sport Recife', 'América-MG', 'Chapecoense', 'Vitória', 'Paraná') print('=-'...
38.05
106
0.655716
brasileirao = ('Palmeiras', 'Flamengo', 'Internacional', 'Grêmio', 'São Paulo', 'Atlético Mineiro', 'Atlético-PR', 'Cruzeiro', 'Botafogo', 'Santos', 'Bahia', 'Corinthians', 'Fluminense', 'Ceará', 'Vasco da Gama', 'Sport Recife', 'América-MG', 'Chapecoense', 'Vitória', 'Paraná') print('=-'...
true
true
1c29d9f4547ec84c3af0358bf0e673655c3f4a1c
2,364
py
Python
simpleGames/TicTacToe.py
solothinker/Python-Xperiments
13d4e7bf8a0ce3eec22537d71eb9e27dc1f4c4ef
[ "MIT" ]
null
null
null
simpleGames/TicTacToe.py
solothinker/Python-Xperiments
13d4e7bf8a0ce3eec22537d71eb9e27dc1f4c4ef
[ "MIT" ]
null
null
null
simpleGames/TicTacToe.py
solothinker/Python-Xperiments
13d4e7bf8a0ce3eec22537d71eb9e27dc1f4c4ef
[ "MIT" ]
null
null
null
#tic-tac-toe import numpy as np count = 0 def selectPlayer(): firstPlayer = input('Select between x or o:') if firstPlayer != "x" and firstPlayer != "o": print("Pleae select the right symbol") firstPlayer = selectPlayer() return firstPlayer def printTic(tic): for ii in tic: te...
25.148936
169
0.445008
import numpy as np count = 0 def selectPlayer(): firstPlayer = input('Select between x or o:') if firstPlayer != "x" and firstPlayer != "o": print("Pleae select the right symbol") firstPlayer = selectPlayer() return firstPlayer def printTic(tic): for ii in tic: temp = '|' ...
true
true
1c29da3248228fe559d109409f0549b1bff16f9a
991
py
Python
manos-files/Section #1 - Basics/draw.py
manos-mark/opencv-course
470f7572effacbfb999cbb8df802e388d59ce958
[ "MIT" ]
null
null
null
manos-files/Section #1 - Basics/draw.py
manos-mark/opencv-course
470f7572effacbfb999cbb8df802e388d59ce958
[ "MIT" ]
null
null
null
manos-files/Section #1 - Basics/draw.py
manos-mark/opencv-course
470f7572effacbfb999cbb8df802e388d59ce958
[ "MIT" ]
null
null
null
import cv2 as cv import numpy as np blank = np.zeros((500, 500, 3), dtype='uint8') cv.imshow('Blank', blank) # img = cv.imread('Resources/Photos/cat.jpg') # cv.imshow('Cat', img) """ 1. Paint the image a certain colour """ # blank[200:300, 300:400] = 0,255,0 # cv.imshow('Green', blank) """ 2. Draw a Rectangle """ #...
30.030303
96
0.628658
import cv2 as cv import numpy as np blank = np.zeros((500, 500, 3), dtype='uint8') cv.imshow('Blank', blank) cv.rectangle(blank, (0,0), (blank.shape[1]//2, blank.shape[0]//2), (0,255,0), thickness=-1) cv.circle(blank, (250,250), 40, (0,0,255), thickness=3) cv.line(blank, (0,0), (blank.shape[1]//2, blank....
true
true
1c29da4a53d552fac631c223d777c1604915eedc
7,868
py
Python
training_ptr_gen/decode.py
yash-22/pointer_generator_translator
86e4c96b6e9930cd7f35fd31d39477f916899da7
[ "Apache-2.0" ]
null
null
null
training_ptr_gen/decode.py
yash-22/pointer_generator_translator
86e4c96b6e9930cd7f35fd31d39477f916899da7
[ "Apache-2.0" ]
null
null
null
training_ptr_gen/decode.py
yash-22/pointer_generator_translator
86e4c96b6e9930cd7f35fd31d39477f916899da7
[ "Apache-2.0" ]
null
null
null
#Except for the pytorch part content of this file is copied from https://github.com/abisee/pointer-generator/blob/master/ import sys import imp imp.reload(sys) sys.setdefaultencoding('utf8') import os import time import torch from torch.autograd import Variable from data_util.batcher import Batcher from data_util....
37.826923
121
0.587316
import sys import imp imp.reload(sys) sys.setdefaultencoding('utf8') import os import time import torch from torch.autograd import Variable from data_util.batcher import Batcher from data_util.data import Vocab from data_util import data, config from . import model from data_util.utils import write_for_rouge, rou...
true
true
1c29da5dceeb7423f395da8f3bf2cf281c092342
3,048
py
Python
lib/multicore.py
casmlab/quac
f7b037b15f5ff0db1b9669159f645040abce1766
[ "ECL-2.0", "Apache-2.0" ]
34
2015-01-10T05:44:02.000Z
2021-05-18T02:57:19.000Z
lib/multicore.py
casmlab/quac
f7b037b15f5ff0db1b9669159f645040abce1766
[ "ECL-2.0", "Apache-2.0" ]
14
2015-02-15T21:58:09.000Z
2020-06-05T18:31:47.000Z
lib/multicore.py
casmlab/quac
f7b037b15f5ff0db1b9669159f645040abce1766
[ "ECL-2.0", "Apache-2.0" ]
19
2015-02-08T02:24:15.000Z
2020-11-07T13:39:55.000Z
# Stuff to facilitate running multicore jobs. The basic philosophy here is to # spawn a few large jobs instead of many small jobs, repacking small jobs into # bigger ones if needed. # Copyright (c) Los Alamos National Security, LLC, and others. import itertools import sys import joblib import testable import u ...
32.084211
79
0.639108
import itertools import sys import joblib import testable import u core_ct = 1 def do(f, every, each, require_multicore=False): assert (isinstance(every, tuple)) if (require_multicore and core_ct == 1): raise ValueError('multicore forced, but core_ct == 1') eaches = u.chunker(each, core_c...
true
true
1c29daa89886356dd74486d80a4fe6067a3da7a7
2,789
py
Python
encoding.py
AbdallahHemdan/LZ77-compression-algorithm
03677b8c368bd7e84ea08dab9159c686e9fb3144
[ "MIT" ]
null
null
null
encoding.py
AbdallahHemdan/LZ77-compression-algorithm
03677b8c368bd7e84ea08dab9159c686e9fb3144
[ "MIT" ]
null
null
null
encoding.py
AbdallahHemdan/LZ77-compression-algorithm
03677b8c368bd7e84ea08dab9159c686e9fb3144
[ "MIT" ]
null
null
null
import numpy as np import cv2 inputImg = cv2.imread('input.jpg', 0) flat = np.array(inputImg).flatten() cv2.imshow('input', inputImg) # size of the image(row, col) row = inputImg.shape[0] col = inputImg.shape[1] flattenSize = row * col # get sliding window and look ahead window sizes slidingWindow = int...
32.057471
87
0.619577
import numpy as np import cv2 inputImg = cv2.imread('input.jpg', 0) flat = np.array(inputImg).flatten() cv2.imshow('input', inputImg) row = inputImg.shape[0] col = inputImg.shape[1] flattenSize = row * col slidingWindow = int(input('1. Enter the sliding window size: ')) lookAhead = int(input('2. Enter ...
true
true
1c29dce3405c7b3152171e04e48c63c0b195faf4
121,443
py
Python
tests/unit/gapic/aiplatform_v1beta1/test_endpoint_service.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
1
2022-03-30T05:23:29.000Z
2022-03-30T05:23:29.000Z
tests/unit/gapic/aiplatform_v1beta1/test_endpoint_service.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/aiplatform_v1beta1/test_endpoint_service.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2022 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.394878
128
0.685737
import os import mock import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_core import future from g...
true
true
1c29ded66f061d9716e3aabec8a0a6ecab8f8b06
1,088
py
Python
runner/runs/doom_health_gathering.py
neevparikh/hierarchical-doom
082f794b9c6101c4e94f15bf4f93c718ee219ea5
[ "MIT" ]
1
2021-11-19T19:39:36.000Z
2021-11-19T19:39:36.000Z
runner/runs/doom_health_gathering.py
neevparikh/hierarchical-doom
082f794b9c6101c4e94f15bf4f93c718ee219ea5
[ "MIT" ]
null
null
null
runner/runs/doom_health_gathering.py
neevparikh/hierarchical-doom
082f794b9c6101c4e94f15bf4f93c718ee219ea5
[ "MIT" ]
null
null
null
from runner.run_description import RunDescription, Experiment, ParamGrid _params = ParamGrid([ ('seed', [1111, 2222, 3333, 4444, 5555]), ('env', ['doom_health_gathering_supreme']), ]) _experiments = [ Experiment( 'health_0_255', 'python -m algorithms.appo.train_appo --train_for_env_steps=4...
49.454545
314
0.72886
from runner.run_description import RunDescription, Experiment, ParamGrid _params = ParamGrid([ ('seed', [1111, 2222, 3333, 4444, 5555]), ('env', ['doom_health_gathering_supreme']), ]) _experiments = [ Experiment( 'health_0_255', 'python -m algorithms.appo.train_appo --train_for_env_steps=4...
true
true
1c29ded6da989c2b282155c7263b3aeb9e616641
15,831
py
Python
saleor/settings.py
fkoningy/saleor
3850499d12f04df9312ba2975a63f7c23a26fc7e
[ "BSD-3-Clause" ]
1
2018-07-15T18:52:31.000Z
2018-07-15T18:52:31.000Z
saleor/settings.py
fkoningy/saleor
3850499d12f04df9312ba2975a63f7c23a26fc7e
[ "BSD-3-Clause" ]
null
null
null
saleor/settings.py
fkoningy/saleor
3850499d12f04df9312ba2975a63f7c23a26fc7e
[ "BSD-3-Clause" ]
null
null
null
import ast import os.path import dj_database_url import dj_email_url import django_cache_url from django.contrib.messages import constants as messages from django.utils.translation import gettext_lazy as _, pgettext_lazy from django_prices.templatetags.prices_i18n import get_currency_fraction from . import __version_...
30.859649
90
0.695345
import ast import os.path import dj_database_url import dj_email_url import django_cache_url from django.contrib.messages import constants as messages from django.utils.translation import gettext_lazy as _, pgettext_lazy from django_prices.templatetags.prices_i18n import get_currency_fraction from . import __version_...
true
true
1c29df23e562889d50ca9875a5d56e09ffbb674a
2,508
py
Python
build/toolchain/gcc_ar_wrapper.py
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
build/toolchain/gcc_ar_wrapper.py
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
build/toolchain/gcc_ar_wrapper.py
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs the 'ar' command after removing its output file first. This script is invoked like: python gcc_ar_wrapper.py --ar=$AR --outp...
31.746835
79
0.64673
import argparse import os import subprocess import sys import wrapper_utils def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('--ar', required=True, help='The ar binary to run', metavar='PATH') parser.ad...
true
true
1c29df515d8abb606b6c0a5afb126472d217f9c4
4,389
py
Python
lite/examples/pose_estimation/raspberry_pi/tracker/keypoint_tracker.py
duy-maimanh/examples
67ed12fd0adbe22469b6fac916d96e27f02a7330
[ "Apache-2.0" ]
6,484
2019-02-13T21:32:29.000Z
2022-03-31T20:50:20.000Z
lite/examples/pose_estimation/raspberry_pi/tracker/keypoint_tracker.py
duy-maimanh/examples
67ed12fd0adbe22469b6fac916d96e27f02a7330
[ "Apache-2.0" ]
288
2019-02-13T22:56:03.000Z
2022-03-24T11:15:19.000Z
lite/examples/pose_estimation/raspberry_pi/tracker/keypoint_tracker.py
duy-maimanh/examples
67ed12fd0adbe22469b6fac916d96e27f02a7330
[ "Apache-2.0" ]
7,222
2019-02-13T21:39:34.000Z
2022-03-31T22:23:54.000Z
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.575
80
0.689907
import math from typing import List from data import Person from tracker.tracker import Track from tracker.tracker import Tracker class KeypointTracker(Tracker): def _compute_similarity(self, persons: List[Person]) -> List[List[float]]: if (not persons) or (not self._tracks): return [[]] ...
true
true
1c29e017a9150e90604b8f3be18f10064bd7cf30
255
py
Python
python_demos/src/language_demos/subprocess_popen.py
t4d-classes/python_10042021
e2c28448ad66784c429655ab766f902b76d6ac79
[ "MIT" ]
null
null
null
python_demos/src/language_demos/subprocess_popen.py
t4d-classes/python_10042021
e2c28448ad66784c429655ab766f902b76d6ac79
[ "MIT" ]
null
null
null
python_demos/src/language_demos/subprocess_popen.py
t4d-classes/python_10042021
e2c28448ad66784c429655ab766f902b76d6ac79
[ "MIT" ]
null
null
null
import subprocess p = subprocess.Popen( "where chkdsk.exe", stdout=subprocess.PIPE, stderr=subprocess.STDOUT) exit_code = p.wait() print(exit_code) if p and p.stdout: for line in p.stdout.readlines(): print(str(line, "UTF-8"))
17
37
0.666667
import subprocess p = subprocess.Popen( "where chkdsk.exe", stdout=subprocess.PIPE, stderr=subprocess.STDOUT) exit_code = p.wait() print(exit_code) if p and p.stdout: for line in p.stdout.readlines(): print(str(line, "UTF-8"))
true
true
1c29e1c5552c2a0daba2b7fd6093aede48167a04
2,496
py
Python
dream-team/app/models.py
dotronglong/python-examples
22bf44a00196772e8dc8e2d0d426c843e51c89a7
[ "MIT" ]
null
null
null
dream-team/app/models.py
dotronglong/python-examples
22bf44a00196772e8dc8e2d0d426c843e51c89a7
[ "MIT" ]
null
null
null
dream-team/app/models.py
dotronglong/python-examples
22bf44a00196772e8dc8e2d0d426c843e51c89a7
[ "MIT" ]
null
null
null
# app/models.py from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from app import db, login_manager class Employee(UserMixin, db.Model): """ Create an Employee table """ # Ensures table will be named in plural and not in singular # as is ...
29.364706
74
0.648638
from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from app import db, login_manager class Employee(UserMixin, db.Model): __tablename__ = 'employees' id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(60), index=T...
true
true
1c29e37f5fb1565eefeb8516c30d660cbd0b2d0a
699
py
Python
SimpleCalculator.py
caofanCPU/PythonExperiment
79b6e30160d5c60bfe035c63a1a46c5c1f4f638c
[ "MIT" ]
1
2019-12-14T03:08:39.000Z
2019-12-14T03:08:39.000Z
SimpleCalculator.py
caofanCPU/PythonExperiment
79b6e30160d5c60bfe035c63a1a46c5c1f4f638c
[ "MIT" ]
null
null
null
SimpleCalculator.py
caofanCPU/PythonExperiment
79b6e30160d5c60bfe035c63a1a46c5c1f4f638c
[ "MIT" ]
null
null
null
def add(a, b): return a + b def subtract(a, b): return a - b def multiply(a, b): return a * b def divide(a, b): return a / b print("Select Operation") print("1.Add") print("2.Subtract") print("3.Multiply") print("4.Divide") choice = input("Enter Choice(1/2/3/4):") num1 = int(input("Enter first ...
17.475
53
0.575107
def add(a, b): return a + b def subtract(a, b): return a - b def multiply(a, b): return a * b def divide(a, b): return a / b print("Select Operation") print("1.Add") print("2.Subtract") print("3.Multiply") print("4.Divide") choice = input("Enter Choice(1/2/3/4):") num1 = int(input("Enter first ...
true
true
1c29e3c3debf06ead5eee9f442b9c7d3e6083f79
627
py
Python
kansha/alembic/versions/b740362087_adding_max_cards.py
AnomalistDesignLLC/kansha
85b5816da126b1c7098707c98f217d8b2e524ff2
[ "BSD-3-Clause" ]
161
2015-04-27T17:07:40.000Z
2021-10-14T23:14:56.000Z
kansha/alembic/versions/b740362087_adding_max_cards.py
AnomalistDesignLLC/kansha
85b5816da126b1c7098707c98f217d8b2e524ff2
[ "BSD-3-Clause" ]
228
2015-05-27T15:47:31.000Z
2018-11-24T04:05:11.000Z
kansha/alembic/versions/b740362087_adding_max_cards.py
AnomalistDesignLLC/kansha
85b5816da126b1c7098707c98f217d8b2e524ff2
[ "BSD-3-Clause" ]
38
2015-05-27T15:16:15.000Z
2021-03-24T05:34:08.000Z
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- """adding max cards Revision ID: b740362087 Revises: 537fa16b46e7 Create Date: 2013-09-19 17:37:3...
19.59375
66
0.728868
revision = 'b740362087' down_revision = '537fa16b46e7' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('column', sa.Column('nb_max_cards', sa.Integer)) def downgrade(): op.drop_column('column', 'nb_max_cards')
true
true
1c29e63cd1f2269f8456618ea293f0ed38b6468f
1,214
py
Python
setup.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
null
null
null
setup.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
null
null
null
setup.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
null
null
null
import os from setuptools import setup, find_packages with open(os.path.join('.', 'VERSION')) as version_file: version = version_file.read().strip() with open("README.md", 'r') as f: long_description = f.read() with open("requirements.txt") as requirements: requires = list(requirements) setup( name=...
33.722222
95
0.675453
import os from setuptools import setup, find_packages with open(os.path.join('.', 'VERSION')) as version_file: version = version_file.read().strip() with open("README.md", 'r') as f: long_description = f.read() with open("requirements.txt") as requirements: requires = list(requirements) setup( name=...
true
true
1c29e69f21d2f5a6a3162e88fe6d1e6301b37aad
2,094
py
Python
Examples/J1J2/j1j2.py
vigsterkr/netket
1e187ae2b9d2aa3f2e53b09fe743e50763d04c9a
[ "Apache-2.0" ]
null
null
null
Examples/J1J2/j1j2.py
vigsterkr/netket
1e187ae2b9d2aa3f2e53b09fe743e50763d04c9a
[ "Apache-2.0" ]
null
null
null
Examples/J1J2/j1j2.py
vigsterkr/netket
1e187ae2b9d2aa3f2e53b09fe743e50763d04c9a
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Simons Foundation, 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 appli...
27.194805
82
0.670487
import numpy as np import netket as nk sigmaz = np.array([[1, 0], [0, -1]]) mszsz = np.kron(sigmaz, sigmaz) exchange = np.asarray([[0, 0, 0, 0], [0, 0, 2, 0], [0, 2, 0, 0], [0, 0, 0, 0]]) J = [1, 0.4] L = 20 mats = [] sites = [] for i in range(L): for d in [0, 1]: mats.append...
true
true
1c29e7b025dddb846ec8a127c08af1f681141a02
627
py
Python
magnitude_list.py
hz37/JWG
6e6d99803c368afc4af0fbc1e80fbc0138b3faf3
[ "Unlicense" ]
null
null
null
magnitude_list.py
hz37/JWG
6e6d99803c368afc4af0fbc1e80fbc0138b3faf3
[ "Unlicense" ]
null
null
null
magnitude_list.py
hz37/JWG
6e6d99803c368afc4af0fbc1e80fbc0138b3faf3
[ "Unlicense" ]
null
null
null
#!/usr/local/bin/python3 # Magnitude tabel. # Hens Zimmerman, 03-05-2016. import math import sys if not sys.version_info >= (3,0): print("Je hebt minstens python 3 nodig voor dit script") exit() # Vijfdemachts wortel van 100. mag1_diff = pow(100, 1 / 5) # Print tabel van magnitudes en hoe veel keer helder...
25.08
67
0.684211
import math import sys if not sys.version_info >= (3,0): print("Je hebt minstens python 3 nodig voor dit script") exit() mag1_diff = pow(100, 1 / 5) for i in range (-5, 5): print("Magnitude {0:>2}: {1:8.4f} x zo helder als magnitude 0". format(i, 1 / pow(mag1_diff, i)))
true
true
1c29e80d74611e62a288f5e2f581f35e3c5d7c78
779
py
Python
test/test_address.py
onfido/api-python-client
9e05fcb1c1c511da74a822740a59a67057c50f03
[ "MIT" ]
11
2018-02-07T08:34:03.000Z
2020-06-07T01:52:55.000Z
test/test_address.py
onfido/api-python-client
9e05fcb1c1c511da74a822740a59a67057c50f03
[ "MIT" ]
5
2018-04-23T10:46:57.000Z
2021-10-05T18:02:07.000Z
test/test_address.py
onfido/api-python-client
9e05fcb1c1c511da74a822740a59a67057c50f03
[ "MIT" ]
15
2017-11-04T21:08:24.000Z
2020-03-11T02:18:48.000Z
# coding: utf-8 """ Onfido API The Onfido API is used to submit check requests. # noqa: E501 The version of the OpenAPI document: 3.0.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import onfido from onfido.models.address import Address ...
19.475
79
0.668806
from __future__ import absolute_import import unittest import onfido from onfido.models.address import Address from onfido.rest import ApiException class TestAddress(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testAddress(self): s if...
true
true
1c29e8aa441efa2c3f2763d61ef78dcccba34c5c
204
py
Python
FUSS/tests/test_statistics.py
HeloiseS/FUSS
c7d5bbe6821eccb2a15d952a8899108098626474
[ "MIT" ]
null
null
null
FUSS/tests/test_statistics.py
HeloiseS/FUSS
c7d5bbe6821eccb2a15d952a8899108098626474
[ "MIT" ]
null
null
null
FUSS/tests/test_statistics.py
HeloiseS/FUSS
c7d5bbe6821eccb2a15d952a8899108098626474
[ "MIT" ]
null
null
null
import FUSS.statistics as s import numpy as np def test_chi2(): x = np.arange(0,10,0.1) y = x*2+5 y_r = np.array([0.1]*len(y)) chi = s.chi2(y, y_r, y+0.1) assert int(chi) == 100
18.545455
32
0.558824
import FUSS.statistics as s import numpy as np def test_chi2(): x = np.arange(0,10,0.1) y = x*2+5 y_r = np.array([0.1]*len(y)) chi = s.chi2(y, y_r, y+0.1) assert int(chi) == 100
true
true
1c29e92789716cdded437a16f600fe0081f668cb
83
py
Python
example/my/module/__main__.py
rmedaer/quickie
85335cd4abf1ce1cf917e8a9ce2027a625abab14
[ "Apache-2.0" ]
null
null
null
example/my/module/__main__.py
rmedaer/quickie
85335cd4abf1ce1cf917e8a9ce2027a625abab14
[ "Apache-2.0" ]
null
null
null
example/my/module/__main__.py
rmedaer/quickie
85335cd4abf1ce1cf917e8a9ce2027a625abab14
[ "Apache-2.0" ]
null
null
null
if __name__ == '__main__': print('Hello World') print(__quickieconfig__)
13.833333
28
0.662651
if __name__ == '__main__': print('Hello World') print(__quickieconfig__)
true
true
1c29e99acddae8e25875cfbc51ed7fbd7b77459e
1,066
py
Python
tests/test_image.py
JoshKarpel/spiel
9346e7212bab49a8b5963f5177f161b23c6e8ee8
[ "MIT" ]
3
2021-05-16T07:34:40.000Z
2022-01-02T18:22:51.000Z
tests/test_image.py
JoshKarpel/spiel
9346e7212bab49a8b5963f5177f161b23c6e8ee8
[ "MIT" ]
99
2021-03-29T14:35:37.000Z
2022-03-21T22:11:04.000Z
tests/test_image.py
JoshKarpel/spiel
9346e7212bab49a8b5963f5177f161b23c6e8ee8
[ "MIT" ]
null
null
null
import pytest from PIL import Image as Img from rich.console import Console from spiel.image import Image, ImageSize from spiel.main import DEMO_DIR @pytest.fixture def image() -> Image: return Image(Img.new(mode="RGB", size=ImageSize(100, 100))) @pytest.mark.parametrize( "max_width, height, size", [ ...
25.380952
80
0.660413
import pytest from PIL import Image as Img from rich.console import Console from spiel.image import Image, ImageSize from spiel.main import DEMO_DIR @pytest.fixture def image() -> Image: return Image(Img.new(mode="RGB", size=ImageSize(100, 100))) @pytest.mark.parametrize( "max_width, height, size", [ ...
true
true
1c29eb8587c409c7faa4f14b0044a2f224472350
5,935
py
Python
facetool/averager.py
hay/facetool
3e296f7b177ebbcceb4b25f12f3327c3f6612f14
[ "MIT" ]
29
2018-12-10T22:40:07.000Z
2022-03-30T02:56:28.000Z
facetool/averager.py
hay/facetool
3e296f7b177ebbcceb4b25f12f3327c3f6612f14
[ "MIT" ]
2
2020-02-21T09:48:37.000Z
2021-03-06T22:33:45.000Z
facetool/averager.py
hay/facetool
3e296f7b177ebbcceb4b25f12f3327c3f6612f14
[ "MIT" ]
7
2019-08-09T09:19:12.000Z
2022-03-30T02:56:27.000Z
# Based on the Face Averager by Satya Mallick # < https://github.com/spmallick/learnopencv/blob/master/FaceAverage/faceAverage.py > import cv2 import logging import numpy as np import pdb from .faceaverage import similarityTransform, calculateDelaunayTriangles from .faceaverage import constrainPoint, warpTriangle from...
31.737968
85
0.570514
import cv2 import logging import numpy as np import pdb from .faceaverage import similarityTransform, calculateDelaunayTriangles from .faceaverage import constrainPoint, warpTriangle from .landmarks import Landmarks from .path import Path logger = logging.getLogger(__name__) class Averager: def __init__( ...
true
true
1c29ebe96258e9703ea434ab29e480218c91a2d9
276,679
py
Python
python/openlattice/api/edm_api.py
openlattice/api-clients
1d5be9861785b295089b732f37464e31bf80c8ca
[ "Apache-2.0" ]
null
null
null
python/openlattice/api/edm_api.py
openlattice/api-clients
1d5be9861785b295089b732f37464e31bf80c8ca
[ "Apache-2.0" ]
1
2021-01-20T00:20:01.000Z
2021-01-20T00:20:01.000Z
python/openlattice/api/edm_api.py
openlattice/api-clients
1d5be9861785b295089b732f37464e31bf80c8ca
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OpenLattice API OpenLattice API # noqa: E501 The version of the OpenAPI document: 0.0.1 Contact: support@openlattice.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility l...
46.563278
205
0.602941
from __future__ import absolute_import import re import six from openlattice.api_client import ApiClient from openlattice.exceptions import ( ApiTypeError, ApiValueError ) class EdmApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiCli...
true
true
1c29ec307da1bf6338dadd276ef8e81f4b935f8f
892
py
Python
app/test/article_test.py
Albert-Byrone/News-Bulletins
af424afd2ba5f06c43fc7f5947aa1cfaf1b3fb77
[ "MIT" ]
null
null
null
app/test/article_test.py
Albert-Byrone/News-Bulletins
af424afd2ba5f06c43fc7f5947aa1cfaf1b3fb77
[ "MIT" ]
null
null
null
app/test/article_test.py
Albert-Byrone/News-Bulletins
af424afd2ba5f06c43fc7f5947aa1cfaf1b3fb77
[ "MIT" ]
null
null
null
import unittest from ..models import Articles # News = news.Article class ArticleTest(unittest.TestCase): ''' a class to test the behaviour of the Article class ''' def setUp(self): ''' a method that will run before any test ''' self.new_article = Articles('Gizmodo.com',...
38.782609
242
0.678251
import unittest from ..models import Articles class ArticleTest(unittest.TestCase): def setUp(self): self.new_article = Articles('Gizmodo.com','Daniel Kolitz','What\'s Going to Happen With Bitcoin?','Since its inception in 2009, Bitcoin has made and ruined fortunes, helped sell fentanyl and books about cr...
true
true
1c29ec6768265bef32bb470ce520f99763377d57
4,273
py
Python
tests/core/commands/test_serialization.py
cyberhck/renku-python
2e52dff9dd627c93764aadb9fd1e91bd190a5de7
[ "Apache-2.0" ]
null
null
null
tests/core/commands/test_serialization.py
cyberhck/renku-python
2e52dff9dd627c93764aadb9fd1e91bd190a5de7
[ "Apache-2.0" ]
null
null
null
tests/core/commands/test_serialization.py
cyberhck/renku-python
2e52dff9dd627c93764aadb9fd1e91bd190a5de7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2017-2019- Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in co...
31.189781
79
0.682659
import datetime from urllib.parse import quote, urljoin import yaml from renku.core.management.client import LocalClient from renku.core.models.datasets import Dataset from renku.core.utils.doi import is_doi def test_dataset_serialization(client, dataset, data_file): def load_dataset(name): ...
true
true
1c29ecbc6892e784e27c183a3588121404e155fe
3,080
py
Python
isucon/portal/internal/views.py
masaki-yamakawa/isucon9-portal
a3062d613d559aa9df5ac8d9aac2c774cf8a9419
[ "MIT" ]
2
2020-02-17T06:09:22.000Z
2020-10-27T12:33:46.000Z
isucon/portal/internal/views.py
masaki-yamakawa/isucon9-portal
a3062d613d559aa9df5ac8d9aac2c774cf8a9419
[ "MIT" ]
null
null
null
isucon/portal/internal/views.py
masaki-yamakawa/isucon9-portal
a3062d613d559aa9df5ac8d9aac2c774cf8a9419
[ "MIT" ]
1
2022-02-27T00:59:29.000Z
2022-02-27T00:59:29.000Z
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse from rest_framework import viewsets, status, serializers from rest_framework.decorators import action from rest_framework.response import Response from rest_framework.routers import SimpleRouter from rest_framework import excep...
33.478261
95
0.690909
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse from rest_framework import viewsets, status, serializers from rest_framework.decorators import action from rest_framework.response import Response from rest_framework.routers import SimpleRouter from rest_framework import excep...
true
true
1c29ed5b84b07c25ce7ef105263e6f11e748c728
357
py
Python
trackgenius/utilities/.ipynb_checkpoints/trackingnegomulti-checkpoint.py
SifanSong/trackgenius
7a78350f16deb636b05eeb9ea667af581672775c
[ "MIT" ]
1
2019-08-04T16:36:23.000Z
2019-08-04T16:36:23.000Z
trackgenius/utilities/.ipynb_checkpoints/trackingnegomulti-checkpoint.py
SifanSong/trackgenius
7a78350f16deb636b05eeb9ea667af581672775c
[ "MIT" ]
null
null
null
trackgenius/utilities/.ipynb_checkpoints/trackingnegomulti-checkpoint.py
SifanSong/trackgenius
7a78350f16deb636b05eeb9ea667af581672775c
[ "MIT" ]
null
null
null
from __future__ import division import numpy as np import os import pandas as pd import itertools import matplotlib.pyplot as plt import xml.etree.ElementTree as ET import time import pylab as pl from IPython import display import sys from trackgenius.utilities.background import Background from trackgenius.trackingn...
21
61
0.848739
from __future__ import division import numpy as np import os import pandas as pd import itertools import matplotlib.pyplot as plt import xml.etree.ElementTree as ET import time import pylab as pl from IPython import display import sys from trackgenius.utilities.background import Background from trackgenius.trackingn...
true
true
1c29ed61e11ed17a02382317a662401be9c6bd26
4,893
py
Python
src/data_loader.py
prataprudra2526/SimpleHTR-TF2.0
8530bb721c9a2e43a7c72f7b1cd13dc4f07ec6e0
[ "MIT" ]
1
2020-08-31T16:25:47.000Z
2020-08-31T16:25:47.000Z
src/data_loader.py
prataprudra2526/SimpleHTR-TF2.0
8530bb721c9a2e43a7c72f7b1cd13dc4f07ec6e0
[ "MIT" ]
null
null
null
src/data_loader.py
prataprudra2526/SimpleHTR-TF2.0
8530bb721c9a2e43a7c72f7b1cd13dc4f07ec6e0
[ "MIT" ]
null
null
null
from __future__ import division from __future__ import print_function import os import random import numpy as np import cv2 from sample_preprocessor import pre_process class Sample: "sample from the dataset" def __init__(self, gt_text, file_path): self.gtText = gt_text self.filePath = file_p...
35.715328
120
0.61823
from __future__ import division from __future__ import print_function import os import random import numpy as np import cv2 from sample_preprocessor import pre_process class Sample: def __init__(self, gt_text, file_path): self.gtText = gt_text self.filePath = file_path class Batch: def __...
true
true
1c29eeaa5aaef722b58feb69e384b381d0ef1b95
12,534
py
Python
google/ads/google_ads/v3/proto/resources/shared_criterion_pb2.py
andy0937/google-ads-python
cb5da7f4a75076828d1fc3524b08cc167670435a
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v3/proto/resources/shared_criterion_pb2.py
andy0937/google-ads-python
cb5da7f4a75076828d1fc3524b08cc167670435a
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v3/proto/resources/shared_criterion_pb2.py
andy0937/google-ads-python
cb5da7f4a75076828d1fc3524b08cc167670435a
[ "Apache-2.0" ]
1
2020-03-13T00:14:31.000Z
2020-03-13T00:14:31.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v3/proto/resources/shared_criterion.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf im...
62.049505
1,756
0.79783
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
1c29ef21fcdf69d978f6dccdc879632adb010f3d
10,927
py
Python
src/biokbase/narrative_method_store/client.py
pranjan77/narrative
5714d199c7ca3d65cbfc1110b3d0641e250e62f9
[ "MIT" ]
2
2019-05-03T10:12:56.000Z
2020-10-26T05:35:16.000Z
src/biokbase/narrative_method_store/client.py
pranjan77/narrative
5714d199c7ca3d65cbfc1110b3d0641e250e62f9
[ "MIT" ]
220
2020-07-13T11:13:03.000Z
2022-03-28T11:01:18.000Z
src/biokbase/narrative_method_store/client.py
pranjan77/narrative
5714d199c7ca3d65cbfc1110b3d0641e250e62f9
[ "MIT" ]
2
2019-03-12T17:41:10.000Z
2019-04-24T15:33:50.000Z
############################################################ # # Autogenerated by the KBase type compiler - # any changes made here will be overwritten # ############################################################ try: import json as _json except ImportError: import sys sys.path.append('simplejson-2.3.3')...
36.062706
79
0.567951
= url self.timeout = int(timeout) self._headers = dict() self.trust_all_ssl_certificates = trust_all_ssl_certificates # token overrides user_id and password if token is not None: self._headers['AUTHORIZATION'] = token elif user_id is not None and password is n...
true
true
1c29efc5dafd1ee8247020ffca5df0b74dfc16ca
1,168
py
Python
libcst/_parser/whitespace_parser.py
jschavesr/LibCST
e5ab7b90b4c9cd1f46e5b875ad317411abf48298
[ "Apache-2.0" ]
1
2022-02-10T10:59:22.000Z
2022-02-10T10:59:22.000Z
libcst/_parser/whitespace_parser.py
jschavesr/LibCST
e5ab7b90b4c9cd1f46e5b875ad317411abf48298
[ "Apache-2.0" ]
null
null
null
libcst/_parser/whitespace_parser.py
jschavesr/LibCST
e5ab7b90b4c9cd1f46e5b875ad317411abf48298
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Parso doesn't attempt to parse (or even emit tokens for) whitespace or comments that aren't syntatically important. Instead, we're just ...
38.933333
88
0.791952
try: from libcst_native import whitespace_parser as mod except ImportError: from libcst._parser import py_whitespace_parser as mod parse_simple_whitespace = mod.parse_simple_whitespace parse_empty_lines = mod.parse_empty_lines parse_trailing_whitespace = mod.parse_trailing_whitespace parse...
true
true
1c29f0b253669ad21db006e609bdf3fe1604e779
412
py
Python
quad96/training/utility.py
ussamazahid96/quad96
f30929342da4c44b1c05ce03a5b484be2eac7925
[ "BSD-3-Clause" ]
7
2020-12-21T14:03:02.000Z
2021-10-04T18:53:54.000Z
quad96/training/utility.py
jedibobo/quad96
f30929342da4c44b1c05ce03a5b484be2eac7925
[ "BSD-3-Clause" ]
null
null
null
quad96/training/utility.py
jedibobo/quad96
f30929342da4c44b1c05ce03a5b484be2eac7925
[ "BSD-3-Clause" ]
3
2021-01-31T09:15:47.000Z
2021-09-18T13:22:54.000Z
#!/usr/bin/python # -*- encoding=utf-8 -*- # author: Ian # e-mail: stmayue@gmail.com # description: # taken from https://github.com/Damcy/prioritized-experience-replay def list_to_dict(in_list): return dict((i, in_list[i]) for i in range(0, len(in_list))) def exchange_key_value(in_dict): return dict((in_di...
17.166667
67
0.667476
def list_to_dict(in_list): return dict((i, in_list[i]) for i in range(0, len(in_list))) def exchange_key_value(in_dict): return dict((in_dict[i], i) for i in in_dict) def main(): pass if __name__ == '__main__': main()
true
true
1c29f1d1955ecf02359f0d03bfdb194a674ae1e5
1,696
py
Python
tools/testrunner/local/variants.py
jizillon/v8
3276083a63efd0ff5cec29f7756226432880a22d
[ "BSD-3-Clause" ]
null
null
null
tools/testrunner/local/variants.py
jizillon/v8
3276083a63efd0ff5cec29f7756226432880a22d
[ "BSD-3-Clause" ]
null
null
null
tools/testrunner/local/variants.py
jizillon/v8
3276083a63efd0ff5cec29f7756226432880a22d
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Use this to run several variants of the tests. ALL_VARIANT_FLAGS = { "code_serializer": [["--cache=code"]], "default": [[]], "future": [["--future"...
32.615385
79
0.6875
ALL_VARIANT_FLAGS = { "code_serializer": [["--cache=code"]], "default": [[]], "future": [["--future"]], "infra_staging": [[]], "liftoff": [["--liftoff"]], "minor_mc": [["--minor-mc"]], "nooptimization": [["--noopt"]], "slow_path": [["--force-slow-path"]], "stress": [["--stress-opt", "...
true
true
1c29f2477853ced241cdf6fee6e3a2911e8e4eee
700
py
Python
problems/shock_tube_2phase_no_relax/plot.py
joshuahansel/cl1de
a6e641f6f6ffaa477a3a82ef40e013100577b61f
[ "MIT" ]
null
null
null
problems/shock_tube_2phase_no_relax/plot.py
joshuahansel/cl1de
a6e641f6f6ffaa477a3a82ef40e013100577b61f
[ "MIT" ]
null
null
null
problems/shock_tube_2phase_no_relax/plot.py
joshuahansel/cl1de
a6e641f6f6ffaa477a3a82ef40e013100577b61f
[ "MIT" ]
null
null
null
#!/usr/bin/python from file_utilities import readCSVFile from PlotterLine import PlotterLine solution = readCSVFile("output.csv") u_plotter = PlotterLine("Position", "Velocity [m/s]") u_plotter.addSet(solution["x"], solution["u_liq"], "$u_\\ell$, Computed", color=1, linetype=2) u_plotter.addSet(solution["x"], soluti...
41.176471
106
0.72
from file_utilities import readCSVFile from PlotterLine import PlotterLine solution = readCSVFile("output.csv") u_plotter = PlotterLine("Position", "Velocity [m/s]") u_plotter.addSet(solution["x"], solution["u_liq"], "$u_\\ell$, Computed", color=1, linetype=2) u_plotter.addSet(solution["x"], solution["u_vap"], "$u_...
true
true
1c29f3dfdfe0f8be7fc49eeb1dd48e62b0e8cfa3
905
py
Python
app/problem_register/serializers.py
3ANov/spbauto_map
3f1c3dcb5f370a9e04d5d496b18a3e6ab3dbe7a1
[ "MIT" ]
null
null
null
app/problem_register/serializers.py
3ANov/spbauto_map
3f1c3dcb5f370a9e04d5d496b18a3e6ab3dbe7a1
[ "MIT" ]
17
2020-02-15T16:57:38.000Z
2021-09-17T19:33:25.000Z
app/problem_register/serializers.py
3ANov/spbauto_map
3f1c3dcb5f370a9e04d5d496b18a3e6ab3dbe7a1
[ "MIT" ]
null
null
null
from rest_framework import serializers from rest_framework_gis.serializers import GeoFeatureModelSerializer from problem_register.models import ProblemStatus, ProblemLabel class StatusSerializer(serializers.ModelSerializer): class Meta: model = ProblemStatus fields = '__all__' class ProblemLabe...
29.193548
68
0.749171
from rest_framework import serializers from rest_framework_gis.serializers import GeoFeatureModelSerializer from problem_register.models import ProblemStatus, ProblemLabel class StatusSerializer(serializers.ModelSerializer): class Meta: model = ProblemStatus fields = '__all__' class ProblemLabe...
true
true
1c29f3f8bf85436ddc83f5b606cd6dd158b4cc58
1,033
py
Python
examples/DGL/mixhop.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
1
2020-07-29T08:00:32.000Z
2020-07-29T08:00:32.000Z
examples/DGL/mixhop.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
null
null
null
examples/DGL/mixhop.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import torch import dgl import graphgallery from graphgallery.datasets import Planetoid, NPZDataset from graphgallery.gallery import callbacks print("GraphGallery version: ", graphgallery.__version__) print("PyTorch version: ", torch.__version__) print("DGL version: ", dgl.__vers...
33.322581
95
0.774443
import torch import dgl import graphgallery from graphgallery.datasets import Planetoid, NPZDataset from graphgallery.gallery import callbacks print("GraphGallery version: ", graphgallery.__version__) print("PyTorch version: ", torch.__version__) print("DGL version: ", dgl.__version__) data = NPZDataset('cora', ro...
true
true
1c29f5a646b7d01aded9e848aa80a212c770cb90
133
py
Python
src/jbdl/rbdl/utils/xyz2int.py
Wangxinhui-bot/jbdl
4541fcbec9156c8a3dc496058230fdf2a3fa1bdf
[ "MIT" ]
null
null
null
src/jbdl/rbdl/utils/xyz2int.py
Wangxinhui-bot/jbdl
4541fcbec9156c8a3dc496058230fdf2a3fa1bdf
[ "MIT" ]
null
null
null
src/jbdl/rbdl/utils/xyz2int.py
Wangxinhui-bot/jbdl
4541fcbec9156c8a3dc496058230fdf2a3fa1bdf
[ "MIT" ]
null
null
null
def xyz2int(jtype: str): return tuple(['xyz'.index(s) for s in jtype]) if __name__ == '__main__': print(xyz2int("xyzzz"))
16.625
49
0.631579
def xyz2int(jtype: str): return tuple(['xyz'.index(s) for s in jtype]) if __name__ == '__main__': print(xyz2int("xyzzz"))
true
true
1c29f68aebe5ab0e2200c9eb9b1971da09e03529
3,975
py
Python
python/hw5/hw5.py
wladOSnull/first_jira
250d4051e8b5a847b3524ec5a719a920cec775cc
[ "MIT" ]
null
null
null
python/hw5/hw5.py
wladOSnull/first_jira
250d4051e8b5a847b3524ec5a719a920cec775cc
[ "MIT" ]
1
2022-02-09T19:51:03.000Z
2022-02-09T19:51:03.000Z
python/hw5/hw5.py
wladOSnull/first_jira
250d4051e8b5a847b3524ec5a719a920cec775cc
[ "MIT" ]
null
null
null
import os, sys, sqlite3 ### vars ################################################## db_file1 = 'hw5_example.db' db_file2 = 'demo.db' db = os.path.join(os.path.dirname(__file__), db_file2) conn = sqlite3.connect(db) cur = conn.cursor() serv_port = sys.argv[1] serv_proj = sys.argv[2] serv_name = sys.argv[3] ### funct...
29.887218
89
0.611572
import os, sys, sqlite3
true
true
1c29f6f6170652942e41e9e6f45ccbbf64d22b54
19,945
py
Python
pysnmp/XYPLEX-LAT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/XYPLEX-LAT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/XYPLEX-LAT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module XYPLEX-LAT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/XYPLEX-LAT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:40:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
123.881988
2,939
0.776335
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint = mibBuild...
true
true
1c29f719a0251d41fb21d02b96ef5a1ef6d4b58c
5,163
py
Python
test/ensemble_test.py
18756/ITMO_FS
d0465c61b15264812b3455194e8b9eea93b3f550
[ "BSD-3-Clause" ]
null
null
null
test/ensemble_test.py
18756/ITMO_FS
d0465c61b15264812b3455194e8b9eea93b3f550
[ "BSD-3-Clause" ]
null
null
null
test/ensemble_test.py
18756/ITMO_FS
d0465c61b15264812b3455194e8b9eea93b3f550
[ "BSD-3-Clause" ]
null
null
null
import time import unittest import numpy as np from collections import defaultdict from sklearn.datasets import make_classification, make_regression from sklearn.metrics import f1_score from sklearn.model_selection import KFold from sklearn.svm import SVC from ITMO_FS.ensembles.measure_based import * from ITMO_FS.ens...
41.637097
119
0.611079
import time import unittest import numpy as np from collections import defaultdict from sklearn.datasets import make_classification, make_regression from sklearn.metrics import f1_score from sklearn.model_selection import KFold from sklearn.svm import SVC from ITMO_FS.ensembles.measure_based import * from ITMO_FS.ens...
true
true
1c29f7b3ae9833ae6122cd37ca3c253855d0d8c8
12,219
py
Python
readthedocs/oauth/services/github.py
rshrc/readthedocs.org
87079ef75948c3120bbe0bdb4528065af9623749
[ "MIT" ]
null
null
null
readthedocs/oauth/services/github.py
rshrc/readthedocs.org
87079ef75948c3120bbe0bdb4528065af9623749
[ "MIT" ]
1
2021-11-15T17:53:07.000Z
2021-11-15T17:53:07.000Z
readthedocs/oauth/services/github.py
rshrc/readthedocs.org
87079ef75948c3120bbe0bdb4528065af9623749
[ "MIT" ]
null
null
null
"""OAuth utility functions.""" import json import logging import re from allauth.socialaccount.models import SocialToken from allauth.socialaccount.providers.github.views import GitHubOAuth2Adapter from django.conf import settings from django.urls import reverse from requests.exceptions import RequestException from ...
36.693694
87
0.544971
import json import logging import re from allauth.socialaccount.models import SocialToken from allauth.socialaccount.providers.github.views import GitHubOAuth2Adapter from django.conf import settings from django.urls import reverse from requests.exceptions import RequestException from readthedocs.api.v2.client impor...
true
true