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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
65df52864f67eab574a2138096e59108ebcaea57 | 8,795 | py | Python | benchmarks/base.py | fatelei/python-driver | 3bddef6185f2691e1713dfe51d1fa26d1555724c | [
"Apache-2.0"
] | null | null | null | benchmarks/base.py | fatelei/python-driver | 3bddef6185f2691e1713dfe51d1fa26d1555724c | [
"Apache-2.0"
] | null | null | null | benchmarks/base.py | fatelei/python-driver | 3bddef6185f2691e1713dfe51d1fa26d1555724c | [
"Apache-2.0"
] | null | null | null | # Copyright 2013-2015 DataStax, 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 writi... | 36.342975 | 102 | 0.627288 |
26ab4a41fe3bec5fd361bd777b8480198dfe7226 | 1,795 | py | Python | catcher_modules/database/postgres.py | Daniel-Han-Yang/catcher_modules | 2eff08d2c19719539f761a7cae0a48b69a3231db | [
"Apache-2.0"
] | 5 | 2019-01-09T14:15:25.000Z | 2020-09-11T12:18:43.000Z | catcher_modules/database/postgres.py | Daniel-Han-Yang/catcher_modules | 2eff08d2c19719539f761a7cae0a48b69a3231db | [
"Apache-2.0"
] | 44 | 2019-06-30T09:19:42.000Z | 2021-12-30T16:09:09.000Z | catcher_modules/database/postgres.py | Daniel-Han-Yang/catcher_modules | 2eff08d2c19719539f761a7cae0a48b69a3231db | [
"Apache-2.0"
] | 5 | 2019-09-01T09:49:05.000Z | 2021-09-12T06:00:54.000Z | from catcher.steps.external_step import ExternalStep
from catcher.steps.step import update_variables
from catcher_modules.database import SqlAlchemyDb
class Postgres(ExternalStep, SqlAlchemyDb):
"""
Allows you to run queries in `Postgres <https://www.postgresql.org/>`_
:Input:
:conf: postgres conf... | 26.791045 | 114 | 0.601671 |
afd3f02b25ca30e8654bacaf2c0f2c0f13ba9132 | 109 | py | Python | Utils/Timer.py | sundayz/idewave-core | 5bdb88892173c9c3e8c85f431cf9b5dbd9f23941 | [
"Apache-2.0"
] | 10 | 2019-06-29T19:24:52.000Z | 2021-02-21T22:45:57.000Z | Utils/Timer.py | sundayz/idewave-core | 5bdb88892173c9c3e8c85f431cf9b5dbd9f23941 | [
"Apache-2.0"
] | 4 | 2019-08-15T07:03:36.000Z | 2021-06-02T13:01:25.000Z | Utils/Timer.py | sundayz/idewave-core | 5bdb88892173c9c3e8c85f431cf9b5dbd9f23941 | [
"Apache-2.0"
] | 8 | 2019-06-30T22:47:48.000Z | 2021-02-20T19:21:30.000Z | import time
class Timer(object):
@staticmethod
def get_ms_time():
return int(time.time())
| 12.111111 | 31 | 0.633028 |
a81013ed61bfcae473161ca6bb7f0e55e811304d | 1,532 | py | Python | CURRENT BUILD/plugins/xbox.py | Wamy-Dev/DiscordRomScraperBot | d7b7e524baa423adb0f5fae9c8293cc3c83f83e1 | [
"MIT"
] | 12 | 2021-02-01T00:20:29.000Z | 2022-03-28T17:42:39.000Z | CURRENT BUILD/plugins/xbox.py | Wamy-Dev/DiscordRomScraperBot | d7b7e524baa423adb0f5fae9c8293cc3c83f83e1 | [
"MIT"
] | 4 | 2021-02-06T18:58:43.000Z | 2022-03-31T04:36:01.000Z | CURRENT BUILD/plugins/xbox.py | Wamy-Dev/DiscordRomScraperBot | d7b7e524baa423adb0f5fae9c8293cc3c83f83e1 | [
"MIT"
] | 2 | 2021-02-06T18:44:41.000Z | 2021-03-19T23:29:01.000Z |
import asyncio
from bs4 import BeautifulSoup
import pyshorteners
modules=["xbox"]
color=0x3FB02C
async def get(driver,searchTerm,moduleName):
#start multiuser
driver.get("https://github.com/Wamy-Dev/Rezi")
driver.execute_script("window.open('');")
... | 47.875 | 100 | 0.499347 |
98033ea349e17d6f11159cbe29438a0ddf08e2fa | 599 | py | Python | app.py | iabo/flask-core | 5a0a0a7ff78f34217b1cce050148db2f2f3968ca | [
"Apache-2.0"
] | null | null | null | app.py | iabo/flask-core | 5a0a0a7ff78f34217b1cce050148db2f2f3968ca | [
"Apache-2.0"
] | null | null | null | app.py | iabo/flask-core | 5a0a0a7ff78f34217b1cce050148db2f2f3968ca | [
"Apache-2.0"
] | null | null | null | from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
import os
# Init app
app = Flask(__name__)
basedir = os.path.abspath(os.path.dirname(__file__))
# Database
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'db.sqlit... | 26.043478 | 89 | 0.734558 |
bd814287205602f2ca23f4c1c004f56130e730a8 | 14,369 | py | Python | test/functional/wallet_balance.py | iamroot-project/bitweb | 1fc5514418c4c4569694050c5ccab68a7ab6457c | [
"MIT"
] | 5 | 2021-05-03T04:36:46.000Z | 2021-05-09T02:48:07.000Z | test/functional/wallet_balance.py | iamroot-project/bitweb | 1fc5514418c4c4569694050c5ccab68a7ab6457c | [
"MIT"
] | 4 | 2021-07-23T02:41:45.000Z | 2022-01-09T09:42:42.000Z | test/functional/wallet_balance.py | iamroot-project/bitweb | 1fc5514418c4c4569694050c5ccab68a7ab6457c | [
"MIT"
] | 6 | 2021-05-24T04:39:32.000Z | 2022-03-05T22:58:35.000Z | #!/usr/bin/env python3
# Copyright (c) 2018-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 the wallet balance RPC methods."""
from decimal import Decimal
import struct
from test_framework.... | 50.59507 | 162 | 0.63644 |
fe50e37ae5ba7875767562ae4039b07e93a42742 | 829 | py | Python | st2tests/st2tests/fixtures/packs/test_library_dependencies/actions/get_library_path.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | null | null | null | st2tests/st2tests/fixtures/packs/test_library_dependencies/actions/get_library_path.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 15 | 2021-02-11T22:58:54.000Z | 2021-08-06T18:03:47.000Z | st2tests/st2tests/fixtures/packs/test_library_dependencies/actions/get_library_path.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 1 | 2021-07-10T15:02:29.000Z | 2021-07-10T15:02:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 31.884615 | 74 | 0.758745 |
fd0ec6b2ba4d48b9ff781e9247783abcc0fd6635 | 5,946 | py | Python | myven/lib/python3.8/site-packages/ansible/modules/cloud/vmware/vmware_datastore_facts.py | baltham/dne-dna-code | 4a13309a790a670d2f07e635c9264a0c29976c6a | [
"MIT"
] | 1 | 2021-04-02T08:08:39.000Z | 2021-04-02T08:08:39.000Z | myven/lib/python3.8/site-packages/ansible/modules/cloud/vmware/vmware_datastore_facts.py | baltham/dne-dna-code | 4a13309a790a670d2f07e635c9264a0c29976c6a | [
"MIT"
] | null | null | null | myven/lib/python3.8/site-packages/ansible/modules/cloud/vmware/vmware_datastore_facts.py | baltham/dne-dna-code | 4a13309a790a670d2f07e635c9264a0c29976c6a | [
"MIT"
] | 1 | 2020-05-03T01:13:16.000Z | 2020-05-03T01:13:16.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 Tim Rightnour <thegarbledone@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_ver... | 31.460317 | 104 | 0.623108 |
9f925e6b744ad82229b1420236c113e20272adc2 | 393 | py | Python | options.py | HrPedersen/anderson-lake-python | 141d25fd4b0b23cd4a288cfb9d786307da4ab292 | [
"MIT"
] | 8 | 2020-04-02T16:04:21.000Z | 2022-01-07T22:48:35.000Z | anderson_lake/options.py | tcpedersen/ANNOptionPricingAndCalibration | 9db7b6ccd4609f399aa817869b41104eac488e88 | [
"MIT"
] | null | null | null | anderson_lake/options.py | tcpedersen/ANNOptionPricingAndCalibration | 9db7b6ccd4609f399aa817869b41104eac488e88 | [
"MIT"
] | 3 | 2020-07-17T05:17:54.000Z | 2020-11-19T09:49:52.000Z | '# -*- coding: utf-8 -*-'
import numpy as np
class EuropeanCallOption:
def __init__(self, tau, strike):
self.tau = tau
self.strike = strike
def __call__(self, forward):
return np.maximum(forward - self.strike, 0)
def __str__(self):
out_str = f"tau: {self.tau}\n\r" ... | 24.5625 | 51 | 0.557252 |
1915b6204aa916ea5aac53b6d4928d813b9be818 | 573 | py | Python | driver_setup.py | nafonels/mad_for_shoes | cdf5f6b20d32063a4a8dc827aebc202b84b8d431 | [
"MIT"
] | null | null | null | driver_setup.py | nafonels/mad_for_shoes | cdf5f6b20d32063a4a8dc827aebc202b84b8d431 | [
"MIT"
] | null | null | null | driver_setup.py | nafonels/mad_for_shoes | cdf5f6b20d32063a4a8dc827aebc202b84b8d431 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import shutil
import zipfile
from urllib import request
__author__ = 'Teoslard'
__version__ = "$"
chromedriver = "https://chromedriver.storage.googleapis.com/2.38/chromedriver_win32.zip"
os.makedirs('temp')
with request.urlopen(chromedriver) as driver_response:... | 24.913043 | 88 | 0.69808 |
1e6d3ef730a3d9c2bff2fd51e7fda19eefa89ed9 | 8,998 | py | Python | evaluate.py | shivgarg/qait_public | c13f3aac3e243e3043870d70d73243ccbe77dd0c | [
"MIT"
] | 43 | 2019-08-30T00:47:55.000Z | 2022-01-26T02:27:42.000Z | evaluate.py | shivgarg/qait_public | c13f3aac3e243e3043870d70d73243ccbe77dd0c | [
"MIT"
] | 1 | 2021-08-21T07:18:40.000Z | 2021-08-23T14:47:18.000Z | evaluate.py | shivgarg/qait_public | c13f3aac3e243e3043870d70d73243ccbe77dd0c | [
"MIT"
] | 12 | 2019-08-31T02:28:53.000Z | 2021-06-12T14:25:18.000Z | import numpy as np
import generic
import reward_helper
import copy
import os
import json
from tqdm import tqdm
from os.path import join as pjoin
import gym
import textworld
from textworld.gym import register_games, make_batch
from query import process_facts
request_infos = textworld.EnvInfos(description=True,
... | 55.202454 | 193 | 0.618915 |
d3aaecd82f0e56c45a7e526d7a7f3a315d693706 | 1,274 | py | Python | infra/cifuzz/filestore_utils.py | darkma773r/oss-fuzz | 3b4dfa5add28aff750729700d59a20eea8d6cb8f | [
"Apache-2.0"
] | 2 | 2018-07-04T12:53:54.000Z | 2019-05-15T19:31:40.000Z | infra/cifuzz/filestore_utils.py | darkma773r/oss-fuzz | 3b4dfa5add28aff750729700d59a20eea8d6cb8f | [
"Apache-2.0"
] | 9 | 2020-09-25T17:25:21.000Z | 2022-02-01T00:47:29.000Z | infra/cifuzz/filestore_utils.py | darkma773r/oss-fuzz | 3b4dfa5add28aff750729700d59a20eea8d6cb8f | [
"Apache-2.0"
] | 2 | 2020-04-30T20:39:30.000Z | 2020-09-21T06:16:53.000Z | # Copyright 2021 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, ... | 39.8125 | 76 | 0.773155 |
ec97590d6e061d1ea69fe6a07edc2ce9f3609602 | 641 | py | Python | survae/distributions/data_parallel.py | robert-giaquinto/survae_flows | 4d7dc638f77c48ad3c8393b967c33ac9dbad60fe | [
"MIT"
] | 2 | 2021-03-06T19:37:39.000Z | 2022-01-09T11:19:45.000Z | survae/distributions/data_parallel.py | robert-giaquinto/survae_flows | 4d7dc638f77c48ad3c8393b967c33ac9dbad60fe | [
"MIT"
] | null | null | null | survae/distributions/data_parallel.py | robert-giaquinto/survae_flows | 4d7dc638f77c48ad3c8393b967c33ac9dbad60fe | [
"MIT"
] | null | null | null | import math
import torch
from torch import nn
class DataParallelDistribution(nn.DataParallel):
"""
A DataParallel wrapper for Distribution.
To be used instead of nn.DataParallel for Distribution objects.
"""
def log_prob(self, *args, **kwargs):
return self.forward(*args, mode='log_prob', ... | 27.869565 | 67 | 0.680187 |
0eaacc6ec3bb141dbb16a5953b9c321645100ee3 | 68,589 | py | Python | benchmarks/SimResults/_bigLittle_hrrs_splash_tugberk_heteroFair/cmp_lu.cont/power.py | TugberkArkose/MLScheduler | e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061 | [
"Unlicense"
] | null | null | null | benchmarks/SimResults/_bigLittle_hrrs_splash_tugberk_heteroFair/cmp_lu.cont/power.py | TugberkArkose/MLScheduler | e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061 | [
"Unlicense"
] | null | null | null | benchmarks/SimResults/_bigLittle_hrrs_splash_tugberk_heteroFair/cmp_lu.cont/power.py | TugberkArkose/MLScheduler | e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061 | [
"Unlicense"
] | null | null | null | power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
'Gate... | 75.04267 | 124 | 0.68199 |
1ebc71cd079a1ceccb1266eb60e1da3b1f2bf519 | 3,472 | py | Python | software/mosek/7/tools/examples/python/mioinitsol.py | trgao10/PuenteAlignment-Slurm | 47e2c0d3efdb6ca511d8d5c1c0f20cec207e1341 | [
"MIT"
] | 2 | 2020-05-19T22:55:34.000Z | 2020-07-06T14:28:58.000Z | software/mosek/7/tools/examples/python/mioinitsol.py | trgao10/PuenteAlignment-Slurm | 47e2c0d3efdb6ca511d8d5c1c0f20cec207e1341 | [
"MIT"
] | null | null | null | software/mosek/7/tools/examples/python/mioinitsol.py | trgao10/PuenteAlignment-Slurm | 47e2c0d3efdb6ca511d8d5c1c0f20cec207e1341 | [
"MIT"
] | null | null | null | ##
# Copyright: Copyright (c) MOSEK ApS, Denmark. All rights reserved.
#
# File: mioinitsol.py
#
# Purpose: Demonstrates how to solve a small mixed
# integer linear optimization problem using the MOSEK Python API.
##
import sys
import mosek
# If numpy is installed, use that, otherwise use t... | 27.338583 | 134 | 0.595622 |
794842602178d2661146025f3f1ec6da1f1c1dba | 12,738 | py | Python | neurokit2/bio/bio_analyze.py | BelleJohn/neuropsychology-NeuroKit | d01111b9b82364d28da01c002e6cbfc45d9493d9 | [
"MIT"
] | 1 | 2022-03-05T06:15:02.000Z | 2022-03-05T06:15:02.000Z | neurokit2/bio/bio_analyze.py | BelleJohn/neuropsychology-NeuroKit | d01111b9b82364d28da01c002e6cbfc45d9493d9 | [
"MIT"
] | null | null | null | neurokit2/bio/bio_analyze.py | BelleJohn/neuropsychology-NeuroKit | d01111b9b82364d28da01c002e6cbfc45d9493d9 | [
"MIT"
] | 2 | 2021-12-25T15:39:49.000Z | 2021-12-25T15:44:16.000Z | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
from ..ecg import ecg_analyze
from ..eda import eda_analyze
from ..emg import emg_analyze
from ..eog import eog_analyze
from ..hrv import hrv_rsa
from ..ppg import ppg_analyze
from ..rsp import rsp_analyze
def bio_analyze(data, sampling_rate=1000, method... | 40.310127 | 117 | 0.608808 |
4e8b7322a469771b3c98e9be49d2826e1448d4c1 | 3,154 | py | Python | cyverse_allocation/cyverse_rules_engine_test.py | simpsonw/atmosphere | 3a5203ef0b563de3a0e8c8c8715df88186532d7a | [
"BSD-3-Clause"
] | 197 | 2016-12-08T02:33:32.000Z | 2022-03-23T14:27:47.000Z | cyverse_allocation/cyverse_rules_engine_test.py | simpsonw/atmosphere | 3a5203ef0b563de3a0e8c8c8715df88186532d7a | [
"BSD-3-Clause"
] | 385 | 2017-01-03T22:51:46.000Z | 2020-12-16T16:20:42.000Z | cyverse_allocation/cyverse_rules_engine_test.py | benlazarine/atmosphere | 38fad8e4002e510e8b4294f2bb5bc75e8e1817fa | [
"BSD-3-Clause"
] | 50 | 2016-12-08T08:32:25.000Z | 2021-12-10T00:21:39.000Z | from django.conf import settings
from django.test import TestCase
from dateutil.parser import parse
from datetime import timedelta
from core.models.allocation_source import total_usage
from spoof_instance import UserWorkflow, create_allocation_source
from jetstream.tasks import update_snapshot_cyverse_allocation
clas... | 37.105882 | 78 | 0.662651 |
192482dfb795740dc38232435fc4510f585586cc | 98 | py | Python | tests/TESTR-002/assetmodule.py | lsst-sqre/nbreport | c0fb75665c2b9e2e8395e1219234de1e7f4646ee | [
"MIT"
] | 1 | 2018-07-17T05:39:39.000Z | 2018-07-17T05:39:39.000Z | tests/TESTR-002/assetmodule.py | lsst-sqre/nbreport | c0fb75665c2b9e2e8395e1219234de1e7f4646ee | [
"MIT"
] | 2 | 2018-11-02T21:08:50.000Z | 2019-08-20T22:38:59.000Z | tests/TESTR-002/assetmodule.py | lsst-sqre/nbreport | c0fb75665c2b9e2e8395e1219234de1e7f4646ee | [
"MIT"
] | null | null | null | __all__ = ('hello',)
from getpass import getuser
def hello():
print(f'Hello {getuser()}!')
| 12.25 | 32 | 0.632653 |
4a13d3366fd4f2ad87526d03716ca3780a49d262 | 15,313 | py | Python | python/ccxt/__init__.py | daikts/ccxt | ba642452415001eea418b1267ff75431e33ca96e | [
"MIT"
] | null | null | null | python/ccxt/__init__.py | daikts/ccxt | ba642452415001eea418b1267ff75431e33ca96e | [
"MIT"
] | null | null | null | python/ccxt/__init__.py | daikts/ccxt | ba642452415001eea418b1267ff75431e33ca96e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CCXT: CryptoCurrency eXchange Trading Library"""
# MIT License
# Copyright (c) 2017 Igor Kroitor
# 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 restricti... | 46.123494 | 80 | 0.533207 |
4f8474d76a98b4ac2d566a1ed8e1e9ace3e1192b | 421 | py | Python | products/urls.py | aineon/velvet-goldmine | f775c212c937e56e83d1c288ef1a7c4d8210c023 | [
"RSA-MD",
"Info-ZIP"
] | null | null | null | products/urls.py | aineon/velvet-goldmine | f775c212c937e56e83d1c288ef1a7c4d8210c023 | [
"RSA-MD",
"Info-ZIP"
] | null | null | null | products/urls.py | aineon/velvet-goldmine | f775c212c937e56e83d1c288ef1a7c4d8210c023 | [
"RSA-MD",
"Info-ZIP"
] | 2 | 2021-04-30T10:28:58.000Z | 2021-07-17T10:00:21.000Z | from django.urls import path
from . import views
urlpatterns = [
path('', views.all_products, name='products'),
path('<int:product_id>/', views.product_detail, name='product_detail'),
path('add/', views.add_product, name='add_product'),
path('edit/<int:product_id>/', views.edit_product, name='edit_prod... | 35.083333 | 76 | 0.686461 |
f385adbf75951b75e0d7a80ca6388297343d4450 | 1,393 | py | Python | tests/test_audio.py | Strangemother/python-simple-tts-stt | e7ac38e795b32f55367a58107d86bf04ea906f0c | [
"MIT"
] | null | null | null | tests/test_audio.py | Strangemother/python-simple-tts-stt | e7ac38e795b32f55367a58107d86bf04ea906f0c | [
"MIT"
] | null | null | null | tests/test_audio.py | Strangemother/python-simple-tts-stt | e7ac38e795b32f55367a58107d86bf04ea906f0c | [
"MIT"
] | null | null | null | import unittest
import audio
class TestExample(unittest.TestCase):
def test_chorus_filter(self):
res = audio.Chorus('foo', 'bar',
delay='del',
decay='dec',
speed='s',
depth='dep').as_string()
expected = 'chorus=foo:bar:del:dec:s:dep'
... | 33.166667 | 91 | 0.582915 |
84213495fa9cfba12a03799029aecf52e9f5cdf4 | 13,178 | py | Python | opennmt/inputters/inputter.py | kadlaon/OpenNMT-tf | da89eb2a74fb45ac375de212c93069458ccfc63c | [
"MIT"
] | 1 | 2019-04-08T12:29:39.000Z | 2019-04-08T12:29:39.000Z | opennmt/inputters/inputter.py | kadlaon/OpenNMT-tf | da89eb2a74fb45ac375de212c93069458ccfc63c | [
"MIT"
] | null | null | null | opennmt/inputters/inputter.py | kadlaon/OpenNMT-tf | da89eb2a74fb45ac375de212c93069458ccfc63c | [
"MIT"
] | null | null | null | """Define generic inputters."""
import abc
import six
import tensorflow as tf
from opennmt.layers.reducer import ConcatReducer, JoinReducer
from opennmt.utils.misc import extract_prefixed_keys
@six.add_metaclass(abc.ABCMeta)
class Inputter(object):
"""Base class for inputters."""
def __init__(self, dtype=tf.f... | 30.575406 | 104 | 0.683488 |
4195cc3d1b8f9b83b22b0313b78c037af8dd9eb4 | 798 | py | Python | find_duplicates.py | ForestJay/AllY0urBas1czRBel0ngT0Us | fd7999ff5cc95bfeeffd7a98411411bb49d5934d | [
"Apache-2.0"
] | null | null | null | find_duplicates.py | ForestJay/AllY0urBas1czRBel0ngT0Us | fd7999ff5cc95bfeeffd7a98411411bb49d5934d | [
"Apache-2.0"
] | null | null | null | find_duplicates.py | ForestJay/AllY0urBas1czRBel0ngT0Us | fd7999ff5cc95bfeeffd7a98411411bb49d5934d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Written by Forest J. Handford (She/Her)
# This is a Python implementation of the ideal solution for a common interview
# question.
class FindDupes:
"""Class to find duplicates in an ARRAY."""
@staticmethod
def build_count():
count = {}
numbers = [1, 88, 18, 88, 22, 134,... | 26.6 | 78 | 0.537594 |
af7737a44dc5f6e3d73b920dc8e4fb426f54cda5 | 18,828 | py | Python | deprecated/pcgcs_utils.py | omerwe/PCGCs | fdc5089f485fe25c04a8972665fee4216570764f | [
"MIT"
] | 2 | 2018-02-04T18:23:46.000Z | 2018-07-05T20:53:55.000Z | deprecated/pcgcs_utils.py | omerwe/PCGCs | fdc5089f485fe25c04a8972665fee4216570764f | [
"MIT"
] | 1 | 2018-03-11T18:56:13.000Z | 2018-03-15T22:53:17.000Z | deprecated/pcgcs_utils.py | omerwe/PCGCs | fdc5089f485fe25c04a8972665fee4216570764f | [
"MIT"
] | null | null | null | import numpy as np
from optparse import OptionParser
import scipy.linalg as la
import scipy.stats as stats
import sys
import scipy.linalg.blas as blas
import pandas as pd
import time
from pysnptools.snpreader.bed import Bed
import pysnptools.util as pstutil
import pysnptools.util.pheno as phenoUtils
np.set_printoptions... | 38.503067 | 242 | 0.567559 |
33e363a0246de06179682a420dcf130812497e17 | 18,786 | py | Python | h5py/_hl/group.py | rainwoodman/h5py | 25eba5f019d4417de0908ce602f14c038faa9237 | [
"BSD-3-Clause"
] | null | null | null | h5py/_hl/group.py | rainwoodman/h5py | 25eba5f019d4417de0908ce602f14c038faa9237 | [
"BSD-3-Clause"
] | null | null | null | h5py/_hl/group.py | rainwoodman/h5py | 25eba5f019d4417de0908ce602f14c038faa9237 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of h5py, a Python interface to the HDF5 library.
#
# http://www.h5py.org
#
# Copyright 2008-2013 Andrew Collette and contributors
#
# License: Standard 3-clause BSD; see "license.txt" for full license terms
# and contributor agreement.
"""
Implements support for high-level access to ... | 35.179775 | 115 | 0.575109 |
3dcdc5ceb2acb138b04173868445d025a957d074 | 2,164 | py | Python | backend/api/migrations/0140_fix_renewable_categories.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 18 | 2017-05-10T21:55:11.000Z | 2021-03-01T16:41:32.000Z | backend/api/migrations/0140_fix_renewable_categories.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 1,167 | 2017-03-04T00:18:43.000Z | 2022-03-03T22:31:51.000Z | backend/api/migrations/0140_fix_renewable_categories.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 48 | 2017-03-09T17:19:39.000Z | 2022-02-24T16:38:17.000Z | from django.db import migrations
from django.db.migrations import RunPython
def update_categories(apps, schema_editor):
"""
Fixes the default carbon intensity category for Renewable diesel and
Renewable gasoline
"""
db_alias = schema_editor.connection.alias
approved_fuel = apps.get_model('api... | 27.74359 | 75 | 0.674677 |
c1b2570100d8dad2b204e917ec03941946dc2d51 | 1,676 | py | Python | monai/deploy/operators/__init__.py | jlvahldiek/monai-deploy-app-sdk | 050aeabec581067a11566f59a2970b075d36ae7c | [
"Apache-2.0"
] | 28 | 2021-09-17T18:16:42.000Z | 2022-03-31T16:32:36.000Z | monai/deploy/operators/__init__.py | jlvahldiek/monai-deploy-app-sdk | 050aeabec581067a11566f59a2970b075d36ae7c | [
"Apache-2.0"
] | 109 | 2021-09-17T18:34:31.000Z | 2022-03-31T21:04:35.000Z | monai/deploy/operators/__init__.py | jlvahldiek/monai-deploy-app-sdk | 050aeabec581067a11566f59a2970b075d36ae7c | [
"Apache-2.0"
] | 11 | 2021-09-17T20:23:31.000Z | 2022-03-29T08:55:19.000Z | # Copyright 2021-2022 MONAI Consortium
# 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 writi... | 41.9 | 94 | 0.835322 |
3238f7a8fba0ca32a0ce70824e5fd83b6521c7ec | 2,095 | py | Python | app/core/migrations/0001_initial.py | JvitorS23/label_checker | 3a37e726b767c94c9677dc0fdb60df95a2c7c46c | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | JvitorS23/label_checker | 3a37e726b767c94c9677dc0fdb60df95a2c7c46c | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | JvitorS23/label_checker | 3a37e726b767c94c9677dc0fdb60df95a2c7c46c | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-09-12 01:49
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_... | 42.755102 | 135 | 0.609547 |
4c93abda1fae12a499d7f3fc13c9497a93027a2a | 820 | py | Python | main.py | JCfrW/alpha-zero-general | a3c39931166a0e49b4b4a631363d62eb30290b2c | [
"MIT"
] | null | null | null | main.py | JCfrW/alpha-zero-general | a3c39931166a0e49b4b4a631363d62eb30290b2c | [
"MIT"
] | null | null | null | main.py | JCfrW/alpha-zero-general | a3c39931166a0e49b4b4a631363d62eb30290b2c | [
"MIT"
] | null | null | null | from Coach2 import Coach
from othello.OthelloGame import OthelloGame as Game
from othello.pytorch.NNet import NNetWrapper as nn
from utils import *
args = dotdict({
'numIters': 10000,
'numEps': 500,
'tempThreshold': 30,
'updateThreshold': 0.6,
'maxlenOfQueue': 200000,
'numMCTSSims': 50,
'ar... | 23.428571 | 80 | 0.643902 |
403d6f58972964df33d1159eb7d478257fed4540 | 30,829 | py | Python | tests/integration/test_odbc_interaction/test.py | mga-chka/ClickHouse | 4fe722d1a460aea63de883299790ae8671424fae | [
"Apache-2.0"
] | 3 | 2019-06-27T08:59:08.000Z | 2021-09-03T02:38:02.000Z | tests/integration/test_odbc_interaction/test.py | mga-chka/ClickHouse | 4fe722d1a460aea63de883299790ae8671424fae | [
"Apache-2.0"
] | 1 | 2020-10-30T15:17:16.000Z | 2020-10-30T15:17:16.000Z | tests/integration/test_odbc_interaction/test.py | mga-chka/ClickHouse | 4fe722d1a460aea63de883299790ae8671424fae | [
"Apache-2.0"
] | 1 | 2021-07-19T12:07:14.000Z | 2021-07-19T12:07:14.000Z | import time
import psycopg2
import pymysql.cursors
import pytest
import logging
import os.path
from helpers.cluster import ClickHouseCluster
from helpers.test_tools import assert_eq_with_retry
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from multiprocessing.dummy import Pool
cluster = ClickHouseCluste... | 48.549606 | 3,276 | 0.682377 |
e85adab809904690d32710746e111fa20b11d292 | 19,735 | py | Python | localstack/utils/aws/aws_stack.py | huamichaelchen/localstack | eaffc7de80c4289e68eaa81855f3bd8838180962 | [
"Apache-2.0"
] | null | null | null | localstack/utils/aws/aws_stack.py | huamichaelchen/localstack | eaffc7de80c4289e68eaa81855f3bd8838180962 | [
"Apache-2.0"
] | null | null | null | localstack/utils/aws/aws_stack.py | huamichaelchen/localstack | eaffc7de80c4289e68eaa81855f3bd8838180962 | [
"Apache-2.0"
] | null | null | null | import os
import boto3
import json
import base64
import logging
import re
from six import iteritems
from threading import Timer
from localstack import config
from localstack.constants import *
from localstack.utils.common import *
from localstack.utils.aws.aws_models import *
# AWS environment variable names
ENV_ACCES... | 37.662214 | 119 | 0.68452 |
1db060accda3bdf0ba7c6680492c0c99d4b7604e | 2,821 | py | Python | docs/conf.py | lengyuner/hyperpose4fly | c9866bce1a0109e1b9c727ca550b5a380eb3ee17 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | lengyuner/hyperpose4fly | c9866bce1a0109e1b9c727ca550b5a380eb3ee17 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | lengyuner/hyperpose4fly | c9866bce1a0109e1b9c727ca550b5a380eb3ee17 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 30.663043 | 79 | 0.658986 |
2de1bf341f24e36e22ae1991d6662e49d9d9203f | 6,794 | py | Python | lib/notification_service/tests/test_mongo_notification.py | flink-extended/ai-flow | d1427a243097d94d77fedbe1966500ae26975a13 | [
"Apache-2.0"
] | 79 | 2021-10-15T07:32:27.000Z | 2022-03-28T04:10:19.000Z | lib/notification_service/tests/test_mongo_notification.py | flink-extended/ai-flow | d1427a243097d94d77fedbe1966500ae26975a13 | [
"Apache-2.0"
] | 153 | 2021-10-15T05:23:46.000Z | 2022-02-23T06:07:10.000Z | lib/notification_service/tests/test_mongo_notification.py | flink-extended/ai-flow | d1427a243097d94d77fedbe1966500ae26975a13 | [
"Apache-2.0"
] | 23 | 2021-10-15T02:36:37.000Z | 2022-03-17T02:59:27.000Z | #
# Copyright 2022 The AI Flow Authors
#
# 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 w... | 42.4625 | 103 | 0.687077 |
6a41518a7778d9a3ac29fc77735a388df9982cc4 | 2,352 | py | Python | CodeWars/PythonKata/Title_Case.py | marshallhumble/Project_Euler | 90101d308a3342a0eab33c1f4580df549bfc8896 | [
"MIT"
] | 3 | 2015-12-16T18:38:34.000Z | 2015-12-22T15:21:17.000Z | CodeWars/PythonKata/Title_Case.py | marshallhumble/Project_Euler | 90101d308a3342a0eab33c1f4580df549bfc8896 | [
"MIT"
] | null | null | null | CodeWars/PythonKata/Title_Case.py | marshallhumble/Project_Euler | 90101d308a3342a0eab33c1f4580df549bfc8896 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
A string is considered to be in title case if each word in the string is either (a) capitalised (that is, only the
first letter of the word is in upper case) or (b) considered to be an exception and put entirely into lower case unless
it is the first word, which is always capitalised.
Write ... | 40.551724 | 119 | 0.703231 |
133b42b40977cbf1b6e2c9f757ae100a54711f80 | 1,389 | py | Python | behave/reporter/base.py | LogicalDash/behave-parallel | 6421a8205db2c6deb42b40d92704284e92bac6c4 | [
"BSD-2-Clause"
] | 6 | 2015-08-13T07:45:53.000Z | 2019-11-22T22:32:12.000Z | behave/reporter/base.py | LogicalDash/behave-parallel | 6421a8205db2c6deb42b40d92704284e92bac6c4 | [
"BSD-2-Clause"
] | 6 | 2015-01-29T21:02:49.000Z | 2019-04-27T00:44:08.000Z | behave/reporter/base.py | LogicalDash/behave-parallel | 6421a8205db2c6deb42b40d92704284e92bac6c4 | [
"BSD-2-Clause"
] | 16 | 2015-01-09T21:35:12.000Z | 2022-01-26T12:23:27.000Z | # -*- coding: utf-8 -*-
class Reporter(object):
"""
Base class for all reporters. A reporter provides an extension point
(variant point) for the runner logic. A reporter is called after a
model element is processed (and its result status is known).
Otherwise, a reporter is similar to a formatter... | 31.568182 | 74 | 0.605472 |
9fdcfb5dc992721bd0437bd98fcca43584eaf2aa | 3,621 | py | Python | instagram_scraper/cache/disk_cache.py | luengwaiban/instagram-python-scraper | d3427afba9865d914a9b5daaafde9f2981ebf1c3 | [
"MIT"
] | 139 | 2019-06-02T16:19:06.000Z | 2021-09-08T08:16:43.000Z | instagram_scraper/cache/disk_cache.py | luengwaiban/instagram-python-scraper | d3427afba9865d914a9b5daaafde9f2981ebf1c3 | [
"MIT"
] | 4 | 2019-06-10T02:06:10.000Z | 2020-07-07T04:45:59.000Z | instagram_scraper/cache/disk_cache.py | luengwaiban/instagram-python-scraper | d3427afba9865d914a9b5daaafde9f2981ebf1c3 | [
"MIT"
] | 16 | 2019-06-07T10:02:49.000Z | 2021-06-03T20:41:33.000Z | # -*- coding:utf-8 -*-
import os
import pickle
import time
import re
from instagram_scraper.cache.cache import Cache
class DiskCache(Cache):
def __init__(self):
self.cache_storage_dir = './cache_files'
self.cache_storage_file_name = 'cache'
if not os.path.exists(self.cache_storage_dir):
... | 34.485714 | 127 | 0.60591 |
df5212dd4535fef67cb3418ee80f2af527ec413d | 14,016 | py | Python | lte/gateway/deploy/roles/magma_test/files/c_parser.py | saurabhsoni88/magma | 4236c9d8edb7bd203707ff7e861b1f7c12fb84c7 | [
"BSD-3-Clause"
] | 2 | 2020-12-09T11:42:30.000Z | 2021-09-26T03:28:33.000Z | lte/gateway/deploy/roles/magma_test/files/c_parser.py | saurabhsoni88/magma | 4236c9d8edb7bd203707ff7e861b1f7c12fb84c7 | [
"BSD-3-Clause"
] | 151 | 2020-09-03T20:44:13.000Z | 2022-03-31T20:28:52.000Z | lte/gateway/deploy/roles/magma_test/files/c_parser.py | kkahrs/magma | 73e666627dc28e0c492feab7321bb7d6dd433b09 | [
"BSD-3-Clause"
] | 2 | 2021-05-27T18:15:16.000Z | 2021-05-27T18:41:39.000Z | #!/usr/bin/env python3
"""
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BAS... | 33.937046 | 79 | 0.632848 |
41b999872e24784b891bce6d5409d30394bfc84d | 707 | py | Python | HelloWorldWebsite/home/migrations/0003_auto_20190907_2318.py | argoebel/DjangoTutorial | 7b2e99ac1a141770752418953183223e05a97dcd | [
"MIT"
] | null | null | null | HelloWorldWebsite/home/migrations/0003_auto_20190907_2318.py | argoebel/DjangoTutorial | 7b2e99ac1a141770752418953183223e05a97dcd | [
"MIT"
] | null | null | null | HelloWorldWebsite/home/migrations/0003_auto_20190907_2318.py | argoebel/DjangoTutorial | 7b2e99ac1a141770752418953183223e05a97dcd | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-09-07 23:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0002_artist'),
]
operations = [
migrations.RemoveField(
model_name='artist',
name='followers',
),
... | 25.25 | 96 | 0.571429 |
c9de3dab86a5f11e2f18ee0716e8b4fb8935c686 | 39,136 | py | Python | epitope_mapping_df.py | victorfica/utils | b61935a860838a0e70afde7c9ecf2c68f51a2c4b | [
"MIT"
] | 5 | 2015-12-16T01:23:07.000Z | 2020-04-27T11:41:43.000Z | epitope_mapping_df.py | victorfica/utils | b61935a860838a0e70afde7c9ecf2c68f51a2c4b | [
"MIT"
] | 1 | 2021-05-06T23:47:20.000Z | 2021-05-06T23:48:33.000Z | epitope_mapping_df.py | victorfica/utils | b61935a860838a0e70afde7c9ecf2c68f51a2c4b | [
"MIT"
] | 6 | 2016-04-29T14:04:22.000Z | 2021-05-06T23:49:34.000Z | import seaborn as sns
import pandas as pd
import numpy as np
from copy import deepcopy
import argparse
import multiprocessing
import skbio
from fg_shared import *
import itertools
import operator
from functools import partial
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.collections import ... | 38.519685 | 140 | 0.553404 |
705f3606e66eda38d290d6222be2fcc9c01e234e | 35 | py | Python | creepy/utils/__init__.py | itesoro/reepyc | 38523ed0de784fa293c3f22af6d01712f0aa38c8 | [
"MIT"
] | 1 | 2022-02-11T22:05:36.000Z | 2022-02-11T22:05:36.000Z | creepy/utils/__init__.py | itesoro/reepyc | 38523ed0de784fa293c3f22af6d01712f0aa38c8 | [
"MIT"
] | 15 | 2020-11-24T09:22:28.000Z | 2021-11-10T17:54:32.000Z | creepy/utils/__init__.py | itesoro/reepyc | 38523ed0de784fa293c3f22af6d01712f0aa38c8 | [
"MIT"
] | null | null | null | from .processify import processify
| 17.5 | 34 | 0.857143 |
a8c300341d81915500443745687a480ea1cfd5a7 | 2,772 | py | Python | toolchain/riscv/Linux/riscv64-unknown-elf/lib/rv32ic/ilp32/libstdc++.a-gdb.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | null | null | null | toolchain/riscv/Linux/riscv64-unknown-elf/lib/rv32ic/ilp32/libstdc++.a-gdb.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | null | null | null | toolchain/riscv/Linux/riscv64-unknown-elf/lib/rv32ic/ilp32/libstdc++.a-gdb.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | null | null | null | # -*- python -*-
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versio... | 44.709677 | 233 | 0.736291 |
478eb04144d4c82650e5e9eb1a4892e900312e3f | 4,140 | py | Python | src/skge/param.py | comjoueur/cesi | 0ab3e03e851cd5278f9287b7ce1495c65413e370 | [
"Apache-2.0"
] | 100 | 2018-02-13T16:23:10.000Z | 2022-01-20T00:52:52.000Z | src/skge/param.py | lbda1/cesi | 39058d307473cd112f5b1aafbf56d9a728b601dd | [
"Apache-2.0"
] | 9 | 2019-04-03T10:19:00.000Z | 2022-03-19T07:17:09.000Z | src/skge/param.py | lbda1/cesi | 39058d307473cd112f5b1aafbf56d9a728b601dd | [
"Apache-2.0"
] | 27 | 2018-07-04T15:11:16.000Z | 2022-03-09T12:46:54.000Z | import sys
import numpy as np
from numpy import sqrt, squeeze, zeros_like
from numpy.random import randn, uniform
def init_unif(sz):
"""
Uniform intialization -> [-1/sqrt(N), 1/sqrt(N)], sz = (N, N, M)
Heuristic commonly used to initialize deep neural networks
"""
bnd = 1 / sqrt(sz[0])
p = uniform(low=-bnd, hi... | 31.12782 | 152 | 0.688406 |
35f19c4f40021fe62eea5ead683a616d748240b0 | 20,689 | py | Python | site-packages/cliff/tests/test_app.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | null | null | null | site-packages/cliff/tests/test_app.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | null | null | null | site-packages/cliff/tests/test_app.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | null | null | null | # -*- encoding: 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 writin... | 37.548094 | 79 | 0.589395 |
c6658c062d14db260270fdb56bb36693886a45c9 | 7,708 | py | Python | tests/test_program.py | nrife/stcgal | a647da75d0274dac3069b36db288e482f2430119 | [
"MIT"
] | 8 | 2021-03-18T17:12:10.000Z | 2022-01-31T03:49:07.000Z | tests/test_program.py | nrife/stcgal | a647da75d0274dac3069b36db288e482f2430119 | [
"MIT"
] | null | null | null | tests/test_program.py | nrife/stcgal | a647da75d0274dac3069b36db288e482f2430119 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2017 Grigori Goronzy <greg@chown.ath.cx>
#
# 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 without limitation the rights
# to use, copy, modif... | 46.715152 | 95 | 0.715361 |
180ad81303840afb207a13f00b199ad15914537d | 2,736 | py | Python | pylith/materials/IncompressibleElasticity.py | cehanagan/pylith | cf5c1c34040460a82f79b6eb54df894ed1b1ee93 | [
"MIT"
] | 93 | 2015-01-08T16:41:22.000Z | 2022-02-25T13:40:02.000Z | pylith/materials/IncompressibleElasticity.py | sloppyjuicy/pylith | ac2c1587f87e45c948638b19560813d4d5b6a9e3 | [
"MIT"
] | 277 | 2015-02-20T16:27:35.000Z | 2022-03-30T21:13:09.000Z | pylith/materials/IncompressibleElasticity.py | sloppyjuicy/pylith | ac2c1587f87e45c948638b19560813d4d5b6a9e3 | [
"MIT"
] | 71 | 2015-03-24T12:11:08.000Z | 2022-03-03T04:26:02.000Z | # ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copy... | 31.813953 | 118 | 0.684576 |
2feb4b411df8febce8c41254d0ff819fd1f3b5fd | 665 | py | Python | blog/admin.py | prasadph/SoNet | e53423534ecde593648cd86b099c26fee240b193 | [
"MIT"
] | null | null | null | blog/admin.py | prasadph/SoNet | e53423534ecde593648cd86b099c26fee240b193 | [
"MIT"
] | 1 | 2018-12-06T19:46:01.000Z | 2019-05-01T17:56:38.000Z | blog/admin.py | prasadph/SoNet | e53423534ecde593648cd86b099c26fee240b193 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Post, Comment, Tag, Vote, Detail, TagsPosts
admin.site.register(Comment)
admin.site.register(Detail)
admin.site.register(Vote)
# admin.site.register(TagsPosts)
class AddTag(admin.StackedInline):
model = TagsPosts
extra = 1
fieldsets = [(None, {'field... | 21.451613 | 63 | 0.630075 |
6a58b5c0a394ed9fda757efd65dcf0e34188e507 | 12,476 | py | Python | tests/parsers/winreg_plugins/winlogon.py | stephenkreusch/plaso | 494d3140c09733d1d51c8dbb9162fc569be760b3 | [
"Apache-2.0"
] | 1 | 2020-10-29T18:23:25.000Z | 2020-10-29T18:23:25.000Z | tests/parsers/winreg_plugins/winlogon.py | stephenkreusch/plaso | 494d3140c09733d1d51c8dbb9162fc569be760b3 | [
"Apache-2.0"
] | null | null | null | tests/parsers/winreg_plugins/winlogon.py | stephenkreusch/plaso | 494d3140c09733d1d51c8dbb9162fc569be760b3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the Winlogon Windows Registry plugin."""
from __future__ import unicode_literals
import unittest
from dfdatetime import filetime as dfdatetime_filetime
from dfwinreg import definitions as dfwinreg_definitions
from dfwinreg import fake as dfwinreg_fake
from... | 37.465465 | 79 | 0.737496 |
13f7fdd433a8198c7ed0f7f858c0a15d267eca38 | 2,917 | py | Python | tensor2tensor/utils/video2gif.py | jaseweir/tensor2tensor | 2a33b152d7835af66a6d20afe7961751047e28dd | [
"Apache-2.0"
] | 12,921 | 2017-06-15T17:11:46.000Z | 2022-03-31T15:22:11.000Z | tensor2tensor/utils/video2gif.py | jaseweir/tensor2tensor | 2a33b152d7835af66a6d20afe7961751047e28dd | [
"Apache-2.0"
] | 1,635 | 2017-06-18T15:29:27.000Z | 2022-03-19T20:35:23.000Z | tensor2tensor/utils/video2gif.py | jaseweir/tensor2tensor | 2a33b152d7835af66a6d20afe7961751047e28dd | [
"Apache-2.0"
] | 3,521 | 2017-06-15T18:25:42.000Z | 2022-03-31T05:47:55.000Z | # coding=utf-8
# Copyright 2021 The Tensor2Tensor Authors.
#
# 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... | 31.031915 | 82 | 0.718204 |
b1f4df990f2be6c046936728ed1091a706bb9433 | 5,356 | py | Python | data/p3BR/R1/benchmark/startQiskit_noisy395.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R1/benchmark/startQiskit_noisy395.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R1/benchmark/startQiskit_noisy395.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=72
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | 28.951351 | 140 | 0.628267 |
9f09bae400d273f74d465da777da0dbdca7b681f | 137 | py | Python | src/essence/docs/_Documentation.py | groundf/essence | e4bb815381fd361433d9b51c5f61770a0a1f3dec | [
"MIT"
] | null | null | null | src/essence/docs/_Documentation.py | groundf/essence | e4bb815381fd361433d9b51c5f61770a0a1f3dec | [
"MIT"
] | null | null | null | src/essence/docs/_Documentation.py | groundf/essence | e4bb815381fd361433d9b51c5f61770a0a1f3dec | [
"MIT"
] | 1 | 2022-03-28T08:25:38.000Z | 2022-03-28T08:25:38.000Z | # -*- coding: utf-8 -*-
from uuid import UUID
__all__ = ("Documentation")
class Documentation:
def __init__(self):
...
| 10.538462 | 27 | 0.591241 |
632408ef0a2baeaf6f337a8c157b034e8dd9a476 | 2,027 | py | Python | eto/core.py | mullenkamp/project-template | 85e934bb6be5e260510380c612df743d3c985d74 | [
"Apache-2.0"
] | null | null | null | eto/core.py | mullenkamp/project-template | 85e934bb6be5e260510380c612df743d3c985d74 | [
"Apache-2.0"
] | null | null | null | eto/core.py | mullenkamp/project-template | 85e934bb6be5e260510380c612df743d3c985d74 | [
"Apache-2.0"
] | 1 | 2020-11-01T23:07:24.000Z | 2020-11-01T23:07:24.000Z | # -*- coding: utf-8 -*-
"""
Class to estimate reference ET (ETo) from the FAO 56 paper using a minimum of T_min and T_max for daily estimates and T_mean and RH_mean for hourly, but utilizing the maximum number of available met parameters. The function prioritizes the estimation of specific parameters based on the avail... | 32.174603 | 308 | 0.656142 |
81c5c48ccf12729ad7ff0fe142b3715b97e10d2a | 12,844 | py | Python | tests/test_modeling_albert.py | syskn/transformers | fafbd2574cb12b987099f69b3821814042d8f4ce | [
"Apache-2.0"
] | 39 | 2021-04-30T06:06:30.000Z | 2022-03-12T11:56:06.000Z | tests/test_modeling_albert.py | syskn/transformers | fafbd2574cb12b987099f69b3821814042d8f4ce | [
"Apache-2.0"
] | 4 | 2021-04-05T19:56:47.000Z | 2022-01-18T17:12:28.000Z | tests/test_modeling_albert.py | syskn/transformers | fafbd2574cb12b987099f69b3821814042d8f4ce | [
"Apache-2.0"
] | 30 | 2021-04-30T07:11:22.000Z | 2022-03-15T19:34:58.000Z | # coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 41.701299 | 119 | 0.701573 |
518879bcdc1dd4f531dd66be3cc4f7dbd2639ff2 | 15,836 | py | Python | nuitka/build/SconsUtils.py | zu3st/Nuitka | 41d002085dbd23b15d90b71b5cfbb51670402b16 | [
"Apache-2.0"
] | null | null | null | nuitka/build/SconsUtils.py | zu3st/Nuitka | 41d002085dbd23b15d90b71b5cfbb51670402b16 | [
"Apache-2.0"
] | null | null | null | nuitka/build/SconsUtils.py | zu3st/Nuitka | 41d002085dbd23b15d90b71b5cfbb51670402b16 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 29.879245 | 109 | 0.639429 |
76147c3a4791bc394279bbac9bed41a65aa62ba8 | 887 | py | Python | var/spack/repos/builtin/packages/py-pyscreeze/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-pyscreeze/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/py-pyscreeze/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyPyscreeze(PythonPackage):
"""PyScreeze can take screenshots, save them to files,... | 36.958333 | 96 | 0.712514 |
5df85ba7f347a6d3b28796b9519bb6a04f002c72 | 2,772 | py | Python | code/chemspace/general_order_scaffolds.py | ncats/hcase | f60081e67d331a7c149d427e7bee4816907fe860 | [
"MIT"
] | 1 | 2020-02-28T19:50:34.000Z | 2020-02-28T19:50:34.000Z | code/chemspace/general_order_scaffolds.py | ncats/hcase | f60081e67d331a7c149d427e7bee4816907fe860 | [
"MIT"
] | null | null | null | code/chemspace/general_order_scaffolds.py | ncats/hcase | f60081e67d331a7c149d427e7bee4816907fe860 | [
"MIT"
] | null | null | null | # Author: Gergely Zahoranszky-Kohalmi, PhD
#
# Aim: Order Bemis-Murcko scaffolds according to Ertl's intuitive scaffol ordering algorithm: Scaffold-Keys.
#
#
# Reference: https://pubs.acs.org/doi/10.1021/ci5001983
#
# Email: gergely.zahoranszky-kohalmi@nih.gov
#
# Organization: National Center for Advancing Translation... | 21.826772 | 120 | 0.669913 |
f8514ad5333fe4a72de1b92f63da52f98682e87d | 1,506 | py | Python | userbot/plugins/hypnotis.py | deadanonymous/thunderuserbotold | 05322edd29b0368290763fdc37edfecf6e64c09a | [
"MIT"
] | 1 | 2021-01-07T03:06:47.000Z | 2021-01-07T03:06:47.000Z | userbot/plugins/hypnotis.py | RDX-ANONYMOUS/MASTER-MIND-BOT | 58d50145006e5cea2f15b674dfcd1aee325623f9 | [
"MIT"
] | null | null | null | userbot/plugins/hypnotis.py | RDX-ANONYMOUS/MASTER-MIND-BOT | 58d50145006e5cea2f15b674dfcd1aee325623f9 | [
"MIT"
] | 2 | 2021-07-02T07:39:29.000Z | 2021-12-31T15:34:12.000Z | """Emoji
Available Commands:
.hypno"""
import asyncio
from uniborg.util import admin_cmd
@borg.on(admin_cmd(pattern=r"hypno"))
async def _(event):
if event.fwd_from:
return
animation_interval = 0.8
animation_ttl = range(0, 15)
await event.edit("hypnotysing...")
animation_ch... | 41.833333 | 90 | 0.266932 |
f22fffe53e0c7f3c722e2d399f908e01f2fc6437 | 6,413 | py | Python | tpcorr/distortion.py | dmargala/tpcorr | 64544a4ca51f622e5847407d191fc9a52e0e7e5c | [
"MIT"
] | null | null | null | tpcorr/distortion.py | dmargala/tpcorr | 64544a4ca51f622e5847407d191fc9a52e0e7e5c | [
"MIT"
] | null | null | null | tpcorr/distortion.py | dmargala/tpcorr | 64544a4ca51f622e5847407d191fc9a52e0e7e5c | [
"MIT"
] | null | null | null | ## Optical Distortion Model
# The chromatic distortion is described [here](https://trac.sdss3.org/tracmailman/browser/private/sdss3-infrastructure/all/505.html)
# with corrected tables appearing [here](https://trac.sdss3.org/tracmailman/browser/private/sdss3-infrastructure/all/946.html).
# The table of *principal ra... | 44.227586 | 166 | 0.640262 |
8b8fb0ce004073aefdcf92789c68830f0e1242da | 4,263 | py | Python | qtimgren/main_window.py | s-ball/qtimgren | cff11a0cea3377bc4ca5880d546f6ba696ce5a01 | [
"MIT"
] | null | null | null | qtimgren/main_window.py | s-ball/qtimgren | cff11a0cea3377bc4ca5880d546f6ba696ce5a01 | [
"MIT"
] | null | null | null | qtimgren/main_window.py | s-ball/qtimgren | cff11a0cea3377bc4ca5880d546f6ba696ce5a01 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Module implementing MainWindow.
"""
from PySide2.QtCore import Slot, Qt, QSettings
from PySide2.QtWidgets import QMainWindow, QApplication, QWidget
from .ui_main_window import Ui_MainWindow
from .about import About
from .profile import ProfileDialog
from .profiles import ProfilesDialo... | 34.104 | 75 | 0.638283 |
295e52f0c21e1833299cd7a6aa9357138e968303 | 21,023 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/aio/operations/_security_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/aio/operations/_security_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/aio/operations/_security_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 50.536058 | 244 | 0.679208 |
b8c7d86a7084aab3c080d41a00574f82bcb3dcbe | 584 | py | Python | lldb/test/API/commands/log/invalid-args/TestInvalidArgsLog.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 5 | 2021-02-21T22:35:08.000Z | 2022-02-01T18:22:50.000Z | lldb/test/API/commands/log/invalid-args/TestInvalidArgsLog.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 9 | 2020-04-24T21:51:04.000Z | 2020-11-06T01:04:09.000Z | lldb/test/API/commands/log/invalid-args/TestInvalidArgsLog.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 1 | 2021-03-30T11:22:52.000Z | 2021-03-30T11:22:52.000Z | import lldb
from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
class InvalidArgsLogTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@no_debug_info_test
def test_enable_empty(self):
self.expect("log enable", error=True,
substrs=["error: lo... | 32.444444 | 98 | 0.684932 |
4ea721c7d6e982ccae97cecb5bf6ecfb461a238b | 236 | py | Python | satchless/contrib/productset/urls.py | bartels/satchless | 4d333014333dc4fd5815f9e0bbea565959919a30 | [
"BSD-4-Clause"
] | 1 | 2015-11-05T05:09:27.000Z | 2015-11-05T05:09:27.000Z | satchless/contrib/productset/urls.py | bartels/satchless | 4d333014333dc4fd5815f9e0bbea565959919a30 | [
"BSD-4-Clause"
] | null | null | null | satchless/contrib/productset/urls.py | bartels/satchless | 4d333014333dc4fd5815f9e0bbea565959919a30 | [
"BSD-4-Clause"
] | null | null | null | from django.conf.urls.defaults import *
from . import views
urlpatterns = patterns('',
url(r'(?P<slug>[a-z0-9_-]+)/$', views.details, name='satchless-product-set'),
url(r'$', views.index, name='satchless-product-set-index'),
)
| 29.5 | 81 | 0.665254 |
4cab8fc44cd75cb344d16017e8f2f90c14edb713 | 4,895 | py | Python | dataprep/clean/clean_ch_vat.py | Waterpine/dataprep-1 | 4032acb1d1f2c413d4cb000d17e8ffa611315f9f | [
"MIT"
] | 1,229 | 2019-12-21T02:58:59.000Z | 2022-03-30T08:12:33.000Z | dataprep/clean/clean_ch_vat.py | Waterpine/dataprep-1 | 4032acb1d1f2c413d4cb000d17e8ffa611315f9f | [
"MIT"
] | 680 | 2019-12-19T06:09:23.000Z | 2022-03-31T04:15:25.000Z | dataprep/clean/clean_ch_vat.py | Waterpine/dataprep-1 | 4032acb1d1f2c413d4cb000d17e8ffa611315f9f | [
"MIT"
] | 170 | 2020-01-08T03:27:26.000Z | 2022-03-20T20:42:55.000Z | """
Clean and validate a DataFrame column containing Swiss VAT numbers (VATs).
"""
# pylint: disable=too-many-lines, too-many-arguments, too-many-branches
from typing import Any, Union
from operator import itemgetter
import dask.dataframe as dd
import numpy as np
import pandas as pd
from stdnum.ch import vat
from ..p... | 30.216049 | 99 | 0.608784 |
e4af4c930e6863f66e82a3b5025faa9d0d2f3e8a | 3,965 | py | Python | tests/test_endtoend.py | ntaylorwss/pavlov | c10dff9e32934fb0bba0531c041251f4c61366ac | [
"MIT"
] | 2 | 2018-07-04T03:34:48.000Z | 2018-07-04T06:57:11.000Z | tests/test_endtoend.py | ntaylorwss/kerasgym | c10dff9e32934fb0bba0531c041251f4c61366ac | [
"MIT"
] | 53 | 2018-06-26T01:11:43.000Z | 2018-07-04T00:56:43.000Z | tests/test_endtoend.py | ntaylorwss/pavlov | c10dff9e32934fb0bba0531c041251f4c61366ac | [
"MIT"
] | null | null | null | import sys
sys.path.append('/home')
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
import pavlov
import gym
import tensorflow as tf
class TestPavlov:
def test_basic_discrete_agent(self):
# arrange
env = gym.make("CartPole-v0")
base_config = {
'... | 36.712963 | 92 | 0.571248 |
a0eff65d61877d32b2e5ab37e3264bec9a9934bf | 410 | py | Python | Python/Functions/latebinding.py | rithsuon/LecturesHW | 523b15071066e6470d2f066a6a6af4858044803f | [
"MIT"
] | 3 | 2021-01-25T18:54:02.000Z | 2021-05-12T16:35:01.000Z | Python/Functions/latebinding.py | rithsuon/LecturesHW | 523b15071066e6470d2f066a6a6af4858044803f | [
"MIT"
] | null | null | null | Python/Functions/latebinding.py | rithsuon/LecturesHW | 523b15071066e6470d2f066a6a6af4858044803f | [
"MIT"
] | 34 | 2018-01-11T17:25:56.000Z | 2018-08-20T04:07:22.000Z | globalvalue = 100
def func():
return globalvalue * 2
globalvalue = 1
print(func())
# What is the output?
# Does this change with nested functions?
def func2(param1):
def inner():
return param1 + globalvalue
return inner
f = func2(5)
print(f()) # What is the output?
globalvalue = 1000
print(f()... | 17.083333 | 66 | 0.680488 |
60a559049c1a930eacdcdc40796d2be4ad4d5a70 | 465 | py | Python | Timofei-Khirianov-2019/lesson_001/002_math.py | anklav24/Python-Education | 49ebcfabda1376390ee71e1fe321a51e33831f9e | [
"Apache-2.0"
] | null | null | null | Timofei-Khirianov-2019/lesson_001/002_math.py | anklav24/Python-Education | 49ebcfabda1376390ee71e1fe321a51e33831f9e | [
"Apache-2.0"
] | null | null | null | Timofei-Khirianov-2019/lesson_001/002_math.py | anklav24/Python-Education | 49ebcfabda1376390ee71e1fe321a51e33831f9e | [
"Apache-2.0"
] | null | null | null | import math
print("math.sin(math.pi/2) =", math.sin(math.pi/2))
print()
print("math.sin(math.pi/4) =", math.sin(math.pi/4))
print()
print('Корень второй степени (2 ** 0.5)')
print()
print("2 ** 0.5 / 2 =", 2 ** 0.5 / 2)
print()
print("3 ** 3 ** 3 =", 3 ** 3 ** 3)
print()
print("3 ** 3 =", 3 ** 3)
print()
print('... | 18.6 | 57 | 0.48172 |
423fc1b9c321729b6913e8114cf83f9516d05d79 | 11,657 | py | Python | gslib/tests/test_stat.py | maxshine/gsutil | c81d67f2286402accfcdf79f0199844949bebefc | [
"Apache-2.0"
] | 1,894 | 2015-04-17T18:29:53.000Z | 2022-03-28T22:41:06.000Z | gslib/tests/test_stat.py | maxshine/gsutil | c81d67f2286402accfcdf79f0199844949bebefc | [
"Apache-2.0"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | gslib/tests/test_stat.py | maxshine/gsutil | c81d67f2286402accfcdf79f0199844949bebefc | [
"Apache-2.0"
] | 698 | 2015-06-02T19:18:35.000Z | 2022-03-29T16:57:15.000Z | # -*- coding: utf-8 -*-
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 46.257937 | 80 | 0.682594 |
40c1ad7178a991fbee38725806c3c121f27ed9f2 | 4,019 | py | Python | createdataset.py | NehaTelhan/CompVisionFinalProj | abb32bdb25b6ec603ce8232ad09533d9e5d3eb67 | [
"MIT"
] | null | null | null | createdataset.py | NehaTelhan/CompVisionFinalProj | abb32bdb25b6ec603ce8232ad09533d9e5d3eb67 | [
"MIT"
] | null | null | null | createdataset.py | NehaTelhan/CompVisionFinalProj | abb32bdb25b6ec603ce8232ad09533d9e5d3eb67 | [
"MIT"
] | null | null | null | import math
from PIL import Image
import numpy as np
import filterdata as fd
import config
import scipy.misc
imagesbase = config.imagesbase
fullpath = config.fullpath
outputdir = config.outputdir
outputdir1 = config.outputdir if fullpath else ''
idx = 0
cnttxt = 0;
cntnon = 0;
phasenames = ['train', 'val']
for phase i... | 41.010204 | 91 | 0.50112 |
27343d5c3b3b82ea4533030ab07db91198dc499f | 18,340 | py | Python | openstack_dashboard/api/rest/keystone.py | dan1/horizon-proto | c3a6bb9bacd3c13132fbb52d599c672403b105a8 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/api/rest/keystone.py | dan1/horizon-proto | c3a6bb9bacd3c13132fbb52d599c672403b105a8 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/api/rest/keystone.py | dan1/horizon-proto | c3a6bb9bacd3c13132fbb52d599c672403b105a8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014, Rackspace, US, 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 w... | 32.460177 | 79 | 0.616957 |
32c7aac65491c32958812f3ebd6603850bc86de1 | 1,626 | py | Python | framecap/try_2.py | sarrthak/Tensorflow-object-detection-for-cutom-dataset | 122e628cbd5f3e98ed7548bdfec02f2df863aa9b | [
"MIT"
] | null | null | null | framecap/try_2.py | sarrthak/Tensorflow-object-detection-for-cutom-dataset | 122e628cbd5f3e98ed7548bdfec02f2df863aa9b | [
"MIT"
] | null | null | null | framecap/try_2.py | sarrthak/Tensorflow-object-detection-for-cutom-dataset | 122e628cbd5f3e98ed7548bdfec02f2df863aa9b | [
"MIT"
] | null | null | null | import cv2
import time
import os
def video_to_frames(input_loc, output_loc):
"""Function to extract frames from input video file
and save them as separate frames in an output directory.
Args:
input_loc: Input video file.
output_loc: Output directory to save the frames.
Returns:
... | 32.52 | 88 | 0.617466 |
d45da3d8593d033a3dc14c5b157fda3170bd2aa3 | 430 | py | Python | examples/flyingcircus/config/monty.py | tarequeh/django-config | 39b5dc49b1f5786143201dd3b384e1fe2a1fc57d | [
"MIT"
] | 2 | 2015-11-05T02:50:46.000Z | 2017-04-14T20:07:45.000Z | examples/flyingcircus/config/monty.py | tarequeh/django-config | 39b5dc49b1f5786143201dd3b384e1fe2a1fc57d | [
"MIT"
] | null | null | null | examples/flyingcircus/config/monty.py | tarequeh/django-config | 39b5dc49b1f5786143201dd3b384e1fe2a1fc57d | [
"MIT"
] | null | null | null | ADMINS = (('Monty Python', 'mpython@djangoproject.com'),)
# Database Configuration
import os
db_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'db'))
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = '%s/monty.db' % db_path
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_... | 21.5 | 84 | 0.72093 |
16f39207476224fd74bb6ee6cd55645512433042 | 6,098 | py | Python | qa/rpc-tests/proxy_test.py | Velescore/veles-1.0.0.1 | 028b76682157333195a56846c913be32dbb8c178 | [
"MIT"
] | 1 | 2019-02-02T10:46:07.000Z | 2019-02-02T10:46:07.000Z | qa/rpc-tests/proxy_test.py | Velescore/veles-1.0.0.1 | 028b76682157333195a56846c913be32dbb8c178 | [
"MIT"
] | null | null | null | qa/rpc-tests/proxy_test.py | Velescore/veles-1.0.0.1 | 028b76682157333195a56846c913be32dbb8c178 | [
"MIT"
] | 1 | 2018-11-06T21:36:25.000Z | 2018-11-06T21:36:25.000Z | #!/usr/bin/env python2
# Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import socket
import traceback, sys
from binascii import hexlify
import time, os
from socks5 import Socks5Conf... | 41.767123 | 145 | 0.653001 |
be9c29c808d8e95d99b3df51d72e43ab5756f491 | 5,614 | py | Python | sdk/python/pulumi_azure_native/mixedreality/v20190228preview/get_spatial_anchors_account.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/mixedreality/v20190228preview/get_spatial_anchors_account.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/mixedreality/v20190228preview/get_spatial_anchors_account.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... | 35.531646 | 193 | 0.650338 |
b6a2df81ed2b1219bf2c06d1493628612960c73a | 124 | py | Python | calculator/logic.py | JonasJurczok/calculator_example | b3769d6b76b24bb6ce32a19fd1b92a824de7ec28 | [
"MIT"
] | null | null | null | calculator/logic.py | JonasJurczok/calculator_example | b3769d6b76b24bb6ce32a19fd1b92a824de7ec28 | [
"MIT"
] | null | null | null | calculator/logic.py | JonasJurczok/calculator_example | b3769d6b76b24bb6ce32a19fd1b92a824de7ec28 | [
"MIT"
] | null | null | null | def add(a, b):
return
def substract(a, b):
return
def multiply(a, b):
return
def divide(a, b):
return
| 8.266667 | 20 | 0.564516 |
6dd56b7189bcdeb41095b1559e35ec8696f1b0e1 | 29,125 | py | Python | aiida_flipper/calculations/dynamics/lindiffusion.py | epfl-theos/aiida_flipper | cf4957b2b6f30ef4bf64a05365e4de95084223da | [
"MIT"
] | 1 | 2021-07-27T08:55:57.000Z | 2021-07-27T08:55:57.000Z | aiida_flipper/calculations/dynamics/lindiffusion.py | epfl-theos/aiida_flipper | cf4957b2b6f30ef4bf64a05365e4de95084223da | [
"MIT"
] | null | null | null | aiida_flipper/calculations/dynamics/lindiffusion.py | epfl-theos/aiida_flipper | cf4957b2b6f30ef4bf64a05365e4de95084223da | [
"MIT"
] | null | null | null | from aiida.common.links import LinkType
from aiida.orm.calculation.chillstep import ChillstepCalculation
from aiida.orm.calculation.chillstep.user.dynamics.replay import ReplayCalculation
from aiida.orm import load_node, Group, Calculation, Code
from aiida.orm.querybuilder import QueryBuilder
from aiida.orm.data.array.... | 51.457597 | 177 | 0.647382 |
afa670170f8aa110cfd19cf3e41c30122407f49f | 8,768 | py | Python | src/chalky/chain.py | stephen-bunn/chalk | 8bcaaab309cc4f4b5eee019bce08e2765d72cf02 | [
"0BSD"
] | 2 | 2020-12-24T16:38:55.000Z | 2021-12-09T21:54:56.000Z | src/chalky/chain.py | stephen-bunn/chalk | 8bcaaab309cc4f4b5eee019bce08e2765d72cf02 | [
"0BSD"
] | null | null | null | src/chalky/chain.py | stephen-bunn/chalk | 8bcaaab309cc4f4b5eee019bce08e2765d72cf02 | [
"0BSD"
] | null | null | null | # -*- encoding: utf-8 -*-
# Copyright (c) 2020 Stephen Bunn <stephen@bunn.io>
# ISC License <https://choosealicense.com/licenses/isc>
"""Contains the chain class that can be used to quickly produce styles and colors."""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Un... | 28.747541 | 88 | 0.60162 |
937e6a5f3eb6a63530ebcda47d1bcec156fd401b | 7,076 | py | Python | nekkar/core/limiter.py | hovodab/nekkar | 9287e93a1257b7e87d29d87379a67fa682bc7390 | [
"MIT"
] | null | null | null | nekkar/core/limiter.py | hovodab/nekkar | 9287e93a1257b7e87d29d87379a67fa682bc7390 | [
"MIT"
] | null | null | null | nekkar/core/limiter.py | hovodab/nekkar | 9287e93a1257b7e87d29d87379a67fa682bc7390 | [
"MIT"
] | null | null | null | import random
import time
from threading import RLock
from typing import Any
from nekkar.core.cache import BaseCache
from nekkar.core.exceptions import RetryMaxCountReached
from nekkar.core.storage import CallableRecord
from nekkar.core.storage import CallableRecordRepository
from nekkar.core.storage import CRTLock
... | 35.20398 | 120 | 0.611221 |
9a185525e90774aeb98e2a9e7ee8f00a49ae3603 | 6,331 | py | Python | models/detector.py | ubc-vision/mist | ef8ab358e83dc306f356910578c5a7c1f8d193d8 | [
"Apache-2.0"
] | 18 | 2021-04-21T05:34:07.000Z | 2022-03-30T03:02:10.000Z | models/detector.py | SLEEP-CO/mist | ef8ab358e83dc306f356910578c5a7c1f8d193d8 | [
"Apache-2.0"
] | 2 | 2021-05-25T12:11:50.000Z | 2021-08-24T02:22:33.000Z | models/detector.py | SLEEP-CO/mist | ef8ab358e83dc306f356910578c5a7c1f8d193d8 | [
"Apache-2.0"
] | 1 | 2021-11-16T12:06:34.000Z | 2021-11-16T12:06:34.000Z | import os
import torch
import torchvision.models
from itertools import product
from models.net import ResNet
class Detector(torch.nn.Module):
def __init__(self, config):
super(Detector, self).__init__()
self.config = config
if config.detector_backbone == 'ResNet34':
print('init ... | 39.080247 | 128 | 0.625494 |
0d36fbd28f72b46ecb854e8a7cd2b3d7343c2734 | 2,242 | py | Python | randomText.py | oisinBates/James_Joyce_Twitter_Bot | 7e3b1c28fd6521ef85931f0877c4121367b1e842 | [
"CC0-1.0"
] | null | null | null | randomText.py | oisinBates/James_Joyce_Twitter_Bot | 7e3b1c28fd6521ef85931f0877c4121367b1e842 | [
"CC0-1.0"
] | null | null | null | randomText.py | oisinBates/James_Joyce_Twitter_Bot | 7e3b1c28fd6521ef85931f0877c4121367b1e842 | [
"CC0-1.0"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw
import tweepy, time, sys
import textwrap
import random
import codecs
from ulyssesHelperFunction import getChapter
img = Image.open('/home/ubuntu/ulysses/joycePortrait.png')
font = Image... | 28.025 | 84 | 0.691347 |
7df6e83abe44e9d3beb5fbf4177cc51539f1a8b3 | 38,639 | py | Python | sphinx/ext/napoleon/docstring.py | rweickelt/sphinx | 1a4c41a7691e8f78d42e2db221192962c53b27df | [
"BSD-2-Clause"
] | null | null | null | sphinx/ext/napoleon/docstring.py | rweickelt/sphinx | 1a4c41a7691e8f78d42e2db221192962c53b27df | [
"BSD-2-Clause"
] | null | null | null | sphinx/ext/napoleon/docstring.py | rweickelt/sphinx | 1a4c41a7691e8f78d42e2db221192962c53b27df | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinx.ext.napoleon.docstring
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Classes for docstring parsing and formatting.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import collections
import inspect
import re
from si... | 36.555345 | 113 | 0.548436 |
e1df9b310635fd2587cb690a32c351697d0190ca | 96,535 | py | Python | synapse/handlers/sync.py | nicobao/synapse | e7da1ced24de9af219c5d7790fd011a9a640ad71 | [
"Apache-2.0"
] | 1 | 2022-01-14T05:37:16.000Z | 2022-01-14T05:37:16.000Z | synapse/handlers/sync.py | nicobao/synapse | e7da1ced24de9af219c5d7790fd011a9a640ad71 | [
"Apache-2.0"
] | null | null | null | synapse/handlers/sync.py | nicobao/synapse | e7da1ced24de9af219c5d7790fd011a9a640ad71 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015-2021 The Matrix.org Foundation C.I.C.
#
# 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... | 40.526868 | 115 | 0.607531 |
cc0cd9a2e324f76a849f069c98672dff39d33a99 | 12,302 | py | Python | sleap/nn/architectures/upsampling.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | 156 | 2020-05-01T18:43:43.000Z | 2022-03-25T10:31:18.000Z | sleap/nn/architectures/upsampling.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | 299 | 2020-04-20T16:37:52.000Z | 2022-03-31T23:54:48.000Z | sleap/nn/architectures/upsampling.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | 41 | 2020-05-14T15:25:21.000Z | 2022-03-25T12:44:54.000Z | """This module defines common upsampling layer stack configurations.
The generic upsampling stack consists of:
- transposed convolution or bilinear upsampling with stride > 1
- skip connections
- 0 or more 3x3 convolutions for refinement
Configuring these components suffices to define the "decoder" portio... | 47.315385 | 88 | 0.61868 |
f2c5b7e2f37bed113337428ea2854bd892911e48 | 5,322 | py | Python | docs/conf.py | m4h3/ansible-stonesoft | d83da5ba98e6628d27cc353d0ea393deaaed1740 | [
"Apache-2.0"
] | 11 | 2017-11-15T10:37:15.000Z | 2019-10-18T13:08:32.000Z | docs/conf.py | m4h3/ansible-stonesoft | d83da5ba98e6628d27cc353d0ea393deaaed1740 | [
"Apache-2.0"
] | 32 | 2017-11-21T15:04:50.000Z | 2019-06-24T15:32:46.000Z | docs/conf.py | m4h3/ansible-stonesoft | d83da5ba98e6628d27cc353d0ea393deaaed1740 | [
"Apache-2.0"
] | 3 | 2018-05-03T11:05:10.000Z | 2019-03-26T09:59:31.000Z | # -*- coding: utf-8 -*-
#
# StonesoftAnsible documentation build configuration file, created by
# sphinx-quickstart on Sun Oct 29 17:30:38 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fi... | 30.94186 | 79 | 0.689402 |
c92df86b9a8b635588c2aaa47c03fefa3311cca3 | 4,314 | py | Python | python/stacks_and_queues/stacks_and_queues.py | paul-leonard/data-structures-and-algorithms | 783d2450d2cafcb507fefd79dc02c4819aebb312 | [
"MIT"
] | 1 | 2020-09-07T19:39:18.000Z | 2020-09-07T19:39:18.000Z | python/stacks_and_queues/stacks_and_queues.py | paul-leonard/data-structures-and-algorithms | 783d2450d2cafcb507fefd79dc02c4819aebb312 | [
"MIT"
] | 1 | 2020-11-16T06:54:25.000Z | 2020-11-16T06:54:25.000Z | python/stacks_and_queues/stacks_and_queues.py | paul-leonard/data-structures-and-algorithms | 783d2450d2cafcb507fefd79dc02c4819aebb312 | [
"MIT"
] | null | null | null | '''
Challenge 10 Required Features:
- [x] Create a Node class that has properties for the value stored in the Node, and a pointer to the next node.
- [x] Create a Stack class that has a top property. It creates an empty Stack when instantiated.
- [x] This object should be aware of a default empty value assigned to top ... | 44.020408 | 221 | 0.694715 |
96a5b8adc65c4d3e4ba1b7a84e2b12408944e44e | 1,160 | py | Python | setup.py | opensyllabus/flask-elasticsearch | ec8710db451229ada0f48a7273c3c229d206d909 | [
"MIT"
] | 4 | 2016-01-09T15:15:33.000Z | 2021-01-09T22:57:53.000Z | setup.py | opensyllabus/flask-elasticsearch | ec8710db451229ada0f48a7273c3c229d206d909 | [
"MIT"
] | null | null | null | setup.py | opensyllabus/flask-elasticsearch | ec8710db451229ada0f48a7273c3c229d206d909 | [
"MIT"
] | 2 | 2018-08-02T13:32:21.000Z | 2019-02-20T12:27:20.000Z | """
Flask-Elasticsearch
-------------------
An Elasticsearch connector for Flask.
This provides a low-level Elasticsearch client, for full details
on functionality please see ``elasticsearch.Elasticsearch``.
"""
from setuptools import setup
setup(
name='Flask-Elasticsearch',
version='0.0.1',
url='https:... | 28.292683 | 70 | 0.661207 |
79f43e46a6b3ac06eb95bdc3563f80a8b953fc14 | 1,088 | py | Python | src/validation/api.py | 3mcloud/aws-auth0-custom-resource | b61ce458de3ac95e1a5d2be4957bdcf87a4c3a26 | [
"BSD-3-Clause"
] | 1 | 2022-02-13T08:46:58.000Z | 2022-02-13T08:46:58.000Z | src/validation/api.py | 3mcloud/aws-auth0-custom-resource | b61ce458de3ac95e1a5d2be4957bdcf87a4c3a26 | [
"BSD-3-Clause"
] | null | null | null | src/validation/api.py | 3mcloud/aws-auth0-custom-resource | b61ce458de3ac95e1a5d2be4957bdcf87a4c3a26 | [
"BSD-3-Clause"
] | null | null | null | """
Validate and coerce event resource parameters
"""
from . import AuthnValidator, to_bool
auth0 = {
'tenant': {'type': 'string', 'readonly': True, 'empty': False},
'service_token': {'type': 'string', 'readonly': True},
'name': {'type': 'string'},
'audience': {'type': 'string', 'rename': 'identifier',... | 32 | 94 | 0.584559 |
33525ef8dcded6e9bf6a6dac08318cd7523f78bb | 247 | py | Python | learn/python/Demo/demo03.py | alicfeng/learncode | a2bab291b96135c6beef39662f8366de1246bf7d | [
"Apache-2.0"
] | 1 | 2018-03-07T13:27:56.000Z | 2018-03-07T13:27:56.000Z | learn/python/Demo/demo03.py | alicfeng/learncode | a2bab291b96135c6beef39662f8366de1246bf7d | [
"Apache-2.0"
] | null | null | null | learn/python/Demo/demo03.py | alicfeng/learncode | a2bab291b96135c6beef39662f8366de1246bf7d | [
"Apache-2.0"
] | 1 | 2018-12-24T03:53:59.000Z | 2018-12-24T03:53:59.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# 一个整数,它加上100和加上268后都是一个完全平方数,请问该数是多少?
import math
for i in range(10000000):
x = int(math.sqrt(i + 100))
y = int(math.sqrt(i + 268))
if x * x == i + 100 and y * y == i + 268:
print i
| 20.583333 | 45 | 0.562753 |
0dd523ad33579fc48a26d81a646abc8a4aa88888 | 2,321 | py | Python | appserver/migrations/versions/59b6851c654e_.py | SBRG/lifelike | a7b715f38b389a585c10e6d0d067345937455c13 | [
"MIT"
] | 8 | 2022-01-28T08:43:07.000Z | 2022-03-23T11:18:10.000Z | appserver/migrations/versions/59b6851c654e_.py | SBRG/lifelike | a7b715f38b389a585c10e6d0d067345937455c13 | [
"MIT"
] | 23 | 2022-02-14T15:25:00.000Z | 2022-03-28T15:30:45.000Z | appserver/migrations/versions/59b6851c654e_.py | SBRG/lifelike | a7b715f38b389a585c10e6d0d067345937455c13 | [
"MIT"
] | 5 | 2022-01-28T15:45:44.000Z | 2022-03-14T11:36:49.000Z | """Table schema for files.
Had to update migration file itself, rather
than a new migration file... The reason was
because changed the `id` column to Integer,
and there wasn't an easy way to set a default
value to autoincrement the primary key of an
existing column with alembic.
The `file_id` column replaced the orig... | 32.690141 | 76 | 0.684188 |
cfd07c4cface2e664b077a9a5e85132d55e5749d | 7,604 | py | Python | forte/data/index.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | 2 | 2021-01-01T12:07:27.000Z | 2021-09-10T03:57:18.000Z | forte/data/index.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | forte/data/index.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Forte Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 36.7343 | 80 | 0.646896 |
a3ca0583ed47af6a3854c42223c779a7e614afb3 | 1,556 | py | Python | src/bible/migrations/0002_populate.py | kajogo777/bible-study-server | 361ea90d5ed85e4d435bde2132a9daf16acb7f7f | [
"MIT"
] | null | null | null | src/bible/migrations/0002_populate.py | kajogo777/bible-study-server | 361ea90d5ed85e4d435bde2132a9daf16acb7f7f | [
"MIT"
] | 4 | 2020-03-21T20:46:47.000Z | 2022-02-10T10:14:18.000Z | src/bible/migrations/0002_populate.py | kajogo777/bible-study-server | 361ea90d5ed85e4d435bde2132a9daf16acb7f7f | [
"MIT"
] | null | null | null | # Generated by Django 2.2.1 on 2019-05-18 10:59
from django.db import migrations
import json
from bible.utils import ar_book_name
def populate_books(apps, schema_editor):
BibleBook = apps.get_model('bible', 'BibleBook')
BibleChapter = apps.get_model('bible', 'BibleChapter')
BibleVerse = apps.get_model('bi... | 31.755102 | 82 | 0.59383 |
91051a483cc1d29cceb65b8fa99918e398787809 | 15,819 | py | Python | internals/notifier_test.py | rakuco/chromium-dashboard | 66098793c7b5c4e80bb49326f05eba720dc00bc5 | [
"Apache-2.0"
] | null | null | null | internals/notifier_test.py | rakuco/chromium-dashboard | 66098793c7b5c4e80bb49326f05eba720dc00bc5 | [
"Apache-2.0"
] | null | null | null | internals/notifier_test.py | rakuco/chromium-dashboard | 66098793c7b5c4e80bb49326f05eba720dc00bc5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.981865 | 77 | 0.710348 |
d2b09b9f83ec8221fc7b0a132098b220f166a70f | 430 | py | Python | tests/spiders/test_idope.py | stephen-bunn/torvend | 18e8242ff80523b498a5e7c996ef1bcb074da423 | [
"MIT"
] | 1 | 2018-12-17T23:17:49.000Z | 2018-12-17T23:17:49.000Z | tests/spiders/test_idope.py | stephen-bunn/torvend | 18e8242ff80523b498a5e7c996ef1bcb074da423 | [
"MIT"
] | null | null | null | tests/spiders/test_idope.py | stephen-bunn/torvend | 18e8242ff80523b498a5e7c996ef1bcb074da423 | [
"MIT"
] | null | null | null | # Copyright (c) 2017 Stephen Bunn (stephen@bunn.io)
# MIT License <https://opensource.org/licenses/MIT>
from torvend.spiders import (IDopeSpider,)
from ._common import BaseSpiderTest
class TestIDopeSpider(BaseSpiderTest):
@property
def spider_class(self):
return IDopeSpider
@property
def mo... | 20.47619 | 51 | 0.695349 |
fe0640254846d186fd15c02239ccd988c45e1dc8 | 3,941 | py | Python | bmsapp/scripts/readers/siemens.py | alanmitchell/bmon | 35b3377efa66d978bb471fe0c69ee0a939ba744b | [
"Apache-2.0"
] | 11 | 2017-03-11T04:29:37.000Z | 2021-11-16T11:37:21.000Z | bmsapp/scripts/readers/siemens.py | alanmitchell/bmon | 35b3377efa66d978bb471fe0c69ee0a939ba744b | [
"Apache-2.0"
] | 34 | 2015-11-24T18:59:34.000Z | 2021-08-13T00:42:34.000Z | bmsapp/scripts/readers/siemens.py | alanmitchell/bmon | 35b3377efa66d978bb471fe0c69ee0a939ba744b | [
"Apache-2.0"
] | 7 | 2016-01-15T01:54:22.000Z | 2020-04-26T08:01:06.000Z | """Parses sensor point data from a trend file created on a
Siemens DDC system. Used initially with the Mat-Su Borough
School District Siemens system.
Main parsing function to call is 'parse_file'.
"""
import csv
import calendar
import logging
import math
import string
from io import TextIOWrapper
import pytz
from da... | 32.841667 | 91 | 0.583862 |
a0daf017d662eab97a7b3ff0ac569ced9313060e | 2,331 | py | Python | torcms/script/command.py | seaioheroes/TorCMS-master | 266aa6dcf8e2d36024dd278e6f56fd638c88c6ff | [
"MIT"
] | null | null | null | torcms/script/command.py | seaioheroes/TorCMS-master | 266aa6dcf8e2d36024dd278e6f56fd638c88c6ff | [
"MIT"
] | null | null | null | torcms/script/command.py | seaioheroes/TorCMS-master | 266aa6dcf8e2d36024dd278e6f56fd638c88c6ff | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Script for Command.
'''
import sys
import getopt
from .script_migrate import run_migrate
from .script_init import run_init
from .script_sendemail_all import run_send_all, run_send_nologin
from .script_review import run_review
from .script_sitemap import run_sitemap
from .script_funcs impor... | 29.1375 | 68 | 0.576577 |
3fd8314f0b8074a82334481a0b753d777723c9e7 | 22,039 | py | Python | PRESUBMIT.py | Decorum-OS/third_party-skia | 5561e3ddbbf6c3e051075ada4a11ddc70760f03d | [
"Apache-2.0"
] | null | null | null | PRESUBMIT.py | Decorum-OS/third_party-skia | 5561e3ddbbf6c3e051075ada4a11ddc70760f03d | [
"Apache-2.0"
] | null | null | null | PRESUBMIT.py | Decorum-OS/third_party-skia | 5561e3ddbbf6c3e051075ada4a11ddc70760f03d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 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.
"""Top-level presubmit script for Skia.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmi... | 39.145648 | 132 | 0.682336 |
eb39ff92a63fbd3ada5cfd8b0d2fc252185460db | 1,874 | py | Python | preprocess.py | HazelTree/brain-tumor-segmentation-unet | ee45b48590172a9a6febe89222c027e568d3d853 | [
"MIT"
] | null | null | null | preprocess.py | HazelTree/brain-tumor-segmentation-unet | ee45b48590172a9a6febe89222c027e568d3d853 | [
"MIT"
] | null | null | null | preprocess.py | HazelTree/brain-tumor-segmentation-unet | ee45b48590172a9a6febe89222c027e568d3d853 | [
"MIT"
] | 1 | 2020-05-09T02:10:44.000Z | 2020-05-09T02:10:44.000Z | import os
import numpy as np
import matplotlib.pyplot as plt
import cv2
from skimage.transform import resize
from keras.preprocessing.image import ImageDataGenerator
from sklearn.model_selection import train_test_split
import gc
##Load images, labels, masks
def load_data():
'''
the output sequence is: train_x,... | 32.877193 | 101 | 0.665955 |
b0b232f8cd6450f90c1abce7fdfcc4850f9db89f | 2,877 | py | Python | docs/conf.py | paul-tqh-nguyen/mlir-graphblas | ce26f591efd6031e53380d12bb5641ce99a4d9bd | [
"Apache-2.0",
"MIT"
] | 7 | 2021-06-04T19:42:13.000Z | 2022-03-25T15:53:23.000Z | docs/conf.py | paul-tqh-nguyen/mlir-graphblas | ce26f591efd6031e53380d12bb5641ce99a4d9bd | [
"Apache-2.0",
"MIT"
] | 204 | 2021-02-28T22:26:40.000Z | 2022-03-29T19:29:21.000Z | docs/conf.py | paul-tqh-nguyen/mlir-graphblas | ce26f591efd6031e53380d12bb5641ce99a4d9bd | [
"Apache-2.0",
"MIT"
] | 8 | 2021-01-11T17:08:18.000Z | 2021-08-13T15:47:15.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 32.325843 | 86 | 0.658325 |
8e775c67bc137a7e08629d5a502a6bc658b428ad | 2,957 | py | Python | cbc/extern/version.py | jhunkeler/cbc | a14a796829e7619adb22bf87c36d11efb0146320 | [
"BSD-3-Clause"
] | null | null | null | cbc/extern/version.py | jhunkeler/cbc | a14a796829e7619adb22bf87c36d11efb0146320 | [
"BSD-3-Clause"
] | 1 | 2018-06-20T20:10:48.000Z | 2018-06-20T20:10:48.000Z | cbc/extern/version.py | jhunkeler/cbc | a14a796829e7619adb22bf87c36d11efb0146320 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: Douglas Creager <dcreager@dcreager.net>
# This file is placed into the public domain.
# Calculates the current version number. If possible, this is the
# output of “git describe”, modified to conform to the versioning
# scheme that setuptools uses. If “git describe” returns an error... | 25.713043 | 70 | 0.649983 |
48add42b020dd265539a24cfb1579b319ebd8af0 | 2,391 | py | Python | airbyte-integrations/connectors/source-s3/source_s3/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 2 | 2022-03-02T13:46:05.000Z | 2022-03-05T12:31:28.000Z | airbyte-integrations/connectors/source-s3/source_s3/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 5 | 2022-02-22T14:49:48.000Z | 2022-03-19T10:43:08.000Z | airbyte-integrations/connectors/source-s3/source_s3/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 1 | 2022-03-11T06:21:24.000Z | 2022-03-11T06:21:24.000Z | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from typing import Any, Mapping, Optional
from pydantic import BaseModel, Field
from .source_files_abstract.source import SourceFilesAbstract
from .source_files_abstract.spec import SourceFilesAbstractSpec
from .stream import IncrementalFileStreamS3
cla... | 42.696429 | 239 | 0.69678 |
61609035b28125cdd3655e16e5a0a7ffb8949c97 | 9,281 | py | Python | src/dat_analysis/analysis_tools/setup_along_transition_analysis.py | TimChild/dat_analysis | 2902e5cb2f2823a1c7a26faf6b3b6dfeb7633c73 | [
"MIT"
] | null | null | null | src/dat_analysis/analysis_tools/setup_along_transition_analysis.py | TimChild/dat_analysis | 2902e5cb2f2823a1c7a26faf6b3b6dfeb7633c73 | [
"MIT"
] | null | null | null | src/dat_analysis/analysis_tools/setup_along_transition_analysis.py | TimChild/dat_analysis | 2902e5cb2f2823a1c7a26faf6b3b6dfeb7633c73 | [
"MIT"
] | null | null | null | """
Collection of functions useful for setting up analysis of along transition scans.
General process is:
1. Figure out which dats are weakly coupled. i.e. Transition fits to transition_only OR cold part of entropy data for weakly coupled (i.e. gamma = 0)
2. Linear fit thetas in weakly coupled over a region which makes... | 40.177489 | 149 | 0.652731 |
efbe3c20eeaedc573fb2544653e543818be9e1ea | 1,709 | py | Python | fixture/james.py | Nick19912020/python_training_mantis | 7077ac7f2f0ec5b4b67956215a5254118b4f0b97 | [
"Apache-2.0"
] | null | null | null | fixture/james.py | Nick19912020/python_training_mantis | 7077ac7f2f0ec5b4b67956215a5254118b4f0b97 | [
"Apache-2.0"
] | null | null | null | fixture/james.py | Nick19912020/python_training_mantis | 7077ac7f2f0ec5b4b67956215a5254118b4f0b97 | [
"Apache-2.0"
] | null | null | null | from telnetlib import Telnet
class JamesHelper:
def __init__(self, app):
self.app = app
def ensure_user_exists(self, username, password):
james_config = self.app.config['james']
session = JamesHelper.Session(
james_config['host'], james_config['port'], james_config['usern... | 34.877551 | 107 | 0.593329 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.