hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bd06c839ad9fb686e29fc427b87e7ada487f3903 | 821 | py | Python | src/main.py | frgfm/poker_buddy | fae034957bc02acaf7f635f8ac078554f31104a4 | [
"MIT"
] | 1 | 2020-10-01T08:11:21.000Z | 2020-10-01T08:11:21.000Z | src/main.py | frgfm/poker-buddy | fae034957bc02acaf7f635f8ac078554f31104a4 | [
"MIT"
] | null | null | null | src/main.py | frgfm/poker-buddy | fae034957bc02acaf7f635f8ac078554f31104a4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
These objects and functions are part of a larger poker assistant project.
Content of this script enable the user to simulate game of Texas Holdem Poker.
'''
__author__ = 'François-Guillaume Fernandez'
__license__ = 'MIT License'
__version__ = '0.1'
__maintainer__ = 'François-Guillaume Fernan... | 24.147059 | 78 | 0.663825 |
74a70fc66e98524c9960f00e33a44a6beba5af90 | 6,285 | py | Python | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_24/exp6_relative_distance_set.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_24/exp6_relative_distance_set.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_24/exp6_relative_distance_set.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.pygame import PickAndPlaceEnv
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.sets.rl_launcher import disco_experiment
if __name__ == "__main__":
variant = dict(
env_class=PickAndPlaceEnv,
env_kwargs=dict(
... | 31.582915 | 75 | 0.523946 |
90b5814a00ae9ae8ff7a501926e0af195ebb1d82 | 4,007 | py | Python | tables/wikipedia-scripts/extract.py | yash-srivastava19/sempre | b27c06906da33e345c645ff9470132bf6d1c26dc | [
"Apache-2.0"
] | 812 | 2015-01-08T01:58:39.000Z | 2022-03-24T02:43:05.000Z | tables/wikipedia-scripts/extract.py | yash-srivastava19/sempre | b27c06906da33e345c645ff9470132bf6d1c26dc | [
"Apache-2.0"
] | 181 | 2015-01-26T21:54:04.000Z | 2022-03-09T17:52:04.000Z | tables/wikipedia-scripts/extract.py | yash-srivastava19/sempre | b27c06906da33e345c645ff9470132bf6d1c26dc | [
"Apache-2.0"
] | 314 | 2015-01-14T11:23:08.000Z | 2022-03-07T02:36:47.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Extract categories and their members from Wikipedia dump."""
import sys, os, re, argparse, json, gzip
from codecs import open
from collections import defaultdict
HIDDEN_CAT_CAT = 15961454
################################################################
# List all page... | 37.448598 | 79 | 0.529823 |
a1dbab7a0520e4c0a24b61c8fcea291a531b1c62 | 24,089 | py | Python | api/handlers/ws_domains/lobster.py | visigoth/V3SPA | b608589076bf82d91538493bc2c549c25a0bef33 | [
"BSD-3-Clause"
] | 33 | 2016-09-12T14:24:07.000Z | 2017-08-03T19:20:03.000Z | api/handlers/ws_domains/lobster.py | visigoth/V3SPA | b608589076bf82d91538493bc2c549c25a0bef33 | [
"BSD-3-Clause"
] | 4 | 2016-08-22T19:19:16.000Z | 2016-11-28T00:40:54.000Z | api/handlers/ws_domains/lobster.py | visigoth/V3SPA | b608589076bf82d91538493bc2c549c25a0bef33 | [
"BSD-3-Clause"
] | 8 | 2016-09-12T14:24:08.000Z | 2017-01-19T13:39:12.000Z | import api
import logging
logger = logging.getLogger(__name__)
from tornado import httpclient
import hashlib
import urllib
import api.support.decompose
import api.handlers.ws_domains as ws_domains
import api.jsonh
import json
__MIN_LSR_VERSION__ = 6
class LobsterDomain(object):
"""Docstring for LobsterDomai... | 36.665145 | 100 | 0.482295 |
7817bcfdb88b63b9877526ba12fa192abe5b75a2 | 965 | py | Python | tests/test_app_generation.py | singleton11/sdjat | be8c1a621fc380a0dc5af446d531c259531de345 | [
"MIT"
] | null | null | null | tests/test_app_generation.py | singleton11/sdjat | be8c1a621fc380a0dc5af446d531c259531de345 | [
"MIT"
] | 1 | 2016-12-04T16:08:50.000Z | 2016-12-04T16:08:50.000Z | tests/test_app_generation.py | singleton11/sdjat | be8c1a621fc380a0dc5af446d531c259531de345 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import unittest
from unittest import TestCase
import sh
from cookiecutter.main import cookiecutter
class AppGenerationTestCase(TestCase):
"""Test case for app generation"""
def tearDown(self):
sh.rm('-rf', 'polls')
def test_generation(self):
"""Test standard app g... | 21.931818 | 68 | 0.450777 |
8fe301f96f754f89b84274c541dd3905f8b2e5f5 | 618 | py | Python | account/migrations/0011_auto_20190818_0653.py | lilianwaweru/Bank | 05ef2b86beec98d1cf31f3da168bbf32efaa1e3f | [
"MIT"
] | null | null | null | account/migrations/0011_auto_20190818_0653.py | lilianwaweru/Bank | 05ef2b86beec98d1cf31f3da168bbf32efaa1e3f | [
"MIT"
] | 7 | 2020-02-12T02:30:17.000Z | 2021-10-06T02:49:08.000Z | account/migrations/0011_auto_20190818_0653.py | lilianwaweru/Bank | 05ef2b86beec98d1cf31f3da168bbf32efaa1e3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-08-18 06:53
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('account', '0010_auto_20190818_0625'),
]
operations = [
migrations.RemoveField(
... | 22.071429 | 47 | 0.574434 |
28e01fcc1dd01f952921aa5ac9384f06dcb775f9 | 3,754 | py | Python | PaymentCalculator.py | tezosland/tezos-reward-distributer | f9825affe172f7cef88c72e63ead8feb064188f4 | [
"MIT"
] | 5 | 2018-11-04T16:57:43.000Z | 2019-07-24T20:22:45.000Z | PaymentCalculator.py | tezosland/tezos-reward-distributer | f9825affe172f7cef88c72e63ead8feb064188f4 | [
"MIT"
] | 1 | 2018-11-04T13:06:44.000Z | 2018-11-04T13:06:44.000Z | PaymentCalculator.py | tezosland/tezos-reward-distributer | f9825affe172f7cef88c72e63ead8feb064188f4 | [
"MIT"
] | null | null | null | from utils import floorf
class PaymentCalculator:
def __init__(self, founders_map, owners_map, reward_list, total_rewards, service_fee_calculator, cycle):
self.owners_map = owners_map
self.total_rewards = total_rewards
self.cycle = cycle
self.fee_calc = service_fee_calculator
... | 43.149425 | 120 | 0.638785 |
d529ca36b3d98248388bc2bf0e546fd41eccc708 | 14,021 | py | Python | pennylane/qnn/keras.py | jsmz97/pennylane | de7b7c0b452c8d59867d11f84b9c332a36e08ab1 | [
"Apache-2.0"
] | 1 | 2019-03-15T03:32:58.000Z | 2019-03-15T03:32:58.000Z | pennylane/qnn/keras.py | jsmz97/pennylane | de7b7c0b452c8d59867d11f84b9c332a36e08ab1 | [
"Apache-2.0"
] | 1 | 2021-12-09T22:04:41.000Z | 2022-01-19T14:21:03.000Z | pennylane/qnn/keras.py | jsmz97/pennylane | de7b7c0b452c8d59867d11f84b9c332a36e08ab1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2021 Xanadu Quantum Technologies 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... | 42.105105 | 123 | 0.635333 |
d4accd9c8c7bbcc9b0ff5eac6f7e281e30c4f7c5 | 1,274 | py | Python | pyleecan/GUI/Dialog/DMachineSetup/SBar/PCondType21/Gen_PCondType21.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | 2 | 2019-06-08T15:04:39.000Z | 2020-09-07T13:32:22.000Z | pyleecan/GUI/Dialog/DMachineSetup/SBar/PCondType21/Gen_PCondType21.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SBar/PCondType21/Gen_PCondType21.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""File generated according to PCondType21/gen_list.json
WARNING! All changes made in this file will be lost!
"""
from pyleecan.GUI.Dialog.DMachineSetup.SBar.PCondType21.Ui_PCondType21 import (
Ui_PCondType21,
)
class Gen_PCondType21(Ui_PCondType21):
def setupUi(self, PCondType21):
... | 31.073171 | 79 | 0.632653 |
3acd92abc15a3379fcf1fa7212828efcc89a220f | 171 | py | Python | Helium LoraWAN/config.py | altaga/Healthium | ac852c27c2956b93b08932fb5df8512a9dc7bd02 | [
"MIT"
] | null | null | null | Helium LoraWAN/config.py | altaga/Healthium | ac852c27c2956b93b08932fb5df8512a9dc7bd02 | [
"MIT"
] | 2 | 2022-02-14T14:24:13.000Z | 2022-02-27T17:53:14.000Z | Helium LoraWAN/config.py | altaga/Healthium | ac852c27c2956b93b08932fb5df8512a9dc7bd02 | [
"MIT"
] | null | null | null | import ubinascii
app_eui = ubinascii.unhexlify('xxxxxxxxxxxxxx')
app_key = ubinascii.unhexlify('xxxxxxxxxxxxxx')
dev_eui = ubinascii.unhexlify('xxxxxxxxxxxxxxxxxxxxxxx')
| 28.5 | 56 | 0.824561 |
efcf42eb820a24ae9db80a690699f6b25349298a | 4,478 | py | Python | build/x86/python/m5/internal/param_I2CBus.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | build/x86/python/m5/internal/param_I2CBus.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | build/x86/python/m5/internal/param_I2CBus.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path imp... | 30.462585 | 108 | 0.69272 |
c5272e4b83743914a602d9185129fdc74447cd87 | 7,900 | py | Python | tests/dependencies_test.py | pombredanne/imagemounter | 5d8ba6f2b4cd61b9ad259d5265f6fd7f74a0e82f | [
"MIT"
] | 89 | 2015-05-08T08:29:18.000Z | 2022-03-05T00:03:44.000Z | tests/dependencies_test.py | personx000/imagemounter | 5d8ba6f2b4cd61b9ad259d5265f6fd7f74a0e82f | [
"MIT"
] | 32 | 2015-04-08T19:59:51.000Z | 2022-03-24T15:06:02.000Z | tests/dependencies_test.py | personx000/imagemounter | 5d8ba6f2b4cd61b9ad259d5265f6fd7f74a0e82f | [
"MIT"
] | 47 | 2015-03-04T19:04:11.000Z | 2022-02-27T18:22:24.000Z | import os
import subprocess
import sys
import unittest
import unittest.mock as mock
from imagemounter.dependencies import (CommandDependency, Dependency,
DependencySection, MagicDependency, PythonModuleDependency, require)
from imagemounter.exceptions import CommandNotFoundError
... | 40.512821 | 107 | 0.67038 |
5a88fc3226691612d0afb6b7527a6d60e9086efc | 2,788 | py | Python | machine-learning-gists/e22bab0df2af9e8dd66e75a4860e0150a1506bdf/snippet.py | qwbjtu2015/dockerizeme | 9039beacf281ea7058d721784ed4eff054453b09 | [
"Apache-2.0"
] | null | null | null | machine-learning-gists/e22bab0df2af9e8dd66e75a4860e0150a1506bdf/snippet.py | qwbjtu2015/dockerizeme | 9039beacf281ea7058d721784ed4eff054453b09 | [
"Apache-2.0"
] | null | null | null | machine-learning-gists/e22bab0df2af9e8dd66e75a4860e0150a1506bdf/snippet.py | qwbjtu2015/dockerizeme | 9039beacf281ea7058d721784ed4eff054453b09 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from scipy.io import loadmat
from scipy.stats import multivariate_normal
from sklearn.metrics import f1_score
## 1.データの読み込み
def load_data(filename):
data = loadmat(filename)
return np.array(data['X']), np.array(data['Xval']), np.ravel(np.array(data['yval']))
X... | 33.590361 | 98 | 0.695481 |
0b5a46d195c0f2903356f4f29fa11460d0ce4c62 | 883 | py | Python | kerax/losses/__init__.py | umangjpatel/dnet | 21e1798643a6382a1d7960db4c5f3a22fa19a28a | [
"Unlicense"
] | 30 | 2019-11-29T07:34:57.000Z | 2020-12-29T12:25:17.000Z | kerax/losses/__init__.py | umangjpatel/dnet | 21e1798643a6382a1d7960db4c5f3a22fa19a28a | [
"Unlicense"
] | 18 | 2019-11-01T18:05:58.000Z | 2020-12-23T07:26:26.000Z | kerax/losses/__init__.py | umangjpatel/DNet | 21e1798643a6382a1d7960db4c5f3a22fa19a28a | [
"Unlicense"
] | 4 | 2020-01-25T01:16:30.000Z | 2020-06-19T16:36:36.000Z | from ..utils import Tensor, jnp
def BCELoss(predictions: Tensor, targets: Tensor) -> Tensor:
"""
BCE or Binary Cross Entropy loss function.
Useful for binary classification tasks.
:param predictions: Outputs of the network.
:param targets: Expected outputs of the network.
:return: binary cross... | 29.433333 | 99 | 0.687429 |
9a03cdcc8c4274b1fc5f2a1ecbd2711cb272de8c | 14,240 | py | Python | webStorm-APICloud/python_tools/Lib/test/test_smtplib.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | webStorm-APICloud/python_tools/Lib/test/test_smtplib.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | webStorm-APICloud/python_tools/Lib/test/test_smtplib.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | import asyncore
import email.utils
import socket
import threading
import smtpd
import smtplib
import StringIO
import sys
import time
import select
from unittest import TestCase
from test import test_support
HOST = test_support.HOST
def server(evt, buf, serv):
serv.listen(5)
evt.set()
t... | 34.479419 | 85 | 0.58757 |
6bf9cb8696a89af627ea4b7a263242f48cf490c2 | 86 | py | Python | djmapache/commonapp/forms.py | plungerman/django-djmapache | 3dfef0a207464e65b281974e30f20fa97354ed08 | [
"MIT"
] | null | null | null | djmapache/commonapp/forms.py | plungerman/django-djmapache | 3dfef0a207464e65b281974e30f20fa97354ed08 | [
"MIT"
] | 11 | 2019-12-06T16:03:05.000Z | 2022-03-04T17:10:25.000Z | djmapache/commonapp/forms.py | carthage-college/django-djmapache | 901f7f5eff37553212129509f2b062fff4fec0ed | [
"MIT"
] | null | null | null | from django import forms
class UploadForm(forms.Form):
phile = forms.FileField()
| 17.2 | 29 | 0.744186 |
3c7ddb8aa22a4ce8473afa601b4d960ee814a77e | 21 | py | Python | lapis/version.py | movermeyer/lapis | 623a3fc623a7a8fa8c292912b4172787f772f807 | [
"CC0-1.0"
] | 3 | 2015-02-21T05:32:35.000Z | 2017-04-22T21:18:32.000Z | lapis/version.py | movermeyer/lapis | 623a3fc623a7a8fa8c292912b4172787f772f807 | [
"CC0-1.0"
] | 32 | 2015-02-04T00:52:32.000Z | 2017-03-05T17:17:57.000Z | lapis/version.py | dandesousa/Lapis | 623a3fc623a7a8fa8c292912b4172787f772f807 | [
"CC0-1.0"
] | 1 | 2018-03-05T17:16:16.000Z | 2018-03-05T17:16:16.000Z | version="0.2.2b-dev"
| 10.5 | 20 | 0.666667 |
82f6f90e5c8c71e5f371145d519b05acb42907b0 | 4,596 | py | Python | smarc_keyboard_teleop/scripts/lolo_auv_teleop_joystick.py | Jollerprutt/smarc_utils | cf938dbddffbf745cb8d2cbc92c502e286f63b75 | [
"BSD-3-Clause"
] | 1 | 2022-03-19T10:55:37.000Z | 2022-03-19T10:55:37.000Z | smarc_keyboard_teleop/scripts/lolo_auv_teleop_joystick.py | Jollerprutt/smarc_utils | cf938dbddffbf745cb8d2cbc92c502e286f63b75 | [
"BSD-3-Clause"
] | 8 | 2018-01-26T10:58:47.000Z | 2021-06-06T11:10:51.000Z | smarc_keyboard_teleop/scripts/lolo_auv_teleop_joystick.py | Jollerprutt/smarc_utils | cf938dbddffbf745cb8d2cbc92c502e286f63b75 | [
"BSD-3-Clause"
] | 5 | 2017-10-17T08:21:36.000Z | 2021-03-24T16:35:01.000Z | #!/usr/bin/python
# Copyright 2018 Nils Bore (nbore@kth.se)
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the fo... | 43.358491 | 757 | 0.753699 |
283104436f8f837563fd0904daf005089cb1d89b | 1,248 | py | Python | app/seeds/comments.py | TolulopeVerissimo/InstantaneousGramme | adb1d6f61146bfbcc8c501564b94ce009271276a | [
"MIT",
"Unlicense"
] | 5 | 2021-02-19T19:07:35.000Z | 2021-04-09T11:35:45.000Z | app/seeds/comments.py | TolulopeVerissimo/InstantaneousGramme | adb1d6f61146bfbcc8c501564b94ce009271276a | [
"MIT",
"Unlicense"
] | 55 | 2021-02-23T08:16:06.000Z | 2021-08-10T18:04:06.000Z | app/seeds/comments.py | TolulopeVerissimo/InstantaneousGramme | adb1d6f61146bfbcc8c501564b94ce009271276a | [
"MIT",
"Unlicense"
] | null | null | null | from app.models import db, Comment
def seed_comments():
first = Comment(
user_id=1,
post_id=1,
content='Wow that is a nice photo'
)
second = Comment(
user_id=2,
post_id=1,
content='Very cool'
)
third = Comment(
user_id=3,
post_id=1,
... | 21.517241 | 69 | 0.585737 |
4eac3fe883c4f784f3e9c700a5ec670c8f30d771 | 5,433 | py | Python | ceilometerclient/tests/v1/test_resources.py | zqfan/python-ceilometerclient | 2d4c6446ff6985c3eb9c4742df1c8d0682dee6ea | [
"Apache-2.0"
] | null | null | null | ceilometerclient/tests/v1/test_resources.py | zqfan/python-ceilometerclient | 2d4c6446ff6985c3eb9c4742df1c8d0682dee6ea | [
"Apache-2.0"
] | null | null | null | ceilometerclient/tests/v1/test_resources.py | zqfan/python-ceilometerclient | 2d4c6446ff6985c3eb9c4742df1c8d0682dee6ea | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 33.537037 | 78 | 0.490153 |
bff39380f72017c6be57a6fea8980ae6a709f45b | 13,873 | py | Python | python/coco_json_utils.py | ahmohamed1/cocosynth | b5ea836b3106c031180a13a55fb891397f090df0 | [
"MIT"
] | 1 | 2020-02-26T01:30:39.000Z | 2020-02-26T01:30:39.000Z | python/coco_json_utils.py | basedrhys/cocosynth | 3d9365af58552f45b093faf4ceac855a03436cf7 | [
"MIT"
] | null | null | null | python/coco_json_utils.py | basedrhys/cocosynth | 3d9365af58552f45b093faf4ceac855a03436cf7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import numpy as np
import json
from pathlib import Path
from tqdm import tqdm
from skimage import measure, io
from shapely.geometry import Polygon, MultiPolygon
from PIL import Image
class InfoJsonUtils():
""" Creates an info object to describe a COCO dataset
"""
def create_coco_info(sel... | 38.859944 | 115 | 0.6047 |
be7f57f9e6397b3f7972d4202582afe3c9d8cdef | 3,406 | py | Python | engines/dotflow2/session_mongodb.py | NunoEdgarGFlowHub/rhizome | 6fcb77c4cc38e662cd805fc5df7845b4c97c5ea0 | [
"MIT"
] | 8 | 2018-10-30T10:11:33.000Z | 2020-12-01T05:36:19.000Z | engines/dotflow2/session_mongodb.py | NunoEdgarGFlowHub/rhizome | 6fcb77c4cc38e662cd805fc5df7845b4c97c5ea0 | [
"MIT"
] | 16 | 2018-10-26T00:04:11.000Z | 2021-04-30T20:59:14.000Z | engines/dotflow2/session_mongodb.py | SeedVault/bbot-py | b94ef5e75411ac4a214f5ac54d04ce00d9108ec0 | [
"MIT"
] | 3 | 2019-03-11T13:42:47.000Z | 2019-12-03T13:19:33.000Z | """MongoDB repository."""
import logging
import json
import datetime
from typing import Any
from pymongo import MongoClient, DeleteMany
from .session import Session
class SessionMongoDB(Session):
"""MongoDB session."""
def __init__(self, config: dict, dotbot: dict=None) -> None:
"""Set up MongoDB."""
... | 28.14876 | 111 | 0.556371 |
4455820af7778ebef5e94592a6298c3ac17ab21b | 5,552 | py | Python | falcon/routing/util.py | bibekjoshi54/falcon | 6357a5959e71b59f261a581d168bfd8ab6952ca8 | [
"Apache-2.0"
] | 1 | 2020-04-18T12:58:51.000Z | 2020-04-18T12:58:51.000Z | falcon/routing/util.py | bibekjoshi54/falcon | 6357a5959e71b59f261a581d168bfd8ab6952ca8 | [
"Apache-2.0"
] | 1 | 2021-07-24T15:39:29.000Z | 2021-07-24T15:39:29.000Z | falcon/routing/util.py | bibekjoshi54/falcon | 6357a5959e71b59f261a581d168bfd8ab6952ca8 | [
"Apache-2.0"
] | 1 | 2020-03-06T13:38:33.000Z | 2020-03-06T13:38:33.000Z | # Copyright 2013 by Rackspace Hosting, 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 t... | 35.363057 | 89 | 0.673271 |
ded8f612a0615b416c1a7cee8d286c10c70861bb | 1,122 | py | Python | recipes/transfer/monddyyyy_to_iso.py | svetasmirnova/mysqlcookbook | 8cb370b9b91ef35f4654b774bac019e2b636ac67 | [
"CC0-1.0"
] | 1 | 2022-03-01T16:45:38.000Z | 2022-03-01T16:45:38.000Z | recipes/transfer/monddyyyy_to_iso.py | svetasmirnova/mysqlcookbook | 8cb370b9b91ef35f4654b774bac019e2b636ac67 | [
"CC0-1.0"
] | null | null | null | recipes/transfer/monddyyyy_to_iso.py | svetasmirnova/mysqlcookbook | 8cb370b9b91ef35f4654b774bac019e2b636ac67 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/python3
# monddyyyy_to_iso.py: Convert dates from mon[.] dd, yyyy to ISO format.
# Assumes tab-delimited, linefeed-terminated input
import re
import sys
import fileinput
import warnings
map = {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6,
"jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov"... | 35.0625 | 81 | 0.605169 |
0df8d82a26428ea65b0e53d134d86121c943e27b | 1,110 | py | Python | Bioinformatics IV/Week V/SpectralDictionarySize.py | egeulgen/Bioinformatics_Specialization | 38581b471a54c41d780d9eeb26a7033eb57f3a01 | [
"MIT"
] | 3 | 2021-04-03T23:46:42.000Z | 2021-08-08T01:19:32.000Z | Bioinformatics IV/Week V/SpectralDictionarySize.py | egeulgen/Bioinformatics_Specialization | 38581b471a54c41d780d9eeb26a7033eb57f3a01 | [
"MIT"
] | null | null | null | Bioinformatics IV/Week V/SpectralDictionarySize.py | egeulgen/Bioinformatics_Specialization | 38581b471a54c41d780d9eeb26a7033eb57f3a01 | [
"MIT"
] | null | null | null | import sys
mass_file=open('integer_mass_table.txt')
masses = []
for line in mass_file:
aa, mass = line.rstrip().split(' ')
masses.append(int(mass))
# masses = [4, 5]
def SpectralDictionarySize(spectral_vector, threshold, max_score):
m = len(spectral_vector)
Size = {}
Size[0] = {}
Size[0][0] ... | 27.073171 | 116 | 0.568468 |
b452364e4b3ee85f2c0ca5ac584c78ec15061743 | 299 | py | Python | app/capacity.py | hs14/optimize_schedule_ga | a2a6ed0d6f208c86a39f03f0236a7cc51328b857 | [
"MIT"
] | null | null | null | app/capacity.py | hs14/optimize_schedule_ga | a2a6ed0d6f208c86a39f03f0236a7cc51328b857 | [
"MIT"
] | null | null | null | app/capacity.py | hs14/optimize_schedule_ga | a2a6ed0d6f208c86a39f03f0236a7cc51328b857 | [
"MIT"
] | null | null | null | class Capacity(object):
'''
定員の情報
'''
def __init__(self, maximum, minimum=1):
'''
Parameters
----------
maximum : int
最大人数(定員)
minimum : int
最少人数
'''
self.maximum = maximum
self.minimum = minimum | 19.933333 | 43 | 0.434783 |
15709053631f2e1e54ea6499a03116e943f63ff1 | 14,055 | py | Python | nnunet/evaluation/evaluator.py | anxingle/nnUNet_simple | 9c69bc5a005d5305b27d6d214dc16ac25c4ead76 | [
"Apache-2.0"
] | null | null | null | nnunet/evaluation/evaluator.py | anxingle/nnUNet_simple | 9c69bc5a005d5305b27d6d214dc16ac25c4ead76 | [
"Apache-2.0"
] | null | null | null | nnunet/evaluation/evaluator.py | anxingle/nnUNet_simple | 9c69bc5a005d5305b27d6d214dc16ac25c4ead76 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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/lice... | 30.422078 | 120 | 0.712416 |
121b005b045c295fc75938ee936a28a70f984238 | 1,240 | py | Python | tests/external/test_solo.py | jacobkimmel/scVI | 7f06d616ddb6af8b3b0f5ec630f338e4a873e122 | [
"BSD-3-Clause"
] | 1 | 2021-09-08T11:50:25.000Z | 2021-09-08T11:50:25.000Z | tests/external/test_solo.py | RichardVDH/scvi-tools | 2d05e6ea2d9c7387f95748dbea561a972ad33194 | [
"BSD-3-Clause"
] | null | null | null | tests/external/test_solo.py | RichardVDH/scvi-tools | 2d05e6ea2d9c7387f95748dbea561a972ad33194 | [
"BSD-3-Clause"
] | null | null | null | from scvi.data import setup_anndata, synthetic_iid
from scvi.external import SOLO
from scvi.model import SCVI
def test_solo(save_path):
n_latent = 5
adata = synthetic_iid(run_setup_anndata=False)
setup_anndata(adata)
model = SCVI(adata, n_latent=n_latent)
model.train(1, check_val_every_n_epoch=1, ... | 33.513514 | 67 | 0.733871 |
c4eeed83686433c7061f2586193c524dd68ee29b | 7,562 | py | Python | py/desispec/fiberflat_vs_humidity.py | echaussidon/desispec | 8a8bd59653861509dd630ffc8e1cd6c67f6cdd51 | [
"BSD-3-Clause"
] | null | null | null | py/desispec/fiberflat_vs_humidity.py | echaussidon/desispec | 8a8bd59653861509dd630ffc8e1cd6c67f6cdd51 | [
"BSD-3-Clause"
] | null | null | null | py/desispec/fiberflat_vs_humidity.py | echaussidon/desispec | 8a8bd59653861509dd630ffc8e1cd6c67f6cdd51 | [
"BSD-3-Clause"
] | null | null | null | """
desispec.fiberflat_vs_humidity
==================
Utility functions to compute a fiber flat corrected for variations with humidity in the shack
"""
from __future__ import absolute_import, division
import numpy as np
import copy
from desiutil.log import get_logger
from desispec.fiberflat import apply_fiberflat
f... | 41.779006 | 157 | 0.697964 |
854359e090fbe54c317469d6b0c135918da513d0 | 30,868 | py | Python | src/run_classifier.py | iki-taichi/bert-japanese | a4f170577a63bff8eb9899076dd587599f277150 | [
"Apache-2.0"
] | 1 | 2019-04-07T07:37:43.000Z | 2019-04-07T07:37:43.000Z | src/run_classifier.py | iki-taichi/bert-japanese | a4f170577a63bff8eb9899076dd587599f277150 | [
"Apache-2.0"
] | null | null | null | src/run_classifier.py | iki-taichi/bert-japanese | a4f170577a63bff8eb9899076dd587599f277150 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# This file is based on https://github.com/google-research/bert/blob/master/run_classifier.py.
# It is changed to use SentencePiece tokenizer and https://www.rondhuit.com/download/ldcc-20140209.tar.gz.
"""BERT finetuning runner."""
from __future__ import absolute_import
from __future__ import division
f... | 35.97669 | 143 | 0.688253 |
9ef652da234338c9f04234097652c242f540401e | 680 | py | Python | main.py | wd0/hq-intel | 53a3aeba91f7a5eac0729ca1502b1d593cf1f8b4 | [
"MIT"
] | null | null | null | main.py | wd0/hq-intel | 53a3aeba91f7a5eac0729ca1502b1d593cf1f8b4 | [
"MIT"
] | null | null | null | main.py | wd0/hq-intel | 53a3aeba91f7a5eac0729ca1502b1d593cf1f8b4 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from intel import *
QUIZ_DELAY = 35 # Seconds to wait for the next HQ question to happen.
SEARCH_DELAY = 0.5 # Seconds until we search SCREENSHOT_PATH for more files.
SCREENSHOT_PATH = '/home/mike/hq-intel/shots' # Pathname where screenshots appear.
def main():
os.chdir(SCREENSHOT_PATH)
se... | 27.2 | 82 | 0.607353 |
cd009e128d5097e9ebc89b35035ff8caf010dba6 | 1,230 | py | Python | frappe_metrc/frappe_metrc/doctype/room/room.py | samjaninf/frappe_metrc | a1968c14199421017e0f45b2497960223e598abf | [
"MIT"
] | null | null | null | frappe_metrc/frappe_metrc/doctype/room/room.py | samjaninf/frappe_metrc | a1968c14199421017e0f45b2497960223e598abf | [
"MIT"
] | null | null | null | frappe_metrc/frappe_metrc/doctype/room/room.py | samjaninf/frappe_metrc | a1968c14199421017e0f45b2497960223e598abf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Neil Lasrado and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import requests
from frappe.model.document import Document
from frappe_metrc.utils import get_metrc
metrc = get_metrc("room")
class Room... | 23.653846 | 62 | 0.689431 |
08804f971cc4d60b2275a6105d3a1e39d6f97430 | 1,768 | py | Python | audiomentations/augmentations/high_pass_filter.py | Cangonin/audiomentations | fd1c0fd9bcfb9f62fa961938191e13d050752450 | [
"MIT"
] | null | null | null | audiomentations/augmentations/high_pass_filter.py | Cangonin/audiomentations | fd1c0fd9bcfb9f62fa961938191e13d050752450 | [
"MIT"
] | null | null | null | audiomentations/augmentations/high_pass_filter.py | Cangonin/audiomentations | fd1c0fd9bcfb9f62fa961938191e13d050752450 | [
"MIT"
] | null | null | null | from audiomentations.augmentations.base_butterword_filter import BaseButterworthFilter
class HighPassFilter(BaseButterworthFilter):
"""
Apply high-pass filtering to the input audio of parametrized filter steepness (6/12/18... dB / octave).
Can also be set for zero-phase filtering (will result in a 6db dro... | 38.434783 | 107 | 0.636312 |
1922b44bbe5d8d354f3fcb44e3a42a66e7d5e979 | 3,936 | py | Python | python/apps/exercise_renderer.py | jessepinnell/buph | 66e3ce670ee6ff360368fa677f3bd833fbf1f05f | [
"MIT"
] | null | null | null | python/apps/exercise_renderer.py | jessepinnell/buph | 66e3ce670ee6ff360368fa677f3bd833fbf1f05f | [
"MIT"
] | 2 | 2017-11-10T15:11:20.000Z | 2017-12-10T14:02:03.000Z | python/apps/exercise_renderer.py | jessepinnell/xrsrv | 66e3ce670ee6ff360368fa677f3bd833fbf1f05f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# Copyright (c) 2017 Jesse Pinnell
# 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... | 41.87234 | 104 | 0.736026 |
a911a9febe7b833b0faa8e3fc79d332fc594d90b | 87,900 | py | Python | sympy/polys/subresultants_qq_zz.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | sympy/polys/subresultants_qq_zz.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | sympy/polys/subresultants_qq_zz.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | """
This module contains functions for the computation
of Euclidean, (generalized) Sturmian, (modified) subresultant
polynomial remainder sequences (prs's) of two polynomials;
included are also three functions for the computation of the
resultant of two polynomials.
Except for the function res_z(), which computes the ... | 34.484111 | 93 | 0.592912 |
f49fdd082669444d021d7e83c1b3aa2abdda7d99 | 8,189 | py | Python | paasta_tools/paastaapi/model/instance_bounce_status.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 1,711 | 2015-11-10T18:04:56.000Z | 2022-03-23T08:53:16.000Z | paasta_tools/paastaapi/model/instance_bounce_status.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 1,689 | 2015-11-10T17:59:04.000Z | 2022-03-31T20:46:46.000Z | paasta_tools/paastaapi/model/instance_bounce_status.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 267 | 2015-11-10T19:17:16.000Z | 2022-02-08T20:59:52.000Z | # coding: utf-8
"""
Paasta API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
impor... | 41.358586 | 166 | 0.585664 |
89f55b907ee67dc13469b8adda756499498135d5 | 1,387 | py | Python | examples/predict_SNe_BAO.py | Guo-Jian-Wang/ecopann | 934108d22e4d5ba9489fcfe1d3cc82f7e847b42b | [
"MIT"
] | 13 | 2020-05-15T02:23:21.000Z | 2021-09-01T01:22:49.000Z | examples/predict_SNe_BAO.py | Guo-Jian-Wang/ecopann | 934108d22e4d5ba9489fcfe1d3cc82f7e847b42b | [
"MIT"
] | null | null | null | examples/predict_SNe_BAO.py | Guo-Jian-Wang/ecopann | 934108d22e4d5ba9489fcfe1d3cc82f7e847b42b | [
"MIT"
] | 2 | 2020-11-30T15:18:14.000Z | 2021-03-11T07:59:35.000Z | # -*- coding: utf-8 -*-
import sys
sys.path.append('..')
import ecopann.ann as ann
import ecopann.coplot.plot_contours as plc
import ecopann.cosmic_params as cosmic_params
import simulator
import matplotlib.pyplot as plt
import numpy as np
#%% observational data
fid_params = [-1, 0.3]
sim_mu = simulator.sim_SNe(fid... | 26.673077 | 98 | 0.69863 |
bc95804f44f4fc89e280031961d2529ac018964c | 1,841 | py | Python | shop/migrations/0001_initial.py | javierpinya/myshop | 7a8f9cce40ffb980d80b74d4d461bbb5c1b49a52 | [
"MIT"
] | null | null | null | shop/migrations/0001_initial.py | javierpinya/myshop | 7a8f9cce40ffb980d80b74d4d461bbb5c1b49a52 | [
"MIT"
] | null | null | null | shop/migrations/0001_initial.py | javierpinya/myshop | 7a8f9cce40ffb980d80b74d4d461bbb5c1b49a52 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-25 08:14
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... | 38.354167 | 138 | 0.548072 |
9a6c06cce0d7fc389e1187af430919724412e81d | 161 | py | Python | bracket/info.py | bracketing/bracket | a4f8927a2ba4bc06e29bbba1b0ae2249d33fb0c4 | [
"MIT"
] | null | null | null | bracket/info.py | bracketing/bracket | a4f8927a2ba4bc06e29bbba1b0ae2249d33fb0c4 | [
"MIT"
] | null | null | null | bracket/info.py | bracketing/bracket | a4f8927a2ba4bc06e29bbba1b0ae2249d33fb0c4 | [
"MIT"
] | 1 | 2020-12-30T11:25:57.000Z | 2020-12-30T11:25:57.000Z | # Package Version (https://github.com/bracketing/bracket/releases/)
__version__ = "0.1.2"
# Update Log (https://github.com/bracketing/bracket/tags)
logs = []
| 20.125 | 67 | 0.714286 |
0991fe871c7deef569d4599d5f1fa095061f0fbf | 8,011 | py | Python | Views/EditVAS_ui.py | acadianshadow237/BA_MDI1 | 73e0e87c15ff083ce860f7a09fa2de3a3c71c215 | [
"MIT"
] | null | null | null | Views/EditVAS_ui.py | acadianshadow237/BA_MDI1 | 73e0e87c15ff083ce860f7a09fa2de3a3c71c215 | [
"MIT"
] | null | null | null | Views/EditVAS_ui.py | acadianshadow237/BA_MDI1 | 73e0e87c15ff083ce860f7a09fa2de3a3c71c215 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'EditVAS_ui.ui'
##
## Created by: Qt User Interface Compiler version 6.1.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################... | 40.872449 | 123 | 0.707652 |
f6943f29c5aa2c04aba14839165bc4bc38d8bbeb | 23,268 | py | Python | src/python/utilities/PDFTree.py | plewis/phycas | 9f5a4d9b2342dab907d14a46eb91f92ad80a5605 | [
"MIT"
] | 3 | 2015-09-24T23:12:57.000Z | 2021-04-12T07:07:01.000Z | src/python/utilities/PDFTree.py | plewis/phycas | 9f5a4d9b2342dab907d14a46eb91f92ad80a5605 | [
"MIT"
] | null | null | null | src/python/utilities/PDFTree.py | plewis/phycas | 9f5a4d9b2342dab907d14a46eb91f92ad80a5605 | [
"MIT"
] | 1 | 2015-11-23T10:35:43.000Z | 2015-11-23T10:35:43.000Z | import math, types
from phycas.pdfgen import *
from phycas.utilities.CommonFunctions import CommonFunctions
from phycas.utilities.GlobalState import readFile
from phycas.phylogeny import Tree
class PDFTree(CommonFunctions):
def __init__(self):
CommonFunctions.__init__(self, None)
self.pdf_... | 57.029412 | 214 | 0.589393 |
a3adae1efbc2afc4d9426308678f385d764bedec | 1,809 | py | Python | .ipynb_checkpoints/create_tables-checkpoint.py | samson-arita/postgres-data-modeling | 8c73fdf3973e3ad05a37333243076d80b5f796a9 | [
"MIT"
] | null | null | null | .ipynb_checkpoints/create_tables-checkpoint.py | samson-arita/postgres-data-modeling | 8c73fdf3973e3ad05a37333243076d80b5f796a9 | [
"MIT"
] | null | null | null | .ipynb_checkpoints/create_tables-checkpoint.py | samson-arita/postgres-data-modeling | 8c73fdf3973e3ad05a37333243076d80b5f796a9 | [
"MIT"
] | null | null | null | import psycopg2
from sql_queries import create_table_queries, drop_table_queries
def create_database():
"""
- Creates and connects to the sparkifydb
- Returns the connection and cursor to sparkifydb
"""
# connect to default database
conn = psycopg2.connect("host=127.0.0.1 dbname=studentdb... | 24.12 | 93 | 0.656164 |
c49e1f3b41f0e15e50714a19caaad04614490d6e | 389 | py | Python | backend/naki/naki/view/spec.py | iimcz/emod | 432094c020247597a94e95f76cc524c20b68b685 | [
"MIT"
] | null | null | null | backend/naki/naki/view/spec.py | iimcz/emod | 432094c020247597a94e95f76cc524c20b68b685 | [
"MIT"
] | 6 | 2021-03-08T23:32:15.000Z | 2022-02-26T08:11:38.000Z | backend/naki/naki/view/spec.py | iimcz/emod | 432094c020247597a94e95f76cc524c20b68b685 | [
"MIT"
] | null | null | null | from cornice import Service
from cornice.service import get_services
from cornice_swagger import CorniceSwagger
swagger = Service(name='OpenAPI',
path='/api/v1/spec',
description="OpenAPI documentation")
@swagger.get()
def openAPI_spec(request):
doc = CorniceSwagger(get_servi... | 25.933333 | 54 | 0.686375 |
a249432f26c10055223e9fcd75027e9153f2c137 | 160 | py | Python | Examples/get_sldies_slide_image.py | rizwanniazigroupdocs/aspose-slides-cloud-python | f692a7082387350f80f0b389c1914e33b800a76f | [
"MIT"
] | null | null | null | Examples/get_sldies_slide_image.py | rizwanniazigroupdocs/aspose-slides-cloud-python | f692a7082387350f80f0b389c1914e33b800a76f | [
"MIT"
] | null | null | null | Examples/get_sldies_slide_image.py | rizwanniazigroupdocs/aspose-slides-cloud-python | f692a7082387350f80f0b389c1914e33b800a76f | [
"MIT"
] | null | null | null | from slides_configuration import *
request=GetSlidesSlideImagesRequest("test.pptx", 1)
response = images_api.get_slides_slide_images(request)
print(response) | 22.857143 | 54 | 0.8375 |
b901fb85c07de737692a220c490079dd5238a866 | 5,340 | py | Python | data/scripts/hardcoreFastCommands.py | starpirate2203/BROODY-S-LAST-SCRIPT | 7b5a9eab02c782ebf39b0f3edf69536fae8289c6 | [
"MIT"
] | 2 | 2021-09-07T16:04:30.000Z | 2021-09-16T03:30:16.000Z | data/scripts/hardcoreFastCommands.py | starpirate2203/BROODY-S-LAST-SCRIPT | 7b5a9eab02c782ebf39b0f3edf69536fae8289c6 | [
"MIT"
] | null | null | null | data/scripts/hardcoreFastCommands.py | starpirate2203/BROODY-S-LAST-SCRIPT | 7b5a9eab02c782ebf39b0f3edf69536fae8289c6 | [
"MIT"
] | 1 | 2021-09-21T12:42:28.000Z | 2021-09-21T12:42:28.000Z | # -*- coding: utf-8 -*-
import bs
import bsUI
import bsInternal
# writed by drov.drov
gPopupWindowColor = (0.45, 0.4, 0.55)
commands = ['/kick','/ban','/frozen','/flex', \
'/dance','/dance2','/admin','/vip','/df','/rise','/curse','/head','/skin']
skins = ['delete', 'bunny','bear','pixie','santa','tnt',\
'sh... | 45.641026 | 127 | 0.640824 |
dbab8b16798c266427fd1a3ab798cc4d15b67979 | 11,305 | py | Python | classy/pl_modules/hf/generation.py | sunglasses-ai/classy | c166490a30d8ba6d7c25f70ce707b7a2ddcfb53f | [
"Apache-2.0"
] | 26 | 2021-10-17T08:32:53.000Z | 2022-03-30T10:57:13.000Z | classy/pl_modules/hf/generation.py | sunglasses-ai/classy | c166490a30d8ba6d7c25f70ce707b7a2ddcfb53f | [
"Apache-2.0"
] | 8 | 2021-11-02T20:57:44.000Z | 2022-03-13T09:42:29.000Z | classy/pl_modules/hf/generation.py | sunglasses-ai/classy | c166490a30d8ba6d7c25f70ce707b7a2ddcfb53f | [
"Apache-2.0"
] | null | null | null | import re
from typing import Dict, Iterator, List, Optional, Tuple
import omegaconf
import torch
from omegaconf import OmegaConf
from transformers import AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoTokenizer
from classy.data.data_drivers import GenerationSample
from classy.pl_modules.base import ClassificationOu... | 37.065574 | 88 | 0.648651 |
6deb71aea645154f8b7cc5e053bc1572dc2e1b89 | 152 | py | Python | enseignant/admin.py | sandratraJovanie/torolalagna | 5984b2ef0ff1537ae7ce2385306783ae7a1c15e0 | [
"Apache-2.0"
] | null | null | null | enseignant/admin.py | sandratraJovanie/torolalagna | 5984b2ef0ff1537ae7ce2385306783ae7a1c15e0 | [
"Apache-2.0"
] | null | null | null | enseignant/admin.py | sandratraJovanie/torolalagna | 5984b2ef0ff1537ae7ce2385306783ae7a1c15e0 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import *
admin.site.register(enseignants)
admin.site.register(responsables)
admin.site.register(suivis)
| 19 | 33 | 0.815789 |
76fbcdba11e112a2fa091f8718af4a77aa5afd4c | 158,199 | py | Python | salt/config/__init__.py | guoxiaod/salt | 2cd6c03b40932be137e6e8a672967b59025a2d34 | [
"Apache-2.0"
] | null | null | null | salt/config/__init__.py | guoxiaod/salt | 2cd6c03b40932be137e6e8a672967b59025a2d34 | [
"Apache-2.0"
] | null | null | null | salt/config/__init__.py | guoxiaod/salt | 2cd6c03b40932be137e6e8a672967b59025a2d34 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
All salt configuration loading and defaults should be in this module
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals, generators
import os
import re
import sys
import glob
import time
import codecs
import logging
import types
from copy impor... | 37.44355 | 130 | 0.632166 |
fb910efa52bb28c5873820f5eadad5e007efc280 | 661 | py | Python | utils/routers/__init__.py | HeroCTF/ctfd-whale | 4885675b539fbe5630c6cfb0aa3b12177f897a60 | [
"MIT"
] | null | null | null | utils/routers/__init__.py | HeroCTF/ctfd-whale | 4885675b539fbe5630c6cfb0aa3b12177f897a60 | [
"MIT"
] | null | null | null | utils/routers/__init__.py | HeroCTF/ctfd-whale | 4885675b539fbe5630c6cfb0aa3b12177f897a60 | [
"MIT"
] | null | null | null | from CTFd.utils import get_config
from .frp import FrpRouter
from .trp import TrpRouter
_routers = {
"frp": FrpRouter,
"trp": TrpRouter,
}
def instanciate(cls):
return cls()
@instanciate
class Router:
_name = ""
_router = None
def __getattr__(self, name: str):
router_conftype = ge... | 18.885714 | 64 | 0.633888 |
6da7b1d1d1227b47eacfa58655ae06c939bd099d | 1,406 | py | Python | handler/AbsenteesAdminHandler.py | Videl/absentees-blackboard | 35658c14253340c34ef7dac98322306c7c555df1 | [
"MIT"
] | null | null | null | handler/AbsenteesAdminHandler.py | Videl/absentees-blackboard | 35658c14253340c34ef7dac98322306c7c555df1 | [
"MIT"
] | null | null | null | handler/AbsenteesAdminHandler.py | Videl/absentees-blackboard | 35658c14253340c34ef7dac98322306c7c555df1 | [
"MIT"
] | null | null | null | __author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
from model.Absentees import *
class AbsenteesAdminHandler(BaseHandler):
def __init__(self, request=None, response=None):
super(AbsenteesAdminHandler, self).__init__()
self.initialize(request, response)
... | 41.352941 | 107 | 0.657895 |
d1aad3ccc3909d316a723c7c6daf1e807b524b34 | 1,540 | py | Python | typewise_alert.py | clean-code-craft-tcq-2/coverage-in-py-Venkatesha-Iyengar | 2d5aab207653139af4e791d42f841d91651ccc37 | [
"MIT"
] | null | null | null | typewise_alert.py | clean-code-craft-tcq-2/coverage-in-py-Venkatesha-Iyengar | 2d5aab207653139af4e791d42f841d91651ccc37 | [
"MIT"
] | null | null | null | typewise_alert.py | clean-code-craft-tcq-2/coverage-in-py-Venkatesha-Iyengar | 2d5aab207653139af4e791d42f841d91651ccc37 | [
"MIT"
] | null | null | null | coolingTypes ={
'PASSIVE_COOLING' : [0, 35],
'HI_ACTIVE_COOLING' : [0, 45],
'MED_ACTIVE_COOLING' : [0, 40],
}
email_content = {
'TOO_LOW' : 'Hi, the temperature is too low',
'TOO_HIGH' : 'Hi, the temperature is too high',
}
def infer_breach(value, lowerLimit, upperLimit):
if value < lowe... | 30.196078 | 86 | 0.731169 |
803451d45d927f4796156572418b6cc7b9046c32 | 9,686 | py | Python | components/auto_annotation.py | masc-it/CVLAB | 9c6e25a800b532a440c660e10ea001c699da68f1 | [
"MIT"
] | null | null | null | components/auto_annotation.py | masc-it/CVLAB | 9c6e25a800b532a440c660e10ea001c699da68f1 | [
"MIT"
] | null | null | null | components/auto_annotation.py | masc-it/CVLAB | 9c6e25a800b532a440c660e10ea001c699da68f1 | [
"MIT"
] | null | null | null | from .data import *
import imgui
from .projects import Project
from yolov5 import detect
import os
import threading
from . import annotation
from .file_selector import file_selector
from custom_utils import save_img_annotations
def start_inference(frame_data, exp: Experiment):
predictions = detect.run(weight... | 40.190871 | 198 | 0.591472 |
4429a246e84e56a0e1d10afb43fed87a52cb4a97 | 1,121 | py | Python | tests/api/test_cargo_event_entity.py | V0RT3X4/python-sdk | 4cffae83b90a58a56f1a534057fa1ca1c8671e05 | [
"Apache-2.0"
] | 9 | 2019-11-13T17:14:55.000Z | 2019-11-18T16:06:13.000Z | tests/api/test_cargo_event_entity.py | VorTECHsa/python-sdk | d85aabd8d9843e4d04d857360492bea002c2b24b | [
"Apache-2.0"
] | 114 | 2020-01-08T11:08:24.000Z | 2022-03-30T16:42:23.000Z | tests/api/test_cargo_event_entity.py | V0RT3X4/python-sdk | 4cffae83b90a58a56f1a534057fa1ca1c8671e05 | [
"Apache-2.0"
] | 6 | 2020-05-28T00:09:02.000Z | 2022-03-14T03:52:44.000Z | from unittest import TestCase
import jsons
from vortexasdk.api.cargo_movement import CargoEvent
from vortexasdk.api.geography import GeographyEntity
class TestCargoEventEntity(TestCase):
def test_serialize(self):
with open("tests/api/examples/cargo_event_entity1.json", "r") as f:
serialized ... | 33.969697 | 94 | 0.557538 |
1da179f81752546f4f5510f24199b39b4efa6c54 | 5,436 | py | Python | clarifai/client/mime_util.py | camielv/conscious-bugs | 75ad8b3a64d7cd1df3deac6b18f5b535cf2d2704 | [
"BSD-3-Clause"
] | null | null | null | clarifai/client/mime_util.py | camielv/conscious-bugs | 75ad8b3a64d7cd1df3deac6b18f5b535cf2d2704 | [
"BSD-3-Clause"
] | null | null | null | clarifai/client/mime_util.py | camielv/conscious-bugs | 75ad8b3a64d7cd1df3deac6b18f5b535cf2d2704 | [
"BSD-3-Clause"
] | 1 | 2019-09-05T10:56:43.000Z | 2019-09-05T10:56:43.000Z | import sys
import urllib
from email.encoders import encode_noop
from email.message import Message
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
from uuid import uuid4
if sys.version_info >= (3,0):
import urllib.request as urllib2
from urllib.parse import urlparse... | 33.146341 | 119 | 0.706034 |
a76e69af9d605017892b61ba8b3f82d97ff4ae85 | 2,541 | py | Python | src/dataset/get_songs.py | alexameen/artist-lyric-gen | 0372ec2e9f06783f7eca3490e4199c2fe4fc3044 | [
"MIT"
] | null | null | null | src/dataset/get_songs.py | alexameen/artist-lyric-gen | 0372ec2e9f06783f7eca3490e4199c2fe4fc3044 | [
"MIT"
] | null | null | null | src/dataset/get_songs.py | alexameen/artist-lyric-gen | 0372ec2e9f06783f7eca3490e4199c2fe4fc3044 | [
"MIT"
] | 1 | 2021-01-01T07:38:59.000Z | 2021-01-01T07:38:59.000Z | import argparse
import lyricsgenius
import pandas as pd
import time
import sys
from dataset_utils import loop_and_process, name_to_file_name, read_list_from_file
from genius import GENIUS_ACCESS_TOKEN
raw_songs_dir = 'RAW_SONGS_DONT_DELETE'
artist_song_split_token = ' | '
artist_lyric_dir = 'raw_artist_lyrics'
def i... | 36.3 | 177 | 0.573003 |
7d469c9c6b2178642940433433e6e5aa80e18372 | 1,049 | py | Python | examples/new_framework_test.py | abs428/mltrace | 750b4d69e4a665a3d85ceeff61a1b6c0614feb77 | [
"Apache-2.0"
] | 328 | 2021-04-26T17:22:12.000Z | 2022-03-30T08:52:33.000Z | examples/new_framework_test.py | abs428/mltrace | 750b4d69e4a665a3d85ceeff61a1b6c0614feb77 | [
"Apache-2.0"
] | 94 | 2021-04-14T19:39:51.000Z | 2022-03-26T00:43:46.000Z | examples/new_framework_test.py | abs428/mltrace | 750b4d69e4a665a3d85ceeff61a1b6c0614feb77 | [
"Apache-2.0"
] | 20 | 2021-05-10T15:24:27.000Z | 2022-03-30T00:14:27.000Z | """
examples/newFrameworkTest.py
This file contains one component, a function to increment
a number, and runs that component 10 times. The output of
the ith component run is the input to the (i+1)th component
run. Thus if you trace the last output in the UI, you should
see that it depends on 9 things.
"""
from exampl... | 24.395349 | 79 | 0.696854 |
e1a4119c728ba16b6a1af52d892680ef56171dfb | 24,402 | py | Python | resolwe/flow/models/utils.py | JureZmrzlikar/resolwe | 2c967b5fa06b6b7daeee88b3fca4cd19d10d99c3 | [
"Apache-2.0"
] | null | null | null | resolwe/flow/models/utils.py | JureZmrzlikar/resolwe | 2c967b5fa06b6b7daeee88b3fca4cd19d10d99c3 | [
"Apache-2.0"
] | null | null | null | resolwe/flow/models/utils.py | JureZmrzlikar/resolwe | 2c967b5fa06b6b7daeee88b3fca4cd19d10d99c3 | [
"Apache-2.0"
] | null | null | null | """Resolwe models utils."""
import copy
import json
import os
import re
import jsonschema
from django.contrib.staticfiles import finders
from django.core.exceptions import ValidationError
from resolwe.flow.utils import dict_dot, iterate_dict, iterate_fields, iterate_schema
class DirtyError(ValidationError):
""... | 36.3125 | 100 | 0.568765 |
9573d3bff5e51d8cc62b349dccb2e08f78632c56 | 1,130 | py | Python | .sample_configs/param_handlers/import_data_video_action_recognition_sample.py | dizcology/python-aiplatform | 1a135775966c8a2303ded529eba514dcf9db7205 | [
"Apache-2.0"
] | 180 | 2020-09-23T17:21:15.000Z | 2022-03-30T17:25:47.000Z | .sample_configs/param_handlers/import_data_video_action_recognition_sample.py | pompipo/python-aiplatform | 3612b05c62dfb46822cd2c1798fd47349dba33bc | [
"Apache-2.0"
] | 601 | 2020-09-23T16:23:44.000Z | 2022-03-31T19:08:23.000Z | .sample_configs/param_handlers/import_data_video_action_recognition_sample.py | pompipo/python-aiplatform | 3612b05c62dfb46822cd2c1798fd47349dba33bc | [
"Apache-2.0"
] | 109 | 2020-09-23T16:22:04.000Z | 2022-03-28T21:18:29.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33.235294 | 134 | 0.730088 |
e9683638a75eb7aca317b12802d49349b458e8a5 | 1,218 | bzl | Python | haiku/_src/build_defs.bzl | qsays/dm-haiku | 5f4a4011d666f6bdb8266797c26cc7daa1684bb4 | [
"Apache-2.0"
] | 7 | 2020-03-01T11:47:50.000Z | 2020-07-30T08:35:23.000Z | haiku/_src/build_defs.bzl | marload/dm-haiku | 8190b42cc6d9e7fae21c7d738bd3d719c144ab8a | [
"Apache-2.0"
] | null | null | null | haiku/_src/build_defs.bzl | marload/dm-haiku | 8190b42cc6d9e7fae21c7d738bd3d719c144ab8a | [
"Apache-2.0"
] | null | null | null | """Haiku specific build rules."""
def hk_py_library(name, **kwargs):
"""Proxy for py_library.
Internally we override this to enable type checking via PyType (more
information at https://github.com/google/pytype).
Args:
name: library name.
**kwargs: keyword args passed straight to py_l... | 27.066667 | 72 | 0.578818 |
fcdaab15e25c39e8dc9c5ca0f0d6ce2659318260 | 9,820 | py | Python | Toolbox/Reservoir_system_simulation/Res_sys_sim.py | AndresPenuela/MHA-Workshop | 69ce4cedc1396e8ee57ccde3b2eea194c58599ea | [
"MIT"
] | 1 | 2021-05-25T13:12:09.000Z | 2021-05-25T13:12:09.000Z | Toolbox/Reservoir_system_simulation/Res_sys_sim.py | AndresPenuela/MHA-Workshop | 69ce4cedc1396e8ee57ccde3b2eea194c58599ea | [
"MIT"
] | null | null | null | Toolbox/Reservoir_system_simulation/Res_sys_sim.py | AndresPenuela/MHA-Workshop | 69ce4cedc1396e8ee57ccde3b2eea194c58599ea | [
"MIT"
] | 1 | 2020-05-27T01:43:01.000Z | 2020-05-27T01:43:01.000Z | # -*- coding: utf-8 -*-
"""
This function implements the reservoir simulation model (Res_sys_sim). First,
it extracts and process the regulated flows contained in the Qreg variable.
This makes the regulated flow data readable by the mass balance function
(Mass_bal_func). Then, Mass_bal_func links all the key variable... | 48.613861 | 136 | 0.602444 |
3e36aee5fc03462c3c48fa7ded71eaf77f1d7959 | 4,303 | py | Python | tests/unit/awslambda/test_awslambda.py | Yurzs/boto | d739d6c52877699206e69b9901bbe92ea437ba5d | [
"MIT"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | tests/unit/awslambda/test_awslambda.py | Yurzs/boto | d739d6c52877699206e69b9901bbe92ea437ba5d | [
"MIT"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | tests/unit/awslambda/test_awslambda.py | Yurzs/boto | d739d6c52877699206e69b9901bbe92ea437ba5d | [
"MIT"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 t... | 36.466102 | 76 | 0.630723 |
33303243d0c3796bfdf45b0f75b98ce8f57c4f49 | 158 | py | Python | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_Lag1Trend_NoCycle_NoAR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_Lag1Trend_NoCycle_NoAR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_Lag1Trend_NoCycle_NoAR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Integration'] , ['Lag1Trend'] , ['NoCycle'] , ['NoAR'] ); | 39.5 | 80 | 0.746835 |
625aea500a5cd1059b1f7afba8de05909bd0eb98 | 2,971 | py | Python | Datasets/listdataset.py | doudoulaile/RL-GAN-Net | 9c221223d1878bc24f0f39ad34928c1bb2974ae3 | [
"MIT"
] | 112 | 2019-03-13T00:52:17.000Z | 2022-03-30T07:42:27.000Z | Datasets/listdataset.py | ANABUR920/RL-GAN-Net | 9c221223d1878bc24f0f39ad34928c1bb2974ae3 | [
"MIT"
] | 20 | 2019-04-25T02:31:41.000Z | 2022-03-11T23:52:06.000Z | Datasets/listdataset.py | ANABUR920/RL-GAN-Net | 9c221223d1878bc24f0f39ad34928c1bb2974ae3 | [
"MIT"
] | 37 | 2019-04-10T05:18:35.000Z | 2022-03-31T02:51:28.000Z | import torch.utils.data as data
import os
import os.path
#from plyfile import PlyData, PlyElement
from Datasets.plyfile.plyfile import PlyData
import numpy as np
#import main import args as args
def load_ply(dir,file_name, with_faces=False, with_color=False):
path = os.path.join(dir,file_name)
ply_data = PlyDa... | 31.946237 | 179 | 0.621003 |
59a018e214d4067e9af8eaf656d4771f6a41c780 | 2,422 | py | Python | assets/ckeditor/dev/samplesvalidator/samplesvalidator.py | mirwansyahs/siabanks | 3ad789291587639fea875fd59297b67cb6a04cfd | [
"MIT"
] | 2 | 2021-04-09T14:59:45.000Z | 2021-04-18T07:27:07.000Z | assets/ckeditor/dev/samplesvalidator/samplesvalidator.py | mirwansyahs/siabanks | 3ad789291587639fea875fd59297b67cb6a04cfd | [
"MIT"
] | null | null | null | assets/ckeditor/dev/samplesvalidator/samplesvalidator.py | mirwansyahs/siabanks | 3ad789291587639fea875fd59297b67cb6a04cfd | [
"MIT"
] | null | null | null | # Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
# For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
# Validates HTML files in a directory with W3C validator.
# To use this script simply call:
# python samplesvalidator.py
#
# By default this script validates ... | 30.658228 | 100 | 0.70768 |
e220de8c61333f25e54d5c3ff2dd63240afc5e7f | 30,279 | py | Python | pyscf/pbc/scf/khf.py | gkclab/pyscf | 2bbf2c11ca51986307331194192574f454fbf7c0 | [
"Apache-2.0"
] | null | null | null | pyscf/pbc/scf/khf.py | gkclab/pyscf | 2bbf2c11ca51986307331194192574f454fbf7c0 | [
"Apache-2.0"
] | 36 | 2018-08-22T19:44:03.000Z | 2020-05-09T10:02:36.000Z | pyscf/pbc/scf/khf.py | gkclab/pyscf | 2bbf2c11ca51986307331194192574f454fbf7c0 | [
"Apache-2.0"
] | 4 | 2018-02-14T16:28:28.000Z | 2019-08-12T16:40:30.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 37.613665 | 94 | 0.611546 |
9473c0d4e0626cef58c23574f68559a6077d3f78 | 9,637 | py | Python | official/nlp/tasks/electra_task.py | mcasanova1445/models | 37be0fdb4abccca633bb3199a4e6f3f71cd174d9 | [
"Apache-2.0"
] | 1 | 2022-02-02T06:29:41.000Z | 2022-02-02T06:29:41.000Z | official/nlp/tasks/electra_task.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 8 | 2020-05-19T00:52:30.000Z | 2020-06-04T23:57:20.000Z | official/nlp/tasks/electra_task.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 2 | 2021-10-07T04:47:04.000Z | 2021-12-18T04:18:19.000Z | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.658436 | 80 | 0.713604 |
cf13c5a94f76a73897e661bdc37bafaacaa93c20 | 7,860 | py | Python | tools/refactor/parsetab_re.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | 1 | 2015-05-22T14:11:17.000Z | 2015-05-22T14:11:17.000Z | tools/extjs_cc/parsetab_re.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | 2 | 2021-09-02T20:01:35.000Z | 2022-01-26T19:47:35.000Z | tools/refactor/parsetab_re.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | null | null | null |
# parsetab_re.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'BACKSLASH DIVIDE ID_PART LSBRACKET LT RSBRACKET STAR UCHARre_lit : DIVIDE re_body DIVIDE re_flagsre_body : re_first_char re_charsre_chars : re_chars re_char\n ... | 115.588235 | 1,890 | 0.659924 |
75da412ab7219dc94452ea5dc1ceb909643e5635 | 45,171 | py | Python | venv/Lib/site-packages/google/protobuf/descriptor_pool.py | parthpankajtiwary/keras-groundup | 0df0844e7d9dca741fad0965761a12f72ee51f07 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/google/protobuf/descriptor_pool.py | parthpankajtiwary/keras-groundup | 0df0844e7d9dca741fad0965761a12f72ee51f07 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/google/protobuf/descriptor_pool.py | parthpankajtiwary/keras-groundup | 0df0844e7d9dca741fad0965761a12f72ee51f07 | [
"MIT"
] | null | null | null | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | 37.486307 | 87 | 0.677625 |
2bd55bab11baf95abbb8379c7b0ffa7c65ce302f | 7,601 | py | Python | server/glusterfsd.py | MatteoManzoni/kadalu | b875972b9b3309930b1cdd805d0b9f966b6daf16 | [
"Apache-2.0"
] | 452 | 2019-03-12T06:40:12.000Z | 2022-03-27T06:36:09.000Z | server/glusterfsd.py | MatteoManzoni/kadalu | b875972b9b3309930b1cdd805d0b9f966b6daf16 | [
"Apache-2.0"
] | 569 | 2019-03-10T06:02:15.000Z | 2022-03-31T20:43:36.000Z | server/glusterfsd.py | MatteoManzoni/kadalu | b875972b9b3309930b1cdd805d0b9f966b6daf16 | [
"Apache-2.0"
] | 102 | 2019-03-11T05:05:28.000Z | 2022-02-27T23:00:14.000Z | """
Starts Gluster Brick(fsd) process
"""
import logging
import os
import sys
import uuid
import xattr
from jinja2 import Template
from kadalulib import (CommandException, Proc, execute, logf,
send_analytics_tracker)
# noqa # pylint: disable=I1101
VOLUME_ID_XATTR_NAME = "trusted.glusterfs.volu... | 32.904762 | 82 | 0.566636 |
23052ffbae80e2203c3b6659490059ca5d6cd184 | 1,218 | py | Python | examples/injectable_mocking_for_tests/injectable_mocking_example.py | mt3o/injectable | 0ffc5c758b63d9391134cd822158e1846999b404 | [
"MIT"
] | null | null | null | examples/injectable_mocking_for_tests/injectable_mocking_example.py | mt3o/injectable | 0ffc5c758b63d9391134cd822158e1846999b404 | [
"MIT"
] | null | null | null | examples/injectable_mocking_for_tests/injectable_mocking_example.py | mt3o/injectable | 0ffc5c758b63d9391134cd822158e1846999b404 | [
"MIT"
] | null | null | null | """
This is an example of how one can use the testing utility functions
:meth:`clear_injectables <injectable.testing.clear_injectables>` and
:meth:`register_injectables <injectable.testing.register_injectables>` for mocking
a dependency for tests.
"""
# sphinx-start
from unittest.mock import Mock
from examples import ... | 23.882353 | 82 | 0.716749 |
2c5ee4c680422e39bc1b4f05645d8e4538d7cf7f | 108 | py | Python | Lib/site-packages/MySQLdb/release.py | pavanmaganti9/djangoapp | d6210386af89af9dae6397176a26a8fcd588d3b4 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/MySQLdb/release.py | pavanmaganti9/djangoapp | d6210386af89af9dae6397176a26a8fcd588d3b4 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/MySQLdb/release.py | pavanmaganti9/djangoapp | d6210386af89af9dae6397176a26a8fcd588d3b4 | [
"bzip2-1.0.6"
] | null | null | null |
__author__ = "Inada Naoki <songofacandy@gmail.com>"
version_info = (1,4,2,'final',0)
__version__ = "1.4.2"
| 21.6 | 51 | 0.694444 |
b89a65f26215240c5c060be9a1a31bad6d26d23c | 421 | py | Python | aiochrome/exceptions.py | fate0/aiochrome | b3cf41e95184c99fa64973527edd9f2c502b845f | [
"Apache-2.0"
] | 20 | 2017-10-20T10:33:23.000Z | 2021-04-04T22:23:51.000Z | aiochrome/exceptions.py | hnyaoqingping/aiochrome | b3cf41e95184c99fa64973527edd9f2c502b845f | [
"Apache-2.0"
] | 1 | 2017-09-19T12:29:08.000Z | 2017-09-19T12:29:08.000Z | aiochrome/exceptions.py | hnyaoqingping/aiochrome | b3cf41e95184c99fa64973527edd9f2c502b845f | [
"Apache-2.0"
] | 5 | 2018-04-12T21:04:29.000Z | 2021-01-29T12:35:02.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
class AioChromeException(Exception):
pass
class UserAbortException(AioChromeException):
pass
class TabConnectionException(AioChromeException):
pass
class CallMethodException(AioChromeException):
pass
class ... | 15.035714 | 49 | 0.767221 |
f5cb9d7bc36873b7066f22db382764796ef90d54 | 6,989 | py | Python | run.py | GindaChen/LEBench | 502f5c880513ef67e6315a5444f7180ffbbcf291 | [
"Apache-2.0"
] | null | null | null | run.py | GindaChen/LEBench | 502f5c880513ef67e6315a5444f7180ffbbcf291 | [
"Apache-2.0"
] | null | null | null | run.py | GindaChen/LEBench | 502f5c880513ef67e6315a5444f7180ffbbcf291 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import signal
import platform
import sys
from subprocess import check_call, check_output, call
from os.path import join
from datetime import datetime
DEBUG = True
GRUB_CFG_FILE = '/boot/grub/grub.cfg'
GRUB_FILE = '/etc/default/grub'
WORKING_DIR = ''
KERN_IND... | 35.841026 | 126 | 0.619974 |
1b3c128995a785caa5aedb286419ff711992b63f | 104,645 | py | Python | tests/python/unittest/test_sparse_operator.py | feevos/incubator-mxnet | 275378a49a6035fd5bdead4a74ac36b6070295a7 | [
"Apache-2.0"
] | null | null | null | tests/python/unittest/test_sparse_operator.py | feevos/incubator-mxnet | 275378a49a6035fd5bdead4a74ac36b6070295a7 | [
"Apache-2.0"
] | null | null | null | tests/python/unittest/test_sparse_operator.py | feevos/incubator-mxnet | 275378a49a6035fd5bdead4a74ac36b6070295a7 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 48.694742 | 122 | 0.523475 |
f22068c8846c8a3acd2b7b6fab6cf8e2d1534ae7 | 8,054 | py | Python | espnet2/bin/tokenize_text.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 5,053 | 2017-12-13T06:21:41.000Z | 2022-03-31T13:38:29.000Z | espnet2/bin/tokenize_text.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 3,666 | 2017-12-14T05:58:50.000Z | 2022-03-31T22:11:49.000Z | espnet2/bin/tokenize_text.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 1,709 | 2017-12-13T01:02:42.000Z | 2022-03-31T11:57:45.000Z | #!/usr/bin/env python3
import argparse
from collections import Counter
import logging
from pathlib import Path
import sys
from typing import List
from typing import Optional
from typeguard import check_argument_types
from espnet.utils.cli_utils import get_commandline_args
from espnet2.text.build_tokenizer import buil... | 29.610294 | 88 | 0.585672 |
f1794edf1c25a2a49c3a2b9fb8748914902b334e | 479 | py | Python | src/01/amabry_01B.py | AlexMabry/aoc21 | da492f53f93ba960e282b8c664041b76871631ea | [
"Apache-2.0"
] | null | null | null | src/01/amabry_01B.py | AlexMabry/aoc21 | da492f53f93ba960e282b8c664041b76871631ea | [
"Apache-2.0"
] | null | null | null | src/01/amabry_01B.py | AlexMabry/aoc21 | da492f53f93ba960e282b8c664041b76871631ea | [
"Apache-2.0"
] | null | null | null | from aocd import models
from src.utils import parse_data
# create puzzle
puzzle = models.Puzzle(year=2021, day=1)
# format data
input_data = parse_data(puzzle.input_data, is_numbers=True)
data_length = len(input_data)
increased = 0
previous = sum(input_data[0:3])
for index in range(data_length-2):
current = sum... | 19.958333 | 59 | 0.732777 |
58b953889a70bdb0fe67a87be783da489b0721de | 890 | py | Python | Python Fundamentals/Objects and Classes/classes_exam_the_lift.py | bvoytash/Software-University | f2c6940cde093cea7b1c38bd88305206564c9947 | [
"MIT"
] | null | null | null | Python Fundamentals/Objects and Classes/classes_exam_the_lift.py | bvoytash/Software-University | f2c6940cde093cea7b1c38bd88305206564c9947 | [
"MIT"
] | null | null | null | Python Fundamentals/Objects and Classes/classes_exam_the_lift.py | bvoytash/Software-University | f2c6940cde093cea7b1c38bd88305206564c9947 | [
"MIT"
] | null | null | null | tourists = int(input())
wagon_list = [int(el) for el in input().split()]
all_tourists = tourists
for wagon in range(0, len(wagon_list)):
if tourists >= 4:
added_tourist = 4 - wagon_list[wagon]
wagon_list[wagon] = 4
tourists -= added_tourist
elif tourists > 0:
wagon_lis... | 26.969697 | 70 | 0.624719 |
b8ea7e6a77f2ac99150e3be52a55e96104bd8cfd | 1,876 | py | Python | wstest/handler/connection_handler_test.py | PedalController/PedalPiREST | aa9418d44f2f5dbec604753a03bf8a74057c627c | [
"Apache-2.0"
] | null | null | null | wstest/handler/connection_handler_test.py | PedalController/PedalPiREST | aa9418d44f2f5dbec604753a03bf8a74057c627c | [
"Apache-2.0"
] | 42 | 2016-07-04T11:17:54.000Z | 2018-03-18T18:36:09.000Z | wstest/handler/connection_handler_test.py | PedalController/PedalPiREST | aa9418d44f2f5dbec604753a03bf8a74057c627c | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 SrMouraSilva
#
# 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,... | 34.740741 | 74 | 0.720682 |
883d95e226e3b9d64ba94d8bfe390014dcdd8e28 | 1,622 | py | Python | WEEKS/CD_Sata-Structures/general/MAIN_DATA_STRUCTURES/ternary-search-trees.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/general/MAIN_DATA_STRUCTURES/ternary-search-trees.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/general/MAIN_DATA_STRUCTURES/ternary-search-trees.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | class Node(object):
def __init__(self, character):
self.character = character
self.leftNode = None
self.middleNode = None
self.rightNode = None
self.value = 0
class TST(object):
def __init__(self):
self.rootNode = None
def put(self, key, value):
sel... | 23.852941 | 82 | 0.55672 |
f3a23d5d9a964594401dc3e581bd240b2bfb3bea | 11,490 | py | Python | examples/dmri_camino_dti.py | nicholsn/nipype | 6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3 | [
"BSD-3-Clause"
] | null | null | null | examples/dmri_camino_dti.py | nicholsn/nipype | 6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3 | [
"BSD-3-Clause"
] | null | null | null | examples/dmri_camino_dti.py | nicholsn/nipype | 6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
=================
dMRI: Camino, DTI
=================
Introduction
============
This script, camino_dti_tutorial.py, demonstrates the ability to perform basic diffusion analysis
in a Nipype pipeline::
python dmri_camino_dti.py
We perform this analysis using the FSL course data, which c... | 36.018809 | 126 | 0.704091 |
1bc43b6e7c8befa66da9042eb860413e84795a29 | 2,532 | py | Python | egs/iwslt18/st1/local/ctm2segments.py | Syzygianinfern0/espnet | 3ea59a0050e8a6a40138ac2365c258825b02f9cd | [
"Apache-2.0"
] | 5 | 2020-10-26T11:28:04.000Z | 2021-12-17T07:49:11.000Z | egs/iwslt18/st1/local/ctm2segments.py | Syzygianinfern0/espnet | 3ea59a0050e8a6a40138ac2365c258825b02f9cd | [
"Apache-2.0"
] | 1 | 2021-03-05T10:43:49.000Z | 2021-03-05T10:43:49.000Z | egs/iwslt18/st1/local/ctm2segments.py | Syzygianinfern0/espnet | 3ea59a0050e8a6a40138ac2365c258825b02f9cd | [
"Apache-2.0"
] | 2 | 2021-03-05T02:04:18.000Z | 2021-03-05T10:23:03.000Z | #!/usr/bin/env python3
# encoding: utf-8
# Copyright 2018 Kyoto University (Hirofumi Inaguma)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
from __future__ import division
import argparse
import codecs
import re
def main():
parser = argparse.ArgumentParser()
parser.add_argument("text", type=s... | 28.772727 | 86 | 0.505134 |
ca8676825fc90bd923486225d1847f10a4707e81 | 994 | py | Python | Die Kunst des Zaehlens/hypergeom_distr.py | d4tadriven2/info-website | ef0b47eee6b82da054769322c80c490b19abdfa3 | [
"MIT"
] | 2 | 2022-03-01T15:14:53.000Z | 2022-03-05T21:16:53.000Z | Die Kunst des Zaehlens/hypergeom_distr.py | d4tadriven2/info-website | ef0b47eee6b82da054769322c80c490b19abdfa3 | [
"MIT"
] | null | null | null | Die Kunst des Zaehlens/hypergeom_distr.py | d4tadriven2/info-website | ef0b47eee6b82da054769322c80c490b19abdfa3 | [
"MIT"
] | null | null | null | from scipy.stats import hypergeom
import matplotlib.pyplot as plt
# Diskrete Verteilungen
# komb.u. perm. u. hypergeom. Verteilung
def main():
zahl = 5
# Random Program-Durchlaeufe
print(factorial(zahl))
print(comb(12, 30))
print(comb(30, 12))
print(perm(20, 2))
print(hypergeom(6, 1, 4, 60)... | 19.88 | 71 | 0.574447 |
de1f5d6ee298b319f6450613cd3a1a41935e97e2 | 3,617 | py | Python | app/auth/routes.py | Icoqu/SecretShare | 1b0c25c3cc64803157499d2c62870254d32b3022 | [
"MIT"
] | null | null | null | app/auth/routes.py | Icoqu/SecretShare | 1b0c25c3cc64803157499d2c62870254d32b3022 | [
"MIT"
] | 206 | 2020-05-23T18:44:20.000Z | 2022-03-31T19:11:25.000Z | app/auth/routes.py | Icoqu/SecretShare | 1b0c25c3cc64803157499d2c62870254d32b3022 | [
"MIT"
] | null | null | null | from flask import render_template, redirect, url_for, request, abort, current_app
from app.helpers import flash
from werkzeug.urls import url_parse
from flask_login import login_user, logout_user, current_user
from flask_babel import _
from app import db
from app.auth import bp
from app.auth.forms import LoginForm, Reg... | 38.478723 | 134 | 0.687863 |
0304c921a5a4883f7de3761047a1d94e73af48fa | 3,029 | py | Python | veidt/rfxas/tests/test_core.py | yimingchen95/veidt | 90f201f856d2f71c578f74b7391c0c9ff284986b | [
"BSD-3-Clause"
] | 18 | 2018-01-18T08:32:26.000Z | 2022-02-06T16:56:30.000Z | veidt/rfxas/tests/test_core.py | yimingchen95/veidt | 90f201f856d2f71c578f74b7391c0c9ff284986b | [
"BSD-3-Clause"
] | 77 | 2017-08-16T18:09:07.000Z | 2020-04-03T13:17:17.000Z | veidt/rfxas/tests/test_core.py | yimingchen95/veidt | 90f201f856d2f71c578f74b7391c0c9ff284986b | [
"BSD-3-Clause"
] | 12 | 2017-09-11T17:23:26.000Z | 2020-01-30T02:19:21.000Z |
from veidt.rfxas.core import XANES
from veidt.rfxas.prediction import CenvPrediction
import pandas as pd
import os, unittest
import warnings
comp_test_df_path = os.path.join(os.path.dirname(__file__), 'comp_spectra_test.pkl')
comp_test_df = pd.read_pickle(comp_test_df_path)
Fe_tsv = os.path.join(os.path.dirname(__fil... | 50.483333 | 124 | 0.688346 |
c21c2b9c69fc2f7bf240152f434289a17c3190a1 | 1,409 | py | Python | stor/full_node/hint_store.py | Stor-Network/stor-blockchain | 3c3cd1a3b99592e88160107ca5b81afc0937b992 | [
"Apache-2.0"
] | 19 | 2021-06-29T20:06:09.000Z | 2022-02-09T04:33:00.000Z | stor/full_node/hint_store.py | Stor-Network/stor-blockchain | 3c3cd1a3b99592e88160107ca5b81afc0937b992 | [
"Apache-2.0"
] | 8 | 2021-07-04T03:21:51.000Z | 2021-12-27T07:56:09.000Z | stor/full_node/hint_store.py | Stor-Network/stor-blockchain | 3c3cd1a3b99592e88160107ca5b81afc0937b992 | [
"Apache-2.0"
] | 6 | 2021-10-04T17:15:30.000Z | 2022-03-15T08:40:01.000Z | from typing import List, Tuple
import aiosqlite
from stor.types.blockchain_format.sized_bytes import bytes32
from stor.util.db_wrapper import DBWrapper
import logging
log = logging.getLogger(__name__)
class HintStore:
coin_record_db: aiosqlite.Connection
db_wrapper: DBWrapper
@classmethod
async def ... | 34.365854 | 110 | 0.664301 |
5f01f36e7d0aaf04a4d159f729ca24f6a2307aad | 6,932 | py | Python | tensorflow_probability/python/bijectors/chain.py | brianwa84/probability | 6f8e78d859ac41170be5147c8c7bde54cc5aa83e | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/bijectors/chain.py | brianwa84/probability | 6f8e78d859ac41170be5147c8c7bde54cc5aa83e | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/bijectors/chain.py | brianwa84/probability | 6f8e78d859ac41170be5147c8c7bde54cc5aa83e | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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 o... | 35.548718 | 113 | 0.666042 |
5f4087ce7654aa47bbcf3fd281148f28905a1841 | 861 | py | Python | Crawlers/tempCodeRunnerFile.py | sailinglove/personal-general | b2e932dcd7989bdf856d4852e38f96cbbfc9c907 | [
"MIT"
] | null | null | null | Crawlers/tempCodeRunnerFile.py | sailinglove/personal-general | b2e932dcd7989bdf856d4852e38f96cbbfc9c907 | [
"MIT"
] | null | null | null | Crawlers/tempCodeRunnerFile.py | sailinglove/personal-general | b2e932dcd7989bdf856d4852e38f96cbbfc9c907 | [
"MIT"
] | null | null | null | verWait(driver, 10).until(lambda d: d.find_element_by_xpath('//*[@class="iv-login"]')).click()
# driver.find_element_by_xpath("//*[@class='ivu-cascader-menu']/li[2]").click()
# driver.find_element_by_xpath("//li[contains(text(), '志愿者')]").click()
# WebDriverWait(driver, 10).until(lambda d: d.find_element_by_xpath("/... | 47.833333 | 124 | 0.713124 |
6c5660ea9de2c5370fdf571abad8950cb27bc097 | 3,700 | py | Python | 3rdParty/V8/v7.1.302.28/test/intl/testcfg.py | cclauss/arangodb | 089f7a7e60483f0fb73171d159f922dd3de283e9 | [
"BSL-1.0",
"Apache-2.0"
] | 4 | 2019-04-20T15:56:13.000Z | 2019-12-23T07:14:01.000Z | 3rdParty/V8/v7.1.302.28/test/intl/testcfg.py | fceller/arangodb | 22eec2e35407d868ac36f06b9abdbee3fb3c3ef3 | [
"Apache-2.0"
] | 143 | 2015-05-21T14:33:52.000Z | 2017-10-20T17:46:37.000Z | 3rdParty/V8/v7.1.302.28/test/intl/testcfg.py | fceller/arangodb | 22eec2e35407d868ac36f06b9abdbee3fb3c3ef3 | [
"Apache-2.0"
] | 2 | 2015-04-26T22:08:16.000Z | 2018-09-28T09:49:42.000Z | # Copyright 2013 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditi... | 35.576923 | 73 | 0.693514 |
299b3905ada02f1dc4d64d89f1f28f27e5ddbc36 | 8,261 | py | Python | eis_pointing/coregister/slits.py | gpelouze/eis_pointing | 2ee714a2295bafae3492ab956792535336dd2a81 | [
"MIT"
] | 3 | 2019-04-01T09:35:01.000Z | 2021-12-14T15:39:40.000Z | eis_pointing/coregister/slits.py | gpelouze/eis_pointing | 2ee714a2295bafae3492ab956792535336dd2a81 | [
"MIT"
] | null | null | null | eis_pointing/coregister/slits.py | gpelouze/eis_pointing | 2ee714a2295bafae3492ab956792535336dd2a81 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import datetime
import warnings
import functools
import itertools
import multiprocessing as mp
import numpy as np
from ..utils import num
from . import tools
def cc_step(a, x, y, t, ref_raster_builder,
x_shift, y_shift, ang_shift, norm=None):
''' Compute the explicit cross-correl... | 32.01938 | 78 | 0.611669 |
6386c97bb03804839c4bd2dea0358e082e8bce2c | 1,357 | py | Python | ZHOUJIANPING/main_dailyupdata.py | StudentZZZ-CQF/Algo-ETL | 67d59f85d85f18be6b79a7c8faa412a465975105 | [
"MIT"
] | null | null | null | ZHOUJIANPING/main_dailyupdata.py | StudentZZZ-CQF/Algo-ETL | 67d59f85d85f18be6b79a7c8faa412a465975105 | [
"MIT"
] | null | null | null | ZHOUJIANPING/main_dailyupdata.py | StudentZZZ-CQF/Algo-ETL | 67d59f85d85f18be6b79a7c8faa412a465975105 | [
"MIT"
] | null | null | null | #Daily update creat tables
import finnhub
import pandas as pd
import psycopg2
import time
import sqlalchemy
import numpy as np
import os
import os.path
import connect_db
import Rdate
import DBtable
from datetime import datetime
from dotenv import load_dirname
#download the SP500 stocks as taget
table=pd.read_html('... | 27.693878 | 79 | 0.761238 |
94ea4ca5a3d2cfac71b1e78e3719ec873b38506f | 782 | py | Python | src/azure-cli/azure/cli/command_modules/synapse/_completers.py | xaliciayang/azure-cli | 38c80c875e8a79d08d06a2f42ec82fd54934343e | [
"MIT"
] | 7 | 2020-04-26T09:54:05.000Z | 2021-07-22T16:54:41.000Z | src/azure-cli/azure/cli/command_modules/synapse/_completers.py | xaliciayang/azure-cli | 38c80c875e8a79d08d06a2f42ec82fd54934343e | [
"MIT"
] | 120 | 2018-03-27T19:14:40.000Z | 2020-12-10T23:53:35.000Z | src/azure-cli/azure/cli/command_modules/synapse/_completers.py | xaliciayang/azure-cli | 38c80c875e8a79d08d06a2f42ec82fd54934343e | [
"MIT"
] | 13 | 2020-06-30T16:23:36.000Z | 2022-03-29T17:12:05.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 48.875 | 114 | 0.598465 |
35f1781ee8057c533b5bf48b0f54ab43b40865c1 | 452 | py | Python | alipay/aop/api/response/AlipayUserBenefitStatusUpdateResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayUserBenefitStatusUpdateResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayUserBenefitStatusUpdateResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayUserBenefitStatusUpdateResponse(AlipayResponse):
def __init__(self):
super(AlipayUserBenefitStatusUpdateResponse, self).__init__()
def parse_response_content(self... | 28.25 | 110 | 0.785398 |
05d3ce372282c2df25e1d41cbc7633bbf5d7779d | 13,098 | py | Python | pfruck_contabo/model/create_custom_image_request.py | p-fruck/python-contabo | c3abd362a0b90783118f36bec0e557bdbe5a8f2c | [
"Apache-2.0"
] | 2 | 2022-01-27T10:36:33.000Z | 2022-03-09T14:21:12.000Z | pfruck_contabo/model/create_custom_image_request.py | p-fruck/python-contabo | c3abd362a0b90783118f36bec0e557bdbe5a8f2c | [
"Apache-2.0"
] | 7 | 2022-01-13T10:44:19.000Z | 2022-02-15T23:44:44.000Z | pfruck_contabo/model/create_custom_image_request.py | p-fruck/python-contabo | c3abd362a0b90783118f36bec0e557bdbe5a8f2c | [
"Apache-2.0"
] | null | null | null | """
Contabo API
The version of the OpenAPI document: 1.0.0
Contact: support@contabo.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from pfruck_contabo.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
... | 44.25 | 199 | 0.563368 |
1af42d3c909c0a0b6263dd4e513f9b916efc81c3 | 452 | py | Python | Day 07/problem 02.py | RealTigerCZ/AoC2021 | 22d8a05a15fec4abab6713e678f8c29400ee56a3 | [
"MIT"
] | null | null | null | Day 07/problem 02.py | RealTigerCZ/AoC2021 | 22d8a05a15fec4abab6713e678f8c29400ee56a3 | [
"MIT"
] | null | null | null | Day 07/problem 02.py | RealTigerCZ/AoC2021 | 22d8a05a15fec4abab6713e678f8c29400ee56a3 | [
"MIT"
] | null | null | null | path = "input.txt"
file = open(path)
input = file.readlines()
file.close()
coords = sorted([[int(n) for n in line.split(",")] for line in input][0])
#super slow
#print(min([sum([sum([m + 1 for m in range(abs(n - i))]) for n in coords])] for i in range(coords[0], coords[-1]+1))[0])
add = [0]
for idx in range(2000):
... | 26.588235 | 120 | 0.608407 |
8497d48578fb1a2f0d44758974eb8ab05eb44d54 | 234,349 | py | Python | src/python_pachyderm/proto/admin/v1_11/pps/pps_pb2.py | barretthinson/python-pachyderm | 82cea22d1105d70833a5522ccac750ca521694ff | [
"Apache-2.0"
] | null | null | null | src/python_pachyderm/proto/admin/v1_11/pps/pps_pb2.py | barretthinson/python-pachyderm | 82cea22d1105d70833a5522ccac750ca521694ff | [
"Apache-2.0"
] | null | null | null | src/python_pachyderm/proto/admin/v1_11/pps/pps_pb2.py | barretthinson/python-pachyderm | 82cea22d1105d70833a5522ccac750ca521694ff | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: client/admin/v1_11/pps/pps.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflecti... | 43.526932 | 24,292 | 0.747658 |
db65997cc151952b993c25b2453f0752eaabf751 | 4,515 | py | Python | test/ci/test_jenkins_testplan_dispatch_for_pr.py | bogner/apple-llvm-infrastructure-tools | 6ff7ef700df19370e48b3ddd6929d280f011f5a3 | [
"Apache-2.0"
] | null | null | null | test/ci/test_jenkins_testplan_dispatch_for_pr.py | bogner/apple-llvm-infrastructure-tools | 6ff7ef700df19370e48b3ddd6929d280f011f5a3 | [
"Apache-2.0"
] | null | null | null | test/ci/test_jenkins_testplan_dispatch_for_pr.py | bogner/apple-llvm-infrastructure-tools | 6ff7ef700df19370e48b3ddd6929d280f011f5a3 | [
"Apache-2.0"
] | null | null | null | """
Tests for the config files.
"""
import os
import pytest
from git_apple_llvm.git_tools import git
from git_apple_llvm.config import write_config
import git_apple_llvm.ci.jenkins_ci as jenkins
import git_apple_llvm.ci.test_plans as test_plans
import json
import httpretty
TEST_API_URL = 'https://test.foo/bar'
@... | 35.833333 | 102 | 0.614839 |
5841d95a4ae58d7ebf19e7d8e32b1740f88edc2e | 1,559 | py | Python | configs/urban3d_optimal_d.py | asyrovprog/cs230project | cc9aebe256393b39140f69a2f31d1e9688c1e3d4 | [
"MIT"
] | 1 | 2021-04-28T08:29:28.000Z | 2021-04-28T08:29:28.000Z | configs/urban3d_optimal_d.py | asyrovprog/cs230project | cc9aebe256393b39140f69a2f31d1e9688c1e3d4 | [
"MIT"
] | null | null | null | configs/urban3d_optimal_d.py | asyrovprog/cs230project | cc9aebe256393b39140f69a2f31d1e9688c1e3d4 | [
"MIT"
] | 1 | 2021-01-27T21:52:07.000Z | 2021-01-27T21:52:07.000Z | from mrcnn.config import Config
from .constants import *
class Urban3dOptimalD(Config):
"""Configuration for training on MS COCO.
Derives from the base Config class and overrides values specific
to the COCO dataset.
"""
# Give the configuration a recognizable name
NAME = "urban3d_optimal_d"
... | 26.87931 | 115 | 0.709429 |
b8080861cdb7156e5315a0757ce35452933f00fd | 1,762 | py | Python | setup.py | Saitama-chan/django-qsessions | 2494a3b459f0611be86faea5322261483627c0e2 | [
"MIT"
] | null | null | null | setup.py | Saitama-chan/django-qsessions | 2494a3b459f0611be86faea5322261483627c0e2 | [
"MIT"
] | null | null | null | setup.py | Saitama-chan/django-qsessions | 2494a3b459f0611be86faea5322261483627c0e2 | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
dev_requirements = [
'geoip2==3.0.0'... | 32.036364 | 78 | 0.6084 |
50aa059b284e8c1f29bb56d43c68583040723a24 | 7,349 | py | Python | script/train.py | PatxiofromAlphensign/web_DataUtils | ac4fa1ea352f109f6630d1bf642db29c0cf76d2d | [
"MIT"
] | null | null | null | script/train.py | PatxiofromAlphensign/web_DataUtils | ac4fa1ea352f109f6630d1bf642db29c0cf76d2d | [
"MIT"
] | null | null | null | script/train.py | PatxiofromAlphensign/web_DataUtils | ac4fa1ea352f109f6630d1bf642db29c0cf76d2d | [
"MIT"
] | null | null | null | import argparse
import torch
import time
import json
import numpy as np
import math
import random
np.random.seed(1337)
random.seed(1337)
torch.manual_seed(1337)
torch.cuda.manual_seed(337)
def batch_generator(X, y, batch_size=128, scaled=False, return_idx=False, crf=False):
b_lens = []
idx = []
for offset... | 45.08589 | 152 | 0.661314 |
fa9dd7503f7bb11f43f146b27a1c27efe4722bb0 | 5,703 | py | Python | tests/selectedtests/work_items/test_process_test_mapping_work_items.py | isabella232/selected-tests | 890cd5f39f5571d50f0406b4c25a1a2eef1006a3 | [
"Apache-2.0"
] | 2 | 2020-04-13T11:26:57.000Z | 2022-01-21T00:03:52.000Z | tests/selectedtests/work_items/test_process_test_mapping_work_items.py | mongodb/selected-tests | 467f71f1d45b06ac3cc5db252f18658f8cd93083 | [
"Apache-2.0"
] | 54 | 2019-09-26T18:56:34.000Z | 2022-03-12T01:07:00.000Z | tests/selectedtests/work_items/test_process_test_mapping_work_items.py | isabella232/selected-tests | 890cd5f39f5571d50f0406b4c25a1a2eef1006a3 | [
"Apache-2.0"
] | 6 | 2019-10-01T14:24:27.000Z | 2020-02-13T15:53:47.000Z | from unittest.mock import MagicMock, patch
import selectedtests.work_items.process_test_mapping_work_items as under_test
from selectedtests.test_mappings.create_test_mappings import TestMappingsResult
NS = "selectedtests.work_items.process_test_mapping_work_items"
def ns(relative_name): # pylint: disable=invalid-... | 41.933824 | 100 | 0.732246 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.