hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7977516068fb360de320a9d65f00398b5ffa1ed8 | 574 | py | Python | src/params.py | w-guo/Boeing-AFP-ML | cd5063b9153d34f54925d4809806444d5d541634 | [
"MIT"
] | 1 | 2020-09-06T21:48:37.000Z | 2020-09-06T21:48:37.000Z | src/params.py | w-guo/Boeing-AFP-ML | cd5063b9153d34f54925d4809806444d5d541634 | [
"MIT"
] | null | null | null | src/params.py | w-guo/Boeing-AFP-ML | cd5063b9153d34f54925d4809806444d5d541634 | [
"MIT"
] | 1 | 2020-11-02T14:43:13.000Z | 2020-11-02T14:43:13.000Z | w, h = (968, 728) # original image size
img_w, img_h = (256, 256) # sub-image size
# for test image reconstruction
overlap_pct = 0 # overlap percentage between sub-images
window_size = img_w
n_w = (w - img_w * overlap_pct) // (img_w * (1 - overlap_pct)) + 1
n_h = (h - img_h * overlap_pct) // (img_h * (1 - overlap_p... | 38.266667 | 66 | 0.644599 |
7977517d185bde714d090fee3d3a320d9f90d143 | 936 | py | Python | hugo/data/code/engine-2.py | tsolakoua/landing | 1a9feab2b8cd90863d57b99fefce852dec3b244d | [
"MIT"
] | null | null | null | hugo/data/code/engine-2.py | tsolakoua/landing | 1a9feab2b8cd90863d57b99fefce852dec3b244d | [
"MIT"
] | null | null | null | hugo/data/code/engine-2.py | tsolakoua/landing | 1a9feab2b8cd90863d57b99fefce852dec3b244d | [
"MIT"
] | null | null | null | # import the source{d} engine
from sourced.engine import Engine
from pyspark.sql import SparkSession
from pyspark.sql.functions import *
# start a new session
spark = SparkSession.builder \
.master("local[*]").appName("Examples") \
.getOrCreate()
engine = Engine(spark, "/repositories")
# get all the ... | 33.428571 | 65 | 0.600427 |
7977523747f76c64ab7e99851a66d9f2f6d95841 | 251 | py | Python | code/test.py | hkx86/boto3 | bd9394ca801f28aa557aac63c66c0fc563549e5c | [
"Apache-2.0"
] | null | null | null | code/test.py | hkx86/boto3 | bd9394ca801f28aa557aac63c66c0fc563549e5c | [
"Apache-2.0"
] | null | null | null | code/test.py | hkx86/boto3 | bd9394ca801f28aa557aac63c66c0fc563549e5c | [
"Apache-2.0"
] | null | null | null | import boto3
s3 = boto3.resource('s3')
data = open('/Users/faat/Documents/Screenshot 2020-08-18 at 5.07.32 PM.png', 'rb')
s3.Bucket('sky88-nextcloud').put_object(Key='test.png', Body=data)
# for bucket in s3.buckets.all():
# print(bucket.name)
| 25.1 | 82 | 0.693227 |
7977524cdb3662e5c8674983fea839c6f07301c0 | 4,329 | py | Python | django/django/contrib/databrowse/plugins/calendars.py | jonaustin/advisoryscan | ba452c155f0d478450e0c91de5ea00f404e98616 | [
"MIT"
] | null | null | null | django/django/contrib/databrowse/plugins/calendars.py | jonaustin/advisoryscan | ba452c155f0d478450e0c91de5ea00f404e98616 | [
"MIT"
] | null | null | null | django/django/contrib/databrowse/plugins/calendars.py | jonaustin/advisoryscan | ba452c155f0d478450e0c91de5ea00f404e98616 | [
"MIT"
] | 1 | 2018-12-06T12:50:52.000Z | 2018-12-06T12:50:52.000Z | from django import http
from django.db import models
from django.contrib.databrowse.datastructures import EasyModel
from django.contrib.databrowse.sites import DatabrowsePlugin
from django.shortcuts import render_to_response
from django.utils.text import capfirst
from django.utils.translation import get_date_formats
fr... | 50.929412 | 151 | 0.671056 |
79775270a06ae1ab614e725fbbb93cc76afc36fd | 275 | py | Python | answers/MridulMohanta/Day10/question2.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 22 | 2021-03-16T14:07:47.000Z | 2021-08-13T08:52:50.000Z | answers/MridulMohanta/Day10/question2.py | MridulMohanta19/30-DaysOfCode-March-2021 | 42868af99a7eca8702f384ce2bd6519b327bb03b | [
"MIT"
] | 174 | 2021-03-16T21:16:40.000Z | 2021-06-12T05:19:51.000Z | answers/MridulMohanta/Day10/question2.py | MridulMohanta19/30-DaysOfCode-March-2021 | 42868af99a7eca8702f384ce2bd6519b327bb03b | [
"MIT"
] | 135 | 2021-03-16T16:47:12.000Z | 2021-06-27T14:22:38.000Z | import string
c = input("Enter the sentence: ")
z = [[c[0]]]
for i in c[1:]:
if z[-1][-1].islower() and i.isupper():
z.append(list(i))
else:
z[-1].append(i)
x = ["".join(word) for word in z]
for i in range(0 , len(x)):
print(x[i])
print(len(x))
| 18.333333 | 43 | 0.523636 |
7977550eef0379507042753319ddb76689bb9055 | 3,895 | py | Python | week1-classical_encryption/playfair.py | avmohan/netseclab | 7deae817ff9f8534235578e733c06ba8a4d943d5 | [
"BSD-3-Clause"
] | null | null | null | week1-classical_encryption/playfair.py | avmohan/netseclab | 7deae817ff9f8534235578e733c06ba8a4d943d5 | [
"BSD-3-Clause"
] | null | null | null | week1-classical_encryption/playfair.py | avmohan/netseclab | 7deae817ff9f8534235578e733c06ba8a4d943d5 | [
"BSD-3-Clause"
] | 3 | 2018-04-28T12:45:13.000Z | 2020-11-12T18:36:42.000Z | #!/usr/bin/env python
"""Playfair cipher
by Abhijith V Mohan"""
from collections import OrderedDict
import sys
import frequencygraph
letters_noj = 'ABCDEFGHIKLMNOPQRSTUVWXYZ'
def cleanup(text):
"""Remove unwanted characters, replace J with I & capitalize"""
text = text.upper()
clean_text = []
for c in ... | 32.190083 | 122 | 0.598203 |
797756c3040f11b06aa196d54d7906090970aef8 | 1,970 | py | Python | external/vec_env/vec_monitor.py | yunshengtian/ppo-mujoco | 1989bc5491d2abc3d015d0ec81d34ea166c3352b | [
"MIT"
] | 1 | 2021-01-27T08:59:31.000Z | 2021-01-27T08:59:31.000Z | external/vec_env/vec_monitor.py | yunshengtian/ppo-mujoco | 1989bc5491d2abc3d015d0ec81d34ea166c3352b | [
"MIT"
] | null | null | null | external/vec_env/vec_monitor.py | yunshengtian/ppo-mujoco | 1989bc5491d2abc3d015d0ec81d34ea166c3352b | [
"MIT"
] | 1 | 2021-01-20T07:56:54.000Z | 2021-01-20T07:56:54.000Z | from . import VecEnvWrapper
from external.bench.monitor import ResultsWriter
import numpy as np
import time
from collections import deque
class VecMonitor(VecEnvWrapper):
def __init__(self, venv, filename=None, keep_buf=0, info_keywords=()):
VecEnvWrapper.__init__(self, venv)
self.eprets = None
... | 35.178571 | 90 | 0.545685 |
7977570b4ed0dad5d6cbfcfd476cdf5ffd32ca97 | 769 | py | Python | scripts/chromsde_input.py | Lila14/miniMDS | 0ac01964edebc3d33e666f66a59f36f05702bede | [
"MIT"
] | 19 | 2017-04-12T01:58:20.000Z | 2020-10-24T09:27:48.000Z | scripts/chromsde_input.py | Lila14/miniMDS | 0ac01964edebc3d33e666f66a59f36f05702bede | [
"MIT"
] | 17 | 2017-04-03T09:56:31.000Z | 2020-11-04T06:56:00.000Z | scripts/chromsde_input.py | Lila14/miniMDS | 0ac01964edebc3d33e666f66a59f36f05702bede | [
"MIT"
] | 10 | 2017-03-31T21:05:06.000Z | 2019-04-15T14:21:46.000Z | import numpy as np
import sys
sys.path.append("..")
import data_tools as dt
in_path = sys.argv[1]
mat_path = sys.argv[2]
id_path = sys.argv[3]
structure = dt.structureFromBed(in_path, None, None)
contactMat = dt.matFromBed(in_path, structure)
n = len(contactMat)
maxNumDigits = int(np.ceil(np.log10(np.amax(contactMat)... | 33.434783 | 173 | 0.717815 |
7977574f79195cc218c1bede01816e738768873a | 58,169 | py | Python | swiftbat/swinfo.py | lanl/swiftbat_python | 8424d4bb56e6ab07c4806050d4ce647c134a8189 | [
"BSD-3-Clause"
] | 5 | 2018-02-10T04:50:52.000Z | 2021-12-31T23:47:37.000Z | swiftbat/swinfo.py | lanl/swiftbat_python | 8424d4bb56e6ab07c4806050d4ce647c134a8189 | [
"BSD-3-Clause"
] | 2 | 2022-01-22T03:03:17.000Z | 2022-01-22T04:51:39.000Z | swiftbat/swinfo.py | lanl/swiftbat_python | 8424d4bb56e6ab07c4806050d4ce647c134a8189 | [
"BSD-3-Clause"
] | 4 | 2018-11-23T14:33:30.000Z | 2022-01-17T22:07:52.000Z | #! /usr/bin/env python
from __future__ import print_function, division, absolute_import
import functools
from pathlib import Path
"""
swinfo
More utilities for dealing with Swift Data
David Palmer palmer@lanl.gov
"""
"""
Copyright (c) 2018, Triad National Security, LLC. All rights reserved.
This program was ... | 43.768999 | 770 | 0.550121 |
7977579da195e9f32fd41aba7c861620bd55f5d3 | 130 | py | Python | bar/bar.py | yui-py/LoggingPython | 7341a55289c73ce7a0e2afcdcc274a7dd60eb7b4 | [
"MIT"
] | null | null | null | bar/bar.py | yui-py/LoggingPython | 7341a55289c73ce7a0e2afcdcc274a7dd60eb7b4 | [
"MIT"
] | null | null | null | bar/bar.py | yui-py/LoggingPython | 7341a55289c73ce7a0e2afcdcc274a7dd60eb7b4 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
def say_hi():
logger.info('Hi, bar')
logger.warning('bar warning')
| 14.444444 | 36 | 0.692308 |
7977582e4bbe01302894bd3f5c6c7b8a3f215150 | 1,427 | py | Python | bindings/python/setup.py | Tomarchelone/tokenizers | da7e629e4a49a11e373e22244902be0b3cc587d9 | [
"Apache-2.0"
] | 6 | 2020-05-14T23:16:14.000Z | 2021-09-08T08:22:57.000Z | bindings/python/setup.py | Tomarchelone/tokenizers | da7e629e4a49a11e373e22244902be0b3cc587d9 | [
"Apache-2.0"
] | null | null | null | bindings/python/setup.py | Tomarchelone/tokenizers | da7e629e4a49a11e373e22244902be0b3cc587d9 | [
"Apache-2.0"
] | 2 | 2020-07-30T16:54:14.000Z | 2020-10-11T12:07:30.000Z | from setuptools import setup
from setuptools_rust import Binding, RustExtension
setup(
name="tokenizers",
version="0.2.0",
description="Fast and Customizable Tokenizers",
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
keywords="N... | 37.552632 | 83 | 0.641205 |
7977590e6a25ec154144264887c4c500884f24e3 | 2,463 | py | Python | doc/source/conf.py | jprovaznik/os-cloud-management | 2f35fecfa086c093a9e66b82a8d5b20aab16cc9d | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | jprovaznik/os-cloud-management | 2f35fecfa086c093a9e66b82a8d5b20aab16cc9d | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | jprovaznik/os-cloud-management | 2f35fecfa086c093a9e66b82a8d5b20aab16cc9d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 32.407895 | 79 | 0.696711 |
79775a429a246d333948309dc62c16a72cc633ad | 3,154 | py | Python | quickfund/writter.py | MapleCCC/Fund-Info-Fetcher | 9b461603ecf986aa71b45c72d894262bc353f12e | [
"MIT"
] | 3 | 2020-07-16T19:18:55.000Z | 2020-08-03T11:28:32.000Z | quickfund/writter.py | MapleCCC/Fund-Info-Fetcher | 9b461603ecf986aa71b45c72d894262bc353f12e | [
"MIT"
] | null | null | null | quickfund/writter.py | MapleCCC/Fund-Info-Fetcher | 9b461603ecf986aa71b45c72d894262bc353f12e | [
"MIT"
] | 1 | 2020-12-18T13:48:20.000Z | 2020-12-18T13:48:20.000Z | from pathlib import Path
import xlsxwriter
from .models import FundInfo
from .tqdm import tenumerate
from .utils import Logger, on_failure_raises
__all__ = ["write_to_xlsx"]
@on_failure_raises(RuntimeError, "获取基金信息并写入 Excel 文档 {xlsx_filename} 的时候发生错误")
def write_to_xlsx(
fund_infos: list[FundInfo],
xlsx_f... | 38.463415 | 89 | 0.554217 |
79775b2ead65a9d5f85b158e4ad877443a0bebe9 | 6,338 | py | Python | widgets/_calendar_google.py | Kartoffel/infodisplay | 01c87c1d06b4bae45397243d0a99c86015cee708 | [
"MIT"
] | 2 | 2021-12-29T14:24:19.000Z | 2022-01-04T21:24:56.000Z | widgets/_calendar_google.py | Kartoffel/infodisplay | 01c87c1d06b4bae45397243d0a99c86015cee708 | [
"MIT"
] | 1 | 2022-01-03T19:40:47.000Z | 2022-01-05T17:45:39.000Z | widgets/_calendar_google.py | Kartoffel/infodisplay | 01c87c1d06b4bae45397243d0a99c86015cee708 | [
"MIT"
] | null | null | null | '''
Google Calendar interface for 'Calendar' widget
Requires pip packages
- google-api-python-client
- google-auth-httplib2
- google-auth-oauthlib
AND token.json file, obtain using example on
https://developers.google.com/calendar/api/quickstart/python
'''
import os.path
import... | 34.259459 | 100 | 0.550647 |
79775cbe7deeb4c4483fd946b512245daa4c9e5c | 28,283 | py | Python | tools/accuracy_checker/openvino/tools/accuracy_checker/adapters/text_detection.py | nignatovsky/open_model_zoo | 60e560aea990f8530a8918c141a667eb506fd455 | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/openvino/tools/accuracy_checker/adapters/text_detection.py | nignatovsky/open_model_zoo | 60e560aea990f8530a8918c141a667eb506fd455 | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/openvino/tools/accuracy_checker/adapters/text_detection.py | nignatovsky/open_model_zoo | 60e560aea990f8530a8918c141a667eb506fd455 | [
"Apache-2.0"
] | null | null | null | """
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... | 42.02526 | 120 | 0.576601 |
79775f3ed5f7c2a336c32e55d6a1717f3856ed64 | 10,050 | py | Python | tarn/cache/pickler.py | neuro-ml/tarn | 07bf61d5ebec69cd5f44ef4766b774769281613f | [
"Apache-2.0"
] | null | null | null | tarn/cache/pickler.py | neuro-ml/tarn | 07bf61d5ebec69cd5f44ef4766b774769281613f | [
"Apache-2.0"
] | null | null | null | tarn/cache/pickler.py | neuro-ml/tarn | 07bf61d5ebec69cd5f44ef4766b774769281613f | [
"Apache-2.0"
] | null | null | null | """
This module contains a relaxed but reproducible version of cloudpickle:
1. any object, after being pickled, must produce the same output every time
2. two different objects cannot have equal results after pickling
3. we don't need to restore the pickled object, so we can drop any information
as ... | 36.151079 | 114 | 0.650746 |
79775f96022f2caa3ed402abfe8a2a9922d83de1 | 1,032 | py | Python | user/migrations/0001_initial.py | simonprast/wopi-engine | b3f59782659c8be42f4064bce5281afd391833be | [
"BSD-Source-Code"
] | null | null | null | user/migrations/0001_initial.py | simonprast/wopi-engine | b3f59782659c8be42f4064bce5281afd391833be | [
"BSD-Source-Code"
] | null | null | null | user/migrations/0001_initial.py | simonprast/wopi-engine | b3f59782659c8be42f4064bce5281afd391833be | [
"BSD-Source-Code"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-17 14:34
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(aut... | 34.4 | 115 | 0.579457 |
79775f9ce2a11c8afdd877981ff4069a5d47e3e8 | 3,642 | py | Python | mmdet/core/anchor/anchor_generator.py | witnessai/GRAN | 952c2b08a58f3b0087f0f18fd48f8e385e45908b | [
"Apache-2.0"
] | 59 | 2020-02-05T05:41:53.000Z | 2022-02-15T08:04:11.000Z | mmdet/core/anchor/anchor_generator.py | witnessai/GRAN | 952c2b08a58f3b0087f0f18fd48f8e385e45908b | [
"Apache-2.0"
] | 8 | 2020-03-11T11:15:17.000Z | 2021-03-30T06:09:01.000Z | mmdet/core/anchor/anchor_generator.py | witnessai/GRAN | 952c2b08a58f3b0087f0f18fd48f8e385e45908b | [
"Apache-2.0"
] | 13 | 2020-02-26T01:46:44.000Z | 2022-02-02T14:05:48.000Z | import torch
class AnchorGenerator(object):
"""
Examples:
>>> from mmdet.core import AnchorGenerator
>>> self = AnchorGenerator(9, [1.], [1.])
>>> all_anchors = self.grid_anchors((2, 2), device='cpu')
>>> print(all_anchors)
tensor([[ 0., 0., 8., 8.],
... | 37.163265 | 79 | 0.5324 |
7977607ad337f4265638ffaf67781782e8cfb096 | 24,306 | py | Python | adfraud/generate_train.py | arita37/data | 0d1a38fd9b564cfb9c34ad521e7df2b3b6e2316b | [
"MIT"
] | null | null | null | adfraud/generate_train.py | arita37/data | 0d1a38fd9b564cfb9c34ad521e7df2b3b6e2316b | [
"MIT"
] | null | null | null | adfraud/generate_train.py | arita37/data | 0d1a38fd9b564cfb9c34ad521e7df2b3b6e2316b | [
"MIT"
] | 1 | 2022-02-14T18:18:38.000Z | 2022-02-14T18:18:38.000Z | import pandas as pd, numpy as np, random, copy, os, sys
random.seed(100)
########################################################################################################
def generate_train(df, col=None, pars=None):
"""
By IP Apress
channel 1011
os ... | 45.26257 | 216 | 0.569612 |
797760f60bf6c61ae77fab9eab905819eaeb80ac | 2,823 | py | Python | tests/test_base.py | lperezmo/gpvolve | a2cb204a91e0c17f5bb789a5a333cb155d037591 | [
"MIT"
] | null | null | null | tests/test_base.py | lperezmo/gpvolve | a2cb204a91e0c17f5bb789a5a333cb155d037591 | [
"MIT"
] | null | null | null | tests/test_base.py | lperezmo/gpvolve | a2cb204a91e0c17f5bb789a5a333cb155d037591 | [
"MIT"
] | 1 | 2021-10-17T19:25:36.000Z | 2021-10-17T19:25:36.000Z | import pytest
import gpvolve.check as check
import gpmap
import numpy as np
from gpvolve.base import apply_fitness_function
from gpvolve.phenotype_to_fitness import linear
from gpvolve.utils import find_peaks
def test_check_gpm():
with pytest.raises(TypeError):
check.gpm_sanity("stupid")
gpm = gpmap.... | 34.012048 | 99 | 0.614594 |
7977613c96cb258ef2b7a2b9f4df049599eff23e | 1,910 | py | Python | src/France/migrations/0001_initial.py | IFB-ElixirFr/nCOV_genome_stats | b6cd7264722439492602bc824bb13cc012e26bb8 | [
"BSD-3-Clause"
] | null | null | null | src/France/migrations/0001_initial.py | IFB-ElixirFr/nCOV_genome_stats | b6cd7264722439492602bc824bb13cc012e26bb8 | [
"BSD-3-Clause"
] | null | null | null | src/France/migrations/0001_initial.py | IFB-ElixirFr/nCOV_genome_stats | b6cd7264722439492602bc824bb13cc012e26bb8 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-27 18:01
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='regionsFrance',
... | 43.409091 | 146 | 0.610471 |
797762037b99685819d444c9166430791bd5d081 | 883 | py | Python | mean_shift_runner.py | shafiq-islam-cse/Mean-Shift-Algorithm | e3281d0a398637109393a3967df52d189fac71cf | [
"MIT"
] | 261 | 2015-05-26T17:22:41.000Z | 2022-03-25T04:49:59.000Z | mean_shift_runner.py | shafiq-islam-cse/Mean-Shift-Algorithm | e3281d0a398637109393a3967df52d189fac71cf | [
"MIT"
] | 12 | 2017-01-22T10:23:55.000Z | 2021-12-30T05:16:22.000Z | mean_shift_runner.py | shafiq-islam-cse/Mean-Shift-Algorithm | e3281d0a398637109393a3967df52d189fac71cf | [
"MIT"
] | 116 | 2015-05-27T08:30:33.000Z | 2022-02-25T09:10:47.000Z | import mean_shift as ms
from numpy import genfromtxt
def load_points(filename):
data = genfromtxt(filename, delimiter=',')
return data
def run():
reference_points = load_points("data.csv")
mean_shifter = ms.MeanShift()
mean_shift_result = mean_shifter.cluster(reference_points, kernel_bandwidth=3... | 33.961538 | 161 | 0.674972 |
79776322fa4a3e034d48882d9782568ec1a1b279 | 1,023 | py | Python | main.py | miguelhp89/Keystroke_Dynamics_Gen | 409ea150ee97c6904f49f6df77c3ece0197ac0a4 | [
"MIT"
] | null | null | null | main.py | miguelhp89/Keystroke_Dynamics_Gen | 409ea150ee97c6904f49f6df77c3ece0197ac0a4 | [
"MIT"
] | null | null | null | main.py | miguelhp89/Keystroke_Dynamics_Gen | 409ea150ee97c6904f49f6df77c3ece0197ac0a4 | [
"MIT"
] | 1 | 2021-11-26T07:57:40.000Z | 2021-11-26T07:57:40.000Z | #!/usr/bin/python3
import pyxhook
import time
from CaptureTime import CaptureTime
#20210123 MH: Create CaptureTime object
capTime = CaptureTime()
#20210123 MH: Campture subject name
user = input("Enter your name: ")
capTime.setUser(user)
#20210123 MH: seting total sessions and reps per session
sessionFreq = inpu... | 24.95122 | 71 | 0.786901 |
797763c188f04ae3a8af6dbc16823e143bef8436 | 10,262 | py | Python | src/backend/common/helpers/event_helper.py | ofekashery/the-blue-alliance | df0e47d054161fe742ac6198a6684247d0713279 | [
"MIT"
] | null | null | null | src/backend/common/helpers/event_helper.py | ofekashery/the-blue-alliance | df0e47d054161fe742ac6198a6684247d0713279 | [
"MIT"
] | null | null | null | src/backend/common/helpers/event_helper.py | ofekashery/the-blue-alliance | df0e47d054161fe742ac6198a6684247d0713279 | [
"MIT"
] | null | null | null | import json
from collections import OrderedDict
from datetime import datetime, timedelta
from typing import cast, Dict, List, NamedTuple, Optional
from google.cloud import ndb
from backend.common.consts import comp_level
from backend.common.consts.alliance_color import AllianceColor
from backend.common.consts.event_t... | 37.181159 | 110 | 0.570454 |
797763e864a5834247bd6db5fa14363caf08c45f | 344 | py | Python | dc_tts-transfer-learning-master/one_click_tl.py | gg64du02/dc-tts-tacotron-bns | cb88148d198523a59c17c28c97ea5f90520c0d85 | [
"Apache-2.0"
] | null | null | null | dc_tts-transfer-learning-master/one_click_tl.py | gg64du02/dc-tts-tacotron-bns | cb88148d198523a59c17c28c97ea5f90520c0d85 | [
"Apache-2.0"
] | null | null | null | dc_tts-transfer-learning-master/one_click_tl.py | gg64du02/dc-tts-tacotron-bns | cb88148d198523a59c17c28c97ea5f90520c0d85 | [
"Apache-2.0"
] | null | null | null |
import os
print("Issuing the script")
os.system('python "C:\ML\dc-tts-tacotron-bns-master\dc_tts-transfer-learning-master\\train_transfer.py" "1"')
os.system('python "C:\ML\dc-tts-tacotron-bns-master\dc_tts-transfer-learning-master\\train_transfer.py" "2"')
print("Script finnished")
#os.system('python 1-RippingAI-6k... | 34.4 | 109 | 0.755814 |
7977640d890f2e8b5e6cef6d739a187cc05b3c8e | 18,391 | py | Python | biorbd_optim/limits/objective_functions.py | tgouss/BiorbdOptim | 2aa43850ddd6e8d210731a5b3894eeb27fb8e781 | [
"Apache-2.0"
] | null | null | null | biorbd_optim/limits/objective_functions.py | tgouss/BiorbdOptim | 2aa43850ddd6e8d210731a5b3894eeb27fb8e781 | [
"Apache-2.0"
] | null | null | null | biorbd_optim/limits/objective_functions.py | tgouss/BiorbdOptim | 2aa43850ddd6e8d210731a5b3894eeb27fb8e781 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
import numpy as np
import casadi
from casadi import dot, sum1
from .penalty import PenaltyType, PenaltyFunctionAbstract
from ..misc.enums import Instant
from ..misc.options_lists import OptionList, OptionGeneric
class ObjectiveOption(OptionGeneric):
def __init__(
self, objective, in... | 41.608597 | 148 | 0.599804 |
7977649dc47aa7c45e61a5d2d5e674fa6f6882ca | 9,411 | py | Python | test/test_settings_api.py | hi-artem/twistlock-py | 9888e905f5b9d3cc00f9b84244588c0992f8e4f4 | [
"RSA-MD"
] | null | null | null | test/test_settings_api.py | hi-artem/twistlock-py | 9888e905f5b9d3cc00f9b84244588c0992f8e4f4 | [
"RSA-MD"
] | null | null | null | test/test_settings_api.py | hi-artem/twistlock-py | 9888e905f5b9d3cc00f9b84244588c0992f8e4f4 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
Prisma Cloud Compute API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 21.04.439
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_impor... | 22.195755 | 124 | 0.653916 |
7977671c7baa910c4fa20db063f4d9d5e0351781 | 3,405 | py | Python | test/integration/ggrc_workflows/helpers/person_setup.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-01-12T23:46:00.000Z | 2019-01-12T23:46:00.000Z | test/integration/ggrc_workflows/helpers/person_setup.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc_workflows/helpers/person_setup.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Package contains Person related setup helper.
It helps to setup Person related data for tests.
"""
import string
from ggrc.models import all_models
from integration.ggrc.models import factories
from inte... | 33.382353 | 79 | 0.641997 |
7977678d0d5604861f0cc83b94a1fc45148e8669 | 759 | py | Python | testrunner/lib_python_tests.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | testrunner/lib_python_tests.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | testrunner/lib_python_tests.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | #!/usr/bin/env python
"""
This is what the buildbot runs to execute the lib-python tests
on top of pypy-c.
"""
import sys, os
import subprocess
rootdir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
os.environ['PYTHONPATH'] = rootdir
os.environ['PYTEST_PLUGINS'] = ''
if sys.platform == 'win32':
... | 20.513514 | 72 | 0.637681 |
797767bc098f579e90026961d53a98b5811577cc | 1,477 | py | Python | anymal_belief_state_encoder_decoder_pytorch/running.py | lucidrains/anymal-belief-state-encoder-decoder-pytorch | e8d4acfa2c81073a88980832185212ba2802287b | [
"MIT"
] | 13 | 2022-01-26T18:42:58.000Z | 2022-03-15T02:23:08.000Z | anymal_belief_state_encoder_decoder_pytorch/running.py | lucidrains/anymal-belief-state-encoder-decoder-pytorch | e8d4acfa2c81073a88980832185212ba2802287b | [
"MIT"
] | null | null | null | anymal_belief_state_encoder_decoder_pytorch/running.py | lucidrains/anymal-belief-state-encoder-decoder-pytorch | e8d4acfa2c81073a88980832185212ba2802287b | [
"MIT"
] | null | null | null | import torch
from torch import nn
class RunningStats(nn.Module):
def __init__(self, shape, eps = 1e-5):
super().__init__()
shape = shape if isinstance(shape, tuple) else (shape,)
self.shape = shape
self.eps = eps
self.n = 0
self.register_buffer('old_mean', torch.ze... | 30.770833 | 94 | 0.605958 |
797767bfce0325d2f67beccf670350fce8129a0c | 642 | py | Python | backend/users/admin.py | crowdbotics-apps/royal-cloud-33498 | 4ac1701e6af7db4b3b7393b73fc0af80fc313b3b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/admin.py | crowdbotics-apps/royal-cloud-33498 | 4ac1701e6af7db4b3b7393b73fc0af80fc313b3b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/admin.py | crowdbotics-apps/royal-cloud-33498 | 4ac1701e6af7db4b3b7393b73fc0af80fc313b3b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import get_user_model
from users.forms import UserChangeForm, UserCreationForm
from users.models import Profile
User = get_user_model()
@admin.register(User)
class UserAdmin(auth_admin.UserAdmin):
form... | 32.1 | 121 | 0.747664 |
7977683851d293e7fdaeec94e70e4740212e3d2b | 2,890 | py | Python | smpl_webuser/lbs.py | Rubikplayer/flame-fitting | db3d622547b83ab158dceb46a5d049781e6e6c3a | [
"AAL"
] | 394 | 2017-11-25T13:26:27.000Z | 2022-03-28T07:19:05.000Z | smpl_webuser/lbs.py | Rubikplayer/flame-fitting | db3d622547b83ab158dceb46a5d049781e6e6c3a | [
"AAL"
] | 25 | 2017-11-30T04:26:32.000Z | 2022-03-10T10:27:54.000Z | smpl_webuser/lbs.py | Rubikplayer/flame-fitting | db3d622547b83ab158dceb46a5d049781e6e6c3a | [
"AAL"
] | 84 | 2017-11-27T05:42:43.000Z | 2022-03-30T02:56:48.000Z | '''
Copyright 2015 Matthew Loper, Naureen Mahmood and the Max Planck Gesellschaft. All rights reserved.
This software is provided for research purposes only.
By using this software you agree to the terms of the SMPL Model license here http://smpl.is.tue.mpg.de/license
More information about SMPL is available here htt... | 35.243902 | 110 | 0.633564 |
797768a6262116c03c0d57d9332d80e0603aa17b | 1,908 | py | Python | parser/fase2/team12/src/FUNCIONES_NATIVAS/TRIGRONOMETRIC_FUNCTION/Acosd.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team12/src/FUNCIONES_NATIVAS/TRIGRONOMETRIC_FUNCTION/Acosd.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team12/src/FUNCIONES_NATIVAS/TRIGRONOMETRIC_FUNCTION/Acosd.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | import sys, os.path
import math
dir_nodo = (os.path.abspath(os.path.join(os.path.dirname(__file__), '..','..')) + '\\EXPRESION\\EXPRESION\\')
sys.path.append(dir_nodo)
ent_nodo = (os.path.abspath(os.path.join(os.path.dirname(__file__), '..','..')) + '\\ENTORNO\\')
sys.path.append(ent_nodo)
c3d_dir = (os.path.abspath... | 31.278689 | 109 | 0.604822 |
797768bab1f3ccfc7f3e19146be6299e3cfe0e01 | 3,811 | py | Python | data/apada2seg_dataset.py | bbbbbbzhou/APA2Seg-Net | b9260442bc06181a0ce8ec943f7a6efcfba017b7 | [
"MIT"
] | 13 | 2021-03-28T06:14:34.000Z | 2022-03-24T10:55:23.000Z | data/apada2seg_dataset.py | bbbbbbzhou/APA2Seg-Net | b9260442bc06181a0ce8ec943f7a6efcfba017b7 | [
"MIT"
] | 3 | 2021-04-18T06:21:55.000Z | 2021-07-07T01:12:40.000Z | data/apada2seg_dataset.py | bbbbbbzhou/APA2Seg-Net | b9260442bc06181a0ce8ec943f7a6efcfba017b7 | [
"MIT"
] | 4 | 2021-03-30T03:22:25.000Z | 2022-03-15T20:49:57.000Z | import os.path
import torchvision.transforms as transforms
from data.base_dataset import BaseDataset, get_transform
from PIL import Image
import torch
import random
import data.random_pair as random_pair
import pdb
class TrainDataset(BaseDataset):
def initialize(self, opt):
self.opt = opt
self.di... | 34.026786 | 110 | 0.641039 |
7977694912c4bd2d7f032d1454086a0704d33c54 | 368 | py | Python | problem/01000~09999/01236/1236.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-19T16:37:44.000Z | 2019-04-19T16:37:44.000Z | problem/01000~09999/01236/1236.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-20T11:42:44.000Z | 2019-04-20T11:42:44.000Z | problem/01000~09999/01236/1236.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 3 | 2019-04-19T16:37:47.000Z | 2021-10-25T00:45:00.000Z | y,x=map(int,input().split())
row,col=[False]*y,[False]*x
ans=0
for i in range(y):
for n,j in enumerate(input()):
if j=='X':
row[i],col[n]=True,True
for i in range(y):
for j in range(x):
if row[i]==False and col[j]==False:
row[i],col[j]=True,True
ans+=1
for i in range(y):
if row[i]==False: ans+=1
for j i... | 21.647059 | 37 | 0.603261 |
797769d00472b90f6a3d3723bea420db7f1f7fe0 | 235 | py | Python | backend/app/config/settings/dev_test.py | hsw0905/dev_log | 564a82bd304ce85f89437fb88817e97ad015f3bc | [
"MIT"
] | null | null | null | backend/app/config/settings/dev_test.py | hsw0905/dev_log | 564a82bd304ce85f89437fb88817e97ad015f3bc | [
"MIT"
] | null | null | null | backend/app/config/settings/dev_test.py | hsw0905/dev_log | 564a82bd304ce85f89437fb88817e97ad015f3bc | [
"MIT"
] | null | null | null | from .base import *
ENV = 'dev_test'
TEST = True
WSGI_APPLICATION = 'config.wsgi.dev.application'
DEFAULT_FILE_STORAGE = 'inmemorystorage.InMemoryStorage'
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.MD5PasswordHasher',
] | 18.076923 | 56 | 0.765957 |
797769f677300788a519692725c498025fb86ca2 | 34,750 | py | Python | scipy/stats/tests/test_continuous_basic.py | matthew-brett/scipy | 564df53b3d32c37589834a55814a615e1332ebb0 | [
"BSD-3-Clause"
] | null | null | null | scipy/stats/tests/test_continuous_basic.py | matthew-brett/scipy | 564df53b3d32c37589834a55814a615e1332ebb0 | [
"BSD-3-Clause"
] | 1 | 2018-05-01T17:50:12.000Z | 2018-05-01T17:50:12.000Z | scipy/stats/tests/test_continuous_basic.py | matthew-brett/scipy | 564df53b3d32c37589834a55814a615e1332ebb0 | [
"BSD-3-Clause"
] | null | null | null |
import numpy as np
import numpy.testing as npt
import pytest
from pytest import raises as assert_raises
from scipy.integrate import IntegrationWarning
from scipy import stats
from scipy.special import betainc
from .common_tests import (check_normalization, check_moment, check_mean_expect,
c... | 41.566986 | 100 | 0.617669 |
79776a7e943cd54f110b624e2af4e159ebdf6bc3 | 1,890 | py | Python | gcn/data/pseudoautosomal_genes.py | kalon33/divine | 2db92c093d98722f011224140e652c162a4f4336 | [
"Intel"
] | 11 | 2018-11-09T15:47:14.000Z | 2021-08-18T18:05:11.000Z | gcn/data/pseudoautosomal_genes.py | kalon33/divine | 2db92c093d98722f011224140e652c162a4f4336 | [
"Intel"
] | 5 | 2018-08-31T15:07:20.000Z | 2020-03-30T18:52:04.000Z | gcn/data/pseudoautosomal_genes.py | kalon33/divine | 2db92c093d98722f011224140e652c162a4f4336 | [
"Intel"
] | 1 | 2019-04-18T13:42:30.000Z | 2019-04-18T13:42:30.000Z | """
.. module:: pseudoautosomal_genes
:platform: Unix, Windows, MacOSX
:synopsis: Genes in Pseudoautosomal Region
.. moduleauthor:: Kunal Kundu (kunal.kundu@tcs.com); modified by changjin.hong@gmail.com
The pseudoautosomal regions, PAR1, PAR2 and PAR3 are homologous
sequences of nucleotides on the X and Y chr... | 48.461538 | 88 | 0.735979 |
79776b08922960a2fdd40ddc8ea17996dbe872b4 | 1,892 | py | Python | r2r/learner_main.py | google-research/valan | 9fc6e38f411e6cb76408bf033cdc056ace980973 | [
"Apache-2.0"
] | 71 | 2019-09-16T20:20:45.000Z | 2022-03-31T09:33:33.000Z | r2r/learner_main.py | google-research/valan | 9fc6e38f411e6cb76408bf033cdc056ace980973 | [
"Apache-2.0"
] | 2 | 2020-01-16T12:05:37.000Z | 2021-04-12T17:38:09.000Z | r2r/learner_main.py | google-research/valan | 9fc6e38f411e6cb76408bf033cdc056ace980973 | [
"Apache-2.0"
] | 16 | 2019-09-25T07:00:43.000Z | 2022-01-16T11:32:54.000Z | # coding=utf-8
# Copyright 2019 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 ... | 31.016393 | 74 | 0.742072 |
79776b407919c45de63566cd29e34bd76198babc | 468 | py | Python | TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | print "*** Warning: TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py will be deprecated"
print "*** Please use TopQuarkAnalysis/TopSkimming/python/ttDecayChannelFilters_cff.py instead"
print "*** (you can still use 'genEvent' instead of 'genParticles' as input)"
from TopQuarkAnalysis.TopSki... | 52 | 116 | 0.818376 |
79776c0a6e0fc9099d0893a01a774212579048c3 | 3,590 | py | Python | lib/reda/utils/fix_sign_with_K.py | j-gallistl/reda | 13b1f9e1cda92bbbbafc5c28be2c691d3b722740 | [
"MIT"
] | null | null | null | lib/reda/utils/fix_sign_with_K.py | j-gallistl/reda | 13b1f9e1cda92bbbbafc5c28be2c691d3b722740 | [
"MIT"
] | null | null | null | lib/reda/utils/fix_sign_with_K.py | j-gallistl/reda | 13b1f9e1cda92bbbbafc5c28be2c691d3b722740 | [
"MIT"
] | null | null | null | """
Fix signs in resistance measurements using the K factors. The sign of negative
resistance measurements can be switched if the geometrical factor is negative.
"""
import numpy as np
def fix_sign_with_K(dataframe):
"""Swap electrode denotations so that geometrical (K) factors become
positive. Also, swap sig... | 30.168067 | 79 | 0.575487 |
79776ce27eacdbe44e839c518f0c7871117f0c8d | 796 | py | Python | system_tests/system_tests_sync/test_app_engine.py | kpister/google-auth-library-python | e79b8310bfd961557bf2496e15c9148dac79b213 | [
"Apache-2.0"
] | 348 | 2018-10-14T17:48:33.000Z | 2022-03-22T06:53:03.000Z | system_tests/system_tests_sync/test_app_engine.py | kpister/google-auth-library-python | e79b8310bfd961557bf2496e15c9148dac79b213 | [
"Apache-2.0"
] | 485 | 2018-10-23T19:07:47.000Z | 2022-03-31T13:59:03.000Z | system_tests/system_tests_sync/test_app_engine.py | kpister/google-auth-library-python | e79b8310bfd961557bf2496e15c9148dac79b213 | [
"Apache-2.0"
] | 229 | 2018-10-17T20:10:03.000Z | 2022-02-25T22:47:49.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, ... | 36.181818 | 74 | 0.758794 |
79776d0660a75baae0edfbcb67a0f755104db819 | 1,352 | py | Python | Akeso/Exploits/shellAttack.py | tamuctf/Akeso | 05e6c284b45e1d1ec2d744a8508c9b03e3b5718e | [
"MIT"
] | 19 | 2018-02-26T00:19:17.000Z | 2019-12-18T04:26:45.000Z | Akeso/Exploits/shellAttack.py | tamuctf/Akeso | 05e6c284b45e1d1ec2d744a8508c9b03e3b5718e | [
"MIT"
] | 11 | 2018-05-07T15:11:30.000Z | 2018-11-13T16:40:41.000Z | Akeso/Exploits/shellAttack.py | tamuctf/Akeso | 05e6c284b45e1d1ec2d744a8508c9b03e3b5718e | [
"MIT"
] | 2 | 2019-12-11T07:28:48.000Z | 2021-05-30T07:41:57.000Z | from ExploitFrame import ExploitFrame
import requests
import structlog
import docker
logger = structlog.get_logger()
class Exploit(ExploitFrame):
def __init__(self, serviceInfo):
self.name = 'shell'
self.output = None
ExploitFrame.__init__(self, serviceInfo)
def exploit(self):
... | 31.44186 | 129 | 0.586538 |
79776dc0bf37fff9167464061e40a53b07f3e7f7 | 689 | py | Python | demo/courseManager/test/testAssignment.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 253 | 2015-01-02T01:54:27.000Z | 2022-03-10T01:44:02.000Z | demo/courseManager/test/testAssignment.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 4 | 2015-06-09T03:36:28.000Z | 2017-08-11T15:54:24.000Z | demo/courseManager/test/testAssignment.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 29 | 2015-02-14T02:24:08.000Z | 2021-12-16T02:46:16.000Z | import unittest
import math
from datetime import *
import sys
sys.path.append("../../../..")
import JeevesLib
sys.path.append("..")
from assignment import *
class TestAssignment(unittest.TestCase):
def setUp(self):
self.due = datetime(2013, 11, 15, 12, 13, 14)
self.a = Assignment(1, "Documentation", self.du... | 23.758621 | 85 | 0.683599 |
797770d067fa690b235c8452f12cc9c60a8eef36 | 3,225 | py | Python | enigma/morse.py | jonmaddock/enigma | e9e3ca95cc397bbdfb7b5f43c043dd52997f0d65 | [
"MIT"
] | null | null | null | enigma/morse.py | jonmaddock/enigma | e9e3ca95cc397bbdfb7b5f43c043dd52997f0d65 | [
"MIT"
] | 9 | 2021-10-11T19:50:21.000Z | 2022-02-03T21:13:06.000Z | enigma/morse.py | jonmaddock/enigma | e9e3ca95cc397bbdfb7b5f43c043dd52997f0d65 | [
"MIT"
] | null | null | null | """A Morse code encoder and decoder.
Morse code consists of "dits", "dahs" and spaces. A dit or dah is a signal,
whereas a space is an absensce of signal. A dit is one unit of Morse time (or
beat) a dah is three. Each dit or dah is followed by a space of one dit. Each
character is followed by a space of three dits, an... | 25.595238 | 77 | 0.497054 |
79777255a418e0b789d9f8a856c72396872d5a19 | 3,013 | py | Python | aas_core_codegen/intermediate/doc.py | gillistephan/aas-core-codegen | 5b89ea2ee35aecaca9a1bed7ac81d420cc560f29 | [
"MIT"
] | null | null | null | aas_core_codegen/intermediate/doc.py | gillistephan/aas-core-codegen | 5b89ea2ee35aecaca9a1bed7ac81d420cc560f29 | [
"MIT"
] | 2 | 2021-11-17T22:11:59.000Z | 2021-11-18T15:17:40.000Z | aas_core_codegen/intermediate/doc.py | aas-core-works/aas-core-csharp-codegen | 731f706e2d12bf80722ac55d920fcf5402fb26ef | [
"MIT"
] | null | null | null | """Provide types for the references in the docstrings."""
# pylint: disable=keyword-arg-before-vararg
from typing import Union
import docutils
import docutils.nodes
from icontract import require
from aas_core_codegen.intermediate._types import (
Symbol,
Property,
Enumeration,
EnumerationLiteral,
... | 28.695238 | 87 | 0.646864 |
7977735094e57629b78f21464db1bae8f9c8149b | 1,087 | py | Python | tests/app/comms/test_stats.py | NewAcropolis/api | 61ffe14cb64407ffe1f58d0e970703bf07d60ea3 | [
"MIT"
] | 1 | 2018-10-12T15:04:31.000Z | 2018-10-12T15:04:31.000Z | tests/app/comms/test_stats.py | NewAcropolis/api | 61ffe14cb64407ffe1f58d0e970703bf07d60ea3 | [
"MIT"
] | 169 | 2017-11-07T00:45:25.000Z | 2022-03-12T00:08:59.000Z | tests/app/comms/test_stats.py | NewAcropolis/api | 61ffe14cb64407ffe1f58d0e970703bf07d60ea3 | [
"MIT"
] | 1 | 2019-08-15T14:51:31.000Z | 2019-08-15T14:51:31.000Z | from app.comms.stats import send_ga_event
class WhenSendingStats:
def it_doesnt_send_in_test_environment(self, app, mocker):
mocker.patch.dict('app.application.config', {
'ENVIRONMENT': 'test'
})
mock_post = mocker.patch('app.comms.stats.requests.post')
send_ga_event... | 27.871795 | 71 | 0.632015 |
797773eccab12b45e01ce9dc7519e7b7cc15097a | 5,922 | py | Python | kubernetes_asyncio/client/models/v1beta1_event_series.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_event_series.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_event_series.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.15.9
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 32.538462 | 124 | 0.618372 |
797773ed0a325291828e2c59466ca536affc38ec | 252 | py | Python | ten/cao gao.py | lzbferrari/ljb_python | e545891c707e412bb12601c94b456be721c85573 | [
"MIT"
] | null | null | null | ten/cao gao.py | lzbferrari/ljb_python | e545891c707e412bb12601c94b456be721c85573 | [
"MIT"
] | null | null | null | ten/cao gao.py | lzbferrari/ljb_python | e545891c707e412bb12601c94b456be721c85573 | [
"MIT"
] | null | null | null | import pickle
game_data = {'player-position':'N23 E45','pockets':['keys','pocket knife','polished stone'],'backpack':['rope','hammer','apple'],'money': 158.50}
save_file = open('save.dat','wb')
pickle.dump(game_data,save_file)
save_file.close()
print() | 42 | 145 | 0.706349 |
79777418fe5b35c57bd26ca6421cf35e4c648688 | 8,323 | py | Python | test/functional/feature_proxy.py | JackCoreProject/JACK | d4b9385fdc732007d209668818d006d1647543c1 | [
"MIT"
] | null | null | null | test/functional/feature_proxy.py | JackCoreProject/JACK | d4b9385fdc732007d209668818d006d1647543c1 | [
"MIT"
] | null | null | null | test/functional/feature_proxy.py | JackCoreProject/JACK | d4b9385fdc732007d209668818d006d1647543c1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitcoind with different proxy configuration.
Test plan:
- Start jackd's with different proxy conf... | 41.20297 | 121 | 0.625135 |
797774832aaa5569218ba7afd06c809bf90b43e9 | 101,632 | py | Python | pandas/core/indexes/multi.py | jess010/pandas | 9872d6757e5117dce070981141cee562f675694e | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/multi.py | jess010/pandas | 9872d6757e5117dce070981141cee562f675694e | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/multi.py | jess010/pandas | 9872d6757e5117dce070981141cee562f675694e | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null |
# pylint: disable=E1101,E1103,W0232
import datetime
import warnings
from sys import getsizeof
import numpy as np
from pandas._libs import algos as libalgos, index as libindex, lib, Timestamp
from pandas.compat import range, zip, lrange, lzip, map
from pandas.compat.numpy import function as nv
from pandas import comp... | 35.325686 | 79 | 0.538994 |
797775068dfd8bfba04f9a41f8aaca5b9efa629e | 8,967 | py | Python | funcoes.py | luistrovao/Interface-Python | 974663747754830605643158b1bb70e84eb3520b | [
"MIT"
] | null | null | null | funcoes.py | luistrovao/Interface-Python | 974663747754830605643158b1bb70e84eb3520b | [
"MIT"
] | null | null | null | funcoes.py | luistrovao/Interface-Python | 974663747754830605643158b1bb70e84eb3520b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 12 14:33:27 2019
@author: Gladson
"""
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import... | 32.48913 | 148 | 0.57377 |
797775d50e87886a9b9e9fcc6e613d6c5c250528 | 772 | py | Python | Hackerrank/30 Days of Code/Python/day 22.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | Hackerrank/30 Days of Code/Python/day 22.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | Hackerrank/30 Days of Code/Python/day 22.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | class Node:
def __init__(self,data):
self.right=self.left=None
self.data = data
class Solution:
def insert(self,root,data):
if root==None:
return Node(data)
else:
if data<=root.data:
cur=self.insert(root.left,data)
root.left... | 25.733333 | 80 | 0.556995 |
79777731c2980c5f623190efe872123c621baeff | 2,407 | py | Python | empresas/api/service.py | projeto-agro-tcc/osvaldo-backend | 7e8b6b2ed849cd54f0bb5b855c4016fa062d3c33 | [
"MIT"
] | null | null | null | empresas/api/service.py | projeto-agro-tcc/osvaldo-backend | 7e8b6b2ed849cd54f0bb5b855c4016fa062d3c33 | [
"MIT"
] | null | null | null | empresas/api/service.py | projeto-agro-tcc/osvaldo-backend | 7e8b6b2ed849cd54f0bb5b855c4016fa062d3c33 | [
"MIT"
] | null | null | null | from empresas.models import Empresa
from enderecos.api.service import EnderecoService
from telefones.api.service import TelefoneService
class EmpresaService:
def __init__(self):
self.endereco_service = EnderecoService()
self.telefone_service = TelefoneService()
def from_dto(self, objDto):
... | 36.469697 | 94 | 0.624844 |
7977786969dc41fd8c493ee32037202b0c0afe1c | 9,834 | py | Python | mediapipe/util/tracking/motion_saliency_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | mediapipe/util/tracking/motion_saliency_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | mediapipe/util/tracking/motion_saliency_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/util/tracking/motion_saliency.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf imp... | 55.875 | 1,087 | 0.770185 |
79777988b00f174e58f9d2cf5ef85c8c3ae24b88 | 3,340 | py | Python | fairlearn/metrics/_extra_metrics.py | GeGao2014/fairlearn | b0841c8b07ead6a285bdbc0ea61cac2338cbc96e | [
"MIT"
] | 1 | 2021-04-22T21:22:20.000Z | 2021-04-22T21:22:20.000Z | fairlearn/metrics/_extra_metrics.py | GeGao2014/fairlearn | b0841c8b07ead6a285bdbc0ea61cac2338cbc96e | [
"MIT"
] | null | null | null | fairlearn/metrics/_extra_metrics.py | GeGao2014/fairlearn | b0841c8b07ead6a285bdbc0ea61cac2338cbc96e | [
"MIT"
] | 1 | 2020-03-24T14:42:04.000Z | 2020-03-24T14:42:04.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""A variety of extra metrics useful for assessing fairness.
These are metrics which are not part of `scikit-learn`.
"""
import sklearn.metrics as skm
from ._metrics_engine import make_group_metric
from ._balanced_root_me... | 34.43299 | 108 | 0.742216 |
797779b6342e0458ecfbf0ff196401e22458dad6 | 1,613 | py | Python | target/pixhawk/fmu-v5/buildlist.py | shaopengyuan/FMT-Firmware | bbdb3649ec4c1cad3d4a7fc3866091f99807fcfc | [
"Apache-2.0"
] | null | null | null | target/pixhawk/fmu-v5/buildlist.py | shaopengyuan/FMT-Firmware | bbdb3649ec4c1cad3d4a7fc3866091f99807fcfc | [
"Apache-2.0"
] | null | null | null | target/pixhawk/fmu-v5/buildlist.py | shaopengyuan/FMT-Firmware | bbdb3649ec4c1cad3d4a7fc3866091f99807fcfc | [
"Apache-2.0"
] | null | null | null | # Build Lists
# Modify this file to control which files/modules should be built
DRIVERS = [
'imu/icm20689/*.c',
'imu/bmi055/*.c',
'mag/ist8310/*.c',
'barometer/ms5611/*.c',
'gps/m8n/*.c',
'rgb_led/ncp5623c/*.c',
]
DRIVERS_CPPPATH = []
HAL = [
'pin/*.c',
'serial/*.c',
'systick/*.c'... | 16.459184 | 65 | 0.491631 |
797779ce31dbc035ff1a0a825a64c262e463cf87 | 782 | py | Python | src/ggrc_risks/migrations/versions/20141128185952_44d5969c897b_add_missing_columns_to_risks.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc_risks/migrations/versions/20141128185952_44d5969c897b_add_missing_columns_to_risks.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc_risks/migrations/versions/20141128185952_44d5969c897b_add_missing_columns_to_risks.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""add missing columns to risks
Revision ID: 44d5969c897b
Revises: 1347acbb4dc2
Create Date: 2014-11-28 18:59:52.290005
"""
# revision identifiers, used by Alembic.
revision = '44d5969c897b'
down_revision... | 26.066667 | 85 | 0.713555 |
79777a2a5bb2ea00b57307ea2413a8788e9f102a | 6,147 | py | Python | src/ui/ui_pygame.py | linluk/roguelike | bf57c28e776a03bbbe801f91706d4b66f114bc86 | [
"WTFPL"
] | 2 | 2018-02-15T22:24:32.000Z | 2018-02-15T22:24:33.000Z | src/ui/ui_pygame.py | linluk/roguelike | bf57c28e776a03bbbe801f91706d4b66f114bc86 | [
"WTFPL"
] | 21 | 2018-02-15T22:27:11.000Z | 2018-03-09T22:01:23.000Z | src/ui/ui_pygame.py | linluk/downstairs | bf57c28e776a03bbbe801f91706d4b66f114bc86 | [
"WTFPL"
] | null | null | null | import pygame
from pygame.locals import *
import time
import defs
from ui.gfx_tiles import Tiles
SIZE_OFFSET_X = 12
SIZE_OFFSET_Y = 16
FONT_SIZE = 14
# Color definitions, todo convert them from ui_curses to rgb
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
ORANGE = (255, 161, 0)
... | 28.995283 | 101 | 0.621604 |
79777aa91ecb79b104c3707daa08116cedc3b5cf | 326 | py | Python | jelly/__init__.py | chunkybanana/Velay | b9163079e0e7bf171d09e04d7830191396802bec | [
"MIT"
] | 4 | 2021-11-19T08:34:18.000Z | 2022-03-12T03:21:34.000Z | jelly/__init__.py | chunkybanana/Velay | b9163079e0e7bf171d09e04d7830191396802bec | [
"MIT"
] | null | null | null | jelly/__init__.py | chunkybanana/Velay | b9163079e0e7bf171d09e04d7830191396802bec | [
"MIT"
] | null | null | null | from sys import stderr
from interpreter import *
def main(code, args, end):
for index in range(min(7, len(args))):
atoms['³⁴⁵⁶⁷⁸⁹'[index]].call = lambda literal = args[index]: literal
try:
output(jelly_eval(code, args[:2]), end)
except KeyboardInterrupt:
if stderr.isatty():
sys.stderr.write('\n')
retur... | 21.733333 | 70 | 0.693252 |
79777b84cf5adb0d0649e5dd5ba68feae032ab12 | 254 | py | Python | profil3r/core/services/_entertainment.py | ActorExpose/Profil3r | 11a1470acf31a83acdf691f3fcbcbc5dc7af6f78 | [
"MIT"
] | 1 | 2021-05-09T01:30:56.000Z | 2021-05-09T01:30:56.000Z | profil3r/core/services/_entertainment.py | 1r0dm480/Profil3r | b19ed43414792da689be4c36b318216f22191873 | [
"MIT"
] | null | null | null | profil3r/core/services/_entertainment.py | 1r0dm480/Profil3r | b19ed43414792da689be4c36b318216f22191873 | [
"MIT"
] | null | null | null | from profil3r.modules.entertainment.dailymotion import Dailymotion
# Dailymotion
def dailymotion(self):
self.result["dailymotion"] = Dailymotion(self.CONFIG, self.permutations_list).search()
# print results
self.print_results("dailymotion") | 36.285714 | 91 | 0.779528 |
79777b9f4542c4dd641d8215d04aa55f6edfdef0 | 3,116 | py | Python | ivy_tests/test_ivy/conftest.py | MarShaikh/ivy | e6bf8c1ea2af409fe61d16bc5874b5e21dc5a333 | [
"Apache-2.0"
] | 2 | 2022-02-09T12:59:22.000Z | 2022-02-10T23:39:01.000Z | ivy_tests/test_ivy/conftest.py | MarShaikh/ivy | e6bf8c1ea2af409fe61d16bc5874b5e21dc5a333 | [
"Apache-2.0"
] | null | null | null | ivy_tests/test_ivy/conftest.py | MarShaikh/ivy | e6bf8c1ea2af409fe61d16bc5874b5e21dc5a333 | [
"Apache-2.0"
] | 1 | 2022-03-17T00:22:36.000Z | 2022-03-17T00:22:36.000Z | # global
import os
import pytest
from typing import Dict
from hypothesis import settings
settings.register_profile("default", max_examples=100, deadline=None)
settings.load_profile("default")
# local
from ivy_tests.test_ivy import helpers
from ivy import clear_framework_stack, DefaultDevice
FW_STRS = ["numpy", "jax... | 29.396226 | 76 | 0.613928 |
79777c1336b287718f3858b6c26d0dd436885ddd | 212 | py | Python | Tkinter/database.py | zuqingxie/ROS_learning | c6fcfa76eb3bc91a52850d0f28785f123ca82409 | [
"MIT"
] | null | null | null | Tkinter/database.py | zuqingxie/ROS_learning | c6fcfa76eb3bc91a52850d0f28785f123ca82409 | [
"MIT"
] | null | null | null | Tkinter/database.py | zuqingxie/ROS_learning | c6fcfa76eb3bc91a52850d0f28785f123ca82409 | [
"MIT"
] | null | null | null | # 数据库处理,着一块暂时用不到
from tkinter import *
from PIL import ImageTk, Image
root = Tk()
root.title("frame learning")
root.iconbitmap('@/home/zuqing/Downloads/apple_icon.xbm')
root.geometry("600x600")
root.mainloop() | 19.272727 | 57 | 0.754717 |
79777ca7c91fe25485535fd39fe1839f8e6d7c0d | 3,035 | py | Python | tests/utils.py | synapticarbors/wagyu | b98354611dceda8888f2951e9704f843a4e88c27 | [
"MIT"
] | 1 | 2021-01-20T05:49:13.000Z | 2021-01-20T05:49:13.000Z | tests/utils.py | synapticarbors/wagyu | b98354611dceda8888f2951e9704f843a4e88c27 | [
"MIT"
] | 1 | 2020-11-20T18:21:24.000Z | 2020-11-20T18:21:37.000Z | tests/utils.py | synapticarbors/wagyu | b98354611dceda8888f2951e9704f843a4e88c27 | [
"MIT"
] | 2 | 2020-11-20T18:17:31.000Z | 2021-01-20T14:58:22.000Z | import pickle
from enum import Enum
from functools import partial
from typing import (Callable,
Iterable,
List,
Optional,
Sequence,
Tuple,
Type,
TypeVar)
from hypothesis import st... | 30.969388 | 77 | 0.647446 |
79777cd8e63e0aab5dd42aa2ad91472fcf21c50c | 8,582 | py | Python | tests/test_job.py | RG4421/marge-bot | 09d5ca06e74c77f3c9ca069747102a7b12d3f80c | [
"BSD-3-Clause"
] | null | null | null | tests/test_job.py | RG4421/marge-bot | 09d5ca06e74c77f3c9ca069747102a7b12d3f80c | [
"BSD-3-Clause"
] | null | null | null | tests/test_job.py | RG4421/marge-bot | 09d5ca06e74c77f3c9ca069747102a7b12d3f80c | [
"BSD-3-Clause"
] | 3 | 2021-02-19T18:40:12.000Z | 2021-10-01T22:12:34.000Z | # pylint: disable=protected-access
from datetime import timedelta
from unittest.mock import ANY, Mock, patch, create_autospec
import pytest
from marge.job import CannotMerge, MergeJob, MergeJobOptions, SkipMerge, MergeStrategy
import marge.interval
import marge.git
import marge.gitlab
import marge.merge_request
impor... | 37.973451 | 99 | 0.649965 |
79777d041572d76f0ccc2f29c0b0496c7238a1c7 | 10,296 | py | Python | tempest/api/compute/admin/test_servers.py | TeamXgrid/xgrid-tempest | 4411b2992c4f093ddc893e2e8149b2277d35c137 | [
"Apache-2.0"
] | 1 | 2018-06-03T13:49:58.000Z | 2018-06-03T13:49:58.000Z | tempest/api/compute/admin/test_servers.py | TeamXgrid/xgrid-tempest | 4411b2992c4f093ddc893e2e8149b2277d35c137 | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/admin/test_servers.py | TeamXgrid/xgrid-tempest | 4411b2992c4f093ddc893e2e8149b2277d35c137 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 46.378378 | 79 | 0.669483 |
79777d1bf732c8468f5fc146eba070066f29b463 | 3,334 | py | Python | passglm/utils.py | bccho/pass-glm | 4ad14dd043532419dc413c509672b54d1eb8d516 | [
"MIT"
] | null | null | null | passglm/utils.py | bccho/pass-glm | 4ad14dd043532419dc413c509672b54d1eb8d516 | [
"MIT"
] | null | null | null | passglm/utils.py | bccho/pass-glm | 4ad14dd043532419dc413c509672b54d1eb8d516 | [
"MIT"
] | null | null | null | # Authors: Trevor Campbell <tdjc@mit.edu>
# Jonathan Huggins <jhuggins@mit.edu>
from __future__ import absolute_import, print_function
import os
import errno
import inspect
import time
import numpy as np
import scipy.sparse as sp
import numpy.core.numeric as _nx
def format_seconds(secs):
if secs < 1e-... | 27.327869 | 75 | 0.577085 |
79777d8c56946b1132f0509bd91d30b4cd38cb01 | 3,003 | py | Python | test/repository/list_dao_test.py | algalopez/flaskini | c60cfbc3e9a968fc3993471fbc8178e599053486 | [
"BSD-4-Clause"
] | null | null | null | test/repository/list_dao_test.py | algalopez/flaskini | c60cfbc3e9a968fc3993471fbc8178e599053486 | [
"BSD-4-Clause"
] | null | null | null | test/repository/list_dao_test.py | algalopez/flaskini | c60cfbc3e9a968fc3993471fbc8178e599053486 | [
"BSD-4-Clause"
] | null | null | null | import logging
from sqlalchemy.orm import Session
from app.repository import list_dao, database_connection
from app.repository.model.list import List as RepositoryList
from test import database_helper
@database_helper.prepare_database(
before=[
'INSERT INTO list (id, list) VALUES (1, "list 1");',
... | 32.641304 | 81 | 0.661006 |
79777e52afa193464911f4ee6df713d76ad84607 | 1,015 | py | Python | plugins/libinst/src/libinst/entities/architecture.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | 2 | 2015-01-26T07:15:19.000Z | 2015-11-09T13:42:11.000Z | plugins/libinst/src/libinst/entities/architecture.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | null | null | null | plugins/libinst/src/libinst/entities/architecture.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | null | null | null | # This file is part of the clacks framework.
#
# http://clacks-project.org
#
# Copyright:
# (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de
#
# License:
# GPL-2: http://www.gnu.org/licenses/gpl-2.0.html
#
# See the LICENSE file in the project's top-level directory for details.
from sqlalchemy import Colu... | 26.710526 | 72 | 0.64335 |
79777f0e33c25214775f182bf754241ff52c1797 | 1,661 | py | Python | docs/conf.py | PseudotsugaMenziesii/e-napalm | 23655d92173760cec3b3f7a9195fca4498b3bd99 | [
"MIT"
] | null | null | null | docs/conf.py | PseudotsugaMenziesii/e-napalm | 23655d92173760cec3b3f7a9195fca4498b3bd99 | [
"MIT"
] | null | null | null | docs/conf.py | PseudotsugaMenziesii/e-napalm | 23655d92173760cec3b3f7a9195fca4498b3bd99 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# -- General configuration -----------------------------------------------------
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# The suffix of source filenames.
source_suffix = ".rst"
# The master toctree document.
master_doc = "inde... | 32.568627 | 80 | 0.698977 |
79777f5582853425a8ef1849ad1c70735d52f32d | 7,658 | py | Python | test/functional/feature_assumevalid.py | azsxcv11060/bitcoin | 086dae9878680608e189b9aac2a605254d3b4395 | [
"MIT"
] | 13 | 2019-03-21T03:55:52.000Z | 2022-01-06T17:49:16.000Z | test/functional/feature_assumevalid.py | azsxcv11060/bitcoin | 086dae9878680608e189b9aac2a605254d3b4395 | [
"MIT"
] | 3 | 2020-05-12T23:01:27.000Z | 2020-05-17T05:14:25.000Z | test/functional/feature_assumevalid.py | azsxcv11060/bitcoin | 086dae9878680608e189b9aac2a605254d3b4395 | [
"MIT"
] | 5 | 2019-12-17T23:52:00.000Z | 2021-06-13T20:39:56.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test logic for skipping signature validation on old blocks.
Test logic for skipping signature validati... | 39.071429 | 107 | 0.654348 |
79778076c8b03fee25041c92635e0386bc81cf23 | 27,959 | py | Python | tests/run_spark_hdfs.py | jacmarjorie/GenomicsDB | e4867167a82ef145ffdd7d2208858600f4f67f70 | [
"MIT"
] | null | null | null | tests/run_spark_hdfs.py | jacmarjorie/GenomicsDB | e4867167a82ef145ffdd7d2208858600f4f67f70 | [
"MIT"
] | null | null | null | tests/run_spark_hdfs.py | jacmarjorie/GenomicsDB | e4867167a82ef145ffdd7d2208858600f4f67f70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#The MIT License (MIT)
#Copyright (c) 2018 University of California, Los Angeles and Intel Corporation
#Copyright (c) 2019 Omics Data Automation, Inc.
#Permission is hereby granted, free of charge, to any person obtaining a copy of
#this software and associated documentation files (the "Softwar... | 58.737395 | 624 | 0.588326 |
797780858abb9dce7644330eadf1952e0c960ff8 | 10,566 | py | Python | docker/api/network.py | mitar/docker-py | 44034c4041dc4627941c11f7928058c80991f822 | [
"Apache-2.0"
] | null | null | null | docker/api/network.py | mitar/docker-py | 44034c4041dc4627941c11f7928058c80991f822 | [
"Apache-2.0"
] | null | null | null | docker/api/network.py | mitar/docker-py | 44034c4041dc4627941c11f7928058c80991f822 | [
"Apache-2.0"
] | null | null | null | from ..errors import InvalidVersion
from ..utils import check_resource, minimum_version
from ..utils import version_lt
from .. import utils
class NetworkApiMixin(object):
@minimum_version('1.21')
def networks(self, names=None, ids=None, filters=None):
"""
List networks. Similar to the ``docker... | 37.870968 | 78 | 0.540981 |
797780d562abe580536a2840878e044ace04c545 | 7,566 | py | Python | homeassistant/components/saj/sensor.py | ymanton/home-assistant | 274cf232692396a6f0359a45d949ff94b681af52 | [
"Apache-2.0"
] | 4 | 2016-12-23T10:36:36.000Z | 2021-04-22T12:38:16.000Z | homeassistant/components/saj/sensor.py | ymanton/home-assistant | 274cf232692396a6f0359a45d949ff94b681af52 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/components/saj/sensor.py | ymanton/home-assistant | 274cf232692396a6f0359a45d949ff94b681af52 | [
"Apache-2.0"
] | 1 | 2020-02-17T07:44:24.000Z | 2020-02-17T07:44:24.000Z | """SAJ solar inverter interface."""
import asyncio
from datetime import date
import logging
import pysaj
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_HOST,
CONF_NAME,
CONF_PASSWORD,
CONF_TYPE,
CONF_USERNAME,
DEVICE_... | 30.631579 | 88 | 0.650806 |
79778136ad4888be3f4cd5d34503590c030d116b | 8,541 | py | Python | platform/x11/detect.py | RebelliousX/Go_Dot | 88bd18244bda74843ed6e0b99db106dffa4979bc | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null | platform/x11/detect.py | RebelliousX/Go_Dot | 88bd18244bda74843ed6e0b99db106dffa4979bc | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null | platform/x11/detect.py | RebelliousX/Go_Dot | 88bd18244bda74843ed6e0b99db106dffa4979bc | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null | import os
import platform
import sys
def is_active():
return True
def get_name():
return "X11"
def can_build():
if (os.name != "posix" or sys.platform == "darwin"):
return False
# Check the minimal dependencies
x11_error = os.system("pkg-config --version > /dev/null")
if (x11_err... | 35.439834 | 121 | 0.596417 |
79778206cdc82dd2fb2e0f7d22170b5e75b5b635 | 1,550 | py | Python | setup.py | prity-k/molecule | 4fe7e046b8d24dda91c783e7477331ea66b7dbc1 | [
"MIT"
] | 45 | 2020-09-25T23:40:33.000Z | 2022-03-21T04:56:11.000Z | setup.py | prity-k/molecule | 4fe7e046b8d24dda91c783e7477331ea66b7dbc1 | [
"MIT"
] | 36 | 2020-09-07T16:11:50.000Z | 2022-02-16T23:44:57.000Z | setup.py | prity-k/molecule | 4fe7e046b8d24dda91c783e7477331ea66b7dbc1 | [
"MIT"
] | 21 | 2020-10-19T14:56:43.000Z | 2022-03-31T13:32:58.000Z | #! /usr/bin/env python
# Copyright (c) 2019 Red Hat, Inc.
# Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including w... | 40.789474 | 79 | 0.745161 |
7977825b849d7893651e5e296ab283c4094aff1f | 116 | py | Python | examples/exampleT.py | lrei/irnotify | deffa1c073a6af67a0538b867483241c1496da7b | [
"MIT"
] | null | null | null | examples/exampleT.py | lrei/irnotify | deffa1c073a6af67a0538b867483241c1496da7b | [
"MIT"
] | null | null | null | examples/exampleT.py | lrei/irnotify | deffa1c073a6af67a0538b867483241c1496da7b | [
"MIT"
] | null | null | null | from twitternotify import TwitterNotify
n = TwitterNotify("twitter.conf")
n.notify("lrei", "How do you feel, Rei?")
| 29 | 41 | 0.75 |
797782ee2f0b36142df0ecda3f65f096f6f842a6 | 4,026 | py | Python | bentoml/utils/log.py | awesome-archive/BentoML | 9a1d21a014ab11dc235ddf878d590ec7c496f291 | [
"Apache-2.0"
] | null | null | null | bentoml/utils/log.py | awesome-archive/BentoML | 9a1d21a014ab11dc235ddf878d590ec7c496f291 | [
"Apache-2.0"
] | null | null | null | bentoml/utils/log.py | awesome-archive/BentoML | 9a1d21a014ab11dc235ddf878d590ec7c496f291 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Atalaya Tech, 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 law or agreed to in writing, ... | 35.315789 | 86 | 0.576006 |
797783df300a9800c66134d6ba1dc1ebea2b6baf | 8,265 | py | Python | server/accession/actions/actionbatch.py | coll-gate/collgate | 8c2ff1c59adda2bf318040f588c05263317a2812 | [
"MIT"
] | 2 | 2017-07-04T16:19:09.000Z | 2019-08-16T04:54:47.000Z | server/accession/actions/actionbatch.py | coll-gate/collgate | 8c2ff1c59adda2bf318040f588c05263317a2812 | [
"MIT"
] | null | null | null | server/accession/actions/actionbatch.py | coll-gate/collgate | 8c2ff1c59adda2bf318040f588c05263317a2812 | [
"MIT"
] | 1 | 2018-04-13T08:28:09.000Z | 2018-04-13T08:28:09.000Z | # -*- coding: utf-8; -*-
#
# @file actionbatch
# @brief collgate
# @author Frédéric SCHERMA (INRA UMR1095)
# @date 2018-04-18
# @copyright Copyright (c) 2018 INRA/CIRAD
# @license MIT (see LICENSE file)
# @details
import json
from django.core.exceptions import SuspiciousOperation
from django.shortcuts import get_ob... | 29.204947 | 105 | 0.671143 |
79778539c08619c1411937c2656cd5bff312143a | 3,619 | py | Python | selfdrive/controls/lib/drive_helpers.py | seanchen5716/openpilot-andy | 93aa2806286a032ddf6b82a0a13b2a202f7f474e | [
"MIT"
] | 36 | 2020-06-30T19:25:30.000Z | 2022-01-11T21:36:28.000Z | selfdrive/controls/lib/drive_helpers.py | seanchen5716/openpilot-andy | 93aa2806286a032ddf6b82a0a13b2a202f7f474e | [
"MIT"
] | 6 | 2020-06-27T20:06:02.000Z | 2021-02-21T14:28:42.000Z | selfdrive/controls/lib/drive_helpers.py | seanchen5716/openpilot-andy | 93aa2806286a032ddf6b82a0a13b2a202f7f474e | [
"MIT"
] | 91 | 2020-07-02T16:30:11.000Z | 2021-09-07T19:12:30.000Z | from common.numpy_fast import clip, interp
from selfdrive.config import Conversions as CV
from cereal import car
ButtonType = car.CarState.ButtonEvent.Type
ButtonPrev = ButtonType.unknown
ButtonCnt = 0
LongPressed = False
PrevGaspressed = False
# kph
FIRST_PRESS_TIME = 1
LONG_PRESS_TIME = 50
V_CRUISE_MAX = 177
V_CRU... | 33.509259 | 123 | 0.732523 |
79778624301890e5496a107afbef35c62fb7c287 | 15,633 | py | Python | TestRCS.py | philips/feusb | 25bd6aa3c8de30b1aaa613762b562147b5316b7d | [
"0BSD"
] | 2 | 2016-05-08T16:33:12.000Z | 2019-06-17T06:14:42.000Z | TestRCS.py | philips/feusb | 25bd6aa3c8de30b1aaa613762b562147b5316b7d | [
"0BSD"
] | null | null | null | TestRCS.py | philips/feusb | 25bd6aa3c8de30b1aaa613762b562147b5316b7d | [
"0BSD"
] | null | null | null | """TestRCS.py -- Fascinating Electronics RC Servo control module test program.
Initializes and runs the servos at varying accelerations with the positions
displayed in graphical bars. Analog voltages are measured and similarly
displayed.
Important: This program is written for Windows and uses the WConio display
inter... | 37.76087 | 92 | 0.513849 |
797786eaac0fd79b3d9e824264863407f0fdb78c | 397 | py | Python | squad_game/squad_game/asgi.py | ricardodani/squad-game | e75a22dee8acc6bf11bdf81363712344f42dc207 | [
"Apache-2.0"
] | null | null | null | squad_game/squad_game/asgi.py | ricardodani/squad-game | e75a22dee8acc6bf11bdf81363712344f42dc207 | [
"Apache-2.0"
] | null | null | null | squad_game/squad_game/asgi.py | ricardodani/squad-game | e75a22dee8acc6bf11bdf81363712344f42dc207 | [
"Apache-2.0"
] | null | null | null | """
ASGI config for squad_game project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
79778753b6eeb26d18c301d35ac79af46eddb98f | 609 | py | Python | semantic-segmentation/libraries/semantic/metrics.py | shenqiang-Yuan/mysecondRepo | cbe701ecd586860ff3444f4ad5aea25e209260ea | [
"Apache-2.0"
] | 42 | 2018-05-01T21:01:04.000Z | 2022-02-05T18:46:58.000Z | semantic-segmentation/libraries/semantic/metrics.py | shenqiang-Yuan/mysecondRepo | cbe701ecd586860ff3444f4ad5aea25e209260ea | [
"Apache-2.0"
] | 7 | 2018-05-05T09:25:00.000Z | 2019-07-12T21:07:19.000Z | semantic-segmentation/libraries/semantic/metrics.py | shenqiang-Yuan/mysecondRepo | cbe701ecd586860ff3444f4ad5aea25e209260ea | [
"Apache-2.0"
] | 19 | 2018-05-01T21:38:38.000Z | 2020-07-20T06:43:00.000Z | #!/usr/bin/python3
import keras.backend as KB
import tensorflow as tf
def sparse_accuracy_ignoring_last_label(y_true, y_pred):
nb_classes = KB.int_shape(y_pred)[-1]
y_pred = KB.reshape(y_pred, (-1, nb_classes))
y_true = KB.one_hot(tf.to_int32(KB.flatten(y_true)),
nb_classes + 1)
... | 33.833333 | 147 | 0.671593 |
797787ce078d162a0309572919270c8a573e1c5a | 2,898 | py | Python | setup.py | PendragonLore/shinkei | 4d5abc61a24de63126c93fefcb3bf9cc57abbe1c | [
"MIT"
] | 1 | 2019-12-14T16:36:34.000Z | 2019-12-14T16:36:34.000Z | setup.py | PendragonLore/shinkei | 4d5abc61a24de63126c93fefcb3bf9cc57abbe1c | [
"MIT"
] | 3 | 2019-12-14T16:58:59.000Z | 2020-12-22T10:38:02.000Z | setup.py | PendragonLore/shinkei | 4d5abc61a24de63126c93fefcb3bf9cc57abbe1c | [
"MIT"
] | 3 | 2019-12-14T16:53:24.000Z | 2020-11-01T23:39:41.000Z | # -*- coding: utf-8 -*-
import pathlib
import re
from setuptools import setup
ROOT = pathlib.Path(__file__).parent
with (ROOT / "requirements.txt").open(encoding="utf-8") as f:
requirements = f.read().splitlines()
with (ROOT / "shinkei" / "__init__.py").open(encoding="utf-8") as f:
version = re.search(r"^_... | 29.876289 | 99 | 0.573844 |
797787f8acb9707780a056861016d05e63790990 | 468 | py | Python | grievance/management/commands/clearModels.py | AdarshNandanwar/CMS | 755b5e9244807f30a0bfb4b88d6528fc49bdd070 | [
"MIT"
] | null | null | null | grievance/management/commands/clearModels.py | AdarshNandanwar/CMS | 755b5e9244807f30a0bfb4b88d6528fc49bdd070 | [
"MIT"
] | 9 | 2020-05-10T22:04:50.000Z | 2022-02-10T10:29:14.000Z | grievance/management/commands/clearModels.py | AdarshNandanwar/CMS | 755b5e9244807f30a0bfb4b88d6528fc49bdd070 | [
"MIT"
] | 5 | 2020-07-11T08:03:07.000Z | 2021-01-19T16:40:19.000Z | from django.core.management.base import BaseCommand
from grievance.models import *
from django.contrib.auth.models import User
class Command(BaseCommand):
def _create(self):
GrievanceForm.objects.all().delete()
UserProfile.objects.all().delete()
ApplicationStatus.objects.all().delete()
InformativeQueryForm.ob... | 31.2 | 71 | 0.767094 |
7977883cdd173534958eafa7d42097e15bca5649 | 2,698 | py | Python | savecode/threeyears/idownclient/spidermanagent/spiderregistercheck.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2019-05-19T11:54:26.000Z | 2019-05-19T12:03:49.000Z | savecode/threeyears/idownclient/spidermanagent/spiderregistercheck.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 1 | 2020-11-27T07:55:15.000Z | 2020-11-27T07:55:15.000Z | savecode/threeyears/idownclient/spidermanagent/spiderregistercheck.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2021-09-06T18:06:12.000Z | 2021-12-31T07:44:43.000Z | """
精简代码
check账号是否注册了spider
update by judy 2019/03/07
账号若注册返回btaskback
"""
import threading
import traceback
from datacontract import Task, ECommandStatus
from datacontract.apps.appbase import AppConfig
from idownclient.spider.spiderbase import SpiderBase
from idownclient.spidermanagent.spidermanagebase import Spider... | 36.958904 | 118 | 0.609711 |
79778932d3fe5746aa2f00de486a37aa8bdbfd2f | 3,083 | py | Python | migrations/versions/8f35e44e9284_.py | TobKed/Home-Budgeting-App | 5dc865e7b49812a26d4c9aa8e82f67a2b1a3bf89 | [
"MIT"
] | null | null | null | migrations/versions/8f35e44e9284_.py | TobKed/Home-Budgeting-App | 5dc865e7b49812a26d4c9aa8e82f67a2b1a3bf89 | [
"MIT"
] | null | null | null | migrations/versions/8f35e44e9284_.py | TobKed/Home-Budgeting-App | 5dc865e7b49812a26d4c9aa8e82f67a2b1a3bf89 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 8f35e44e9284
Revises:
Create Date: 2019-12-23 09:11:37.088856
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "8f35e44e9284"
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto genera... | 38.061728 | 86 | 0.623419 |
797789f3838e211ca36bc85a41279cbfe1799d18 | 2,742 | py | Python | vscode-visual-tests/features/src/litava.py | syeda-khurrath/fabric8-analytics-common | 421f7e27869c5695ed73b51e6422e097aba00108 | [
"Apache-2.0"
] | null | null | null | vscode-visual-tests/features/src/litava.py | syeda-khurrath/fabric8-analytics-common | 421f7e27869c5695ed73b51e6422e097aba00108 | [
"Apache-2.0"
] | 4 | 2019-05-20T08:27:47.000Z | 2019-05-20T08:29:57.000Z | vscode-visual-tests/features/src/litava.py | codeready-analytics/fabric8-analytics-common | a763c5534d601f2f40a0f02c02914c49ea23669d | [
"Apache-2.0"
] | 1 | 2020-10-05T21:12:44.000Z | 2020-10-05T21:12:44.000Z | # vim: set fileencoding=utf-8
"""Interface to the Litava tool."""
import subprocess
def get_int_metrics(line):
"""Retrieve the integer metrics."""
return int(line.split(" ")[1])
def get_string_metrics(line):
"""Retrieve the string metrics."""
return line.split(" ")[1].strip()
def parse_litava_ou... | 29.804348 | 75 | 0.636397 |
79778a6176978fc17161eafe04c28f1cfaa570a6 | 2,543 | py | Python | imaging_db/utils/cli_utils.py | czbiohub/imagingDB | 1b1a58df3dbc94a43fb842cad198fb6c1c833326 | [
"MIT"
] | 5 | 2018-11-07T15:37:41.000Z | 2020-05-27T10:29:02.000Z | imaging_db/utils/cli_utils.py | czbiohub/imagingDB | 1b1a58df3dbc94a43fb842cad198fb6c1c833326 | [
"MIT"
] | 39 | 2018-11-07T21:06:42.000Z | 2019-09-30T21:33:31.000Z | imaging_db/utils/cli_utils.py | czbiohub/imagingDB | 1b1a58df3dbc94a43fb842cad198fb6c1c833326 | [
"MIT"
] | 2 | 2019-11-04T22:25:04.000Z | 2020-11-04T04:13:20.000Z | import datetime
def validate_id(id_str):
"""
Assert that the ID follows the naming convention
<ID>-YYYY-MM-DD-HH-MM-SS-<SSSS>.
ID is a 2-3 letter project ID. Currently supported:
ISP for In Situ Transcriptomics
ML for ?
SSSS is a 4 digit serial number
:param str id_str: ID string
... | 36.855072 | 80 | 0.605977 |
79778ab19bc89049a7c7b1fd8fde47ff6642ebca | 44,920 | py | Python | timm/models/vision_transformer.py | ares89/pytorch-image-models | dc51334cdc05757dc9004583aac8668ebd892b03 | [
"Apache-2.0"
] | 1 | 2022-03-23T06:45:22.000Z | 2022-03-23T06:45:22.000Z | timm/models/vision_transformer.py | ares89/pytorch-image-models | dc51334cdc05757dc9004583aac8668ebd892b03 | [
"Apache-2.0"
] | null | null | null | timm/models/vision_transformer.py | ares89/pytorch-image-models | dc51334cdc05757dc9004583aac8668ebd892b03 | [
"Apache-2.0"
] | null | null | null | """ Vision Transformer (ViT) in PyTorch
A PyTorch implement of Vision Transformers as described in:
'An Image Is Worth 16 x 16 Words: Transformers for Image Recognition at Scale'
- https://arxiv.org/abs/2010.11929
`How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers`
- https:... | 47.584746 | 140 | 0.69508 |
79778b6d79d6d2348b8393964cf54b9895f8ed9f | 38,854 | py | Python | parglare/parser.py | SupraSummus/parglare | da9c4992ac6f7f6bb05f657733cb4221da88782a | [
"MIT"
] | null | null | null | parglare/parser.py | SupraSummus/parglare | da9c4992ac6f7f6bb05f657733cb4221da88782a | [
"MIT"
] | 1 | 2019-09-22T18:01:34.000Z | 2019-09-22T18:01:34.000Z | parglare/parser.py | SupraSummus/parglare-slim | da9c4992ac6f7f6bb05f657733cb4221da88782a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import codecs
import logging
import sys
from copy import copy
from .grammar import EMPTY, EOF, STOP
from .tables import LALR, SLR, SHIFT, REDUCE, ACCEPT
from .exceptions import ParseError, ParserInitError, DisambiguationError, \
Dynamic... | 36.244403 | 92 | 0.538992 |
79778babc59d0c460053203e2c1fd56af0a5637b | 752 | py | Python | example/01.Getting_started/getting_started.part6_using_distance_sensor.py | rundhall/PC-LEGO-SPIKE-Simulator | 5b2fae19293875b2f60d599940d77237700798d3 | [
"MIT"
] | null | null | null | example/01.Getting_started/getting_started.part6_using_distance_sensor.py | rundhall/PC-LEGO-SPIKE-Simulator | 5b2fae19293875b2f60d599940d77237700798d3 | [
"MIT"
] | null | null | null | example/01.Getting_started/getting_started.part6_using_distance_sensor.py | rundhall/PC-LEGO-SPIKE-Simulator | 5b2fae19293875b2f60d599940d77237700798d3 | [
"MIT"
] | null | null | null | from spike import DistanceSensor, Motor
# Initialize the Distance Sensor and motor
distance_sensor = DistanceSensor('D')
motor = Motor('C')
# Move your hand slowly toward and then away from the Distance Sensor
count = 0
while count < 5:
distance_sensor.wait_for_distance_farther_than(50, 'cm')
motor.start()
distance_... | 32.695652 | 130 | 0.761968 |
79778beafeb295721f8719abb10998c41cf642bf | 142 | py | Python | model/user.py | vankrajnova/test_bx | 5bd2c2350905ae83257838bd87cb64d58f5f43ba | [
"Apache-2.0"
] | null | null | null | model/user.py | vankrajnova/test_bx | 5bd2c2350905ae83257838bd87cb64d58f5f43ba | [
"Apache-2.0"
] | null | null | null | model/user.py | vankrajnova/test_bx | 5bd2c2350905ae83257838bd87cb64d58f5f43ba | [
"Apache-2.0"
] | null | null | null | class User:
def __init__(self, user_login, user_password):
self.user_login = user_login
self.user_password = user_password | 35.5 | 50 | 0.711268 |
79778e4f5f544f4caa31ebd7a9174730986974c1 | 1,178 | py | Python | places/migrations/0011_auto_20180514_2025.py | samargulies/welp | 8ed292c392885840787752f86d0aa8f538da5465 | [
"MIT"
] | null | null | null | places/migrations/0011_auto_20180514_2025.py | samargulies/welp | 8ed292c392885840787752f86d0aa8f538da5465 | [
"MIT"
] | 7 | 2020-06-05T18:14:31.000Z | 2022-03-11T23:20:50.000Z | places/migrations/0011_auto_20180514_2025.py | samargulies/welp | 8ed292c392885840787752f86d0aa8f538da5465 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-05-14 20:25
from django.db import migrations, models
import django.db.models.deletion
import localflavor.us.models
class Migration(migrations.Migration):
dependencies = [
('places', '0010_auto_20180514_2012'),
]
operations = [
migrations.CreateModel(
... | 32.722222 | 114 | 0.586587 |
79778e555839a95f70088ea98459944ac83eced0 | 26,972 | py | Python | test/integration/smoke/test_primary_storage.py | saliven1970/cloudstack | 4617be458387421bbbfc120c1f054c9939ba52eb | [
"Apache-2.0"
] | 2 | 2021-10-31T01:04:26.000Z | 2021-11-08T09:43:30.000Z | test/integration/smoke/test_primary_storage.py | saliven1970/cloudstack | 4617be458387421bbbfc120c1f054c9939ba52eb | [
"Apache-2.0"
] | 20 | 2020-12-19T22:32:23.000Z | 2022-02-01T01:07:06.000Z | test/integration/smoke/test_primary_storage.py | saliven1970/cloudstack | 4617be458387421bbbfc120c1f054c9939ba52eb | [
"Apache-2.0"
] | 2 | 2016-11-10T16:29:26.000Z | 2019-05-20T12:23:35.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 38.531429 | 128 | 0.567255 |
79778eed3c5444b48b69659300026a6d78581def | 355 | py | Python | publish2.py | learnforpractice/mvm-local-testnet-scripts | 6891c8cca26da227343f393da1dceac574ecc9c9 | [
"MIT"
] | null | null | null | publish2.py | learnforpractice/mvm-local-testnet-scripts | 6891c8cca26da227343f393da1dceac574ecc9c9 | [
"MIT"
] | null | null | null | publish2.py | learnforpractice/mvm-local-testnet-scripts | 6891c8cca26da227343f393da1dceac574ecc9c9 | [
"MIT"
] | null | null | null | import shlex
import subprocess
from pyeoskit import eosapi
eosapi.set_node('http://127.0.0.1:9000')
info = eosapi.get_info()
ref_block = info['last_irreversible_block_id']
ref_block = ref_block[:24]
cmd = shlex.split(f'./mvm publish -p eos -m ../../mvm-configs/test1.toml -k ../../configs/test3.json -a helloworld12 -e ... | 32.272727 | 133 | 0.735211 |
79778f09791e19734b771aac8d07df83d151ff4a | 144,784 | py | Python | src/azure-cli/azure/cli/command_modules/storage/_help.py | ostojicb/azure-cli | c8da475c132e34f49dee7367f27f12f7b2219a55 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/storage/_help.py | ostojicb/azure-cli | c8da475c132e34f49dee7367f27f12f7b2219a55 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/storage/_help.py | ostojicb/azure-cli | c8da475c132e34f49dee7367f27f12f7b2219a55 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------... | 50.623776 | 417 | 0.734522 |
79778f2452b86694c1348fd3227fe9dc0245a326 | 942 | py | Python | FWCore/GuiBrowsers/test/test_parameterssets.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | FWCore/GuiBrowsers/test/test_parameterssets.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | FWCore/GuiBrowsers/test/test_parameterssets.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("copy_events")
# source
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring('file:/opt/user/hinzmann/QCDDiJet_Pt50to80_Summer09_RECO_3_1_X.root')
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )
# ... | 36.230769 | 108 | 0.787686 |
79778f6c2b88080653cf51304f54e39c432bd4c7 | 1,728 | py | Python | examples/script/run_searched_pruned_allspace_fashion_two36.py | zyh1999/pytorch-quantum | c00bd564a99001fee2fd6b30e5e34562ab981e28 | [
"MIT"
] | 98 | 2021-07-23T07:11:32.000Z | 2021-12-19T14:04:58.000Z | examples/script/run_searched_pruned_allspace_fashion_two36.py | zyh1999/pytorch-quantum | c00bd564a99001fee2fd6b30e5e34562ab981e28 | [
"MIT"
] | 2 | 2021-02-11T19:01:48.000Z | 2021-04-04T20:29:57.000Z | examples/script/run_searched_pruned_allspace_fashion_two36.py | zyh1999/pytorch-quantum | c00bd564a99001fee2fd6b30e5e34562ab981e28 | [
"MIT"
] | 12 | 2021-07-23T07:10:47.000Z | 2021-12-16T23:44:44.000Z | import subprocess
from torchpack.utils.logging import logger
import argparse
if __name__ == '__main__':
# parser = argparse.ArgumentParser()
# parser.add_argument('--dataset', type=str)
# parser.add_argument('--name', type=str)
# parser.add_argument('--space', type=str)
# parser.add_argument('--pr'... | 36 | 77 | 0.524884 |
79778f8bc3663654125628a30795ba0666565855 | 1,631 | py | Python | leap_motion_src/main.py | crystalrhee/hackumassvi | f556f96bf765ac49f02db6462e6bf9b306a49b99 | [
"MIT"
] | 1 | 2018-10-15T13:58:07.000Z | 2018-10-15T13:58:07.000Z | leap_motion_src/main.py | crystalrhee/hackumassvi | f556f96bf765ac49f02db6462e6bf9b306a49b99 | [
"MIT"
] | 5 | 2021-03-18T21:14:11.000Z | 2022-03-11T23:32:34.000Z | leap_motion_src/main.py | crystalrhee/hackumassvi | f556f96bf765ac49f02db6462e6bf9b306a49b99 | [
"MIT"
] | 2 | 2018-10-13T23:14:13.000Z | 2018-10-15T02:12:12.000Z | import sys, os, inspect
src_dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
arch_dir = '../lib/x64' if sys.maxsize > 2**32 else '../lib/x86'
sys.path.insert(0, os.path.abspath(os.path.join(src_dir, arch_dir)))
import lib.Leap as Leap
from music_listener import MusicListener
# from morse_listener import... | 32.62 | 80 | 0.684243 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.