hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4f2db9bc3e2f0336c6ba9b356b1e2283e303ed6e | 1,130 | py | Python | tests/storage/cases/test_KT1Tr2suqgbTqpEdJQqUnkMTTi1XPza27rAo.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2021-05-20T16:52:08.000Z | 2021-05-20T16:52:08.000Z | tests/storage/cases/test_KT1Tr2suqgbTqpEdJQqUnkMTTi1XPza27rAo.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | tests/storage/cases/test_KT1Tr2suqgbTqpEdJQqUnkMTTi1XPza27rAo.py | tqtezos/pytezos | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | from unittest import TestCase
from tests import get_data
from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson
class StorageTestKT1Tr2suqgbTqpEdJQqUnkMTTi1XPza27rAo(TestCase):
@classmethod
def setUpClass(cls):
cls.maxDiff = None
cls.... | 40.357143 | 112 | 0.748673 |
e5b3cde9405e12eea7602b4d7f52ebfe6c45c4a6 | 4,411 | py | Python | src/contractExtractor/contractAffectedByMinersExtractor/judgeAst.py | xf97/HuangGai | 40a349be6102d5eb63893fb914659405ae162d93 | [
"MIT"
] | 23 | 2020-09-20T02:10:44.000Z | 2022-03-22T12:58:13.000Z | src/contractExtractor/contractAffectedByMinersExtractor/judgeAst.py | contractshark/HuangGai | 1b26f77b043aa5903774420964c61ab370eb6c7a | [
"MIT"
] | 3 | 2020-09-22T15:28:33.000Z | 2022-01-22T07:48:53.000Z | src/contractExtractor/contractAffectedByMinersExtractor/judgeAst.py | contractshark/HuangGai | 1b26f77b043aa5903774420964c61ab370eb6c7a | [
"MIT"
] | 5 | 2021-07-15T02:45:09.000Z | 2022-03-21T13:36:40.000Z | #!/usr/bin/pythin
#-*- coding: utf-8 -*-
import json
import os
from colorPrint import * #该头文件中定义了色彩显示的信息
import re
#缓存路径
CACHE_PATH = "./cache/"
#注入所需信息存储路径
INJECT_INFO_PATH = "./injectInfo/"
#目标类型列表
TARGET_TYPE_LIST = ["bytes32", "address payable", "uint256", "address"]
#pure函数标志
PURE_FLAG = "pure"
class judgeAst:... | 28.275641 | 114 | 0.679438 |
ae48dea355fc8cdc9cac3a419b86fabfd2ccf5bb | 45,165 | py | Python | detectron2/utils/visualizer.py | dnandha/grraspn | 0a660d3f73487ea2f8caabf791809de283e8b806 | [
"Apache-2.0"
] | null | null | null | detectron2/utils/visualizer.py | dnandha/grraspn | 0a660d3f73487ea2f8caabf791809de283e8b806 | [
"Apache-2.0"
] | null | null | null | detectron2/utils/visualizer.py | dnandha/grraspn | 0a660d3f73487ea2f8caabf791809de283e8b806 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import colorsys
import logging
import math
import numpy as np
from enum import Enum, unique
import cv2
import matplotlib as mpl
import matplotlib.colors as mplc
import matplotlib.figure as mplfigure
import pycocotools.mask as mask_util
import torch
... | 39.89841 | 101 | 0.579032 |
355a2fced83b5b14469f5fa9dfe0e289bc5426b5 | 581 | py | Python | Python/Programming Basics/Complex Conditional Statements/07. Fruit Shop.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Basics/Complex Conditional Statements/07. Fruit Shop.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Basics/Complex Conditional Statements/07. Fruit Shop.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | product = input()
day = input()
amount = float(input())
result = 'error'
price = [('banana', 2.50, 2.70), ('apple', 1.20, 1.25), ('orange', 0.85, 0.90), ('grapefruit', 1.45, 1.60),
('kiwi', 2.70, 3.00), ('pineapple', 5.50, 5.60), ('grapes', 3.85, 4.20)]
result = 'error'
for a, b, c, in price:
if day in ('... | 32.277778 | 107 | 0.524957 |
9ef88006c6b35879a6708473ae4cc0a9e9633978 | 1,494 | py | Python | venv/lib/python2.7/site-packages/pychart/afm/Utopia_BoldItalic.py | Christian-Castro/castro_odoo8 | 8247fdb20aa39e043b6fa0c4d0af509462ab3e00 | [
"Unlicense"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | venv/lib/python2.7/site-packages/pychart/afm/Utopia_BoldItalic.py | Christian-Castro/castro_odoo8 | 8247fdb20aa39e043b6fa0c4d0af509462ab3e00 | [
"Unlicense"
] | null | null | null | venv/lib/python2.7/site-packages/pychart/afm/Utopia_BoldItalic.py | Christian-Castro/castro_odoo8 | 8247fdb20aa39e043b6fa0c4d0af509462ab3e00 | [
"Unlicense"
] | null | null | null | # AFM font Utopia-BoldItalic (path: /usr/share/fonts/afms/adobe/putbi8a.afm).
# Derived from Ghostscript distribution.
# Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code.
import dir
dir.afm["Utopia-BoldItalic"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 50... | 249 | 1,297 | 0.624498 |
330f87e08ea06f3b45425cc2546c79b3515ef96a | 4,691 | py | Python | cosmosis/samplers/list/list_sampler.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-09-15T10:10:26.000Z | 2021-09-15T10:10:26.000Z | cosmosis/samplers/list/list_sampler.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | null | null | null | cosmosis/samplers/list/list_sampler.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-06-11T15:29:43.000Z | 2021-06-11T15:29:43.000Z | from __future__ import print_function
from builtins import zip
from builtins import map
from builtins import str
from builtins import range
import itertools
import numpy as np
from cosmosis.output.text_output import TextColumnOutput
from .. import ParallelSampler
def task(p):
i,p = p
results = list_sampler.pi... | 38.138211 | 89 | 0.614794 |
f3b8d50d0d6c0248c21c731da7a0f6621e787625 | 599 | py | Python | python3/subprocess/tar1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python3/subprocess/tar1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python3/subprocess/tar1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#!/usr/bin/python
import subprocess
import os
import shutil
if os.path.exists('envars.prop'):
shutil.copy2('envars.prop', "work.current")
args = ('tar', '-czvf', 'work.tgz', ".")
# args = ['tar', '-czvf', 'work.tgz', "."]
# args = "tar -czvf work.tgz ."
# popen = subprocess.Popen(args, std... | 26.043478 | 101 | 0.646077 |
85a4145d26370bf51d2faff0d15b236708b1fcf0 | 228 | py | Python | pharma/pharma/email.py | subban358/pharmacy-management | 77d4e363a4ea0eb7c2cf9f1b6440b49372617599 | [
"MIT"
] | 1 | 2020-06-05T11:40:41.000Z | 2020-06-05T11:40:41.000Z | pharma/pharma/email.py | subban358/pharmacy-management | 77d4e363a4ea0eb7c2cf9f1b6440b49372617599 | [
"MIT"
] | 8 | 2021-03-30T13:29:09.000Z | 2022-03-12T00:33:50.000Z | pharma/pharma/email.py | subban358/pharmacy-management | 77d4e363a4ea0eb7c2cf9f1b6440b49372617599 | [
"MIT"
] | null | null | null | #for gmail address
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'pharmacyworl9@gmail.com'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_PORT = 587
| 28.5 | 61 | 0.802632 |
a9a4e843101f79d450a1d5ed1265320af91bbc59 | 625 | py | Python | exercicios/ex73.py | gabrielaraujo3/exercicios-python | 37a431854205e489cb7cede8fcae459bfef75a39 | [
"MIT"
] | null | null | null | exercicios/ex73.py | gabrielaraujo3/exercicios-python | 37a431854205e489cb7cede8fcae459bfef75a39 | [
"MIT"
] | null | null | null | exercicios/ex73.py | gabrielaraujo3/exercicios-python | 37a431854205e489cb7cede8fcae459bfef75a39 | [
"MIT"
] | null | null | null | times = ('Internacional', 'Atlético-MG', 'Flamengo', 'São Paulo', 'Fluminense',
'Palmeiras', 'Grêmio', 'Athletico-PR', 'Ceará SC', 'Corinthians', 'Santos',
'Atlético-GO', 'Bragantino', 'Vasco da Gama', 'Bahia', 'Sport Recife', 'Fortaleza',
'Goiás', 'Coritiba', 'Botafogo')
print('=-' * 15)
pri... | 48.076923 | 92 | 0.624 |
4fcc290d7fde1684cd0a23bd38fa1df0fe55b4cc | 3,729 | py | Python | examples/00-basic/02-basic_field_containers.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 11 | 2021-01-31T15:50:02.000Z | 2021-10-01T23:15:38.000Z | examples/00-basic/02-basic_field_containers.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 46 | 2021-01-14T05:00:50.000Z | 2021-10-06T18:30:37.000Z | examples/00-basic/02-basic_field_containers.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 3 | 2021-06-30T07:18:30.000Z | 2021-09-15T08:43:11.000Z | """
.. _ref_basic_field_example:
Field and Field Containers Overview
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In DPF, the field is the main simulation data container. During a numerical
simulations, result data is defined by values associated to entities
(scoping). These entities are a subset of a model (support).
Because... | 40.978022 | 81 | 0.649236 |
4783c74e35f43b65ae3e98a8d86078f259e228f5 | 15,529 | py | Python | Safety/Toronto safety.py | alizaazizlakho/ISSC-Case-Comp | dc9dd1da6da95b808f58fd81ae8c277f78403426 | [
"MIT"
] | null | null | null | Safety/Toronto safety.py | alizaazizlakho/ISSC-Case-Comp | dc9dd1da6da95b808f58fd81ae8c277f78403426 | [
"MIT"
] | null | null | null | Safety/Toronto safety.py | alizaazizlakho/ISSC-Case-Comp | dc9dd1da6da95b808f58fd81ae8c277f78403426 | [
"MIT"
] | 1 | 2021-09-02T14:20:51.000Z | 2021-09-02T14:20:51.000Z | #!/usr/bin/env python
# coding: utf-8
# ## Toronto Livability - Safety
# In[2]:
# Import some packages
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
get_ipython().run_line_magic('matplotlib', 'inline')
from matplotlib.pyplot import figure
# In[3]:
# Import geopan... | 19.858056 | 169 | 0.681435 |
c8370c9f7e7ec60b1b608d7570ad6e3982ef025a | 55,691 | py | Python | contrib/tools/python3/src/Lib/pickle.py | HeyLey/catboost | f472aed90604ebe727537d9d4a37147985e10ec2 | [
"Apache-2.0"
] | 36 | 2019-06-07T20:44:06.000Z | 2022-03-23T06:19:43.000Z | contrib/tools/python3/src/Lib/pickle.py | HeyLey/catboost | f472aed90604ebe727537d9d4a37147985e10ec2 | [
"Apache-2.0"
] | 42 | 2018-05-25T15:57:08.000Z | 2021-01-17T18:39:59.000Z | contrib/tools/python3/src/Lib/pickle.py | HeyLey/catboost | f472aed90604ebe727537d9d4a37147985e10ec2 | [
"Apache-2.0"
] | 28 | 2019-06-27T04:11:27.000Z | 2022-03-11T06:27:44.000Z | """Create portable serialized representations of Python objects.
See module copyreg for a mechanism for registering custom picklers.
See module pickletools source for extensive comments.
Classes:
Pickler
Unpickler
Functions:
dump(object, file)
dumps(object) -> string
load(file) -> object
lo... | 34.676837 | 80 | 0.567004 |
8ede29da18af228ea89d0a811c4023a22f49b8f4 | 58,373 | py | Python | numpy/ma/extras.py | NGeorgescu/numpy | 593ef5fc5a02fbcd6eeb70a59684b3b21c9cc643 | [
"BSD-3-Clause"
] | 2 | 2022-02-02T05:40:47.000Z | 2022-03-05T11:04:24.000Z | numpy/ma/extras.py | NGeorgescu/numpy | 593ef5fc5a02fbcd6eeb70a59684b3b21c9cc643 | [
"BSD-3-Clause"
] | 41 | 2019-04-01T15:52:29.000Z | 2021-09-07T00:15:51.000Z | numpy/ma/extras.py | NGeorgescu/numpy | 593ef5fc5a02fbcd6eeb70a59684b3b21c9cc643 | [
"BSD-3-Clause"
] | 4 | 2021-06-25T08:40:39.000Z | 2021-08-08T09:52:42.000Z | """
Masked arrays add-ons.
A collection of utilities for `numpy.ma`.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
__all__ = [
'apply_along_axis', 'apply_over_axes', 'atleast_1d', 'atleast_2d',
'atleast_3d', 'average'... | 30.339397 | 105 | 0.567146 |
9161acd9d6c34ccdf5007300a794e50401815597 | 2,181 | py | Python | start_analysis.py | Dakhnovskiy/linguistic_analyzer_projects | 36551d788f76be47b8892bce4073900e2cccec2f | [
"Apache-2.0"
] | null | null | null | start_analysis.py | Dakhnovskiy/linguistic_analyzer_projects | 36551d788f76be47b8892bce4073900e2cccec2f | [
"Apache-2.0"
] | null | null | null | start_analysis.py | Dakhnovskiy/linguistic_analyzer_projects | 36551d788f76be47b8892bce4073900e2cccec2f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'Dmitriy.Dakhnovskiy'
import argparse
import shutil
import os
import itertools
from analyzer_project.source_getter.source_getter import get_source_getter
from analyzer_project.files_find import find_files_by_extension
from analyzer_project.files_read import get_content_files
from a... | 46.404255 | 100 | 0.721687 |
683563ec166f40633316adefc64a64da1f8fcdcb | 3,373 | py | Python | budget-calculation/instance_reader.py | angee/wildlife_corridor_design_instances | bcb6f3bbc88dcabc42ae670cf4614299f36818de | [
"MIT"
] | null | null | null | budget-calculation/instance_reader.py | angee/wildlife_corridor_design_instances | bcb6f3bbc88dcabc42ae670cf4614299f36818de | [
"MIT"
] | null | null | null | budget-calculation/instance_reader.py | angee/wildlife_corridor_design_instances | bcb6f3bbc88dcabc42ae670cf4614299f36818de | [
"MIT"
] | null | null | null | # ---------------------------------------------------------------------------------------------------------------------
# Helper methods to read from the .cor instance file for Wildlife corridor design as generated by the instance
# generator available at: http://computational-sustainability.cis.cornell.edu/Datasets/co... | 43.805195 | 119 | 0.556181 |
3752453173157869a702bd2dceb458e3de8cbfa7 | 1,224 | py | Python | FP_metrics/visualization/common_variables.py | elikary/tois2021 | da6456b65b97a451db2f5f5f758f1e057553e52b | [
"MIT"
] | 3 | 2021-03-31T13:59:24.000Z | 2021-06-04T02:36:40.000Z | FP_metrics/visualization/common_variables.py | elikary/tois2021 | da6456b65b97a451db2f5f5f758f1e057553e52b | [
"MIT"
] | null | null | null | FP_metrics/visualization/common_variables.py | elikary/tois2021 | da6456b65b97a451db2f5f5f758f1e057553e52b | [
"MIT"
] | null | null | null | """
@author: Elisa Mena-Maldonado
"""
#for visualization
optimals = ['optimalobservedprecision', \
'optimalobservedantiprecision','optimaltrueprecision', \
'optimaltrueantiprecision','optimaltrueprecisionrestricted', \
'optimaltrueantiprecisionrestricted']
nick_names = ... | 37.090909 | 78 | 0.499183 |
e6ceb5ec7f1406deab13d2b8171ff40f6def5fd3 | 956 | py | Python | core/letter_id_generator.py | wmww/wayland-debug | b408905e55480f427a2abfba7aea7211fcd3e1c0 | [
"MIT"
] | 38 | 2018-12-21T19:11:42.000Z | 2021-06-09T09:37:28.000Z | core/letter_id_generator.py | wmww/wayland-debug | b408905e55480f427a2abfba7aea7211fcd3e1c0 | [
"MIT"
] | 24 | 2018-12-21T20:14:03.000Z | 2022-03-21T20:42:29.000Z | core/letter_id_generator.py | wmww/wayland-debug | b408905e55480f427a2abfba7aea7211fcd3e1c0 | [
"MIT"
] | 4 | 2018-12-21T19:23:04.000Z | 2021-03-02T07:59:56.000Z | from typing import Optional, List
def number_to_letter_id(value: int, caps: bool) -> str:
assert value >= 0, 'negative input to number_to_letter_id(): ' + str(value)
value += 1
result = ''
base = ord('A') if caps else ord('a')
while value > 0:
value -= 1
result = chr(value % 26 + ba... | 28.969697 | 106 | 0.583682 |
027effe6cd26f2f0091d9506eb44cb846f482217 | 218 | py | Python | boom/tests/test_conversation.py | boomletsgo/boom-sdk-python | e15af1d9158b84e9677037f2f784a5a9363564af | [
"Unlicense"
] | null | null | null | boom/tests/test_conversation.py | boomletsgo/boom-sdk-python | e15af1d9158b84e9677037f2f784a5a9363564af | [
"Unlicense"
] | null | null | null | boom/tests/test_conversation.py | boomletsgo/boom-sdk-python | e15af1d9158b84e9677037f2f784a5a9363564af | [
"Unlicense"
] | null | null | null | from boom.conversation import ConversationService
class TestConversationService(object):
def test_url(self):
service = ConversationService()
assert service.url == "https://conversation.boom.app"
| 24.222222 | 61 | 0.733945 |
918674303b22da401a67a4b847993614f86c410f | 4,392 | py | Python | ros/follow_line.py | zjdznl/turtlebot_follow_line | 5c9dd22c79e3425415ce9576ceb9b223813035ba | [
"Apache-2.0"
] | null | null | null | ros/follow_line.py | zjdznl/turtlebot_follow_line | 5c9dd22c79e3425415ce9576ceb9b223813035ba | [
"Apache-2.0"
] | null | null | null | ros/follow_line.py | zjdznl/turtlebot_follow_line | 5c9dd22c79e3425415ce9576ceb9b223813035ba | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import rospy, cv2, cv_bridge, numpy, math, datetime
from sensor_msgs.msg import Image
from geometry_msgs.msg import Twist
class Follower:
def __init__(self):
self.bridge = cv_bridge.CvBridge()
cv2.namedWindow('window', 1)
self.image_sub = rospy.Subscriber('/camera/rgb/image... | 34.582677 | 94 | 0.561475 |
e895e857188ca9437cdb56218d64a7c23da5db5d | 477 | py | Python | zerver/migrations/0040_realm_authentication_methods.py | shefali163/zulip | 015af605cfb28b417b557ed9278835fd267bcfd8 | [
"Apache-2.0"
] | 3 | 2018-12-04T01:44:43.000Z | 2019-05-13T06:16:21.000Z | zerver/migrations/0040_realm_authentication_methods.py | alex784004/patient | a6510c4626392b9a8385cbac82698d9e23df0a55 | [
"Apache-2.0"
] | 58 | 2018-11-27T15:18:54.000Z | 2018-12-09T13:43:07.000Z | zerver/migrations/0040_realm_authentication_methods.py | alex784004/patient | a6510c4626392b9a8385cbac82698d9e23df0a55 | [
"Apache-2.0"
] | 9 | 2019-11-04T18:59:29.000Z | 2022-03-22T17:46:37.000Z | # -*- coding: utf-8 -*-
import bitfield.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zerver', '0039_realmalias_drop_uniqueness'),
]
operations = [
migrations.AddField(
model_name='realm',
name='authentic... | 25.105263 | 123 | 0.614256 |
2b5c99fb18e7f9c6afb21fc0ca72635ec3242686 | 792 | py | Python | tools/accuracy_checker/accuracy_checker/evaluators/__init__.py | APrigarina/open_model_zoo | b1ff98b64a6222cf6b5f3838dc0271422250de95 | [
"Apache-2.0"
] | 1,031 | 2020-07-16T08:30:57.000Z | 2022-03-30T19:42:52.000Z | tools/accuracy_checker/accuracy_checker/evaluators/__init__.py | APrigarina/open_model_zoo | b1ff98b64a6222cf6b5f3838dc0271422250de95 | [
"Apache-2.0"
] | 966 | 2020-07-16T08:13:00.000Z | 2022-03-31T18:09:18.000Z | tools/accuracy_checker/accuracy_checker/evaluators/__init__.py | APrigarina/open_model_zoo | b1ff98b64a6222cf6b5f3838dc0271422250de95 | [
"Apache-2.0"
] | 440 | 2020-07-16T12:52:50.000Z | 2022-03-31T14:21:41.000Z | """
Copyright (c) 2018-2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 28.285714 | 72 | 0.777778 |
a423b383edca063a625d2aebbfe42a757dc7ae53 | 968 | py | Python | stdplugins/ok.py | PratikGoswamiPM/BotHub | d02f9773418d2651d85e6cc3d797e78a3afef325 | [
"Apache-2.0"
] | 1 | 2021-07-18T06:57:27.000Z | 2021-07-18T06:57:27.000Z | stdplugins/ok.py | PratikGoswamiPM/BotHub | d02f9773418d2651d85e6cc3d797e78a3afef325 | [
"Apache-2.0"
] | null | null | null | stdplugins/ok.py | PratikGoswamiPM/BotHub | d02f9773418d2651d85e6cc3d797e78a3afef325 | [
"Apache-2.0"
] | null | null | null | """ displays the Truth
use cmd .ok"""
from telethon import events
import asyncio
from uniborg.util import admin_cmd
@borg.on(admin_cmd("(.*)"))
async def _(event):
if event.fwd_from:
return
animation_interval = 0.05
animation_ttl = range(0, 90)
input_str = event.pattern_match.group(1)
if... | 20.166667 | 53 | 0.411157 |
ff2cdd0bc809837d8772a9caf9ca767ffad3fae3 | 2,360 | py | Python | models/meeting.py | ieee-usj-sb/IEEE-USJ | 50f25fee04bba23ca8550f3e4b56aae5fdde7aa9 | [
"MIT"
] | null | null | null | models/meeting.py | ieee-usj-sb/IEEE-USJ | 50f25fee04bba23ca8550f3e4b56aae5fdde7aa9 | [
"MIT"
] | null | null | null | models/meeting.py | ieee-usj-sb/IEEE-USJ | 50f25fee04bba23ca8550f3e4b56aae5fdde7aa9 | [
"MIT"
] | null | null | null | __all__ = (
'Meeting',
'UserMeetingAssociation',
)
from sqlalchemy import Column, Unicode, Integer, ForeignKey, Date
from sqlalchemy.orm import relationship
from models.user import User
from .base_model import BaseModel
from .base_uid import UidModel, IdModel
from app_config.app_config import session
class ... | 40 | 109 | 0.697034 |
4516485a3851bb949910964b78f7fcdb8c15afa7 | 20,110 | py | Python | cirq/sim/wave_function.py | davemc84/Cirq | 713e016d32be99efb0fd4d3e6dbe6d9ca8421271 | [
"Apache-2.0"
] | null | null | null | cirq/sim/wave_function.py | davemc84/Cirq | 713e016d32be99efb0fd4d3e6dbe6d9ca8421271 | [
"Apache-2.0"
] | null | null | null | cirq/sim/wave_function.py | davemc84/Cirq | 713e016d32be99efb0fd4d3e6dbe6d9ca8421271 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 39.508841 | 80 | 0.620189 |
351ff811a19f2aa84710af520759bffcccace874 | 1,689 | py | Python | bless/cache/bless_lambda_cache.py | avineshwar/bless | 2f138922d14cb337b8bc063cad275ccb62988fb4 | [
"Apache-2.0"
] | null | null | null | bless/cache/bless_lambda_cache.py | avineshwar/bless | 2f138922d14cb337b8bc063cad275ccb62988fb4 | [
"Apache-2.0"
] | null | null | null | bless/cache/bless_lambda_cache.py | avineshwar/bless | 2f138922d14cb337b8bc063cad275ccb62988fb4 | [
"Apache-2.0"
] | null | null | null | """
.. module: bless.cache.bless_lambda_cache
:copyright: (c) 2016 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
"""
import base64
import os
import boto3
from botocore.exceptions import ClientError
from bless.config.bless_config import BlessConfig
class BlessLambdaCac... | 33.78 | 105 | 0.667851 |
d6ad3462043b31d20d788645920f0a6575999286 | 448 | py | Python | mundo-1/ex-021.py | guilhermesm28/python-curso-em-video | 50ab4e76b1903e62d4daa579699c5908329b26c8 | [
"MIT"
] | null | null | null | mundo-1/ex-021.py | guilhermesm28/python-curso-em-video | 50ab4e76b1903e62d4daa579699c5908329b26c8 | [
"MIT"
] | null | null | null | mundo-1/ex-021.py | guilhermesm28/python-curso-em-video | 50ab4e76b1903e62d4daa579699c5908329b26c8 | [
"MIT"
] | null | null | null | # Faça um programa em Python que abra e reproduza o áudio de um arquivo MP3.
# Para esse exercício é preciso instalar o módulo PyGame e também ter um arquivo ex_021.mp3 no mesmo diretório dos exercícios.
from pygame import mixer
print('-' * 100)
print('{: ^100}'.format('EXERCÍCIO 021 - TOCANDO UM MP3'))
print('-' * ... | 22.4 | 126 | 0.709821 |
0a79b7c9c8649b97b4122ef096479ad5c1f386b7 | 6,504 | py | Python | census/estimator/trainer/task.py | gitboyzorro5/cloudml-samples | b94f578c69362f5a05a3e85b37e2e49ae8e3e678 | [
"Apache-2.0"
] | null | null | null | census/estimator/trainer/task.py | gitboyzorro5/cloudml-samples | b94f578c69362f5a05a3e85b37e2e49ae8e3e678 | [
"Apache-2.0"
] | 3 | 2018-11-28T14:57:46.000Z | 2019-01-18T14:58:58.000Z | census/estimator/trainer/task.py | fprost/cloudml-samples | 2fc70f8229b2e3e919efea0b4143ebe749138390 | [
"Apache-2.0"
] | 1 | 2021-08-04T05:28:05.000Z | 2021-08-04T05:28:05.000Z | # Copyright 2016 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.052356 | 86 | 0.640068 |
b770634b89866170fc71600e339573e353b30aee | 6,915 | py | Python | cluster/models.py | EpicEric/base_stations_django | 7a04bc78ebe59067e7ff117862c9d2b0182d5d13 | [
"Apache-2.0"
] | null | null | null | cluster/models.py | EpicEric/base_stations_django | 7a04bc78ebe59067e7ff117862c9d2b0182d5d13 | [
"Apache-2.0"
] | null | null | null | cluster/models.py | EpicEric/base_stations_django | 7a04bc78ebe59067e7ff117862c9d2b0182d5d13 | [
"Apache-2.0"
] | null | null | null | from functools import reduce
from django.contrib.gis.db import models
from django.contrib.gis.db.models import Collect, Count, F
from django.contrib.gis.db.models.functions import GeoHash
from django.contrib.gis.geos import Point
from django.db.models.functions import Substr
from base_station.models import Identifie... | 44.044586 | 119 | 0.583369 |
202c877c2b14646896a436b5ddd4637967365e7e | 10,280 | py | Python | homeassistant/components/media_player/cast.py | sbidoul/home-assistant | 75adb7ff46e64e510c206d2b1f141253bbc4997a | [
"MIT"
] | 1 | 2017-01-25T15:31:20.000Z | 2017-01-25T15:31:20.000Z | homeassistant/components/media_player/cast.py | bytebility/home-assistant | 6015274ee2486f797fd6ee8f5f2074a601953e03 | [
"MIT"
] | null | null | null | homeassistant/components/media_player/cast.py | bytebility/home-assistant | 6015274ee2486f797fd6ee8f5f2074a601953e03 | [
"MIT"
] | 2 | 2018-10-22T17:05:47.000Z | 2021-09-22T10:52:31.000Z | """
Provide functionality to interact with Cast devices on the network.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.cast/
"""
# pylint: disable=import-error
import logging
import voluptuous as vol
from homeassistant.components.media_pla... | 32.125 | 79 | 0.664494 |
d1ddd9b03df76ad1d1555d755ae219ce53f60ce8 | 44,432 | py | Python | killtracker/tests/test_models.py | buahaha/aa-killtracker | c4a13bead53cb8762b47c0eb47a19466ed1ec4c6 | [
"MIT"
] | null | null | null | killtracker/tests/test_models.py | buahaha/aa-killtracker | c4a13bead53cb8762b47c0eb47a19466ed1ec4c6 | [
"MIT"
] | null | null | null | killtracker/tests/test_models.py | buahaha/aa-killtracker | c4a13bead53cb8762b47c0eb47a19466ed1ec4c6 | [
"MIT"
] | null | null | null | from datetime import timedelta
import json
from unittest.mock import Mock, patch
from bravado.exception import HTTPNotFound
import dhooks_lite
from requests.exceptions import HTTPError
from django.core.cache import cache
from django.contrib.auth.models import Group
from django.test import TestCase
from django.utils.... | 42.682037 | 91 | 0.694747 |
3297e0ed430a205db5fcf30c65def1cb7b00d508 | 16,567 | py | Python | src/sorting_demo/src/sorting_demo/environment_estimation.py | CooKingThe1st/AI-Robot-Challenge-Lab | 11351975ce48815dadf12d9906103d5736332c22 | [
"MIT"
] | 42 | 2019-05-09T02:00:12.000Z | 2022-03-05T12:38:49.000Z | src/sorting_demo/src/sorting_demo/environment_estimation.py | CooKingThe1st/AI-Robot-Challenge-Lab | 11351975ce48815dadf12d9906103d5736332c22 | [
"MIT"
] | 2 | 2019-10-09T14:20:35.000Z | 2021-02-19T14:09:45.000Z | src/sorting_demo/src/sorting_demo/environment_estimation.py | CooKingThe1st/AI-Robot-Challenge-Lab | 11351975ce48815dadf12d9906103d5736332c22 | [
"MIT"
] | 28 | 2019-05-26T23:55:22.000Z | 2022-01-17T12:22:55.000Z | #!/usr/bin/python
import copy
import random
import re
import math
import rospy
import tf
import tf.transformations
from cv_bridge import CvBridge
from gazebo_msgs.msg import LinkStates, sys
from geometry_msgs.msg import Pose, Point, Quaternion
from concepts.block import BlockState
from concepts.tray import TrayState
f... | 35.174098 | 123 | 0.536911 |
86de78af50b64c1c3123778a7502a517871f528a | 1,360 | py | Python | scripts/testplot.py | tboldagh/quick-root-plots | 5398cbc7ceafd4262c6b1b1a6db034db70d1c1f6 | [
"MIT"
] | 1 | 2021-10-19T05:00:38.000Z | 2021-10-19T05:00:38.000Z | scripts/testplot.py | tboldagh/quick-root-plots | 5398cbc7ceafd4262c6b1b1a6db034db70d1c1f6 | [
"MIT"
] | null | null | null | scripts/testplot.py | tboldagh/quick-root-plots | 5398cbc7ceafd4262c6b1b1a6db034db70d1c1f6 | [
"MIT"
] | null | null | null | # example fast plot
# can see the result of this script by piroot testplot.py -p "nsamples=100"
from fast import *
from myop import myop
options = myop(globals())
options.nsamples=1000
import ROOT
hx = ROOT.TH1F("x", "My data X", 10, 0, 1)
hy = ROOT.TH1F("y", "My data Y", 10, 0, 1)
rng = ROOT.TRandom()
for i in ran... | 30.909091 | 261 | 0.65 |
83d6c4b274c7bfadfdd926a63c94ce3ce9c1e68b | 995 | py | Python | tests/test_client.py | cmccoy10/lumapps-sdk | 3e4a15da526f921faa401b45e3945d1301b52dbe | [
"MIT"
] | 8 | 2018-12-17T15:46:22.000Z | 2021-11-16T16:18:26.000Z | tests/test_client.py | cmccoy10/lumapps-sdk | 3e4a15da526f921faa401b45e3945d1301b52dbe | [
"MIT"
] | 118 | 2019-01-03T10:35:59.000Z | 2022-03-17T16:43:05.000Z | tests/test_client.py | cmccoy10/lumapps-sdk | 3e4a15da526f921faa401b45e3945d1301b52dbe | [
"MIT"
] | 10 | 2018-11-23T13:57:22.000Z | 2021-09-30T20:55:40.000Z | from pytest import fixture
from lumapps.api import LumAppsClient
from lumapps.api.client import chunks
def test_chunks():
liste = [2, 2, 3, 3]
ck = chunks(liste, 2)
assert next(ck) == [2, 2]
assert next(ck) == [3, 3]
@fixture()
def cli():
c = LumAppsClient("a", "b", token="FAKE")
return c
... | 24.875 | 107 | 0.640201 |
5c8d4feb6829f166cf531181b9ddbbc0f14f1120 | 1,393 | py | Python | driver_support.py | yhamidullah/alphormdownloader | d520ec5d6d3289acb184308471a38d2b196a708d | [
"MIT"
] | 2 | 2020-04-07T10:59:23.000Z | 2020-12-24T09:18:56.000Z | driver_support.py | yhamidullah/alphormdownloader | d520ec5d6d3289acb184308471a38d2b196a708d | [
"MIT"
] | 5 | 2020-04-07T11:04:43.000Z | 2021-01-05T16:48:09.000Z | driver_support.py | yhamidullah/alphormdownloader | d520ec5d6d3289acb184308471a38d2b196a708d | [
"MIT"
] | 3 | 2020-04-04T04:56:24.000Z | 2020-04-08T12:26:11.000Z | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from bs4 import BeautifulSoup
import urllib.request,re,os
import config
def get_available_driver():
driver = ""
if config.firefox_driver_path != "":
try:
driver = webdriver.Firefox(executable_path=config.f... | 46.433333 | 142 | 0.698492 |
4088264db1735afe2d063cacde1b7830d6dacbca | 2,893 | py | Python | function_approx/cartpole/cartpole.py | code-asc/rl | 8e217f695d4219327fcec58061c213e534578a4d | [
"MIT"
] | null | null | null | function_approx/cartpole/cartpole.py | code-asc/rl | 8e217f695d4219327fcec58061c213e534578a4d | [
"MIT"
] | null | null | null | function_approx/cartpole/cartpole.py | code-asc/rl | 8e217f695d4219327fcec58061c213e534578a4d | [
"MIT"
] | null | null | null | import gym
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch as T
from utils import plot_learning_curve
class LinearDeepQNetwork(nn.Module):
def __init__(self, lr, n_actions, input_dims):
super(LinearDeepQNetwork, self).__init__()
self.fc1 = nn.Li... | 23.909091 | 102 | 0.6972 |
33afd7ef329677b1574f44c3619a717ced8039c5 | 845 | py | Python | habu/lib/loadcfg.py | optimustoaster/habu | 9ab5e7b8dd3b81b25dc48d4afc9f731a1b7489f0 | [
"BSD-3-Clause"
] | 1 | 2019-04-26T17:24:43.000Z | 2019-04-26T17:24:43.000Z | habu/lib/loadcfg.py | optimustoaster/habu | 9ab5e7b8dd3b81b25dc48d4afc9f731a1b7489f0 | [
"BSD-3-Clause"
] | null | null | null | habu/lib/loadcfg.py | optimustoaster/habu | 9ab5e7b8dd3b81b25dc48d4afc9f731a1b7489f0 | [
"BSD-3-Clause"
] | null | null | null | import pwd
import os
from pathlib import Path
import json
import sys
def loadcfg(environment=True):
cfg = {}
homedir = Path(pwd.getpwuid(os.getuid()).pw_dir)
cfgfile = homedir / '.habu.json'
if cfgfile.is_file():
#print('file exists!')
with cfgfile.open() as f:
try:
... | 22.236842 | 88 | 0.536095 |
920bb02c334b8ae248c3c4e44b51294dcd79eda9 | 145 | py | Python | ContactApp/urls.py | KaziFarhanuddin/Voting-website-with-django | 0e6f8207f1ea78d410f35c7bec3cff6df0105584 | [
"MIT"
] | 1 | 2021-08-28T16:06:59.000Z | 2021-08-28T16:06:59.000Z | ContactApp/urls.py | KaziFarhanuddin/Voting-website-with-django | 0e6f8207f1ea78d410f35c7bec3cff6df0105584 | [
"MIT"
] | 5 | 2021-04-08T18:42:47.000Z | 2022-01-13T01:00:10.000Z | ContactApp/urls.py | KaziFarhanuddin/Voting-website-with-django | 0e6f8207f1ea78d410f35c7bec3cff6df0105584 | [
"MIT"
] | null | null | null | from django.urls import path, include, re_path
from .views import ContactPage
urlpatterns = [
path('', ContactPage, name="contact-page"),
]
| 20.714286 | 47 | 0.724138 |
df0590f1f6b441fc207aad5bf228b8a9c8498271 | 636 | py | Python | app/request.py | Mark-Muiri/Blog-Town | 105291a791d47c65c34802866c45f27bb9a08de6 | [
"MIT"
] | null | null | null | app/request.py | Mark-Muiri/Blog-Town | 105291a791d47c65c34802866c45f27bb9a08de6 | [
"MIT"
] | null | null | null | app/request.py | Mark-Muiri/Blog-Town | 105291a791d47c65c34802866c45f27bb9a08de6 | [
"MIT"
] | null | null | null | import urllib.request, json
from .models import Quote
def get_quote():
'''
Function that gets the json response to our url request and returns a random quote
'''
quote_url = 'http://quotes.stormconsultancy.co.uk/random.json'
with urllib.request.urlopen(quote_url) as url:
get_quote_data = ... | 25.44 | 86 | 0.663522 |
59bfa70f8b54c70710401be5a50bb19e82fc53ad | 44 | py | Python | ServerSide/__init__.py | Susmit-A/decentralized-social-network | 8eb467fbe3cf41ba45f7d2b10970aa27cded1cb8 | [
"BSD-3-Clause"
] | null | null | null | ServerSide/__init__.py | Susmit-A/decentralized-social-network | 8eb467fbe3cf41ba45f7d2b10970aa27cded1cb8 | [
"BSD-3-Clause"
] | 4 | 2018-09-12T18:38:03.000Z | 2018-09-15T06:31:37.000Z | ServerSide/__init__.py | Vishal-V/decentralized-social-network | 48ecdf1c097202a4bd4ac22719eb55b8019b9490 | [
"BSD-3-Clause"
] | 2 | 2020-01-21T05:03:39.000Z | 2020-01-21T05:18:08.000Z | # For making classes in this folder global
| 22 | 43 | 0.772727 |
49df3ef573a1acd9c3a591de8691802ebdb54a36 | 22,948 | py | Python | scipy/special/__init__.py | zerothi/scipy | 396a3592767c7477d14083053ac7b772951f125e | [
"BSD-3-Clause"
] | null | null | null | scipy/special/__init__.py | zerothi/scipy | 396a3592767c7477d14083053ac7b772951f125e | [
"BSD-3-Clause"
] | null | null | null | scipy/special/__init__.py | zerothi/scipy | 396a3592767c7477d14083053ac7b772951f125e | [
"BSD-3-Clause"
] | 1 | 2020-08-06T07:23:10.000Z | 2020-08-06T07:23:10.000Z | """
========================================
Special functions (:mod:`scipy.special`)
========================================
.. module:: scipy.special
Nearly all of the functions below are universal functions and follow
broadcasting and automatic array-looping rules. Exceptions are noted.
Error handling
==========... | 34.981707 | 121 | 0.660014 |
4a8b8abe2b1ad67a41fe5420eca78f2e7131da0e | 551 | py | Python | orangengine/dispatcher.py | lampwins/oragengine | 5addcbe17bf7653d1e8aa143cb0dc9959d7bda6a | [
"MIT"
] | 17 | 2017-02-01T06:50:08.000Z | 2021-09-28T09:24:20.000Z | orangengine/dispatcher.py | lampwins/oragengine | 5addcbe17bf7653d1e8aa143cb0dc9959d7bda6a | [
"MIT"
] | 5 | 2016-11-15T16:03:51.000Z | 2019-06-27T19:55:54.000Z | orangengine/dispatcher.py | lampwins/oragengine | 5addcbe17bf7653d1e8aa143cb0dc9959d7bda6a | [
"MIT"
] | 7 | 2017-01-26T23:26:10.000Z | 2021-09-28T09:28:20.000Z | # -*- coding: utf-8 -*-
from orangengine.drivers import JuniperSRXDriver
from orangengine.drivers import PaloAltoPanoramaDriver
DRIVER_MAPPINGS = {
'juniper_srx': JuniperSRXDriver,
'palo_alto_panorama': PaloAltoPanoramaDriver,
}
platforms = list(DRIVER_MAPPINGS.keys())
def dispatch(*args, **kwargs):
""... | 25.045455 | 64 | 0.727768 |
bc3ad5587de08e81fe335952da2ac4cbc25c93cd | 1,276 | py | Python | samples/sample5.py | niwibe/cobrascript | 4c6a193d8745771e5fb0e277394f83e47cc7ede8 | [
"BSD-3-Clause"
] | 1 | 2015-05-03T00:25:17.000Z | 2015-05-03T00:25:17.000Z | samples/sample5.py | niwibe/cobrascript | 4c6a193d8745771e5fb0e277394f83e47cc7ede8 | [
"BSD-3-Clause"
] | null | null | null | samples/sample5.py | niwibe/cobrascript | 4c6a193d8745771e5fb0e277394f83e47cc7ede8 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import _global as g
def backlog_controller(scope, root_scope, route_params, rs, data, i18next):
root_scope.page_title = i18next.t("common.baclog")
root_scope.page_section = "backlog"
root_scope.page_breadcrumbs = [["", ""],[i18next.t("common.backlog"), None]]
root_scope.project... | 31.9 | 95 | 0.648119 |
4f370446647c8d2e302827191f654eff0c977d64 | 906 | py | Python | PROJ/LEVY/RN_CHF/cf_RN_KOU.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | null | null | null | PROJ/LEVY/RN_CHF/cf_RN_KOU.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | null | null | null | PROJ/LEVY/RN_CHF/cf_RN_KOU.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | 1 | 2022-01-07T15:31:45.000Z | 2022-01-07T15:31:45.000Z | # Generated with SMOP 0.41-beta
try:
from smop.libsmop import *
except ImportError:
raise ImportError('File compiled with `smop3`, please install `smop3` to run it.') from None
# cf_RN_KOU.m
@function
def cf_RN_KOU(u=None,T=None,r=None,sigma=None,lam=None,p_up=None,eta1=None,eta2=None,*args,**kw... | 32.357143 | 126 | 0.611479 |
686d4f558321d46bc17248a69cdc2604946ac4cb | 29,581 | py | Python | test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/azext_synapse/generated/commands.py | kingces95/autorest.az | 616138f2d86d34cb6238e43359cf97738fa2f1bb | [
"MIT"
] | null | null | null | test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/azext_synapse/generated/commands.py | kingces95/autorest.az | 616138f2d86d34cb6238e43359cf97738fa2f1bb | [
"MIT"
] | null | null | null | test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/azext_synapse/generated/commands.py | kingces95/autorest.az | 616138f2d86d34cb6238e43359cf97738fa2f1bb | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incor... | 68.95338 | 120 | 0.771543 |
3616d085a8a654760ec7dfd532d5ede40244356b | 6,420 | py | Python | test/api/server_delete/serverDelete.py | TerryOtt/globalprobe | e657ecccf3105abfebd9684a2082d59c60923d49 | [
"MIT"
] | null | null | null | test/api/server_delete/serverDelete.py | TerryOtt/globalprobe | e657ecccf3105abfebd9684a2082d59c60923d49 | [
"MIT"
] | null | null | null | test/api/server_delete/serverDelete.py | TerryOtt/globalprobe | e657ecccf3105abfebd9684a2082d59c60923d49 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import boto3
import logging
import os
import sys
import pprint
from warrant.aws_srp import AWSSRP
import requests
import psycopg2
def _attemptDeletes(logger, newServers, dbConnection, dbCursor):
removeServerEndpoint = "https://25zwa0yf5h.execute-api.us-east-2.amazonaws.com/dev/v1/server"
... | 30.140845 | 134 | 0.604984 |
aca721054d9d774da31eb935a1b5f4f73ec322b4 | 1,673 | py | Python | tests/configuration/test_config_manager.py | adragolov/qset-core | ca2beb9d1a530b75f8f93194649c9d9c3e8d6ac1 | [
"MIT"
] | null | null | null | tests/configuration/test_config_manager.py | adragolov/qset-core | ca2beb9d1a530b75f8f93194649c9d9c3e8d6ac1 | [
"MIT"
] | null | null | null | tests/configuration/test_config_manager.py | adragolov/qset-core | ca2beb9d1a530b75f8f93194649c9d9c3e8d6ac1 | [
"MIT"
] | null | null | null | from qset_core.configuration import ConfigManager, Environment
import pytest
import logging
import os
def test_constructor_with_ctor_param():
env = Environment.get_default()
instance = ConfigManager(env)
assert instance is not None
assert instance.environment is not None
assert instance.environmen... | 28.355932 | 102 | 0.75792 |
38c85d31f9a38189d6601ddd4647f02d784fbddf | 28,913 | py | Python | server/hw_controller/feeder.py | jeffeb3/sandypi | d8835e231f52738629371d46e99d3a36cf07b391 | [
"MIT"
] | null | null | null | server/hw_controller/feeder.py | jeffeb3/sandypi | d8835e231f52738629371d46e99d3a36cf07b391 | [
"MIT"
] | null | null | null | server/hw_controller/feeder.py | jeffeb3/sandypi | d8835e231f52738629371d46e99d3a36cf07b391 | [
"MIT"
] | null | null | null | from threading import Thread, Lock
import os
import time
import traceback
from collections import deque
from copy import deepcopy
import re
import logging
from dotenv import load_dotenv
from dotmap import DotMap
from server.utils import limited_size_dict, buffered_timeout, settings_utils
from server.hw_controller.devi... | 47.790083 | 360 | 0.609311 |
c83f992c3fe890216b3637717f56e15c6bdb1f26 | 5,980 | py | Python | Tetramino.py | newrotik/pytetris | 84b907fb886f510defecad1ae34a7060a602fd25 | [
"MIT"
] | null | null | null | Tetramino.py | newrotik/pytetris | 84b907fb886f510defecad1ae34a7060a602fd25 | [
"MIT"
] | null | null | null | Tetramino.py | newrotik/pytetris | 84b907fb886f510defecad1ae34a7060a602fd25 | [
"MIT"
] | null | null | null | import numpy as np
from collections import namedtuple
Position = namedtuple('Position', ['row','col'])
class Tetramino(object):
"Tetramino object subclasses all the tetraminos"
PIECE_GRID_ROWS = 1
PIECE_GRID_COLS = 1
PIECE_ORIENTATIONS = 1
def __init__(self, position=Position(0,0)):
# pos... | 39.602649 | 83 | 0.540803 |
50bd2b91168b18329eab0f2120c14384fdb2c3d4 | 13,822 | py | Python | google/cloud/compute_v1/services/instance_group_managers/pagers.py | vam-google/python-compute | 799f2f55e5e205317862a17ca7ed548ce2ca66e5 | [
"Apache-2.0"
] | 19 | 2021-02-10T21:17:20.000Z | 2022-02-20T03:16:36.000Z | google/cloud/compute_v1/services/instance_group_managers/pagers.py | vam-google/python-compute | 799f2f55e5e205317862a17ca7ed548ce2ca66e5 | [
"Apache-2.0"
] | 121 | 2021-01-08T23:46:58.000Z | 2022-03-26T04:34:36.000Z | google/cloud/compute_v1/services/instance_group_managers/pagers.py | vam-google/python-compute | 799f2f55e5e205317862a17ca7ed548ce2ca66e5 | [
"Apache-2.0"
] | 20 | 2021-01-08T23:14:16.000Z | 2022-02-25T01:27:20.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 39.378917 | 106 | 0.684633 |
c7f776c9a48cabf2fdd1a3fdf4b4a148cbd9336f | 22,256 | py | Python | test/ibmq/runtime/test_runtime_integration.py | kdk/qiskit-ibmq-provider | 5bc1d7a61a057894679e00784faa24bfb6c8de19 | [
"Apache-2.0"
] | null | null | null | test/ibmq/runtime/test_runtime_integration.py | kdk/qiskit-ibmq-provider | 5bc1d7a61a057894679e00784faa24bfb6c8de19 | [
"Apache-2.0"
] | null | null | null | test/ibmq/runtime/test_runtime_integration.py | kdk/qiskit-ibmq-provider | 5bc1d7a61a057894679e00784faa24bfb6c8de19 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 39.956912 | 99 | 0.636907 |
95e8f0918239729dd699b61bd6486d1872192393 | 161 | py | Python | setup.py | MinoDe/rescuetime | 6b0156fe005ad6a1610953d1b1a03f7645d9355d | [
"MIT"
] | 1 | 2022-03-01T20:19:38.000Z | 2022-03-01T20:19:38.000Z | setup.py | MinoDe/rescuetime | 6b0156fe005ad6a1610953d1b1a03f7645d9355d | [
"MIT"
] | null | null | null | setup.py | MinoDe/rescuetime | 6b0156fe005ad6a1610953d1b1a03f7645d9355d | [
"MIT"
] | null | null | null | from distutils.core import setup
DISTNAME='rescuetime'
FULLVERSION='0.1'
setup(name=DISTNAME,
version=FULLVERSION,
packages=['rescuetime']
)
| 16.1 | 32 | 0.695652 |
a9cdb316e93a09c707b60f27d770341653893b3e | 5,849 | py | Python | mne/parallel.py | jnvandermeer/mne-python | 143a1fbfd2a68a0ce8d700da9299564de0b92334 | [
"BSD-3-Clause"
] | null | null | null | mne/parallel.py | jnvandermeer/mne-python | 143a1fbfd2a68a0ce8d700da9299564de0b92334 | [
"BSD-3-Clause"
] | null | null | null | mne/parallel.py | jnvandermeer/mne-python | 143a1fbfd2a68a0ce8d700da9299564de0b92334 | [
"BSD-3-Clause"
] | null | null | null | """Parallel util function."""
# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: Simplified BSD
from .externals.six import string_types
import logging
import os
from . import get_config
from .utils import logger, verbose, warn, ProgressBar
from .fixes import _get_args
if 'MNE_FORCE_... | 35.883436 | 79 | 0.607625 |
eaceb5dcba641dc2dca447fa7ee851a9c6036c6e | 2,962 | py | Python | infra/bots/recipe_modules/flavor/ssh.py | Lightricks/skia | 7f5e3c7e43c74338cc52efc868daba7793f2e1ec | [
"BSD-3-Clause"
] | null | null | null | infra/bots/recipe_modules/flavor/ssh.py | Lightricks/skia | 7f5e3c7e43c74338cc52efc868daba7793f2e1ec | [
"BSD-3-Clause"
] | 1 | 2019-05-29T12:18:05.000Z | 2019-06-11T08:04:13.000Z | infra/bots/recipe_modules/flavor/ssh.py | Lightricks/skia | 7f5e3c7e43c74338cc52efc868daba7793f2e1ec | [
"BSD-3-Clause"
] | 2 | 2019-05-29T12:17:06.000Z | 2019-08-11T07:19:14.000Z | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine import recipe_api
import default
"""SSH flavor, used for running code on a remote device via SSH.
Must be subclassed to set self.devi... | 34.045977 | 80 | 0.67657 |
e1521a337276b69531078344ff74fa1633939c46 | 2,365 | py | Python | main.py | yashimself/RSA | 569f3f81b1608b80708517d2ae7e75b38792f1d9 | [
"MIT"
] | null | null | null | main.py | yashimself/RSA | 569f3f81b1608b80708517d2ae7e75b38792f1d9 | [
"MIT"
] | null | null | null | main.py | yashimself/RSA | 569f3f81b1608b80708517d2ae7e75b38792f1d9 | [
"MIT"
] | null | null | null | import random
import gen_prime
import time
def genkeys(p1, p2):
# Generating Public key
n = p1 * p2
phi = (p1 - 1) * (p2 - 1)
r = random.randint(2, 100) # For efficiency 2 < e < 100
while True:
if gcd(r, phi) == 1:
break
else:
r += 1
e = r
# Genera... | 25.989011 | 105 | 0.556871 |
309b9310936fd5fd156eb35fe3087e7d07ae7236 | 395 | py | Python | If-Elif-Else/calculator.py | LPetrova/Python | 0be5939ecfc5f0fecce33fee314bfe534aed8efd | [
"MIT"
] | null | null | null | If-Elif-Else/calculator.py | LPetrova/Python | 0be5939ecfc5f0fecce33fee314bfe534aed8efd | [
"MIT"
] | null | null | null | If-Elif-Else/calculator.py | LPetrova/Python | 0be5939ecfc5f0fecce33fee314bfe534aed8efd | [
"MIT"
] | null | null | null | a = int(input('Enter a: '))
b = int(input('Enter b: '))
operation = input('Enter operation: ')
result = False
if operation == '+':
result = a + b
elif operation == '-':
result = a - b
elif operation == '*':
result = a * b
elif operation == '/':
result = a / b
if result != False:
print('Result is... | 19.75 | 46 | 0.567089 |
2804731aa3ff179c9185a1e40d2939ee0c82f772 | 125 | py | Python | 467A George and Accommodation.py | YasirAhmad-EccentriX/CodeForces | d004b4d1b52a360ac6c06870e0a237345771e32c | [
"MIT"
] | 1 | 2021-01-29T16:30:09.000Z | 2021-01-29T16:30:09.000Z | 467A George and Accommodation.py | YasirAhmad-EccentriX/CodeForces | d004b4d1b52a360ac6c06870e0a237345771e32c | [
"MIT"
] | null | null | null | 467A George and Accommodation.py | YasirAhmad-EccentriX/CodeForces | d004b4d1b52a360ac6c06870e0a237345771e32c | [
"MIT"
] | null | null | null | c=0
for i in range(int(input())):
s=[int(i) for i in input().split()]
if s[0]+2 <= s[1]:
c+=1
print(c)
| 17.857143 | 40 | 0.456 |
61b6347d9a4d348c61580c623c78b48f2928628c | 1,020 | py | Python | siri/ifopt/ifopt_types_v0_2.py | grutts/siri | c388c209d1c803be166e767d5aa53a93a34c002d | [
"MIT"
] | null | null | null | siri/ifopt/ifopt_types_v0_2.py | grutts/siri | c388c209d1c803be166e767d5aa53a93a34c002d | [
"MIT"
] | null | null | null | siri/ifopt/ifopt_types_v0_2.py | grutts/siri | c388c209d1c803be166e767d5aa53a93a34c002d | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import List, Optional
__NAMESPACE__ = "http://www.ifopt.org.uk/ifopt"
@dataclass
class Extensions:
"""
Arbitrary extensions.
"""
class Meta:
namespace = "http://www.ifopt.org.uk/ifopt"
any_element: Optional[object] = field(
de... | 17.894737 | 57 | 0.526471 |
e51db7aca4e8946e1935d06cc3040a2176ef2c88 | 11,579 | py | Python | cost_per_char.py | RPGLite/analysis | 13f683beb26d77c6f7ae7de54808b0cb5acb9eee | [
"MIT"
] | null | null | null | cost_per_char.py | RPGLite/analysis | 13f683beb26d77c6f7ae7de54808b0cb5acb9eee | [
"MIT"
] | 1 | 2020-11-27T14:38:33.000Z | 2020-11-27T14:38:33.000Z | cost_per_char.py | RPGLite/analysis | 13f683beb26d77c6f7ae7de54808b0cb5acb9eee | [
"MIT"
] | null | null | null | # William Kavanagh, June 2020
from helper_fns import *
import numpy as np
import matplotlib.pyplot as plt
import math
from bson import objectid
s1data = process_lookup("beta")
s2data = process_lookup("tango-2-3")
def flip_state(s):
return [1] + s[10:] + s[1:10]
char_costs = [[],[],[],[],[],[],[],[]]
miss... | 42.259124 | 315 | 0.608256 |
f41f8644a7ae761b383dcf25103cd323d9c7d56c | 4,803 | py | Python | code/pyseg/globals/variables.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 12 | 2020-01-08T01:33:02.000Z | 2022-03-16T00:25:34.000Z | globals/variables.py | anmartinezs/pyseg | f991d8826e8d4e1eff70064183cb79425b7e9109 | [
"Apache-2.0"
] | 8 | 2019-12-19T19:34:56.000Z | 2022-03-10T10:11:28.000Z | globals/variables.py | anmartinezs/pyseg | f991d8826e8d4e1eff70064183cb79425b7e9109 | [
"Apache-2.0"
] | 2 | 2022-03-30T13:12:22.000Z | 2022-03-30T18:12:10.000Z | __author__ = 'martinez'
import os
import numpy as np
#####################################################################################################
# File with the set of the globals variables of PySeg package
#
# Paths
ROOT_DIR = os.path.dirname(os.path.dirname(os.getcwd()))
DATA_DIR = ROOT_DIR + '/data'
DPS... | 24.380711 | 101 | 0.768894 |
7019affd4feb84f87dfca8d9b5c4d4cbade5d684 | 323 | py | Python | src/tests/part1/q328_test_odd_even_linkedlist.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | src/tests/part1/q328_test_odd_even_linkedlist.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | src/tests/part1/q328_test_odd_even_linkedlist.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | from src.base.test_cases import TestCases
import src.mappers.list2linkedlist as l2l
class OddEvenLinkedlistTestCases(TestCases):
def __init__(self):
super(OddEvenLinkedlistTestCases, self).__init__()
self.__add_test_case__("Test 1", l2l.to_linkedlist([1,2,3,4,5,6]), l2l.to_linkedlist([1,3,5,2,4,6... | 35.888889 | 108 | 0.743034 |
560a622b92f46298dcd21cf209b624087b4f690c | 11,862 | py | Python | Model/din-model/din_model/trainer/model.py | sanjaynirmal/blue-marlin | 725d614e941e5de76562d354edf11ac18897f242 | [
"Apache-2.0"
] | 21 | 2019-10-08T16:23:44.000Z | 2020-04-08T23:14:36.000Z | Model/din-model/din_model/trainer/model.py | sanjaynirmal/blue-marlin | 725d614e941e5de76562d354edf11ac18897f242 | [
"Apache-2.0"
] | 162 | 2019-10-26T05:30:04.000Z | 2022-03-30T12:44:41.000Z | Model/din-model/din_model/trainer/model.py | sanjaynirmal/blue-marlin | 725d614e941e5de76562d354edf11ac18897f242 | [
"Apache-2.0"
] | 33 | 2019-10-09T01:31:12.000Z | 2022-03-29T08:00:36.000Z | import tensorflow as tf
from dice import dice
from tensorflow.python.ops.rnn_cell import GRUCell
from rnn import dynamic_rnn
USE_DICE = True
USE_RNN = True
class Model(object):
def __init__(self, user_count, item_count, cate_count, cate_list, predict_batch_size, predict_ads_num):
self.u = tf.placeholder(tf.in... | 40.210169 | 139 | 0.658236 |
bf2569a2cdd86f64d60440b918aa10f50e557a01 | 16,810 | py | Python | auto_focusing.py | KawashimaLab/PyZebrascope_public | 4d2036eb18af882e6b5b92e763561fd8ca745cc9 | [
"MIT"
] | 4 | 2022-02-10T15:28:17.000Z | 2022-02-19T14:34:48.000Z | auto_focusing.py | KawashimaLab/PyZebrascope_public | 4d2036eb18af882e6b5b92e763561fd8ca745cc9 | [
"MIT"
] | null | null | null | auto_focusing.py | KawashimaLab/PyZebrascope_public | 4d2036eb18af882e6b5b92e763561fd8ca745cc9 | [
"MIT"
] | null | null | null |
import matplotlib.pyplot as plt
import numpy as np
from scipy.signal import medfilt
from scipy.optimize import minimize
from PyQt5 import QtCore, QtGui, QtWidgets, uic
from PyQt5.QtCore import QThread, QObject
from PyQt5.QtWidgets import QWidget,QGridLayout
from matplotlib.figure import Figure
from matplotlib.backends... | 38.204545 | 194 | 0.529209 |
deb82fd73f4f8a40f684271e0235022322e92ef7 | 2,431 | py | Python | kafkarator/models.py | navikt/nada-kafkarator | d2be90d5d0ae0cddbe434c0180c2945de53ab018 | [
"MIT"
] | null | null | null | kafkarator/models.py | navikt/nada-kafkarator | d2be90d5d0ae0cddbe434c0180c2945de53ab018 | [
"MIT"
] | 11 | 2020-06-18T11:17:52.000Z | 2021-10-01T10:55:22.000Z | kafkarator/models.py | navikt/nada-kafkarator | d2be90d5d0ae0cddbe434c0180c2945de53ab018 | [
"MIT"
] | 1 | 2020-08-13T12:51:03.000Z | 2020-08-13T12:51:03.000Z | from k8s.base import Model
from k8s.fields import Field, ListField
from k8s.models.common import ObjectMeta
class TopicSpec(Model):
name = Field(str)
config = Field(dict)
class Topic(Model):
"""Configures a topic"""
class Meta:
list_url = "/apis/kafkarator.nais.io/v1/topic"
url_temp... | 31.571429 | 111 | 0.703826 |
fbb503e43e105e0484797922ccbcfc6f459f2abf | 5,001 | py | Python | improver_tests/acceptance/test_combine.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | 77 | 2017-04-26T07:47:40.000Z | 2022-03-31T09:40:49.000Z | improver_tests/acceptance/test_combine.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | 1,440 | 2017-03-29T10:04:15.000Z | 2022-03-28T10:11:29.000Z | improver_tests/acceptance/test_combine.py | MoseleyS/improver | ca028e3a1c842e3ff00b188c8ea6eaedd0a07149 | [
"BSD-3-Clause"
] | 72 | 2017-03-17T16:53:45.000Z | 2022-02-16T09:41:37.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 36.50365 | 85 | 0.679264 |
49d31f37e66b34e2e15ef4d99e247236980ce8cf | 6,770 | py | Python | core/polyaxon/polyflow/hooks/__init__.py | Ohtar10/polyaxon | 1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931 | [
"Apache-2.0"
] | null | null | null | core/polyaxon/polyflow/hooks/__init__.py | Ohtar10/polyaxon | 1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931 | [
"Apache-2.0"
] | null | null | null | core/polyaxon/polyflow/hooks/__init__.py | Ohtar10/polyaxon | 1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 30.495495 | 97 | 0.674889 |
d0f7e02d8ff8a78b104cefc21c6c7a589af2d084 | 2,431 | py | Python | graphblas/tests/test_prefix_scan.py | jim22k/grblas | 7c96ddd3cb485f2c98637e7fb96070ff6c48d219 | [
"Apache-2.0"
] | 4 | 2020-01-25T00:16:13.000Z | 2020-04-23T04:25:13.000Z | graphblas/tests/test_prefix_scan.py | jim22k/grblas | 7c96ddd3cb485f2c98637e7fb96070ff6c48d219 | [
"Apache-2.0"
] | 25 | 2020-03-10T16:28:22.000Z | 2020-07-22T02:13:52.000Z | graphblas/tests/test_prefix_scan.py | jim22k/grblas | 7c96ddd3cb485f2c98637e7fb96070ff6c48d219 | [
"Apache-2.0"
] | 1 | 2020-03-13T21:39:50.000Z | 2020-03-13T21:39:50.000Z | import numpy as np
import pytest
import graphblas as gb
from graphblas import binary, monoid
from graphblas import Matrix, Vector # isort:skip (for dask-graphblas)
try:
# gb.io.to_numpy currently requires scipy
import scipy.sparse as ss
except ImportError: # pragma: no cover
ss = None
@pytest.mark.sk... | 29.646341 | 71 | 0.622378 |
28388d076180a7d23785d4230695a9199d3635d1 | 6,564 | py | Python | src/rna/steps/sum.py | nellore/rail | 8827a7a0b1195c04cddf6d7a23ec7885619716ca | [
"MIT"
] | 78 | 2015-04-13T19:50:16.000Z | 2022-02-02T10:39:42.000Z | src/rna/steps/sum.py | nellore/rail | 8827a7a0b1195c04cddf6d7a23ec7885619716ca | [
"MIT"
] | 37 | 2015-04-30T16:31:27.000Z | 2020-11-30T18:58:55.000Z | src/rna/steps/sum.py | nellore/rail | 8827a7a0b1195c04cddf6d7a23ec7885619716ca | [
"MIT"
] | 17 | 2015-04-12T00:02:57.000Z | 2021-12-01T05:16:15.000Z | """
Rail-RNA-sum
Used at various points in pipeline
Generic combiner/reducer script for MapReduce pipelines that sums values that
have the same key. A value is an integer/float/string from the final K fields,
and a key is the concatenation of fields that precede the final K fields.
Strings are summed by separating th... | 31.557692 | 79 | 0.56688 |
abefc7cf98750690e7388eae4c0af6a2607a7d7c | 1,472 | py | Python | push_release.py | benjamin-hodgson/es-profile-visualiser | ec2af23e442e00e7564143e9dc08e9ed6f49a016 | [
"MIT"
] | 1 | 2018-02-09T18:13:51.000Z | 2018-02-09T18:13:51.000Z | push_release.py | benjamin-hodgson/es-profile-visualiser | ec2af23e442e00e7564143e9dc08e9ed6f49a016 | [
"MIT"
] | null | null | null | push_release.py | benjamin-hodgson/es-profile-visualiser | ec2af23e442e00e7564143e9dc08e9ed6f49a016 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import glob
import json
import os
import os.path
import sys
import requests
def get_or_create_release(tag, session):
get_resp = session.get("https://api.github.com/repos/benjamin-hodgson/es-profile-visualiser/releases/tags/" + tag)
if get_resp.status_code == 404:
# release do... | 27.259259 | 118 | 0.639946 |
b1ec94b51bc11e7707eda1159701e18436b6c538 | 2,456 | py | Python | toontown/ai/CogPageManagerAI.py | journeyfan/toontown-journey | 7a4db507e5c1c38a014fc65588086d9655aaa5b4 | [
"MIT"
] | 1 | 2020-09-27T22:12:47.000Z | 2020-09-27T22:12:47.000Z | toontown/ai/CogPageManagerAI.py | journeyfan/toontown-journey | 7a4db507e5c1c38a014fc65588086d9655aaa5b4 | [
"MIT"
] | null | null | null | toontown/ai/CogPageManagerAI.py | journeyfan/toontown-journey | 7a4db507e5c1c38a014fc65588086d9655aaa5b4 | [
"MIT"
] | 2 | 2020-09-26T20:37:18.000Z | 2020-11-15T20:55:33.000Z | from toontown.suit import SuitDNA
from toontown.shtiker.CogPageGlobals import *
class CogPageManagerAI:
def toonEncounteredCogs(self, toon, encounteredCogs, zoneId):
cogs = toon.cogs
for cog in encounteredCogs:
if toon.getDoId() in cog['activeToons']:
cogIndex = SuitDNA... | 41.627119 | 78 | 0.561889 |
01210e15a4d3ff1b8635de33fe6db4e8029e97e2 | 7,991 | py | Python | wce/word_count_estimation/word_count_estimator.py | bootphon/word-count-estimator | 13cdaf92799fb288652a40a30a30423aacf81803 | [
"Apache-2.0"
] | 6 | 2019-08-21T08:25:35.000Z | 2021-09-18T17:55:29.000Z | wce/word_count_estimation/word_count_estimator.py | bootphon/word-count-estimator | 13cdaf92799fb288652a40a30a30423aacf81803 | [
"Apache-2.0"
] | 4 | 2019-12-17T12:54:34.000Z | 2020-11-13T18:18:12.000Z | wce/word_count_estimation/word_count_estimator.py | bootphon/word-count-estimator | 13cdaf92799fb288652a40a30a30423aacf81803 | [
"Apache-2.0"
] | null | null | null | import sys
import pickle
from statsmodels.api import OLS, add_constant
import numpy as np
from .utility import peakdet
THR = np.concatenate((np.linspace(0.0001, 0.0009, 9),
np.array([0.001]),
np.linspace(0.002, 0.01, 9),
np.linspace(0.012, 0.492, 25),
... | 33.020661 | 81 | 0.598924 |
0a1a95dcb8b6a78b3d05998294d1a7e88071d67b | 14,319 | py | Python | salt/modules/boto_secgroup.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | 1 | 2015-08-20T21:55:17.000Z | 2015-08-20T21:55:17.000Z | salt/modules/boto_secgroup.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | null | null | null | salt/modules/boto_secgroup.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon Security Groups
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit ec2 credentials but can
also utilize IAM roles assigned to the instance trough Instance Profiles.
Dynamic credentials are then automatically obtained from AWS API an... | 34.839416 | 139 | 0.593198 |
49613a5aac7640451b21d4ce2594ec9f84a9a584 | 25 | py | Python | hello.py | muthu119/HelloWorld | f108e585268c63d1f3876172b1609f06df764580 | [
"MIT"
] | null | null | null | hello.py | muthu119/HelloWorld | f108e585268c63d1f3876172b1609f06df764580 | [
"MIT"
] | null | null | null | hello.py | muthu119/HelloWorld | f108e585268c63d1f3876172b1609f06df764580 | [
"MIT"
] | null | null | null | import io
added new line
| 8.333333 | 14 | 0.8 |
0d86063852561fbae3b9d79b3411f89b3072b9d3 | 3,340 | py | Python | package-lambda-layer/python/boto3/__init__.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | package-lambda-layer/python/boto3/__init__.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | package-lambda-layer/python/boto3/__init__.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 30.09009 | 81 | 0.703593 |
5893c11f7ee4c7606d22f7cba2877b15f77c2152 | 49,210 | py | Python | library/juniper_junos_config.py | fooelisa/ansible-junos-stdlib | a6b5dd3c64d185e82fca0ca0678d78c93b0f9739 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2015-10-01T21:55:22.000Z | 2016-06-21T13:45:16.000Z | library/juniper_junos_config.py | fooelisa/ansible-junos-stdlib | a6b5dd3c64d185e82fca0ca0678d78c93b0f9739 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | library/juniper_junos_config.py | fooelisa/ansible-junos-stdlib | a6b5dd3c64d185e82fca0ca0678d78c93b0f9739 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2016-04-19T23:53:15.000Z | 2016-04-19T23:53:15.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 1999-2018, Juniper Networks Inc.
# 2014, Jeremy Schulman
# 2015, Rick Sherman
#
# All rights reserved.
#
# License: Apache 2.0
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provi... | 42.276632 | 172 | 0.610445 |
bea03264d44c9c99e89e5cd9b453dcce16d096b8 | 69 | py | Python | src/hparams/__init__.py | akshatha-k/MCDropConnect-PyTorch | b970557443896f9c293576d3970da30808ce2373 | [
"MIT"
] | 1 | 2020-10-14T12:32:33.000Z | 2020-10-14T12:32:33.000Z | src/hparams/__init__.py | akshatha-k/MCDropConnect-PyTorch | b970557443896f9c293576d3970da30808ce2373 | [
"MIT"
] | null | null | null | src/hparams/__init__.py | akshatha-k/MCDropConnect-PyTorch | b970557443896f9c293576d3970da30808ce2373 | [
"MIT"
] | null | null | null | __all__ = ['resnet', 'vgg']
from .resnet import *
from .vgg import * | 17.25 | 27 | 0.652174 |
3f7fc0b78e105e8718e882d2613b7fbff108d7f2 | 323 | py | Python | python/347_Top_K_Frequent_Elements.py | dvlpsh/leetcode-1 | f965328af72113ac8a5a9d6624868c1502be937b | [
"MIT"
] | 4,416 | 2016-03-30T15:02:26.000Z | 2022-03-31T16:31:03.000Z | python/347_Top_K_Frequent_Elements.py | YinpuLi/leetcode-6 | 1371de2631d745efba39de41b51c3424e35da434 | [
"MIT"
] | 20 | 2018-11-17T13:46:25.000Z | 2022-03-13T05:37:06.000Z | python/347_Top_K_Frequent_Elements.py | YinpuLi/leetcode-6 | 1371de2631d745efba39de41b51c3424e35da434 | [
"MIT"
] | 1,374 | 2017-05-26T15:44:30.000Z | 2022-03-30T19:21:02.000Z | class Solution(object):
def topKFrequent(self, nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: List[int]
"""
counter = collections.Counter(nums)
return [k for k,v in counter.most_common(k)]
# return heapq.nlargest(k, count.keys(), key=count.ge... | 29.363636 | 63 | 0.557276 |
1d6dca4c538b5a0a22ccbeddee4efa12a3cee385 | 1,441 | py | Python | openduty/settings_dev.py | gueux/openduty | 442a9a358f06408f27149c5cd311e51859ed7bc0 | [
"MIT"
] | 595 | 2015-01-04T15:34:04.000Z | 2022-01-21T14:13:32.000Z | openduty/settings_dev.py | gueux/openduty | 442a9a358f06408f27149c5cd311e51859ed7bc0 | [
"MIT"
] | 65 | 2015-01-02T01:57:37.000Z | 2019-01-28T12:18:12.000Z | openduty/settings_dev.py | gueux/openduty | 442a9a358f06408f27149c5cd311e51859ed7bc0 | [
"MIT"
] | 214 | 2015-01-03T20:48:55.000Z | 2022-03-22T09:18:12.000Z | from settings import *
DEBUG = True
TEMPLATE_DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
import sys
if 'test' not in sys.argv:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'openduty',
'USER': 'opend... | 24.423729 | 95 | 0.689799 |
3f2d0171273d2062eb7bd072f9228999d5fcca2a | 17,174 | py | Python | detect.py | patel-rupin2000/OCR_for_hindi_english | 3c701be8b4cb74f89c422b79f615a4cc4b32abda | [
"MIT"
] | 2 | 2022-03-22T07:11:33.000Z | 2022-03-27T10:30:13.000Z | detect.py | patel-rupin2000/OCR_for_hindi_english | 3c701be8b4cb74f89c422b79f615a4cc4b32abda | [
"MIT"
] | null | null | null | detect.py | patel-rupin2000/OCR_for_hindi_english | 3c701be8b4cb74f89c422b79f615a4cc4b32abda | [
"MIT"
] | 1 | 2022-03-22T07:17:32.000Z | 2022-03-22T07:17:32.000Z | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
"""
Run inference on images, videos, directories, streams, etc.
Usage:
$ python path/to/detect.py --source path/to/img.jpg --weights yolov5s.pt --img 640
"""
import argparse
import os
import sys
from pathlib import Path
import cv2
import numpy as np
import torch
import... | 49.492795 | 120 | 0.575579 |
eef0b6a2581e0d5b4841ef3a0852da0493712cdc | 3,123 | py | Python | analyze_dual_csvstream.py | RoelBouman/ArtificialStreaming | 537c8a305b0650e4d743b7ad8373881cfe439588 | [
"Apache-2.0"
] | null | null | null | analyze_dual_csvstream.py | RoelBouman/ArtificialStreaming | 537c8a305b0650e4d743b7ad8373881cfe439588 | [
"Apache-2.0"
] | null | null | null | analyze_dual_csvstream.py | RoelBouman/ArtificialStreaming | 537c8a305b0650e4d743b7ad8373881cfe439588 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from pyspark.sql import SparkSession
from pyspark.sql.types import DoubleType
from pyspark.sql.types import StructField
from pyspark.sql.types import StructType
from py... | 43.985915 | 129 | 0.566763 |
b110f978c12e9b958521ea4fc80a0133f79ca3e0 | 713 | py | Python | pcstac/pcstac/search.py | aliasmrchips/planetary-computer-apis | dbfb5cccb85efaded0219fcd3287c210112a63a3 | [
"MIT"
] | null | null | null | pcstac/pcstac/search.py | aliasmrchips/planetary-computer-apis | dbfb5cccb85efaded0219fcd3287c210112a63a3 | [
"MIT"
] | null | null | null | pcstac/pcstac/search.py | aliasmrchips/planetary-computer-apis | dbfb5cccb85efaded0219fcd3287c210112a63a3 | [
"MIT"
] | null | null | null | from typing import Optional
import attr
from pydantic.types import conint
from stac_fastapi.api.models import BaseSearchGetRequest, ItemCollectionUri
from stac_fastapi.pgstac.types.search import PgstacSearch
DEFAULT_LIMIT = 250
class PCSearch(PgstacSearch):
# Increase the default limit for performance
# Ign... | 28.52 | 75 | 0.785414 |
6fad3ca0d660ffa03deb2e89ffb4ed8fa3684527 | 285 | py | Python | src/deephaven/plugin/matplotlib/__init__.py | mofojed/deephaven-plugin-matplotlib | 461632d8d34942c1f869d190c8850c56754f688d | [
"Apache-2.0"
] | null | null | null | src/deephaven/plugin/matplotlib/__init__.py | mofojed/deephaven-plugin-matplotlib | 461632d8d34942c1f869d190c8850c56754f688d | [
"Apache-2.0"
] | null | null | null | src/deephaven/plugin/matplotlib/__init__.py | mofojed/deephaven-plugin-matplotlib | 461632d8d34942c1f869d190c8850c56754f688d | [
"Apache-2.0"
] | null | null | null | from deephaven.plugin import Registration
__version__ = "0.0.1.dev5"
class MatplotlibRegistration(Registration):
@classmethod
def register_into(cls, callback: Registration.Callback) -> None:
from . import figure_type
callback.register(figure_type.FigureType)
| 28.5 | 68 | 0.750877 |
3e5058a23785e5aa9cafc0b07fa748a4fdeb9710 | 988 | py | Python | setup.py | cdeil/freezegun | 2bc19f5f0412379e4f832b6654a7141321d78562 | [
"Apache-2.0"
] | null | null | null | setup.py | cdeil/freezegun | 2bc19f5f0412379e4f832b6654a7141321d78562 | [
"Apache-2.0"
] | null | null | null | setup.py | cdeil/freezegun | 2bc19f5f0412379e4f832b6654a7141321d78562 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup
with open('README.rst') as f:
readme = f.read()
setup(
name='freezegun',
version='1.0.0',
description='Let your Python tests travel through time',
long_description=readme,
author='Steve Pulec',
author_email='spulec@gmail.com',
url='ht... | 30.875 | 70 | 0.626518 |
a0ebd130b8b5efbf5c5600d7756b1aefc424cbcd | 4,801 | py | Python | qc/src/main.py | fmidev/tiuha | de61c13cd9e1726b3d854e1cfa8308618b14a56f | [
"MIT"
] | 2 | 2022-01-13T20:48:36.000Z | 2022-01-19T06:04:30.000Z | qc/src/main.py | fmidev/tiuha | de61c13cd9e1726b3d854e1cfa8308618b14a56f | [
"MIT"
] | null | null | null | qc/src/main.py | fmidev/tiuha | de61c13cd9e1726b3d854e1cfa8308618b14a56f | [
"MIT"
] | null | null | null | from itertools import groupby
import argparse
import boto3
import gzip
import json
import os
import sys
import netatmo_qc
VERSION = os.environ.get("VERSION", None)
class FeatureCollection:
def __init__(self, collection):
self.collection = collection
self.features = collection["features"]
... | 36.648855 | 119 | 0.673401 |
a8b4f9ebe8adda2dcb854399bb0284e75eb02570 | 1,800 | py | Python | docs/examples/objects/w5_metagenomics.py | kxk302/bioblend | a0af6725228c1c6bce6bda2994cd5ec3199d12eb | [
"MIT"
] | null | null | null | docs/examples/objects/w5_metagenomics.py | kxk302/bioblend | a0af6725228c1c6bce6bda2994cd5ec3199d12eb | [
"MIT"
] | null | null | null | docs/examples/objects/w5_metagenomics.py | kxk302/bioblend | a0af6725228c1c6bce6bda2994cd5ec3199d12eb | [
"MIT"
] | null | null | null | import json
import os
import sys
from common import get_one # noqa:I100,I201
from bioblend.galaxy.objects import GalaxyInstance
URL = "https://orione.crs4.it"
API_KEY = os.getenv("GALAXY_API_KEY", "YOUR_API_KEY")
if API_KEY == "YOUR_API_KEY":
sys.exit("API_KEY not set, see the README.txt file")
gi = GalaxyInsta... | 30 | 91 | 0.757778 |
0c41abf75a97f4aac33c725b6e9472ed8aa4ea95 | 4,293 | py | Python | cdk-s3-sns-latency/cdk_s3_sns_latency/cdk_s3_sns_latency_stack.py | MauriceBrg/aws-blog.de-projects | ce0e86ccdd845c68c41d9190239926756e09c998 | [
"MIT"
] | 36 | 2019-10-01T12:19:49.000Z | 2021-09-11T00:55:43.000Z | cdk-s3-sns-latency/cdk_s3_sns_latency/cdk_s3_sns_latency_stack.py | MauriceBrg/aws-blog.de-projects | ce0e86ccdd845c68c41d9190239926756e09c998 | [
"MIT"
] | 2 | 2021-06-02T00:19:43.000Z | 2021-06-02T00:51:48.000Z | cdk-s3-sns-latency/cdk_s3_sns_latency/cdk_s3_sns_latency_stack.py | MauriceBrg/aws-blog.de-projects | ce0e86ccdd845c68c41d9190239926756e09c998 | [
"MIT"
] | 29 | 2019-07-23T04:05:15.000Z | 2021-08-12T14:36:57.000Z | import os
import aws_cdk.aws_dynamodb as dynamodb
import aws_cdk.aws_lambda as _lambda
import aws_cdk.aws_lambda_event_sources as lambda_event_sources
import aws_cdk.aws_sns as sns
import aws_cdk.aws_ssm as ssm
import aws_cdk.aws_s3 as s3
import aws_cdk.aws_s3_notifications as s3_notifications
from aws_cdk import cor... | 32.770992 | 92 | 0.626601 |
6888719a5c35383c3c15e29f376bb9c80e59015e | 1,011 | py | Python | tools/map_viewer.py | Kontari/VillageRevamp | bb89b54a6367dc76567fe5f996d47435610caab6 | [
"MIT"
] | null | null | null | tools/map_viewer.py | Kontari/VillageRevamp | bb89b54a6367dc76567fe5f996d47435610caab6 | [
"MIT"
] | null | null | null | tools/map_viewer.py | Kontari/VillageRevamp | bb89b54a6367dc76567fe5f996d47435610caab6 | [
"MIT"
] | null | null | null | import curses
from village.world.structs import GameMap
x=0
dy=0
test = GameMap()
viewmode = 1
screen = curses.initscr()
curses.curs_set(0)
curses.noecho()
screen.border('|','|','-','-','x','x','x','x')
x_len = (curses.COLS - 5)
while x != ord('q'):
# Underlying map
for i in range(curses.LINES - 2):
... | 20.22 | 95 | 0.518299 |
a5cc336fca89f2a6dd497c87e2a51ed310512775 | 8,717 | py | Python | evaluate_encdec.py | harshmathur1990/sicon | d45a307f870d872048fdee50a3d6ae3b68b4a65b | [
"MIT"
] | 6 | 2019-04-10T13:49:07.000Z | 2021-12-18T03:18:41.000Z | evaluate_encdec.py | aasensio/dasi | 1c73b75a5286e30fa56af6754f7fe3c265f6dcb7 | [
"MIT"
] | null | null | null | evaluate_encdec.py | aasensio/dasi | 1c73b75a5286e30fa56af6754f7fe3c265f6dcb7 | [
"MIT"
] | 1 | 2021-04-22T13:48:07.000Z | 2021-04-22T13:48:07.000Z | import numpy as np
import matplotlib.pyplot as pl
import torch
import torch.nn as nn
import torch.utils.data as data
from torch.autograd import Variable
from torch.nn.modules.module import _addindent
import h5py
import time
import sys
import model_encdec as model
class deep_3d_inversor(object):
def __init__(self,... | 41.509524 | 170 | 0.525066 |
495f6b8d7832e8ec9d074ddad62c83d78e99ea8f | 2,591 | py | Python | benchmark/startPyquil1876.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1876.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1876.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=69
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=3
pr... | 25.91 | 64 | 0.534157 |
e69082e96c7248a9cdbc0886f2ce6ef5469f296d | 9,042 | py | Python | config/settings/common.py | alexKwonIsAwesome/yebigundrive | 2b0410792dbe5ee6f9cb7284773b981c3dad0ad0 | [
"MIT"
] | null | null | null | config/settings/common.py | alexKwonIsAwesome/yebigundrive | 2b0410792dbe5ee6f9cb7284773b981c3dad0ad0 | [
"MIT"
] | null | null | null | config/settings/common.py | alexKwonIsAwesome/yebigundrive | 2b0410792dbe5ee6f9cb7284773b981c3dad0ad0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Django settings for yebigundrive project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
from __future__ import absolute_import, unicod... | 35.598425 | 103 | 0.616567 |
2c1c2c3f6c1ee60d105ff2a8ec38c20e98da005b | 24,884 | py | Python | trinity/config.py | renaynay/trinity | b85f37281b21c00dce91b7c61ba018788467c270 | [
"MIT"
] | 3 | 2019-06-17T13:59:20.000Z | 2021-05-02T22:09:13.000Z | trinity/config.py | renaynay/trinity | b85f37281b21c00dce91b7c61ba018788467c270 | [
"MIT"
] | null | null | null | trinity/config.py | renaynay/trinity | b85f37281b21c00dce91b7c61ba018788467c270 | [
"MIT"
] | 2 | 2019-12-14T02:52:32.000Z | 2021-02-18T23:04:44.000Z | from abc import (
ABC,
abstractmethod,
)
import argparse
from contextlib import (
contextmanager,
)
from enum import (
Enum,
auto,
)
import json
from pathlib import (
Path,
)
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterable,
NamedTuple,
Tuple,
Type,
TypeVar... | 32.316883 | 99 | 0.63358 |
c6c047330c84e5f5d6ebfab30115dea7c8a16c64 | 591 | py | Python | src/core/views.py | irislawly/Tars-Nasa-Space-Apps-2020 | 0e1fd0976320d236a15c4801164d799140d3327d | [
"bzip2-1.0.6",
"MIT"
] | 1 | 2020-05-27T04:46:23.000Z | 2020-05-27T04:46:23.000Z | src/core/views.py | irislawly/Tars-Nasa-Space-Apps-2020 | 0e1fd0976320d236a15c4801164d799140d3327d | [
"bzip2-1.0.6",
"MIT"
] | 6 | 2021-03-19T04:22:28.000Z | 2021-09-22T19:08:10.000Z | src/core/views.py | irislawly/Tars-Nasa-Space-Apps-2020 | 0e1fd0976320d236a15c4801164d799140d3327d | [
"bzip2-1.0.6",
"MIT"
] | 1 | 2020-09-16T05:14:53.000Z | 2020-09-16T05:14:53.000Z | from django.shortcuts import render
from django.http import JsonResponse
# third party imports
from rest_framework.views import APIView
from rest_framework.response import Response
class ParkView(APIView):
def get(self, request, *args, **kwargs):
park = {
'type': 'Feature',
'proper... | 25.695652 | 56 | 0.505922 |
b153485dc5b50b87824b43c015cc557cfeaed941 | 1,995 | py | Python | c6_automating-real-world-tasks-python/2_interacting-with-web-services/project/script.py | chaiyeow/google-it-automation | 3f02d739178abd5805114cfc027120b8d6ea81c8 | [
"MIT"
] | 220 | 2020-09-23T21:17:49.000Z | 2022-03-30T18:46:07.000Z | c6_automating-real-world-tasks-python/2_interacting-with-web-services/project/script.py | chaiyeow/google-it-automation | 3f02d739178abd5805114cfc027120b8d6ea81c8 | [
"MIT"
] | 4 | 2020-10-18T11:08:49.000Z | 2021-05-31T10:32:00.000Z | c6_automating-real-world-tasks-python/2_interacting-with-web-services/project/script.py | chaiyeow/google-it-automation | 3f02d739178abd5805114cfc027120b8d6ea81c8 | [
"MIT"
] | 366 | 2020-09-22T18:05:01.000Z | 2022-03-31T17:47:17.000Z | #! /usr/bin/env python3
# Google IT Automation with Python Professional Certificate
# Elmo Allistair
# 11 Agu 2020
import os
import requests
'''
List all .txt files under /data/feedback directory that contains the actual feedback to be displayed on the company's website.
Hint: Use os.listdir() method for this, which... | 41.5625 | 179 | 0.679198 |
b6bb66404c5cd512e0b5fba19e890708a56daf27 | 4,016 | py | Python | btclib/numbertheory.py | hodlwave/btclib | ff6706deb6118f070fce4a8248dc49b5ac1d3823 | [
"MIT"
] | null | null | null | btclib/numbertheory.py | hodlwave/btclib | ff6706deb6118f070fce4a8248dc49b5ac1d3823 | [
"MIT"
] | null | null | null | btclib/numbertheory.py | hodlwave/btclib | ff6706deb6118f070fce4a8248dc49b5ac1d3823 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (C) 2017-2019 The btclib developers
#
# This file is part of btclib. It is subject to the license terms in the
# LICENSE file found in the top-level directory of this distribution.
#
# No part of btclib including this file, may be copied, modified, propagated,
# or distributed except... | 28.685714 | 131 | 0.582669 |
37233d4a2ffc4a70e84b5b2d991ffb750f1da6c0 | 5,995 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20210401preview/get_mongo_db_resource_mongo_db_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20210401preview/get_mongo_db_resource_mongo_db_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20210401preview/get_mongo_db_resource_mongo_db_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 38.677419 | 505 | 0.654545 |
f4ca031cd2a4d851938b0e6c71a0f9a440ef3160 | 1,528 | py | Python | src/model/PredRNNpp/GradientHighwayUnit.py | dreaming-coder/DeepLab | 3020544e2f9e139dde7bd04f6ff59e6f44d49c6e | [
"Apache-2.0"
] | 3 | 2021-05-31T09:25:59.000Z | 2022-03-10T08:09:51.000Z | src/model/PredRNNpp/GradientHighwayUnit.py | dreaming-coder/DeepLab | 3020544e2f9e139dde7bd04f6ff59e6f44d49c6e | [
"Apache-2.0"
] | 1 | 2021-09-26T16:37:39.000Z | 2021-09-28T00:43:05.000Z | src/model/PredRNNpp/GradientHighwayUnit.py | dreaming-coder/DeepLab | 3020544e2f9e139dde7bd04f6ff59e6f44d49c6e | [
"Apache-2.0"
] | null | null | null | r"""
高速梯度路GHU的实现
"""
import torch
from torch import nn, Tensor
__all__ = ["GradientHighwayUnit"]
class GradientHighwayUnit(nn.Module):
def __init__(self, in_channels: int, hidden_channels: int, kernel_size: int):
r"""
:param in_channels: 输入通道
:param hidden_channels: 状态通道
:... | 28.296296 | 81 | 0.59555 |
54d54572c06dcb51c5a4619e5f4b3142bc4af8d6 | 358 | py | Python | eyeworldco_custom_site/config/docs.py | MostafaFekry/eyeworldco_custom_site | 30e5ab47412841d0d33cab27a9dfaf1c330d0833 | [
"MIT"
] | null | null | null | eyeworldco_custom_site/config/docs.py | MostafaFekry/eyeworldco_custom_site | 30e5ab47412841d0d33cab27a9dfaf1c330d0833 | [
"MIT"
] | null | null | null | eyeworldco_custom_site/config/docs.py | MostafaFekry/eyeworldco_custom_site | 30e5ab47412841d0d33cab27a9dfaf1c330d0833 | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/eyeworldco_custom_site"
# docs_base_url = "https://[org_name].github.io/eyeworldco_custom_site"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.... | 29.833333 | 71 | 0.751397 |
a20545a8217ac00668ea7c4886f61c9b3783a6a9 | 791 | py | Python | setup.py | Tagl/automata | 0e51393ac45b8ace257eed5daf9cfedeee094983 | [
"MIT"
] | 1 | 2021-02-24T22:16:01.000Z | 2021-02-24T22:16:01.000Z | setup.py | Tagl/automata | 0e51393ac45b8ace257eed5daf9cfedeee094983 | [
"MIT"
] | null | null | null | setup.py | Tagl/automata | 0e51393ac45b8ace257eed5daf9cfedeee094983 | [
"MIT"
] | 1 | 2022-03-29T14:09:55.000Z | 2022-03-29T14:09:55.000Z | #!/usr/bin/env python
"""Setup logic for pip."""
from setuptools import setup
def get_long_description():
with open('README.md', 'r') as readme_file:
return readme_file.read()
setup(
name='automata-lib',
version='4.0.0.post1',
description='A Python library for simulating automata and Turing... | 23.969697 | 79 | 0.64981 |
f8eeb0b2e52bbb7a9665601f3a5fe7f65c91e716 | 9,956 | py | Python | SynthSeg/model_inputs.py | hvgazula/SynthSeg | cd597b080eb11bdd54e4e75b28b79b41b322c0c8 | [
"Apache-2.0"
] | null | null | null | SynthSeg/model_inputs.py | hvgazula/SynthSeg | cd597b080eb11bdd54e4e75b28b79b41b322c0c8 | [
"Apache-2.0"
] | null | null | null | SynthSeg/model_inputs.py | hvgazula/SynthSeg | cd597b080eb11bdd54e4e75b28b79b41b322c0c8 | [
"Apache-2.0"
] | null | null | null | """
If you use this code, please cite one of the SynthSeg papers:
https://github.com/BBillot/SynthSeg/blob/master/bibtex.bib
Copyright 2020 Benjamin Billot
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 Lice... | 56.891429 | 120 | 0.640418 |
ae30c1b10c1e35197a8515b2c2b63419396e8866 | 329 | py | Python | magpie/config.py | brightmart/magpie | 62fed60c2bee54b8fdae36aa7568403e3d7e166f | [
"MIT"
] | 3 | 2018-10-07T03:59:53.000Z | 2019-01-30T01:59:23.000Z | magpie/config.py | brightmart/magpie | 62fed60c2bee54b8fdae36aa7568403e3d7e166f | [
"MIT"
] | null | null | null | magpie/config.py | brightmart/magpie | 62fed60c2bee54b8fdae36aa7568403e3d7e166f | [
"MIT"
] | 2 | 2019-01-30T01:59:27.000Z | 2019-07-15T19:50:03.000Z | # word2vec & scaler
EMBEDDING_SIZE = 100
# Cores to use while fitting word2vec vectors
WORD2VEC_WORKERS = 30 #4
MIN_WORD_COUNT = 5
WORD2VEC_CONTEXT = 5
# Models
NN_ARCHITECTURE = 'cnn' #
# Training parameters
BATCH_SIZE = 128 #64
EPOCHS = 1
# Number of tokens to save from the abstract, zero padded
SAMPLE_LENGTH = ... | 18.277778 | 57 | 0.75076 |
d2b334fb1a92b9bead5b52af3cce6a91a29a3ff5 | 113,639 | py | Python | cvpysdk/subclients/vssubclient.py | Jayesh-Jain/SDK | 5fe5130b1eeacad9944ba34714e583c6c743482f | [
"Apache-2.0"
] | null | null | null | cvpysdk/subclients/vssubclient.py | Jayesh-Jain/SDK | 5fe5130b1eeacad9944ba34714e583c6c743482f | [
"Apache-2.0"
] | null | null | null | cvpysdk/subclients/vssubclient.py | Jayesh-Jain/SDK | 5fe5130b1eeacad9944ba34714e583c6c743482f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# --------------------------------------------------------------------------
# Copyright Commvault Systems, 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 a... | 43.061387 | 145 | 0.529792 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.