hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2e7d9fb93923633f4e151a78651eefc2d0d36792 | 841 | py | Python | src/bp/domain.py | jggomez/Python-Reference-Microservice | 13723c5f5a205bf1f874c44dddbd4cab64839da7 | [
"MIT"
] | 14 | 2020-07-09T22:31:09.000Z | 2022-01-21T23:03:29.000Z | src/bp/domain.py | jggomez/Python-Reference-Microservice | 13723c5f5a205bf1f874c44dddbd4cab64839da7 | [
"MIT"
] | 1 | 2021-02-03T23:51:35.000Z | 2021-02-03T23:51:35.000Z | src/bp/domain.py | jggomez/Python-Reference-Microservice | 13723c5f5a205bf1f874c44dddbd4cab64839da7 | [
"MIT"
] | 6 | 2020-07-10T04:07:11.000Z | 2020-10-04T00:04:30.000Z | from dataclasses import dataclass
from typing_extensions import Final
# Constants
ID: Final = "id"
NAME: Final = "name"
URL_BACKGROUND: Final = "urlbackground"
CODE: Final = "code"
TYPE: Final = "type"
HAS_MEDALS: Final = "hasmedals"
LEVEL: Final = "level"
NAME_LEVEL: Final = "namelevel"
PROGRESSION: Final = "progres... | 21.564103 | 48 | 0.606421 | from dataclasses import dataclass
from typing_extensions import Final
# Constants
ID: Final = "id"
NAME: Final = "name"
URL_BACKGROUND: Final = "urlbackground"
CODE: Final = "code"
TYPE: Final = "type"
HAS_MEDALS: Final = "hasmedals"
LEVEL: Final = "level"
NAME_LEVEL: Final = "namelevel"
PROGRESSION: Final = "progres... | 299 | 168 | 22 |
180b8061f6ddde6d89c5f92f515db94b94f06374 | 23,348 | py | Python | tests/integration/test_hooks_github.py | aavcc/taiga-openshift | 7c33284573ceed38f755b8159ad83f3f68d2f7cb | [
"MIT"
] | null | null | null | tests/integration/test_hooks_github.py | aavcc/taiga-openshift | 7c33284573ceed38f755b8159ad83f3f68d2f7cb | [
"MIT"
] | 12 | 2019-11-25T14:08:32.000Z | 2021-06-24T10:35:51.000Z | tests/integration/test_hooks_github.py | threefoldtech/Threefold-Circles | cbc433796b25cf7af9a295af65d665a4a279e2d6 | [
"Apache-2.0"
] | 1 | 2018-06-07T10:58:15.000Z | 2018-06-07T10:58:15.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# Copyright (C) 2014-2017 Anler Hernández ... | 37.658065 | 147 | 0.684256 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# Copyright (C) 2014-2017 Anler Hernández ... | 20,817 | 0 | 598 |
eb161353e603201191dc9cea20c9382bbb35662d | 4,600 | py | Python | mrcnn/prediction_detection.py | Stephen-HWJ/Mask_RCNN | 4994683c5d694221b00a6b8470e78555c31bfc87 | [
"MIT"
] | null | null | null | mrcnn/prediction_detection.py | Stephen-HWJ/Mask_RCNN | 4994683c5d694221b00a6b8470e78555c31bfc87 | [
"MIT"
] | null | null | null | mrcnn/prediction_detection.py | Stephen-HWJ/Mask_RCNN | 4994683c5d694221b00a6b8470e78555c31bfc87 | [
"MIT"
] | null | null | null | import os
import sys
import random
import math
import re
import time
import numpy as np
import tensorflow as tf
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import shutil
import glob
import os.path as osp
# Root directory of the project
ROOT_DIR = os.path.abspa... | 31.081081 | 132 | 0.707391 | import os
import sys
import random
import math
import re
import time
import numpy as np
import tensorflow as tf
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import shutil
import glob
import os.path as osp
# Root directory of the project
ROOT_DIR = os.path.abspa... | 0 | 304 | 48 |
b3002caf6fad62fa4323c65c68724aa877cc6ad3 | 2,953 | py | Python | kyu_6/count_letters_in_string/test_count_letters_in_string.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 1 | 2022-02-12T05:56:04.000Z | 2022-02-12T05:56:04.000Z | kyu_6/count_letters_in_string/test_count_letters_in_string.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 182 | 2020-04-30T00:51:36.000Z | 2021-09-07T04:15:05.000Z | kyu_6/count_letters_in_string/test_count_letters_in_string.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 4 | 2020-04-29T22:04:20.000Z | 2021-07-13T20:04:14.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
# FUNDAMENTALS STRINGS HASHES DATA STRUCTURES
import unittest
import allure
from utils.log_func import print_log
from kyu_6.count_letters_in_string.count_letters_in_string import letter_count
@allu... | 34.741176 | 94 | 0.552997 | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
# FUNDAMENTALS STRINGS HASHES DATA STRUCTURES
import unittest
import allure
from utils.log_func import print_log
from kyu_6.count_letters_in_string.count_letters_in_string import letter_count
@allu... | 0 | 0 | 0 |
4f16a3131b11e34227efd2b6d285bf5071c9a537 | 2,895 | py | Python | torch/nested/_nestedtensor.py | jiyuanzFB/pytorch | d047e475f830631d8fcc877ea17eac8fb34748d7 | [
"Intel"
] | 1 | 2022-03-08T14:43:39.000Z | 2022-03-08T14:43:39.000Z | torch/nested/_nestedtensor.py | jiyuanzFB/pytorch | d047e475f830631d8fcc877ea17eac8fb34748d7 | [
"Intel"
] | null | null | null | torch/nested/_nestedtensor.py | jiyuanzFB/pytorch | d047e475f830631d8fcc877ea17eac8fb34748d7 | [
"Intel"
] | null | null | null | import torch
from functools import wraps
@wraps(torch._nested_tensor)
# TODO: This entire class is not really necessary now that NestedTensor lives
# in tree; before it lived out of tree and there was no way to conveniently
# override the string printing behavior. Now that we are in tree, we can
# directly overrid... | 27.056075 | 82 | 0.543351 | import torch
from functools import wraps
@wraps(torch._nested_tensor)
def nested_tensor(*args, **kwargs):
return NestedTensor(torch._nested_tensor(*args, **kwargs))
# TODO: This entire class is not really necessary now that NestedTensor lives
# in tree; before it lived out of tree and there was no way to conven... | 895 | 1,494 | 44 |
9429614cea37db85cc533b5f30311212d8acc0b1 | 2,918 | py | Python | divia_api/stop.py | filau/pda_demo | fa7095bba31b1a74ad05add7c7827df9641f0210 | [
"BSD-3-Clause"
] | null | null | null | divia_api/stop.py | filau/pda_demo | fa7095bba31b1a74ad05add7c7827df9641f0210 | [
"BSD-3-Clause"
] | null | null | null | divia_api/stop.py | filau/pda_demo | fa7095bba31b1a74ad05add7c7827df9641f0210 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
"""
stop.py
divia_api is a Python library that allows to retrieve the timetable
of Divia’s bus and tramways straight from a Python script.
Copyright (C) 2021 Firmin Launay
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publ... | 37.896104 | 160 | 0.620288 | # coding=utf-8
"""
stop.py
divia_api is a Python library that allows to retrieve the timetable
of Divia’s bus and tramways straight from a Python script.
Copyright (C) 2021 Firmin Launay
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publ... | 1,193 | 760 | 23 |
3b9395c7e5a302b543a851cb1d2f5ab62adda620 | 5,544 | py | Python | bitrix24_bridge/amqp/amqp.py | initflow/bitrix24-bridge-oscar | fd50985fa354a92d7163055c9e3adfd5c4f4d7a9 | [
"BSD-3-Clause"
] | null | null | null | bitrix24_bridge/amqp/amqp.py | initflow/bitrix24-bridge-oscar | fd50985fa354a92d7163055c9e3adfd5c4f4d7a9 | [
"BSD-3-Clause"
] | 13 | 2020-02-12T00:58:41.000Z | 2022-03-11T23:53:16.000Z | bitrix24_bridge/amqp/amqp.py | initflow/bitrix24-bridge-oscar | fd50985fa354a92d7163055c9e3adfd5c4f4d7a9 | [
"BSD-3-Clause"
] | null | null | null | import functools
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
import pika
import ujson
from django.conf import settings
from typing import Callable, Any, Optional, List
"""
BB = Bitrix24 Bridge
"""
def get_var(name) -> Callable[[], Optional[Any]]:
"""
Safe wraper over setting... | 31.146067 | 109 | 0.674784 | import functools
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
import pika
import ujson
from django.conf import settings
from typing import Callable, Any, Optional, List
"""
BB = Bitrix24 Bridge
"""
def get_var(name) -> Callable[[], Optional[Any]]:
"""
Safe wraper over setting... | 2,378 | 2,545 | 90 |
d838e226a7de7b9cd782061fb6f64b3134bc06cc | 3,053 | py | Python | setup.py | jay-johnson/antinex-client | 76a3cfbe8a8d174d87aba37de3d8acaf8c4864ba | [
"Apache-2.0"
] | 5 | 2018-03-24T08:12:36.000Z | 2019-09-10T14:38:36.000Z | setup.py | jay-johnson/antinex-client | 76a3cfbe8a8d174d87aba37de3d8acaf8c4864ba | [
"Apache-2.0"
] | 1 | 2020-06-03T13:40:22.000Z | 2020-09-05T12:53:22.000Z | setup.py | jay-johnson/antinex-client | 76a3cfbe8a8d174d87aba37de3d8acaf8c4864ba | [
"Apache-2.0"
] | null | null | null | import os
import sys
import warnings
import unittest
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from setuptools.command.test import test as TestCommand
"""
https://packaging.python.org/guides/making-a-pypi-friendly-readme/
check the README.rst works on pypi as th... | 26.780702 | 77 | 0.651163 | import os
import sys
import warnings
import unittest
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def in... | 268 | 133 | 23 |
d88c3550018e2ef9933db5e686b6cf597d8637e6 | 441 | py | Python | lambdas/setup_upload_artifacts/genpath.py | aws-samples/aws-bikenow-demo | aec204b446910022985ba5e1731a24ddcfb6fcac | [
"MIT-0"
] | 16 | 2020-03-26T16:05:26.000Z | 2021-11-04T20:00:53.000Z | lambdas/setup_upload_artifacts/genpath.py | aws-samples/aws-bikenow-demo | aec204b446910022985ba5e1731a24ddcfb6fcac | [
"MIT-0"
] | 1 | 2022-02-27T10:55:00.000Z | 2022-02-27T10:55:00.000Z | lambdas/setup_upload_artifacts/genpath.py | aws-samples/aws-bikenow-demo | aec204b446910022985ba5e1731a24ddcfb6fcac | [
"MIT-0"
] | 6 | 2020-06-08T11:43:40.000Z | 2021-01-09T20:31:08.000Z | import json
import os
from os import listdir
from os.path import isfile, join
SCRIPT_BUCKET = 'mybucket'
SCRIPT_FOLDER = 'artifacts'
# Copy Glue script files to S3 bucket
script_path = 'artifacts'
#my_bucket = s3.Bucket(SCRIPT_BUCKET)
for path, subdirs, files in os.walk(script_path):
path = path.replace("\\","/")
... | 24.5 | 52 | 0.734694 | import json
import os
from os import listdir
from os.path import isfile, join
SCRIPT_BUCKET = 'mybucket'
SCRIPT_FOLDER = 'artifacts'
# Copy Glue script files to S3 bucket
script_path = 'artifacts'
#my_bucket = s3.Bucket(SCRIPT_BUCKET)
for path, subdirs, files in os.walk(script_path):
path = path.replace("\\","/")
... | 0 | 0 | 0 |
dd2a6ae145b8d2bc6728daea6b5f1f476832af35 | 1,313 | py | Python | Zadania1/3_zadanie.py | ViktoriaGallikova/basic-python | 71152f9a1de0e863428e1dd4f4784c129543d015 | [
"MIT"
] | null | null | null | Zadania1/3_zadanie.py | ViktoriaGallikova/basic-python | 71152f9a1de0e863428e1dd4f4784c129543d015 | [
"MIT"
] | null | null | null | Zadania1/3_zadanie.py | ViktoriaGallikova/basic-python | 71152f9a1de0e863428e1dd4f4784c129543d015 | [
"MIT"
] | null | null | null | # Sekvencia DNA sa skladá zo štyroch typov nukleových báz (A, C, G, T). Relatívna početnosť bázy vyjadruje, aká časť sekvencie je tvorená daným typom bázy (počet výskytov bázy / dĺžka sekvencie). Súčet relatívnej početnosti je teda vždy rovna 1.
# Napíšte definíciu funkcie funkcia3, ktorá zoberie ako parameter sekvenci... | 45.275862 | 294 | 0.675552 | # Sekvencia DNA sa skladá zo štyroch typov nukleových báz (A, C, G, T). Relatívna početnosť bázy vyjadruje, aká časť sekvencie je tvorená daným typom bázy (počet výskytov bázy / dĺžka sekvencie). Súčet relatívnej početnosti je teda vždy rovna 1.
# Napíšte definíciu funkcie funkcia3, ktorá zoberie ako parameter sekvenci... | 0 | 0 | 0 |
8bcb83df4019ec4e0aba861e8793a5b4505212d3 | 312 | py | Python | MITx6002/Lec7Exc3.py | osamadel/Python | 6c7e26a96d4b8f875755de98f16eba89e81d94d2 | [
"MIT"
] | null | null | null | MITx6002/Lec7Exc3.py | osamadel/Python | 6c7e26a96d4b8f875755de98f16eba89e81d94d2 | [
"MIT"
] | null | null | null | MITx6002/Lec7Exc3.py | osamadel/Python | 6c7e26a96d4b8f875755de98f16eba89e81d94d2 | [
"MIT"
] | null | null | null |
L = ['apples', 'oranges', 'kiwis', 'pineapples']
print(stdDevOfLengths(L)) | 26 | 56 | 0.528846 | def stdDevOfLengths(L):
N = len(L)
std = 0
if N == 0:
return float('NaN')
mean = sum(list(map(lambda x: len(x),L))) / float(N)
for item in L:
std += (len(item) - mean) ** 2
return (std / N) ** 0.5
L = ['apples', 'oranges', 'kiwis', 'pineapples']
print(stdDevOfLengths(L)) | 215 | 0 | 22 |
2b2ba3652a6b9cdf4b3663e5f95cf9ff4429b79c | 9,352 | py | Python | nuqql/conversation/history.py | hwipl/nuqql | 410ea5bd42e455d656b1b34612c3b0d5a0b433ef | [
"MIT"
] | 3 | 2019-04-15T18:33:36.000Z | 2019-04-21T19:18:10.000Z | nuqql/conversation/history.py | hwipl/nuqql | 410ea5bd42e455d656b1b34612c3b0d5a0b433ef | [
"MIT"
] | 15 | 2019-04-15T18:35:56.000Z | 2019-09-14T08:24:32.000Z | nuqql/conversation/history.py | hwipl/nuqql | 410ea5bd42e455d656b1b34612c3b0d5a0b433ef | [
"MIT"
] | 1 | 2019-06-16T12:00:30.000Z | 2019-06-16T12:00:30.000Z | """
History: (file) logging for nuqql conversations
"""
import datetime
import logging
import pathlib
import os
from typing import List, Optional, TYPE_CHECKING
import nuqql.config
from .logmessage import LogMessage
if TYPE_CHECKING: # imports for typing
# pylint: disable=cyclic-import
from .conversation ... | 33.519713 | 78 | 0.561591 | """
History: (file) logging for nuqql conversations
"""
import datetime
import logging
import pathlib
import os
from typing import List, Optional, TYPE_CHECKING
import nuqql.config
from .logmessage import LogMessage
if TYPE_CHECKING: # imports for typing
# pylint: disable=cyclic-import
from .conversation ... | 237 | 0 | 27 |
0340153eb1fc71ee60959c63e72695c6b41b4de0 | 22,086 | py | Python | public/yum-3.2.28/yum/rpmtrans.py | chillaxor/blogbin | 211202d513fa80a3d22fb3963f36a01a8dec5b68 | [
"MIT"
] | 8 | 2021-11-26T06:19:06.000Z | 2022-01-11T01:30:11.000Z | initrd/usr/lib/python2.6/site-packages/yum/rpmtrans.py | OpenCloudOS/OpenCloudOS-tools | 06b12aab3182f4207d78a5d8733be03f0d7b69a4 | [
"MulanPSL-1.0"
] | 5 | 2021-02-02T08:17:10.000Z | 2022-02-27T06:53:42.000Z | public/yum-3.2.28/yum/rpmtrans.py | chillaxor/blogbin | 211202d513fa80a3d22fb3963f36a01a8dec5b68 | [
"MIT"
] | 2 | 2021-12-21T08:36:02.000Z | 2021-12-21T08:55:38.000Z | #!/usr/bin/python -t
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it... | 38.883803 | 99 | 0.566241 | #!/usr/bin/python -t
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it... | 12,047 | 7,436 | 267 |
a3ff02be149a9bc975912b020d952fc202992fa1 | 6,662 | py | Python | Code/0_only_conditioning_to_global_features/util_scripts.py | SCRFpublic/GeoModeling_Conditional_ProGAN | fb8df86f555fa19572ba7fd9ae719ede5cd961ff | [
"MIT"
] | 8 | 2020-06-30T02:39:17.000Z | 2022-03-17T07:14:11.000Z | Code/0_only_conditioning_to_global_features/util_scripts.py | SuihongSong/GeoModeling_Conditional_ProGAN | 1ad99865743e161811d46ac96972885432d575e6 | [
"MIT"
] | null | null | null | Code/0_only_conditioning_to_global_features/util_scripts.py | SuihongSong/GeoModeling_Conditional_ProGAN | 1ad99865743e161811d46ac96972885432d575e6 | [
"MIT"
] | 6 | 2020-08-29T01:04:41.000Z | 2022-01-04T06:04:30.000Z | import os
import time
import re
import bisect
from collections import OrderedDict
import numpy as np
import tensorflow as tf
import scipy.ndimage
import scipy.misc
import config
import misc
import tfutil
import train
import dataset
#----------------------------------------------------------------------------
# Genera... | 52.046875 | 239 | 0.641099 | import os
import time
import re
import bisect
from collections import OrderedDict
import numpy as np
import tensorflow as tf
import scipy.ndimage
import scipy.misc
import config
import misc
import tfutil
import train
import dataset
#----------------------------------------------------------------------------
# Genera... | 5,668 | 0 | 70 |
e6a4498e34d586e63ac231efaeaa708038779a59 | 663 | py | Python | sparse_causal_model_learner_rl/loss/autoencoder.py | sergeivolodin/causality-disentanglement-rl | 5a41b4a2e3d85fa7e9c8450215fdc6cf954df867 | [
"CC0-1.0"
] | 2 | 2020-12-11T05:26:24.000Z | 2021-04-21T06:12:58.000Z | sparse_causal_model_learner_rl/loss/autoencoder.py | sergeivolodin/causality-disentanglement-rl | 5a41b4a2e3d85fa7e9c8450215fdc6cf954df867 | [
"CC0-1.0"
] | 9 | 2020-04-30T16:29:50.000Z | 2021-03-26T07:32:18.000Z | sparse_causal_model_learner_rl/loss/autoencoder.py | sergeivolodin/causality-disentanglement-rl | 5a41b4a2e3d85fa7e9c8450215fdc6cf954df867 | [
"CC0-1.0"
] | null | null | null | import gin
import torch
@gin.configurable
def pow_loss(X, X_true, power=2, **kwargs):
"""Difference between items to a power, avg over dataset, sum over items."""
assert X.shape == X_true.shape, (X.shape, X_true.shape)
abs_diff = torch.abs(X - X_true)
loss = torch.pow(abs_diff, power)
# ... | 26.52 | 81 | 0.653092 | import gin
import torch
@gin.configurable
def pow_loss(X, X_true, power=2, **kwargs):
"""Difference between items to a power, avg over dataset, sum over items."""
assert X.shape == X_true.shape, (X.shape, X_true.shape)
abs_diff = torch.abs(X - X_true)
loss = torch.pow(abs_diff, power)
# ... | 0 | 0 | 0 |
35704a18f20d0f4295ef668109534846720c2409 | 405 | py | Python | funolympics/migrations/0002_auto_20200522_1531.py | codeema/Yokiyo | 2e710bca487ee393784c116b7db2db7337f73d40 | [
"MIT"
] | null | null | null | funolympics/migrations/0002_auto_20200522_1531.py | codeema/Yokiyo | 2e710bca487ee393784c116b7db2db7337f73d40 | [
"MIT"
] | 6 | 2020-05-20T15:29:55.000Z | 2021-09-08T02:02:43.000Z | funolympics/migrations/0002_auto_20200522_1531.py | codeema/Yokiyo | 2e710bca487ee393784c116b7db2db7337f73d40 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-05-22 15:31
from django.db import migrations, models
| 21.315789 | 75 | 0.604938 | # Generated by Django 3.0.6 on 2020-05-22 15:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('funolympics', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='blog',
name='blogimage',
... | 0 | 291 | 23 |
a700309f30bff5775f2751480b9a77e37e2435af | 5,731 | py | Python | b4sacr.py | DarthLayer/CapitalCalculator | 8d637e0dd68edaec33f9c96b505889c64b3df15f | [
"MIT"
] | 2 | 2018-01-04T20:44:04.000Z | 2018-11-01T09:54:33.000Z | b4sacr.py | DarthLayer/CapitalCalculator | 8d637e0dd68edaec33f9c96b505889c64b3df15f | [
"MIT"
] | null | null | null | b4sacr.py | DarthLayer/CapitalCalculator | 8d637e0dd68edaec33f9c96b505889c64b3df15f | [
"MIT"
] | null | null | null | """
Basel IV Standardised Approach to Credit Risk.py (b4sacr.py)
----------------
This package encapsulates the Basel Committee on Bank Supervision's finalisation of Basel III
for standardised credit risk.
The text is found at https://www.bis.org/bcbs/publ/d424.htm
This will serve as the foundation of any Basel 4 impa... | 39.253425 | 116 | 0.558367 | """
Basel IV Standardised Approach to Credit Risk.py (b4sacr.py)
----------------
This package encapsulates the Basel Committee on Bank Supervision's finalisation of Basel III
for standardised credit risk.
The text is found at https://www.bis.org/bcbs/publ/d424.htm
This will serve as the foundation of any Basel 4 impa... | 4,107 | 0 | 54 |
fb4d06256f950ae197b74762203759121b1aa3dc | 8,646 | py | Python | bbp/utils/batch/bbp_converge.py | ZhangHCFJEA/bbp | 33bd999cf8d719c49f9a904872c62f02eb5850d1 | [
"BSD-3-Clause"
] | 28 | 2017-10-31T09:16:30.000Z | 2022-02-28T23:44:29.000Z | bbp/utils/batch/bbp_converge.py | ZhangHCFJEA/bbp | 33bd999cf8d719c49f9a904872c62f02eb5850d1 | [
"BSD-3-Clause"
] | 37 | 2017-05-23T15:15:35.000Z | 2022-02-05T09:13:18.000Z | bbp/utils/batch/bbp_converge.py | ZhangHCFJEA/bbp | 33bd999cf8d719c49f9a904872c62f02eb5850d1 | [
"BSD-3-Clause"
] | 26 | 2017-09-21T17:43:33.000Z | 2021-11-29T06:34:30.000Z | #!/usr/bin/env python
"""
Copyright 2010-2019 University Of Southern California
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... | 34.862903 | 94 | 0.614157 | #!/usr/bin/env python
"""
Copyright 2010-2019 University Of Southern California
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... | 0 | 0 | 0 |
8039d0bc14c0f908d62088df4ee384c5c13e5f06 | 1,704 | py | Python | devilry/apps/core/models/__init__.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 29 | 2015-01-18T22:56:23.000Z | 2020-11-10T21:28:27.000Z | devilry/apps/core/models/__init__.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 786 | 2015-01-06T16:10:18.000Z | 2022-03-16T11:10:50.000Z | devilry/apps/core/models/__init__.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 15 | 2015-04-06T06:18:43.000Z | 2021-02-24T12:28:30.000Z | from .abstract_is_admin import AbstractIsAdmin
from .abstract_is_examiner import AbstractIsExaminer
from .abstract_is_candidate import AbstractIsCandidate
from .basenode import BaseNode
from .subject import Subject
from .period import Period, PeriodApplicationKeyValue
from .period_tag import PeriodTag
from .relateduser... | 53.25 | 109 | 0.814554 | from .abstract_is_admin import AbstractIsAdmin
from .abstract_is_examiner import AbstractIsExaminer
from .abstract_is_candidate import AbstractIsCandidate
from .basenode import BaseNode
from .subject import Subject
from .period import Period, PeriodApplicationKeyValue
from .period_tag import PeriodTag
from .relateduser... | 0 | 0 | 0 |
6c23ab9b4be608106c13982dd7e9c7f2ae389499 | 13,591 | py | Python | sdk/redis/azure-mgmt-redis/tests/test_cli_mgmt_redis.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/redis/azure-mgmt-redis/tests/test_cli_mgmt_redis.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/redis/azure-mgmt-redis/tests/test_cli_mgmt_redis.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------------... | 44.854785 | 198 | 0.452579 | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------------... | 12,426 | 196 | 23 |
5eddc88d8268ee6a26346c3f53c14bb8f057cbc0 | 790 | py | Python | hardhat/recipes/gmime.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/gmime.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/gmime.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | from .base import GnuRecipe
| 37.619048 | 68 | 0.586076 | from .base import GnuRecipe
class GMimeRecipe(GnuRecipe):
def __init__(self, *args, **kwargs):
super(GMimeRecipe, self).__init__(*args, **kwargs)
self.sha256 = '75ec6033f9192488ff37745792c107b3' \
'd0ab0a36c2d3e4f732901a771755d7e0'
# self.depends = ['gobject-introspect... | 704 | 8 | 49 |
5c58439ee9959d6f9631b302618c291c2126ccbd | 6,260 | py | Python | Practicas/Practica_07/codigoFuente/src/indexados.py | CodeRevenge/Proyecto-seminario-traductores-i | a5c6a500a6be8d5a1b24b4ecacd73e6f67a34041 | [
"MIT"
] | null | null | null | Practicas/Practica_07/codigoFuente/src/indexados.py | CodeRevenge/Proyecto-seminario-traductores-i | a5c6a500a6be8d5a1b24b4ecacd73e6f67a34041 | [
"MIT"
] | null | null | null | Practicas/Practica_07/codigoFuente/src/indexados.py | CodeRevenge/Proyecto-seminario-traductores-i | a5c6a500a6be8d5a1b24b4ecacd73e6f67a34041 | [
"MIT"
] | null | null | null | from bitstring import Bits
from baseconvert import base
from src.funcionalidades import Funcionalidad
| 33.655914 | 136 | 0.503674 | from bitstring import Bits
from baseconvert import base
from src.funcionalidades import Funcionalidad
class Indexados(Funcionalidad):
def __init__(self):
Funcionalidad.__init__(self)
self.R_X = '00'
self.R_Y = '01'
self.R_SP = '10'
self.R_PC = '11'
self.REGISTRO_A ... | 5,844 | 10 | 300 |
f076ccc3477f3a026008f48bbcf3c7e496ea44d6 | 1,459 | py | Python | Application.py | ReedGraff/High-Low | c8ba0339d7818e344cacf9a73a83d24dc539c2ca | [
"MIT"
] | 1 | 2022-01-06T05:50:53.000Z | 2022-01-06T05:50:53.000Z | Application.py | ReedGraff/High-Low | c8ba0339d7818e344cacf9a73a83d24dc539c2ca | [
"MIT"
] | null | null | null | Application.py | ReedGraff/High-Low | c8ba0339d7818e344cacf9a73a83d24dc539c2ca | [
"MIT"
] | null | null | null | import Bot # This is the local Python Module that we made
# Initialization
bot_1 = Bot.Bot("ya boi", "just got bamboozled", "Bot_1")
# Find Functionality
find_input = {
"function_name": "One_Stock",
"parameters": [
"FIS"
]
}
find_output = bot_1.Find(find_input)
# Finance Functionality
finance_inp... | 19.197368 | 113 | 0.67512 | import Bot # This is the local Python Module that we made
# Initialization
bot_1 = Bot.Bot("ya boi", "just got bamboozled", "Bot_1")
# Find Functionality
find_input = {
"function_name": "One_Stock",
"parameters": [
"FIS"
]
}
find_output = bot_1.Find(find_input)
# Finance Functionality
finance_inp... | 0 | 0 | 0 |
667ea3dbd8baf0753a75fcb05bd9436ff06b3e79 | 118 | py | Python | tests/conftest.py | jgirardet/qmlbot | 37eb46b3c5c6b0886b2b64a00b71ecd609bd896b | [
"MIT"
] | null | null | null | tests/conftest.py | jgirardet/qmlbot | 37eb46b3c5c6b0886b2b64a00b71ecd609bd896b | [
"MIT"
] | null | null | null | tests/conftest.py | jgirardet/qmlbot | 37eb46b3c5c6b0886b2b64a00b71ecd609bd896b | [
"MIT"
] | null | null | null | from pathlib import Path
import pytest
@pytest.fixture | 16.857143 | 45 | 0.754237 | from pathlib import Path
import pytest
@pytest.fixture
def dir_test():
return Path(__file__).parent / "dir_test" | 40 | 0 | 22 |
0705ee39b935392e5ad1eb56149463ca5a4842d9 | 10,251 | py | Python | nodes/visualise_with_mocapped_tag.py | wtabib/extrinsics_calibrator | b0957e45e9c1c09e60ec115c1ec94991a0b338a0 | [
"BSD-3-Clause"
] | 3 | 2020-10-10T21:19:02.000Z | 2022-03-06T06:42:53.000Z | nodes/visualise_with_mocapped_tag.py | wtabib/extrinsics_calibrator | b0957e45e9c1c09e60ec115c1ec94991a0b338a0 | [
"BSD-3-Clause"
] | null | null | null | nodes/visualise_with_mocapped_tag.py | wtabib/extrinsics_calibrator | b0957e45e9c1c09e60ec115c1ec94991a0b338a0 | [
"BSD-3-Clause"
] | 1 | 2019-09-05T21:39:55.000Z | 2019-09-05T21:39:55.000Z | #!/usr/bin/env python2.7
import numpy as np
import sys
import cv2
import tf
import pdb
import yaml
import rosbag
import rospy
from sensor_msgs.msg import Image
from nav_msgs.msg import Odometry
from message_filters import ApproximateTimeSynchronizer, Subscriber
from cv_bridge import CvBridge
from apriltag_tracker._Ap... | 40.517787 | 135 | 0.581504 | #!/usr/bin/env python2.7
import numpy as np
import sys
import cv2
import tf
import pdb
import yaml
import rosbag
import rospy
from sensor_msgs.msg import Image
from nav_msgs.msg import Odometry
from message_filters import ApproximateTimeSynchronizer, Subscriber
from cv_bridge import CvBridge
from apriltag_tracker._Ap... | 7,414 | 0 | 92 |
ca3f25ac2cef6d613b36315d25c655d910c24d48 | 2,969 | py | Python | cloudscale/__init__.py | resmo/python-cloudscale | e194e3f74c4df549e59781861d4a0a1e1abf62fc | [
"MIT"
] | 6 | 2019-11-21T15:08:58.000Z | 2019-12-18T07:46:01.000Z | cloudscale/__init__.py | resmo/python-cloudscale | e194e3f74c4df549e59781861d4a0a1e1abf62fc | [
"MIT"
] | 15 | 2019-11-26T19:48:12.000Z | 2020-05-01T14:52:07.000Z | cloudscale/__init__.py | resmo/python-cloudscale | e194e3f74c4df549e59781861d4a0a1e1abf62fc | [
"MIT"
] | null | null | null | import os
import configparser
from .client import RestAPI
from .lib.server import Server
from .lib.server_group import ServerGroup
from .lib.volume import Volume
from .lib.flavor import Flavor
from .lib.floating_ip import FloatingIp
from .lib.image import Image
from .lib.region import Region
from .lib.network import Ne... | 29.989899 | 124 | 0.617043 | import os
import configparser
from .client import RestAPI
from .lib.server import Server
from .lib.server_group import ServerGroup
from .lib.volume import Volume
from .lib.flavor import Flavor
from .lib.floating_ip import FloatingIp
from .lib.image import Image
from .lib.region import Region
from .lib.network import Ne... | 2,234 | -4 | 104 |
8a1860b58ec96d9c88266a6269a225c2b2a8da79 | 3,458 | py | Python | zulip_bots/zulip_bots/bots/google_translate/test_google_translate.py | iishiishii/python-zulip-api | 8500a3238739a080e1809e204c54685437631457 | [
"Apache-2.0"
] | null | null | null | zulip_bots/zulip_bots/bots/google_translate/test_google_translate.py | iishiishii/python-zulip-api | 8500a3238739a080e1809e204c54685437631457 | [
"Apache-2.0"
] | null | null | null | zulip_bots/zulip_bots/bots/google_translate/test_google_translate.py | iishiishii/python-zulip-api | 8500a3238739a080e1809e204c54685437631457 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import patch
from requests.exceptions import ConnectionError
from zulip_bots.test_lib import BotTestCase, DefaultTests, StubBotHandler
from zulip_bots.bots.google_translate.google_translate import TranslateError
help_text = '''
Google translate bot
Please format your message like:
`@-mention "<text... | 41.662651 | 95 | 0.637363 | from unittest.mock import patch
from requests.exceptions import ConnectionError
from zulip_bots.test_lib import BotTestCase, DefaultTests, StubBotHandler
from zulip_bots.bots.google_translate.google_translate import TranslateError
help_text = '''
Google translate bot
Please format your message like:
`@-mention "<text... | 2,472 | 494 | 23 |
6179c834456ca775447618cab2027627c767201c | 273 | py | Python | Model/opportunity.py | AIESECMX/ESPO_EXPA_CRM | c9c6d96b523380be0f7df2a02605d744ff3b681b | [
"MIT"
] | null | null | null | Model/opportunity.py | AIESECMX/ESPO_EXPA_CRM | c9c6d96b523380be0f7df2a02605d744ff3b681b | [
"MIT"
] | null | null | null | Model/opportunity.py | AIESECMX/ESPO_EXPA_CRM | c9c6d96b523380be0f7df2a02605d744ff3b681b | [
"MIT"
] | null | null | null | class Opp(object):
"""docstring for MC"""
| 24.818182 | 74 | 0.681319 | class Opp(object):
"""docstring for MC"""
def __init__(self, name, expa_id=0,espo_id=0, lc_id = 0, enabler_id = 0):
super(Opp, self).__init__()
self.name = name
self.expa_id = expa_id
self.espo_id = espo_id
self.lc_id = lc_id
self.enabler_id = enabler_id
| 203 | 0 | 23 |
be93709076b8fd49f51637fdf96cf29c49322281 | 2,219 | py | Python | etl/etl.py | Ayazdi/MNIST_ANN | 1419edcee275503030b418f0a64e094edffaa1b0 | [
"MIT"
] | 8 | 2020-05-21T18:57:57.000Z | 2021-05-18T22:27:52.000Z | etl/etl.py | Ayazdi/MNIST_ANN | 1419edcee275503030b418f0a64e094edffaa1b0 | [
"MIT"
] | 5 | 2020-05-18T13:56:12.000Z | 2020-05-18T15:31:33.000Z | etl/etl.py | Ayazdi/MNIST_ANN | 1419edcee275503030b418f0a64e094edffaa1b0 | [
"MIT"
] | 1 | 2020-08-16T16:09:16.000Z | 2020-08-16T16:09:16.000Z | import pandas as pd
from sqlalchemy import create_engine, exc
from load_transform import extract_from_mongodb, extract_data_from_json
from bert_model import load_bert_model, sentiment_prediction
from logo_detection_model import logo_detection
import time
import logging
from config import POSTGRES, TAG
# Pos... | 38.929825 | 107 | 0.658855 | import pandas as pd
from sqlalchemy import create_engine, exc
from load_transform import extract_from_mongodb, extract_data_from_json
from bert_model import load_bert_model, sentiment_prediction
from logo_detection_model import logo_detection
import time
import logging
from config import POSTGRES, TAG
# Pos... | 0 | 0 | 0 |
885c681e43f4eeb9bf3d35d5cbd928330055e951 | 3,110 | py | Python | selenium_tests/CanonizerHelpPage.py | the-canonizer/MEAN_System | 59bc6001cdb1346a1114aefec4178a464fc6e22c | [
"MIT"
] | null | null | null | selenium_tests/CanonizerHelpPage.py | the-canonizer/MEAN_System | 59bc6001cdb1346a1114aefec4178a464fc6e22c | [
"MIT"
] | null | null | null | selenium_tests/CanonizerHelpPage.py | the-canonizer/MEAN_System | 59bc6001cdb1346a1114aefec4178a464fc6e22c | [
"MIT"
] | null | null | null | from CanonizerBase import Page
from Identifiers import HelpIdentifiers
| 36.588235 | 96 | 0.700643 | from CanonizerBase import Page
from Identifiers import HelpIdentifiers
class CanonizerHelpPage(Page):
def check_what_is_canonizer_help_page_loaded(self):
"""
This function verifies if the canonizer help page loads properly.
:return:
"""
title = self.find_element(*HelpIdent... | 0 | 3,012 | 23 |
683ca57b14bb5cb2c8ec809d20ecf08151387bef | 478 | py | Python | feewaiver/migrations/0037_park_entrance_fee.py | dbca-wa/feewaiver | 7938a0e9d18924c12b27c0a411b6d7eccb40166b | [
"Apache-2.0"
] | null | null | null | feewaiver/migrations/0037_park_entrance_fee.py | dbca-wa/feewaiver | 7938a0e9d18924c12b27c0a411b6d7eccb40166b | [
"Apache-2.0"
] | 12 | 2021-02-24T02:33:01.000Z | 2022-01-25T02:37:39.000Z | feewaiver/migrations/0037_park_entrance_fee.py | mintcoding/feewaiver | 47d69db91386f760dd36d87cbb565a9bb72a27d5 | [
"Apache-2.0"
] | 1 | 2021-01-08T02:15:27.000Z | 2021-01-08T02:15:27.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-01-05 02:27
from __future__ import unicode_literals
from django.db import migrations, models
| 22.761905 | 68 | 0.638075 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-01-05 02:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('feewaiver', '0036_feewaivervisit_number_of_participants'),
]
operations = [
... | 0 | 298 | 23 |
c332a7841140f2f68889e6ccef881d02c241cce1 | 14,689 | py | Python | doc8/tests/test_main.py | dependent-type/doc8 | 4b57d2e438021e1785ada9c3723d18a52dd0fff7 | [
"Apache-2.0"
] | 1 | 2019-07-12T10:49:29.000Z | 2019-07-12T10:49:29.000Z | doc8/tests/test_main.py | dependent-type/doc8 | 4b57d2e438021e1785ada9c3723d18a52dd0fff7 | [
"Apache-2.0"
] | 2 | 2019-07-12T11:02:18.000Z | 2020-02-07T15:25:52.000Z | doc8/tests/test_main.py | dependent-type/doc8 | 4b57d2e438021e1785ada9c3723d18a52dd0fff7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from mock import patch, MagicMock
import os
import six
import shutil
import sys
import testtools
from doc8.main import main, doc8
# Location to create test files
TMPFS_DIR_NAME = ".tmp"
# Expected output
OUTPUT_CMD_NO_QUIET = """\
Scanning...
Validating...
{path}/invalid.rst:1: D002 Trailin... | 34.240093 | 88 | 0.579345 | # -*- coding: utf-8 -*-
from mock import patch, MagicMock
import os
import six
import shutil
import sys
import testtools
from doc8.main import main, doc8
# Location to create test files
TMPFS_DIR_NAME = ".tmp"
# Expected output
OUTPUT_CMD_NO_QUIET = """\
Scanning...
Validating...
{path}/invalid.rst:1: D002 Trailin... | 10,685 | 0 | 756 |
d430b5316abd1e325a4aa326b5753ee4e591a779 | 912 | py | Python | apps/home/forms.py | Rbc-1234/kcb | 822d588ea4522dabb002bc6fbebe31e48532bd29 | [
"MIT"
] | null | null | null | apps/home/forms.py | Rbc-1234/kcb | 822d588ea4522dabb002bc6fbebe31e48532bd29 | [
"MIT"
] | null | null | null | apps/home/forms.py | Rbc-1234/kcb | 822d588ea4522dabb002bc6fbebe31e48532bd29 | [
"MIT"
] | null | null | null | from .models import Brand,Size,BrandColor,Category,Master_Page
from django import forms
from django import forms
| 21.714286 | 113 | 0.640351 | from .models import Brand,Size,BrandColor,Category,Master_Page
from django import forms
from django import forms
class BrandForm(forms.ModelForm):
class Meta:
model = Brand
fields = ('brandname','logo','status')
class SizeForm(forms.ModelForm):
class Meta:
model = Size
... | 0 | 642 | 138 |
78ce4496dcf69be39aa029c35de1e7db911c3ea3 | 5,290 | py | Python | ROSCO_toolbox/sim.py | WillC-DNV/ROSCO | 2b095d4c7a6b7f2fe0ef056969f423e6a014b6be | [
"Apache-2.0"
] | 41 | 2020-01-31T01:21:04.000Z | 2022-03-30T08:07:42.000Z | ROSCO_toolbox/sim.py | WillC-DNV/ROSCO | 2b095d4c7a6b7f2fe0ef056969f423e6a014b6be | [
"Apache-2.0"
] | 56 | 2020-03-26T13:15:36.000Z | 2022-03-28T17:07:58.000Z | ROSCO_toolbox/sim.py | WillC-DNV/ROSCO | 2b095d4c7a6b7f2fe0ef056969f423e6a014b6be | [
"Apache-2.0"
] | 36 | 2020-01-10T21:39:17.000Z | 2022-03-31T08:36:18.000Z | # Copyright 2019 NREL
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distribu... | 36.736111 | 167 | 0.609452 | # Copyright 2019 NREL
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distribu... | 0 | 0 | 0 |
2d8a2ac3e6ed817e21e5fe3fa3058c2b10c86ad1 | 1,077 | py | Python | plist_keys_reader.py | igorkotkovets/awesome-snippets | 117962560dc65a337fcbe0ab9cd4435eff4a510b | [
"MIT"
] | 2 | 2022-01-28T14:08:05.000Z | 2022-02-13T20:16:40.000Z | plist_keys_reader.py | iharkatkavets/terminal-snippets | 117962560dc65a337fcbe0ab9cd4435eff4a510b | [
"MIT"
] | 1 | 2018-01-17T10:28:14.000Z | 2018-01-17T10:28:14.000Z | plist_keys_reader.py | iharkatkavets/terminal-snippets | 117962560dc65a337fcbe0ab9cd4435eff4a510b | [
"MIT"
] | 1 | 2020-03-04T02:58:23.000Z | 2020-03-04T02:58:23.000Z | #!/usr/bin/python3
import sys, getopt
import plistlib
from optparse import OptionParser
from sys import version_info
if __name__ == "__main__":
main(sys.argv[1:])
| 26.268293 | 66 | 0.640669 | #!/usr/bin/python3
import sys, getopt
import plistlib
from optparse import OptionParser
from sys import version_info
class Parameters(object):
def __init__(self, inputFile):
self.inputFile = inputFile
class PropertiesReader(object):
def readProperties(self, argv):
usage = "usage: %prog -i <t... | 714 | 19 | 170 |
ae7806e928206a7aaae4db5306888a68022ddcae | 2,418 | py | Python | deep_privacy/experiments/pose_sensitivity_experiment.py | aaniin/DeepPrivacy | 068d86ca112ada4b7d37f57c3b1be6e4ca44dad1 | [
"MIT"
] | 6 | 2019-10-17T13:11:13.000Z | 2021-10-01T17:35:39.000Z | deep_privacy/experiments/pose_sensitivity_experiment.py | EugenioRJ/DeepPrivacy | 3516f6f3bf2dcb6e7ed4d86195a7c1974077cdf8 | [
"MIT"
] | 4 | 2019-09-26T07:08:49.000Z | 2019-10-06T12:13:51.000Z | deep_privacy/experiments/pose_sensitivity_experiment.py | EugenioRJ/DeepPrivacy | 3516f6f3bf2dcb6e7ed4d86195a7c1974077cdf8 | [
"MIT"
] | 1 | 2020-10-10T18:55:49.000Z | 2020-10-10T18:55:49.000Z | import torch
import numpy as np
from deep_privacy import torch_utils
from deep_privacy.visualization import utils as vis_utils
import os
from deep_privacy.inference import infer
from deep_privacy.data_tools.dataloaders import load_dataset_files, cut_bounding_box
import matplotlib.pyplot as plt
if __name__ == "__main_... | 36.089552 | 90 | 0.629446 | import torch
import numpy as np
from deep_privacy import torch_utils
from deep_privacy.visualization import utils as vis_utils
import os
from deep_privacy.inference import infer
from deep_privacy.data_tools.dataloaders import load_dataset_files, cut_bounding_box
import matplotlib.pyplot as plt
if __name__ == "__main_... | 0 | 0 | 0 |
3ec42d21b7a0d85a7b993ffded41816c0e38ee99 | 1,368 | py | Python | read.py | huangjunfeng2000/TestPython | 3ddbd4185dc925783fb72ed21f12c240a0f057d2 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | read.py | huangjunfeng2000/TestPython | 3ddbd4185dc925783fb72ed21f12c240a0f057d2 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | read.py | huangjunfeng2000/TestPython | 3ddbd4185dc925783fb72ed21f12c240a0f057d2 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | import os
inputfile = "c:\ip.txt"
inputfile='c:\column.bmp'
outputfile = 'c:\ip_result.txt'
outputfile2 = 'c:\ip_result2.txt'
import sys
if __name__ == '__main__':
if (len(sys.argv)) != 2:
print 'Input filepath'
exit(1)
f_input = sys.argv[1]
print f_input
travsedir(f_input)
| 22.064516 | 47 | 0.645468 | import os
inputfile = "c:\ip.txt"
inputfile='c:\column.bmp'
outputfile = 'c:\ip_result.txt'
outputfile2 = 'c:\ip_result2.txt'
def translatefile(filename):
inputfile=filename
outputfile=filename+".result"
infile = open(inputfile, 'rb')
outfile = open(outputfile, 'w')
#outfile2 = open(outputfile2, 'w')
f... | 1,017 | 0 | 47 |
674b1427368743ff6c45aadf8197cc21014e8e23 | 5,244 | py | Python | api/util.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | null | null | null | api/util.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | null | null | null | api/util.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | null | null | null | import json
import os
from json import JSONDecodeError
import magic
import requests
from PyPDF2 import PdfFileReader
from django.http import Http404
from config.configuration import django_backend_service_api_url, verify_certificate
from eatb.utils.fileutils import read_file_content, find_files
from util.djangoutils ... | 39.428571 | 110 | 0.648741 | import json
import os
from json import JSONDecodeError
import magic
import requests
from PyPDF2 import PdfFileReader
from django.http import Http404
from config.configuration import django_backend_service_api_url, verify_certificate
from eatb.utils.fileutils import read_file_content, find_files
from util.djangoutils ... | 4,566 | 212 | 115 |
14e1f182dcdee533731ed093e578fc202b4e4d61 | 21,625 | py | Python | src/soles_stuff.py | HRI-EU/newbee_dataset | 27f69c388974882b2f797507d4eaa7442f74fa8c | [
"MIT"
] | null | null | null | src/soles_stuff.py | HRI-EU/newbee_dataset | 27f69c388974882b2f797507d4eaa7442f74fa8c | [
"MIT"
] | null | null | null | src/soles_stuff.py | HRI-EU/newbee_dataset | 27f69c388974882b2f797507d4eaa7442f74fa8c | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import matplotlib
import pandas as pd
import numpy as np
import logging
import sys
from sklearn.metrics import mean_absolute_error
import seaborn
from .common import INSOLES_FILE_NAME, LABELS_FILE_NAME
seaborn.set()
matplotlib.rcParams['text.latex.preamble'] = [r'\usepackage... | 49.036281 | 349 | 0.684717 | import os
import matplotlib.pyplot as plt
import matplotlib
import pandas as pd
import numpy as np
import logging
import sys
from sklearn.metrics import mean_absolute_error
import seaborn
from .common import INSOLES_FILE_NAME, LABELS_FILE_NAME
seaborn.set()
matplotlib.rcParams['text.latex.preamble'] = [r'\usepackage... | 20,636 | 0 | 414 |
9a82db4b1a71ac5dfe628bcacbc69013f75068ef | 9,055 | py | Python | code/train/step3_concat_select_split.py | ptannor/Audio2Face | 98b501791e74601a72466d191730904474b74f42 | [
"MIT"
] | 1 | 2022-02-08T11:01:17.000Z | 2022-02-08T11:01:17.000Z | code/train/step3_concat_select_split.py | ptannor/Audio2Face | 98b501791e74601a72466d191730904474b74f42 | [
"MIT"
] | null | null | null | code/train/step3_concat_select_split.py | ptannor/Audio2Face | 98b501791e74601a72466d191730904474b74f42 | [
"MIT"
] | null | null | null | # Copyright 2021 The FACEGOOD 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 applicable la... | 60.771812 | 488 | 0.606405 | # Copyright 2021 The FACEGOOD 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 applicable la... | 0 | 0 | 0 |
813dc76915f7be023d1aaee161bea4b032cb7216 | 625 | py | Python | PYTHON/python-datastructures/algorithms/algorithms/tree/same_tree.py | Web-Dev-Collaborative/DS-ALGO-OFFICIAL | 6d7195d33c28a0fe22f12231efffb39f4bf05c97 | [
"Apache-2.0"
] | 11 | 2021-02-18T04:53:44.000Z | 2022-01-16T10:57:39.000Z | PYTHON/python-datastructures/algorithms/algorithms/tree/same_tree.py | Web-Dev-Collaborative/DS-ALGO-OFFICIAL | 6d7195d33c28a0fe22f12231efffb39f4bf05c97 | [
"Apache-2.0"
] | 162 | 2021-03-09T01:52:11.000Z | 2022-03-12T01:09:07.000Z | PYTHON/python-datastructures/algorithms/algorithms/tree/same_tree.py | Web-Dev-Collaborative/DS-ALGO-OFFICIAL | 6d7195d33c28a0fe22f12231efffb39f4bf05c97 | [
"Apache-2.0"
] | 8 | 2021-02-18T05:12:34.000Z | 2022-03-06T19:02:14.000Z | """
Given two binary trees, write a function to check
if they are equal or not.
Two binary trees are considered equal if they are
structurally identical and the nodes have the same value.
"""
# Time Complexity O(min(N,M))
# where N and M are the number of nodes for the trees.
# Space Complexity O(min(height1, heig... | 27.173913 | 78 | 0.7072 | """
Given two binary trees, write a function to check
if they are equal or not.
Two binary trees are considered equal if they are
structurally identical and the nodes have the same value.
"""
def is_same_tree(p, q):
if p is None and q is None:
return True
if p is not None and q is not None and p.val ... | 209 | 0 | 23 |
13fa11efd109514337d86b90e8118c53e07b013a | 3,777 | py | Python | src/server/server.py | CarlosJones/ADS-IDAC-SimPy | 8fc1b3bf7c305e0d3cde5e626231d15ee7880f1c | [
"Apache-2.0"
] | null | null | null | src/server/server.py | CarlosJones/ADS-IDAC-SimPy | 8fc1b3bf7c305e0d3cde5e626231d15ee7880f1c | [
"Apache-2.0"
] | null | null | null | src/server/server.py | CarlosJones/ADS-IDAC-SimPy | 8fc1b3bf7c305e0d3cde5e626231d15ee7880f1c | [
"Apache-2.0"
] | null | null | null | from flask import Flask, render_template, jsonify, send_file
import random, json, base64, os
# import my_utils as utils
import opt_db
# 获取server.py当前路径,以及父路径、祖父路径
current_dir = os.path.dirname(__file__)
parent_dir = os.path.dirname(current_dir) # 获得current_dir所在的目录,
grandparent_dir = os.path.dirname(parent_dir)
prin... | 27.772059 | 126 | 0.664549 | from flask import Flask, render_template, jsonify, send_file
import random, json, base64, os
# import my_utils as utils
import opt_db
# 获取server.py当前路径,以及父路径、祖父路径
current_dir = os.path.dirname(__file__)
parent_dir = os.path.dirname(current_dir) # 获得current_dir所在的目录,
grandparent_dir = os.path.dirname(parent_dir)
prin... | 1,895 | 0 | 308 |
6e362ef91948f6aafa98254180ef5e8f6a7e19f9 | 6,942 | py | Python | pyconnectome/tests/tests_utils/test_filetools.py | neurospin/pyconnectome | 971dfaf58895b61f4610934bd5434fb5a7062bfe | [
"CECILL-B"
] | 5 | 2017-06-29T20:01:00.000Z | 2019-12-18T13:41:45.000Z | pyconnectome/tests/tests_utils/test_filetools.py | neurospin/pyconnectome | 971dfaf58895b61f4610934bd5434fb5a7062bfe | [
"CECILL-B"
] | 16 | 2017-07-11T15:49:33.000Z | 2018-11-16T09:04:03.000Z | pyconnectome/tests/tests_utils/test_filetools.py | neurospin/pyconnectome | 971dfaf58895b61f4610934bd5434fb5a7062bfe | [
"CECILL-B"
] | 10 | 2017-04-28T11:04:36.000Z | 2020-02-11T10:47:07.000Z | ##########################################################################
# NSAp - Copyright (C) CEA, 2016
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
##########... | 36.536842 | 78 | 0.597378 | ##########################################################################
# NSAp - Copyright (C) CEA, 2016
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
##########... | 0 | 0 | 0 |
68e509d660f474b4770cd3f8cfadd6abdc34ecad | 1,208 | py | Python | src/main.py | arslee07/OpenTextAI | 4b11e721a0e3d32e488a17d524564c3f08973bf2 | [
"MIT"
] | 3 | 2020-09-27T14:52:48.000Z | 2020-10-15T06:42:54.000Z | src/main.py | arslee07/OpenTextAI | 4b11e721a0e3d32e488a17d524564c3f08973bf2 | [
"MIT"
] | 1 | 2021-08-20T06:29:55.000Z | 2021-08-22T10:37:34.000Z | src/main.py | arslee07/OpenTextAI | 4b11e721a0e3d32e488a17d524564c3f08973bf2 | [
"MIT"
] | 4 | 2020-08-29T13:26:30.000Z | 2020-10-12T12:18:07.000Z | import json
from os.path import abspath, dirname
import discord
import os
from discord.ext import commands
from discord.ext.commands import Bot
from cogs.Utils import Utils
with open(dirname(abspath(__file__)) + '/data/locales.json') as f:
locales = json.load(f)
with open(dirname(abspath(__file__)) + '/data/co... | 26.26087 | 114 | 0.688742 | import json
from os.path import abspath, dirname
import discord
import os
from discord.ext import commands
from discord.ext.commands import Bot
from cogs.Utils import Utils
with open(dirname(abspath(__file__)) + '/data/locales.json') as f:
locales = json.load(f)
with open(dirname(abspath(__file__)) + '/data/co... | 636 | 0 | 44 |
f5c164ec8baafb11a24a62a24eefd66a42153c4a | 3,214 | py | Python | modules/multi_feature_embedding.py | Aria-K-Alethia/X-NLP | c5244ba3315c08d91d8747f186f0491eb79eb1d2 | [
"MIT"
] | 2 | 2020-12-17T07:42:29.000Z | 2022-03-07T01:11:54.000Z | modules/multi_feature_embedding.py | Aria-K-Alethia/X-NLP | c5244ba3315c08d91d8747f186f0491eb79eb1d2 | [
"MIT"
] | null | null | null | modules/multi_feature_embedding.py | Aria-K-Alethia/X-NLP | c5244ba3315c08d91d8747f186f0491eb79eb1d2 | [
"MIT"
] | 1 | 2022-03-30T05:37:25.000Z | 2022-03-30T05:37:25.000Z | '''
Copyright (c) 2019 Aria-K-Alethia@github.com
Description:
embedding class supporting multiple features
and customized merge method
Licence:
MIT
THE USER OF THIS CODE AGREES TO ASSUME ALL LIABILITY FOR THE USE OF THIS CODE.
Any use of this code should display all the info above.
'''
import ... | 27.470085 | 80 | 0.680149 | '''
Copyright (c) 2019 Aria-K-Alethia@github.com
Description:
embedding class supporting multiple features
and customized merge method
Licence:
MIT
THE USER OF THIS CODE AGREES TO ASSUME ALL LIABILITY FOR THE USE OF THIS CODE.
Any use of this code should display all the info above.
'''
import ... | 1,437 | 0 | 216 |
f9aa762366cd530a26a5be423b551c2a03c3d8ba | 2,590 | py | Python | musicsite/musicapp/migrations/0001_initial.py | andylwilson/Timbrespoon | 02a6c60866e8f55e787b6a701a3af38d9c4d61b3 | [
"Apache-2.0"
] | null | null | null | musicsite/musicapp/migrations/0001_initial.py | andylwilson/Timbrespoon | 02a6c60866e8f55e787b6a701a3af38d9c4d61b3 | [
"Apache-2.0"
] | null | null | null | musicsite/musicapp/migrations/0001_initial.py | andylwilson/Timbrespoon | 02a6c60866e8f55e787b6a701a3af38d9c4d61b3 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2 on 2019-06-06 09:02
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 37 | 114 | 0.550193 | # Generated by Django 2.2 on 2019-06-06 09:02
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
opera... | 0 | 2,412 | 23 |
156684c33cf3fe578d5c2aa36b68dfc7423d63ed | 2,982 | py | Python | spectralcluster/refinement.py | dschlessman/SpectralCluster | 2a34ce68c44fdef63a35fd9b07742a53f3768301 | [
"Apache-2.0"
] | 3 | 2020-07-27T18:11:26.000Z | 2021-08-04T10:18:07.000Z | spectralcluster/refinement.py | dschlessman/SpectralCluster | 2a34ce68c44fdef63a35fd9b07742a53f3768301 | [
"Apache-2.0"
] | null | null | null | spectralcluster/refinement.py | dschlessman/SpectralCluster | 2a34ce68c44fdef63a35fd9b07742a53f3768301 | [
"Apache-2.0"
] | 2 | 2020-02-16T07:52:13.000Z | 2021-08-04T10:18:51.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
from scipy.ndimage import gaussian_filter
import numpy as np
class CropDiagonal(AffinityRefinementOperation):
"""Crop the diagonal.
Replace diagonal element by the max value of row.
W... | 27.869159 | 78 | 0.607646 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
from scipy.ndimage import gaussian_filter
import numpy as np
class AffinityRefinementOperation(metaclass=abc.ABCMeta):
def check_input(self, X):
"""Check the input to the refine() metho... | 1,032 | 862 | 233 |
fde7595530c64dd530fab0b12d9fd8dffb1e6135 | 80,930 | py | Python | eeg_analyses/EEG.py | dvanmoorselaar/DvM | b097f6d2532a6a1285ae63585a7ce0c966a05039 | [
"MIT"
] | 7 | 2018-03-22T10:44:55.000Z | 2021-08-25T01:18:17.000Z | eeg_analyses/EEG.py | dvanmoorselaar/DvM | b097f6d2532a6a1285ae63585a7ce0c966a05039 | [
"MIT"
] | 3 | 2018-03-19T14:24:08.000Z | 2019-02-20T19:11:08.000Z | eeg_analyses/EEG.py | dvanmoorselaar/DvM | b097f6d2532a6a1285ae63585a7ce0c966a05039 | [
"MIT"
] | 7 | 2018-04-04T14:55:43.000Z | 2021-11-15T15:40:15.000Z | """
analyze EEG data
Created by Dirk van Moorselaar on 10-03-2015.
Copyright (c) 2015 DvM. All rights reserved.
"""
import mne
import os
import logging
import itertools
import pickle
import copy
import glob
import sys
import time
import itertools
import numpy as np
import scipy as sp
import pandas as pd
import seabo... | 45.111483 | 259 | 0.594934 | """
analyze EEG data
Created by Dirk van Moorselaar on 10-03-2015.
Copyright (c) 2015 DvM. All rights reserved.
"""
import mne
import os
import logging
import itertools
import pickle
import copy
import glob
import sys
import time
import itertools
import numpy as np
import scipy as sp
import pandas as pd
import seabo... | 16,460 | 0 | 538 |
e5c0d47c76984fe444dc432b4f022b77a68f190d | 2,154 | py | Python | CondTools/SiStrip/test/SiStripFedCablingBuilder_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 13 | 2015-11-30T15:49:45.000Z | 2022-02-08T16:11:30.000Z | CondTools/SiStrip/test/SiStripFedCablingBuilder_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 640 | 2015-02-11T18:55:47.000Z | 2022-03-31T14:12:23.000Z | CondTools/SiStrip/test/SiStripFedCablingBuilder_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 51 | 2015-08-11T21:01:40.000Z | 2022-03-30T07:31:34.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("FedCablingBuilder")
process.MessageLogger = cms.Service("MessageLogger",
debugModules = cms.untracked.vstring(''),
cablingBuilder = cms.untracked.PSet(
threshold = cms.untracked.string('INFO')
),
destinations = cms.untracked.vstri... | 38.464286 | 113 | 0.644847 | import FWCore.ParameterSet.Config as cms
process = cms.Process("FedCablingBuilder")
process.MessageLogger = cms.Service("MessageLogger",
debugModules = cms.untracked.vstring(''),
cablingBuilder = cms.untracked.PSet(
threshold = cms.untracked.string('INFO')
),
destinations = cms.untracked.vstri... | 0 | 0 | 0 |
6755da032d2e91ee6d36df425472a845eeab37be | 860 | py | Python | games/game_dao.py | ddbb07/modorganizer-basic_games | b7a383200fa4a4cda0d4f6450b47e8b0f376b62d | [
"MIT"
] | 22 | 2020-07-30T12:08:12.000Z | 2022-03-12T00:33:34.000Z | games/game_dao.py | ddbb07/modorganizer-basic_games | b7a383200fa4a4cda0d4f6450b47e8b0f376b62d | [
"MIT"
] | 32 | 2020-08-03T22:04:50.000Z | 2022-03-31T20:08:26.000Z | games/game_dao.py | ddbb07/modorganizer-basic_games | b7a383200fa4a4cda0d4f6450b47e8b0f376b62d | [
"MIT"
] | 32 | 2020-07-30T18:34:08.000Z | 2022-02-25T23:03:06.000Z | import os
import mobase
from ..basic_features import BasicGameSaveGameInfo
from ..basic_game import BasicGame
| 28.666667 | 76 | 0.667442 | import os
import mobase
from ..basic_features import BasicGameSaveGameInfo
from ..basic_game import BasicGame
class DAOriginsGame(BasicGame):
Name = "Dragon Age Origins Support Plugin"
Author = "Patchier"
Version = "1.1.0"
GameName = "Dragon Age: Origins"
GameShortName = "dragon... | 220 | 496 | 24 |
1d619f4a5a2643cb4104898295632d7a9d2d3fbd | 18,299 | py | Python | bin/Python27/Lib/site-packages/solid/solidpython.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/solid/solidpython.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/solid/solidpython.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
# Simple Python OpenSCAD Code Generator
# Copyright (C) 2009 Philipp Tiefenbacher <wizards23@gmail.com>
# Amendments & additions, (C) 2011 Evan Jones <evan_t_jones@mac.com>
#
# License: LGPL 2.1 or later
#
import os, sys, re
import inspect
openscad_builtins =... | 37.421268 | 476 | 0.53451 | #! /usr/bin/python
# -*- coding: utf-8 -*-
# Simple Python OpenSCAD Code Generator
# Copyright (C) 2009 Philipp Tiefenbacher <wizards23@gmail.com>
# Amendments & additions, (C) 2011 Evan Jones <evan_t_jones@mac.com>
#
# License: LGPL 2.1 or later
#
import os, sys, re
import inspect
openscad_builtins =... | 5,859 | 2,927 | 238 |
6137276e96e751acdcfec42711c4938cc9f70eca | 1,151 | py | Python | tests/__init__.py | Crunch-io/probes | cf85e047cdb30a1a20ed583d8f9a122c16ef9d06 | [
"MIT"
] | 19 | 2019-07-06T21:40:26.000Z | 2022-01-01T22:48:08.000Z | tests/__init__.py | Crunch-io/probes | cf85e047cdb30a1a20ed583d8f9a122c16ef9d06 | [
"MIT"
] | null | null | null | tests/__init__.py | Crunch-io/probes | cf85e047cdb30a1a20ed583d8f9a122c16ef9d06 | [
"MIT"
] | 2 | 2020-09-15T14:52:40.000Z | 2021-01-06T13:28:16.000Z | from contextlib import contextmanager
import datetime
import unittest
import diagnose
from diagnose import probes
diagnose.manager.instrument_classes.setdefault(
"test", diagnose.instruments.ProbeTestInstrument
)
| 29.512821 | 88 | 0.529974 | from contextlib import contextmanager
import datetime
import unittest
import diagnose
from diagnose import probes
diagnose.manager.instrument_classes.setdefault(
"test", diagnose.instruments.ProbeTestInstrument
)
class ProbeTestCase(unittest.TestCase):
@contextmanager
def probe(self, type, name, target,... | 844 | 64 | 23 |
a1aeaa851ba3167686d3755a3a79b49475ddbf5f | 237 | py | Python | blogtools/tests/urls.py | ixc/glamkit-blogtools | a3024d983eabafeba5df789eacbcc389e4181866 | [
"BSD-3-Clause"
] | null | null | null | blogtools/tests/urls.py | ixc/glamkit-blogtools | a3024d983eabafeba5df789eacbcc389e4181866 | [
"BSD-3-Clause"
] | null | null | null | blogtools/tests/urls.py | ixc/glamkit-blogtools | a3024d983eabafeba5df789eacbcc389e4181866 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = [
url(r'^blog/', include('blogtools.tests.test_blog.urls', app_name='blogtools', namespace='test_blog')),
]
| 33.857143 | 107 | 0.772152 | from django.conf.urls import url, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = [
url(r'^blog/', include('blogtools.tests.test_blog.urls', app_name='blogtools', namespace='test_blog')),
]
| 0 | 0 | 0 |
d28ba2716cff55579e19597fce16db0ff4f34413 | 336 | py | Python | questions/migrations/0002_auto_20191209_0854.py | Jay-68/moringa_flow | 9cf72e8279a4b5397be8b1b2c57d7b5ff629b23b | [
"MIT"
] | null | null | null | questions/migrations/0002_auto_20191209_0854.py | Jay-68/moringa_flow | 9cf72e8279a4b5397be8b1b2c57d7b5ff629b23b | [
"MIT"
] | 6 | 2019-12-11T08:54:34.000Z | 2021-09-08T01:29:12.000Z | questions/migrations/0002_auto_20191209_0854.py | Jay-68/moringa_flow | 9cf72e8279a4b5397be8b1b2c57d7b5ff629b23b | [
"MIT"
] | 1 | 2019-12-13T11:24:50.000Z | 2019-12-13T11:24:50.000Z | # Generated by Django 2.0 on 2019-12-09 08:54
from django.db import migrations
| 18.666667 | 45 | 0.577381 | # Generated by Django 2.0 on 2019-12-09 08:54
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('questions', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='answer',
options={'ordering': ['-likes']},
... | 0 | 232 | 23 |
35908d199e7e63d6541937f7efe3e6726631a197 | 549 | py | Python | custom_metric.py | stoplime/kaggle | 108639dea1ed16f24748f0f83a4c01ee5930d4f6 | [
"MIT"
] | null | null | null | custom_metric.py | stoplime/kaggle | 108639dea1ed16f24748f0f83a4c01ee5930d4f6 | [
"MIT"
] | null | null | null | custom_metric.py | stoplime/kaggle | 108639dea1ed16f24748f0f83a4c01ee5930d4f6 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.metrics import fbeta_score
from keras import backend as K
def FScore2(y_true, y_pred):
'''
The F score, beta=2
'''
B2 = K.variable(4)
OnePlusB2 = K.variable(5)
pred = K.round(y_pred)
tp = K.sum(K.cast(K.less(K.abs(pred - K.clip(y_true, .5, 1.)), 0.01), 'floa... | 27.45 | 89 | 0.590164 | import numpy as np
from sklearn.metrics import fbeta_score
from keras import backend as K
def FScore2(y_true, y_pred):
'''
The F score, beta=2
'''
B2 = K.variable(4)
OnePlusB2 = K.variable(5)
pred = K.round(y_pred)
tp = K.sum(K.cast(K.less(K.abs(pred - K.clip(y_true, .5, 1.)), 0.01), 'floa... | 0 | 0 | 0 |
cd3d4b839da134541c1bd60d41d9822810206145 | 4,071 | py | Python | iiif_api_services/helpers/PreProcessRequest.py | utlib/utl_iiif_api | e2d77ad5a677487e205b840cc800af46b4697eab | [
"Apache-2.0"
] | 4 | 2019-12-08T18:39:37.000Z | 2021-11-09T19:35:44.000Z | iiif_api_services/helpers/PreProcessRequest.py | utlib/utl_iiif_api | e2d77ad5a677487e205b840cc800af46b4697eab | [
"Apache-2.0"
] | 2 | 2020-06-05T16:45:31.000Z | 2021-06-10T17:30:00.000Z | iiif_api_services/helpers/PreProcessRequest.py | utlib/utl_iiif_api | e2d77ad5a677487e205b840cc800af46b4697eab | [
"Apache-2.0"
] | 1 | 2019-12-08T18:45:52.000Z | 2019-12-08T18:45:52.000Z | import json
from django.conf import settings
from rest_framework import status
from rest_framework.response import Response
from iiif_api_services.models.QueueModel import Queue
from iiif_api_services.models.ActivityModel import Activity
if settings.QUEUE_RUNNER=="THREAD":
from threading import Thread as Runner
els... | 69 | 223 | 0.70818 | import json
from django.conf import settings
from rest_framework import status
from rest_framework.response import Response
from iiif_api_services.models.QueueModel import Queue
from iiif_api_services.models.ActivityModel import Activity
if settings.QUEUE_RUNNER=="THREAD":
from threading import Thread as Runner
els... | 3,612 | 0 | 71 |
fdef7cb22602ce528c8233594d1d153bab4403a5 | 8,930 | py | Python | tests/unit/test_helpers.py | peopledoc/ml-versioning-tools | 2a797303b2b0e988f8063fc1d418f65c821efa97 | [
"BSD-3-Clause"
] | 36 | 2018-09-19T09:50:05.000Z | 2020-03-14T22:15:15.000Z | tests/unit/test_helpers.py | peopledoc/ml-versioning-tools | 2a797303b2b0e988f8063fc1d418f65c821efa97 | [
"BSD-3-Clause"
] | 29 | 2018-10-12T16:09:51.000Z | 2020-03-13T14:12:02.000Z | tests/unit/test_helpers.py | peopledoc/mlvtools | f04f69b34291b85bd7a5fc2baf19fccb1535a983 | [
"BSD-3-Clause"
] | 8 | 2019-04-06T11:08:37.000Z | 2020-02-06T17:02:15.000Z | import stat
from os import stat as os_stat
from os.path import join, exists
from tempfile import TemporaryDirectory
import pytest
from jinja2 import UndefinedError, TemplateSyntaxError
from mlvtools.exception import MlVToolException
from mlvtools.helper import extract_type, to_dvc_meta_filename, to_instructions_list,... | 32.710623 | 111 | 0.710974 | import stat
from os import stat as os_stat
from os.path import join, exists
from tempfile import TemporaryDirectory
import pytest
from jinja2 import UndefinedError, TemplateSyntaxError
from mlvtools.exception import MlVToolException
from mlvtools.helper import extract_type, to_dvc_meta_filename, to_instructions_list,... | 535 | 0 | 45 |
53c4a2c8bc3e7b21877246873b9e265e6ac85017 | 6,675 | py | Python | tablo/grid.py | jessedp/tut | 6864f953e3dacd800c9f5a50cec7221e89d47f7d | [
"MIT"
] | 4 | 2020-01-24T21:40:36.000Z | 2021-09-10T22:30:17.000Z | tablo/grid.py | jessedp/tut | 6864f953e3dacd800c9f5a50cec7221e89d47f7d | [
"MIT"
] | null | null | null | tablo/grid.py | jessedp/tut | 6864f953e3dacd800c9f5a50cec7221e89d47f7d | [
"MIT"
] | 1 | 2021-09-11T09:36:46.000Z | 2021-09-11T09:36:46.000Z | import os
import json
import time
import datetime
import tablo
from lib import backgroundthread
from .util import logger
SAVE_VERSION = 1
INTERVAL_HOURS = 2
INTERVAL_TIMEDELTA = datetime.timedelta(hours=INTERVAL_HOURS)
PENDING_UPDATE = {}
| 29.535398 | 77 | 0.593408 | import os
import json
import time
import datetime
import tablo
from lib import backgroundthread
from .util import logger
SAVE_VERSION = 1
INTERVAL_HOURS = 2
INTERVAL_TIMEDELTA = datetime.timedelta(hours=INTERVAL_HOURS)
PENDING_UPDATE = {}
def addPending(path=None, airing=None):
path = path or airing.data['air... | 5,804 | 18 | 607 |
3ee770460cefa4f48ae7543f053e1b5598cb884b | 5,874 | py | Python | experiments/plot_benchmark.py | ashley062190/pycpa_taskchain | 4274371b90407fe9715ca2d5d5793bf4736f53e2 | [
"MIT"
] | 1 | 2021-07-25T19:37:03.000Z | 2021-07-25T19:37:03.000Z | experiments/plot_benchmark.py | ashley062190/pycpa_taskchain | 4274371b90407fe9715ca2d5d5793bf4736f53e2 | [
"MIT"
] | null | null | null | experiments/plot_benchmark.py | ashley062190/pycpa_taskchain | 4274371b90407fe9715ca2d5d5793bf4736f53e2 | [
"MIT"
] | 1 | 2020-12-10T17:01:20.000Z | 2020-12-10T17:01:20.000Z | #!/usr/bin/env python
import argparse
import csv
from pyplot_helper import barchart
from matplotlib import pyplot
from palettable.colorbrewer.qualitative import Paired_12 as Colors
parser = argparse.ArgumentParser(description='Plot benchmark results.')
parser.add_argument('--inputs', type=str, required=True, nargs=... | 35.817073 | 105 | 0.562138 | #!/usr/bin/env python
import argparse
import csv
from pyplot_helper import barchart
from matplotlib import pyplot
from palettable.colorbrewer.qualitative import Paired_12 as Colors
parser = argparse.ArgumentParser(description='Plot benchmark results.')
parser.add_argument('--inputs', type=str, required=True, nargs=... | 1,734 | 0 | 23 |
fbfd3b50dfdb41c7c33541e22d66678c2f866fd8 | 7,527 | py | Python | lib/googlecloudsdk/api_lib/compute/vpn_gateways/vpn_gateways_utils.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/api_lib/compute/vpn_gateways/vpn_gateways_utils.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/api_lib/compute/vpn_gateways/vpn_gateways_utils.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... | 36.897059 | 79 | 0.712369 | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... | 119 | 0 | 72 |
b1aa34333b0943f112cf870b0d9e96b53724f625 | 628 | py | Python | examples/example_3/tuned_solver.py | ghbrown/mg_tune | 674957e4eb24e94d9f033bffdf5e42a54b00f155 | [
"MIT"
] | null | null | null | examples/example_3/tuned_solver.py | ghbrown/mg_tune | 674957e4eb24e94d9f033bffdf5e42a54b00f155 | [
"MIT"
] | null | null | null | examples/example_3/tuned_solver.py | ghbrown/mg_tune | 674957e4eb24e94d9f033bffdf5e42a54b00f155 | [
"MIT"
] | null | null | null |
import numpy as np
import pyamg
#the function must be called solve and take (A,b) as inputs
| 41.866667 | 195 | 0.735669 |
import numpy as np
import pyamg
#the function must be called solve and take (A,b) as inputs
def solve(A,b):
#max_levels not an effective tuning parameter, since often
#it just results in a multilevel hierarchy which is far too
#large on the coarsest level
#therefore fix it to be large so depth of hier... | 512 | 0 | 22 |
b7224b29868dc27f45e86b949857a205ad1d621b | 9,852 | py | Python | tf_image_segmentation/recipes/pascal_voc/data_pascal_voc.py | tataganesh95/tf-image-segmentation | c609bf71924191de7ae1dd887ee613fa7c1c5797 | [
"MIT"
] | null | null | null | tf_image_segmentation/recipes/pascal_voc/data_pascal_voc.py | tataganesh95/tf-image-segmentation | c609bf71924191de7ae1dd887ee613fa7c1c5797 | [
"MIT"
] | null | null | null | tf_image_segmentation/recipes/pascal_voc/data_pascal_voc.py | tataganesh95/tf-image-segmentation | c609bf71924191de7ae1dd887ee613fa7c1c5797 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
"""
This is a script for downloading and converting the pascal voc 2012 dataset
and the berkely extended version.
# original PASCAL VOC 2012
# wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar # 2 GB
# berkeley augmented Pascal VOC
# w... | 42.465517 | 117 | 0.676918 | #!/usr/bin/env python
# coding=utf-8
"""
This is a script for downloading and converting the pascal voc 2012 dataset
and the berkely extended version.
# original PASCAL VOC 2012
# wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar # 2 GB
# berkeley augmented Pascal VOC
# w... | 8,171 | 0 | 198 |
f5236ae02d9cb4b7aa1b4b2f25262d9ce4b65fad | 265 | py | Python | products/models.py | AironMattos/GS-Labs-Challenge | 1f7a97324c559bc3ec764f693d6b2ec838eaeae9 | [
"MIT"
] | null | null | null | products/models.py | AironMattos/GS-Labs-Challenge | 1f7a97324c559bc3ec764f693d6b2ec838eaeae9 | [
"MIT"
] | null | null | null | products/models.py | AironMattos/GS-Labs-Challenge | 1f7a97324c559bc3ec764f693d6b2ec838eaeae9 | [
"MIT"
] | null | null | null | from django.db import models
| 26.5 | 64 | 0.720755 | from django.db import models
class Produto(models.Model):
nome = models.CharField(max_length=200, blank=False)
descricao = models.TextField()
valor = models.DecimalField(max_digits=20, decimal_places=2)
def __str__(self):
return self.nome | 22 | 191 | 23 |
c8d40a7145863760b525cbcbc7dbb5513a42ddd1 | 3,057 | py | Python | misc_utility/load_data.py | weber-s/inversionPO | 847ef9c8848e28cf09f10918c8c7d9807baecaf8 | [
"CC-BY-4.0"
] | null | null | null | misc_utility/load_data.py | weber-s/inversionPO | 847ef9c8848e28cf09f10918c8c7d9807baecaf8 | [
"CC-BY-4.0"
] | null | null | null | misc_utility/load_data.py | weber-s/inversionPO | 847ef9c8848e28cf09f10918c8c7d9807baecaf8 | [
"CC-BY-4.0"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
def load_CHEMorPO(station, inputDir, CHEMorPO="CHEM", fromSource=True):
"""
Import the concentration file into a DataFrame
Parameters
----------
stationName: str, the name of the station
inputDir: str, the path of file
... | 29.394231 | 79 | 0.566241 | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
def load_CHEMorPO(station, inputDir, CHEMorPO="CHEM", fromSource=True):
"""
Import the concentration file into a DataFrame
Parameters
----------
stationName: str, the name of the station
inputDir: str, the path of file
... | 0 | 0 | 0 |
411adb10e149c599353d4b19f3f8c772ee597133 | 3,976 | py | Python | bayesian_lifetimes/estimator.py | nebw/bb_bayesian_lifetimes | b6242eed666ab4f0546c1fd804a6867eb5f28ad8 | [
"MIT"
] | null | null | null | bayesian_lifetimes/estimator.py | nebw/bb_bayesian_lifetimes | b6242eed666ab4f0546c1fd804a6867eb5f28ad8 | [
"MIT"
] | null | null | null | bayesian_lifetimes/estimator.py | nebw/bb_bayesian_lifetimes | b6242eed666ab4f0546c1fd804a6867eb5f28ad8 | [
"MIT"
] | null | null | null | import datetime
import numpy as np
import pandas as pd
import pymc3 as pm
import scipy
import scipy.stats
from bb_utils.ids import BeesbookID
from bb_utils.meta import BeeMetaInfo
| 34.877193 | 89 | 0.632294 | import datetime
import numpy as np
import pandas as pd
import pymc3 as pm
import scipy
import scipy.stats
from bb_utils.ids import BeesbookID
from bb_utils.meta import BeeMetaInfo
class LifetimeEstimator:
mu_days_alive = 21
sigma_days_alive = 25
p_tagged = 0.75
def __init__(
self,
m... | 3,644 | 126 | 23 |
0857ae9c6890ce3f361d3dc6166a8e14c0626f05 | 1,462 | py | Python | bench/scribble_plotting.py | histocartography/athena | 8a1af389dc936bf5b8e62c56ae682a2fe4d2d71a | [
"BSD-3-Clause"
] | 9 | 2021-12-07T07:08:55.000Z | 2022-03-24T13:40:51.000Z | bench/scribble_plotting.py | histocartography/athena | 8a1af389dc936bf5b8e62c56ae682a2fe4d2d71a | [
"BSD-3-Clause"
] | null | null | null | bench/scribble_plotting.py | histocartography/athena | 8a1af389dc936bf5b8e62c56ae682a2fe4d2d71a | [
"BSD-3-Clause"
] | 2 | 2021-10-08T07:11:13.000Z | 2022-02-02T18:52:52.000Z | import spatialHeterogeneity as sh
import pickle as pk
import os
import matplotlib.pyplot as plt
hdf = '/Users/art/Documents/spatial-omics/spatialOmics.hdf5'
f = '/Users/art/Documents/spatial-omics/spatialOmics.pkl'
# so = SpatialOmics.form_h5py(f)
with open(f, 'rb') as f:
so = pk.load(f)
# with open(f, 'wb') as f... | 25.206897 | 74 | 0.684679 | import spatialHeterogeneity as sh
import pickle as pk
import os
import matplotlib.pyplot as plt
hdf = '/Users/art/Documents/spatial-omics/spatialOmics.hdf5'
f = '/Users/art/Documents/spatial-omics/spatialOmics.pkl'
# so = SpatialOmics.form_h5py(f)
with open(f, 'rb') as f:
so = pk.load(f)
# with open(f, 'wb') as f... | 0 | 0 | 0 |
a63ff270678d7b5bebf7431b19aa3171dd6b6531 | 76 | py | Python | tests/inline_test_resources/11/script.py | thesynman/pybricksdev | 6f34cfb7a5f26628fe3cedae1ce51ee6024f57b9 | [
"MIT"
] | null | null | null | tests/inline_test_resources/11/script.py | thesynman/pybricksdev | 6f34cfb7a5f26628fe3cedae1ce51ee6024f57b9 | [
"MIT"
] | null | null | null | tests/inline_test_resources/11/script.py | thesynman/pybricksdev | 6f34cfb7a5f26628fe3cedae1ce51ee6024f57b9 | [
"MIT"
] | null | null | null | import importA
my_drive = importA.HasConstants(importA.HasConstants.DRIVE)
| 19 | 59 | 0.842105 | import importA
my_drive = importA.HasConstants(importA.HasConstants.DRIVE)
| 0 | 0 | 0 |
5dd8045a94410c34e269d958145e1d76c296450c | 7,147 | py | Python | Tests/test_SeqUtils.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 3 | 2016-11-21T09:55:56.000Z | 2019-04-09T17:39:43.000Z | Tests/test_SeqUtils.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 32 | 2016-11-21T07:38:21.000Z | 2017-08-16T13:00:03.000Z | Tests/test_SeqUtils.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 8 | 2016-11-24T18:57:35.000Z | 2022-01-16T08:15:25.000Z | # Copyright 2007-2009 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import os
import unittest
from Bio import SeqIO
from Bio.Alphabet import single_letter_alph... | 44.949686 | 112 | 0.612285 | # Copyright 2007-2009 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import os
import unittest
from Bio import SeqIO
from Bio.Alphabet import single_letter_alph... | 3,744 | 2,580 | 92 |
3b8e3601dc4d695e8301e5b36e46da78b13f753b | 756 | py | Python | tests/workflow/plot.py | BavYeti/bbfsa | 42023bd4823f4215f670a1924595cbde20e0cf21 | [
"MIT"
] | null | null | null | tests/workflow/plot.py | BavYeti/bbfsa | 42023bd4823f4215f670a1924595cbde20e0cf21 | [
"MIT"
] | null | null | null | tests/workflow/plot.py | BavYeti/bbfsa | 42023bd4823f4215f670a1924595cbde20e0cf21 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from context import bbfsa
#read csv file
spectra = pd.read_csv('./tests/workflow/input/700cow.csv', delimiter=',', names= ['wn', 'ab'])
# cristallinity index
s = bbfsa.slice(spectra,700,400) #slice for baseline
b = bbfsa.baseline(s) #baseline
... | 22.235294 | 94 | 0.695767 | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from context import bbfsa
#read csv file
spectra = pd.read_csv('./tests/workflow/input/700cow.csv', delimiter=',', names= ['wn', 'ab'])
# cristallinity index
s = bbfsa.slice(spectra,700,400) #slice for baseline
b = bbfsa.baseline(s) #baseline
... | 0 | 0 | 0 |
b0a755cc52ef03572fc7257db25c3dc683e3cb2b | 2,383 | py | Python | hodgepodge/hashing.py | whitfieldsdad/hodgepodge | cf023179c30ae84641f1f8863749e8325df9811e | [
"MIT"
] | 1 | 2021-09-15T17:27:15.000Z | 2021-09-15T17:27:15.000Z | hodgepodge/hashing.py | whitfieldsdad/hodgepodge | cf023179c30ae84641f1f8863749e8325df9811e | [
"MIT"
] | null | null | null | hodgepodge/hashing.py | whitfieldsdad/hodgepodge | cf023179c30ae84641f1f8863749e8325df9811e | [
"MIT"
] | null | null | null | from typing import Callable, Optional, Union
from dataclasses import dataclass
import hashlib
import hodgepodge.types
from hodgepodge.serialization import Serializable
DEFAULT_FILE_IO_BLOCK_SIZE = 8192
MD5 = 'md5'
SHA1 = 'sha1'
SHA256 = 'sha256'
SHA512 = 'sha512'
HASH_ALGORITHMS = [MD5, SHA1, SHA256, SHA512]
@dat... | 24.56701 | 87 | 0.668065 | from typing import Callable, Optional, Union
from dataclasses import dataclass
import hashlib
import hodgepodge.types
from hodgepodge.serialization import Serializable
DEFAULT_FILE_IO_BLOCK_SIZE = 8192
MD5 = 'md5'
SHA1 = 'sha1'
SHA256 = 'sha256'
SHA512 = 'sha512'
HASH_ALGORITHMS = [MD5, SHA1, SHA256, SHA512]
@dat... | 1,587 | 194 | 228 |
3bbb20d2e61b3010e3dd21f721a9ae2fe38ebd6e | 11,699 | py | Python | main.py | srogers47/Trulia-Web-Scraper | 18d8472a765aba8580ae878aa73582f3f00a9860 | [
"MIT"
] | null | null | null | main.py | srogers47/Trulia-Web-Scraper | 18d8472a765aba8580ae878aa73582f3f00a9860 | [
"MIT"
] | null | null | null | main.py | srogers47/Trulia-Web-Scraper | 18d8472a765aba8580ae878aa73582f3f00a9860 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Web client, html parsing
import aiohttp
from lxml import html
from bs4 import BeautifulSoup as BS
# Web driver, browser/network interaction
from seleniumwire import webdriver
from selenium.webdriver.firefox.options import Options
# Downloading, compressing images
from PIL import Image
impor... | 45.878431 | 153 | 0.600393 | #!/usr/bin/env python3
# Web client, html parsing
import aiohttp
from lxml import html
from bs4 import BeautifulSoup as BS
# Web driver, browser/network interaction
from seleniumwire import webdriver
from selenium.webdriver.firefox.options import Options
# Downloading, compressing images
from PIL import Image
impor... | 529 | 0 | 31 |
d86c455eaaae2af14cec6f33123c2601b31632af | 1,300 | py | Python | server/jukeboxify_cli.py | SteveParrington/jukeboxify | 7008832d666c65f4e56581d7463d3ae0c2b49156 | [
"Apache-2.0"
] | null | null | null | server/jukeboxify_cli.py | SteveParrington/jukeboxify | 7008832d666c65f4e56581d7463d3ae0c2b49156 | [
"Apache-2.0"
] | null | null | null | server/jukeboxify_cli.py | SteveParrington/jukeboxify | 7008832d666c65f4e56581d7463d3ae0c2b49156 | [
"Apache-2.0"
] | null | null | null | import zmq
from getpass import getpass
if __name__ == '__main__':
main()
| 26 | 59 | 0.549231 | import zmq
from getpass import getpass
def jsonify(text_command):
tokens = text_command.split()
args = []
if len(tokens) > 1:
args = tokens[1:]
json = { "opcode": tokens[0], "args": args }
return json
def login_prompt():
login_payload = {
"opcode": "login",
"args": [
... | 1,130 | 0 | 92 |
9bd4cd58e1813c3bba3fb98b07b0a1a92ef7ab87 | 2,029 | py | Python | lib/config/models.py | Zealoe/HRNet-Semantic-Segmentation | e5082879d6a46f1eb1127429e9948c80c0e15418 | [
"MIT"
] | 2 | 2020-11-02T11:38:59.000Z | 2021-03-23T09:54:14.000Z | lib/config/models.py | Zealoe/HRNet-Semantic-Segmentation | e5082879d6a46f1eb1127429e9948c80c0e15418 | [
"MIT"
] | null | null | null | lib/config/models.py | Zealoe/HRNet-Semantic-Segmentation | e5082879d6a46f1eb1127429e9948c80c0e15418 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Ke Sun (sunk@mail.ustc.edu.cn)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __... | 36.890909 | 81 | 0.726959 | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Ke Sun (sunk@mail.ustc.edu.cn)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __... | 0 | 0 | 0 |
5dd252c8cdbd1b74c09d109c4140190861574d5b | 3,679 | py | Python | code/multifuture_eval_trajs_prob.py | ziyan0302/Multiverse | 3b2f590a7d99758b6a8795070ca25a9698b767a9 | [
"Apache-2.0"
] | 190 | 2020-01-10T06:24:49.000Z | 2022-03-24T10:21:46.000Z | code/multifuture_eval_trajs_prob.py | ziyan0302/Multiverse | 3b2f590a7d99758b6a8795070ca25a9698b767a9 | [
"Apache-2.0"
] | 32 | 2020-06-18T23:36:10.000Z | 2022-03-30T11:33:13.000Z | code/multifuture_eval_trajs_prob.py | ziyan0302/Multiverse | 3b2f590a7d99758b6a8795070ca25a9698b767a9 | [
"Apache-2.0"
] | 60 | 2020-01-04T13:29:03.000Z | 2022-03-27T09:26:13.000Z | # coding=utf-8
"""Given the multifuture trajectory output, compute NLL"""
import argparse
import os
import pickle
import numpy as np
from tqdm import tqdm
parser = argparse.ArgumentParser()
parser.add_argument("gt_path")
parser.add_argument("prediction_file")
parser.add_argument("--scene_h", type=int, default=18)
pa... | 30.658333 | 89 | 0.645556 | # coding=utf-8
"""Given the multifuture trajectory output, compute NLL"""
import argparse
import os
import pickle
import numpy as np
from tqdm import tqdm
parser = argparse.ArgumentParser()
parser.add_argument("gt_path")
parser.add_argument("prediction_file")
parser.add_argument("--scene_h", type=int, default=18)
pa... | 1,191 | 0 | 69 |
9a3aeb0bf305c0a63903c5e9ab76a4899c4f2eb3 | 4,348 | py | Python | smtpClient/main.py | number23/iLibrary | e03c81cb6e355b562ba2e1468d9752b56c6bab56 | [
"Apache-2.0"
] | null | null | null | smtpClient/main.py | number23/iLibrary | e03c81cb6e355b562ba2e1468d9752b56c6bab56 | [
"Apache-2.0"
] | null | null | null | smtpClient/main.py | number23/iLibrary | e03c81cb6e355b562ba2e1468d9752b56c6bab56 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
vi $HOME/.LoginAccount.txt
[mailClient]
host = smtp.qq.com
port = 25
user = ***
pass = ***
fr = xxxxxx@qq.com
to = xxxxxx@gmail.com
debuglevel = True
login = False
starttls = False
'''
__all__ = ['get_smtp_client', 'sendmail']
import os, sys
from ConfigParser import ... | 30.194444 | 90 | 0.569687 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
vi $HOME/.LoginAccount.txt
[mailClient]
host = smtp.qq.com
port = 25
user = ***
pass = ***
fr = xxxxxx@qq.com
to = xxxxxx@gmail.com
debuglevel = True
login = False
starttls = False
'''
__all__ = ['get_smtp_client', 'sendmail']
import os, sys
from ConfigParser import ... | 3,082 | 0 | 69 |
9858d3b8cadb2fd50cfc53e91f4ca4910bc15ea3 | 3,103 | py | Python | incrowd/push_notifications/fields.py | incrowdio/incrowd | 711e99c55b9da815af7749a2930d4184e235fa68 | [
"Apache-2.0"
] | 4 | 2015-03-10T04:24:07.000Z | 2016-09-18T16:41:12.000Z | incrowd/push_notifications/fields.py | incrowdio/incrowd | 711e99c55b9da815af7749a2930d4184e235fa68 | [
"Apache-2.0"
] | 27 | 2015-01-03T09:52:50.000Z | 2021-06-10T20:37:08.000Z | incrowd/push_notifications/fields.py | incrowdio/incrowd | 711e99c55b9da815af7749a2930d4184e235fa68 | [
"Apache-2.0"
] | 2 | 2015-09-07T21:06:51.000Z | 2016-03-10T11:31:57.000Z | import re
import struct
from django import forms
from django.core.validators import RegexValidator
from django.db import models, connection
from django.utils import six
from django.utils.translation import ugettext_lazy as _
__all__ = ["HexadecimalField", "HexIntegerField"]
hex_re = re.compile(r"^[0-9A-f]+$")
postg... | 35.261364 | 108 | 0.636803 | import re
import struct
from django import forms
from django.core.validators import RegexValidator
from django.db import models, connection
from django.utils import six
from django.utils.translation import ugettext_lazy as _
__all__ = ["HexadecimalField", "HexIntegerField"]
hex_re = re.compile(r"^[0-9A-f]+$")
postg... | 1,586 | 0 | 133 |
c272ab461573f0045f650a404b0a542762b38393 | 428 | py | Python | heatmap_gen/prediction_filter.py | lthealy/quip_paad_cancer_detection | b05310b6eff7276920ca24c5c7b0b9f42ee563cd | [
"BSD-3-Clause"
] | 8 | 2020-03-02T09:55:37.000Z | 2021-07-12T09:13:49.000Z | heatmap_gen/prediction_filter.py | lthealy/quip_paad_cancer_detection | b05310b6eff7276920ca24c5c7b0b9f42ee563cd | [
"BSD-3-Clause"
] | 2 | 2019-07-09T13:38:15.000Z | 2021-04-15T15:36:36.000Z | heatmap_gen/prediction_filter.py | lthealy/quip_paad_cancer_detection | b05310b6eff7276920ca24c5c7b0b9f42ee563cd | [
"BSD-3-Clause"
] | 7 | 2019-07-22T10:28:18.000Z | 2021-08-09T19:30:00.000Z | import os
import sys
input = sys.argv[1]
output = sys.argv[2]
f1 = open(input, 'r')
f2 = open('temp.txt', 'w')
start = 0
for line in f1:
start += 1
if start < 3:
f2.write(line)
continue
parts = line.split()
if float(parts[2]) > 1e-3:
f2.write(line)
f1.close()
f2.close()
command... | 17.833333 | 38 | 0.584112 | import os
import sys
input = sys.argv[1]
output = sys.argv[2]
f1 = open(input, 'r')
f2 = open('temp.txt', 'w')
start = 0
for line in f1:
start += 1
if start < 3:
f2.write(line)
continue
parts = line.split()
if float(parts[2]) > 1e-3:
f2.write(line)
f1.close()
f2.close()
command... | 0 | 0 | 0 |
6bb1780b98acbcaeddde95a113f189e1914af121 | 608 | py | Python | tests/test_jaxtainer.py | MABilton/arraytainers | b90da9a7cf3240a7724bf4592f75dccf95885233 | [
"MIT"
] | null | null | null | tests/test_jaxtainer.py | MABilton/arraytainers | b90da9a7cf3240a7724bf4592f75dccf95885233 | [
"MIT"
] | null | null | null | tests/test_jaxtainer.py | MABilton/arraytainers | b90da9a7cf3240a7724bf4592f75dccf95885233 | [
"MIT"
] | null | null | null | import jax.numpy as jnp
import jaxlib
from arraytainers import Jaxtainer
from main_tests.test_class import ArraytainerTests
| 25.333333 | 67 | 0.694079 | import jax.numpy as jnp
import jaxlib
from arraytainers import Jaxtainer
from main_tests.test_class import ArraytainerTests
class TestJaxtainer(ArraytainerTests):
container_class = Jaxtainer
expected_array_types = (jaxlib.xla_extension.DeviceArrayBase,)
@staticmethod
def array_construc... | 40 | 417 | 24 |
a3abba71345244f25abf2db265ca12f65a90aec3 | 7,214 | py | Python | postfix.py | ashraf1lastbreath/Postfix | 1fd23ae4029b26577782f2a732b55b4cc30125a7 | [
"MIT"
] | null | null | null | postfix.py | ashraf1lastbreath/Postfix | 1fd23ae4029b26577782f2a732b55b4cc30125a7 | [
"MIT"
] | null | null | null | postfix.py | ashraf1lastbreath/Postfix | 1fd23ae4029b26577782f2a732b55b4cc30125a7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Function to evaluate Post Fix expression
#Calculation function for different opeartors
#Printing the Menu
print ""
print ""
print ""
print ""
menu = {}
menu['1']="What are infix postfix and prefix notations?"
menu['2']="Infix to Postfix Expression Conversion"
menu['3']="E... | 41.45977 | 154 | 0.497366 | # -*- coding: utf-8 -*-
class Stack:
def __init__(self, itemlist=[ ] ):
self.items=itemlist
def isEmpty(self) :
if self.items == []:
return True
else:
return False
def push(self, item):
self.items.append(item)
return 0
def pop... | 3,859 | -9 | 231 |
86890a1939c19529ab88515e3f1b07a44f7afd78 | 6,850 | py | Python | train.py | ZYH111/SelfSupervisedQE | ee7dd8d75e062b0bed6b1b54c4d9d4d6950268c9 | [
"BSD-3-Clause"
] | 4 | 2021-11-09T04:58:29.000Z | 2022-01-27T09:03:34.000Z | train.py | ZYH111/SelfSupervisedQE | ee7dd8d75e062b0bed6b1b54c4d9d4d6950268c9 | [
"BSD-3-Clause"
] | 3 | 2021-11-24T08:05:00.000Z | 2022-03-29T14:13:57.000Z | train.py | ZYH111/SelfSupervisedQE | ee7dd8d75e062b0bed6b1b54c4d9d4d6950268c9 | [
"BSD-3-Clause"
] | 1 | 2021-09-09T13:39:47.000Z | 2021-09-09T13:39:47.000Z | import argparse
import numpy as np
import os
import pandas as pd
import time
import torch
from data import (
eval_collate_fn,
EvalDataset,
TrainCollator,
TrainDataset,
)
from evaluate import predict, make_word_outputs_final
from transformers import (
AdamW,
AutoConfig,
AutoModelWithLMHead,
... | 34.771574 | 122 | 0.653577 | import argparse
import numpy as np
import os
import pandas as pd
import time
import torch
from data import (
eval_collate_fn,
EvalDataset,
TrainCollator,
TrainDataset,
)
from evaluate import predict, make_word_outputs_final
from transformers import (
AdamW,
AutoConfig,
AutoModelWithLMHead,
... | 318 | 0 | 23 |
c1c9484b15c0c371600ef37dcc8f1eb81ebafc83 | 1,164 | py | Python | scrapeSRApy/scrapeSRA.py | mmrmas/SRAMicrobiomeCategoryPipeline | 75786cf79f770758602ee70d945e1d7ef297ca6d | [
"MIT"
] | null | null | null | scrapeSRApy/scrapeSRA.py | mmrmas/SRAMicrobiomeCategoryPipeline | 75786cf79f770758602ee70d945e1d7ef297ca6d | [
"MIT"
] | null | null | null | scrapeSRApy/scrapeSRA.py | mmrmas/SRAMicrobiomeCategoryPipeline | 75786cf79f770758602ee70d945e1d7ef297ca6d | [
"MIT"
] | null | null | null | import modules.open_file as of
# read in the file downloaded from the run archive, in this partcular case https://www.ncbi.nlm.nih.gov/Traces/study/?query_key=1&WebEnv=MCID_6178e8ee92f0234b8354c36f&o=acc_s%3Aa (may not be functional)
# SraRunTable.txt
# Contains Metadata for all samples
# check for each l... | 40.137931 | 202 | 0.756014 | import modules.open_file as of
# read in the file downloaded from the run archive, in this partcular case https://www.ncbi.nlm.nih.gov/Traces/study/?query_key=1&WebEnv=MCID_6178e8ee92f0234b8354c36f&o=acc_s%3Aa (may not be functional)
# SraRunTable.txt
# Contains Metadata for all samples
# check for each l... | 87 | 0 | 23 |
689bb80283d50dcc36af84761266697add064c7b | 418 | py | Python | taxjar/data/region.py | danpalmer/taxjar-python | f22867bede037970970394d4c2a7635e9ec28ae9 | [
"MIT"
] | 24 | 2015-06-22T19:32:18.000Z | 2022-03-28T17:51:47.000Z | taxjar/data/region.py | danpalmer/taxjar-python | f22867bede037970970394d4c2a7635e9ec28ae9 | [
"MIT"
] | 14 | 2017-05-16T15:26:15.000Z | 2022-03-17T08:06:51.000Z | taxjar/data/region.py | danpalmer/taxjar-python | f22867bede037970970394d4c2a7635e9ec28ae9 | [
"MIT"
] | 15 | 2017-05-04T13:42:23.000Z | 2022-03-12T18:14:36.000Z | from jsonobject import JsonObject, StringProperty
from taxjar.data.iterable import TaxJarIterable
| 29.857143 | 55 | 0.746411 | from jsonobject import JsonObject, StringProperty
from taxjar.data.iterable import TaxJarIterable
class TaxJarRegion(JsonObject):
country_code = StringProperty()
country = StringProperty()
region_code = StringProperty()
region = StringProperty()
class TaxJarRegions(TaxJarIterable):
def handle_resp... | 91 | 157 | 72 |
ffa15f12fdc894d4532cf7e57ab348a7964a55f0 | 542 | py | Python | tests/test_registrar.py | 123joshuawu/orca | 741856dc264ffd38a7de8c2da1847543fd8c84d1 | [
"0BSD"
] | 6 | 2020-12-09T01:53:40.000Z | 2021-04-12T16:05:45.000Z | tests/test_registrar.py | 123joshuawu/orca | 741856dc264ffd38a7de8c2da1847543fd8c84d1 | [
"0BSD"
] | 13 | 2020-12-04T20:42:33.000Z | 2021-04-17T20:15:11.000Z | tests/test_registrar.py | 123joshuawu/orca | 741856dc264ffd38a7de8c2da1847543fd8c84d1 | [
"0BSD"
] | 1 | 2020-12-28T01:31:28.000Z | 2020-12-28T01:31:28.000Z | from api.models import ClassTypeEnum
from api.parser.registrar import Registrar | 49.272727 | 64 | 0.680812 | from api.models import ClassTypeEnum
from api.parser.registrar import Registrar
def test_parse_period_types():
types = Registrar.parse_period_types("202101")
assert types[('40432', 3, '21:05')] == ClassTypeEnum.TEST
assert types[('44040', 4, '12:20')] == ClassTypeEnum.LECTURE
assert types[('41340', 1, ... | 440 | 0 | 23 |
4760c00a445e7386fb0a28901582ad20ccac9772 | 2,398 | py | Python | app.py | parryc/thevoid | 0a79a2ed534bc8b33fdb73774ed2984836fe2cce | [
"MIT"
] | 1 | 2015-12-22T19:33:21.000Z | 2015-12-22T19:33:21.000Z | app.py | parryc/thevoid | 0a79a2ed534bc8b33fdb73774ed2984836fe2cce | [
"MIT"
] | 26 | 2015-09-07T04:29:10.000Z | 2021-10-19T13:10:46.000Z | app.py | parryc/thevoid | 0a79a2ed534bc8b33fdb73774ed2984836fe2cce | [
"MIT"
] | null | null | null | from flask import render_template
from flask_assets import Environment, Bundle
from flask_compress import Compress
from factory import create_app
app = create_app(__name__)
app.config.from_object("config.DevelopmentConfig")
assets = Environment(app)
Compress(app)
testing_site = app.config["TESTING_SITE"]
app.jinj... | 24.979167 | 64 | 0.705171 | from flask import render_template
from flask_assets import Environment, Bundle
from flask_compress import Compress
from factory import create_app
app = create_app(__name__)
app.config.from_object("config.DevelopmentConfig")
assets = Environment(app)
Compress(app)
testing_site = app.config["TESTING_SITE"]
def circle_... | 290 | 0 | 113 |
77bc995fe7637ad166c11dd6cefa5ce2739e50b7 | 14,017 | py | Python | bin/ADFRsuite/CCSBpckgs/PmvApp/deleteCmds.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/PmvApp/deleteCmds.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/PmvApp/deleteCmds.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | 1 | 2021-11-04T21:48:14.000Z | 2021-11-04T21:48:14.000Z | ################################################################################
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your op... | 40.394813 | 119 | 0.552829 | ################################################################################
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your op... | 8,091 | 0 | 200 |
f6abf36fab026dc8c66346673a0155293ab0a86a | 2,053 | py | Python | tests/integrations/test_fastapi.py | meadsteve/lagom | 025993f42fa23547e333d81373523ced1baf4854 | [
"MIT"
] | 109 | 2019-06-02T13:40:38.000Z | 2022-03-08T18:35:17.000Z | tests/integrations/test_fastapi.py | meadsteve/lagom | 025993f42fa23547e333d81373523ced1baf4854 | [
"MIT"
] | 152 | 2019-06-03T11:54:13.000Z | 2022-03-30T11:31:03.000Z | tests/integrations/test_fastapi.py | meadsteve/lagom | 025993f42fa23547e333d81373523ced1baf4854 | [
"MIT"
] | 5 | 2020-02-05T09:44:12.000Z | 2022-01-31T08:41:38.000Z | import pytest
from starlette.testclient import TestClient
from .fastapi_app import app, deps, Inner, ContextLoaded
@pytest.fixture
| 30.641791 | 68 | 0.692645 | import pytest
from starlette.testclient import TestClient
from .fastapi_app import app, deps, Inner, ContextLoaded
def test_request_singletons_are_the_same_within_a_request_context():
client = TestClient(app)
response = client.get("/")
data = response.json()
assert data["outer_one"] == data["outer_tw... | 1,753 | 0 | 160 |
13ca52f0845f2699344120b85794e42025335b5a | 421 | py | Python | MapReduce_WordOccurence/reducer_WordOccurence.py | allendaniel1993/Data-Pipeline-Bigdata-Analysis-and-Data-Product | 3b08311017dc9324c9eae5eec2c3a4bf5ecd60c1 | [
"MIT"
] | null | null | null | MapReduce_WordOccurence/reducer_WordOccurence.py | allendaniel1993/Data-Pipeline-Bigdata-Analysis-and-Data-Product | 3b08311017dc9324c9eae5eec2c3a4bf5ecd60c1 | [
"MIT"
] | null | null | null | MapReduce_WordOccurence/reducer_WordOccurence.py | allendaniel1993/Data-Pipeline-Bigdata-Analysis-and-Data-Product | 3b08311017dc9324c9eae5eec2c3a4bf5ecd60c1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Allen Daniel Yesa
# Aditya Subramanian Muralidaran
import sys
curr_key = None
curr_val = 0
for key_val in sys.stdin:
key,str_val = key_val.split("\t",1)
try:
val = int(str_val)
except:
continue
if(curr_key==key):
curr_val=curr_val+val;
else:
if(curr_key is not None):
print(cu... | 13.580645 | 37 | 0.679335 | #!/usr/bin/python
# Allen Daniel Yesa
# Aditya Subramanian Muralidaran
import sys
curr_key = None
curr_val = 0
for key_val in sys.stdin:
key,str_val = key_val.split("\t",1)
try:
val = int(str_val)
except:
continue
if(curr_key==key):
curr_val=curr_val+val;
else:
if(curr_key is not None):
print(cu... | 0 | 0 | 0 |
e655ecc572f6e31570edbe354b4228217469c323 | 78 | py | Python | haravan/resources/country.py | vivekpatel111/HaravanAPI | bec18d43b485c966e1396ce990c7b0fd40c96de0 | [
"MIT"
] | null | null | null | haravan/resources/country.py | vivekpatel111/HaravanAPI | bec18d43b485c966e1396ce990c7b0fd40c96de0 | [
"MIT"
] | null | null | null | haravan/resources/country.py | vivekpatel111/HaravanAPI | bec18d43b485c966e1396ce990c7b0fd40c96de0 | [
"MIT"
] | 1 | 2019-03-08T06:28:48.000Z | 2019-03-08T06:28:48.000Z | from ..base import HaravanResource
| 13 | 34 | 0.769231 | from ..base import HaravanResource
class Country(HaravanResource):
pass
| 0 | 19 | 23 |
bec8b9f8126e49a538afae87a8175e1c10752f3f | 3,274 | py | Python | provider/execution_context.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 17 | 2015-02-10T07:10:29.000Z | 2021-05-14T22:24:45.000Z | provider/execution_context.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 459 | 2015-03-31T18:24:23.000Z | 2022-03-30T19:44:40.000Z | provider/execution_context.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 9 | 2015-04-18T16:57:31.000Z | 2020-10-30T11:49:13.000Z | from boto.s3.connection import S3Connection
from boto.s3.key import Key
from boto.exception import S3ResponseError
from pydoc import locate
import json
import redis
from provider.utils import unicode_encode
# TODO : replace with better implementation - e.g. use Redis/Elasticache
| 29.763636 | 87 | 0.653635 | from boto.s3.connection import S3Connection
from boto.s3.key import Key
from boto.exception import S3ResponseError
from pydoc import locate
import json
import redis
from provider.utils import unicode_encode
def get_session(settings, input_data, session_key):
settings_session_class = "RedisSession" # Default
... | 2,608 | -10 | 387 |
641048b7ee5b4154f532187dc6c902516b5fdc15 | 2,632 | py | Python | third-party/llvm/llvm-src/utils/lint/common_lint.py | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | third-party/llvm/llvm-src/utils/lint/common_lint.py | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | third-party/llvm/llvm-src/utils/lint/common_lint.py | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z | #!/usr/bin/env python
#
# Common lint functions applicable to multiple types of files.
from __future__ import print_function
import re
def VerifyLineLength(filename, lines, max_length):
"""Checks to make sure the file has no lines with lines exceeding the length
limit.
Args:
filename: the file under consid... | 26.585859 | 78 | 0.678951 | #!/usr/bin/env python
#
# Common lint functions applicable to multiple types of files.
from __future__ import print_function
import re
def VerifyLineLength(filename, lines, max_length):
"""Checks to make sure the file has no lines with lines exceeding the length
limit.
Args:
filename: the file under consid... | 59 | -6 | 47 |
dbf0aa6f0035f2a4bbcaa8ab366fe3cf0e95ae17 | 3,742 | py | Python | ProgrammingLanguages/Python/UsefulScripts/doc_docx_pdf_txt_converter.py | ldsands/UsefulCodeSnippits | 69d578c163e6912d1b960b606a8fd80c2c059427 | [
"MIT"
] | null | null | null | ProgrammingLanguages/Python/UsefulScripts/doc_docx_pdf_txt_converter.py | ldsands/UsefulCodeSnippits | 69d578c163e6912d1b960b606a8fd80c2c059427 | [
"MIT"
] | 2 | 2020-03-17T21:45:41.000Z | 2020-11-27T18:51:26.000Z | ProgrammingLanguages/Python/UsefulScripts/doc_docx_pdf_txt_converter.py | ldsands/UsefulCodeSnippits | 69d578c163e6912d1b960b606a8fd80c2c059427 | [
"MIT"
] | null | null | null | # pip install pdfminer.six docx2txt
# to install win32com use the pywin32install.py script
import shutil
import sys
from pathlib import Path
from pprint import pprint
import docx2txt
from pdfminer.high_level import extract_text
if sys.platform == "win32":
import win32com.client as win32
from win32com.client... | 39.389474 | 264 | 0.621593 | # pip install pdfminer.six docx2txt
# to install win32com use the pywin32install.py script
import shutil
import sys
from pathlib import Path
from pprint import pprint
import docx2txt
from pdfminer.high_level import extract_text
if sys.platform == "win32":
import win32com.client as win32
from win32com.client... | 3,224 | 0 | 92 |
4dc30f46f6281aa719bfe6afc4b5aa02e7ee3395 | 5,243 | py | Python | earth_enterprise/src/fusion/portableglobe/servers/portable_server_base.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 2,661 | 2017-03-20T22:12:50.000Z | 2022-03-30T09:43:19.000Z | earth_enterprise/src/fusion/portableglobe/servers/portable_server_base.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 1,531 | 2017-03-24T17:20:32.000Z | 2022-03-16T18:11:14.000Z | earth_enterprise/src/fusion/portableglobe/servers/portable_server_base.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 990 | 2017-03-24T11:54:28.000Z | 2022-03-22T11:51:47.000Z | #!/usr/bin/env python2.7
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 28.340541 | 78 | 0.651726 | #!/usr/bin/env python2.7
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 134 | 0 | 25 |
e0533f32c2ede3632169eeba54908e1eda97b429 | 718 | py | Python | Scripts/start.py | sporiyano/graphiti | 56d85e5262b76dc6ce4f213a4d80486e015de1b7 | [
"BSD-2-Clause"
] | 93 | 2015-01-01T17:49:53.000Z | 2022-02-24T21:25:15.000Z | Scripts/start.py | sporiyano/graphiti | 56d85e5262b76dc6ce4f213a4d80486e015de1b7 | [
"BSD-2-Clause"
] | 13 | 2015-03-30T18:01:05.000Z | 2018-05-28T03:47:33.000Z | Scripts/start.py | ThibaultReuille/graphiti | 56d85e5262b76dc6ce4f213a4d80486e015de1b7 | [
"BSD-2-Clause"
] | 31 | 2015-01-14T12:16:13.000Z | 2022-02-24T21:25:16.000Z | import sys
sys.path.insert(0, "./")
import os
from Scripts import *
if __name__ == "__main__":
if len(sys.argv) <= 1:
usage()
else:
module = "Scripts." + sys.argv[1]
if module in sys.modules:
sys.modules[module].start()
else:
print("No module named {}".... | 25.642857 | 72 | 0.513928 | import sys
sys.path.insert(0, "./")
import os
from Scripts import *
def usage():
exclude = ['__init__.py', 'start.py', 'standard.py']
print("")
print("Usage: " + sys.argv[0] + " <view>")
print(" Available views : {}".format(
" ".join([file.split('.')[0] for file in os.listdir('Scripts')
... | 321 | 0 | 23 |
078cd45b4695b13f5ab288c33e4c06fbd0040f24 | 74,995 | py | Python | lib/python/treadmill/tests/scheduler_test.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 133 | 2016-09-15T13:36:12.000Z | 2021-01-18T06:29:13.000Z | lib/python/treadmill/tests/scheduler_test.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 108 | 2016-12-28T23:41:27.000Z | 2020-03-05T21:20:37.000Z | lib/python/treadmill/tests/scheduler_test.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 69 | 2016-09-23T20:38:58.000Z | 2020-11-11T02:31:21.000Z | """Unit test for treadmill.scheduler.
"""
# Disable too many lines in module warning.
#
# pylint: disable=C0302
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import datetime
import itertools
import sys
import time
... | 38.478707 | 79 | 0.591546 | """Unit test for treadmill.scheduler.
"""
# Disable too many lines in module warning.
#
# pylint: disable=C0302
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import datetime
import itertools
import sys
import time
... | 558 | 0 | 184 |
efa430cb70cf52f5c59fbc4ba2d6a6aab983b47e | 129 | py | Python | main.py | shilu10/Dummy_Deployment | 9ed3309ac3b48940fb19df3deae732376c52cf42 | [
"MIT"
] | null | null | null | main.py | shilu10/Dummy_Deployment | 9ed3309ac3b48940fb19df3deae732376c52cf42 | [
"MIT"
] | null | null | null | main.py | shilu10/Dummy_Deployment | 9ed3309ac3b48940fb19df3deae732376c52cf42 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route("/")
| 21.5 | 53 | 0.666667 | from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "<h1 style='color:blue'>Hello There!</h1>"
| 45 | 0 | 22 |
c66bb2c99e1c48f2b7c2cc56061fca2ede4c8347 | 1,198 | py | Python | College/HVCC/Python Programming/Final Project/runOstranderCustomer.py | lwoluke/Projects | 88f288b32db594a96af98b8b3420f7e5f9a5a47d | [
"MIT"
] | null | null | null | College/HVCC/Python Programming/Final Project/runOstranderCustomer.py | lwoluke/Projects | 88f288b32db594a96af98b8b3420f7e5f9a5a47d | [
"MIT"
] | null | null | null | College/HVCC/Python Programming/Final Project/runOstranderCustomer.py | lwoluke/Projects | 88f288b32db594a96af98b8b3420f7e5f9a5a47d | [
"MIT"
] | null | null | null | """
File: runOstranderCustomer.py
Final Project - Main file
Reads the files of a company, which contain its customers and their orders, and prints the
contents in a comprehendible format.
"""
from ostranderCustomer import OstranderCustomer
# customers is {304: ostranderCustomer.OstranderCustomer object at 0x00...... | 23.490196 | 90 | 0.630217 | """
File: runOstranderCustomer.py
Final Project - Main file
Reads the files of a company, which contain its customers and their orders, and prints the
contents in a comprehendible format.
"""
from ostranderCustomer import OstranderCustomer
def readCustomers():
f = open("customers.txt", 'r')
customers = {}... | 767 | 0 | 68 |
9569039ee886648db8def483d0eef0999c6c8786 | 3,292 | py | Python | dregcli/tests/tests_unit/test_repository.py | jssuzanne/dregcli | 328e8aacf4e46f538e2b62c8c3cceba002feb367 | [
"MIT"
] | null | null | null | dregcli/tests/tests_unit/test_repository.py | jssuzanne/dregcli | 328e8aacf4e46f538e2b62c8c3cceba002feb367 | [
"MIT"
] | 1 | 2019-04-12T13:46:52.000Z | 2019-04-15T15:26:47.000Z | dregcli/tests/tests_unit/test_repository.py | jssuzanne/dregcli | 328e8aacf4e46f538e2b62c8c3cceba002feb367 | [
"MIT"
] | 1 | 2019-04-12T13:44:53.000Z | 2019-04-12T13:44:53.000Z | import os
import sys
from unittest import mock
import pytest
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)
)
from fixtures import (
fixture_registry_url,
fixture_repository,
fixture_repositories,
fixture_tags,
fixture_digest,
fixture_tags_url,
fix... | 31.056604 | 79 | 0.615735 | import os
import sys
from unittest import mock
import pytest
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)
)
from fixtures import (
fixture_registry_url,
fixture_repository,
fixture_repositories,
fixture_tags,
fixture_digest,
fixture_tags_url,
fix... | 2,398 | 413 | 23 |
0b0f55e3259c754e6f41e0aa8589e9c775309a29 | 477 | py | Python | srcode/user/decorator.py | Bnjorogedev/Flaskgram-instaclone | c1efb66e9b6394d661f51cd3621066b1e02ddd17 | [
"MIT"
] | 1 | 2020-09-22T21:01:36.000Z | 2020-09-22T21:01:36.000Z | srcode/user/decorator.py | Bnjorogedev/Flaskgram | c1efb66e9b6394d661f51cd3621066b1e02ddd17 | [
"MIT"
] | 1 | 2020-10-18T07:05:11.000Z | 2020-10-18T07:05:11.000Z | srcode/user/decorator.py | Bnjorogedev/Flaskgram-instaclone | c1efb66e9b6394d661f51cd3621066b1e02ddd17 | [
"MIT"
] | null | null | null | from flask import flash, redirect, url_for, abort
from flask_login import current_user
from srcode.models import Permission, User
from functools import wraps
def check_confirmed(func):
'''Checks whether a certain user is confirmed'''
@wraps(func)
return decorated_function | 31.8 | 59 | 0.706499 | from flask import flash, redirect, url_for, abort
from flask_login import current_user
from srcode.models import Permission, User
from functools import wraps
def check_confirmed(func):
'''Checks whether a certain user is confirmed'''
@wraps(func)
def decorated_function(*args, **kwargs):
if n... | 160 | 0 | 27 |
0cc1bc76ee8680d1873dbebc5d44e30fed7a3a0c | 293 | py | Python | src/kol/test/TestLogin.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 19 | 2015-02-16T08:30:49.000Z | 2020-05-01T06:06:33.000Z | src/kol/test/TestLogin.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 5 | 2015-01-13T23:01:54.000Z | 2016-11-30T15:23:43.000Z | src/kol/test/TestLogin.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 19 | 2015-05-28T09:36:19.000Z | 2022-03-15T23:19:29.000Z | import TestData
from kol.Session import Session
import unittest
| 24.416667 | 69 | 0.665529 | import TestData
from kol.Session import Session
import unittest
class Main(unittest.TestCase):
def runTest(self):
s = Session()
s.login(TestData.data["userName"], TestData.data["password"])
self.assert_(s.isConnected == True)
TestData.data["session"] = s
| 170 | 9 | 49 |
b14424ac4aec20fd96ca92e13bc9a33f0e87d8bc | 4,974 | py | Python | src/spn/io/Text.py | kripa-experiments/SPFlow | 32eada604bf5442d8aa10223581b187f7a57d540 | [
"Apache-2.0"
] | null | null | null | src/spn/io/Text.py | kripa-experiments/SPFlow | 32eada604bf5442d8aa10223581b187f7a57d540 | [
"Apache-2.0"
] | null | null | null | src/spn/io/Text.py | kripa-experiments/SPFlow | 32eada604bf5442d8aa10223581b187f7a57d540 | [
"Apache-2.0"
] | null | null | null | '''
Created on March 21, 2018
@author: Alejandro Molina
'''
from collections import OrderedDict
from enum import Enum
from spn.algorithms.Validity import is_valid
from spn.structure.Base import Product, Sum, rebuild_scopes_bottom_up, assign_ids, Leaf
import numpy as np
_node_to_str = {}
_str_to_spn = OrderedD... | 30.145455 | 112 | 0.624045 | '''
Created on March 21, 2018
@author: Alejandro Molina
'''
from collections import OrderedDict
from enum import Enum
from spn.algorithms.Validity import is_valid
from spn.structure.Base import Product, Sum, rebuild_scopes_bottom_up, assign_ids, Leaf
import numpy as np
def to_JSON(node):
import json
from c... | 4,508 | 0 | 138 |