hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | 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 130 | 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 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.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7d17b72b36a89362f6e2c9c098373876069e693b | 7,354 | py | Python | python/paddle/fluid/tests/unittests/test_beam_search_op.py | jinyuKING/Paddle | 1f4d46fa885448af4ce45827eae3c609280d4e34 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_beam_search_op.py | jinyuKING/Paddle | 1f4d46fa885448af4ce45827eae3c609280d4e34 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_beam_search_op.py | jinyuKING/Paddle | 1f4d46fa885448af4ce45827eae3c609280d4e34 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 36.77 | 79 | 0.549905 | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 0 | 0 | 0 | 6,234 | 0 | 120 | 0 | 61 | 158 |
d8536b2cabc7f5bc241592886b848784c96f50cc | 1,019 | py | Python | results/baseline/parse_baseline.py | XiaoSanchez/autophase | 3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb | [
"BSD-3-Clause"
] | 14 | 2020-04-03T12:41:50.000Z | 2022-02-04T00:05:01.000Z | results/baseline/parse_baseline.py | XiaoSanchez/autophase | 3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb | [
"BSD-3-Clause"
] | 2 | 2020-03-02T04:32:58.000Z | 2021-09-15T20:02:25.000Z | results/baseline/parse_baseline.py | XiaoSanchez/autophase | 3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb | [
"BSD-3-Clause"
] | 8 | 2020-03-02T10:30:36.000Z | 2021-08-03T02:29:38.000Z |
get_random_pgm_groups()
| 25.475 | 84 | 0.584887 | import pickle
def get_random_pgm_groups():
interval = [0, 1000, 5000, 10000, 50000, 100000]
buckets = {}
for i in range(len(interval)-1):
buckets[i] = []
valid_count = 0
with open('baseline.txt') as f:
lines = f.readlines()
print("Ignore Header Line: {}".format(lines[0]))
lines = lines[1:]
... | 0 | 0 | 0 | 0 | 0 | 957 | 0 | -8 | 45 |
a0d5b28ad7f528382bfd88d685d4abe641a9bb60 | 395 | py | Python | hads_adad.py | rezasf/hads-adad | c6183c8a84ceb526242822c49ba7ad8bc71287a3 | [
"Unlicense"
] | null | null | null | hads_adad.py | rezasf/hads-adad | c6183c8a84ceb526242822c49ba7ad8bc71287a3 | [
"Unlicense"
] | null | null | null | hads_adad.py | rezasf/hads-adad | c6183c8a84ceb526242822c49ba7ad8bc71287a3 | [
"Unlicense"
] | null | null | null | # Copyright (C) 2021 rezasf - All Rights Reserved
import random
res = random.randint(0,40)
count = 1
while True:
daf =int(input("ye adad vared kon: "))
if daf == res :
print("bad az "+ str(count) +" bar talash"+" shoma bordid")
break
elif daf > res :
print("bro pain")
coun... | 23.235294 | 67 | 0.544304 | # Copyright (C) 2021 rezasf - All Rights Reserved
import random
res = random.randint(0,40)
count = 1
while True:
daf =int(input("ye adad vared kon: "))
if daf == res :
print("bad az "+ str(count) +" bar talash"+" shoma bordid")
break
elif daf > res :
print("bro pain")
coun... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8d084e6f1b2eaabb108d7dc5fb8eaa0ab99eec6 | 789 | py | Python | dipole_test.py | rweigel/magnetovis | 2f466df4e29c2bb71c3d92294efea7f9eb036cec | [
"BSD-2-Clause"
] | null | null | null | dipole_test.py | rweigel/magnetovis | 2f466df4e29c2bb71c3d92294efea7f9eb036cec | [
"BSD-2-Clause"
] | 2 | 2020-11-06T10:20:08.000Z | 2021-01-25T17:44:48.000Z | dipole_test.py | rweigel/magnetovis | 2f466df4e29c2bb71c3d92294efea7f9eb036cec | [
"BSD-2-Clause"
] | 1 | 2021-05-22T11:35:18.000Z | 2021-05-22T11:35:18.000Z | import magnetovis as mvs
import paraview.simple as pvs
time = [2015,3,20,0,0,0] # time not used if coord_sys = GSM
coord_sys = 'GSM'
M=7.788E22
dipoleFieldSourceDisplay, renderView, dipoleFieldSource = mvs.dipole_field(time, M, coord_sys)
# create a new 'Glyph'
glyph = pvs.Glyph(registrationName='-- Glyph', Input=di... | 30.346154 | 95 | 0.746515 | import magnetovis as mvs
import paraview.simple as pvs
time = [2015,3,20,0,0,0] # time not used if coord_sys = GSM
coord_sys = 'GSM'
M=7.788E22
dipoleFieldSourceDisplay, renderView, dipoleFieldSource = mvs.dipole_field(time, M, coord_sys)
# create a new 'Glyph'
glyph = pvs.Glyph(registrationName='-- Glyph', Input=di... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fc3ec0b8abfc036829de0eac8883435ae2262c58 | 2,443 | py | Python | main.py | heylakshya/youtubeRabbitHole | c1a45479429cc68f36ac8586cc54755cc119141b | [
"MIT"
] | 1 | 2020-11-26T13:49:42.000Z | 2020-11-26T13:49:42.000Z | main.py | heylakshya/youtubeRabbitHole | c1a45479429cc68f36ac8586cc54755cc119141b | [
"MIT"
] | null | null | null | main.py | heylakshya/youtubeRabbitHole | c1a45479429cc68f36ac8586cc54755cc119141b | [
"MIT"
] | 1 | 2021-03-02T05:00:57.000Z | 2021-03-02T05:00:57.000Z | import functions as f
import random
import json
def crawl2(url, depth, first_call = 0, home_tags = None):
'''
Crawl the yt web graph and return relevance index
upto defined depth.
'''
print("---\tat depth = {}".format(depth))
if depth == 0:
return []
tags = home_tags
links = None
attempt=5
while (tags==N... | 25.715789 | 61 | 0.6623 | import functions as f
import random
import numpy as np
import matplotlib.pyplot as plt
import json
def crawl2(url, depth, first_call = 0, home_tags = None):
'''
Crawl the yt web graph and return relevance index
upto defined depth.
'''
print("---\tat depth = {}".format(depth))
if depth == 0:
return []
tags =... | 0 | 0 | 0 | 0 | 0 | 372 | 0 | 7 | 67 |
0db5529ac93de1b8d3df8ca691845c4c56323a28 | 2,844 | py | Python | oidc/models.py | didx-xyz/yoma-oidc-bridge | 7e3ff6ab3ea4fed01cd7d4c113c7c3b3244356eb | [
"Apache-2.0"
] | 4 | 2020-10-08T07:36:22.000Z | 2022-02-04T12:31:31.000Z | oidc/models.py | didx-xyz/yoma-oidc-bridge | 7e3ff6ab3ea4fed01cd7d4c113c7c3b3244356eb | [
"Apache-2.0"
] | 1 | 2021-04-10T08:32:42.000Z | 2021-04-10T08:32:42.000Z | oidc/models.py | didx-xyz/yoma-oidc-bridge | 7e3ff6ab3ea4fed01cd7d4c113c7c3b3244356eb | [
"Apache-2.0"
] | 7 | 2021-02-10T16:04:29.000Z | 2022-03-16T08:04:48.000Z |
# Create your models here.
| 34.26506 | 84 | 0.678973 | from django.db import models
import uuid
from model_utils.models import TimeStampedModel
from django.conf import settings
def disambiguate_referent(referent: str) -> str:
ref_idx = 1
ref_split = referent.split("~")
if len(ref_split) > 1:
old_idx = int(ref_split[-1])
ref_idx += old_idx
... | 0 | 0 | 0 | 2,387 | 0 | 210 | 0 | 34 | 180 |
44d826263dd166b68c14221609b4bc0ae344851f | 3,578 | py | Python | Zero_to_Google_SDE/LeetCodeHelper.py | NihalAgarwal/My-coding-DSA-Template | db872f6f72609f1d6ce7fb8e388dcbeca8337ffb | [
"MIT"
] | null | null | null | Zero_to_Google_SDE/LeetCodeHelper.py | NihalAgarwal/My-coding-DSA-Template | db872f6f72609f1d6ce7fb8e388dcbeca8337ffb | [
"MIT"
] | null | null | null | Zero_to_Google_SDE/LeetCodeHelper.py | NihalAgarwal/My-coding-DSA-Template | db872f6f72609f1d6ce7fb8e388dcbeca8337ffb | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
rep = "y"
while rep == "y" or rep == "Y":
print("*" * 10 + " ~~HELPER MENU~~ " + "*" * 10 + "\n")
print("1. Draw Tree (press 1) ")
print("2. Convert [] to {} (press 2) ")
print("3. String to CharArray e.g., \"add\" -> \"{'a','d','d'}\" (press 3)")... | 27.953125 | 84 | 0.439072 | import turtle
import pyperclip as pc
class TreeNode:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
def __repr__(self):
return "TreeNode({})".format(self.val)
class TreeBuild:
""" Display how our tree looks like. """
... | 0 | 1,249 | 0 | 1,489 | 0 | 0 | 0 | -7 | 136 |
7c37e7c4e9abf74a7fe46b2d7f2c93f45ecdf0a0 | 2,089 | py | Python | pre_save_embedding.py | jstzwj/NatsuBot | ceb22a67f9c3779bea44a56209d7b3174c34d480 | [
"MIT"
] | 4 | 2020-08-07T10:28:04.000Z | 2020-08-09T04:12:28.000Z | pre_save_embedding.py | jstzwj/NatsuBot | ceb22a67f9c3779bea44a56209d7b3174c34d480 | [
"MIT"
] | null | null | null | pre_save_embedding.py | jstzwj/NatsuBot | ceb22a67f9c3779bea44a56209d7b3174c34d480 | [
"MIT"
] | null | null | null | import pickle
import os
import json
from sentence_transformers import SentenceTransformer
if __name__ == "__main__":
model = SentenceTransformer('distiluse-base-multilingual-cased', device='cuda')
# path = ['./chat_text/poetry.txt', './chat_text/chat_text.txt']
# path = ['./chat_text/chat_text.txt', './cha... | 41.78 | 89 | 0.549545 | import pickle
import os
import json
from sentence_transformers import SentenceTransformer
if __name__ == "__main__":
model = SentenceTransformer('distiluse-base-multilingual-cased', device='cuda')
# path = ['./chat_text/poetry.txt', './chat_text/chat_text.txt']
# path = ['./chat_text/chat_text.txt', './cha... | 24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
714a8bdf932506bb3237e597634c7ccafc4f7c25 | 1,147 | py | Python | asym_rlpo/utils/debugging.py | abaisero/asym-porl | 8a76d920e51d783bbeeeea3cd2b02efffbb33c72 | [
"MIT"
] | 2 | 2021-08-24T22:41:36.000Z | 2021-10-31T01:55:37.000Z | asym_rlpo/utils/debugging.py | abaisero/asym-porl | 8a76d920e51d783bbeeeea3cd2b02efffbb33c72 | [
"MIT"
] | null | null | null | asym_rlpo/utils/debugging.py | abaisero/asym-porl | 8a76d920e51d783bbeeeea3cd2b02efffbb33c72 | [
"MIT"
] | 1 | 2021-10-13T12:27:40.000Z | 2021-10-13T12:27:40.000Z | from numbers import Number
import numpy as np
import torch
# taken from https://stackoverflow.com/questions/18376935/best-practice-for-equality-in-python
def nested_equal(a, b):
"""
Compare two objects recursively by element, handling numpy objects.
Assumes hashable items are not mutable in a way that ... | 22.057692 | 94 | 0.625981 | from numbers import Number
from typing import Type
import numpy as np
import torch
def checkraise(
condition: bool,
error_type: Type[Exception],
error_message_fmt: str,
*args,
**kwargs
):
if not condition:
raise error_type(error_message_fmt.format(*args, **kwargs))
# taken from http... | 0 | 0 | 0 | 0 | 0 | 193 | 0 | 2 | 45 |
968587f9776b6ebff30c84ba1c209150fc2ef151 | 2,827 | py | Python | reagent/optimizer/uninferrable_schedulers.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | 1 | 2021-01-15T01:55:47.000Z | 2021-01-15T01:55:47.000Z | reagent/optimizer/uninferrable_schedulers.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | null | null | null | reagent/optimizer/uninferrable_schedulers.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
This file contains configs that could not be inferred from the default values
provided by PyTorch. If PyTorch optimizers and lr_schedulers had type annotations
then we could infer everything.
default values that cannot be inferred:
- tuple
- None
- required parameters (no default value)
Som... | 27.182692 | 81 | 0.719844 | #!/usr/bin/env python3
"""
This file contains configs that could not be inferred from the default values
provided by PyTorch. If PyTorch optimizers and lr_schedulers had type annotations
then we could infer everything.
default values that cannot be inferred:
- tuple
- None
- required parameters (no default value)
Som... | 0 | 2,016 | 0 | 0 | 0 | 0 | 0 | 73 | 275 |
5d61cc68d241fb00cfc9760d6e7c86d5bee99a1f | 9,173 | py | Python | src/diffupath/utils.py | multipaths/DiffuPath | 80da8f23754169e1f670a2f93aa6e605d84ab7e8 | [
"Apache-2.0"
] | 5 | 2019-07-08T13:39:05.000Z | 2021-06-21T02:11:39.000Z | src/diffupath/utils.py | multipaths/DiffuPath | 80da8f23754169e1f670a2f93aa6e605d84ab7e8 | [
"Apache-2.0"
] | 5 | 2019-12-16T07:51:16.000Z | 2020-12-24T16:50:14.000Z | src/diffupath/utils.py | multipaths/DiffuPath | 80da8f23754169e1f670a2f93aa6e605d84ab7e8 | [
"Apache-2.0"
] | 1 | 2020-08-13T12:23:08.000Z | 2020-08-13T12:23:08.000Z | # -*- coding: utf-8 -*-
"""Miscellaneous utils of the package."""
import copy
import inspect
import itertools
import logging
import os
import pickle
import random
from collections import defaultdict
from glob import glob
from statistics import mean
from typing import List
import numpy as np
log = logging.getLogger(_... | 31.414384 | 128 | 0.631963 | # -*- coding: utf-8 -*-
"""Miscellaneous utils of the package."""
import copy
import inspect
import itertools
import logging
import os
import pickle
import random
from collections import defaultdict
from glob import glob
from statistics import mean
from typing import List
import numpy as np
log = logging.getLogger(_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
774ef2745289a2cc5cdc3e604ab730eaef761c44 | 2,600 | py | Python | src/features/word_count_analysis.py | Nazdarovja/Python_Semester_Project | de830060553c51389c3940e022ae038b41021455 | [
"MIT"
] | null | null | null | src/features/word_count_analysis.py | Nazdarovja/Python_Semester_Project | de830060553c51389c3940e022ae038b41021455 | [
"MIT"
] | null | null | null | src/features/word_count_analysis.py | Nazdarovja/Python_Semester_Project | de830060553c51389c3940e022ae038b41021455 | [
"MIT"
] | null | null | null | import pandas as pd
import collections
import numpy as np
def count_top_words_in_genre(genre, lyrics_df):
"""
Detect the language of the text.
Parameters
----------
genre : str
genre like 'Hip-Hop' or 'Pop'
lyrics_df : pandas dataframe
clean dataframe
... | 37.142857 | 136 | 0.653462 | import pandas as pd
import collections
import numpy as np
def count_top_words_in_genre(genre, lyrics_df):
"""
Detect the language of the text.
Parameters
----------
genre : str
genre like 'Hip-Hop' or 'Pop'
lyrics_df : pandas dataframe
clean dataframe
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f96ed070a5f96ae75dfd7a99c5dd448c88eb2e4c | 9,423 | py | Python | common/trainloop/loops.py | alainjungo/reliability-challenges-uncertainty | 21e86f6e2a5d2520b5767dce48bbcf2b11773788 | [
"MIT"
] | 56 | 2019-07-10T06:02:11.000Z | 2021-12-21T08:11:22.000Z | common/trainloop/loops.py | alainjungo/reliability-challenges-uncertainty | 21e86f6e2a5d2520b5767dce48bbcf2b11773788 | [
"MIT"
] | 4 | 2019-09-26T08:51:58.000Z | 2021-06-08T20:27:53.000Z | common/trainloop/loops.py | alainjungo/reliability-challenges-uncertainty | 21e86f6e2a5d2520b5767dce48bbcf2b11773788 | [
"MIT"
] | 8 | 2019-10-21T12:43:08.000Z | 2021-12-02T08:14:38.000Z | import common.trainloop.hooks as hooks
import common.trainloop.data as data
| 39.759494 | 119 | 0.665818 | import logging
import torch
import numpy as np
import common.utils.torchhelper as th
import common.trainloop.context as ctx
import common.trainloop.hooks as hooks
import common.trainloop.data as data
class Validate:
def __init__(self, steps: list) -> None:
self.steps = steps
self.score_aggregat... | 0 | 0 | 0 | 9,047 | 0 | 53 | 0 | 14 | 227 |
fb6e766a3aec86b5093d661ed727eae1c29acdee | 2,286 | py | Python | q2_types/per_sample_sequences/__init__.py | jakereps/q2-types | 9942237a3d44e159e3617b836e48435a12842e3c | [
"BSD-3-Clause"
] | 8 | 2016-06-26T20:35:52.000Z | 2021-08-08T07:45:56.000Z | q2_types/per_sample_sequences/__init__.py | jakereps/q2-types | 9942237a3d44e159e3617b836e48435a12842e3c | [
"BSD-3-Clause"
] | 170 | 2016-05-10T19:27:56.000Z | 2022-03-16T21:50:49.000Z | q2_types/per_sample_sequences/__init__.py | jakereps/q2-types | 9942237a3d44e159e3617b836e48435a12842e3c | [
"BSD-3-Clause"
] | 44 | 2016-05-09T20:56:06.000Z | 2021-08-17T17:09:39.000Z | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 49.695652 | 78 | 0.625984 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0 |
fdb74a7ca6bafb012f1c478a67adb445d25c46e4 | 5,744 | py | Python | gpMgmt/bin/gpssh_modules/gppxssh_wrapper.py | wapache-org/greenplum-gpdb | 79e2bd251c1d27054846f630acd52e7903854829 | [
"PostgreSQL",
"Apache-2.0"
] | 5,535 | 2015-10-28T01:05:40.000Z | 2022-03-30T13:46:53.000Z | gpMgmt/bin/gpssh_modules/gppxssh_wrapper.py | wapache-org/greenplum-gpdb | 79e2bd251c1d27054846f630acd52e7903854829 | [
"PostgreSQL",
"Apache-2.0"
] | 9,369 | 2015-10-28T07:48:01.000Z | 2022-03-31T23:56:42.000Z | gpMgmt/bin/gpssh_modules/gppxssh_wrapper.py | wapache-org/greenplum-gpdb | 79e2bd251c1d27054846f630acd52e7903854829 | [
"PostgreSQL",
"Apache-2.0"
] | 1,800 | 2015-10-28T01:08:25.000Z | 2022-03-29T13:29:36.000Z | import sys
sys.path.insert(1, sys.path[0] + '/lib')
CRNL = '\r\n'
DEBUG_VERBOSE_PRINTING = False
# experimentally derived that a sequence of tries with delays of
# 1, 5, 25, 125 secs worked to surmount a 1-second delay (via `tc` test)
RETRY_EXPONENT = 5
| 43.18797 | 116 | 0.621692 | from datetime import datetime
import time
import sys
sys.path.insert(1, sys.path[0] + '/lib')
from pexpect import pxssh, TIMEOUT
CRNL = '\r\n'
DEBUG_VERBOSE_PRINTING = False
# experimentally derived that a sequence of tries with delays of
# 1, 5, 25, 125 secs worked to surmount a 1-second delay (via `tc` test)
RETRY... | 0 | 0 | 0 | 5,385 | 0 | 0 | 0 | 11 | 89 |
b95a7481c95d69db4af9c074180e78b47074a31c | 4,486 | py | Python | gpMgmt/test/behave/mgmt_utils/steps/gpstart.py | zhongyibill/gpdb | 12cfded239d5da2ad102697c9d56efb5759807dd | [
"PostgreSQL",
"Apache-2.0"
] | 1 | 2021-01-03T17:55:43.000Z | 2021-01-03T17:55:43.000Z | gpMgmt/test/behave/mgmt_utils/steps/gpstart.py | zhongyibill/gpdb | 12cfded239d5da2ad102697c9d56efb5759807dd | [
"PostgreSQL",
"Apache-2.0"
] | 6 | 2019-11-04T17:12:13.000Z | 2020-06-04T21:18:41.000Z | gpMgmt/test/behave/mgmt_utils/steps/gpstart.py | zhongyibill/gpdb | 12cfded239d5da2ad102697c9d56efb5759807dd | [
"PostgreSQL",
"Apache-2.0"
] | 1 | 2020-03-26T02:47:22.000Z | 2020-03-26T02:47:22.000Z | import signal
def _handle_sigpipe():
"""
Work around https://bugs.python.org/issue1615376, which is not fixed until
Python 3.2. This bug interferes with Bash pipelines that rely on SIGPIPE to
exit cleanly.
"""
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
| 34.507692 | 133 | 0.653143 | import os
import signal
import subprocess
from behave import given, when, then
from test.behave_utils import utils
from gppylib.commands.base import Command
def _run_sql(sql, opts=None):
env = None
if opts is not None:
env = os.environ.copy()
options = ''
for key, value in opts.items... | 0 | 3,005 | 0 | 0 | 0 | 826 | 0 | 33 | 341 |
caae85bacfe71629215a5620278cfc2abaed9bde | 17,277 | py | Python | groupon/extras/code.py | vikmeup/python-groupon | a7fc55c3b22d3031ac5abf3190ea2d8fcdcd4699 | [
"Apache-2.0"
] | null | null | null | groupon/extras/code.py | vikmeup/python-groupon | a7fc55c3b22d3031ac5abf3190ea2d8fcdcd4699 | [
"Apache-2.0"
] | null | null | null | groupon/extras/code.py | vikmeup/python-groupon | a7fc55c3b22d3031ac5abf3190ea2d8fcdcd4699 | [
"Apache-2.0"
] | null | null | null | from groupon import Version
__author__ = "Allan Bunch"
__copyright__ = "Copyright (C) 2010 Webframeworks LLC"
__license__ = """Copyright 2010 Webframeworks LLC Licensed under the Apache
License, Version 2.0 (the "License"); you may not use this
file except in compliance with the Licen... | 57.019802 | 179 | 0.472883 | from groupon import Version
__author__ = "Allan Bunch"
__copyright__ = "Copyright (C) 2010 Webframeworks LLC"
__license__ = """Copyright 2010 Webframeworks LLC Licensed under the Apache
License, Version 2.0 (the "License"); you may not use this
file except in compliance with the Licen... | 0 | 0 | 0 | 16,328 | 0 | 0 | 0 | 0 | 23 |
593e64885e5d572e4b146897a1f80d8ba96c976f | 11,552 | py | Python | app/utils/webstore.py | Timon0305/Auto_Checking | 8bb8e1e7e4a4817ff6769db25ea4fe0d8e5d65bf | [
"MIT"
] | null | null | null | app/utils/webstore.py | Timon0305/Auto_Checking | 8bb8e1e7e4a4817ff6769db25ea4fe0d8e5d65bf | [
"MIT"
] | 1 | 2022-02-09T16:45:14.000Z | 2022-02-09T16:45:14.000Z | app/utils/webstore.py | Timon0305/Auto_Checking | 8bb8e1e7e4a4817ff6769db25ea4fe0d8e5d65bf | [
"MIT"
] | null | null | null | import json
import requests
import uuid
s = requests.session()
stylecode = 'DB5074-101'
stop = False
storage = {}
sizes = ['9']
cookie = '_abck=42D4E2E416589130C76B07375A19C056~-1~YAAQwArGF1ovWzJ1AQAAFVlARAS+j6F2rlSe4zrahotRz7GSQSWK5sEIKBw84/F206ZvoZUygpHQDG2YE7a/6qDtXywJFj1qo80QXunTlvRzSb9Ir3ImsuxW2d1aiy+bJXLo/yXYCOue... | 35.435583 | 851 | 0.512119 | import json
from time import sleep
import requests
from cloudaio import tlsexpert
import uuid
import random
s = requests.session()
stylecode = 'DB5074-101'
stop = False
storage = {}
sizes = ['9']
cookie = '_abck=42D4E2E416589130C76B07375A19C056~-1~YAAQwArGF1ovWzJ1AQAAFVlARAS+j6F2rlSe4zrahotRz7GSQSWK5sEIKBw84/F206ZvoZUy... | 0 | 0 | 0 | 0 | 0 | 9,730 | 0 | 2 | 181 |
72ebbb47f00a1f3815d46bfb5a0e5a0fd768886b | 14,312 | py | Python | src/guesswhat/train/train_oracle.py | ibrahimSouleiman/GuessWhat | 60d140de1aae5ccda27e7d3eef2b9fb9548f0854 | [
"Apache-2.0"
] | null | null | null | src/guesswhat/train/train_oracle.py | ibrahimSouleiman/GuessWhat | 60d140de1aae5ccda27e7d3eef2b9fb9548f0854 | [
"Apache-2.0"
] | null | null | null | src/guesswhat/train/train_oracle.py | ibrahimSouleiman/GuessWhat | 60d140de1aae5ccda27e7d3eef2b9fb9548f0854 | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
import os
from multiprocessing import Pool
from distutils.util import strtobool
import tensorflow as tf
from pathlib import Path
from generic.data_provider.iterator import Iterator
from generic.tf_utils.evaluator import Evaluator
from generic.tf_utils.optimizer import create_optimizer
f... | 38.891304 | 371 | 0.638276 | import argparse
import logging
import os
from multiprocessing import Pool
from distutils.util import strtobool
import tensorflow as tf
import numpy as np
import json
from pathlib import Path
from generic.data_provider.iterator import Iterator
from generic.tf_utils.evaluator import Evaluator
from generic.tf_utils.opt... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 67 |
b17c0e29efe0a6120c90012157d73cbf64908685 | 8,202 | py | Python | venv/lib/python2.7/site-packages/webassets/filter/compass.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/webassets/filter/compass.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | 7 | 2021-02-08T20:22:15.000Z | 2022-03-11T23:19:41.000Z | venv/lib/python2.7/site-packages/webassets/filter/compass.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | null | null | null | """
Generally speaking, compass provides a command line util that is used
a) as a management script (like django-admin.py) doing for example
setup work, adding plugins to a project etc), and
b) can compile the sass source files into CSS.
While generally project-based, starting with 0.10, compass supposedly
sup... | 42.942408 | 86 | 0.611558 | """
Generally speaking, compass provides a command line util that is used
a) as a management script (like django-admin.py) doing for example
setup work, adding plugins to a project etc), and
b) can compile the sass source files into CSS.
While generally project-based, starting with 0.10, compass supposedly
sup... | 0 | 0 | 0 | 6,634 | 0 | 0 | 0 | 29 | 157 |
eb1606b89995448b7b26ebd06607561f33f3d993 | 789 | py | Python | 05_ventanas.py | dlunna/gob.selenium | 9c663e78b880b3363731f6e6f5b6899a972ef7c0 | [
"MIT"
] | null | null | null | 05_ventanas.py | dlunna/gob.selenium | 9c663e78b880b3363731f6e6f5b6899a972ef7c0 | [
"MIT"
] | null | null | null | 05_ventanas.py | dlunna/gob.selenium | 9c663e78b880b3363731f6e6f5b6899a972ef7c0 | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main() | 26.3 | 97 | 0.669202 | import time
import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class usando_unittest(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome(executable_path='/var/www/pyfy/gob.selenium/chromedriver')
def test_cambiar_ventana(self):
drive... | 0 | 0 | 0 | 612 | 0 | 0 | 0 | 25 | 89 |
adaef4a84bf0412b7f77103cd7fd303ee40f3c2f | 7,367 | py | Python | app/crud/job.py | meddler-io/secoflex | 3a61b46ab03a25f6436d8e004a1d8ead46093272 | [
"MIT"
] | null | null | null | app/crud/job.py | meddler-io/secoflex | 3a61b46ab03a25f6436d8e004a1d8ead46093272 | [
"MIT"
] | null | null | null | app/crud/job.py | meddler-io/secoflex | 3a61b46ab03a25f6436d8e004a1d8ead46093272 | [
"MIT"
] | null | null | null |
# JobInResponse
# JobInResponse
# JobInResponse
| 23.996743 | 188 | 0.467626 |
from motor.frameworks.asyncio import pymongo_class_wrapper
from app.api.api_v2.endpoints import job
from typing import Any, List
from app.models.tool.job import JobCompositeInResponse, JobInDb, JobInRequest, JobInResponse, JobProgressResponse, JobUpdateModel
from app.models.mongo_id import ObjectIdInReq, ObjectIdInR... | 0 | 0 | 6,221 | 0 | 0 | 0 | 0 | 728 | 359 |
cb99d70f985f446d177e9d7d3af216fc3f222dc4 | 942 | py | Python | article/migrations/0003_comments.py | hexa-yagnenok/myblog | ebba71516ce2ebb6b05fcb8c889a54924b9284c9 | [
"MIT"
] | null | null | null | article/migrations/0003_comments.py | hexa-yagnenok/myblog | ebba71516ce2ebb6b05fcb8c889a54924b9284c9 | [
"MIT"
] | null | null | null | article/migrations/0003_comments.py | hexa-yagnenok/myblog | ebba71516ce2ebb6b05fcb8c889a54924b9284c9 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-02-08 11:06
| 37.68 | 163 | 0.638004 | # Generated by Django 3.1.5 on 2021-02-08 11:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('article', '0002_auto_20210207_1514'),
]
operations = [
migrations.CreateModel(
name='Comments',... | 0 | 0 | 0 | 795 | 0 | 0 | 0 | 30 | 68 |
ebadf0352571b46b1488b0e97b824910cb2a4fe5 | 3,718 | py | Python | tests/chainer_tests/optimizer_hooks_tests/test_gradient_lars.py | dl4fugaku/chainer | 34655eff5986522eae56f47fc82a8cc2b78e1617 | [
"MIT"
] | 2 | 2019-08-12T21:48:04.000Z | 2020-08-27T18:04:20.000Z | tests/chainer_tests/optimizer_hooks_tests/test_gradient_lars.py | dl4fugaku/chainer | 34655eff5986522eae56f47fc82a8cc2b78e1617 | [
"MIT"
] | null | null | null | tests/chainer_tests/optimizer_hooks_tests/test_gradient_lars.py | dl4fugaku/chainer | 34655eff5986522eae56f47fc82a8cc2b78e1617 | [
"MIT"
] | null | null | null | from chainer import testing
_backend_params = [
# NumPy
{},
{'use_ideep': 'always'},
# CuPy
{'use_cuda': True, 'cuda_device': 0},
{'use_cuda': True, 'cuda_device': 1},
# ChainerX
{'use_chainerx': True, 'chainerx_device': 'native:0'},
{'use_chainerx': True, 'chainerx_device': 'cuda:... | 33.495495 | 76 | 0.581495 | import unittest
import numpy as np
import chainer
from chainer import optimizer_hooks
from chainer import optimizers
from chainer import testing
_backend_params = [
# NumPy
{},
{'use_ideep': 'always'},
# CuPy
{'use_cuda': True, 'cuda_device': 0},
{'use_cuda': True, 'cuda_device': 1},
# C... | 0 | 2,915 | 0 | 211 | 0 | 0 | 0 | 7 | 158 |
1a152613f1c9b3bff272bfa88b986f63186e0426 | 680 | py | Python | backend/src/restaurants/api/urls.py | devmaturi/restaurant_finder | 31b737e705806080375d8ae7746ee294ecf7da26 | [
"MIT"
] | null | null | null | backend/src/restaurants/api/urls.py | devmaturi/restaurant_finder | 31b737e705806080375d8ae7746ee294ecf7da26 | [
"MIT"
] | null | null | null | backend/src/restaurants/api/urls.py | devmaturi/restaurant_finder | 31b737e705806080375d8ae7746ee294ecf7da26 | [
"MIT"
] | null | null | null | from restaurants.api.views import RestaurantViewSet
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register(r'', RestaurantViewSet, basename='restaurants')
urlpatterns = router.urls
# from django.urls import path
# from .views import ( RestaurantListView, RestaurantDetailView,
# Re... | 35.789474 | 68 | 0.744118 | from restaurants.api.views import RestaurantViewSet
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register(r'', RestaurantViewSet, basename='restaurants')
urlpatterns = router.urls
# from django.urls import path
# from .views import ( RestaurantListView, RestaurantDetailView,
# Re... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d871051ace426998e7242e30f556f967efa26c23 | 1,090 | py | Python | Sockets/SocketServ/SocketServ.py | evoicefire/playground | 86d8fad5917757c356b8f54e57cdb315c5a1036d | [
"MIT"
] | null | null | null | Sockets/SocketServ/SocketServ.py | evoicefire/playground | 86d8fad5917757c356b8f54e57cdb315c5a1036d | [
"MIT"
] | null | null | null | Sockets/SocketServ/SocketServ.py | evoicefire/playground | 86d8fad5917757c356b8f54e57cdb315c5a1036d | [
"MIT"
] | null | null | null | import socket
import sys
__author__ = 'Gus'
HOST = ''
PORT = 8889
p = 0
e = 0
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print('--Socket created--')
try:
s.bind((HOST, PORT))
except socket.error as msg:
print('Bind failed. Error Code : ' + str(msg[0]) + ' Message ' + msg[1])
sys.exit()
print(... | 20.961538 | 76 | 0.501835 | import socket
import sys
__author__ = 'Gus'
HOST = ''
PORT = 8889
p = 0
e = 0
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print('--Socket created--')
try:
s.bind((HOST, PORT))
except socket.error as msg:
print('Bind failed. Error Code : ' + str(msg[0]) + ' Message ' + msg[1])
sys.exit()
print(... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
86e7fa8f0d86380c6acc4c845c674a920302a313 | 5,417 | py | Python | kashgari/processors/base_processor.py | SunYanCN/Kashgari | f0892db08b2144fe93bb4de3914cd771e9a98d8e | [
"Apache-2.0"
] | 1 | 2020-04-15T11:41:29.000Z | 2020-04-15T11:41:29.000Z | kashgari/processors/base_processor.py | Amaz0ser/Kashgari | 9d72b7bc180336d3cfba94068e22af3dd56b8264 | [
"Apache-2.0"
] | null | null | null | kashgari/processors/base_processor.py | Amaz0ser/Kashgari | 9d72b7bc180336d3cfba94068e22af3dd56b8264 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# author: BrikerMan
# contact: eliyar917@gmail.com
# blog: https://eliyar.biz
# file: base_processor.py
# time: 2019-05-21 11:27
if __name__ == "__main__":
print("Hello world")
| 34.28481 | 95 | 0.572642 | # encoding: utf-8
# author: BrikerMan
# contact: eliyar917@gmail.com
# blog: https://eliyar.biz
# file: base_processor.py
# time: 2019-05-21 11:27
import collections
import logging
import operator
from typing import List, Optional, Union, Dict, Any
import numpy as np
from tensorflow.python.keras.preprocessing.seque... | 24 | 0 | 0 | 4,958 | 0 | 0 | 0 | 67 | 180 |
0ceebdf9d3bde890ba7f5356745ce15744d0659d | 2,717 | py | Python | services/dy-static-file-server/tests/integration/test_docker_image.py | odeimaiz/osparc-services | 1a572cc35c742889f39f9d0aae6ad82d1610d33e | [
"MIT"
] | null | null | null | services/dy-static-file-server/tests/integration/test_docker_image.py | odeimaiz/osparc-services | 1a572cc35c742889f39f9d0aae6ad82d1610d33e | [
"MIT"
] | null | null | null | services/dy-static-file-server/tests/integration/test_docker_image.py | odeimaiz/osparc-services | 1a572cc35c742889f39f9d0aae6ad82d1610d33e | [
"MIT"
] | null | null | null | # pylint:disable=unused-variable
# pylint:disable=unused-argument
# pylint:disable=redefined-outer-name
# HELPERS
# FIXTURES
# TESTS
| 31.229885 | 129 | 0.726537 | # pylint:disable=unused-variable
# pylint:disable=unused-argument
# pylint:disable=redefined-outer-name
import json
import shutil
import urllib.request
from pathlib import Path
from typing import Dict
import pytest
import docker
import jsonschema
import yaml
# HELPERS
def _download_url(url: str, file: Path):
#... | 0 | 537 | 0 | 0 | 0 | 1,743 | 0 | -43 | 337 |
db27575a4dedb67b2788e5baf45d5a75003ca35f | 1,172 | py | Python | setup.py | jni/h5cat | 98bf0ad301b65ee95f947b3fc764a1fc31ea73b7 | [
"MIT"
] | 11 | 2017-03-15T22:16:20.000Z | 2020-12-20T05:27:05.000Z | setup.py | jni/h5cat | 98bf0ad301b65ee95f947b3fc764a1fc31ea73b7 | [
"MIT"
] | 1 | 2018-10-02T09:40:39.000Z | 2018-10-05T04:28:06.000Z | setup.py | jni/h5cat | 98bf0ad301b65ee95f947b3fc764a1fc31ea73b7 | [
"MIT"
] | null | null | null | from setuptools import setup
descr = """h5cat: Quick preview of hdf5 files
Quickly check the contents of multiple hdf5 files. Usage:
`h5cat -h`
`h5cat path/to/hdffiles/*.h5`
Note: h5cat is no longer maintained. For similar functionality, see
h5glance at https://pypi.org/project/h5glance/#description
"""
DISTNAME ... | 26.636364 | 67 | 0.633106 | from setuptools import setup
descr = """h5cat: Quick preview of hdf5 files
Quickly check the contents of multiple hdf5 files. Usage:
`h5cat -h`
`h5cat path/to/hdffiles/*.h5`
Note: h5cat is no longer maintained. For similar functionality, see
h5glance at https://pypi.org/project/h5glance/#description
"""
DISTNAME ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6b8173f66801745c7fe6b93e230a6d0f560b3218 | 1,343 | py | Python | src/feecc_workbench/_db_utils.py | Multi-Agent-io/feecc-workbench-daemon | 87f0015fd6fc8e98dde3cde7825573b6c86c1e25 | [
"Apache-2.0"
] | null | null | null | src/feecc_workbench/_db_utils.py | Multi-Agent-io/feecc-workbench-daemon | 87f0015fd6fc8e98dde3cde7825573b6c86c1e25 | [
"Apache-2.0"
] | 1 | 2021-11-08T16:07:08.000Z | 2021-11-08T16:07:08.000Z | src/feecc_workbench/_db_utils.py | Multi-Agent-io/feecc-workbench-daemon | 87f0015fd6fc8e98dde3cde7825573b6c86c1e25 | [
"Apache-2.0"
] | 2 | 2021-12-09T13:23:17.000Z | 2022-03-23T13:04:41.000Z | import sys
from loguru import logger
from motor.motor_asyncio import AsyncIOMotorClient
def _get_database_client(mongo_connection_uri: str) -> AsyncIOMotorClient:
"""Get MongoDB connection url"""
try:
db_client = AsyncIOMotorClient(mongo_connection_uri, serverSelectionTimeoutMS=10000)
db_clie... | 31.97619 | 106 | 0.676843 | import datetime as dt
import sys
import typing as tp
from loguru import logger
from motor.motor_asyncio import AsyncIOMotorClient
from .Unit import Unit
def _get_database_client(mongo_connection_uri: str) -> AsyncIOMotorClient:
"""Get MongoDB connection url"""
try:
db_client = AsyncIOMotorClient(mon... | 0 | 0 | 0 | 0 | 0 | 641 | 0 | -1 | 90 |
aa50f0672f8070eb71fc01f9ec83eb2495ef596a | 27,913 | py | Python | kits/python/dev/tests/test_agent.py | ppinchuk/Lux-Design-2021 | 8a04ad48c6749cafc9aca986f14e75daaa31c789 | [
"Apache-2.0"
] | null | null | null | kits/python/dev/tests/test_agent.py | ppinchuk/Lux-Design-2021 | 8a04ad48c6749cafc9aca986f14e75daaa31c789 | [
"Apache-2.0"
] | null | null | null | kits/python/dev/tests/test_agent.py | ppinchuk/Lux-Design-2021 | 8a04ad48c6749cafc9aca986f14e75daaa31c789 | [
"Apache-2.0"
] | null | null | null | import agent as agent
"""
[WARN] (match_NF4VsaRK1hf9) - Agent 0 sent malformed command: 'rp 0 0' <- research points (player id, num)
[WARN] (match_NF4VsaRK1hf9) - Agent 0 sent malformed command: 'rp 1 0'
[WARN] (match_NF4VsaRK1hf9) - Agent 0 sent malformed command: 'r coal 0 3 419' <- resource (type, x, y, amount)
... | 32.344148 | 164 | 0.513202 | import pytest
import sys
import agent as agent
import lux.game as g
import lux.game_objects as go
import lux.game_map as gm
import lux.constants as c
from collections import deque
"""
[WARN] (match_NF4VsaRK1hf9) - Agent 0 sent malformed command: 'rp 0 0' <- research points (player id, num)
[WARN] (match_NF4VsaRK1hf9)... | 0 | 25,868 | 0 | 8 | 0 | 0 | 0 | 4 | 652 |
621096e7d688e913ac0b40cc8fa82008f8dc4e01 | 2,304 | py | Python | mydata_a03.py | g-mitu/timeseries | 3b2daf33f9af022d1aae7c4a9caf69b8abd58348 | [
"BSD-3-Clause"
] | null | null | null | mydata_a03.py | g-mitu/timeseries | 3b2daf33f9af022d1aae7c4a9caf69b8abd58348 | [
"BSD-3-Clause"
] | null | null | null | mydata_a03.py | g-mitu/timeseries | 3b2daf33f9af022d1aae7c4a9caf69b8abd58348 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import pandas as pd
import matplotlib.pyplot as plt
program_begin = time()
# a=pd.DataFrame(pd.date_range("2022-2-14 0:0:02","2022-2-15 23:59:58",freq='2S'))
workdir = r"C:\Users\zyhly\Downloads\mydata"
df = pd.read_excel(f"{workdir}/a03_data.xlsx", index_col=None)
# datetime
date2 = pd.to_dat... | 36 | 89 | 0.683594 | import datetime
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from time import *
program_begin = time()
# a=pd.DataFrame(pd.date_range("2022-2-14 0:0:02","2022-2-15 23:59:58",freq='2S'))
workdir = r"C:\Users\zyhly\Downloads\mydata"
df = pd.read_excel(f"{workdir}/a03_data.xlsx", index_... | 330 | 0 | 0 | 0 | 0 | 0 | 0 | -6 | 46 |
c9b2dbf72c565bc1542f3e6d08c018c4e78c0cda | 103 | py | Python | nand_io/__init__.py | Noltari/nand-io | 23442ed57950360cd4104d77959bd3001170b333 | [
"MIT"
] | null | null | null | nand_io/__init__.py | Noltari/nand-io | 23442ed57950360cd4104d77959bd3001170b333 | [
"MIT"
] | null | null | null | nand_io/__init__.py | Noltari/nand-io | 23442ed57950360cd4104d77959bd3001170b333 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
"""NAND IO init."""
from .interface import NandIO
__all__ = ["NandIO"]
| 17.166667 | 30 | 0.699029 | # SPDX-License-Identifier: MIT
"""NAND IO init."""
from .interface import NandIO
__all__ = ["NandIO"]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
95d97919eee63e1b9918f1593a33f34ae3379e23 | 18,341 | py | Python | stanCode_Projects/my_drawing/my_drawing.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | stanCode_Projects/my_drawing/my_drawing.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | stanCode_Projects/my_drawing/my_drawing.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | """
File: Drawing
Name: Johnson
----------------------
TODO:
"""
if __name__ == '__main__':
main()
| 28.70266 | 80 | 0.635571 | """
File: Drawing
Name: Johnson
----------------------
TODO:
"""
from campy.graphics.gobjects import GOval, GRect, GPolygon
from campy.graphics.gwindow import GWindow
def main():
window = GWindow(width=1130, height=1000, title='Girl with a Pearl Earring')
background = GRect(1130, 1413)
background.filled... | 0 | 0 | 0 | 0 | 0 | 18,109 | 0 | 58 | 68 |
d39e71ce888078189411c4e7f6286a6a8096b59c | 3,577 | py | Python | webviz_config/webviz_factory_registry.py | antoneskov/webviz-config | ce8aa7b40bad5e724fd9b003283cc33a1c474a6c | [
"MIT"
] | null | null | null | webviz_config/webviz_factory_registry.py | antoneskov/webviz-config | ce8aa7b40bad5e724fd9b003283cc33a1c474a6c | [
"MIT"
] | null | null | null | webviz_config/webviz_factory_registry.py | antoneskov/webviz-config | ce8aa7b40bad5e724fd9b003283cc33a1c474a6c | [
"MIT"
] | null | null | null | from typing import TypeVar
from .webviz_factory import WebvizFactory
T = TypeVar("T", bound=WebvizFactory)
WEBVIZ_FACTORY_REGISTRY = WebvizFactoryRegistry()
| 38.462366 | 94 | 0.70534 | from typing import Any, Dict, Optional, Type, TypeVar
import warnings
from .webviz_factory import WebvizFactory
from .webviz_instance_info import WebvizInstanceInfo, WEBVIZ_INSTANCE_INFO
T = TypeVar("T", bound=WebvizFactory)
class WebvizFactoryRegistry:
"""Global registry for factories that allows the actual fa... | 0 | 511 | 0 | 2,763 | 0 | 0 | 0 | 74 | 67 |
e6a2d90f8fe61d65cbb547f64ae25d50e12059d5 | 6,729 | py | Python | transformer_train.py | phamduyhk/signate_student_cup_2020 | 19e158b08a86f2df8e4ee45445169ae396c91409 | [
"MIT"
] | null | null | null | transformer_train.py | phamduyhk/signate_student_cup_2020 | 19e158b08a86f2df8e4ee45445169ae396c91409 | [
"MIT"
] | null | null | null | transformer_train.py | phamduyhk/signate_student_cup_2020 | 19e158b08a86f2df8e4ee45445169ae396c91409 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Author: Pham Duy
Created date: 2020/08/05
"""
# coding: utf-8
import torch.nn as nn
import torch.optim as optim
from utils.EarlyStopping import EarlyStopping
from utils.dataloader import Preprocessing
preprocessing = Preprocessing()
es = EarlyStopping(patience=10)
sigmoid = nn.Sigmoid()
if _... | 31.890995 | 120 | 0.593104 | # coding: utf-8
"""
Author: Pham Duy
Created date: 2020/08/05
"""
# coding: utf-8
import numpy as np
import random
import torch
import torch.nn as nn
import torch.optim as optim
from sklearn.metrics import roc_auc_score, accuracy_score, f1_score
import torchtext
import pandas as pd
import datetime
import os
import sy... | 9 | 0 | 0 | 0 | 0 | 5,821 | 0 | 24 | 314 |
eea56c022f4a7d158e92d3208591a21db5b1df19 | 326 | py | Python | pdq/python/pdqhashing/types/exceptions.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 997 | 2015-03-13T18:04:03.000Z | 2022-03-30T12:09:10.000Z | pdq/python/pdqhashing/types/exceptions.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 444 | 2015-03-26T17:28:49.000Z | 2022-03-28T19:34:05.000Z | pdq/python/pdqhashing/types/exceptions.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 294 | 2015-03-13T22:19:43.000Z | 2022-03-30T08:42:45.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
| 40.75 | 70 | 0.763804 | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
class PDQHashFormatException(Exception):
def __init__(self, error_message, unacceptableInput=None) -> None:
super(PDQHashFormatException, self).__init__(error_message)
self._unacceptableInput = unacceptable... | 0 | 0 | 0 | 210 | 0 | 0 | 0 | 0 | 23 |
0cc2b8d1e2e48904a6802e7fd69a28af9c162b77 | 468 | py | Python | Lexicographical Numbers.py | sugia/leetcode | 6facec2a54d1d9f133f420c9bce1d1043f57ebc6 | [
"Apache-2.0"
] | null | null | null | Lexicographical Numbers.py | sugia/leetcode | 6facec2a54d1d9f133f420c9bce1d1043f57ebc6 | [
"Apache-2.0"
] | null | null | null | Lexicographical Numbers.py | sugia/leetcode | 6facec2a54d1d9f133f420c9bce1d1043f57ebc6 | [
"Apache-2.0"
] | null | null | null | '''
Given an integer n, return 1 - n in lexicographical order.
For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9].
Please optimize your algorithm to use less time and space. The input size may be as large as 5,000,000.
'''
| 26 | 104 | 0.58547 | '''
Given an integer n, return 1 - n in lexicographical order.
For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9].
Please optimize your algorithm to use less time and space. The input size may be as large as 5,000,000.
'''
class Solution(object):
def lexicalOrder(self, n):
"""
:type... | 0 | 0 | 0 | 206 | 0 | 0 | 0 | 0 | 23 |
3db8895c7bd1fb7862c3328d0e371202bd92039d | 1,720 | py | Python | neutron/tests/unit/objects/extensions/test_standardattributes.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/objects/extensions/test_standardattributes.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-27T00:48:55.000Z | 2015-04-21T05:29:37.000Z | neutron/tests/unit/objects/extensions/test_standardattributes.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-26T00:55:17.000Z | 2020-03-01T17:05:40.000Z | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 35.833333 | 78 | 0.75814 | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 0 | 271 | 0 | 449 | 0 | 0 | 0 | 151 | 248 |
6094e952a0271bf9ce85d30b95bb510c07927fcd | 1,997 | py | Python | tangos/properties/yt/basic.py | anchwr/tangos | a66740258e0987d90d921cd9c6f92658ce8375a8 | [
"BSD-3-Clause"
] | null | null | null | tangos/properties/yt/basic.py | anchwr/tangos | a66740258e0987d90d921cd9c6f92658ce8375a8 | [
"BSD-3-Clause"
] | 4 | 2021-08-14T19:28:36.000Z | 2021-11-27T04:43:01.000Z | tangos/properties/yt/basic.py | anchwr/tangos | a66740258e0987d90d921cd9c6f92658ce8375a8 | [
"BSD-3-Clause"
] | null | null | null | from .. import PropertyCalculation, LivePropertyCalculation
| 39.156863 | 110 | 0.64697 | from .. import PropertyCalculation, LivePropertyCalculation
import numpy as np
from tangos import get_halo
class FindCenter(PropertyCalculation):
names = "Center", "Center_cu"
def requires_property(self):
return ["X", "Y", "Z", "X_cu", "Y_cu", "Z_cu"]
def calculate(self, particle_data, existing_p... | 0 | 0 | 0 | 1,777 | 0 | 0 | 0 | 3 | 156 |
f0d37e204a5220a31dfe82a01ceae971839adf96 | 32,757 | py | Python | tests/st/ops/ascend/perf_benchmark/test_alexnet_all_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/ascend/perf_benchmark/test_alexnet_all_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/ascend/perf_benchmark/test_alexnet_all_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 63.729572 | 136 | 0.562475 | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 0 | 0 | 0 | 30,102 | 0 | 57 | 0 | 1,283 | 596 |
45b00b5a30e65a211d3af958899854a636b1088d | 805 | py | Python | artifacts/migrations/0013_auto_20201203_1112.py | Joe-Bentley/team_totem | 0458447619b1480027168d3b704c401ab7db1e0e | [
"Unlicense"
] | null | null | null | artifacts/migrations/0013_auto_20201203_1112.py | Joe-Bentley/team_totem | 0458447619b1480027168d3b704c401ab7db1e0e | [
"Unlicense"
] | 25 | 2020-11-30T14:32:43.000Z | 2020-12-04T10:35:58.000Z | artifacts/migrations/0013_auto_20201203_1112.py | Joe-Bentley/team_totem | 0458447619b1480027168d3b704c401ab7db1e0e | [
"Unlicense"
] | 2 | 2020-12-01T18:08:24.000Z | 2020-12-04T10:44:11.000Z | # Generated by Django 3.1.3 on 2020-12-03 11:12
| 27.758621 | 117 | 0.608696 | # Generated by Django 3.1.3 on 2020-12-03 11:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('artifacts', '0012_auto_20201201_1420'),
]
operations = [
migrations.RemoveField(
model_name='lo... | 0 | 0 | 0 | 658 | 0 | 0 | 0 | 30 | 68 |
87e1e00bba8e9feced9644dd23c8931b4a3025a9 | 2,705 | py | Python | factorio_status_ui/serve.py | adamcharnock/factorio-status-ui | 80fb4200d226b1037c61f4dd655462cb4acf6e16 | [
"MIT"
] | 7 | 2019-04-11T11:38:40.000Z | 2020-08-25T12:59:16.000Z | factorio_status_ui/serve.py | carsso/factorio-status-ui | bf184fdd7eea6494ecadff966535175a9df8a6ff | [
"MIT"
] | 1 | 2020-04-28T08:34:59.000Z | 2020-04-28T17:25:43.000Z | factorio_status_ui/serve.py | carsso/factorio-status-ui | bf184fdd7eea6494ecadff966535175a9df8a6ff | [
"MIT"
] | 1 | 2020-04-27T20:10:44.000Z | 2020-04-27T20:10:44.000Z |
if __name__ == '__main__':
main()
| 38.098592 | 117 | 0.712754 | import argparse
import logging
import signal
import sys
from pathlib import Path
from aiohttp import web
from factorio_status_ui.state import application_config
from factorio_status_ui.web import setup_routes, setup_templates, start_background_tasks, cleanup_background_tasks, \
get_version
def main():
print... | 0 | 0 | 0 | 0 | 0 | 2,344 | 0 | 119 | 201 |
c902e68cbf844338c9dd8d461f5075813e9543ef | 1,047 | py | Python | utils.py | tat-nlp/sart | 24d15d25ba29cb82320287fa7787ada5a8643771 | [
"CC-BY-4.0"
] | 2 | 2019-06-17T15:38:30.000Z | 2021-09-16T07:07:23.000Z | utils.py | tat-nlp/SART | 24d15d25ba29cb82320287fa7787ada5a8643771 | [
"CC-BY-4.0"
] | null | null | null | utils.py | tat-nlp/SART | 24d15d25ba29cb82320287fa7787ada5a8643771 | [
"CC-BY-4.0"
] | null | null | null |
# Read embeddings to a numpy array and word2id dictionary
# Normalize embeddings
# Read lines from .txt file into a list of lists of words
| 29.914286 | 86 | 0.595033 | import io
import numpy as np
# Read embeddings to a numpy array and word2id dictionary
def read_embeddings(emb_path):
words2ids = {}
vectors = None
# load pre-trained embeddings
with io.open(emb_path, 'r', encoding='utf-8', newline='\n', errors='ignore') as f:
for i, line in enumerate(f):
... | 0 | 0 | 0 | 0 | 0 | 807 | 0 | -15 | 110 |
79fd6ea6cf65fd3990bea9da8f17955107286294 | 3,241 | py | Python | dglt/contrib/grover/mol2features.py | uta-smile/CD-MVGNN | b48f4cd14befed298980a83edb417ab6809f0af6 | [
"MIT"
] | 3 | 2022-02-06T09:13:51.000Z | 2022-02-19T15:03:35.000Z | dglt/contrib/grover/mol2features.py | uta-smile/CD-MVGNN | b48f4cd14befed298980a83edb417ab6809f0af6 | [
"MIT"
] | 1 | 2022-02-14T23:16:27.000Z | 2022-02-14T23:16:27.000Z | dglt/contrib/grover/mol2features.py | uta-smile/CD-MVGNN | b48f4cd14befed298980a83edb417ab6809f0af6 | [
"MIT"
] | null | null | null | from collections import Counter
from typing import Callable, Union
import numpy as np
from rdkit import Chem
Molecule = Union[str, Chem.Mol]
FeaturesGenerator = Callable[[Molecule], np.ndarray]
RDKIT_PROPS = ['fr_Al_COO', 'fr_Al_OH', 'fr_Al_OH_noTert', 'fr_ArN',
'fr_Ar_COO', 'fr_Ar_N', 'fr_Ar_NH', 'fr_... | 44.39726 | 95 | 0.659673 | from collections import Counter
from typing import Callable, Union
import numpy as np
from rdkit import Chem
from dglt.data.featurization.mol2features import register_features_generator
from third_party.descriptastorus.descriptors import rdDescriptors
Molecule = Union[str, Chem.Mol]
FeaturesGenerator = Callable[[Mol... | 0 | 593 | 0 | 0 | 0 | 0 | 0 | 99 | 68 |
9b6b876677d434054b342ff5d8cddbadf3ed7456 | 185 | py | Python | dffml/util/config/fields.py | agriyakhetarpal/dffml | f76f2ce94c3972634053377b00e7c16530f7f0a4 | [
"MIT"
] | 171 | 2019-03-08T19:02:06.000Z | 2022-03-29T16:17:23.000Z | dffml/util/config/fields.py | agriyakhetarpal/dffml | f76f2ce94c3972634053377b00e7c16530f7f0a4 | [
"MIT"
] | 1,158 | 2019-03-08T19:07:50.000Z | 2022-03-25T08:28:27.000Z | dffml/util/config/fields.py | agriyakhetarpal/dffml | f76f2ce94c3972634053377b00e7c16530f7f0a4 | [
"MIT"
] | 183 | 2019-03-10T02:40:56.000Z | 2022-03-27T18:51:26.000Z | from ...source.source import Sources
from ...base import field
FIELD_SOURCES = field(
"Sources for loading and saving",
default_factory=lambda: Sources(),
labeled=True,
)
| 18.5 | 38 | 0.708108 | from ...source.source import Sources
from ...base import field
FIELD_SOURCES = field(
"Sources for loading and saving",
default_factory=lambda: Sources(),
labeled=True,
)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
812e36181c5e33bf18aa10f386c28ab03541752a | 1,437 | py | Python | utils/helper.py | zawlinnnaing/my-wiki-crawler | 68458dd7b5548edd0a4e088f9905b53406ff5a4f | [
"MIT"
] | null | null | null | utils/helper.py | zawlinnnaing/my-wiki-crawler | 68458dd7b5548edd0a4e088f9905b53406ff5a4f | [
"MIT"
] | null | null | null | utils/helper.py | zawlinnnaing/my-wiki-crawler | 68458dd7b5548edd0a4e088f9905b53406ff5a4f | [
"MIT"
] | null | null | null | from requests import get
from requests import RequestException
from contextlib import closing
import os
os.chdir(os.getcwd())
def simple_get(url):
"""
Attempts to get the content at `url` by making an HTTP GET request.
If the content-type of response is some kind of HTML/XML, return the
text content... | 26.127273 | 105 | 0.675713 | from requests import get
from requests import RequestException
from collections import OrderedDict
from contextlib import closing
import os
import logging
from .file import FileUtil
from datetime import date
import json
os.chdir(os.getcwd())
def request_api(url, params):
try:
with closing(get(url, params... | 0 | 0 | 0 | 0 | 0 | 369 | 0 | 6 | 156 |
be4bb0ec766c786bc8be57bd96e623364b9c8b8c | 2,196 | py | Python | profiling/ms_io/mzxml_io.py | wh-xu/falcon | f44f19b5cc49643ff20e3dfe40264f3e08a75f53 | [
"BSD-3-Clause"
] | null | null | null | profiling/ms_io/mzxml_io.py | wh-xu/falcon | f44f19b5cc49643ff20e3dfe40264f3e08a75f53 | [
"BSD-3-Clause"
] | null | null | null | profiling/ms_io/mzxml_io.py | wh-xu/falcon | f44f19b5cc49643ff20e3dfe40264f3e08a75f53 | [
"BSD-3-Clause"
] | null | null | null | import logging
from typing import Dict
import spectrum_utils.spectrum as sus
logger = logging.getLogger('falcon')
def _parse_spectrum(spectrum_dict: Dict) -> sus.MsmsSpectrum:
"""
Parse the Pyteomics cluster dict.
Parameters
----------
spectrum_dict : Dict
The Pyteomics cluster dict to... | 30.929577 | 79 | 0.617942 | import logging
import os
from typing import Dict, IO, Iterable, Union
import pyteomics.mzxml
import spectrum_utils.spectrum as sus
from lxml.etree import LxmlError
logger = logging.getLogger('falcon')
def get_spectra(source: Union[IO, str]) -> Iterable[sus.MsmsSpectrum]:
"""
Get the MS/MS spectra from the ... | 0 | 0 | 0 | 0 | 1,060 | 0 | 0 | 21 | 90 |
2bb34ac2db8359edf6ca8b20a92cb720faf5a20c | 6,236 | py | Python | forastudent/person/forum_view.py | rautNitesh/job_system | 6ea2cdde14c5147b7afb4d1d4aaf7d384486268c | [
"MIT"
] | 1 | 2020-10-13T03:46:22.000Z | 2020-10-13T03:46:22.000Z | forastudent/person/forum_view.py | rautNitesh/job_system | 6ea2cdde14c5147b7afb4d1d4aaf7d384486268c | [
"MIT"
] | 12 | 2021-03-30T14:08:41.000Z | 2022-03-12T00:42:30.000Z | forastudent/person/forum_view.py | rautNitesh/job_system | 6ea2cdde14c5147b7afb4d1d4aaf7d384486268c | [
"MIT"
] | 1 | 2020-07-07T10:26:54.000Z | 2020-07-07T10:26:54.000Z |
# self-customized Pagination attributes
# View for processing model Post
# View for processing model reply
# view for processing model topic
| 37.341317 | 129 | 0.707826 | from math import ceil
from django import http
from rest_framework.pagination import PageNumberPagination
from rest_framework.viewsets import ModelViewSet
from rest_framework.decorators import action
from person.models import Post, Reply, ForumCategory, Person
from person.serializers import PostSerializer, LogicalDele... | 0 | 4,352 | 0 | 1,274 | 0 | 0 | 0 | 217 | 244 |
7000a798809bded20344d85213ff9f9e4e52601b | 1,771 | py | Python | Structural/Flyweight/python/FlyWheight.py | Hkataya/design-patterns | cfdebd756a64ee682e90a707747ac4b973a27c55 | [
"CC0-1.0"
] | 294 | 2017-10-14T01:18:09.000Z | 2022-03-25T12:11:27.000Z | Structural/Flyweight/python/FlyWheight.py | dsfb/design-patterns | 7e8fd8157488777a97d33249782d8b751e80e5b5 | [
"CC0-1.0"
] | 68 | 2017-10-14T10:06:36.000Z | 2021-10-05T07:12:01.000Z | Structural/Flyweight/python/FlyWheight.py | dsfb/design-patterns | 7e8fd8157488777a97d33249782d8b751e80e5b5 | [
"CC0-1.0"
] | 329 | 2017-10-14T10:27:58.000Z | 2021-11-13T11:51:29.000Z |
if __name__ == "__main__":
main() | 26.833333 | 92 | 0.648221 | class FlyWheight():
def __init__(self, shared_state):
self.shared_state = shared_state
class Context():
def __init__(self, unique_state, flywheight: FlyWheight):
self.unique_state = unique_state
self.flywheight = flywheight
def __repr__(self):
return "unique: %s - shared... | 0 | 46 | 0 | 1,225 | 0 | 339 | 0 | 0 | 114 |
0eee2137f04fdd8f534a676c62eaf75ebe9af0a0 | 4,443 | py | Python | Python/_Movidius/Data.py | epicalyx/AML-Classifiers | 051d33a6e458ad04548f056a6a3048ecf47c5293 | [
"MIT"
] | 1 | 2019-08-21T15:12:29.000Z | 2019-08-21T15:12:29.000Z | Python/_Movidius/Data.py | epicalyx/AML-Classifiers | 051d33a6e458ad04548f056a6a3048ecf47c5293 | [
"MIT"
] | null | null | null | Python/_Movidius/Data.py | epicalyx/AML-Classifiers | 051d33a6e458ad04548f056a6a3048ecf47c5293 | [
"MIT"
] | 1 | 2019-08-31T17:20:51.000Z | 2019-08-31T17:20:51.000Z | ##################################################################################################
#
# The MIT License (MIT)
#
# Peter Moss Acute Myeloid Leukemia Research Project
# Copyright (C) 2018 Adam Milton-Barker (AdamMiltonBarker.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a... | 41.138889 | 102 | 0.574387 | ##################################################################################################
#
# The MIT License (MIT)
#
# Peter Moss Acute Myeloid Leukemia Research Project
# Copyright (C) 2018 Adam Milton-Barker (AdamMiltonBarker.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a... | 0 | 0 | 0 | 2,397 | 0 | 0 | 0 | 38 | 91 |
3fe5950b768aca8bc2bfe65c6bc3afa3e2e962a2 | 318 | py | Python | prac/app1/migrations/0002_remove_comment_item_name.py | 32-Adarsha/Shopping-Site-Django-Backend- | 013b6593f98f7d0565c047d46b74f3a22620af31 | [
"Unlicense"
] | 1 | 2021-12-10T16:16:56.000Z | 2021-12-10T16:16:56.000Z | prac/app1/migrations/0002_remove_comment_item_name.py | 32-Adarsha/Shopping-Site-Django-Backend- | 013b6593f98f7d0565c047d46b74f3a22620af31 | [
"Unlicense"
] | null | null | null | prac/app1/migrations/0002_remove_comment_item_name.py | 32-Adarsha/Shopping-Site-Django-Backend- | 013b6593f98f7d0565c047d46b74f3a22620af31 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2.8 on 2021-11-15 04:55
| 17.666667 | 47 | 0.578616 | # Generated by Django 3.2.8 on 2021-11-15 04:55
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app1', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='comment',
name='item_name',
),
]
| 0 | 0 | 0 | 212 | 0 | 0 | 0 | 11 | 46 |
feb9ced6fb55d2d8f9e10087092ee53d1de5ffd1 | 1,898 | py | Python | api/app/main/service/token_service.py | Stevencibambo/face-detection-based-web | 9e7d2d37977f242ef1ec8701ef61e8b79a64941b | [
"MIT"
] | null | null | null | api/app/main/service/token_service.py | Stevencibambo/face-detection-based-web | 9e7d2d37977f242ef1ec8701ef61e8b79a64941b | [
"MIT"
] | null | null | null | api/app/main/service/token_service.py | Stevencibambo/face-detection-based-web | 9e7d2d37977f242ef1ec8701ef61e8b79a64941b | [
"MIT"
] | null | null | null | # import the necessary package
from app.main.model.tokens import Token
def check_token(access_token):
"""check if the token is opened"""
token = Token.check_opened_token_by_token(access_token)
if token:
response_object = {
'status': 'successful',
'message': "token's state op... | 29.65625 | 65 | 0.530032 | # import the necessary package
from app.main import db
from app.main.service.user_service import get_a_user
from app.main.model.tokens import Token
from datetime import datetime
def save_token(token):
# token = Token(token=token)
try:
db.session.add(token)
db.session.commit()
except Except... | 0 | 0 | 0 | 0 | 0 | 1,140 | 0 | 41 | 113 |
f40d87a3418de3d5ebd83c246b98d27ee3ac24eb | 4,380 | py | Python | PYSEQM/seqm/seqm_functions/energy.py | roehr-lab/SFast-Singlet-Fission-adiabatic-basis-screening | dfda08400bb1328ce6cd45ac6b1dd3e7f9d7d4a6 | [
"MIT"
] | null | null | null | PYSEQM/seqm/seqm_functions/energy.py | roehr-lab/SFast-Singlet-Fission-adiabatic-basis-screening | dfda08400bb1328ce6cd45ac6b1dd3e7f9d7d4a6 | [
"MIT"
] | null | null | null | PYSEQM/seqm/seqm_functions/energy.py | roehr-lab/SFast-Singlet-Fission-adiabatic-basis-screening | dfda08400bb1328ce6cd45ac6b1dd3e7f9d7d4a6 | [
"MIT"
] | null | null | null | import torch
from .constants import a0
def elec_energy_isolated_atom(const, Z, uss, upp, gss, gpp, gsp, gp2, hsp):
"""
electrionc energy for a single atom
#eisol in block.f or in calpar.f
return Eiso, shape (natoms,)
"""
Eiso = uss*const.ussc[Z] \
+ upp*const.uppc[Z] \
+ gss... | 36.806723 | 98 | 0.61895 | import torch
from .constants import a0
def elec_energy_isolated_atom(const, Z, uss, upp, gss, gpp, gsp, gp2, hsp):
"""
electrionc energy for a single atom
#eisol in block.f or in calpar.f
return Eiso, shape (natoms,)
"""
Eiso = uss*const.ussc[Z] \
+ upp*const.uppc[Z] \
+ gss... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4224f26cc7a0ac2b792ba98188c1c53c1d78548e | 463 | py | Python | test/generate/autotest/66_67_XRL_A_Ri.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | test/generate/autotest/66_67_XRL_A_Ri.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | 20 | 2020-01-13T04:19:37.000Z | 2020-02-12T14:25:44.000Z | test/generate/autotest/66_67_XRL_A_Ri.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | #########################################################
# 2020-01-23 12:41:37
# AI
# ins: XRL A, @Ri
#########################################################
p = XRL_A_Ri().gen(0, 15, 1) | 23.15 | 57 | 0.455724 | #########################################################
# 2020-01-23 12:41:37
# AI
# ins: XRL A, @Ri
#########################################################
from .common.INS_XXX_A_Ri import XXX_A_Ri
from ..asmconst import *
class XRL_A_Ri(XXX_A_Ri):
def __init__(self):
super().__init__("XRL")
de... | 0 | 0 | 0 | 172 | 0 | 0 | 0 | 23 | 68 |
dbeec67ba9d7093ff775b134cff749dd0646925c | 13,350 | py | Python | tests/test_usecases.py | ajhynes7/datatest | 78742e98de992807286655f5685a2dc33a7b452e | [
"Apache-2.0"
] | 277 | 2016-05-12T13:22:49.000Z | 2022-03-11T00:18:32.000Z | tests/test_usecases.py | ajhynes7/datatest | 78742e98de992807286655f5685a2dc33a7b452e | [
"Apache-2.0"
] | 57 | 2016-05-18T01:03:32.000Z | 2022-02-17T13:48:43.000Z | tests/test_usecases.py | ajhynes7/datatest | 78742e98de992807286655f5685a2dc33a7b452e | [
"Apache-2.0"
] | 16 | 2016-05-22T11:35:19.000Z | 2021-12-01T19:41:42.000Z | # -*- coding: utf-8 -*-
"""A handful of integration tests to check for idiomatic use cases
that we want make sure are as convinient as possible for users.
"""
try:
import squint
except ImportError:
squint = None
try:
import pandas
except ImportError:
pandas = None
try:
import numpy
except ImportE... | 35.131579 | 83 | 0.597228 | # -*- coding: utf-8 -*-
"""A handful of integration tests to check for idiomatic use cases
that we want make sure are as convinient as possible for users.
"""
from . import _unittest as unittest
import math
import datetime
import datatest
try:
import squint
except ImportError:
squint = None
try:
import pa... | 0 | 4,946 | 0 | 7,686 | 0 | 0 | 0 | -8 | 249 |
c7101538571949bc2d9a16b432738d706b6d0506 | 968 | py | Python | test/test_day03.py | frangiz/AdventOfCode2018 | dffbc0a8467d3c31678d9719923c461b0b12d67f | [
"MIT"
] | null | null | null | test/test_day03.py | frangiz/AdventOfCode2018 | dffbc0a8467d3c31678d9719923c461b0b12d67f | [
"MIT"
] | null | null | null | test/test_day03.py | frangiz/AdventOfCode2018 | dffbc0a8467d3c31678d9719923c461b0b12d67f | [
"MIT"
] | null | null | null | """The tests for day03."""
| 31.225806 | 69 | 0.628099 | """The tests for day03."""
from days import day03
from ddt import ddt, data, unpack
import unittest
import helpers
@ddt
class MyTestCase(unittest.TestCase): # noqa D101
@data(
[['#1 @ 1,3: 4x4', '#2 @ 3,1: 4x4', '#3 @ 5,5: 2x2'], '4'])
@unpack
def test_example_a(self, test_input, expected): # noqa... | 0 | 829 | 0 | 0 | 0 | 0 | 0 | 0 | 111 |
67e483507c8bb1197e202652649ae79f6a212d7d | 11,767 | py | Python | skbio/util/_decorator.py | jairideout/scikit-bio | 81a1ce5acb434603c537f832caee64a76db19190 | [
"BSD-3-Clause"
] | null | null | null | skbio/util/_decorator.py | jairideout/scikit-bio | 81a1ce5acb434603c537f832caee64a76db19190 | [
"BSD-3-Clause"
] | null | null | null | skbio/util/_decorator.py | jairideout/scikit-bio | 81a1ce5acb434603c537f832caee64a76db19190 | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | 34.710914 | 79 | 0.624968 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | 0 | 0 | 0 | 9,846 | 0 | 473 | 0 | -1 | 231 |
3a62db4bd65765d304546ab9bbecde61034b3928 | 10,485 | py | Python | datablox_framework/datablox_framework/loader.py | mpi-sws-rse/datablox | 93af071e5f8a68dc83df1700ed657bd64aca8849 | [
"Apache-2.0"
] | null | null | null | datablox_framework/datablox_framework/loader.py | mpi-sws-rse/datablox | 93af071e5f8a68dc83df1700ed657bd64aca8849 | [
"Apache-2.0"
] | null | null | null | datablox_framework/datablox_framework/loader.py | mpi-sws-rse/datablox | 93af071e5f8a68dc83df1700ed657bd64aca8849 | [
"Apache-2.0"
] | null | null | null | """This is the command line interface to the master.
"""
import os
import os.path
import sys
from optparse import OptionParser
import logging
from logging.handlers import RotatingFileHandler
logger = logging.getLogger(__name__)
import defs
try:
import datablox_engage_adapter.file_locator
using_engage = True
except... | 40.797665 | 272 | 0.686218 | """This is the command line interface to the master.
"""
import os
import os.path
import sys
from optparse import OptionParser
import logging
from logging.handlers import RotatingFileHandler
logger = logging.getLogger(__name__)
from master import *
import defs
try:
import datablox_engage_adapter.file_locator
usin... | 0 | 0 | 0 | 0 | 0 | 8,437 | 0 | -1 | 91 |
75b153c2471d475e880de834fc7fd9faf3ad3d81 | 541 | py | Python | supplier_image_upload.py | martroben/Google-automation-with-Python-exam | 0e6c1144def8c06a01da6e1c63df492b3a383f50 | [
"MIT"
] | null | null | null | supplier_image_upload.py | martroben/Google-automation-with-Python-exam | 0e6c1144def8c06a01da6e1c63df492b3a383f50 | [
"MIT"
] | null | null | null | supplier_image_upload.py | martroben/Google-automation-with-Python-exam | 0e6c1144def8c06a01da6e1c63df492b3a383f50 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import re
import requests
# Inputs
images_dir = "/home/student/supplier-data/images/"
upload_url = "http://xxx.xxx.xxx.xxx/upload/"
# Get a list of paths of all .jpeg files in directory
file_list = os.listdir(images_dir)
jpeg_paths = [images_dir + item for item in file_list if bool(r... | 27.05 | 88 | 0.726433 | #!/usr/bin/env python3
import os
import re
import requests
# Inputs
images_dir = "/home/student/supplier-data/images/"
upload_url = "http://xxx.xxx.xxx.xxx/upload/"
# Get a list of paths of all .jpeg files in directory
file_list = os.listdir(images_dir)
jpeg_paths = [images_dir + item for item in file_list if bool(r... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
68c2f80d3dee75eb3408b80fb12d6266c87ba3a0 | 70 | py | Python | Configuration/Eras/python/Modifier_run3_RPC_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Configuration/Eras/python/Modifier_run3_RPC_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Configuration/Eras/python/Modifier_run3_RPC_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
run3_RPC = cms.Modifier()
| 14 | 40 | 0.771429 | import FWCore.ParameterSet.Config as cms
run3_RPC = cms.Modifier()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e830322abcfe2b89b4741f5180a64f7028796c88 | 6,997 | py | Python | cloudify_cli/tests/commands/test_uninstall.py | cloudify-cosmo/cloudify-cli | c6370012a25335f773ec0c449f46b526874c87fe | [
"Apache-2.0"
] | 41 | 2015-03-11T17:45:28.000Z | 2021-11-07T19:50:26.000Z | cloudify_cli/tests/commands/test_uninstall.py | cloudify-cosmo/cloudify-cli | c6370012a25335f773ec0c449f46b526874c87fe | [
"Apache-2.0"
] | 134 | 2015-01-04T20:51:41.000Z | 2022-03-29T10:13:25.000Z | cloudify_cli/tests/commands/test_uninstall.py | cloudify-cosmo/cloudify-cli | c6370012a25335f773ec0c449f46b526874c87fe | [
"Apache-2.0"
] | 61 | 2015-01-09T12:10:49.000Z | 2022-03-24T07:22:53.000Z |
from ... import local
| 37.218085 | 78 | 0.580106 | import os
from mock import patch
from cloudify_rest_client import deployments
from ... import local
from .test_base import CliCommandTest
from ...constants import DEFAULT_UNINSTALL_WORKFLOW, \
DEFAULT_TIMEOUT, DEFAULT_PARAMETERS
from .constants import BLUEPRINTS_DIR, DEFAULT_BLUEPRINT_FILE_NAME
class Uninstall... | 0 | 5,603 | 0 | 1,067 | 0 | 0 | 0 | 146 | 157 |
f41ea368edf3bae3763987ab2fcc2150623e0568 | 3,112 | py | Python | firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/gps_datalogging.py | freeglow/microcontroller-cpy | 5adfda49da6eefaece81be2a2f26122d68736355 | [
"MIT"
] | null | null | null | firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/gps_datalogging.py | freeglow/microcontroller-cpy | 5adfda49da6eefaece81be2a2f26122d68736355 | [
"MIT"
] | null | null | null | firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/gps_datalogging.py | freeglow/microcontroller-cpy | 5adfda49da6eefaece81be2a2f26122d68736355 | [
"MIT"
] | null | null | null | # Simple GPS datalogging demonstration.
# This example uses the GPS library and to read raw NMEA sentences
# over I2C or UART from the GPS unit and dumps them to a file on an SD card
# (recommended), microcontroller internal storage (be careful as only a few
# kilobytes are available), or to a filesystem.
# If you... | 44.457143 | 86 | 0.726864 | # Simple GPS datalogging demonstration.
# This example uses the GPS library and to read raw NMEA sentences
# over I2C or UART from the GPS unit and dumps them to a file on an SD card
# (recommended), microcontroller internal storage (be careful as only a few
# kilobytes are available), or to a filesystem.
# If you... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9a27497b26f4a836550b82849252fb5b4de17d7e | 6,405 | py | Python | app.py | tfausten/bokehwise | 7ffb10a757e4d93b74df3913c5b400165d4aff2b | [
"MIT"
] | null | null | null | app.py | tfausten/bokehwise | 7ffb10a757e4d93b74df3913c5b400165d4aff2b | [
"MIT"
] | null | null | null | app.py | tfausten/bokehwise | 7ffb10a757e4d93b74df3913c5b400165d4aff2b | [
"MIT"
] | null | null | null | import data_preparation
from bokeh.models import ColumnDataSource
from bokeh.io import curdoc
from bokeh.palettes import Category20c
from bokeh.models.widgets import (Panel, Tabs)
from bokeh.layouts import row
from bokeh.events import Tap
import itertools
def get_cycled_list(iterable, length):
""" returns cycled ... | 37.238372 | 78 | 0.704606 | import data_preparation
from bokeh.models import ColumnDataSource, BooleanFilter, CDSView
from bokeh.plotting import figure
from bokeh.io import curdoc
from bokeh.palettes import Category20c
from bokeh.models.formatters import NumeralTickFormatter
from bokeh.models.widgets import (
Panel, Tabs, DataTable, TableColu... | 0 | 0 | 0 | 0 | 0 | 1,753 | 0 | 114 | 112 |
a1f7bd879a15010325df7cd01a71db2a87d16e6f | 3,717 | py | Python | n_step.py | m4n4n-j/subway-surfers-AI-main | 5907754a1dee3cb9e395709834db93bcd2244536 | [
"MIT"
] | 2 | 2021-09-30T02:35:26.000Z | 2021-11-20T08:58:34.000Z | n_step.py | m4n4n-j/subway-surfers-AI-main | 5907754a1dee3cb9e395709834db93bcd2244536 | [
"MIT"
] | null | null | null | n_step.py | m4n4n-j/subway-surfers-AI-main | 5907754a1dee3cb9e395709834db93bcd2244536 | [
"MIT"
] | 2 | 2021-05-19T03:47:24.000Z | 2021-07-06T15:51:37.000Z | # Importing the libraries
from collections import namedtuple
#This step/experience includes the state of game, action performed, the reward for the state
# whether the game had ended after this state and the LSTM values
Step = namedtuple('Step', ['state', 'action', 'reward', 'done', 'lstm']) #This is a storage of one ... | 40.402174 | 153 | 0.554479 | # Importing the libraries
import matplotlib.pyplot as plt
import torch
from torch.autograd import Variable
import numpy as np
from collections import namedtuple, deque
#This step/experience includes the state of game, action performed, the reward for the state
# whether the game had ended after this state and the LSTM... | 0 | 0 | 0 | 3,238 | 0 | 0 | 0 | 19 | 111 |
6122b93d979e921a9799ec641b0843ae9a17bddc | 15,597 | py | Python | aoc/src/8.py | 1pkg/dump | 0ee579cb6a97ae64d5367cc624b2407d7d4b1c7b | [
"MIT"
] | null | null | null | aoc/src/8.py | 1pkg/dump | 0ee579cb6a97ae64d5367cc624b2407d7d4b1c7b | [
"MIT"
] | 3 | 2020-12-11T10:01:27.000Z | 2022-02-13T22:12:05.000Z | aoc/src/8.py | 1pkg/dump | 0ee579cb6a97ae64d5367cc624b2407d7d4b1c7b | [
"MIT"
] | null | null | null |
data = '22222120221222212222221122222222222222222222220222202222222222200222122222222222022220222220212222202022222202102022002212222222222022222220222222222222222120220222212222222222222222222222222222220222202222222222202222022222222222022221222221222222222022222222112122202202222222222222222221222222222222222020220... | 421.540541 | 15,009 | 0.984484 | def split(word):
return [int(char) for char in word]
data = '22222120221222212222221122222222222222222222220222202222222222200222122222222222022220222220212222202022222202102022002212222222222022222220222222222222222120220222212222222222222222222222222222220222202222222222202222022222222222022221222221222222222022222... | 0 | 0 | 0 | 0 | 0 | 32 | 0 | 0 | 22 |
84afb8ee0a1db12ea2f24da153608e4935cd8f4c | 1,924 | py | Python | cl_app/models.py | talley/craigslistpython | fbc6e9fc64a7bcaaded0d369259a338cf1c91194 | [
"MIT"
] | 22 | 2018-06-03T08:30:49.000Z | 2021-12-31T19:10:36.000Z | cl_app/models.py | talley/craigslistpython | fbc6e9fc64a7bcaaded0d369259a338cf1c91194 | [
"MIT"
] | 10 | 2019-02-19T13:08:47.000Z | 2022-03-11T23:15:44.000Z | cl_app/models.py | talley/craigslistpython | fbc6e9fc64a7bcaaded0d369259a338cf1c91194 | [
"MIT"
] | 20 | 2018-07-30T17:19:59.000Z | 2022-03-23T23:58:13.000Z |
# Create your models here.
| 27.884058 | 110 | 0.703222 | from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from rest_framework.authtoken.models import Token
# Create your models here.
class City(models.Model):
city = models.CharField(max_length=20)
def __str__(self):
return self.city
class Pr... | 0 | 504 | 0 | 1,086 | 0 | 0 | 0 | 75 | 225 |
1e722a1d7391c3f290ab84597dac0ae35ca009d8 | 117,805 | py | Python | openapi_netdisco/api/reports_api.py | mksoska/openapi-client-netdisco | d6444505307e4897a9fef1ded60a180eb764d4b8 | [
"MIT"
] | null | null | null | openapi_netdisco/api/reports_api.py | mksoska/openapi-client-netdisco | d6444505307e4897a9fef1ded60a180eb764d4b8 | [
"MIT"
] | null | null | null | openapi_netdisco/api/reports_api.py | mksoska/openapi-client-netdisco | d6444505307e4897a9fef1ded60a180eb764d4b8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
App::Netdisco
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 2.050003
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
# python ... | 42.698441 | 124 | 0.594796 | # coding: utf-8
"""
App::Netdisco
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 2.050003
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re... | 0 | 0 | 0 | 117,243 | 0 | 0 | 0 | 77 | 127 |
ceb54fb28a4ee266bcaafabf6b90e122e97a5575 | 2,319 | py | Python | st2common/st2common/constants/meta.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 4,920 | 2015-01-01T15:12:17.000Z | 2022-03-31T19:31:15.000Z | st2common/st2common/constants/meta.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 3,563 | 2015-01-05T19:02:19.000Z | 2022-03-31T19:23:09.000Z | st2common/st2common/constants/meta.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 774 | 2015-01-01T20:41:24.000Z | 2022-03-31T13:25:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | 37.403226 | 97 | 0.749461 | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | 0 | 0 | 0 | 0 | 0 | 132 | 0 | 38 | 120 |
ab103eb0478ae2e88967e12bbd8ec3c12d4d930c | 2,531 | py | Python | parserg/lexer.py | teddynecsoiu/parserg | 15d8409efaadd2d39e2a10ec478a4df9dbaa9b40 | [
"MIT"
] | null | null | null | parserg/lexer.py | teddynecsoiu/parserg | 15d8409efaadd2d39e2a10ec478a4df9dbaa9b40 | [
"MIT"
] | null | null | null | parserg/lexer.py | teddynecsoiu/parserg | 15d8409efaadd2d39e2a10ec478a4df9dbaa9b40 | [
"MIT"
] | null | null | null |
JSON_QUOTE = '"'
JSON_WHITESPACE = [' ', '\t', '\b', '\n', '\r']
JSON_SYNTAX = [JSON_COMMA, JSON_COLON, JSON_LEFTBRACKET, JSON_RIGHTBRACKET,
JSON_LEFTBRACE, JSON_RIGHTBRACE]
FALSE_LEN = len('false')
TRUE_LEN = len('true')
NULL_LEN = len('null')
| 23.220183 | 75 | 0.583564 | from .constants import *
JSON_QUOTE = '"'
JSON_WHITESPACE = [' ', '\t', '\b', '\n', '\r']
JSON_SYNTAX = [JSON_COMMA, JSON_COLON, JSON_LEFTBRACKET, JSON_RIGHTBRACKET,
JSON_LEFTBRACE, JSON_RIGHTBRACE]
FALSE_LEN = len('false')
TRUE_LEN = len('true')
NULL_LEN = len('null')
def lex_string(string):
json... | 0 | 0 | 0 | 0 | 0 | 2,126 | 0 | 3 | 137 |
8281b73e609e9dd3e292e156482a6cf9a7ef9667 | 202 | py | Python | Getting_Started_With_Raspberry_Pi_Pico/data_logger_no_ground_wire_boot/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 665 | 2017-09-27T21:20:14.000Z | 2022-03-31T09:09:25.000Z | Getting_Started_With_Raspberry_Pi_Pico/data_logger_no_ground_wire_boot/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 641 | 2017-10-03T19:46:37.000Z | 2022-03-30T18:28:46.000Z | Getting_Started_With_Raspberry_Pi_Pico/data_logger_no_ground_wire_boot/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 734 | 2017-10-02T22:47:38.000Z | 2022-03-30T14:03:51.000Z | """
boot.py file for Pico data logging example. If this file is present when
the pico starts up, make the filesystem writeable by CircuitPython.
"""
import storage
storage.remount("/", readonly=False)
| 25.25 | 72 | 0.762376 | """
boot.py file for Pico data logging example. If this file is present when
the pico starts up, make the filesystem writeable by CircuitPython.
"""
import storage
storage.remount("/", readonly=False)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
736cc4a08b4adca06311b8ad6d9e03beccd10663 | 21,253 | py | Python | athenet/tests/test_derivative.py | heurezjusz/Athena | 0bdda97b0e06dbb3c1699d4ed7875e4adc96d580 | [
"BSD-2-Clause"
] | 2 | 2016-02-02T12:59:39.000Z | 2018-03-29T17:17:11.000Z | athenet/tests/test_derivative.py | heurezjusz/Athenet | 0bdda97b0e06dbb3c1699d4ed7875e4adc96d580 | [
"BSD-2-Clause"
] | 5 | 2016-01-10T23:23:57.000Z | 2016-03-26T16:29:42.000Z | athenet/tests/test_derivative.py | heurezjusz/Athena | 0bdda97b0e06dbb3c1699d4ed7875e4adc96d580 | [
"BSD-2-Clause"
] | 1 | 2020-02-26T20:19:17.000Z | 2020-02-26T20:19:17.000Z | """Testing athenet.algorithm.derest.derivative functions.
"""
import theano
import unittest
theano.config.exception_verbosity = 'high'
if __name__ == '__main__':
unittest.main(verbosity=2, catchbreak=True)
| 38.99633 | 78 | 0.399802 | """Testing athenet.algorithm.derest.derivative functions.
"""
import numpy as np
import theano
import unittest
from athenet.algorithm.derest.layers.fully_connected import d_fully_connected
from athenet.algorithm.derest.layers.convolutional import d_conv
from athenet.algorithm.derest.layers.pool import d_pool
from ath... | 0 | 0 | 0 | 19,810 | 0 | 288 | 0 | 360 | 568 |
bfaf6e7cdef5ef47cf258822d993d21d3a5b5cdf | 9,317 | py | Python | pynuodb/cursor.py | madscientist/nuodb-python | 93dc174afada40f56f3e2ddded6b9f473b7ae553 | [
"BSD-3-Clause"
] | null | null | null | pynuodb/cursor.py | madscientist/nuodb-python | 93dc174afada40f56f3e2ddded6b9f473b7ae553 | [
"BSD-3-Clause"
] | null | null | null | pynuodb/cursor.py | madscientist/nuodb-python | 93dc174afada40f56f3e2ddded6b9f473b7ae553 | [
"BSD-3-Clause"
] | null | null | null | """A module for housing the Cursor class.
Exported Classes:
Cursor -- Class for representing a database cursor.
"""
| 32.127586 | 100 | 0.625631 | """A module for housing the Cursor class.
Exported Classes:
Cursor -- Class for representing a database cursor.
"""
from collections import deque
from .statement import Statement, PreparedStatement
from .exception import Error, NotSupportedError, ProgrammingError
class Cursor(object):
"""Class for represent... | 0 | 84 | 0 | 8,915 | 0 | 0 | 0 | 82 | 114 |
fe701f3001d6852bba8289651be46f88091b413c | 115 | py | Python | grapherty/properties/__init__.py | Mautriz/grapherty | 5aae4fb13b0b0cb715911373e5cfb2d75bddc2c6 | [
"MIT"
] | null | null | null | grapherty/properties/__init__.py | Mautriz/grapherty | 5aae4fb13b0b0cb715911373e5cfb2d75bddc2c6 | [
"MIT"
] | null | null | null | grapherty/properties/__init__.py | Mautriz/grapherty | 5aae4fb13b0b0cb715911373e5cfb2d75bddc2c6 | [
"MIT"
] | null | null | null |
properties = [PropertyOne, PropertyTwo, PropertyThree]
| 19.166667 | 54 | 0.747826 | from .one import *
from .two import *
from .three import *
properties = [PropertyOne, PropertyTwo, PropertyThree]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -7 | 66 |
d20fe013cd627b92dda27ee894bcdae87d098d82 | 1,318 | py | Python | src/modules/tests/testQnetwork.py | sankhaMukherjee/RLalgos | 80d19a39af29947db2fc73b0443b9c3bb66d6fc0 | [
"MIT"
] | null | null | null | src/modules/tests/testQnetwork.py | sankhaMukherjee/RLalgos | 80d19a39af29947db2fc73b0443b9c3bb66d6fc0 | [
"MIT"
] | 25 | 2019-03-30T00:31:07.000Z | 2022-03-11T23:38:34.000Z | src/modules/tests/testQnetwork.py | sankhaMukherjee/RLalgos | 80d19a39af29947db2fc73b0443b9c3bb66d6fc0 | [
"MIT"
] | null | null | null | import json
import torch
from lib.agents import qNetwork as qN
config = json.load(open('../config/config.json'))
logBase = config['logging']['logBase'] + '.modules.tests.testPolicy'
| 24.407407 | 97 | 0.562974 | from logs import logDecorator as lD
import json
import numpy as np
import torch
from torch.nn import functional as F
from lib.agents import qNetwork as qN
import torch
config = json.load(open('../config/config.json'))
logBase = config['logging']['logBase'] + '.modules.tests.testPolicy'
@lD.log( logBase + '.testA... | 0 | 978 | 0 | 0 | 0 | 0 | 0 | 17 | 135 |
f7a0c034abe6bcbd6d0f2ab7346d69d8e7c9cbde | 7,321 | py | Python | games/world_gen_output.py | wnormandin/resources | 43be223b0c66e944985357a6d23891b551ac2937 | [
"MIT"
] | null | null | null | games/world_gen_output.py | wnormandin/resources | 43be223b0c66e944985357a6d23891b551ac2937 | [
"MIT"
] | null | null | null | games/world_gen_output.py | wnormandin/resources | 43be223b0c66e944985357a6d23891b551ac2937 | [
"MIT"
] | null | null | null | map_template = (
(
(0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,0... | 87.154762 | 96 | 0.462642 | map_template = (
(
(0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,0... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d02428ca36b49bbfb13c2f3c47cecf62c9b9d042 | 211 | py | Python | networkx/algorithms/connectivity/__init__.py | tempcyc/networkx | cae83ba501c242567cb2454f97f851898276f06e | [
"BSD-3-Clause"
] | 1 | 2015-07-16T01:36:44.000Z | 2015-07-16T01:36:44.000Z | networkx/algorithms/connectivity/__init__.py | tempcyc/networkx | cae83ba501c242567cb2454f97f851898276f06e | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/connectivity/__init__.py | tempcyc/networkx | cae83ba501c242567cb2454f97f851898276f06e | [
"BSD-3-Clause"
] | null | null | null | """Connectivity and cut algorithms
"""
| 35.166667 | 59 | 0.834123 | """Connectivity and cut algorithms
"""
from networkx.algorithms.connectivity.connectivity import *
from networkx.algorithms.connectivity.cuts import *
from networkx.algorithms.connectivity.stoer_wagner import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 66 |
5f5c3304c166f2a61c8883dc9a55e972b6432a91 | 1,151 | py | Python | src/io_gateway/pinata.py | nakata5321/feecc-io-gateway | a7a70c3b7239142e7ee1b846916d28961020b1a9 | [
"Apache-2.0"
] | null | null | null | src/io_gateway/pinata.py | nakata5321/feecc-io-gateway | a7a70c3b7239142e7ee1b846916d28961020b1a9 | [
"Apache-2.0"
] | 2 | 2021-11-27T09:31:12.000Z | 2022-03-23T13:15:57.000Z | src/io_gateway/pinata.py | nakata5321/feecc-io-gateway | a7a70c3b7239142e7ee1b846916d28961020b1a9 | [
"Apache-2.0"
] | 2 | 2021-12-09T13:50:51.000Z | 2022-03-23T12:39:38.000Z | from __future__ import annotations
from ..shared.config import config
PINATA_ENDPOINT: str = "https://api.pinata.cloud"
PINATA_API: str = config.pinata.pinata_api
PINATA_SECRET_API: str = config.pinata.pinata_secret_api
AUTH_HEADERS = {
"pinata_api_key": PINATA_API,
"pinata_secret_api_key": PINATA_SECRET_API,... | 31.108108 | 97 | 0.724587 | from __future__ import annotations
import os
import typing as tp
from time import time
import httpx
from loguru import logger
from ..shared.config import config
PINATA_ENDPOINT: str = "https://api.pinata.cloud"
PINATA_API: str = config.pinata.pinata_api
PINATA_SECRET_API: str = config.pinata.pinata_secret_api
AUTH_... | 0 | 711 | 0 | 0 | 0 | 0 | 0 | -19 | 135 |
e508928aef3dd5fedee7d857f487400676619dd7 | 3,270 | py | Python | wikidataintegrator/ref_handlers/update_retrieved_if_new_multiple_refs.py | tentwentyfour/WikidataIntegrator | a035d585ade4b0aa7a2b6126f14f2c5a828f6c49 | [
"MIT"
] | 193 | 2017-01-16T14:19:40.000Z | 2022-03-13T18:44:18.000Z | wikidataintegrator/ref_handlers/update_retrieved_if_new_multiple_refs.py | tentwentyfour/WikidataIntegrator | a035d585ade4b0aa7a2b6126f14f2c5a828f6c49 | [
"MIT"
] | 140 | 2017-01-17T20:20:29.000Z | 2022-03-21T11:17:11.000Z | wikidataintegrator/ref_handlers/update_retrieved_if_new_multiple_refs.py | tentwentyfour/WikidataIntegrator | a035d585ade4b0aa7a2b6126f14f2c5a828f6c49 | [
"MIT"
] | 53 | 2016-12-30T11:24:20.000Z | 2022-03-16T20:46:07.000Z | ####
# custom ref handler
# If the newref is the same as the oldref except the retrieved date is `days` newer, overwrite
# the retrieved date is NOT `days` newer, keep the old ref
# If the refs are different (in any other way), overwrite with new ref
#
####
from datetime i... | 45.416667 | 124 | 0.622018 | ####
# custom ref handler
# If the newref is the same as the oldref except the retrieved date is `days` newer, overwrite
# the retrieved date is NOT `days` newer, keep the old ref
# If the refs are different (in any other way), overwrite with new ref
#
####
from datetime i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b1ad856ad595461a20d1c8a1de08459807527696 | 14,130 | py | Python | maad/util/wav2dBSPL.py | jflatorreg/scikit-maad | f7c4ac1370dcf416b7014f94784d71549623593f | [
"BSD-3-Clause"
] | 3 | 2021-04-17T21:13:57.000Z | 2021-04-25T00:55:18.000Z | maad/util/wav2dBSPL.py | jflatorreg/scikit-maad | f7c4ac1370dcf416b7014f94784d71549623593f | [
"BSD-3-Clause"
] | null | null | null | maad/util/wav2dBSPL.py | jflatorreg/scikit-maad | f7c4ac1370dcf416b7014f94784d71549623593f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" SPL conversion functions for scikit-maad
Collection of miscelaneous functions that help to convert wav and volt data
to Sound Pressure Level (SPL in Pascal) and Leq (Continuous Equivalent SPL)
"""
#
# Authors: Juan Sebastian ULLOA <lisofomia@gmail.com>
# ... | 33.169014 | 160 | 0.601628 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" SPL conversion functions for scikit-maad
Collection of miscelaneous functions that help to convert wav and volt data
to Sound Pressure Level (SPL in Pascal) and Leq (Continuous Equivalent SPL)
"""
#
# Authors: Juan Sebastian ULLOA <lisofomia@gmail.com>
# ... | 16 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0 |
87a9aef30724ffb204884ea7b3f846805e2a937f | 27,197 | py | Python | pysnmp-with-texts/UMSAOL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/UMSAOL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/UMSAOL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module UMSAOL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/UMSAOL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:28:38 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:... | 125.912037 | 3,583 | 0.829466 | #
# PySNMP MIB module UMSAOL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/UMSAOL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:28:38 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f41f2662e4f40fdad1c2ec61ff8cf3d68cf63e8c | 2,945 | py | Python | tensorflow/python/client/pywrap_tf_session.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 78 | 2020-08-04T12:36:25.000Z | 2022-03-25T04:23:40.000Z | tensorflow/python/client/pywrap_tf_session.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 1,056 | 2019-12-15T01:20:31.000Z | 2022-02-10T02:06:28.000Z | tensorflow/python/client/pywrap_tf_session.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 66 | 2020-05-15T10:05:12.000Z | 2022-02-14T07:28:18.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.478873 | 100 | 0.782683 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 0 | 0 | 0 | 0 | 0 | 490 | 0 | 186 | 154 |
959b3db8a6a7d05b7f3378dbae164f774574b9f1 | 1,956 | py | Python | monarch.py | michaelduong/monarch-apt-scraper | 2bf36af7ab4c26b661d96cfedb0c49239e601ddc | [
"MIT"
] | null | null | null | monarch.py | michaelduong/monarch-apt-scraper | 2bf36af7ab4c26b661d96cfedb0c49239e601ddc | [
"MIT"
] | null | null | null | monarch.py | michaelduong/monarch-apt-scraper | 2bf36af7ab4c26b661d96cfedb0c49239e601ddc | [
"MIT"
] | null | null | null | # Monarch Apartment Price Scraper
# Monarch.py
# Checks Monarch apartment webpages every hour to see if the prices have changed
import time
# time between checks in seconds
sleeptime = 3600
# generic network request function that returns an array of prices
last_A4_Prices = None
last_A1D_Prices = None
currentA4Pric... | 33.152542 | 152 | 0.699898 | # Monarch Apartment Price Scraper
# Monarch.py
# Checks Monarch apartment webpages every hour to see if the prices have changed
import bs4
import requests
import smtplib
import time
# time between checks in seconds
sleeptime = 3600
# generic network request function that returns an array of prices
def getPrices(flo... | 0 | 0 | 0 | 0 | 0 | 980 | 0 | -24 | 112 |
573d32a608f13f8d64effc820ea56127067e7930 | 1,559 | py | Python | esmvalcore/cmor/_fixes/cmip5/ccsm4.py | jvegreg/ESMValCore | 03eb1c942bf1dc3be98cb30c3592b42e82a94f16 | [
"Apache-2.0"
] | 26 | 2019-06-07T07:50:07.000Z | 2022-03-22T21:04:01.000Z | esmvalcore/cmor/_fixes/cmip5/ccsm4.py | jvegreg/ESMValCore | 03eb1c942bf1dc3be98cb30c3592b42e82a94f16 | [
"Apache-2.0"
] | 1,370 | 2019-06-06T09:03:07.000Z | 2022-03-31T04:37:20.000Z | esmvalcore/cmor/_fixes/cmip5/ccsm4.py | valeriupredoi/ESMValCore | b46b948c47d8579d997b28501f8588f5531aa354 | [
"Apache-2.0"
] | 26 | 2019-07-03T13:08:48.000Z | 2022-03-02T16:08:47.000Z | """Fixes for CCSM4 model."""
from .bnu_esm import Cl as BaseCl
Cl = BaseCl
Cveg = Csoil
Gpp = Csoil
| 19.4875 | 78 | 0.552919 | """Fixes for CCSM4 model."""
import dask.array as da
from ..fix import Fix
from ..shared import round_coordinates
from .bnu_esm import Cl as BaseCl
Cl = BaseCl
class Csoil(Fix):
"""Fixes for Csoil."""
def fix_data(self, cube):
"""Fix data.
The data is not properly masked.
This fix... | 0 | 0 | 0 | 1,296 | 0 | 0 | 0 | 19 | 137 |
f7f7b1147798ce46ece79acebd6afb2506af7e3b | 4,106 | py | Python | snakescale/formatters.py | clintval/snakeskin | 0d282ae8331756ca5b93ffe7146af1ba6491d579 | [
"MIT"
] | 6 | 2018-01-24T04:40:45.000Z | 2018-08-10T18:03:35.000Z | snakescale/formatters.py | clintval/snakeskin | 0d282ae8331756ca5b93ffe7146af1ba6491d579 | [
"MIT"
] | 9 | 2018-12-27T18:13:15.000Z | 2019-01-01T23:06:22.000Z | snakescale/formatters.py | clintval/snakeskin | 0d282ae8331756ca5b93ffe7146af1ba6491d579 | [
"MIT"
] | null | null | null | from types import GeneratorType
from typing import List, Mapping, Union
__all__ = [
'clean_picard_style_value',
'snakecase_to_kebab_case',
'clean_picard_style_key',
'format_bedtools_params',
'format_bwa_params',
'format_dwgsim_params',
'format_fgbio_params',
'format_kraken_params',
... | 27.013158 | 84 | 0.595226 | from types import GeneratorType
from typing import List, Mapping, Union
__all__ = [
'clean_picard_style_value',
'snakecase_to_kebab_case',
'clean_picard_style_key',
'format_bedtools_params',
'format_bwa_params',
'format_dwgsim_params',
'format_fgbio_params',
'format_kraken_params',
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
49336efae7ad8ab0ed8d9f0b0ab614569ef39185 | 3,883 | py | Python | dot_weechat/python/unhighlight.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | 68 | 2016-09-28T12:51:20.000Z | 2022-02-25T15:33:16.000Z | dot_weechat/python/unhighlight.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | null | null | null | dot_weechat/python/unhighlight.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | 2 | 2016-09-28T12:51:28.000Z | 2022-01-11T10:26:44.000Z | #
# Copyright (C) 2016 Andrew Rodgers-Schatz <me@andrew.rs>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This p... | 35.3 | 153 | 0.733969 | #
# Copyright (C) 2016 Andrew Rodgers-Schatz <me@andrew.rs>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This p... | 0 | 0 | 0 | 0 | 0 | 1,459 | 0 | -22 | 114 |
5dbc29abd552c7f1afbb42cf9ea7e8338b005f16 | 9,759 | py | Python | src/utils/myutils.py | haxhimitsu/dl_classification | 0de59faedb18dd944f341af4fd37028639831d54 | [
"MIT"
] | null | null | null | src/utils/myutils.py | haxhimitsu/dl_classification | 0de59faedb18dd944f341af4fd37028639831d54 | [
"MIT"
] | null | null | null | src/utils/myutils.py | haxhimitsu/dl_classification | 0de59faedb18dd944f341af4fd37028639831d54 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: UTF-8
#---------------------------------------------------------------
# author:"Haxhimitsu"
# date :"2021/01/06"
# cite :
# sample:python3 imgtrim_gui_ver.2.0.py --input_dir ../assets/original_img/cbn_test_01/ --output_dir ../assets/sample_output/ --trim_width 32 --trim_height 64
... | 38.121094 | 160 | 0.565119 | #!/usr/bin/env python3
# coding: UTF-8
#---------------------------------------------------------------
# author:"Haxhimitsu"
# date :"2021/01/06"
# cite :
# sample:python3 imgtrim_gui_ver.2.0.py --input_dir ../assets/original_img/cbn_test_01/ --output_dir ../assets/sample_output/ --trim_width 32 --trim_height 64
... | 1,074 | 0 | 0 | 8,412 | 0 | 0 | 0 | 163 | 200 |
fc29640972c3d6c009959460f4b241cb149acfc7 | 2,735 | py | Python | src/ndn/bin/sec/cmd_new_item.py | tianyuan129/python-ndn | f390b3122d2a233a9a22a1ee9468b1241c46ef86 | [
"Apache-2.0"
] | 5 | 2019-10-03T01:26:43.000Z | 2020-07-07T15:21:52.000Z | src/ndn/bin/sec/cmd_new_item.py | tianyuan129/python-ndn | f390b3122d2a233a9a22a1ee9468b1241c46ef86 | [
"Apache-2.0"
] | 12 | 2019-10-28T03:17:16.000Z | 2020-08-26T22:10:52.000Z | src/ndn/bin/sec/cmd_new_item.py | tianyuan129/python-ndn | f390b3122d2a233a9a22a1ee9468b1241c46ef86 | [
"Apache-2.0"
] | 10 | 2019-10-18T21:16:43.000Z | 2021-06-24T07:26:22.000Z | # -----------------------------------------------------------------------------
# Copyright (C) 2019-2021 The python-ndn authors
#
# This file is part of python-ndn.
#
# 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 ... | 40.820896 | 99 | 0.595978 | # -----------------------------------------------------------------------------
# Copyright (C) 2019-2021 The python-ndn authors
#
# This file is part of python-ndn.
#
# 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 ... | 0 | 0 | 0 | 0 | 0 | 1,798 | 0 | 31 | 112 |
4b1b7c995699f7c87327dc61ab60c9ce63683dd7 | 748 | py | Python | tests/settings.py | vincenz-e/django-paydirekt | eda3b23c27f0a5a78d5a2a91e4083dab75f2f01f | [
"MIT"
] | 4 | 2017-04-19T15:01:24.000Z | 2021-08-23T07:26:18.000Z | tests/settings.py | vincenz-e/django-paydirekt | eda3b23c27f0a5a78d5a2a91e4083dab75f2f01f | [
"MIT"
] | 2 | 2019-04-03T13:44:51.000Z | 2019-07-22T10:19:06.000Z | tests/settings.py | vincenz-e/django-paydirekt | eda3b23c27f0a5a78d5a2a91e4083dab75f2f01f | [
"MIT"
] | 2 | 2019-04-03T08:08:28.000Z | 2019-07-22T00:32:05.000Z | # Django settings for testproject project.
from django.conf import settings
settings.configure(
ALLOWED_HOSTS=['*'],
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:'
}
},
ROOT_URLCONF='tests.test_urls',
INSTALLED_APPS=(
... | 24.933333 | 72 | 0.629679 | # Django settings for testproject project.
from django.conf import settings
settings.configure(
ALLOWED_HOSTS=['*'],
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:'
}
},
ROOT_URLCONF='tests.test_urls',
INSTALLED_APPS=(
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d77ccb5ed65ceadf95c5aa7f2d4204c73111466c | 749 | py | Python | eye_video.py | Berkeley-BORIS/BORIS_FileBrowser | 5742a7686b0aa7b3dccad71ecd39bc640346a1df | [
"MIT"
] | null | null | null | eye_video.py | Berkeley-BORIS/BORIS_FileBrowser | 5742a7686b0aa7b3dccad71ecd39bc640346a1df | [
"MIT"
] | null | null | null | eye_video.py | Berkeley-BORIS/BORIS_FileBrowser | 5742a7686b0aa7b3dccad71ecd39bc640346a1df | [
"MIT"
] | null | null | null | import subprocess
import os
from glob import glob
import cv2
# def printnow(s):
# sys.
tempdir= './temp_for_video'
if os.path.exists(tempdir):
print "Removing temp_for_video directory"
subprocess.call('rm -rf {0}'.format(tempdir), shell=True)
print "Creating temp_for_video directory"
os.mkdir(tempdir)
i... | 24.16129 | 89 | 0.682243 | import subprocess
import os
from glob import glob
import cv2
# def printnow(s):
# sys.
tempdir= './temp_for_video'
if os.path.exists(tempdir):
print "Removing temp_for_video directory"
subprocess.call('rm -rf {0}'.format(tempdir), shell=True)
print "Creating temp_for_video directory"
os.mkdir(tempdir)
i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
98225817872599faceaca882fac6b82b284be004 | 17,867 | py | Python | fowt_force_gen/moortune.py | SoftwareDevEngResearch/fowt-force-gen | abfda75edf31ee7018ceec0e48b2b24e7ee350eb | [
"MIT"
] | null | null | null | fowt_force_gen/moortune.py | SoftwareDevEngResearch/fowt-force-gen | abfda75edf31ee7018ceec0e48b2b24e7ee350eb | [
"MIT"
] | null | null | null | fowt_force_gen/moortune.py | SoftwareDevEngResearch/fowt-force-gen | abfda75edf31ee7018ceec0e48b2b24e7ee350eb | [
"MIT"
] | null | null | null |
def tune(water_depth, platform, output_moordyn_filename):
"""
Using metocean and platform information, generates MoorDyn .dat files with a properly tuned and positioned mooring
system so rigid body modes and frequencies match those specified in the NREL platform definition. Contains
subfunctions to:
... | 52.705015 | 130 | 0.643477 | from fowt_force_gen import run_fast
from fowt_force_gen import filegen
from fowt_force_gen import parse
import math
import numpy as np
import os
import argparse
def tune(water_depth, platform, output_moordyn_filename):
"""
Using metocean and platform information, generates MoorDyn .dat files with a properly t... | 0 | 0 | 0 | 15,569 | 0 | 685 | 0 | 7 | 200 |
bff8917d6740c51bfa4e08081e7c2fe235de40e8 | 1,697 | py | Python | helpers.py | mikeehun/mattermost-bitbucket-bridge | d231cbd4cf1e73c107ce6e1b07c2a7dea190b262 | [
"MIT"
] | null | null | null | helpers.py | mikeehun/mattermost-bitbucket-bridge | d231cbd4cf1e73c107ce6e1b07c2a7dea190b262 | [
"MIT"
] | null | null | null | helpers.py | mikeehun/mattermost-bitbucket-bridge | d231cbd4cf1e73c107ce6e1b07c2a7dea190b262 | [
"MIT"
] | 1 | 2019-04-18T15:12:25.000Z | 2019-04-18T15:12:25.000Z | """
Dictionary of supported Bitbucket events and output friendly format
"""
bitbucket_server_event_names = {
"pr:comment:added": "Pull Request: Comment Added",
"pr:comment:deleted": "Pull Request: Comment Deleted",
"pr:comment:edited": "Pull Request: Comment Edited",
"pr:opened": "Pull Request: Opened",... | 47.138889 | 77 | 0.677666 | """
Dictionary of supported Bitbucket events and output friendly format
"""
bitbucket_server_event_names = {
"pr:comment:added": "Pull Request: Comment Added",
"pr:comment:deleted": "Pull Request: Comment Deleted",
"pr:comment:edited": "Pull Request: Comment Edited",
"pr:opened": "Pull Request: Opened",... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
108c8e8ba849b9944dfb5dfed567e85d38231b86 | 249 | py | Python | tests/box_test.py | drichmond/IPICO-Open-Source | bbb7b7f800edd524caba1f89394236f32e05e02e | [
"Apache-2.0"
] | 3 | 2018-02-13T17:54:58.000Z | 2020-12-30T04:07:48.000Z | tests/box_test.py | drichmond/IPICO-Open-Source | bbb7b7f800edd524caba1f89394236f32e05e02e | [
"Apache-2.0"
] | null | null | null | tests/box_test.py | drichmond/IPICO-Open-Source | bbb7b7f800edd524caba1f89394236f32e05e02e | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python3.6
if __name__ == '__main__':
main()
| 14.647059 | 45 | 0.590361 | #!/usr/local/bin/python3.6
from ipico.reader import BoxReader
def main():
# read a data packet
data = None
seq = 0
rdr = BoxReader('Finish', '192.168.2.34')
for s in rdr:
print(s)
if __name__ == '__main__':
main()
| 0 | 0 | 0 | 0 | 0 | 125 | 0 | 13 | 44 |
8714de68982283bcaeff5e6a0b71251d452dbab8 | 1,873 | py | Python | tests/x7/lib/test_shell_tools.py | gribbg/x7-lib | 1ec5807d2c85d522a9f678f995d0f2fe42735d18 | [
"BSD-2-Clause"
] | null | null | null | tests/x7/lib/test_shell_tools.py | gribbg/x7-lib | 1ec5807d2c85d522a9f678f995d0f2fe42735d18 | [
"BSD-2-Clause"
] | null | null | null | tests/x7/lib/test_shell_tools.py | gribbg/x7-lib | 1ec5807d2c85d522a9f678f995d0f2fe42735d18 | [
"BSD-2-Clause"
] | null | null | null | # Originally auto-generated on 2021-02-15-12:14:36 -0500 EST
# By '--verbose --verbose x7.lib.shell_tools'
| 36.019231 | 74 | 0.662573 | # Originally auto-generated on 2021-02-15-12:14:36 -0500 EST
# By '--verbose --verbose x7.lib.shell_tools'
from unittest import TestCase
from x7.lib.annotations import tests
from x7.testing.support import Capture
from x7.lib import shell_tools
from x7.lib.shell_tools_load import ShellTool
@tests(shell_tools)
class T... | 0 | 1,558 | 0 | 0 | 0 | 0 | 0 | 73 | 134 |
2620b6b9400f88f53b3ed2fe084239f6a699e5d3 | 432 | py | Python | semantic_querying.py | Haoyu-R/How-to-Manage-TinyML-at-Scale | da05a79f3abdaf476b73a4b7c689468c951bb364 | [
"MIT"
] | 1 | 2022-02-22T01:32:50.000Z | 2022-02-22T01:32:50.000Z | semantic_querying.py | Haoyu-R/How-to-Manage-TinyML-at-Scale | da05a79f3abdaf476b73a4b7c689468c951bb364 | [
"MIT"
] | null | null | null | semantic_querying.py | Haoyu-R/How-to-Manage-TinyML-at-Scale | da05a79f3abdaf476b73a4b7c689468c951bb364 | [
"MIT"
] | null | null | null | from SPARQLWrapper import SPARQLWrapper, JSON
import json
# Put the repository URL from Graph DB here
sparql = SPARQLWrapper(r"http://192.168.1.106:7200/repositories/tinyml2022_v2")
# Put the query here
sparql.setQuery(query_1)
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
# Print out the result
fo... | 28.8 | 79 | 0.773148 | from SPARQLWrapper import SPARQLWrapper, JSON
from sparql_queries import *
import json
# Put the repository URL from Graph DB here
sparql = SPARQLWrapper(r"http://192.168.1.106:7200/repositories/tinyml2022_v2")
# Put the query here
sparql.setQuery(query_1)
sparql.setReturnFormat(JSON)
results = sparql.query().convert... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 22 |
f5a48c2673e686fc065e294695731a83dc05584c | 4,015 | py | Python | lnk/googl/command.py | goldsborough/lnk | 1487d272a70329571c77c0ec17c394dc6a1d088f | [
"MIT"
] | 3 | 2017-06-16T18:51:54.000Z | 2018-04-08T19:36:12.000Z | lnk/googl/command.py | goldsborough/lnk | 1487d272a70329571c77c0ec17c394dc6a1d088f | [
"MIT"
] | 2 | 2021-02-08T20:17:54.000Z | 2021-04-30T20:35:44.000Z | lnk/googl/command.py | goldsborough/lnk | 1487d272a70329571c77c0ec17c394dc6a1d088f | [
"MIT"
] | 1 | 2019-11-06T19:05:30.000Z | 2019-11-06T19:05:30.000Z | #!/usr/bin/env python
#! -*- coding: utf-8 -*-
"""Contains the base-class for all goo.gl commands."""
import lnk.config
| 30.648855 | 74 | 0.718306 | #!/usr/bin/env python
#! -*- coding: utf-8 -*-
"""Contains the base-class for all goo.gl commands."""
import apiclient.discovery
import googleapiclient.errors
import httplib2
import oauth2client.file
import os
import lnk.config
import lnk.errors
from lnk.abstract import AbstractCommand
class Command(AbstractComman... | 0 | 362 | 0 | 3,339 | 0 | 0 | 0 | 13 | 179 |
d9de5c2b3e8c00f404ff312ce3e36c2caeb75133 | 771 | py | Python | var/spack/repos/builtin/packages/nvtop/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2021-09-29T02:14:40.000Z | 2022-01-27T20:50:36.000Z | var/spack/repos/builtin/packages/nvtop/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2022-02-28T11:30:18.000Z | 2022-03-23T19:34:56.000Z | var/spack/repos/builtin/packages/nvtop/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
| 33.521739 | 95 | 0.728923 | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Nvtop(CMakePackage, CudaPackage):
"""Nvtop stands for NVidia TOP, a (h)top like task monit... | 0 | 0 | 0 | 529 | 0 | 0 | 0 | -2 | 46 |
45b35d71aa5c89c4cc5bf4f44e16d910cbdcac65 | 10,551 | py | Python | codes/data/data_process.py | RyanXingQL/MW-GAN | 562199344e322919a108048acd55b0dd8820df55 | [
"MIT"
] | 2 | 2021-11-05T09:21:54.000Z | 2021-11-14T06:03:16.000Z | codes/data/data_process.py | RyanXingQL/MW-GAN | 562199344e322919a108048acd55b0dd8820df55 | [
"MIT"
] | 2 | 2021-06-05T02:53:30.000Z | 2021-06-06T03:05:44.000Z | codes/data/data_process.py | RyanXingQL/MW-GAN | 562199344e322919a108048acd55b0dd8820df55 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import cv2
import os, sys
sys.path.append('./')
import numpy as np
import glob
"""
Created on Thu Jan 10 10:48:00 2013
@author: Chen Ming
"""
def read_YUV420(image_path, rows, cols, numfrm):
"""
YUVY, U, V
:param image_path: YUV
:param rows:
:param cols:
... | 40.425287 | 268 | 0.572647 | # -*- coding: utf-8 -*-
import cv2
import os, sys
sys.path.append('./')
import numpy as np
import glob
import math
"""
Created on Thu Jan 10 10:48:00 2013
@author: Chen Ming
"""
def read_YUV420(image_path, rows, cols, numfrm):
"""
读取YUV文件,解析为Y, U, V图像
:param image_path: YUV图像路径
:param... | 81 | 0 | 0 | 0 | 0 | 668 | 0 | -10 | 123 |
1fc81586f7ee334a7c58811a00bc04f65d79aa81 | 5,752 | py | Python | Bot_Training.py | TianyuWu1990/ChatterBot | 171fd25a14fd0c4dccaaa54e1a5d0ec6c40221dd | [
"BSD-3-Clause"
] | null | null | null | Bot_Training.py | TianyuWu1990/ChatterBot | 171fd25a14fd0c4dccaaa54e1a5d0ec6c40221dd | [
"BSD-3-Clause"
] | null | null | null | Bot_Training.py | TianyuWu1990/ChatterBot | 171fd25a14fd0c4dccaaa54e1a5d0ec6c40221dd | [
"BSD-3-Clause"
] | null | null | null | """
AI Neural Network Training For Captain Pi
Created By: Vicky Bao
"""
import tensorflow as tf
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import pad_sequences
from tensorflow.keras.layers import Embedding, LSTM, Dense
from tensorflow.keras.models import Seque... | 31.26087 | 105 | 0.727399 | """
AI Neural Network Training For Captain Pi
Created By: Vicky Bao
"""
import tensorflow as tf
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import pad_sequences
from tensorflow.keras.layers import Embedding, LSTM, Dense, Bidirectional, GRU
from tensorflow.keras... | 0 | 0 | 0 | 0 | 0 | 1,052 | 0 | 47 | 111 |
73d4a4be4d531fdb1cabdd6b5596c2c010a561cc | 948 | py | Python | imlib/image/masking.py | noisysky/imlib | 625193be4a586d9040a48df9d51dbdd3a17c7d06 | [
"MIT"
] | null | null | null | imlib/image/masking.py | noisysky/imlib | 625193be4a586d9040a48df9d51dbdd3a17c7d06 | [
"MIT"
] | 6 | 2020-04-17T12:02:56.000Z | 2020-05-12T15:20:18.000Z | imlib/image/masking.py | noisysky/imlib | 625193be4a586d9040a48df9d51dbdd3a17c7d06 | [
"MIT"
] | 4 | 2020-02-05T18:53:30.000Z | 2022-02-21T18:50:14.000Z | import numpy as np
def mask_image_threshold(image, masking_image, threshold=0):
"""
Mask one image, based on the values in another image that are above a
threshold
:param image: Input image
:param masking_image: Image to base the mask on (same shape as image)
:param threshold: Threshold to bas... | 31.6 | 78 | 0.703586 | import numpy as np
def mask_image_threshold(image, masking_image, threshold=0):
"""
Mask one image, based on the values in another image that are above a
threshold
:param image: Input image
:param masking_image: Image to base the mask on (same shape as image)
:param threshold: Threshold to bas... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |