hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7945881497d605a1b1152cefa26257db9ec10f7d | 1,938 | py | Python | tools/scrape_language_dataset.py | kmbrou/text-mining-class | 06160dfed64c5d2485d18c0c9dc719efe74a5521 | [
"MIT"
] | 43 | 2018-10-22T05:14:32.000Z | 2020-11-19T19:05:08.000Z | tools/scrape_language_dataset.py | kmbrou/text-mining-class | 06160dfed64c5d2485d18c0c9dc719efe74a5521 | [
"MIT"
] | 1 | 2018-11-27T18:01:30.000Z | 2018-11-27T18:01:30.000Z | tools/scrape_language_dataset.py | kmbrou/text-mining-class | 06160dfed64c5d2485d18c0c9dc719efe74a5521 | [
"MIT"
] | 25 | 2018-11-27T17:09:19.000Z | 2020-11-19T19:05:29.000Z | from pathlib import Path
from urllib.parse import urlparse
from tmclass_solutions.scraping import SimpleWebScraper
from tmclass_solutions.scraping import WikipediaArticle
EN_BASE_URL = "https://en.wikipedia.org/wiki/"
english_articles = [
"Agriculture", "Architecture", "Art", "Biology", "Business",
"Cinemato... | 29.363636 | 69 | 0.681115 |
7945881f64d97fb04ff2e532d34808708931b8fa | 14,599 | py | Python | pymap/parsing/primitives.py | chenliangomc/pymap | 42581712631e9e9787e9dd094a22f5cc607f804d | [
"MIT"
] | null | null | null | pymap/parsing/primitives.py | chenliangomc/pymap | 42581712631e9e9787e9dd094a22f5cc607f804d | [
"MIT"
] | null | null | null | pymap/parsing/primitives.py | chenliangomc/pymap | 42581712631e9e9787e9dd094a22f5cc607f804d | [
"MIT"
] | null | null | null | """Primitive parseable objects in the IMAP protocol."""
import re
from abc import abstractmethod, ABCMeta
from collections.abc import Sequence as SequenceABC
from functools import total_ordering
from io import BytesIO
from typing import cast, Type, Tuple, List, Union, Iterable, Sequence, Match, \
Optional, Iterato... | 29.854806 | 79 | 0.574971 |
794588dcebfe0b2347712ada878cbfb377a233d3 | 16,969 | py | Python | test/dialect/mssql/test_reflection.py | AllanDaemon/sqlalchemy | e57d63ab96bccac77c549771ab60fecd6d1bb770 | [
"MIT"
] | 2 | 2020-02-19T17:50:50.000Z | 2021-02-10T02:52:41.000Z | test/dialect/mssql/test_reflection.py | AllanDaemon/sqlalchemy | e57d63ab96bccac77c549771ab60fecd6d1bb770 | [
"MIT"
] | null | null | null | test/dialect/mssql/test_reflection.py | AllanDaemon/sqlalchemy | e57d63ab96bccac77c549771ab60fecd6d1bb770 | [
"MIT"
] | 1 | 2021-06-13T01:55:35.000Z | 2021-06-13T01:55:35.000Z | # -*- encoding: utf-8
from sqlalchemy import Column
from sqlalchemy import DDL
from sqlalchemy import event
from sqlalchemy import ForeignKey
from sqlalchemy import Index
from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import PrimaryKeyConstraint
from sqlalc... | 32.885659 | 79 | 0.568802 |
79458a9d16b03a79afefafd688813cec460082f1 | 15,431 | py | Python | test/unit/test_multipart.py | qupengcheng/py-udfs-api | 182de801c0ca52e5960019cd0cbfef10d5a386f0 | [
"MIT"
] | 1 | 2018-11-12T02:59:41.000Z | 2018-11-12T02:59:41.000Z | test/unit/test_multipart.py | qupengcheng/py-udfs-api | 182de801c0ca52e5960019cd0cbfef10d5a386f0 | [
"MIT"
] | null | null | null | test/unit/test_multipart.py | qupengcheng/py-udfs-api | 182de801c0ca52e5960019cd0cbfef10d5a386f0 | [
"MIT"
] | null | null | null | """Test the file multipart.py
Classes:
TestContentHelpers -- test the three content-header helper functions
TestBodyGenerator -- test the BodyGenerator helper class
TestBufferedGenerator -- test the BufferedGenerator helper class
TestFileStream -- test the FileStream generator class
TestDirectoryStream -- test the Dir... | 38.290323 | 96 | 0.609747 |
79458b4563ae8c6b9038a7848e6cb82e364615b4 | 450 | py | Python | wazimap_ng/datasets/migrations/0003_profile_indicators.py | arghyaiitb/wazimap-ng | 2a77860526d865b8fd0c22a2204f121fdb3b28a0 | [
"Apache-2.0"
] | 11 | 2019-12-31T20:27:22.000Z | 2022-03-10T03:55:38.000Z | wazimap_ng/datasets/migrations/0003_profile_indicators.py | arghyaiitb/wazimap-ng | 2a77860526d865b8fd0c22a2204f121fdb3b28a0 | [
"Apache-2.0"
] | 164 | 2020-02-06T15:02:22.000Z | 2022-03-30T22:42:00.000Z | wazimap_ng/datasets/migrations/0003_profile_indicators.py | arghyaiitb/wazimap-ng | 2a77860526d865b8fd0c22a2204f121fdb3b28a0 | [
"Apache-2.0"
] | 16 | 2020-01-03T20:30:24.000Z | 2022-01-11T11:05:15.000Z | # Generated by Django 2.2.9 on 2019-12-20 13:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('datasets', '0002_remove_profile_indicators'),
]
operations = [
migrations.AddField(
model_name='profile',
name='indi... | 23.684211 | 103 | 0.635556 |
79458b51a643895734aecc3010f2d61b0961da6b | 100 | py | Python | macropodus/network/service/__init__.py | leileixiao/Macropodus | 9de38c06d332bd26e704fd4afd8f44678de7f44f | [
"MIT"
] | 485 | 2019-12-31T16:53:28.000Z | 2022-03-31T08:01:30.000Z | macropodus/network/service/__init__.py | Pull-Qutter/Macropodus | eafe3c00e1e4286ee672ccfada54122e9f86b534 | [
"MIT"
] | 14 | 2020-03-07T04:17:47.000Z | 2022-03-14T01:08:23.000Z | macropodus/network/service/__init__.py | Pull-Qutter/Macropodus | eafe3c00e1e4286ee672ccfada54122e9f86b534 | [
"MIT"
] | 85 | 2020-01-16T05:03:07.000Z | 2022-03-03T11:42:07.000Z | # !/usr/bin/python
# -*- coding: utf-8 -*-
# @time : 2020/1/16 22:01
# @author : Mo
# @function: | 20 | 28 | 0.53 |
79458bc0f3191cfa698c20f04e99c35b68e8d903 | 2,314 | py | Python | tests/test_regressor.py | UBC-MDS/simplefit | ba022b38a4479efe11261a292bacfa4bf441a5fa | [
"MIT"
] | null | null | null | tests/test_regressor.py | UBC-MDS/simplefit | ba022b38a4479efe11261a292bacfa4bf441a5fa | [
"MIT"
] | 41 | 2022-01-13T05:36:48.000Z | 2022-03-06T08:56:12.000Z | tests/test_regressor.py | UBC-MDS/simplefit | ba022b38a4479efe11261a292bacfa4bf441a5fa | [
"MIT"
] | 3 | 2022-01-13T05:19:09.000Z | 2022-03-07T03:20:38.000Z | from simplefit.regressor import regressor
import pandas as pd
from sklearn.model_selection import (train_test_split,)
import pytest
def test_regressor():
"""Test regrssor function outputs with SpotifyFeatures.csv file."""
spotify_df = pd.read_csv("tests/data/SpotifyFeatures.csv")
train_df, test_df = trai... | 49.234043 | 137 | 0.71478 |
79458c4f5d32e13d722ca7677cfec3226cf8ded5 | 1,944 | py | Python | tools/validation_solo.py | WanxinT/Balanced-RODNet | f6c9c5b4696b697254698cce65a97ec2d92c7a3c | [
"MIT"
] | null | null | null | tools/validation_solo.py | WanxinT/Balanced-RODNet | f6c9c5b4696b697254698cce65a97ec2d92c7a3c | [
"MIT"
] | null | null | null | tools/validation_solo.py | WanxinT/Balanced-RODNet | f6c9c5b4696b697254698cce65a97ec2d92c7a3c | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""
@author:Zehui Yu
@file: validation_rod2021.py
@time: 2021/01/31
"""
import sys
import os
from cruw import CRUW
from cruw.eval import evaluate_rod2021, evaluate_rod2021_APAR
import argparse
"python tools/validation_rod2021.py --config configs/my_config_rodnet_hg1_win16_lovasz_bs16_lr1e5_2020... | 43.2 | 116 | 0.739198 |
79458d0e4a827f83588cead3bb0c7b2ab7a52ae4 | 4,521 | py | Python | workspace/riva_quickstart_v1.8.0-beta/examples/talk_stream.py | shahin-trunk/NeMo | a10ac29a6deb05bcfc672ad287f4a8279c1f9289 | [
"Apache-2.0"
] | null | null | null | workspace/riva_quickstart_v1.8.0-beta/examples/talk_stream.py | shahin-trunk/NeMo | a10ac29a6deb05bcfc672ad287f4a8279c1f9289 | [
"Apache-2.0"
] | null | null | null | workspace/riva_quickstart_v1.8.0-beta/examples/talk_stream.py | shahin-trunk/NeMo | a10ac29a6deb05bcfc672ad287f4a8279c1f9289 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions a... | 39.657895 | 148 | 0.680602 |
79458dbaac4f101bebff22a5151fa53e54f6d294 | 25,985 | py | Python | qa/rpc-tests/test_framework/script.py | koba24/tcoin | 04b9caaca587fa1bc928c81940d7ba3d2754083b | [
"MIT"
] | 2 | 2018-06-24T19:51:25.000Z | 2019-06-11T14:00:16.000Z | qa/rpc-tests/test_framework/script.py | koba24/tcoin | 04b9caaca587fa1bc928c81940d7ba3d2754083b | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/script.py | koba24/tcoin | 04b9caaca587fa1bc928c81940d7ba3d2754083b | [
"MIT"
] | 2 | 2018-09-13T22:54:32.000Z | 2019-02-20T02:04:25.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Tcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# script.py
#
# This file is modified from python-tcoinlib.
#
"""Scripts
Functionality to build scripts... | 27.410338 | 146 | 0.612007 |
79458e476952c9ebedc6d8ed82636f69567cc2fe | 1,218 | py | Python | app/cers/migrations/0001_initial.py | greenlaver/okulab-cers | 47b432563180ef605af89fa17d8dfcf73696e58d | [
"MIT"
] | null | null | null | app/cers/migrations/0001_initial.py | greenlaver/okulab-cers | 47b432563180ef605af89fa17d8dfcf73696e58d | [
"MIT"
] | null | null | null | app/cers/migrations/0001_initial.py | greenlaver/okulab-cers | 47b432563180ef605af89fa17d8dfcf73696e58d | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2020-06-02 19:22
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateMode... | 34.8 | 159 | 0.607553 |
79458e760b22bd183a077d723124cd824deb0fde | 26 | py | Python | pynqhls/io/__init__.py | 3togo/PYNQ-HLS | fc3bcf4b6afe8cfcf411035ac50f34089b2ab3bf | [
"BSD-3-Clause"
] | 87 | 2018-02-14T18:49:48.000Z | 2022-03-03T14:43:59.000Z | pynqhls/io/__init__.py | xupsh/PYNQ-HLS | 60cfd98362632ea4417309a3d73ff60885eba1ab | [
"BSD-3-Clause"
] | 3 | 2018-12-11T06:30:25.000Z | 2020-12-30T04:54:21.000Z | pynqhls/io/__init__.py | xupsh/PYNQ-HLS | 60cfd98362632ea4417309a3d73ff60885eba1ab | [
"BSD-3-Clause"
] | 25 | 2018-08-08T13:52:48.000Z | 2022-03-29T18:24:04.000Z | from .io import ioOverlay
| 13 | 25 | 0.807692 |
79458e835245a1428d7b2a4c5155731f69665339 | 2,051 | py | Python | lccs_db/models/base.py | raphaelrpl/lccs-db | 4db4666bb8ea7e18527b6530e48896002a841cb4 | [
"MIT"
] | null | null | null | lccs_db/models/base.py | raphaelrpl/lccs-db | 4db4666bb8ea7e18527b6530e48896002a841cb4 | [
"MIT"
] | null | null | null | lccs_db/models/base.py | raphaelrpl/lccs-db | 4db4666bb8ea7e18527b6530e48896002a841cb4 | [
"MIT"
] | null | null | null | #
# This file is part of Land Cover Classification System Database Model.
# Copyright (C) 2019-2020 INPE.
#
# Land Cover Classification System Database Model is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""Model Configuration."""
... | 27.716216 | 108 | 0.628961 |
794590802b96ba431f0521d56d0a8d4f9971531b | 601 | py | Python | config.py | etherisc/arc2-server | ba2a59382fa7dd09eed71780318eed243bd52543 | [
"Apache-2.0"
] | null | null | null | config.py | etherisc/arc2-server | ba2a59382fa7dd09eed71780318eed243bd52543 | [
"Apache-2.0"
] | null | null | null | config.py | etherisc/arc2-server | ba2a59382fa7dd09eed71780318eed243bd52543 | [
"Apache-2.0"
] | null | null | null | import logging
from logging.config import dictConfig
# logging config from https://flask.palletsprojects.com/en/2.0.x/logging/
LOGGING_CONFIG = {
'version': 1,
'formatters': {'default': {
'format': '[%(asctime)s] %(levelname)s %(module)s: %(message)s',
}},
'handlers': {'wsgi': {
... | 26.130435 | 74 | 0.569052 |
7945910277533d30330a5444dcbecbcec879ba1c | 2,712 | py | Python | tests/common_tests.py | agorinenko/drf-toolkit | 2c0bc2137ab7ae7de085c03e2bdfcac13431ba0d | [
"MIT"
] | 2 | 2019-12-16T12:17:16.000Z | 2020-02-05T10:56:48.000Z | tests/common_tests.py | agorinenko/drf-toolkit | 2c0bc2137ab7ae7de085c03e2bdfcac13431ba0d | [
"MIT"
] | 8 | 2020-03-05T14:35:05.000Z | 2022-02-10T09:58:52.000Z | tests/common_tests.py | agorinenko/drf-toolkit | 2c0bc2137ab7ae7de085c03e2bdfcac13431ba0d | [
"MIT"
] | null | null | null | import unittest
from drf_toolkit.drf_utils import DrfUtils
class CommonTests(unittest.TestCase):
def test_transform_list_parameters(self):
schema = [
{'name': 'type_of_message', 'type': 'list',
'items': {'type': 'enum', 'choices': ['text_message', 'issue', 'solution', 'solution_w... | 46.758621 | 117 | 0.626106 |
794591cefed3ef67e7f482f2d6ba79fe06564625 | 8,531 | py | Python | python/tvm/meta_schedule/integration.py | prateek9623/tvm | 891fd0132b7bbdd9e6b75935db4a4a688fef6afc | [
"Apache-2.0"
] | null | null | null | python/tvm/meta_schedule/integration.py | prateek9623/tvm | 891fd0132b7bbdd9e6b75935db4a4a688fef6afc | [
"Apache-2.0"
] | null | null | null | python/tvm/meta_schedule/integration.py | prateek9623/tvm | 891fd0132b7bbdd9e6b75935db4a4a688fef6afc | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.065891 | 124 | 0.647286 |
794592a3c51632137e116650e2d26a67a3543578 | 1,766 | py | Python | PCA/plot.py | ZechangSun/VisHW | 7dc1bed84a67f2cdd523e7e4799a1ce31405de38 | [
"MIT"
] | null | null | null | PCA/plot.py | ZechangSun/VisHW | 7dc1bed84a67f2cdd523e7e4799a1ce31405de38 | [
"MIT"
] | null | null | null | PCA/plot.py | ZechangSun/VisHW | 7dc1bed84a67f2cdd523e7e4799a1ce31405de38 | [
"MIT"
] | null | null | null | from pyecharts import Scatter, Scatter3D
from pyecharts import Page
import pyecharts
import numpy as np
import pandas as pd
if __name__ == '__main__':
data = pd.read_csv('img2d.csv', sep=',', names=['x', 'y'])
pyecharts.configure(global_theme='shine')
label = np.load('../data/sampled_label.npy')
page ... | 58.866667 | 246 | 0.656285 |
794592ed4e8e8dec10076ba8588095d07710d493 | 108,813 | py | Python | nematus/nmt.py | cindyxinyiwang/nematus | 30fa0bd4524e9f8b2811b04e1c541e9745131ebb | [
"BSD-3-Clause"
] | null | null | null | nematus/nmt.py | cindyxinyiwang/nematus | 30fa0bd4524e9f8b2811b04e1c541e9745131ebb | [
"BSD-3-Clause"
] | null | null | null | nematus/nmt.py | cindyxinyiwang/nematus | 30fa0bd4524e9f8b2811b04e1c541e9745131ebb | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Build a neural machine translation model with soft attention
'''
import theano
import theano.tensor as tensor
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
import json
import numpy
import copy
import argparse
import os
import sys
import time
im... | 49.437983 | 212 | 0.572652 |
794592f45cf556cbf0e6cdd470ab31428777ddb4 | 672 | py | Python | manage.py | dibinvm1/CraigslistClone | bad79c21ea225afbc1aaed744dc5e4c877158f02 | [
"MIT"
] | null | null | null | manage.py | dibinvm1/CraigslistClone | bad79c21ea225afbc1aaed744dc5e4c877158f02 | [
"MIT"
] | null | null | null | manage.py | dibinvm1/CraigslistClone | bad79c21ea225afbc1aaed744dc5e4c877158f02 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Craigslist_Clone.settings')
try:
from django.core.management import execute_from_command_line
ex... | 29.217391 | 80 | 0.683036 |
794593e320cda55d8ec0d2831a27560356509e21 | 8,144 | py | Python | ucscentralsdk/mometa/fabric/FabricVsan.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/fabric/FabricVsan.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/fabric/FabricVsan.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for FabricVsan ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class FabricVsanConsts():
DEFAULT_ZONING_DISABLED = "disabled"
DEFAU... | 61.69697 | 419 | 0.661591 |
79459413f3f343538da94968dfc7c217e2a9d107 | 1,336 | py | Python | LSTM/reader_test.py | MasazI/DeepLearning_TensorFlow | 6a0865850b32eb4af52bc41984e0cbaa2a19c48a | [
"MIT"
] | 17 | 2015-12-20T14:10:35.000Z | 2022-02-28T13:06:33.000Z | LSTM/reader_test.py | MasazI/DeepLearning_TensorFlow | 6a0865850b32eb4af52bc41984e0cbaa2a19c48a | [
"MIT"
] | 1 | 2019-02-20T12:37:56.000Z | 2019-02-20T12:37:56.000Z | LSTM/reader_test.py | MasazI/DeepLearning_TensorFlow | 6a0865850b32eb4af52bc41984e0cbaa2a19c48a | [
"MIT"
] | 8 | 2015-11-14T04:32:10.000Z | 2020-12-26T01:12:18.000Z | # encoding:utf-8
import os.path
# pylint: disable=g-bad-import-order,unused-import
import tensorflow.python.platform
import numpy as np
import tensorflow as tf
import reader
from tensorflow.python.platform import gfile
class PtbReaderTest(tf.test.TestCase):
def setUp(self):
self._string_data = "\n".join(
... | 27.833333 | 71 | 0.660928 |
794594c4a9642a7bad6f3c8d318f63993f48dace | 1,977 | py | Python | Tests/scripts/circleci_spell_checker.py | vibhuabharadwaj/content | 30d639dbea0015536a3040ec18f93e50322bded0 | [
"MIT"
] | 7 | 2020-09-24T22:38:01.000Z | 2021-07-14T15:58:35.000Z | Tests/scripts/circleci_spell_checker.py | vibhuabharadwaj/content | 30d639dbea0015536a3040ec18f93e50322bded0 | [
"MIT"
] | 9 | 2021-02-08T20:51:18.000Z | 2021-09-23T23:27:38.000Z | Tests/scripts/circleci_spell_checker.py | vibhuabharadwaj/content | 30d639dbea0015536a3040ec18f93e50322bded0 | [
"MIT"
] | 2 | 2020-12-08T17:03:33.000Z | 2021-07-13T18:32:06.000Z | import re
import sys
from Tests.scripts.spell_checker import spell_checker
from Tests.test_utils import run_command, checked_type
from Tests.scripts.constants import SPELLCHECK_FILE_TYPES, DESCRIPTION_REGEX
def get_modified_files(files_string):
"""Get lists of the modified files in your branch according to the f... | 31.380952 | 111 | 0.654021 |
794594de1c794d94d360a00f0a51e76a36641d91 | 14,792 | py | Python | bindings/python/cntk/learners/tests/learner_test.py | rickyHong/MS-CNTK | 2bcdc9dff6dc6393813f6043d80e167fb31aed72 | [
"RSA-MD"
] | null | null | null | bindings/python/cntk/learners/tests/learner_test.py | rickyHong/MS-CNTK | 2bcdc9dff6dc6393813f6043d80e167fb31aed72 | [
"RSA-MD"
] | null | null | null | bindings/python/cntk/learners/tests/learner_test.py | rickyHong/MS-CNTK | 2bcdc9dff6dc6393813f6043d80e167fb31aed72 | [
"RSA-MD"
] | null | null | null | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
from __future__ import division, print_function
import numpy as np
import cntk as C... | 38.824147 | 133 | 0.68848 |
7945963033ff69f472a5d418dc1b2814e3543fcf | 1,766 | py | Python | analyses/evolution_stats.py | marisgg/evolutionary-potts | 7216bbac497697eba22cb4e877d70a73e22d8ed1 | [
"MIT"
] | null | null | null | analyses/evolution_stats.py | marisgg/evolutionary-potts | 7216bbac497697eba22cb4e877d70a73e22d8ed1 | [
"MIT"
] | null | null | null | analyses/evolution_stats.py | marisgg/evolutionary-potts | 7216bbac497697eba22cb4e877d70a73e22d8ed1 | [
"MIT"
] | null | null | null | import numpy as np
import os
from matplotlib import pyplot as plt
result_dirs = {"none":[], "medium":[], "high":[]}
for filename in os.listdir("results/"):
filename = "results/"+filename
if os.path.isdir(filename):
print(filename)
if filename.startswith("results"):
runtype = filena... | 37.574468 | 98 | 0.537939 |
79459685f2e1c1c366e2ffc08bbb17ad62a66de8 | 1,879 | py | Python | server.py | tooshar/flask_image_upload | 18ebe6973e2cda8bb63504fd470cf38e303e3692 | [
"MIT"
] | 1 | 2022-01-23T13:30:33.000Z | 2022-01-23T13:30:33.000Z | server.py | tooshar/flask_image_upload | 18ebe6973e2cda8bb63504fd470cf38e303e3692 | [
"MIT"
] | null | null | null | server.py | tooshar/flask_image_upload | 18ebe6973e2cda8bb63504fd470cf38e303e3692 | [
"MIT"
] | 1 | 2019-04-23T21:41:15.000Z | 2019-04-23T21:41:15.000Z | import os
from flask import Flask, flash, request, redirect, url_for,make_response, render_template, send_from_directory, send_file
from werkzeug.utils import secure_filename
from tempfile import NamedTemporaryFile
from shutil import copyfileobj
from os import remove
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gi... | 34.163636 | 121 | 0.63917 |
79459721584f56f182da2abf6f64a638f6cc786f | 1,082 | py | Python | tests/test_parser/test_method_block.py | vbondarevsky/ones_analyzer | ab8bff875192db238ed17c20d61c9fa5b55c3fa8 | [
"MIT"
] | 12 | 2017-11-23T07:04:13.000Z | 2022-03-01T21:06:56.000Z | tests/test_parser/test_method_block.py | vbondarevsky/analyzer_test | ab8bff875192db238ed17c20d61c9fa5b55c3fa8 | [
"MIT"
] | 2 | 2017-06-25T21:32:32.000Z | 2017-11-19T19:05:40.000Z | tests/test_parser/test_method_block.py | vbondarevsky/analyzer_test | ab8bff875192db238ed17c20d61c9fa5b55c3fa8 | [
"MIT"
] | 5 | 2017-11-21T08:24:56.000Z | 2021-08-17T23:21:18.000Z | from analyzer.syntax_kind import SyntaxKind
from tests.utils import TestCaseParser
class TestParserMethodBlock(TestCaseParser):
def test_one_procedure(self):
code = \
"""Процедура МояПроцедура()
КонецПроцедуры"""
self.parse_source(code)
self.assertNode(self.syntax_t... | 34.903226 | 104 | 0.67098 |
794597b234f0920530bd02e95c19845f2a346bfe | 665 | py | Python | adv/fjorm.py | 6tennis/dl | 69eb7e71da9fabe9e7ec40c461b525b4f967f345 | [
"Apache-2.0"
] | null | null | null | adv/fjorm.py | 6tennis/dl | 69eb7e71da9fabe9e7ec40c461b525b4f967f345 | [
"Apache-2.0"
] | null | null | null | adv/fjorm.py | 6tennis/dl | 69eb7e71da9fabe9e7ec40c461b525b4f967f345 | [
"Apache-2.0"
] | null | null | null | from core.advbase import *
from slot.a import *
def module():
return Fjorm
class Fjorm(Adv):
comment = 'last bravery once at start'
a3 = [('prep',1.00), ('scharge_all', 0.05)]
conf = {}
conf['slots.a'] = Resounding_Rendition()+His_Clever_Brother()
conf['acl'] = """
`s1
`s3
... | 22.166667 | 65 | 0.581955 |
794597df104e6aa737b0d0e853dede850dc603ca | 641 | py | Python | scripts/systems/YearnSystem.py | mandalorian-101/badger-system | 2b0ee9bd77a2cc6f875b9b984ae4dfe713bbc55c | [
"MIT"
] | null | null | null | scripts/systems/YearnSystem.py | mandalorian-101/badger-system | 2b0ee9bd77a2cc6f875b9b984ae4dfe713bbc55c | [
"MIT"
] | null | null | null | scripts/systems/YearnSystem.py | mandalorian-101/badger-system | 2b0ee9bd77a2cc6f875b9b984ae4dfe713bbc55c | [
"MIT"
] | null | null | null | from brownie import interface
class YearnSystem:
def __init__(self, chain_registry):
self.chain_registry = chain_registry
def registry(self):
return interface.RegistryAPI(self.chain_registry.yearn.registry)
def experimental_vault_by_key(self, key):
if not key in self.chain_registr... | 33.736842 | 82 | 0.717629 |
794597ff17d416bb232d1a378c064d0ae9860836 | 71,139 | py | Python | alphafold/model/modules.py | thenotcompany/alphafold | 1d43aaff941c84dc56311076b58795797e49107b | [
"Apache-2.0"
] | 45 | 2022-01-12T04:39:36.000Z | 2022-03-25T12:33:36.000Z | alphafold/model/modules.py | thenotcompany/alphafold | 1d43aaff941c84dc56311076b58795797e49107b | [
"Apache-2.0"
] | 6 | 2022-01-15T16:48:39.000Z | 2022-03-15T16:20:34.000Z | alphafold/model/modules.py | thenotcompany/alphafold | 1d43aaff941c84dc56311076b58795797e49107b | [
"Apache-2.0"
] | 10 | 2022-01-12T11:28:03.000Z | 2022-03-30T11:36:41.000Z | # Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 34.005258 | 102 | 0.653256 |
794598142fc20ffe6c7bb7d4cc6a8618a490ddb0 | 7,977 | py | Python | psdaq/psdaq/configdb/tt_config.py | ZhenghengLi/lcls2 | 94e75c6536954a58c8937595dcac295163aa1cdf | [
"BSD-3-Clause-LBNL"
] | 16 | 2017-11-09T17:10:56.000Z | 2022-03-09T23:03:10.000Z | psdaq/psdaq/configdb/tt_config.py | ZhenghengLi/lcls2 | 94e75c6536954a58c8937595dcac295163aa1cdf | [
"BSD-3-Clause-LBNL"
] | 6 | 2017-12-12T19:30:05.000Z | 2020-07-09T00:28:33.000Z | psdaq/psdaq/configdb/tt_config.py | ZhenghengLi/lcls2 | 94e75c6536954a58c8937595dcac295163aa1cdf | [
"BSD-3-Clause-LBNL"
] | 25 | 2017-09-18T20:02:43.000Z | 2022-03-27T22:27:42.000Z | from psdaq.configdb.get_config import get_config
from psdaq.configdb.scan_utils import *
from psdaq.cas.xpm_utils import timTxId
from .xpmmini import *
import rogue
import lcls2_timetool
import json
import IPython
import logging
from collections import deque
pv = None
cl = None
# FEB parameters
lane = 0
chan = 0
gro... | 35.29646 | 144 | 0.627178 |
79459953f50a9460aec36dee1ae80772571b1a20 | 1,387 | py | Python | flask_app/analyser/serve.py | 4rr0w/twitterSIte | 672f00030165eadd5eeebec0ba4f8a81a662eba2 | [
"MIT"
] | null | null | null | flask_app/analyser/serve.py | 4rr0w/twitterSIte | 672f00030165eadd5eeebec0ba4f8a81a662eba2 | [
"MIT"
] | null | null | null | flask_app/analyser/serve.py | 4rr0w/twitterSIte | 672f00030165eadd5eeebec0ba4f8a81a662eba2 | [
"MIT"
] | null | null | null | import pandas as pd
class Serve:
def __init__(self, username, since, end) -> None:
since_day = pd.to_datetime(since)
end_day = pd.to_datetime(end)
self.df = pd.read_excel("./Sentimental/%s-tweets-analysed.xlsx" % username, engine= 'openpyxl')
self.df_filtered = self.df[(self.df['cre... | 60.304348 | 137 | 0.636626 |
7945999670188e22beb06ebc1d7a570e5ff9d297 | 2,040 | py | Python | iam/roles/list_roles.py | flexera-public/py-flexeraone-tools | cf146a1fa65acfdf660475c50477f549e477506f | [
"Apache-2.0"
] | null | null | null | iam/roles/list_roles.py | flexera-public/py-flexeraone-tools | cf146a1fa65acfdf660475c50477f549e477506f | [
"Apache-2.0"
] | null | null | null | iam/roles/list_roles.py | flexera-public/py-flexeraone-tools | cf146a1fa65acfdf660475c50477f549e477506f | [
"Apache-2.0"
] | null | null | null | import logging
import requests
import sys
import click
import pprint
@click.command(no_args_is_help=True)
@click.option('--refresh-token', '-r', prompt="Refresh Token", help='Refresh Token from FlexeraOne', required=True)
@click.option('--host', '-h', prompt="IAM API Endpoint", default="api.flexeratest.com", show_defa... | 43.404255 | 119 | 0.717647 |
79459a46571f7734af90e3c171a56aecfb04a9e9 | 8,093 | py | Python | src/python/dxpy/utils/printing.py | claymcleod/dx-toolkit | 3b51c06b39d4c3925439fff0089d7d28c3bd7f1c | [
"Apache-2.0"
] | null | null | null | src/python/dxpy/utils/printing.py | claymcleod/dx-toolkit | 3b51c06b39d4c3925439fff0089d7d28c3bd7f1c | [
"Apache-2.0"
] | null | null | null | src/python/dxpy/utils/printing.py | claymcleod/dx-toolkit | 3b51c06b39d4c3925439fff0089d7d28c3bd7f1c | [
"Apache-2.0"
] | 1 | 2019-02-02T01:44:30.000Z | 2019-02-02T01:44:30.000Z | # Copyright (C) 2013-2016 DNAnexus, Inc.
#
# This file is part of dx-toolkit (DNAnexus platform client libraries).
#
# 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.a... | 34.58547 | 360 | 0.645496 |
79459a6384d420b6eb8d2194787096bbcdb6f993 | 2,157 | py | Python | barbicanclient/barbican_cli/cas.py | mail2nsrajesh/python-barbicanclient | 439ee25dc6c998e5571022ce0094a10c2611d717 | [
"Apache-2.0"
] | null | null | null | barbicanclient/barbican_cli/cas.py | mail2nsrajesh/python-barbicanclient | 439ee25dc6c998e5571022ce0094a10c2611d717 | [
"Apache-2.0"
] | null | null | null | barbicanclient/barbican_cli/cas.py | mail2nsrajesh/python-barbicanclient | 439ee25dc6c998e5571022ce0094a10c2611d717 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 37.189655 | 77 | 0.607789 |
79459a89b30156c0bc31e8272b443c74247a27b6 | 5,096 | py | Python | spacy/training/loggers.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 2 | 2017-06-23T20:54:31.000Z | 2022-01-06T08:11:49.000Z | spacy/training/loggers.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | null | null | null | spacy/training/loggers.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 1 | 2021-06-21T07:17:48.000Z | 2021-06-21T07:17:48.000Z | from typing import TYPE_CHECKING, Dict, Any, Tuple, Callable, List, Optional, IO
from wasabi import Printer
import tqdm
import sys
from ..util import registry
from .. import util
from ..errors import Errors
if TYPE_CHECKING:
from ..language import Language # noqa: F401
def setup_table(
*, cols: List[str], ... | 36.4 | 88 | 0.560832 |
79459c4170969ea338451f502f8a8dc8c2fbfeb3 | 414 | py | Python | places/migrations/0005_image_priority.py | stasyao/dvmn | 655ea85c696f36abe8531fd671e6b1d1b07d7c52 | [
"MIT"
] | 1 | 2022-02-17T14:02:08.000Z | 2022-02-17T14:02:08.000Z | places/migrations/0005_image_priority.py | stasyao/dvmn | 655ea85c696f36abe8531fd671e6b1d1b07d7c52 | [
"MIT"
] | null | null | null | places/migrations/0005_image_priority.py | stasyao/dvmn | 655ea85c696f36abe8531fd671e6b1d1b07d7c52 | [
"MIT"
] | 1 | 2021-11-24T20:58:58.000Z | 2021-11-24T20:58:58.000Z | # Generated by Django 3.2.7 on 2021-10-05 10:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('places', '0004_image'),
]
operations = [
migrations.AddField(
model_name='image',
name='priority',
field... | 20.7 | 57 | 0.589372 |
79459c97b8173429985985ba82917bb77bd5465b | 56,218 | py | Python | sample_code/Python_NLP/nlp-6-1-document_classify.py | ice-melt/python-lib | 345e34fff7386d91acbb03a01fd4127c5dfed037 | [
"MIT"
] | null | null | null | sample_code/Python_NLP/nlp-6-1-document_classify.py | ice-melt/python-lib | 345e34fff7386d91acbb03a01fd4127c5dfed037 | [
"MIT"
] | null | null | null | sample_code/Python_NLP/nlp-6-1-document_classify.py | ice-melt/python-lib | 345e34fff7386d91acbb03a01fd4127c5dfed037 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
@Author : ice-melt@outlook.com
@File : nlp-6-1-document_classify.py
@Time : 2019/4/23 18:09
@Version : 1.0
@Desc : 文档分类
"""
from nltk.corpus import movie_reviews
import random
import nltk
documents = [(list(movie_reviews.words(fileid)), catego... | 1,041.074074 | 54,243 | 0.700327 |
79459e2f8419dcd519ea82a9a4ca9bd6bcf9d818 | 1,142 | py | Python | Final/Final/71410.py | EllisBarnes00/COP-1000 | 8509e59e8a566c77295c714ddcb0f557c470358b | [
"Unlicense"
] | null | null | null | Final/Final/71410.py | EllisBarnes00/COP-1000 | 8509e59e8a566c77295c714ddcb0f557c470358b | [
"Unlicense"
] | null | null | null | Final/Final/71410.py | EllisBarnes00/COP-1000 | 8509e59e8a566c77295c714ddcb0f557c470358b | [
"Unlicense"
] | null | null | null | file = open("BoyNames.txt", "r")
data = file.read()
boys_names = data.split('\n')
file = open("GirlNames.txt", "r")
data = file.read()
girls_names = data.split('\n')
file.close()
choice = input("Enter 'boy', 'girl', or 'both':")
if choice == "boy":
name = input("Enter a boy's name:")
if name in boys_names:
print... | 30.052632 | 72 | 0.671629 |
79459e627a15abb52722d17338e4b4ef3ea9b1de | 18,082 | py | Python | qa/setup_packages.py | majra20/DALI | 8b97490b3849f3d663a41c95366652a49328da07 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-05-31T14:00:58.000Z | 2019-05-31T14:00:58.000Z | qa/setup_packages.py | Pandinosaurus/DALI | 1031314b7857ec11d40e31496089579297a2e863 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | qa/setup_packages.py | Pandinosaurus/DALI | 1031314b7857ec11d40e31496089579297a2e863 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import argparse
import sys
# use packaging from PIP as it is always present on system we are testing on
from pip._vendor.packaging.version import parse
import urllib.parse
try:
import pip._internal.utils.compatibility_tags as p
except ImportError:
try:
import pip._internal.pep425ta... | 39.916115 | 129 | 0.600265 |
79459efa2905d758735d069595e90b9f5f7cb775 | 3,245 | py | Python | demo/settings.py | asedeno/django-coverage6-breakage-demo | c723cd16b240330778b7ec1491ae7b5d2300c0ac | [
"MIT"
] | null | null | null | demo/settings.py | asedeno/django-coverage6-breakage-demo | c723cd16b240330778b7ec1491ae7b5d2300c0ac | [
"MIT"
] | null | null | null | demo/settings.py | asedeno/django-coverage6-breakage-demo | c723cd16b240330778b7ec1491ae7b5d2300c0ac | [
"MIT"
] | null | null | null | """
Django settings for demo project.
Generated by 'django-admin startproject' using Django 3.2.9.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib im... | 25.551181 | 91 | 0.699538 |
79459f36cc4bbcb50bab3fe5b746955131830700 | 1,647 | py | Python | examples/projects/trajectory_optimisation/direct_collocation/double_stage.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 9 | 2016-05-10T22:23:03.000Z | 2020-10-12T20:53:54.000Z | examples/projects/trajectory_optimisation/direct_collocation/double_stage.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 3 | 2016-08-05T15:19:21.000Z | 2019-04-08T15:12:49.000Z | examples/projects/trajectory_optimisation/direct_collocation/double_stage.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 5 | 2018-10-15T15:45:10.000Z | 2021-11-16T01:55:47.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 16 12:05:08 2018
@author: Alexandre
"""
###############################################################################
import numpy as np
###############################################################################
from pyro.dynamic import pendulum
from pyro.control ... | 23.869565 | 89 | 0.632665 |
79459f67348991a567239b03b4e5761954752c38 | 3,115 | py | Python | appsupport_apps.py | arubdesu/EAs | 4f688e928f54728c9de4c240c18bf479edf7db5e | [
"Apache-2.0"
] | 30 | 2015-08-10T15:00:15.000Z | 2020-03-31T17:08:02.000Z | appsupport_apps.py | arubdesu/EAs | 4f688e928f54728c9de4c240c18bf479edf7db5e | [
"Apache-2.0"
] | null | null | null | appsupport_apps.py | arubdesu/EAs | 4f688e928f54728c9de4c240c18bf479edf7db5e | [
"Apache-2.0"
] | 7 | 2015-09-29T20:04:25.000Z | 2019-05-10T06:26:50.000Z | #!/usr/bin/python
"""Given a whitelist of legit helper apps, report on stuff to investigate."""
import json
import os
import subprocess
import sys
def osquery_check():
"""bail early if osquery not installed"""
if not os.path.exists('/usr/local/bin/osqueryi'):
result = 'wha? no osquery? bro, do you e... | 34.611111 | 127 | 0.577849 |
79459fae829a021b3be2a8b1997280b24824a1d8 | 195 | py | Python | config/urls.py | devmedtz/nmb-python | c5f49050e232bcd9a4efb753cceb6df5bd8b5ed1 | [
"MIT"
] | 6 | 2021-06-23T16:37:40.000Z | 2021-10-11T13:54:44.000Z | config/urls.py | isayaeli/django-nmb | c5f49050e232bcd9a4efb753cceb6df5bd8b5ed1 | [
"MIT"
] | 1 | 2021-10-07T11:12:30.000Z | 2021-10-07T11:12:30.000Z | config/urls.py | isayaeli/django-nmb | c5f49050e232bcd9a4efb753cceb6df5bd8b5ed1 | [
"MIT"
] | 2 | 2021-06-25T06:57:32.000Z | 2021-11-27T07:42:28.000Z | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('example/', include('example.urls', namespace='example')),
]
| 24.375 | 67 | 0.702564 |
7945a0fb3a07ec1c2f3c71f396c4287deeeb9ebf | 3,337 | py | Python | src/crawl_quora.py | so3500/similarity-of-two-question | 8770754081828ceee30441a2e629b79df750c2a1 | [
"MIT"
] | null | null | null | src/crawl_quora.py | so3500/similarity-of-two-question | 8770754081828ceee30441a2e629b79df750c2a1 | [
"MIT"
] | null | null | null | src/crawl_quora.py | so3500/similarity-of-two-question | 8770754081828ceee30441a2e629b79df750c2a1 | [
"MIT"
] | null | null | null | import csv
from GoogleScraper import scrape_with_config, GoogleSearchError
# 검색 결과를 확인 하는 함수
def test_google_search(search):
# let's inspect what we got
for serp in search.serps:
print('=' * 50)
print('serp', serp)
print('serp.search_engine_name: ', serp.search_engine_name)
pr... | 29.530973 | 75 | 0.549296 |
7945a18d21c56ba76f4dee062c6c0d266bbcd1a5 | 13,172 | py | Python | nephoria/testcases/s3/osg_load_test.py | Corymbia/nephoria | fe8ad7beba479e7a8de70f09cf1fdb4d640b4987 | [
"BSD-2-Clause"
] | 5 | 2016-08-31T06:51:18.000Z | 2018-04-25T20:50:25.000Z | nephoria/testcases/s3/osg_load_test.py | Corymbia/nephoria | fe8ad7beba479e7a8de70f09cf1fdb4d640b4987 | [
"BSD-2-Clause"
] | 49 | 2016-04-19T07:01:46.000Z | 2017-11-17T23:57:18.000Z | nephoria/testcases/s3/osg_load_test.py | Corymbia/nephoria | fe8ad7beba479e7a8de70f09cf1fdb4d640b4987 | [
"BSD-2-Clause"
] | 14 | 2016-04-14T17:01:35.000Z | 2021-07-13T13:35:38.000Z | #!/usr/bin/env python
from __future__ import division
from cStringIO import StringIO
import tempfile
import os
from concurrent.futures.thread import ThreadPoolExecutor
from math import ceil
from nephoria.testcase_utils.cli_test_runner import CliTestRunner, SkipTestException
from nephoria.testcontroller import TestCo... | 42.217949 | 116 | 0.583586 |
7945a31ec5626cdfd7b412f6ee1d836d9ae9bf13 | 2,048 | py | Python | open_set_data.py | ivanchenzx/CEVT | 635301a0864115a1f95e01627dd29b005463c7ae | [
"MIT"
] | 5 | 2022-01-17T18:14:55.000Z | 2022-01-29T01:18:04.000Z | open_set_data.py | ivanchenzx/CEVT | 635301a0864115a1f95e01627dd29b005463c7ae | [
"MIT"
] | 1 | 2022-01-20T19:08:21.000Z | 2022-01-25T14:35:54.000Z | open_set_data.py | ivanchenzx/CEVT | 635301a0864115a1f95e01627dd29b005463c7ae | [
"MIT"
] | null | null | null |
def open_setting(source_file_org, source_file_new,
num_known, target_file_org=None, target_file_new=None,
validation_file_org=None, validation_file_new=None):
# keep known source samples only
for line in source_file_org:
if int(line.strip().split(' ')[2]) < num_known:... | 39.384615 | 197 | 0.578125 |
7945a5478c5efb58f38eacee7667271a7908a7ec | 1,584 | py | Python | galleries/annotations_parsers/file_name_parser.py | mnicolas94/galleries | e1563764f7db699a94884f9dbae1799a0f05c4c0 | [
"MIT"
] | null | null | null | galleries/annotations_parsers/file_name_parser.py | mnicolas94/galleries | e1563764f7db699a94884f9dbae1799a0f05c4c0 | [
"MIT"
] | null | null | null | galleries/annotations_parsers/file_name_parser.py | mnicolas94/galleries | e1563764f7db699a94884f9dbae1799a0f05c4c0 | [
"MIT"
] | null | null | null | import os
from typing import Optional, Dict
from galleries.annotations_parsers.gallery_annots_parsers import GalleryAnnotationsParser
class FileNameSepParser(GalleryAnnotationsParser):
"""
Parser para obtener anotaciones a partir del nombre de las imágenes.
El nombre del fichero es dividido con un separador y cad... | 29.333333 | 94 | 0.717803 |
7945a58fc0d3608d539b5fbd23429fdce8b70c28 | 23,578 | py | Python | sdk/python/pulumi_aws/opsworks/haproxy_layer.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/opsworks/haproxy_layer.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/opsworks/haproxy_layer.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from .. import ... | 51.70614 | 220 | 0.6744 |
7945a622d98db3f4700a8fc112b9b8f9ea8122f2 | 835 | py | Python | api/serializers/file.py | altest-com/siice-api | 322098b91a8dc22de1dddb5102a4c8beddd9a009 | [
"MIT"
] | null | null | null | api/serializers/file.py | altest-com/siice-api | 322098b91a8dc22de1dddb5102a4c8beddd9a009 | [
"MIT"
] | null | null | null | api/serializers/file.py | altest-com/siice-api | 322098b91a8dc22de1dddb5102a4c8beddd9a009 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from ._abstracts import TrackTimeSerializer, MaskFieldSerializer
from .. import models
class ImageSerializer(TrackTimeSerializer, MaskFieldSerializer):
size_bytes = serializers.IntegerField(read_only=True)
height = serializers.IntegerField(read_only=True)
width = se... | 26.09375 | 64 | 0.668263 |
7945a6282744b41505a77580d14dfb1361c9d785 | 291 | py | Python | src/api/domain/operation/CreateDataOperation/CreateDataOperationCommand.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 14 | 2020-12-19T15:06:13.000Z | 2022-01-12T19:52:17.000Z | src/api/domain/operation/CreateDataOperation/CreateDataOperationCommand.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 43 | 2021-01-06T22:05:22.000Z | 2022-03-10T10:30:30.000Z | src/api/domain/operation/CreateDataOperation/CreateDataOperationCommand.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 4 | 2020-12-18T23:10:09.000Z | 2021-04-02T13:03:12.000Z | from dataclasses import dataclass
from infrastructure.cqrs.ICommand import ICommand
from domain.operation.CreateDataOperation.CreateDataOperationRequest import CreateDataOperationRequest
@dataclass
class CreateDataOperationCommand(ICommand):
request: CreateDataOperationRequest = None
| 32.333333 | 102 | 0.876289 |
7945a8acbc93d4653987b97c08b7f1863f996b70 | 3,082 | py | Python | ucscentralsdk/mometa/compute/ComputeResourceAggrEp.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/compute/ComputeResourceAggrEp.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/compute/ComputeResourceAggrEp.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for ComputeResourceAggrEp ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class ComputeResourceAggrEpConsts():
POLLING_INTERVAL_10_MIN ... | 55.035714 | 353 | 0.693056 |
7945a935965eac4912399856a4a2582a9562172d | 545 | py | Python | address_book/forms.py | Pack144/py_packman | 5e34cb02f89008cc363440b115410d63462bc610 | [
"MIT"
] | 1 | 2019-05-04T05:21:01.000Z | 2019-05-04T05:21:01.000Z | address_book/forms.py | Pack144/py_packman | 5e34cb02f89008cc363440b115410d63462bc610 | [
"MIT"
] | 10 | 2020-06-05T21:02:10.000Z | 2022-03-11T23:50:18.000Z | address_book/forms.py | Pack144/py_packman | 5e34cb02f89008cc363440b115410d63462bc610 | [
"MIT"
] | null | null | null | from django.forms import ModelForm
from .models import Address, PhoneNumber
class AddressForm(ModelForm):
class Meta:
model = Address
fieldsets = (
(None, {'fields': ('street', 'street2', ('city', 'state', 'zip_code'))}),
('Permissions', {'fields': ('published',)}),
... | 24.772727 | 85 | 0.53945 |
7945a94750f0b2dd5e09ca20c2e28d9c32bd377a | 1,349 | py | Python | setup.py | RakhithJK/ExtractTable-py | c4e555c5bd8ce3e8b184bcf91e8b3277519943bf | [
"Apache-2.0"
] | 136 | 2019-10-07T01:24:43.000Z | 2022-03-29T12:18:48.000Z | setup.py | RakhithJK/ExtractTable-py | c4e555c5bd8ce3e8b184bcf91e8b3277519943bf | [
"Apache-2.0"
] | 15 | 2019-10-10T14:03:43.000Z | 2021-11-27T07:14:58.000Z | setup.py | RakhithJK/ExtractTable-py | c4e555c5bd8ce3e8b184bcf91e8b3277519943bf | [
"Apache-2.0"
] | 20 | 2019-10-10T21:28:47.000Z | 2022-02-24T09:44:58.000Z | # -*- coding: utf-8 -*-
import os
from setuptools import find_packages
about = {}
with open(os.path.join('ExtractTable', '__version__.py'), 'r') as f:
exec(f.read(), about)
with open('README.md', 'r') as f:
readme = f.read()
with open("requirements.txt") as fh:
requires = [x.strip() for x in fh.readline... | 27.530612 | 80 | 0.610823 |
7945a9a49bace20f8276a8859ec11c789d8b88a6 | 707 | py | Python | setup.py | wally-yu/selenium-framework | c1c85ec7268b3fc51087ec0a8a5300271687b4c7 | [
"MIT"
] | 1 | 2018-12-05T09:32:45.000Z | 2018-12-05T09:32:45.000Z | setup.py | wally-yu/selenium-framework | c1c85ec7268b3fc51087ec0a8a5300271687b4c7 | [
"MIT"
] | null | null | null | setup.py | wally-yu/selenium-framework | c1c85ec7268b3fc51087ec0a8a5300271687b4c7 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
version = '0.2.0'
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name='pyselenium_framework',
version=version,
packages=find_packages(exclude=['AUT', 'Execution', 'driver_binary_files']),
author=u'Wally Yu',
insta... | 33.666667 | 94 | 0.729844 |
7945aa3d29032c80b5b4086211911cf6f42349f4 | 4,415 | py | Python | src/logpipe/backend/kafka.py | twentythirdz/django-logpipe | 05d90225fc993e6dc8fea27f41c56e8e8debf340 | [
"ISC"
] | null | null | null | src/logpipe/backend/kafka.py | twentythirdz/django-logpipe | 05d90225fc993e6dc8fea27f41c56e8e8debf340 | [
"ISC"
] | null | null | null | src/logpipe/backend/kafka.py | twentythirdz/django-logpipe | 05d90225fc993e6dc8fea27f41c56e8e8debf340 | [
"ISC"
] | null | null | null | from django.apps import apps
from ..exceptions import MissingTopicError
from .. import settings
from . import RecordMetadata, Record, get_offset_backend
import kafka
import logging
logger = logging.getLogger(__name__)
class ModelOffsetStore(object):
def commit(self, consumer, message):
KafkaOffset = apps... | 34.224806 | 113 | 0.622197 |
7945aa5ed6df4e096353c1952df16cd3db94243c | 31,162 | py | Python | src/prediction/GAN_Regression.py | IBM/hybrid-expert-intuition-model | e21d7b4233458ebd0c4f73aac43e74d7d64f8cdb | [
"Apache-2.0"
] | 1 | 2020-08-19T00:18:24.000Z | 2020-08-19T00:18:24.000Z | src/prediction/GAN_Regression.py | IBM/hybrid-expert-intuition-model | e21d7b4233458ebd0c4f73aac43e74d7d64f8cdb | [
"Apache-2.0"
] | null | null | null | src/prediction/GAN_Regression.py | IBM/hybrid-expert-intuition-model | e21d7b4233458ebd0c4f73aac43e74d7d64f8cdb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.818391 | 178 | 0.600828 |
7945aa902e00b7dee1fcc17f19f8f93b65db0335 | 1,222 | py | Python | apps/purchases/urls.py | jorgesaw/kstore | 4ec6612eeeb96edb7b7bd374fd0520733c58451c | [
"MIT"
] | null | null | null | apps/purchases/urls.py | jorgesaw/kstore | 4ec6612eeeb96edb7b7bd374fd0520733c58451c | [
"MIT"
] | 5 | 2021-03-19T10:16:00.000Z | 2022-02-10T09:16:32.000Z | apps/purchases/urls.py | jorgesaw/kstore | 4ec6612eeeb96edb7b7bd374fd0520733c58451c | [
"MIT"
] | null | null | null | """Purchases app URLs."""
# Django
from django.urls import path, include
# Views
from .views import suppliers as suppliers_views
from .views import purchases as purchases_views
urlpatterns = [
path('suppliers/', suppliers_views.SupplierListView.as_view(), name='suppliers'),
path('suppliers/crea... | 50.916667 | 110 | 0.730769 |
7945aa92e8319f8fca9736935ddcd5d4e29f5dfd | 9,730 | py | Python | biorbd_optim/path_conditions.py | Dangzilla/BiorbdOptim | adb1898b86282c87b3fd186b13e00a8202ceb21c | [
"Apache-2.0"
] | null | null | null | biorbd_optim/path_conditions.py | Dangzilla/BiorbdOptim | adb1898b86282c87b3fd186b13e00a8202ceb21c | [
"Apache-2.0"
] | 1 | 2022-02-18T19:03:13.000Z | 2022-02-18T19:03:13.000Z | biorbd_optim/path_conditions.py | Dangzilla/BiorbdOptim | adb1898b86282c87b3fd186b13e00a8202ceb21c | [
"Apache-2.0"
] | null | null | null | import numpy as np
from .mapping import BidirectionalMapping, Mapping
from .enums import InterpolationType
class PathCondition(np.ndarray):
def __new__(cls, input_array, interpolation_type=InterpolationType.CONSTANT):
# Check and reinterpret input
input_array = np.asarray(input_array, dtype=float... | 45.680751 | 118 | 0.639466 |
7945ac8baac9eac58ab5ac37ac661989a16ed3f1 | 15,762 | py | Python | Main.py | connorhess/Report-Counter | 2ddd3782dd0dba5af751092502f5e564bd433415 | [
"MIT"
] | null | null | null | Main.py | connorhess/Report-Counter | 2ddd3782dd0dba5af751092502f5e564bd433415 | [
"MIT"
] | null | null | null | Main.py | connorhess/Report-Counter | 2ddd3782dd0dba5af751092502f5e564bd433415 | [
"MIT"
] | null | null | null | from tkinter import messagebox
import sqlite3
from tkinter import *
from tkinter import filedialog
import webbrowser
from pynput.keyboard import Key, KeyCode, Listener
import threading
import time
from tkinter.font import Font
from functools import partial
from tkinter import ttk
conn = sqlite3.connect('Report_Counter... | 40.005076 | 772 | 0.582287 |
7945acb65793dadb9a347c1c47265ca2752f8e82 | 349 | py | Python | pc.py | simryang/python-study | 3e358e3470629130eea71df20bd9b468c7679bf7 | [
"MIT"
] | null | null | null | pc.py | simryang/python-study | 3e358e3470629130eea71df20bd9b468c7679bf7 | [
"MIT"
] | null | null | null | pc.py | simryang/python-study | 3e358e3470629130eea71df20bd9b468c7679bf7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import os
class pc():
def __init__(self):
self.n = 0
self.loop = False
def countloop(self):
while self.loop:
self.n += 1
self.result()
def result(self):
print(f'result of pc = {self.loop}')
if __name__ == '__main__':
ipc = pc()
print(f'c={os.getpid()}')
ipc.... | 15.863636 | 40 | 0.587393 |
7945ad15a98d464acc89088bf4d9d6cb8e333dac | 533 | py | Python | output/models/ms_data/additional/isdefault073_xsd/isdefault073.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/additional/isdefault073_xsd/isdefault073.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/additional/isdefault073_xsd/isdefault073.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
@dataclass
class Ct:
class Meta:
name = "ct"
a: object = field(
default="default",
metadata={
"type": "Element",
"namespace": "",
"required": True,
}
)
b: str = field(
init=False,
... | 16.65625 | 40 | 0.448405 |
7945ad89b662b58ca7616d2f2d8fab21cf0f4051 | 4,396 | py | Python | tests/integration/__init__.py | stobrien89/s3transfer | c5307a76c45f42f8d0688298f8c1ddb3a8c0fbce | [
"Apache-2.0"
] | null | null | null | tests/integration/__init__.py | stobrien89/s3transfer | c5307a76c45f42f8d0688298f8c1ddb3a8c0fbce | [
"Apache-2.0"
] | null | null | null | tests/integration/__init__.py | stobrien89/s3transfer | c5307a76c45f42f8d0688298f8c1ddb3a8c0fbce | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the 'license' file accompa... | 36.330579 | 79 | 0.668335 |
7945ae60abfea11a4ac1f97c7538d3c901276a50 | 1,931 | py | Python | api/python/log_book_post_encoder.py | AndreyShamis/lbook | ab5b01966dc8b279ab850d0e579203c15da0c360 | [
"MIT"
] | 2 | 2018-03-10T08:08:03.000Z | 2020-11-30T17:10:43.000Z | api/python/log_book_post_encoder.py | AndreyShamis/lbook | ab5b01966dc8b279ab850d0e579203c15da0c360 | [
"MIT"
] | 10 | 2018-03-04T06:51:42.000Z | 2022-03-14T15:12:52.000Z | api/python/log_book_post_encoder.py | AndreyShamis/lbook | ab5b01966dc8b279ab850d0e579203c15da0c360 | [
"MIT"
] | null | null | null | import sys
import uuid
import codecs
import io
import mimetypes
class LogBookPostEncoder:
def __init__(self):
self.frontier = uuid.uuid4().hex
self.content_type = f'multipart/form-data; boundary={self.frontier}'
def encode(self, fields: list, files: list):
tmp_body = io.BytesIO()
... | 37.862745 | 120 | 0.605904 |
7945af03aa428be0f38e55566ee98853eeeff03b | 816 | py | Python | tests/generator/anomaly_generator/templater/create_template.py | fredmontet/timeatlas | 9a439a913ef9a8a1ef9833b42e5fb4e988d7e35e | [
"MIT"
] | 10 | 2020-08-25T09:23:02.000Z | 2021-01-12T14:00:35.000Z | tests/generator/anomaly_generator/templater/create_template.py | fredmontet/timeatlas | 9a439a913ef9a8a1ef9833b42e5fb4e988d7e35e | [
"MIT"
] | 140 | 2020-06-30T11:59:47.000Z | 2021-08-23T20:58:43.000Z | tests/generator/anomaly_generator/templater/create_template.py | fredmontet/timeatlas | 9a439a913ef9a8a1ef9833b42e5fb4e988d7e35e | [
"MIT"
] | null | null | null | from timeatlas import AnomalyGeneratorTemplate
def create_template(filename, seed, functions, threshold, num_animalies, anomaly_name):
template = AnomalyGeneratorTemplate(filename=filename,
seed=seed,
functions=functions,
... | 32.64 | 87 | 0.567402 |
7945af19c4828d20d33fe1ebf8e4cb0288dbb3a5 | 4,477 | py | Python | myriad/config.py | nikihowe/myriad_temp | 4c2576cfef4eded96a64778675f1d2404eb52369 | [
"Apache-2.0"
] | 17 | 2021-05-14T15:02:59.000Z | 2022-03-17T13:03:51.000Z | myriad/config.py | nikihowe/myriad_temp | 4c2576cfef4eded96a64778675f1d2404eb52369 | [
"Apache-2.0"
] | null | null | null | myriad/config.py | nikihowe/myriad_temp | 4c2576cfef4eded96a64778675f1d2404eb52369 | [
"Apache-2.0"
] | null | null | null | # (c) 2021 Nikolaus Howe
from typing import Tuple
import jax
from dataclasses import dataclass
from enum import Enum
from myriad.systems import SystemType
class OptimizerType(Enum):
"""Parser argument. Optimizing strategy used to solve the OCP"""
# _settings_ = NoAlias
COLLOCATION = "COLLOCATION"
SHOOTING ... | 34.438462 | 150 | 0.725262 |
7945b0a79cff6a6072205a46eaa6cc0b77bb872a | 3,749 | py | Python | datasets/lm/tiny_shakespeare/data.py | chetanchougle/chatbot2 | 489d63c2f91b095728ab50f3708b6cf6279f6a20 | [
"MIT"
] | 2 | 2020-12-12T14:21:05.000Z | 2020-12-14T03:08:05.000Z | conciencia/datasets/lm/tiny_shakespeare/data.py | dsapandora/nao_ros_api | 99aece058e43b57e535146a0ee7b917b3eab7a2d | [
"MIT"
] | 1 | 2021-03-19T22:49:56.000Z | 2021-03-19T22:49:56.000Z | conciencia/datasets/lm/tiny_shakespeare/data.py | dsapandora/nao_ros_api | 99aece058e43b57e535146a0ee7b917b3eab7a2d | [
"MIT"
] | null | null | null | EN_WHITELIST = '0123456789abcdefghijklmnopqrstuvwxyz ' # space is included in whitelist
EN_BLACKLIST = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~\''
FILENAME = 'input.txt'
VOCAB_SIZE = 8000
SEQ_LEN = 10
import random
import sys
import nltk
import numpy as np
import pickle
'''
read lines from file
return [list of... | 24.993333 | 93 | 0.617498 |
7945b187b6e0be1871cb32e04bb7b494e93d85bd | 10,805 | py | Python | _database/models/meetingnotes.py | marcoEDU/HackerspaceWebsiteTemplate | 29621a5f5daef7a8073f368b7d95a1df654c8ba9 | [
"MIT"
] | 9 | 2019-11-04T04:46:08.000Z | 2019-12-29T22:24:38.000Z | _database/models/meetingnotes.py | marcoEDU/HackerspaceWebsiteTemplate | 29621a5f5daef7a8073f368b7d95a1df654c8ba9 | [
"MIT"
] | 27 | 2020-02-17T17:57:00.000Z | 2020-04-23T20:25:44.000Z | _database/models/meetingnotes.py | marcoEDU/HackerspaceWebsiteTemplate | 29621a5f5daef7a8073f368b7d95a1df654c8ba9 | [
"MIT"
] | 4 | 2020-02-17T13:39:18.000Z | 2020-04-12T07:56:45.000Z | from django.db import models
from pyprintplus import Log
from _setup.models import Config
class MeetingNoteSet(models.QuerySet):
def remove_empty_notes(self):
self.filter(text_notes__isnull=True).delete()
print('Deleted all empty notes')
def current(self):
return self.filter(text_note... | 36.258389 | 199 | 0.596761 |
7945b1cb2dd12a29e1ff23484e2e0dd55f4b315e | 11,327 | py | Python | tests/integration/states/git.py | jandd/salt | c046a1069e54b953b91dfe67a719f49aed2fa2a8 | [
"Apache-2.0"
] | 1 | 2020-02-22T07:11:24.000Z | 2020-02-22T07:11:24.000Z | tests/integration/states/git.py | jandd/salt | c046a1069e54b953b91dfe67a719f49aed2fa2a8 | [
"Apache-2.0"
] | null | null | null | tests/integration/states/git.py | jandd/salt | c046a1069e54b953b91dfe67a719f49aed2fa2a8 | [
"Apache-2.0"
] | 1 | 2020-02-22T07:11:26.000Z | 2020-02-22T07:11:26.000Z | # -*- coding: utf-8 -*-
'''
Tests for the Git state
'''
# Import python libs
from __future__ import absolute_import
import os
import shutil
import socket
import subprocess
import tempfile
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath, skip_if_binaries_missing
ensure_in_syspath('../../')... | 33.913174 | 86 | 0.550366 |
7945b2660ea17663f5689179a4713d38b99c03b4 | 6,126 | py | Python | snake.py | KacpiW/snake-game | 798decad6bd8db98c0c4c95b6fa58ecc2be3d7fd | [
"MIT"
] | null | null | null | snake.py | KacpiW/snake-game | 798decad6bd8db98c0c4c95b6fa58ecc2be3d7fd | [
"MIT"
] | null | null | null | snake.py | KacpiW/snake-game | 798decad6bd8db98c0c4c95b6fa58ecc2be3d7fd | [
"MIT"
] | null | null | null | import time
import random
import pygame
from pygame.locals import *
from pygame.sprite import RenderUpdates
SIZE = 40
BACKGROUND_COLOR = (110, 110, 5)
class Apple:
def __init__(self, parent_screen) -> None:
self.apple = pygame.image.load("resources/apple.jpg").convert()
self.parent_screen = pare... | 28.626168 | 108 | 0.535423 |
7945b2724b4d4cde1f4716320d80f92536d7dddb | 6,468 | py | Python | src/ml/PreProcessing/preprocessing.py | Hakan-er/utma | f7cd6253ec894047b460d4df9b43eeb9b109bae2 | [
"MIT"
] | 1 | 2022-02-02T20:36:27.000Z | 2022-02-02T20:36:27.000Z | src/ml/PreProcessing/preprocessing.py | Hakan-er/utma | f7cd6253ec894047b460d4df9b43eeb9b109bae2 | [
"MIT"
] | null | null | null | src/ml/PreProcessing/preprocessing.py | Hakan-er/utma | f7cd6253ec894047b460d4df9b43eeb9b109bae2 | [
"MIT"
] | 1 | 2021-06-17T20:50:41.000Z | 2021-06-17T20:50:41.000Z | from sklearn.model_selection import train_test_split
import pandas as pd
import re
import xlrd
from sklearn import preprocessing
import numpy as np
class PreProcessing():
def __init__(self, path, sheet_name=0):
self.path = path
self.sheet_name = sheet_name
if re.search('.csv$', self.path)... | 41.729032 | 117 | 0.641775 |
7945b42bf3d0c9dbe874a27be94e6bdc92cd1452 | 6,202 | py | Python | pinax/projects/social_project/apps/friends_app/views.py | yulka/pinax | 025113cbd1e36eefae375493569bb8817c7095fe | [
"MIT"
] | 1 | 2016-01-07T01:50:40.000Z | 2016-01-07T01:50:40.000Z | pinax/projects/social_project/apps/friends_app/views.py | yulka/pinax | 025113cbd1e36eefae375493569bb8817c7095fe | [
"MIT"
] | null | null | null | pinax/projects/social_project/apps/friends_app/views.py | yulka/pinax | 025113cbd1e36eefae375493569bb8817c7095fe | [
"MIT"
] | null | null | null | from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext_lazy as _
from friends.models import *
from friends.forms import JoinRe... | 48.834646 | 173 | 0.678168 |
7945b47c22f0756fd6bc24d9db798d74cd9ab7c2 | 9,456 | py | Python | utils/tests/test_database_update_and_cron.py | rafsaf/Plemiona_Planer | 1a0e2da0c4b18f1abd1df876f688c6442cba17ce | [
"Apache-2.0"
] | 2 | 2020-11-15T12:50:07.000Z | 2020-11-17T21:54:54.000Z | utils/tests/test_database_update_and_cron.py | rafsaf/Plemiona_Planer | 1a0e2da0c4b18f1abd1df876f688c6442cba17ce | [
"Apache-2.0"
] | 21 | 2021-11-01T14:04:19.000Z | 2022-03-25T06:31:03.000Z | utils/tests/test_database_update_and_cron.py | rafsaf/Tribal-Wars-Planer | 083af9b1efe814be3abe975b9ac8faccc00ebb09 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Rafał Safin (rafsaf). 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 applicabl... | 37.975904 | 87 | 0.542513 |
7945b4cbc5736bd4ae8f83beebb6efb5a981ee92 | 6,226 | py | Python | __init__.py | yuntai-dev/blender-test | cf8b2fabe8ad3c5edd2b81b1191d01dfd06c993f | [
"MIT"
] | null | null | null | __init__.py | yuntai-dev/blender-test | cf8b2fabe8ad3c5edd2b81b1191d01dfd06c993f | [
"MIT"
] | null | null | null | __init__.py | yuntai-dev/blender-test | cf8b2fabe8ad3c5edd2b81b1191d01dfd06c993f | [
"MIT"
] | null | null | null | #######################
# ### bpy imports ### #
import bpy
from bpy.utils import register_class, unregister_class
# ### base class ### #
from bpy.types import Operator, Panel, Context
# ### prop types ### #
from bpy.props import StringProperty, EnumProperty, CollectionProperty
# ### prop group ### #
from bpy.types i... | 26.381356 | 86 | 0.644555 |
7945b5b601434b11bde8e46666a337148c16f001 | 1,078 | py | Python | c2_python-operating-system/2_managing-files-with-python/graded-assessment/scripts/generate_report.py | chaiyeow/google-it-automation | 3f02d739178abd5805114cfc027120b8d6ea81c8 | [
"MIT"
] | 220 | 2020-09-23T21:17:49.000Z | 2022-03-30T18:46:07.000Z | c2_python-operating-system/2_managing-files-with-python/graded-assessment/scripts/generate_report.py | chaiyeow/google-it-automation | 3f02d739178abd5805114cfc027120b8d6ea81c8 | [
"MIT"
] | 4 | 2020-10-18T11:08:49.000Z | 2021-05-31T10:32:00.000Z | c2_python-operating-system/2_managing-files-with-python/graded-assessment/scripts/generate_report.py | chaiyeow/google-it-automation | 3f02d739178abd5805114cfc027120b8d6ea81c8 | [
"MIT"
] | 366 | 2020-09-22T18:05:01.000Z | 2022-03-31T17:47:17.000Z | #!/usr/bin/env python3
import csv
def read_employees(csv_file_location):
csv.register_dialect('empDialect', skipinitialspace=True, strict=True)
employee_file = csv.DictReader(open(csv_file_location), dialect = 'empDialect')
employee_list = []
for data in employee_file:
employee_list.append(data)
return ... | 30.8 | 82 | 0.764378 |
7945b8aa30e20aae761b3d33d0c289e01ff9615a | 593 | py | Python | apps/fyle/migrations/0011_auto_20211203_1156.py | fylein/fyle-intacct-api | 16e45538ec3a2b7af396742a42302704c33a7bd7 | [
"MIT"
] | null | null | null | apps/fyle/migrations/0011_auto_20211203_1156.py | fylein/fyle-intacct-api | 16e45538ec3a2b7af396742a42302704c33a7bd7 | [
"MIT"
] | 3 | 2020-07-20T10:54:15.000Z | 2022-02-23T17:13:49.000Z | apps/fyle/migrations/0011_auto_20211203_1156.py | fylein/fyle-intacct-api | 16e45538ec3a2b7af396742a42302704c33a7bd7 | [
"MIT"
] | 2 | 2020-07-25T14:50:56.000Z | 2020-08-02T13:48:37.000Z | # Generated by Django 3.1.13 on 2021-12-03 11:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fyle', '0010_auto_20211001_0525'),
]
operations = [
migrations.AlterField(
model_name='expense',
name='custom_prope... | 24.708333 | 87 | 0.598651 |
7945b91669618e82ec5b9854ca4f13f04072d3bf | 124 | py | Python | toolbelt/__init__.py | kadrlica/toolbelt | b616dcee76b38656e63f0b69bf88404970a5f6c6 | [
"MIT"
] | null | null | null | toolbelt/__init__.py | kadrlica/toolbelt | b616dcee76b38656e63f0b69bf88404970a5f6c6 | [
"MIT"
] | null | null | null | toolbelt/__init__.py | kadrlica/toolbelt | b616dcee76b38656e63f0b69bf88404970a5f6c6 | [
"MIT"
] | null | null | null | # Nothing much to see here....
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| 20.666667 | 39 | 0.766129 |
7945b9dbf333716c773db4295def1bb72cb04108 | 10,339 | py | Python | model/training.py | n-fallahinia/realtime-force-estimation | f4718f4b7f011c1b7dba1e57bd4151c4de67a6dd | [
"Apache-2.0"
] | 2 | 2020-08-26T01:34:40.000Z | 2020-08-26T01:34:42.000Z | model/training.py | n-fallahinia/realtime-force-estimation | f4718f4b7f011c1b7dba1e57bd4151c4de67a6dd | [
"Apache-2.0"
] | null | null | null | model/training.py | n-fallahinia/realtime-force-estimation | f4718f4b7f011c1b7dba1e57bd4151c4de67a6dd | [
"Apache-2.0"
] | null | null | null | """Tensorflow utility functions for training"""
import os
import datetime
import time
from tqdm import tqdm
import tensorflow as tf
import numpy as np
from time import sleep
from model.utils.utils import save_dict_to_json
class Train_and_Evaluate():
def __init__(self, train_model_spec, train_ds, eval_ds, l... | 50.681373 | 113 | 0.595029 |
7945ba09a5b6713f91a2d3c20bc815a55e0213ed | 18,846 | py | Python | leo/plugins/xsltWithNodes.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/plugins/xsltWithNodes.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/plugins/xsltWithNodes.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | #@+leo-ver=5-thin
#@+node:mork.20041010095009: * @file xsltWithNodes.py
#@+<< docstring >>
#@+node:ekr.20050226120104: ** << docstring >>
""" Adds the Outline:XSLT menu containing XSLT-related commands.
This menu contains the following items:
- Set StyleSheet Node:
- Selects the current node as the xsl stylesheet... | 30.945813 | 100 | 0.586225 |
7945ba0f34e96419c08149d45d3fc4b28d32f317 | 9,542 | py | Python | gizer/oplog_sync_alligned_data.py | racker/gizer | 4600999c35e99bce54071ea4f952b09b3fd5dc9b | [
"Apache-2.0"
] | null | null | null | gizer/oplog_sync_alligned_data.py | racker/gizer | 4600999c35e99bce54071ea4f952b09b3fd5dc9b | [
"Apache-2.0"
] | null | null | null | gizer/oplog_sync_alligned_data.py | racker/gizer | 4600999c35e99bce54071ea4f952b09b3fd5dc9b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
""" Simplified version of synchronizer that is working with alligned data. """
__author__ = "Yaroslav Litvinov"
__copyright__ = "Copyright 2016, Rackspace Inc."
__email__ = "yaroslav.litvinov@rackspace.com"
from logging import getLogger
from gizer.oplog_parser import exec_insert
from gizer.batc... | 47.237624 | 79 | 0.59673 |
7945ba6e9e803ce105c6d57d71b7767f2877aa65 | 3,405 | py | Python | utils.py | zengru001usst/acne | ae652e814649e88034b3b506ccbe34432b1eb85a | [
"Apache-2.0"
] | 49 | 2020-03-27T21:00:57.000Z | 2022-03-25T06:54:00.000Z | utils.py | zengru001usst/acne | ae652e814649e88034b3b506ccbe34432b1eb85a | [
"Apache-2.0"
] | 5 | 2020-06-15T17:30:09.000Z | 2021-07-14T12:22:33.000Z | utils.py | zengru001usst/acne | ae652e814649e88034b3b506ccbe34432b1eb85a | [
"Apache-2.0"
] | 12 | 2020-05-06T14:50:10.000Z | 2022-03-25T06:53:55.000Z | # Filename: utils.py
# License: LICENSES/LICENSE_UVIC_EPFL
import gzip
import pickle
import numpy as np
import h5py
def np_skew_symmetric(v):
zero = np.zeros_like(v[:, 0])
M = np.stack([
zero, -v[:, 2], v[:, 1],
v[:, 2], zero, -v[:, 0],
-v[:, 1], v[:, 0], zero,
], axis=1)
re... | 25.222222 | 71 | 0.585903 |
7945bbc0ca413a590fad4d24c39deb95ea0ca79d | 1,608 | py | Python | PTA/PAT_A/Python3/A1082_AC.py | StrayDragon/OJ-Solutions | b31b11c01507544aded2302923da080b39cf2ba8 | [
"MIT"
] | 1 | 2019-05-13T10:09:55.000Z | 2019-05-13T10:09:55.000Z | PTA/PAT_A/Python3/A1082_AC.py | StrayDragon/OJ-Solutions | b31b11c01507544aded2302923da080b39cf2ba8 | [
"MIT"
] | null | null | null | PTA/PAT_A/Python3/A1082_AC.py | StrayDragon/OJ-Solutions | b31b11c01507544aded2302923da080b39cf2ba8 | [
"MIT"
] | null | null | null | # reference: https://gumble.pw/python-num2chinese.html
import itertools
def revuniq(l):
return ''.join(
k + ' ' for k, g in itertools.groupby(reversed(l))
)
def digits2pinyin(digits):
basic = ('ling', 'yi', 'er', 'san', 'si', 'wu', 'liu', 'qi', 'ba', 'jiu')
unit1 = ('Shi', 'Bai', 'Qian')
... | 29.236364 | 77 | 0.458955 |
7945bd2d424475c8d628d8591dc2abb7934def5f | 498 | py | Python | Physics250-ME32/AngularFrequencyOftheWaves.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | Physics250-ME32/AngularFrequencyOftheWaves.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | Physics250-ME32/AngularFrequencyOftheWaves.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | import numpy as np
import math
c = 2.9979 * pow(10,8)
e = 8.85 * pow(10,-12)
#Practice test question 3 Type
def waveIntensity():
unit = input("Is it cm or mm?: ")
if unit == "cm":
wavelength = float(input("Input wavelength (cm): ")) / 100
if unit == "mm":
wavelength = float(inpu... | 26.210526 | 68 | 0.566265 |
7945bd9d5b4bf0ebd8eae9ef8901a7fe482c987a | 1,293 | py | Python | Problem_sets/spiral_matrix/test_script/test.py | zanderhinton/DSA_collaborative_prep | 8427255e0084c6d69031027492d847a90b970840 | [
"MIT"
] | 3 | 2020-02-02T14:52:16.000Z | 2020-09-28T12:32:35.000Z | Problem_sets/spiral_matrix/test_script/test.py | zanderhinton/DSA_collaborative_prep | 8427255e0084c6d69031027492d847a90b970840 | [
"MIT"
] | 14 | 2020-02-02T21:17:49.000Z | 2020-02-10T15:48:36.000Z | Problem_sets/spiral_matrix/test_script/test.py | zanderhinton/DSA_collaborative_prep | 8427255e0084c6d69031027492d847a90b970840 | [
"MIT"
] | 9 | 2020-02-02T20:00:05.000Z | 2020-02-17T19:02:32.000Z | import time
import numpy as np
from test_script.solution import spiral_matrix
test_cases = [1, 2, 3, 4, 5] #insert test case objects into a list eg [test-case-1, test-case-2, test-case-3]
loops = 10 # loops to be taken for calculating average time, for complex problems, lower this value.
def test_spiral_matrix(user_fu... | 36.942857 | 109 | 0.614076 |
7945bda786d8c73ba263921744783e6698e87811 | 60,787 | py | Python | typhon/collocations/collocator.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | typhon/collocations/collocator.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | typhon/collocations/collocator.py | jmollard/typhon | 68d5ae999c340b60aa69e095b336d438632ad55c | [
"MIT"
] | null | null | null | from collections import defaultdict
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
from datetime import datetime, timedelta
import gc
from multiprocessing import Process, Queue
import time
import traceback
import numpy as np
import pandas as pd
from typhon.geodesy import great_circle_distance
f... | 40.390033 | 79 | 0.596312 |
7945be1e8856b4e17791df5d0d8bbab02d943b45 | 112 | py | Python | lavalink/exceptions.py | TrackRunny/Lavalink.py | b6b856bb017b740469bc5359024b224dd7a7b665 | [
"MIT"
] | null | null | null | lavalink/exceptions.py | TrackRunny/Lavalink.py | b6b856bb017b740469bc5359024b224dd7a7b665 | [
"MIT"
] | null | null | null | lavalink/exceptions.py | TrackRunny/Lavalink.py | b6b856bb017b740469bc5359024b224dd7a7b665 | [
"MIT"
] | 1 | 2019-07-10T19:51:01.000Z | 2019-07-10T19:51:01.000Z | class NodeException(Exception):
""" The exception will be raised when something went wrong with a node. """
| 37.333333 | 79 | 0.732143 |
7945c07306a7f8ff6edc3077ac02ebce73d5b067 | 1,354 | py | Python | src/dialogs/helpDialog.py | Alopex4/spruce | 2bf0bae18fe9b0d13691f2ee926071635cbe7c6f | [
"MIT"
] | 1 | 2019-07-04T10:32:07.000Z | 2019-07-04T10:32:07.000Z | src/dialogs/helpDialog.py | Alopex4/spruce | 2bf0bae18fe9b0d13691f2ee926071635cbe7c6f | [
"MIT"
] | null | null | null | src/dialogs/helpDialog.py | Alopex4/spruce | 2bf0bae18fe9b0d13691f2ee926071635cbe7c6f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'help.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectNa... | 37.611111 | 78 | 0.716396 |
7945c2f84baf8bc4734c9a708a4883171a7af728 | 465 | py | Python | data/scripts/templates/object/draft_schematic/furniture/shared_furniture_lamp_tatt_s01_on.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/furniture/shared_furniture_lamp_tatt_s01_on.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/furniture/shared_furniture_lamp_tatt_s01_on.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/furniture/shared_furniture_lamp_tatt_s01_on.iff"
result.at... | 27.352941 | 91 | 0.737634 |
7945c50c0f1b2d2eea4d2e6e448663d3babba6e2 | 6,739 | py | Python | PDK_Generator/design_automation/polarization_splitter_rotator/psr_bitaper/neff_taper_width_sweep_setup.py | seanlam97/PDK_Generator | 15c1f4f56575f8e21ea874443d06ef740ccb5aa5 | [
"MIT"
] | null | null | null | PDK_Generator/design_automation/polarization_splitter_rotator/psr_bitaper/neff_taper_width_sweep_setup.py | seanlam97/PDK_Generator | 15c1f4f56575f8e21ea874443d06ef740ccb5aa5 | [
"MIT"
] | 3 | 2021-08-24T23:31:42.000Z | 2021-08-25T16:45:54.000Z | PDK_Generator/design_automation/polarization_splitter_rotator/psr_bitaper/neff_taper_width_sweep_setup.py | seanlam97/PDK_Generator | 15c1f4f56575f8e21ea874443d06ef740ccb5aa5 | [
"MIT"
] | null | null | null | #PSR Bitaper Width Sweep Simulation Recipe + Photonic Components + Adding Layers
#General Purpose Libraries
import numpy as np
from scipy.constants import c
lam_c = 1.550e-6
#Wafer and Waveguide Structure Variables
thick_Clad = 2.0e-6
thick_Si = 0.22e-6
thick_BOX = 2.0e-6
thick_Slab = 0.09e-6
width_... | 33.695 | 82 | 0.541178 |
7945c5c200cdbc4a5896ee8670bd2e7b2f3c0137 | 1,328 | py | Python | examples/docs_snippets/docs_snippets/overview/configuration/configured_named_solid_example.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/overview/configuration/configured_named_solid_example.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/overview/configuration/configured_named_solid_example.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | from dagster import Field, InputDefinition, Int, List, configured, execute_pipeline, pipeline, solid
# start_configured_named
@solid(
config_schema={
"is_sample": Field(bool, is_required=False, default_value=False),
},
input_defs=[InputDefinition("xs", List[Int])],
)
def variance(context, xs):
... | 28.255319 | 100 | 0.616717 |
7945c6724cbfef5842212ed1ee6d13b535bea1d1 | 13,648 | py | Python | Environment/build_environment.py | apayne19/DoubleAuctionMarket | 9e0e6ab033c2bac978dc94d4a94e88805df8e3b6 | [
"MIT"
] | 30 | 2018-06-27T18:09:30.000Z | 2022-02-28T16:22:29.000Z | Environment/build_environment.py | michaeljyt/DoubleAuctionMarket | ab3e6116f52a2fccc1f64028f8cd1a727d2bda14 | [
"MIT"
] | 20 | 2017-10-05T23:47:57.000Z | 2018-10-02T20:28:05.000Z | Environment/build_environment.py | michaeljyt/DoubleAuctionMarket | ab3e6116f52a2fccc1f64028f8cd1a727d2bda14 | [
"MIT"
] | 11 | 2017-09-21T22:13:43.000Z | 2021-10-30T18:17:24.000Z | import operator
import matplotlib.pyplot as plt # import matplotlib
import numpy as np # import numpy
import time
import random
import csv
class BuildMarketEnv(object):
""" A class that makes a market"""
env = {"demand": [], "dem": [], "supply": [], "sup": [], "buyers": {}, "sellers": {}, "eq": {}}
def ... | 40.619048 | 115 | 0.572978 |
7945c69a908f8be0428401aac3511ee89a5857ca | 1,135 | py | Python | wagtail/wagtailimages/migrations/0006_add_verbose_names.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailimages/migrations/0006_add_verbose_names.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailimages/migrations/0006_add_verbose_names.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | 1 | 2019-03-05T15:37:22.000Z | 2019-03-05T15:37:22.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('wagtailimages', '0005_make_filter_spec_unique'),
]
operations = [
migrations.AlterField(
... | 29.102564 | 85 | 0.587665 |
7945c7c421e2b8762fb580b5a41c5af1f7808cf5 | 1,518 | py | Python | logging_utils.py | yawana1/GrapeGS | 2878b9c3619128dbbc3730d712798200127a03cb | [
"MIT"
] | null | null | null | logging_utils.py | yawana1/GrapeGS | 2878b9c3619128dbbc3730d712798200127a03cb | [
"MIT"
] | null | null | null | logging_utils.py | yawana1/GrapeGS | 2878b9c3619128dbbc3730d712798200127a03cb | [
"MIT"
] | null | null | null | '''
Created on Jun 29, 2017
@author: Alex Martelli
'''
import sys
import traceback
import logging
_verbose = False
def setup_logging_to_file(filename, verbose = False):
if verbose:
logging.basicConfig( filename=filename,
filemode='w',
level=loggi... | 28.111111 | 115 | 0.579051 |
7945c8a9ceac7f6c0b5e35ab8034c54543903e03 | 2,054 | py | Python | examples/example2.py | jorgehatccrma/pygrfnn | c67cb30c5cde579796ccbacc6338eb0631e81f6e | [
"BSD-3-Clause"
] | 7 | 2015-10-01T12:54:11.000Z | 2018-09-27T04:10:49.000Z | examples/example2.py | jorgehatccrma/pygrfnn | c67cb30c5cde579796ccbacc6338eb0631e81f6e | [
"BSD-3-Clause"
] | null | null | null | examples/example2.py | jorgehatccrma/pygrfnn | c67cb30c5cde579796ccbacc6338eb0631e81f6e | [
"BSD-3-Clause"
] | 3 | 2015-10-01T12:54:14.000Z | 2018-11-15T13:35:21.000Z | # 0. Preliminares
import sys
sys.path.append('../') # needed to run the examples from within the package folder
import numpy as np
from pygrfnn import Zparam, GrFNN, Model, make_connections
from pygrfnn.vis import plot_connections
from pygrfnn.vis import tf_detail
from pygrfnn.vis import GrFNN_RT_plot
# 1. Create... | 24.452381 | 88 | 0.680623 |
7945c8ff697bdb164efa0e447776fb04b5b8a6c5 | 8,081 | py | Python | src/encoded/types/quality_metric.py | KCL-ORG/encoded | 5a1904e948bfd652e8a8d52c6717d7fc0b56b681 | [
"MIT"
] | null | null | null | src/encoded/types/quality_metric.py | KCL-ORG/encoded | 5a1904e948bfd652e8a8d52c6717d7fc0b56b681 | [
"MIT"
] | null | null | null | src/encoded/types/quality_metric.py | KCL-ORG/encoded | 5a1904e948bfd652e8a8d52c6717d7fc0b56b681 | [
"MIT"
] | null | null | null | from snovault import (
abstract_collection,
collection,
calculated_property,
load_schema,
)
from snovault.attachment import ItemWithAttachment
from .base import (
Item,
)
from .shared_calculated_properties import CalculatedAssayTermID
@abstract_collection(
name='quality-metrics',
properti... | 35.756637 | 129 | 0.727756 |
7945c9ffad7cbe0025e8f6e28818662a599046fe | 7,864 | py | Python | src/m6_mutation.py | luffmama/16-SequencesAndMutation | 6669f0d99cf0159dd0dfbd1529921511f80ea4ec | [
"MIT"
] | null | null | null | src/m6_mutation.py | luffmama/16-SequencesAndMutation | 6669f0d99cf0159dd0dfbd1529921511f80ea4ec | [
"MIT"
] | null | null | null | src/m6_mutation.py | luffmama/16-SequencesAndMutation | 6669f0d99cf0159dd0dfbd1529921511f80ea4ec | [
"MIT"
] | null | null | null | """
This module lets you practice MUTATION of lists.
In this module, you mutate by CHANGING elements of a list.
Authors: David Mutchler, Amanda Stouder, Chandan Rupakheti, Katie Dion,
Claude Anderson, Delvin Defoe, Curt Clifton, their colleagues,
and Margaret Luffman.
""" # DONE: 1. PUT YOUR NAM... | 37.990338 | 78 | 0.575407 |
7945ca1d7e3e163652a85f24c15137e1082df56e | 3,674 | py | Python | dace/codegen/prettycode.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T13:36:34.000Z | 2022-03-11T13:36:34.000Z | dace/codegen/prettycode.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | null | null | null | dace/codegen/prettycode.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
""" Code I/O stream that automates indentation and mapping of code to SDFG
nodes. """
import inspect
from six import StringIO
from dace.config import Config
class CodeIOStream(StringIO):
""" Code I/O stream that automates indentatio... | 41.75 | 105 | 0.56859 |
7945cba57dd076965b718874a6cfc33d41b5cb60 | 1,589 | py | Python | sample/basic/basic_file_report_example.py | ndcolter-mcafee/opendxl-virustotal-service-python | c65515d9b9c91bca08d5024c27b593ee07a22f92 | [
"Apache-2.0"
] | 6 | 2017-05-04T18:42:44.000Z | 2021-03-23T13:46:03.000Z | sample/basic/basic_file_report_example.py | ndcolter-mcafee/opendxl-virustotal-service-python | c65515d9b9c91bca08d5024c27b593ee07a22f92 | [
"Apache-2.0"
] | 1 | 2018-07-30T17:01:25.000Z | 2018-07-30T20:15:15.000Z | sample/basic/basic_file_report_example.py | ndcolter-mcafee/opendxl-virustotal-service-python | c65515d9b9c91bca08d5024c27b593ee07a22f92 | [
"Apache-2.0"
] | 10 | 2017-08-01T00:01:35.000Z | 2019-02-27T21:40:51.000Z | # This sample invokes and displays the results of a VirusTotal "file report" via DXL.
#
# See: https://www.virustotal.com/en/documentation/public-api/#getting-file-scans
from __future__ import absolute_import
from __future__ import print_function
import os
import sys
from dxlclient.client_config import DxlClientConfi... | 33.808511 | 92 | 0.759597 |
7945cbdd8dca1e08689b86cff06faacf31a725c1 | 2,046 | py | Python | gewittergefahr/gg_utils/conus_boundary_test.py | dopplerchase/GewitterGefahr | 4415b08dd64f37eba5b1b9e8cc5aa9af24f96593 | [
"MIT"
] | 26 | 2018-10-04T01:07:35.000Z | 2022-01-29T08:49:32.000Z | gewittergefahr/gg_utils/conus_boundary_test.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 4 | 2017-12-25T02:01:08.000Z | 2018-12-19T01:54:21.000Z | gewittergefahr/gg_utils/conus_boundary_test.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 11 | 2017-12-10T23:05:29.000Z | 2022-01-29T08:49:33.000Z | """Unit tests for conus_boundary.py."""
import unittest
import numpy
from gewittergefahr.gg_utils import conus_boundary
QUERY_LATITUDES_DEG = numpy.array([
33.7, 42.6, 39.7, 34.9, 40.2, 33.6, 36.4, 35.1, 30.8, 47.4, 44.2, 45.1,
49.6, 38.9, 35.0, 38.1, 40.7, 47.1, 30.2, 39.2
])
QUERY_LONGITUDES_DEG = numpy.arr... | 32.47619 | 80 | 0.673021 |
7945cbdec870e2d52c62d4f64be13d19c9c2e223 | 3,397 | py | Python | processing/simulate_signals.py | SAKEverse/sake-plot | a08973222109981b36d204a754d0bf34d95be192 | [
"Apache-2.0"
] | null | null | null | processing/simulate_signals.py | SAKEverse/sake-plot | a08973222109981b36d204a754d0bf34d95be192 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:21:18.000Z | 2021-11-30T16:21:18.000Z | processing/simulate_signals.py | SAKEverse/sake-plot | a08973222109981b36d204a754d0bf34d95be192 | [
"Apache-2.0"
] | null | null | null | ####----------------------- IMPORTS ------------------- ######
import numpy as np
from processing.stft import get_freq_index, Stft, Properties
####--------------------------------------------------- ######
class SimSignal(Properties):
""" Simulate eeg/lgp signals
"""
def __init__(self, properties:dict... | 24.615942 | 89 | 0.543126 |
7945cbf9ea279ffd72d320cb9709cf7516dec7ed | 3,475 | py | Python | MC-MPC/scripts/plots.py | Anna-Kuosmanen/DAGChainer | 2e095e30dd9b158563c05d088443d6b548eeb870 | [
"MIT"
] | 9 | 2018-04-18T12:48:49.000Z | 2022-03-23T20:53:30.000Z | MC-MPC/scripts/plots.py | Anna-Kuosmanen/DAGChainer | 2e095e30dd9b158563c05d088443d6b548eeb870 | [
"MIT"
] | null | null | null | MC-MPC/scripts/plots.py | Anna-Kuosmanen/DAGChainer | 2e095e30dd9b158563c05d088443d6b548eeb870 | [
"MIT"
] | 3 | 2019-04-10T13:02:47.000Z | 2022-03-23T20:54:02.000Z | import matplotlib.pyplot as plt
import math
import time
import solvers
import timeit
TEST_GRAPH_NAME = "test_graph"
def plot(k_values, n_values , m_values, title, filename):
plt.clf()
m = 0.5
results_decomp = [0]*len(values)
results_normal = [0]*len(values)
index = 0
for n in n_values:
solvers.generat... | 32.476636 | 129 | 0.686043 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.