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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f5abdde5a3958abc9b10a8228aa1cc05ff1642eb | 549 | py | Python | cdk/app.py | aws-samples/aws-alb-target-group-load-shedding | f7a27214259ff069b76c8ff6246327d6319fd1da | [
"MIT-0"
] | 1 | 2021-10-24T01:45:48.000Z | 2021-10-24T01:45:48.000Z | cdk/app.py | aws-samples/aws-alb-target-group-load-shedding | f7a27214259ff069b76c8ff6246327d6319fd1da | [
"MIT-0"
] | null | null | null | cdk/app.py | aws-samples/aws-alb-target-group-load-shedding | f7a27214259ff069b76c8ff6246327d6319fd1da | [
"MIT-0"
] | 1 | 2021-10-24T01:45:42.000Z | 2021-10-24T01:45:42.000Z | #!/usr/bin/env python3
import os
from aws_cdk import core as cdk
# For consistency with TypeScript code, `cdk` is the preferred import name for
# the CDK's core module. The following line also imports it as `core` for use
# with examples from the CDK Developer's Guide, which are in the process of
# being updated to ... | 28.894737 | 79 | 0.765027 |
f9eb6b388b1d44d54ea490cd96561f5ff8d8cecb | 1,179 | py | Python | test/test_all.py | G-AshwinKumar/experiment-notebook | aae1c5fb9ef8f84dce5d75989ed8975797282f37 | [
"MIT"
] | null | null | null | test/test_all.py | G-AshwinKumar/experiment-notebook | aae1c5fb9ef8f84dce5d75989ed8975797282f37 | [
"MIT"
] | null | null | null | test/test_all.py | G-AshwinKumar/experiment-notebook | aae1c5fb9ef8f84dce5d75989ed8975797282f37 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Rull all test modules in the current working dir
"""
__author__ = "Miguel Hernández Cabronero <miguel.hernandez@uab.cat>"
__date__ = "19/09/2019"
import os
import unittest
import sys
import argparse
import datetime
# So that all tests can use the intended module struc... | 30.230769 | 101 | 0.697201 |
d95ecbdc4dd77315b35ba446df9a5200f5cb6848 | 5,289 | py | Python | {{cookiecutter.project_slug}}/docs/conf.py | apiology/cookiecutter-pypackage | 898d930d20347349b27ddc4bf5b2bff69c1ea711 | [
"BSD-3-Clause"
] | 1 | 2020-12-18T21:04:29.000Z | 2020-12-18T21:04:29.000Z | {{cookiecutter.project_slug}}/docs/conf.py | apiology/cookiecutter-pypackage | 898d930d20347349b27ddc4bf5b2bff69c1ea711 | [
"BSD-3-Clause"
] | 1 | 2021-11-23T18:52:17.000Z | 2021-11-23T18:52:17.000Z | {{cookiecutter.project_slug}}/docs/conf.py | apiology/cookiecutter-pypackage | 898d930d20347349b27ddc4bf5b2bff69c1ea711 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# {{ cookiecutter.project_slug }} documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 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
# aut... | 32.648148 | 89 | 0.678956 |
1d3e9954daa2ed0cbaaaea5e8f260d01518f1ccb | 1,750 | py | Python | moses/urls.py | vassilyvv/django-moses | 9745efdf770c87ae8ce341dec526a794b191595a | [
"BSD-3-Clause"
] | 3 | 2021-05-22T18:17:49.000Z | 2021-11-12T07:01:04.000Z | moses/urls.py | vassilyvv/django-moses | 9745efdf770c87ae8ce341dec526a794b191595a | [
"BSD-3-Clause"
] | null | null | null | moses/urls.py | vassilyvv/django-moses | 9745efdf770c87ae8ce341dec526a794b191595a | [
"BSD-3-Clause"
] | 1 | 2021-12-18T13:55:54.000Z | 2021-12-18T13:55:54.000Z | from django.urls import path, include
from . import views as accounts_views
from rest_framework_simplejwt.views import (
TokenRefreshView
)
from .views import TokenObtainPairView, VerifyOTPView, ConfirmPhoneNumber, ConfirmEmail, \
RequestPhoneNumberConfirmPin, RequestEmailConfirmPin, GetUserRoles
app_name = ... | 43.75 | 99 | 0.747429 |
3557822fec3bc0e2a9c4a55282f8fde4177daa1f | 1,649 | py | Python | record.py | baobrian/uis-rnn | 74bcbf78aa29ab50ada2170429772027b1b524c1 | [
"Apache-2.0"
] | null | null | null | record.py | baobrian/uis-rnn | 74bcbf78aa29ab50ada2170429772027b1b524c1 | [
"Apache-2.0"
] | null | null | null | record.py | baobrian/uis-rnn | 74bcbf78aa29ab50ada2170429772027b1b524c1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from pyaudio import PyAudio, paInt16
import numpy as np
from datetime import datetime
import wave
# 将data中的数据保存到名为filename的WAV文件中
def save_wave_file(filename, data):
wf = wave.open(filename, 'wb')
wf.setnchannels(1)
wf.setsampwidth(2)
wf.setframerate(SAMPLING_RATE)
wf.write... | 25.765625 | 76 | 0.664039 |
168c40c552bb5638a7c4061ca6837db7ad2290fb | 1,515 | py | Python | converting_cusip_to_isin.py | foreverycast/parse-script | 66beacffd1751f9b7df54ad633f62625f0ac18ac | [
"MIT"
] | null | null | null | converting_cusip_to_isin.py | foreverycast/parse-script | 66beacffd1751f9b7df54ad633f62625f0ac18ac | [
"MIT"
] | null | null | null | converting_cusip_to_isin.py | foreverycast/parse-script | 66beacffd1751f9b7df54ad633f62625f0ac18ac | [
"MIT"
] | null | null | null | alphabet = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
def is_number(s):
""" Check if the number is a float """
try:
float(s)
return True
except ValueError:
return False
except Type... | 22.279412 | 84 | 0.515512 |
44344c6e72bf0c88eb53c5cb564446c1419e32de | 2,149 | py | Python | misc/hlc_target.py | cagdemir/equity-index-predictors | 2546e72328de848222cb6a1c744ababab2058477 | [
"MIT"
] | null | null | null | misc/hlc_target.py | cagdemir/equity-index-predictors | 2546e72328de848222cb6a1c744ababab2058477 | [
"MIT"
] | null | null | null | misc/hlc_target.py | cagdemir/equity-index-predictors | 2546e72328de848222cb6a1c744ababab2058477 | [
"MIT"
] | 1 | 2021-07-21T12:24:51.000Z | 2021-07-21T12:24:51.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 27 12:45:02 2019
@author: Administrator
"""
import pdblp
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from datetime import date
plt.style.use('seaborn')
#con = pdblp.BCon(debug=True, port=8194, timeout=5000)
con = pdblp.BCon(... | 33.061538 | 137 | 0.731968 |
bcd9a69e1f6b43cc410e1ca12e5bda151aa79117 | 6,778 | py | Python | agents/data_agent.py | samirma/yaStockRnn | 89145b0a33de1161dc963f68c45e44c298c9dcd4 | [
"MIT"
] | null | null | null | agents/data_agent.py | samirma/yaStockRnn | 89145b0a33de1161dc963f68c45e44c298c9dcd4 | [
"MIT"
] | null | null | null | agents/data_agent.py | samirma/yaStockRnn | 89145b0a33de1161dc963f68c45e44c298c9dcd4 | [
"MIT"
] | null | null | null | import pandas as pd
from pandas._libs.tslibs import timestamps
from ta.trend import *
from ta.momentum import *
from ta.volume import *
from ta.volatility import *
from agents.tec_an import TecAn
import datetime as dt
TIMESTAMP_KEY = "timestamp"
MICROTIMESTAMP_KEY = "microtimestamp"
ASKS_KEY = "asks"
BIDS_KEY = "bids... | 32.27619 | 162 | 0.55931 |
4514ac99e486a0098e743c4e9083d81dbcbc9f30 | 6,784 | py | Python | nginx/datadog_checks/nginx/metrics.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | nginx/datadog_checks/nginx/metrics.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | nginx/datadog_checks/nginx/metrics.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
# Map metrics from vhost_traffic_status to metrics from NGINX Plus
VTS_METRIC_MAP = {
'nginx.loadMsec': 'nginx.load_timestamp',
'nginx.nowMsec': 'nginx.timestamp',
'nginx.connections.accepted... | 42.666667 | 111 | 0.730248 |
d2eea21c253f0e3be11e662fa073f791c18e92fe | 7,850 | py | Python | uci_data.py | WayneDW/Bayesian-Sparse-Deep-Learning | e95446911bbceaa9a1b859af186912e39a0240e0 | [
"MIT"
] | 20 | 2019-09-09T18:20:33.000Z | 2022-03-16T01:51:43.000Z | uci_data.py | JiexiYan/Bayesian-Sparse-Deep-Learning | 94036065c4a249e8c87ebef84e686f885528c23f | [
"MIT"
] | 1 | 2021-05-01T08:23:57.000Z | 2021-05-01T13:59:51.000Z | uci_data.py | JiexiYan/Bayesian-Sparse-Deep-Learning | 94036065c4a249e8c87ebef84e686f885528c23f | [
"MIT"
] | 6 | 2020-05-18T02:40:44.000Z | 2022-01-01T13:58:39.000Z | """
IO module for UCI datasets for regression
"""
from sklearn.model_selection import train_test_split
import autograd.numpy as np
import pandas as pd
import os
def load_dataset(name, split_seed=0, test_fraction=.1):
# load full dataset
load_funs = { "wine" : _load_wine,
"boston... | 36.175115 | 206 | 0.646369 |
18b86d6e6edacf6fd940c185f1b2713de324b6cb | 16,338 | py | Python | optimization/NCI-ALMANAC/ImageStacking_opt.py | omidbazgirTTU/IntegratedREFINED | a25e8be9bc3aea98110974d0d703613092831f66 | [
"MIT"
] | 3 | 2021-08-05T22:34:23.000Z | 2021-09-09T04:32:31.000Z | optimization/NCI-ALMANAC/ImageStacking_opt.py | Mostafa-MR/IntegratedREFINED | a25e8be9bc3aea98110974d0d703613092831f66 | [
"MIT"
] | null | null | null | optimization/NCI-ALMANAC/ImageStacking_opt.py | Mostafa-MR/IntegratedREFINED | a25e8be9bc3aea98110974d0d703613092831f66 | [
"MIT"
] | 2 | 2021-09-09T04:32:34.000Z | 2021-12-29T14:04:42.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 18 18:41:25 2020
@author: obazgir
"""
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 14 10:42:32 2020
@author: obazgir
"""
import numpy as np
import pandas as pd
import os
import sklearn
import glob
import Toolbox
from Toolbox import NRMSE, Random_I... | 42.994737 | 223 | 0.706818 |
a1c62de4e0fcc9cc69bc6b21fbea91bb8513da0a | 5,979 | py | Python | bvspca/animals/management/commands/sync_petpoint_data.py | nfletton/bvspca | b0e54151b1e737720657a7cc3976e36ce7b6c5e4 | [
"MIT"
] | 10 | 2019-02-25T07:06:09.000Z | 2022-03-23T08:12:06.000Z | bvspca/animals/management/commands/sync_petpoint_data.py | nfletton/bvspca | b0e54151b1e737720657a7cc3976e36ce7b6c5e4 | [
"MIT"
] | 18 | 2021-03-08T18:38:04.000Z | 2021-08-20T14:16:37.000Z | bvspca/animals/management/commands/sync_petpoint_data.py | nfletton/bvspca | b0e54151b1e737720657a7cc3976e36ce7b6c5e4 | [
"MIT"
] | 3 | 2019-01-29T05:14:22.000Z | 2021-02-18T11:58:34.000Z | import datetime
import logging
import requests
from django.conf import settings
from django.core.management.base import BaseCommand
from bvspca.animals.models import Animal, AnimalCountSettings, AnimalsPage
from bvspca.animals.petpoint import fetch_petpoint_adoptable_animal_ids, \
fetch_petpoint_adopted_dates_sin... | 48.609756 | 133 | 0.526509 |
698a0724b9a354b5f71d74c1556258ae576c0453 | 1,004 | py | Python | src/web-app/app.py | aravindvaddi/password-cracking | 1f8a799924360b2130300dd819d40051b483c47b | [
"MIT"
] | null | null | null | src/web-app/app.py | aravindvaddi/password-cracking | 1f8a799924360b2130300dd819d40051b483c47b | [
"MIT"
] | null | null | null | src/web-app/app.py | aravindvaddi/password-cracking | 1f8a799924360b2130300dd819d40051b483c47b | [
"MIT"
] | null | null | null | # import the Flask class from the flask module
from flask import Flask, render_template, redirect, url_for, request
from flask import jsonify
from hashlib import sha256
salt = '000000000000000000000000000078d2'.encode('utf-8')
hashed_password = '18821d89de11ab18488fdc0a01f1ddf4d290e198b0f80cd4974fc031dc2615a3'
def g... | 29.529412 | 84 | 0.691235 |
f926e698093a857212ac0ce1f3c2544eb9bc375d | 806 | py | Python | reactionroute_web/reaction/manage.py | sxhexe/reaction-route-search | f7694c84ca1def4a133ade3e1e2e09705cd28312 | [
"MIT"
] | 1 | 2017-09-16T07:36:29.000Z | 2017-09-16T07:36:29.000Z | reactionroute_web/reaction/manage.py | sxhexe/reaction-route-search | f7694c84ca1def4a133ade3e1e2e09705cd28312 | [
"MIT"
] | null | null | null | reactionroute_web/reaction/manage.py | sxhexe/reaction-route-search | f7694c84ca1def4a133ade3e1e2e09705cd28312 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "reaction.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the... | 35.043478 | 77 | 0.64268 |
03cab83f27efd99976a9b2972d8bc447bf4e2604 | 7,267 | py | Python | python/ray/rllib/test/test_supported_spaces.py | jamescasbon/ray | fb0801ce8c43f163a5724be5a78e23774aed645e | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/test/test_supported_spaces.py | jamescasbon/ray | fb0801ce8c43f163a5724be5a78e23774aed645e | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/test/test_supported_spaces.py | jamescasbon/ray | fb0801ce8c43f163a5724be5a78e23774aed645e | [
"Apache-2.0"
] | null | null | null | import unittest
import traceback
import gym
from gym.spaces import Box, Discrete, Tuple, Dict
from gym.envs.registration import EnvSpec
import numpy as np
import sys
import ray
from ray.rllib.agents.registry import get_agent_class
from ray.rllib.test.test_multi_agent_env import MultiCartpole, MultiMountainCar
from ra... | 33.031818 | 79 | 0.522224 |
8f91c3b428698b9012fbf57062aaf11c6cd7d4b7 | 221 | py | Python | A/ShortSubstrings.py | shukkkur/hello-world | c6388c2bda387e850fdb928a8d40f769c5684fec | [
"CC0-1.0"
] | 11 | 2021-05-26T11:47:50.000Z | 2022-03-08T14:31:02.000Z | A/ShortSubstrings.py | shukkkur/hello-world | c6388c2bda387e850fdb928a8d40f769c5684fec | [
"CC0-1.0"
] | null | null | null | A/ShortSubstrings.py | shukkkur/hello-world | c6388c2bda387e850fdb928a8d40f769c5684fec | [
"CC0-1.0"
] | 4 | 2021-08-06T05:27:12.000Z | 2022-03-22T14:05:41.000Z | __author__ = 'shukkkur'
'''
https://codeforces.com/problemset/problem/1367/A
A. Short Substrings
'''
n = int(input())
for _ in range(n):
word = input()
print(word[::2] + word[-1])
| 13 | 49 | 0.538462 |
cf9138c12d7c0eef214610fab13b72c3a04405fe | 420 | py | Python | backend/app/app/db/base_class.py | imadmoussa1/address_lookup | 407317df7df13fa41eeaefe6e114ddc270a3438b | [
"MIT"
] | null | null | null | backend/app/app/db/base_class.py | imadmoussa1/address_lookup | 407317df7df13fa41eeaefe6e114ddc270a3438b | [
"MIT"
] | null | null | null | backend/app/app/db/base_class.py | imadmoussa1/address_lookup | 407317df7df13fa41eeaefe6e114ddc270a3438b | [
"MIT"
] | null | null | null | from sqlalchemy import inspect
from typing import Any
from sqlalchemy.ext.declarative import as_declarative, declared_attr
@as_declarative()
class Base:
id: Any
__name__: str
# Generate __tablename__ automatically
@declared_attr
def __tablename__(cls) -> str:
return cls.__name__.lower()
def as_dict... | 22.105263 | 83 | 0.75 |
d25331c53b00f592d5bd013348fb6b1fe64e2e9a | 4,053 | py | Python | backend/settings/dev.py | khchine5/django-butter-cms | b6660c266e7c499d111961ed8e6613b1d2a6c838 | [
"MIT"
] | null | null | null | backend/settings/dev.py | khchine5/django-butter-cms | b6660c266e7c499d111961ed8e6613b1d2a6c838 | [
"MIT"
] | null | null | null | backend/settings/dev.py | khchine5/django-butter-cms | b6660c266e7c499d111961ed8e6613b1d2a6c838 | [
"MIT"
] | null | null | null | """
Django settings for myblog project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
import os
from ... | 27.201342 | 96 | 0.713546 |
034be75971d583e7e5f9e832726485f795564a24 | 1,542 | py | Python | intefraces/i_neural_net.py | Postmodernist/BoardAI | c2ffee8d3183dad388c6d25d73fb2defa5835365 | [
"Unlicense"
] | null | null | null | intefraces/i_neural_net.py | Postmodernist/BoardAI | c2ffee8d3183dad388c6d25d73fb2defa5835365 | [
"Unlicense"
] | null | null | null | intefraces/i_neural_net.py | Postmodernist/BoardAI | c2ffee8d3183dad388c6d25d73fb2defa5835365 | [
"Unlicense"
] | null | null | null | class INeuralNet:
"""
This class specifies the base NeuralNet class. To define your own neural
network, subclass this class and implement the functions below. The neural
network does not consider the current player, and instead only deals with
the canonical form of the board.
"""
@staticmet... | 32.125 | 82 | 0.61284 |
cdcb605f60bbefa12713bea6a0f48b67c60dc0ec | 4,748 | py | Python | python2_consul/file.py | ctma/consul_kv | 8aa5bbb05a72dff8d29023e6d8df7956af5e2b2d | [
"MIT"
] | null | null | null | python2_consul/file.py | ctma/consul_kv | 8aa5bbb05a72dff8d29023e6d8df7956af5e2b2d | [
"MIT"
] | 5 | 2017-10-19T18:24:52.000Z | 2021-06-01T21:20:13.000Z | python2_consul/file.py | ctma/consul_kv | 8aa5bbb05a72dff8d29023e6d8df7956af5e2b2d | [
"MIT"
] | null | null | null | import os
import fnmatch
import logging
import yaml
class File:
'''
Read and parse a yaml file
'''
def _read_file_content(self, file):
'''Open the file and return the file's content
Args:
file (str): The path to the file
Returns:
str object of the file's... | 31.653333 | 100 | 0.570767 |
6146787422450f2ad5db9a8d9752a97c5a898548 | 341 | py | Python | Backend/onduty/zones/migrations/0002_auto_20200716_0906.py | marsh69/Beats-Allocation-SIH | 597121dcd1d4259d9a1df394ef09891757df6895 | [
"MIT"
] | 1 | 2020-08-12T03:19:22.000Z | 2020-08-12T03:19:22.000Z | Backend/onduty/zones/migrations/0002_auto_20200716_0906.py | marsh69/Beats-Allocation-SIH | 597121dcd1d4259d9a1df394ef09891757df6895 | [
"MIT"
] | null | null | null | Backend/onduty/zones/migrations/0002_auto_20200716_0906.py | marsh69/Beats-Allocation-SIH | 597121dcd1d4259d9a1df394ef09891757df6895 | [
"MIT"
] | 2 | 2020-08-11T08:04:15.000Z | 2020-10-02T08:20:41.000Z | # Generated by Django 3.0.2 on 2020-07-16 09:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('zones', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='zones',
options={'verbose_name_plural': 'zones... | 18.944444 | 53 | 0.589443 |
429a1ff59aa2ad1be5b12cdaa4f06f9ce0d3406f | 2,627 | py | Python | cpp/tests/math/py/test_Diagonalization.py | ProkopHapala/SimpleSimulationEngine | 240f9b7e85b3a6eda7a27dc15fe3f7b8c08774c5 | [
"MIT"
] | 26 | 2016-12-04T04:45:12.000Z | 2022-03-24T09:39:28.000Z | cpp/tests/math/py/test_Diagonalization.py | Aki78/FlightAI | 9c5480f2392c9c89b9fee4902db0c4cde5323a6c | [
"MIT"
] | null | null | null | cpp/tests/math/py/test_Diagonalization.py | Aki78/FlightAI | 9c5480f2392c9c89b9fee4902db0c4cde5323a6c | [
"MIT"
] | 2 | 2019-02-09T12:31:06.000Z | 2019-04-28T02:24:50.000Z | #!/usr/bin/python
import numpy as np
import libTest_Lingebra as LA
import JacobiEigen as JE
import matplotlib.pyplot as plt
import time
'''
test tol=1e-9
Lenovo-ideapad-Y700-15ISK i7-6700HQ CPU @ 2.60GHz
N time np.eig(A) [s] time LA.eig_Jacobi(A,tol=1e-9) Nrot
200 0.259829 0.9023... | 29.852273 | 98 | 0.589265 |
075a75aa3f1ea204b4e09ca448e53eb0feb437bd | 3,478 | py | Python | deprecated/download_apks_from_device.py | markraemer/mH-PriSe | 1555c4c7e6457c3bb5bce3b6dae9c514ed7fc3d3 | [
"MIT"
] | 1 | 2016-12-02T06:50:44.000Z | 2016-12-02T06:50:44.000Z | deprecated/download_apks_from_device.py | markraemer/mH-PriSe | 1555c4c7e6457c3bb5bce3b6dae9c514ed7fc3d3 | [
"MIT"
] | null | null | null | deprecated/download_apks_from_device.py | markraemer/mH-PriSe | 1555c4c7e6457c3bb5bce3b6dae9c514ed7fc3d3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# KK, October 2014
# Update: Dec, download selected apps
# The script loads all android apk files from a connected smart phone
# to the current directory and creates a file with the package name
# and title of the app
# Output will be written in file and directory with dev... | 31.333333 | 90 | 0.585106 |
614e0bfbe47d9662b6bbac7845e85053e390205c | 3,112 | py | Python | mayan/apps/document_indexing/tasks.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 1 | 2021-06-17T18:24:25.000Z | 2021-06-17T18:24:25.000Z | mayan/apps/document_indexing/tasks.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 7 | 2020-06-06T00:01:04.000Z | 2022-01-13T01:47:17.000Z | mayan/apps/document_indexing/tasks.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 1 | 2020-07-29T21:03:27.000Z | 2020-07-29T21:03:27.000Z | from __future__ import unicode_literals
import logging
from django.apps import apps
from django.db import OperationalError
from mayan.apps.lock_manager.exceptions import LockError
from mayan.celery import app
from .literals import RETRY_DELAY
logger = logging.getLogger(__name__)
@app.task(bind=True, default_retr... | 31.755102 | 91 | 0.679949 |
83f712e401e12d1367feb6ce27650cfd3d36574f | 1,032 | py | Python | core_get/package/reference/package_reference.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | core_get/package/reference/package_reference.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | core_get/package/reference/package_reference.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass
from functools import total_ordering
from pathlib import PurePath
from core_get.package.manifest import Manifest
@dataclass
@total_ordering
class PackageReference:
manifest: Manifest
def __hash__(self):
return hash(self._cmp_key()... | 22.933333 | 56 | 0.73062 |
3490e7adfda905664a9a711afb33f3906899b02b | 1,979 | py | Python | reprounzip-vagrant/setup.py | arfon/reprozip | d64b8f42220d467a96805338d4c2579a20e0e1db | [
"BSD-3-Clause"
] | null | null | null | reprounzip-vagrant/setup.py | arfon/reprozip | d64b8f42220d467a96805338d4c2579a20e0e1db | [
"BSD-3-Clause"
] | null | null | null | reprounzip-vagrant/setup.py | arfon/reprozip | d64b8f42220d467a96805338d4c2579a20e0e1db | [
"BSD-3-Clause"
] | null | null | null | import io
import os
from setuptools import setup
# pip workaround
os.chdir(os.path.abspath(os.path.dirname(__file__)))
# Need to specify encoding for PY3, which has the worst unicode handling ever
with io.open('README.rst', encoding='utf-8') as fp:
description = fp.read()
setup(name='reprounzip-vagrant',
... | 38.803922 | 78 | 0.615968 |
e478dedd23541c89560b7642c3b2ac874b389386 | 11,912 | py | Python | source/conf.py | MohsenQazi/ood-documentation | 9323a7d0aa6d935528e10c19692b2d4efcc93a7f | [
"CC-BY-4.0",
"MIT"
] | null | null | null | source/conf.py | MohsenQazi/ood-documentation | 9323a7d0aa6d935528e10c19692b2d4efcc93a7f | [
"CC-BY-4.0",
"MIT"
] | null | null | null | source/conf.py | MohsenQazi/ood-documentation | 9323a7d0aa6d935528e10c19692b2d4efcc93a7f | [
"CC-BY-4.0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Open OnDemand documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 10 17:38:37 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 file.... | 28.982968 | 80 | 0.690984 |
71ef1d69dee1b885e5d1316c93cffb2aa659908e | 1,134 | py | Python | federated.py | eriksore/sdn | 16eaa6a28bcbf957974e8339ea70724e604f5da9 | [
"MIT"
] | null | null | null | federated.py | eriksore/sdn | 16eaa6a28bcbf957974e8339ea70724e604f5da9 | [
"MIT"
] | null | null | null | federated.py | eriksore/sdn | 16eaa6a28bcbf957974e8339ea70724e604f5da9 | [
"MIT"
] | null | null | null |
from mininet.net import Mininet
from mininet.node import UserSwitch, OVSKernelSwitch
from mininet.topo import Topo
from mininet.log import lg
from mininet.util import irange
import sys
flush = sys.stdout.flush
class FederatedNet( Topo ):
"Topology for a federated network."
def __init__( self, N, **params )... | 23.625 | 52 | 0.604938 |
731dbb7b3c314a99569a856b588bcc7fc0643f86 | 268 | py | Python | tests/test_constant_parameter.py | tonybaloney/inline | e8e523e7f3f934c8939104208d53f3526b08c421 | [
"MIT"
] | 6 | 2021-12-20T08:53:02.000Z | 2021-12-23T14:23:38.000Z | tests/test_constant_parameter.py | tonybaloney/inline | e8e523e7f3f934c8939104208d53f3526b08c421 | [
"MIT"
] | null | null | null | tests/test_constant_parameter.py | tonybaloney/inline | e8e523e7f3f934c8939104208d53f3526b08c421 | [
"MIT"
] | null | null | null | from pyinline import inline
import logging
log = logging.getLogger(__name__)
@inline
def log_error(msg: str, exception: Exception):
log.error(msg, exception, exc_info=True)
try:
x = 1 / 0
except Exception as e:
log_error("Could not divide number", e)
| 16.75 | 46 | 0.716418 |
9e2a64645977d6b7c981b117ee8e3e68093f9ffc | 714 | py | Python | sayn/logging/console_logger.py | robin-173/sayn | d1cf36b92fad6a1798b57ad80abb22e8386e0e86 | [
"Apache-2.0"
] | 105 | 2020-04-23T17:04:34.000Z | 2022-03-18T15:47:52.000Z | sayn/logging/console_logger.py | robin-173/sayn | d1cf36b92fad6a1798b57ad80abb22e8386e0e86 | [
"Apache-2.0"
] | 53 | 2020-06-12T14:41:12.000Z | 2022-01-24T13:04:58.000Z | sayn/logging/console_logger.py | robin-173/sayn | d1cf36b92fad6a1798b57ad80abb22e8386e0e86 | [
"Apache-2.0"
] | 9 | 2020-04-23T16:56:23.000Z | 2021-08-16T10:54:48.000Z | from .logger import Logger
from .log_formatter import LogFormatter
class ConsoleLogger(Logger):
fmt = LogFormatter(use_colour=True, output_ts=True)
is_debug = True
def __init__(self, debug=True):
self.is_debug = debug
def print(self, s=None):
if s is None:
print()
... | 26.444444 | 58 | 0.512605 |
5fcc7b9f4177f7127ab1bf25a4285ea6bed90038 | 6,873 | py | Python | python/smqtk/utils/bit_utils.py | jbeezley/SMQTK | e6b00f94be95f39bbca52a7983ac3d6d1f86f847 | [
"BSD-3-Clause"
] | 1 | 2021-04-10T10:51:26.000Z | 2021-04-10T10:51:26.000Z | python/smqtk/utils/bit_utils.py | jbeezley/SMQTK | e6b00f94be95f39bbca52a7983ac3d6d1f86f847 | [
"BSD-3-Clause"
] | 3 | 2021-06-08T22:19:14.000Z | 2022-03-12T00:46:44.000Z | python/smqtk/utils/bit_utils.py | DigitalCompanion/SMQTK | fc9404b69150ef44f24423844bc80735c0c2b669 | [
"BSD-3-Clause"
] | null | null | null | import math
import numpy
# noinspection PyUnresolvedReferences
from six.moves import range
from . import ncr
try:
# noinspection PyUnresolvedReferences
from numba import jit
except (ImportError, TypeError):
# Create passthrough function if numba is not installed.
def jit(func_or_sig):
import... | 26.034091 | 80 | 0.615597 |
e839c418a4dd44b4aa243a4ac8f5efaaf7565d5e | 6,095 | py | Python | dace/transformation/dataflow/mpi.py | meshtag/dace | e6751ee6a4f6356b47b93065d43cefb3fd54ebaa | [
"BSD-3-Clause"
] | 1 | 2022-03-11T13:36:34.000Z | 2022-03-11T13:36:34.000Z | dace/transformation/dataflow/mpi.py | meshtag/dace | e6751ee6a4f6356b47b93065d43cefb3fd54ebaa | [
"BSD-3-Clause"
] | null | null | null | dace/transformation/dataflow/mpi.py | meshtag/dace | e6751ee6a4f6356b47b93065d43cefb3fd54ebaa | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
""" Contains the MPITransformMap transformation. """
from dace import dtypes
from dace.sdfg import has_dynamic_map_inputs
from dace.sdfg import utils as sdutil
from dace.sdfg import nodes
from dace.sdfg.sdfg import SDFG
from dace.sdfg.state im... | 39.836601 | 119 | 0.627728 |
2134d66b35eff7e0a2eba6afb3681ebca6acb992 | 1,472 | py | Python | samples/model-builder/import_data_text_sentiment_analysis_sample_test.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | null | null | null | samples/model-builder/import_data_text_sentiment_analysis_sample_test.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | null | null | null | samples/model-builder/import_data_text_sentiment_analysis_sample_test.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | null | null | null | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32 | 90 | 0.771739 |
06bcd87416b1eaf161a42992ee2c2a000a92347a | 7,143 | py | Python | netbox/ipam/migrations/0002_squashed_0046.py | TheFlyingCorpse/netbox | a226f06b1beb575011d783b202d76cb74d3b1f79 | [
"Apache-2.0"
] | 4,994 | 2019-07-01T13:15:44.000Z | 2022-03-31T19:55:45.000Z | netbox/ipam/migrations/0002_squashed_0046.py | TheFlyingCorpse/netbox | a226f06b1beb575011d783b202d76cb74d3b1f79 | [
"Apache-2.0"
] | 4,045 | 2019-07-01T14:24:09.000Z | 2022-03-31T16:07:39.000Z | netbox/ipam/migrations/0002_squashed_0046.py | TheFlyingCorpse/netbox | a226f06b1beb575011d783b202d76cb74d3b1f79 | [
"Apache-2.0"
] | 1,225 | 2019-07-01T15:34:03.000Z | 2022-03-31T16:47:09.000Z | from django.db import migrations, models
import django.db.models.deletion
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('dcim', '0003_auto_20160628_1721'),
('virtualization', '0001_virtualization'),
('contenttypes', '0002_remove_content_type_name'),
... | 44.64375 | 333 | 0.609968 |
5abacb9cf100664d09c678f4c60ca7f588569f87 | 5,185 | py | Python | scripts/clean_failed_dav_no_clobber_datasets.py | hysds/hysds | 839d527114e115603ea0a2c4c1b7fe474f7b7b39 | [
"Apache-2.0"
] | 17 | 2018-04-30T17:53:23.000Z | 2021-11-10T18:24:24.000Z | scripts/clean_failed_dav_no_clobber_datasets.py | hysds/hysds | 839d527114e115603ea0a2c4c1b7fe474f7b7b39 | [
"Apache-2.0"
] | 54 | 2017-10-17T23:22:53.000Z | 2022-02-09T22:05:07.000Z | scripts/clean_failed_dav_no_clobber_datasets.py | hysds/hysds | 839d527114e115603ea0a2c4c1b7fe474f7b7b39 | [
"Apache-2.0"
] | 9 | 2018-01-13T01:07:21.000Z | 2021-02-25T21:21:43.000Z | #!/usr/bin/env python
"""
Search for failed jobs with osaka no-clobber errors during dataset publishing
and clean them out of WebDAV if the dataset was not indexed.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
f... | 31.424242 | 103 | 0.551205 |
67fb58ad9d3b93a7a021063389d9c92117cf0c65 | 1,113 | py | Python | tests/test_jinja_templates.py | alex-oleshkevich/mailers | 36836ae750cd190f75c96c5a78896d4ef830260e | [
"MIT"
] | 17 | 2020-03-13T13:06:05.000Z | 2022-03-06T00:17:45.000Z | tests/test_jinja_templates.py | alex-oleshkevich/mailers | 36836ae750cd190f75c96c5a78896d4ef830260e | [
"MIT"
] | null | null | null | tests/test_jinja_templates.py | alex-oleshkevich/mailers | 36836ae750cd190f75c96c5a78896d4ef830260e | [
"MIT"
] | null | null | null | import jinja2
import pathlib
from mailers import Email, InMemoryTransport, Mailer, TemplatedEmail
from mailers.plugins.jinja_renderer import JinjaRendererPlugin
THIS_DIR = pathlib.Path(__file__).parent
def test_renders_jinja_templates():
env = jinja2.Environment(loader=jinja2.FileSystemLoader([THIS_DIR / 'templ... | 38.37931 | 117 | 0.743037 |
1c9aaf3243a9983ce4cd56f3a3076911351814c3 | 34,386 | py | Python | discord/utils.py | ju/pycord | d754bb58f234a3c00b670aacb63d51698bf8f7e6 | [
"MIT"
] | null | null | null | discord/utils.py | ju/pycord | d754bb58f234a3c00b670aacb63d51698bf8f7e6 | [
"MIT"
] | null | null | null | discord/utils.py | ju/pycord | d754bb58f234a3c00b670aacb63d51698bf8f7e6 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Pycord Development
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 limit... | 30.031441 | 447 | 0.619787 |
83ad046c18532151fb86aa37910443fef0ba6ea9 | 2,281 | py | Python | build_char_table.py | blues-lin/Char-level-CNN-for-Chinese-Text-Classification-in-Keras | 81c7cdec48d4b17640e4c5465a4a412e338a7e62 | [
"MIT"
] | 8 | 2017-03-05T04:57:22.000Z | 2021-03-04T04:29:13.000Z | build_char_table.py | blues-lin/Char-level-CNN-for-Chinese-Text-Classification-in-Keras | 81c7cdec48d4b17640e4c5465a4a412e338a7e62 | [
"MIT"
] | null | null | null | build_char_table.py | blues-lin/Char-level-CNN-for-Chinese-Text-Classification-in-Keras | 81c7cdec48d4b17640e4c5465a4a412e338a7e62 | [
"MIT"
] | 1 | 2018-03-07T07:56:33.000Z | 2018-03-07T07:56:33.000Z | """
Build look-up char table from iterable corpus.
Build labels from training terms.
For traditional chinese text, uses corpus.sqlite. Corpus comes from ptt.cc.
"""
import os.path
import sqlite3
import csv
from lib import table_builder
BASE_PATH = os.path.dirname(os.path.realpath(__file__))
CHAR_PATH = os.path.join(BA... | 30.413333 | 75 | 0.629987 |
68ef3054a7310ebdbd157817fa85a9bba54b2c92 | 613 | py | Python | Leetcode/30. Substring with Concatenation of All Words/solution1.py | asanoviskhak/Outtalent | c500e8ad498f76d57eb87a9776a04af7bdda913d | [
"MIT"
] | 51 | 2020-07-12T21:27:47.000Z | 2022-02-11T19:25:36.000Z | Leetcode/30. Substring with Concatenation of All Words/solution1.py | CrazySquirrel/Outtalent | 8a10b23335d8e9f080e5c39715b38bcc2916ff00 | [
"MIT"
] | null | null | null | Leetcode/30. Substring with Concatenation of All Words/solution1.py | CrazySquirrel/Outtalent | 8a10b23335d8e9f080e5c39715b38bcc2916ff00 | [
"MIT"
] | 32 | 2020-07-27T13:54:24.000Z | 2021-12-25T18:12:50.000Z | from itertools import permutations
class Solution:
def findSubstring(self, s: str, words: List[str]) -> List[int]:
if not s or not words: return []
if not all([word in s for word in words]): return []
result = set()
for substring in permutations(words):
substring = ''.j... | 30.65 | 67 | 0.497553 |
78c16b3a0fad1080190a3b7a3abc4c333b746286 | 1,825 | py | Python | levantamento_dados/estrelas/identifica_data_criacao_repositorio.py | carlosdenner/github | 09009abe4954bae6ab304af0db9ae6953a2479ac | [
"MIT"
] | 1 | 2021-08-23T23:17:18.000Z | 2021-08-23T23:17:18.000Z | levantamento_dados/estrelas/identifica_data_criacao_repositorio.py | carlosdenner/github | 09009abe4954bae6ab304af0db9ae6953a2479ac | [
"MIT"
] | null | null | null | levantamento_dados/estrelas/identifica_data_criacao_repositorio.py | carlosdenner/github | 09009abe4954bae6ab304af0db9ae6953a2479ac | [
"MIT"
] | 2 | 2021-06-01T17:52:47.000Z | 2021-11-22T16:39:53.000Z | import json
import datetime
from dateutil import parser
def ler_arquivo_json_tipo_1(nome_arquivo):
with open(nome_arquivo, 'r', encoding='utf8') as f:
return json.load(f)
def gravar_arquivo_json(nome_arquivo, dados):
with open(nome_arquivo, 'w', encoding='utf-8') as f:
json.dump(dados, f, ensu... | 35.096154 | 98 | 0.608219 |
43391b778e79c1cfb296b546cc415c1a3e646f6c | 1,907 | py | Python | align_dataset.py | moh3n9595/align-face | 3ad38065ef86bc57452a07c1a060e016586d5b36 | [
"MIT"
] | 4 | 2019-07-10T12:23:53.000Z | 2021-05-17T18:20:28.000Z | align_dataset.py | moh3n9595/align-face | 3ad38065ef86bc57452a07c1a060e016586d5b36 | [
"MIT"
] | null | null | null | align_dataset.py | moh3n9595/align-face | 3ad38065ef86bc57452a07c1a060e016586d5b36 | [
"MIT"
] | 1 | 2020-09-17T14:37:30.000Z | 2020-09-17T14:37:30.000Z | '''
Author: Mohsen Madani
Date: 5/31/2018
Email: mohsenando@gmail.com
'''
from eye_detector import get_eyes
from utils import rotate_img, rotate_coords
from os import listdir
from os.path import isfile, join
import cv2
import numpy as np
import math
# -- Settings :
W = 400
dataset_path = './clean_dataset/'
new_dat... | 25.092105 | 146 | 0.60409 |
e3fcbe78e76aa862a200b4e3a8ce43144e0f0862 | 9,955 | py | Python | tests/backend/xml.py | Terrance-forks/python-anyconfig | 21d7c0e30287569b394972557b5a54fab03bcd5c | [
"MIT"
] | 213 | 2015-01-14T22:09:20.000Z | 2022-02-02T17:23:41.000Z | tests/backend/xml.py | Terrance-forks/python-anyconfig | 21d7c0e30287569b394972557b5a54fab03bcd5c | [
"MIT"
] | 120 | 2015-03-13T15:47:43.000Z | 2022-03-31T01:55:34.000Z | tests/backend/xml.py | Terrance-forks/python-anyconfig | 21d7c0e30287569b394972557b5a54fab03bcd5c | [
"MIT"
] | 34 | 2015-01-12T05:03:30.000Z | 2021-09-09T14:40:56.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 - 2021 Satoru SATOH <satoru.satoh@gmail.com>
# SPDX-License-Identifier: MIT
#
# pylint: disable=missing-docstring,invalid-name,too-few-public-methods
# pylint: disable=ungrouped-imports,protected-access
import io
import unittest
import anyconfig.backend.xml as TT
import ... | 39.82 | 79 | 0.581818 |
3aa8b449428603482ddb0bcc151815370f96525a | 1,033 | py | Python | plugins/install/main.py | StyXman/pbt | 83dac5b896e9037fac17453f21a4d14faa25c09e | [
"Apache-2.0"
] | 1 | 2015-07-16T19:14:50.000Z | 2015-07-16T19:14:50.000Z | plugins/install/main.py | StyXman/pbt | 83dac5b896e9037fac17453f21a4d14faa25c09e | [
"Apache-2.0"
] | null | null | null | plugins/install/main.py | StyXman/pbt | 83dac5b896e9037fac17453f21a4d14faa25c09e | [
"Apache-2.0"
] | null | null | null | import pbt
import sys
import os
@pbt.command(name="install")
def install(ctx, args, project):
"""
Works as a wrapper for pip, with some sugar
"""
try:
import pip
except ImportError:
print("You need pip in order to use install, please see "
"http://www.pip-installer.o... | 24.595238 | 71 | 0.583737 |
abebd6398fc6deaced99ff177e38946a44626a38 | 1,299 | py | Python | Not working/test.py | Gayatri-2017/UBCHackathon | 8e36cc2d44cca77cf83b2c1faef3f4c58b5afa6d | [
"MIT"
] | 1 | 2020-02-27T19:24:32.000Z | 2020-02-27T19:24:32.000Z | Not working/test.py | Gayatri-2017/UBCHackathon | 8e36cc2d44cca77cf83b2c1faef3f4c58b5afa6d | [
"MIT"
] | null | null | null | Not working/test.py | Gayatri-2017/UBCHackathon | 8e36cc2d44cca77cf83b2c1faef3f4c58b5afa6d | [
"MIT"
] | null | null | null | import pandas as pd
import re
interest = "introduction"
csv_location = "/Users/apple/Desktop/UBCHackathon_Local/UBCHackathon/ubc_course_calendar_data_new.csv"
data = pd.read_csv(csv_location)
data.dropna(inplace = True)
sub = interest
data["Indexes"]= data["COURSE_DESCRIPTION"].str.contains(sub, case=False)
print("... | 41.903226 | 109 | 0.704388 |
a71dd59ebb4ff0f2a3bea3266b594103bb52aeb0 | 383 | py | Python | run_generators.py | se7endragon/Event_Driven_Stock_Prediction | fdb9130f14124960d4488151a7c81fe643582659 | [
"Apache-2.0"
] | null | null | null | run_generators.py | se7endragon/Event_Driven_Stock_Prediction | fdb9130f14124960d4488151a7c81fe643582659 | [
"Apache-2.0"
] | null | null | null | run_generators.py | se7endragon/Event_Driven_Stock_Prediction | fdb9130f14124960d4488151a7c81fe643582659 | [
"Apache-2.0"
] | null | null | null | from generators.data_generator import data_generator
from generators.svo_generator import svo_generator
from generators.svo_embedding_generator import svo_embedding_generator
import os
path = os.getcwd()+'/data/'
data_generator.extract_news_titles(path)
svo_generator.extract_relation_triples(path)
svo_embedding_genera... | 31.916667 | 70 | 0.869452 |
7ee28ae39e3cc3b820d86be83f99c882137c3472 | 172 | py | Python | remoteprotocols/__init__.py | ianchi/remoteprotocols | 7ed7881087af9de0f7cf8836361ad037cc4466ba | [
"MIT"
] | null | null | null | remoteprotocols/__init__.py | ianchi/remoteprotocols | 7ed7881087af9de0f7cf8836361ad037cc4466ba | [
"MIT"
] | null | null | null | remoteprotocols/__init__.py | ianchi/remoteprotocols | 7ed7881087af9de0f7cf8836361ad037cc4466ba | [
"MIT"
] | null | null | null | """Main entry point of library"""
# flake8: noqa
from .protocol import DecodeMatch, RemoteCommand, SignalData
from .registry import ProtocolRegistry
__version__ = "0.0.7"
| 24.571429 | 60 | 0.773256 |
9550aff663dfded18ef4e450b36cecf4ea41502c | 5,970 | py | Python | releasenotes/source/conf.py | 4383/tobiko | f8e6916db890021fa17ddbfc5e6007a25093c8cb | [
"Apache-2.0"
] | null | null | null | releasenotes/source/conf.py | 4383/tobiko | f8e6916db890021fa17ddbfc5e6007a25093c8cb | [
"Apache-2.0"
] | null | null | null | releasenotes/source/conf.py | 4383/tobiko | f8e6916db890021fa17ddbfc5e6007a25093c8cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Red Hat
#
# 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 ... | 32.27027 | 84 | 0.674037 |
0643a9dc7b00e63295aca70504c6fad320935e06 | 16,252 | pyw | Python | BindboxGUI.pyw | Kapukw/Bindbox | 62516a08e4e6b384bbc1bbeef1e47dfc698bb5f3 | [
"MIT"
] | null | null | null | BindboxGUI.pyw | Kapukw/Bindbox | 62516a08e4e6b384bbc1bbeef1e47dfc698bb5f3 | [
"MIT"
] | null | null | null | BindboxGUI.pyw | Kapukw/Bindbox | 62516a08e4e6b384bbc1bbeef1e47dfc698bb5f3 | [
"MIT"
] | null | null | null | import sys
import os
import time
import traceback
from PyQt5 import QtCore, QtGui, QtWidgets, QtSvg
import Utils
import Bindbox
import BindboxGUI_rc
g_sleepMin = 10.0
g_maxMessagesCount = 30
class TimestampWidget(QtWidgets.QWidget):
def __init__(self, timestamp, result):
super(TimestampWidget, self... | 35.407407 | 111 | 0.634999 |
74c0f2a906aeb860a8dac6766906e502df6e4d50 | 11,253 | py | Python | nicos_mlz/refsans/devices/detector.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_mlz/refsans/devices/detector.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_mlz/refsans/devices/detector.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 38.016892 | 79 | 0.598329 |
a33644a4ce2053d0cacb358ad3900daef51fb213 | 9,013 | py | Python | tasks/bert/datasets/bert_formatting.py | epfml/relaysgd | 536f809f2a5fed5f5004b3f49857d67462ac89d2 | [
"MIT"
] | 3 | 2021-10-31T21:00:36.000Z | 2022-03-03T13:04:16.000Z | tasks/bert/datasets/bert_formatting.py | epfml/relaysgd | 536f809f2a5fed5f5004b3f49857d67462ac89d2 | [
"MIT"
] | null | null | null | tasks/bert/datasets/bert_formatting.py | epfml/relaysgd | 536f809f2a5fed5f5004b3f49857d67462ac89d2 | [
"MIT"
] | 2 | 2022-02-19T05:25:09.000Z | 2022-03-17T15:41:14.000Z | # -*- coding: utf-8 -*-
import json
import copy
from tqdm import tqdm
class BertInputFeature(object):
def __init__(self, uid, input_ids, attention_mask, token_type_ids, label):
self.uid = uid
self.input_ids = input_ids
self.attention_mask = attention_mask
self.token_type_ids = toke... | 37.090535 | 124 | 0.593698 |
d8123081e5341d449efcf969c86dc7a5914a4de7 | 850 | py | Python | tests/test_metrics/test_metrics_utils.py | Pacman1984/etna | 9b3ccb980e576d56858f14aca2e06ce2957b0fa9 | [
"Apache-2.0"
] | 326 | 2021-11-18T15:30:50.000Z | 2022-03-31T09:44:15.000Z | tests/test_metrics/test_metrics_utils.py | Pacman1984/etna | 9b3ccb980e576d56858f14aca2e06ce2957b0fa9 | [
"Apache-2.0"
] | 305 | 2021-11-17T10:28:31.000Z | 2022-03-31T18:05:03.000Z | tests/test_metrics/test_metrics_utils.py | Pacman1984/etna | 9b3ccb980e576d56858f14aca2e06ce2957b0fa9 | [
"Apache-2.0"
] | 29 | 2021-11-21T12:10:48.000Z | 2022-03-31T22:55:06.000Z | from typing import Tuple
import numpy as np
from etna.datasets import TSDataset
from etna.metrics import MAE
from etna.metrics import MAPE
from etna.metrics import MSE
from etna.metrics.utils import compute_metrics
def test_compute_metrics(train_test_dfs: Tuple[TSDataset, TSDataset]):
"""Check that compute_metr... | 35.416667 | 103 | 0.695294 |
7b71a5c0be1dbe033f1332a3e1c71b3fcf644e48 | 31,588 | py | Python | webpage/lib/python3.5/site-packages/scipy/spatial/tests/test_qhull.py | pseudoPixels/SourceFlow | e1738c8b838c71b18598ceca29d7c487c76f876b | [
"MIT"
] | 5 | 2017-03-21T13:04:12.000Z | 2021-07-28T12:38:02.000Z | PokerBots_2017/Johnny/scipy/spatial/tests/test_qhull.py | surgebiswas/poker | 019112147a3e6c208c3846ef699fb6ec24a45c30 | [
"MIT"
] | null | null | null | PokerBots_2017/Johnny/scipy/spatial/tests/test_qhull.py | surgebiswas/poker | 019112147a3e6c208c3846ef699fb6ec24a45c30 | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
import os
import copy
import numpy as np
from numpy.testing import (assert_equal, assert_almost_equal, run_module_suite,
assert_, dec, assert_allclose, assert_array_equal,
assert_raises)
from scipy._... | 35.452301 | 96 | 0.52808 |
abe01749a6244c0de09b4fcd567083d3d140bd8a | 15,158 | py | Python | tests/integration/modules/pip.py | preoctopus/salt | aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | tests/integration/modules/pip.py | preoctopus/salt | aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d | [
"Apache-2.0"
] | 1 | 2020-10-21T21:38:49.000Z | 2020-10-21T21:38:49.000Z | tests/integration/modules/pip.py | preoctopus/salt | aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
tests.integration.modules.pip
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import python libs
from __future__ import absolute_import
import os
import pwd
import shutil
import re
import tempfile
# Import Salt Testing libs
from sal... | 35.333333 | 98 | 0.601531 |
3ceb48d0a106f0f087e5779e52a273cc4d89ac64 | 1,793 | py | Python | src/machinable/schema.py | machinable-org/machinable | 9d96e942dde05d68699bc7bc0c3d062ee18652ad | [
"MIT"
] | 23 | 2020-02-28T14:29:04.000Z | 2021-12-23T20:50:54.000Z | src/machinable/schema.py | machinable-org/machinable | 9d96e942dde05d68699bc7bc0c3d062ee18652ad | [
"MIT"
] | 172 | 2020-02-24T12:12:11.000Z | 2022-03-29T03:08:24.000Z | src/machinable/schema.py | machinable-org/machinable | 9d96e942dde05d68699bc7bc0c3d062ee18652ad | [
"MIT"
] | 1 | 2020-11-23T22:42:20.000Z | 2020-11-23T22:42:20.000Z | from typing import TYPE_CHECKING, Dict, Optional
from datetime import datetime
from machinable.types import ComponentType, VersionType
from machinable.utils import (
encode_experiment_id,
generate_experiment_id,
generate_nickname,
generate_seed,
)
from pydantic import BaseModel, Field, PrivateAttr, ro... | 25.985507 | 80 | 0.722811 |
6317e99a527290b0ef8230f1e5e4c3ac810508ba | 716 | py | Python | src/979. Distribute Coins in Binary Tree.py | rajshrivastava/LeetCode | dfe6342fe22b324429b0be3e5c0fef46c7e6b3b0 | [
"MIT"
] | 1 | 2019-12-16T08:18:25.000Z | 2019-12-16T08:18:25.000Z | src/979. Distribute Coins in Binary Tree.py | rajshrivastava/LeetCode | dfe6342fe22b324429b0be3e5c0fef46c7e6b3b0 | [
"MIT"
] | null | null | null | src/979. Distribute Coins in Binary Tree.py | rajshrivastava/LeetCode | dfe6342fe22b324429b0be3e5c0fef46c7e6b3b0 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def distributeCoins(self, root: TreeNode) -> int:
def count_Nodes_Coins(node = root):
no... | 28.64 | 55 | 0.5 |
0d0d10fc8d2918595eea186faf02c394965e68f5 | 169,938 | py | Python | leveler/leveler.py | StuxieDev/StuxCogs | ce9fa4b2d966f668570f4bde9a652cab9b3c1c0a | [
"MIT"
] | null | null | null | leveler/leveler.py | StuxieDev/StuxCogs | ce9fa4b2d966f668570f4bde9a652cab9b3c1c0a | [
"MIT"
] | null | null | null | leveler/leveler.py | StuxieDev/StuxCogs | ce9fa4b2d966f668570f4bde9a652cab9b3c1c0a | [
"MIT"
] | null | null | null | import asyncio
import contextlib
import logging
import operator
import os
import platform
import random
import re
import string
import textwrap
import time
from asyncio import TimeoutError
from copy import copy
from datetime import datetime, timedelta
from tabulate import tabulate
from io import BytesIO
from typing imp... | 43.000506 | 165 | 0.561664 |
bf0ee2f77da4fa9a88dbc92ea9d528660f594d40 | 1,177 | py | Python | domain/entities/message_pool.py | singnet/snet-converter-services | 346b26f8281944a9f47d4bdd1eba54c8fb43e799 | [
"MIT"
] | null | null | null | domain/entities/message_pool.py | singnet/snet-converter-services | 346b26f8281944a9f47d4bdd1eba54c8fb43e799 | [
"MIT"
] | 1 | 2022-03-21T04:43:48.000Z | 2022-03-21T04:43:48.000Z | domain/entities/message_pool.py | singnet/snet-converter-services | 346b26f8281944a9f47d4bdd1eba54c8fb43e799 | [
"MIT"
] | 4 | 2021-11-30T04:32:59.000Z | 2022-03-23T07:20:53.000Z | from datetime import date
from constants.entity import MessagePoolEntities
from utils.general import datetime_to_str
class MessagePool:
def __init__(self, row_id: int, id: str, name: str, message_group_id: str, is_enabled: bool, created_by: str,
created_at: date, updated_at: date):
self... | 37.967742 | 113 | 0.685641 |
ce3239e836ee709ccc2addc45f5298ebba7684da | 1,099 | py | Python | setup.py | lqdc/pefile_py3 | 548fd976a75f0df63500206e8131107b5a63ebeb | [
"BSD-3-Clause"
] | null | null | null | setup.py | lqdc/pefile_py3 | 548fd976a75f0df63500206e8131107b5a63ebeb | [
"BSD-3-Clause"
] | null | null | null | setup.py | lqdc/pefile_py3 | 548fd976a75f0df63500206e8131107b5a63ebeb | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError as excp:
from distutils.core import setup
import pefile
import os
os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
os.environ['COPYFILE_DISABLE'] = 'true'
setup(name = 'pefile',
version = pefile.__version__,
descripti... | 32.323529 | 94 | 0.676979 |
cc239ac6337482d9d6876887bc6058e6c0a3a074 | 1,541 | py | Python | piccolo_api/jwt_auth/endpoints.py | aminalaee/piccolo_api | 432ff760d013fc3976a9b80a5185c95746d1be0d | [
"MIT"
] | null | null | null | piccolo_api/jwt_auth/endpoints.py | aminalaee/piccolo_api | 432ff760d013fc3976a9b80a5185c95746d1be0d | [
"MIT"
] | null | null | null | piccolo_api/jwt_auth/endpoints.py | aminalaee/piccolo_api | 432ff760d013fc3976a9b80a5185c95746d1be0d | [
"MIT"
] | null | null | null | from __future__ import annotations
from abc import abstractproperty
from datetime import datetime, timedelta
import typing as t
import jwt
from starlette.endpoints import HTTPEndpoint
from starlette.exceptions import HTTPException
from starlette.responses import JSONResponse
from starlette.requests import Request
fro... | 26.568966 | 79 | 0.692408 |
b1fbe69014097ce3b625f50ab90117f1e4a96842 | 8,302 | py | Python | tsrc/cli/push_gitlab.py | pdecat/tsrc | 472778a473a31a1dc1093f9a5487facbd0bd8643 | [
"BSD-3-Clause"
] | null | null | null | tsrc/cli/push_gitlab.py | pdecat/tsrc | 472778a473a31a1dc1093f9a5487facbd0bd8643 | [
"BSD-3-Clause"
] | null | null | null | tsrc/cli/push_gitlab.py | pdecat/tsrc | 472778a473a31a1dc1093f9a5487facbd0bd8643 | [
"BSD-3-Clause"
] | 1 | 2020-09-03T13:34:42.000Z | 2020-09-03T13:34:42.000Z | """ Entry point for tsrc push """
import argparse
import itertools
import textwrap
from typing import cast, Any, List, Optional, Set # noqa
from gitlab import Gitlab
from gitlab.v4.objects import Group, User, Project, ProjectMergeRequest # noqa
from gitlab.exceptions import GitlabGetError
import cli_ui as ui
impo... | 32.814229 | 88 | 0.615635 |
5d139187634ef241474fa9e650422f41e4ddebfb | 10,237 | py | Python | pirates/piratesgui/BarSelectionMenu.py | ksmit799/POTCO-PS | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 8 | 2017-01-24T04:33:29.000Z | 2020-11-01T08:36:24.000Z | pirates/piratesgui/BarSelectionMenu.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 1 | 2017-03-02T18:05:17.000Z | 2017-03-14T06:47:10.000Z | pirates/piratesgui/BarSelectionMenu.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 11 | 2017-03-02T18:46:07.000Z | 2020-11-01T08:36:26.000Z | # File: B (Python 2.4)
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from direct.directnotify import DirectNotifyGlobal
from otp.otpbase import OTPGlobals
from pirates.piratesgui import GuiPanel
from pirates.piratesgui import PiratesGuiGlobals
from pirates.piratesbase import PiratesGlobals
from ... | 43.194093 | 468 | 0.598027 |
997cb518a502a972e8451aeb1077e55a7d95d3dc | 6,719 | py | Python | trading_calendars/exchange_calendar_xlon.py | quantrocket-llc/trading-calendars | b72630cbcb288601c62e61ebe002a9043f9a3112 | [
"Apache-2.0"
] | 1 | 2020-07-25T06:18:30.000Z | 2020-07-25T06:18:30.000Z | trading_calendars/exchange_calendar_xlon.py | quantrocket-llc/trading-calendars | b72630cbcb288601c62e61ebe002a9043f9a3112 | [
"Apache-2.0"
] | 13 | 2021-04-13T06:49:23.000Z | 2022-03-31T00:08:10.000Z | trading_calendars/exchange_calendar_xlon.py | quantrocket-llc/trading-calendars | b72630cbcb288601c62e61ebe002a9043f9a3112 | [
"Apache-2.0"
] | 3 | 2020-03-05T23:38:14.000Z | 2021-12-12T00:31:36.000Z | #
# Copyright 2018 Quantopian, 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 wr... | 26.983936 | 78 | 0.624647 |
e16aaeda942a9674b7961745ac3e32c66b6f513c | 53,758 | py | Python | tests/forte/pipeline_test.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | tests/forte/pipeline_test.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | tests/forte/pipeline_test.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"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 ... | 34.504493 | 80 | 0.600804 |
0801d3dca72ff1c72d68b0c358bef190ef3ef699 | 599 | py | Python | Pd patch and scripts/listener.py | Apolotary/NetsendPD | 8a407a8c0b33b0352b2b1a4877f68f1ffbd6c00a | [
"MIT"
] | 1 | 2016-06-03T05:46:01.000Z | 2016-06-03T05:46:01.000Z | Pd patch and scripts/listener.py | Apolotary/NetsendPD | 8a407a8c0b33b0352b2b1a4877f68f1ffbd6c00a | [
"MIT"
] | null | null | null | Pd patch and scripts/listener.py | Apolotary/NetsendPD | 8a407a8c0b33b0352b2b1a4877f68f1ffbd6c00a | [
"MIT"
] | null | null | null | from zeroconf import raw_input, ServiceBrowser, Zeroconf
import socket
class MyListener(object):
def removeService(self, zeroconf, type, name):
print("Service %s removed" % (name,))
def addService(self, zeroconf, type, name):
info = zeroconf.getServiceInfo(type, name)
print("Service %s... | 31.526316 | 106 | 0.69783 |
038ddef0c2e56da50d496bc159b36f480bebe911 | 599 | py | Python | sphinx-sources/Examples/Commands/PipFFT.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | 132 | 2017-03-15T15:28:46.000Z | 2022-03-09T00:28:25.000Z | sphinx-sources/Examples/Commands/PipFFT.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | 63 | 2017-01-26T15:46:55.000Z | 2022-01-25T04:50:59.000Z | sphinx-sources/Examples/Commands/PipFFT.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | 37 | 2017-02-17T16:11:38.000Z | 2022-01-25T18:03:47.000Z | from LightPipes import *
import matplotlib.pyplot as plt
size=15*mm
wavelength=1*um
N=150
z=1*m
R=3*mm
Rf=1.5*mm
seed=7
MaxPhase=1.5
F=Begin(size,wavelength,N);
F=CircAperture(R,0,0,F);
F=RandomPhase(seed,MaxPhase,F);
F=Fresnel(z,F);
I0=Intensity(0,F);
F=PipFFT(1,F);
F=CircAperture(Rf,0,0,F);
F=PipFFT(-1,F);
I1=Inte... | 19.966667 | 85 | 0.714524 |
5378e86f70c9c7ed7f9ea4dc1e62bf6c49a5b37f | 3,413 | py | Python | access_face_vision/source/camera.py | accessai/access-face-vision | 04469ebc03ac9644a44bbdb90951f1821dca0f6d | [
"Apache-2.0"
] | 3 | 2019-07-19T17:59:19.000Z | 2019-07-21T16:07:43.000Z | access_face_vision/source/camera.py | accessai/access-face-vision | 04469ebc03ac9644a44bbdb90951f1821dca0f6d | [
"Apache-2.0"
] | 9 | 2019-07-19T17:38:11.000Z | 2022-03-11T23:53:13.000Z | access_face_vision/source/camera.py | accessai/access-face-vision | 04469ebc03ac9644a44bbdb90951f1821dca0f6d | [
"Apache-2.0"
] | 1 | 2019-07-21T16:07:54.000Z | 2019-07-21T16:07:54.000Z | import signal
from time import time, sleep
import math
import cv2
from access_face_vision import utils
from access_face_vision.component import AccessComponent
from access_face_vision.access_logger import get_logger
class Camera(AccessComponent):
def __init__(self, cmd_args, out_queue, log_que, log_level, kill... | 33.135922 | 115 | 0.59625 |
30bf378a5a5aad17ddb190315250c16fe2123069 | 135 | py | Python | textattack/constraints/grammaticality/__init__.py | tahmid-kazi/TextAttack | cc6f9af25df0f14a23ca11f8380b83c160aeb5bc | [
"MIT"
] | 1 | 2020-12-04T18:05:44.000Z | 2020-12-04T18:05:44.000Z | textattack/constraints/grammaticality/__init__.py | tahmid-kazi/TextAttack | cc6f9af25df0f14a23ca11f8380b83c160aeb5bc | [
"MIT"
] | null | null | null | textattack/constraints/grammaticality/__init__.py | tahmid-kazi/TextAttack | cc6f9af25df0f14a23ca11f8380b83c160aeb5bc | [
"MIT"
] | null | null | null | from . import language_models
from .language_tool import LanguageTool
from .part_of_speech import PartOfSpeech
from .cola import COLA
| 22.5 | 40 | 0.844444 |
edcc4626acba4faf33d6ded9b81857357293b4f6 | 935 | py | Python | azure-iot-hub/azure/iot/hub/protocol/models/interface.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | null | null | null | azure-iot-hub/azure/iot/hub/protocol/models/interface.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | null | null | null | azure-iot-hub/azure/iot/hub/protocol/models/interface.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 32.241379 | 76 | 0.542246 |
b5c456a5fcccaac9a49bcdbd3112af861154a385 | 340 | py | Python | src/vovaProject/urls.py | vova-lantsov-dev/django-library | a424416d7688cba1bdb2b6b918b3ae345d21932b | [
"MIT"
] | null | null | null | src/vovaProject/urls.py | vova-lantsov-dev/django-library | a424416d7688cba1bdb2b6b918b3ae345d21932b | [
"MIT"
] | null | null | null | src/vovaProject/urls.py | vova-lantsov-dev/django-library | a424416d7688cba1bdb2b6b918b3ae345d21932b | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('', include("main.urls")),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=s... | 26.153846 | 80 | 0.75 |
3a50749479507dff61e3b7a2099e7d9a726be4ab | 204 | py | Python | pvfit/modeling/double_diode/__init__.py | markcampanelli/pvfit | e526f3757279a3f8c41295aab94c1575ee9485fc | [
"MIT"
] | 4 | 2019-09-17T15:19:17.000Z | 2021-11-24T03:21:03.000Z | pvfit/modeling/double_diode/__init__.py | markcampanelli/pvfit-m | 6e2b9e0797b40de8eb587ec50102421cd2071b9e | [
"MIT"
] | 10 | 2019-08-09T15:40:51.000Z | 2019-09-06T06:06:20.000Z | pvfit/modeling/double_diode/__init__.py | markcampanelli/pvfit-m | 6e2b9e0797b40de8eb587ec50102421cd2071b9e | [
"MIT"
] | 2 | 2019-08-13T18:44:01.000Z | 2019-08-14T13:42:32.000Z | import logging
logging.warning("PVfit's pvit.modeling.double_diode package is in the alpha stage of development. "
"It's API can and will change and the algorithms are not well tested.")
| 40.8 | 99 | 0.72549 |
067060bd07031c801036c50bd02a72a082d4316d | 1,557 | py | Python | datafactory/__init__.py | righ/datafactory | 8299df4e29472381ccfe91535fdecf8e97a46d32 | [
"Apache-2.0"
] | 2 | 2015-07-09T08:49:32.000Z | 2015-09-04T13:43:40.000Z | datafactory/__init__.py | righ/datafactory | 8299df4e29472381ccfe91535fdecf8e97a46d32 | [
"Apache-2.0"
] | 1 | 2020-06-06T13:12:39.000Z | 2020-06-06T13:12:39.000Z | datafactory/__init__.py | righ/datafactory | 8299df4e29472381ccfe91535fdecf8e97a46d32 | [
"Apache-2.0"
] | 1 | 2020-11-06T08:11:51.000Z | 2020-11-06T08:11:51.000Z | # coding: utf-8
"""generate testdata.
"""
__author__ = "righ"
__author_email__ = "righ.m9@gmail.com"
__version__ = "1.0.0"
__license__ = "Apache License 2.0"
from .containers.dict import DictContainer
from .containers.list import ListContainer
from .containers.iter import IterContainer
from .models.list import List... | 20.76 | 63 | 0.747592 |
a6d2bd920a466f321c4426dfbd3c33f7be358067 | 694 | py | Python | app/core/migrations/0003_tag.py | Sahinovic/Ucenje | 41e6c7621e1433051541f9170ce68284d14673a3 | [
"MIT"
] | null | null | null | app/core/migrations/0003_tag.py | Sahinovic/Ucenje | 41e6c7621e1433051541f9170ce68284d14673a3 | [
"MIT"
] | null | null | null | app/core/migrations/0003_tag.py | Sahinovic/Ucenje | 41e6c7621e1433051541f9170ce68284d14673a3 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2021-03-24 23:55
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20210320_2305'),
]
operations = [
migrations.CreateMode... | 28.916667 | 118 | 0.622478 |
e968f2f715ed7c93e32acb4bb3677c7e21680141 | 411 | py | Python | main.py | rebeling/monday-morning-mite | 95fbd6d64e3578c183b097e9caeff974c2250afe | [
"MIT"
] | null | null | null | main.py | rebeling/monday-morning-mite | 95fbd6d64e3578c183b097e9caeff974c2250afe | [
"MIT"
] | null | null | null | main.py | rebeling/monday-morning-mite | 95fbd6d64e3578c183b097e9caeff974c2250afe | [
"MIT"
] | null | null | null | from mite_api import data_of_mite
from results import overview
# 1. get the entries from mite, default at=last_week
# 1.1 augment the data entries, parse note for ids and urls
# and access issue in specified source
user_data = data_of_mite()
print 'retrieved'
# 2. calculate velocity
from velocity import correlat... | 25.6875 | 59 | 0.778589 |
4a2e67895c275c24b37ae5d9e7e6dd89dd825946 | 132 | py | Python | tools/deployment/lsst_nb_deploy/__init__.py | michitaro/nublado | 777968007884bfff3938de6d4159f2b46affc3ff | [
"MIT"
] | null | null | null | tools/deployment/lsst_nb_deploy/__init__.py | michitaro/nublado | 777968007884bfff3938de6d4159f2b46affc3ff | [
"MIT"
] | null | null | null | tools/deployment/lsst_nb_deploy/__init__.py | michitaro/nublado | 777968007884bfff3938de6d4159f2b46affc3ff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from .deploy import LSSTNotebookAspectDeployment, standalone
from ._version import version_info, __version__
| 33 | 60 | 0.840909 |
9394886e7dd0ea22cda628750f8b373552e1f0f9 | 51,803 | py | Python | diofant/core/mul.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | 1 | 2021-08-22T09:34:15.000Z | 2021-08-22T09:34:15.000Z | diofant/core/mul.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | null | null | null | diofant/core/mul.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | null | null | null | import operator
from collections import defaultdict
from functools import reduce
from .basic import Basic
from .cache import cacheit
from .compatibility import default_sort_key
from .logic import _fuzzy_group, fuzzy_and, fuzzy_not
from .operations import AssocOp
from .singleton import S
from .sympify import sympify
... | 32.683281 | 99 | 0.474895 |
9f782d671214bf15a00bc23b4e0a6505faf2a73a | 1,644 | py | Python | python/tests/api/transforms/test_dates.py | moulimukherjee/incubator-iceberg | bf7edc4b325df6dd80d86fea0149d2be0ad09468 | [
"Apache-2.0"
] | 2,161 | 2020-05-28T01:20:01.000Z | 2022-03-31T14:48:04.000Z | python/tests/api/transforms/test_dates.py | moulimukherjee/incubator-iceberg | bf7edc4b325df6dd80d86fea0149d2be0ad09468 | [
"Apache-2.0"
] | 3,096 | 2020-05-27T20:57:13.000Z | 2022-03-31T22:55:42.000Z | python/tests/api/transforms/test_dates.py | moulimukherjee/incubator-iceberg | bf7edc4b325df6dd80d86fea0149d2be0ad09468 | [
"Apache-2.0"
] | 879 | 2020-05-28T01:20:01.000Z | 2022-03-31T12:48:48.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.533333 | 67 | 0.737226 |
391f400e251abaccfadc664248dfaa5037f257d0 | 5,555 | py | Python | docs/conf.py | grlee77/conda-build | ea99e2dc2fa473039dbeb73d92b3f5d5c59548fe | [
"BSD-3-Clause"
] | 1 | 2019-01-15T10:51:38.000Z | 2019-01-15T10:51:38.000Z | docs/conf.py | grlee77/conda-build | ea99e2dc2fa473039dbeb73d92b3f5d5c59548fe | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | grlee77/conda-build | ea99e2dc2fa473039dbeb73d92b3f5d5c59548fe | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup -----------------------------------------------------------... | 30.355191 | 79 | 0.647705 |
0f2da30ba9cdf5ac328a8c277a70369d1ce1ad16 | 707 | py | Python | Week5/Assignment 3.3.py | MXS11/Getting-Started-with-Python | 47f1e57bae4e26874380d85b9f1956a0c6e136dd | [
"MIT"
] | null | null | null | Week5/Assignment 3.3.py | MXS11/Getting-Started-with-Python | 47f1e57bae4e26874380d85b9f1956a0c6e136dd | [
"MIT"
] | null | null | null | Week5/Assignment 3.3.py | MXS11/Getting-Started-with-Python | 47f1e57bae4e26874380d85b9f1956a0c6e136dd | [
"MIT"
] | null | null | null | #3.3 Write a program to prompt for a score between 0.0 and 1.0. If the score is out of range, print an error. If the score is between 0.0 and 1.0, print a grade using the following table:
#Score Grade
#>= 0.9 A
#>= 0.8 B
#>= 0.7 C
#>= 0.6 D
#< 0.6 F
#If the user enters a value out of range, print a suitable error messa... | 21.424242 | 187 | 0.619519 |
44c359dd7a6561c9839f677cc7277bdce94abb90 | 2,930 | py | Python | python-crons/lib/mongoConnector.py | dantunescost/antunedo | b66517605f1231604aba620048eaca963ac2ae2b | [
"MIT"
] | null | null | null | python-crons/lib/mongoConnector.py | dantunescost/antunedo | b66517605f1231604aba620048eaca963ac2ae2b | [
"MIT"
] | null | null | null | python-crons/lib/mongoConnector.py | dantunescost/antunedo | b66517605f1231604aba620048eaca963ac2ae2b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import configparser
import os
from pymongo import MongoClient
path = os.path.dirname(os.path.abspath(__file__))
config = configparser.ConfigParser()
config.read(path + '''/../config/configuration.cfg''')
def connect_to_mongodb():
client = MongoClient(
'mon... | 28.173077 | 123 | 0.424573 |
0f3f8dd9464949474aa1514efd1e6b3d65b2f8df | 1,904 | py | Python | tests/test_minting_elders.py | cds95/crypto-champions | dcb759ae7ffd0c5335d17840bb3eace59e3b1f49 | [
"MIT"
] | 8 | 2021-03-27T00:52:51.000Z | 2021-09-17T18:03:43.000Z | tests/test_minting_elders.py | cds95/crypto-champions | dcb759ae7ffd0c5335d17840bb3eace59e3b1f49 | [
"MIT"
] | 1 | 2021-04-10T13:04:05.000Z | 2021-04-10T13:04:05.000Z | tests/test_minting_elders.py | cds95/crypto-champions | dcb759ae7ffd0c5335d17840bb3eace59e3b1f49 | [
"MIT"
] | 4 | 2021-03-31T07:37:56.000Z | 2021-08-31T11:28:45.000Z | import brownie
def test_mint_elder_initial_state_variable_elders_minted(accounts, crypto_champions):
assert crypto_champions.eldersInGame() == 0
def test_mint_first_elder_variable_elders_minted(accounts, crypto_champions, mint_first_elder):
assert crypto_champions.eldersInGame() == 1
def test_mint_elder_o... | 46.439024 | 129 | 0.772059 |
95ba6c7382991345fef8a39b38566983dd4299f0 | 13,877 | py | Python | DeepCellState.py | umarov90/DeepFake | e65c72f255817532e8a8a3afe2138ae270477601 | [
"Apache-2.0"
] | 3 | 2021-01-28T08:08:20.000Z | 2021-10-30T02:15:54.000Z | DeepCellState.py | umarov90/DeepCellState | e65c72f255817532e8a8a3afe2138ae270477601 | [
"Apache-2.0"
] | null | null | null | DeepCellState.py | umarov90/DeepCellState | e65c72f255817532e8a8a3afe2138ae270477601 | [
"Apache-2.0"
] | 1 | 2022-03-09T14:56:49.000Z | 2022-03-09T14:56:49.000Z | import argparse
import os
from scipy import stats
import deepfake
from figures import profiles_viz
from CellData import CellData
import numpy as np
import pandas as pd
import random
from shutil import copyfile
def get_options():
parser = argparse.ArgumentParser(description='Version: 1.0')
parser.add_argument('... | 56.640816 | 155 | 0.506594 |
62dd0caf71ae39a9a21f5bbced0c22c8a7504ad5 | 343 | py | Python | asper/admin.py | anshumanprajapatiap/thasperteam | 4593584dd8560dbf1e8ac39c8b4135234a87d9f6 | [
"MIT"
] | 1 | 2020-08-03T15:18:37.000Z | 2020-08-03T15:18:37.000Z | asper/admin.py | anshumanprajapatiap/thasperteam | 4593584dd8560dbf1e8ac39c8b4135234a87d9f6 | [
"MIT"
] | null | null | null | asper/admin.py | anshumanprajapatiap/thasperteam | 4593584dd8560dbf1e8ac39c8b4135234a87d9f6 | [
"MIT"
] | 2 | 2020-05-13T21:39:50.000Z | 2020-05-14T07:51:13.000Z | from django.contrib import admin
from .models import *
from import_export.admin import ImportExportModelAdmin
# Register your models here.
@admin.register(UserDetail, FirstTask,Project, DesignAssignment, DesignSubmit, WebAssignment, WebSubmit,AppAssignment, AppSubmit, UserSkills, UserPort)
class ViewAdmin(ImportExpo... | 34.3 | 151 | 0.830904 |
f1d5113661398df8973ddeed52223c377910df9e | 1,319 | py | Python | nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 2 | 2018-04-26T12:09:32.000Z | 2018-04-27T06:36:49.000Z | nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 1 | 2019-11-14T14:16:57.000Z | 2019-11-14T14:16:57.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..epi import EddyCorrect
def test_EddyCorrect_inputs():
input_map = dict(
args=dict(argstr='%s', ),
environ=dict(
nohash=True,
usedefault=True,
),
in_file=dict(
argstr='%s',
e... | 28.673913 | 67 | 0.551175 |
88f776c99b006341ee07b28705c308b119eb4048 | 8,281 | py | Python | NMTK_apps/NMTK_server/validation/tool_config_validator.py | jrawbits/nmtk-1 | 759781770b5f2464008ceb5376fd3922b1b877fa | [
"Unlicense"
] | null | null | null | NMTK_apps/NMTK_server/validation/tool_config_validator.py | jrawbits/nmtk-1 | 759781770b5f2464008ceb5376fd3922b1b877fa | [
"Unlicense"
] | null | null | null | NMTK_apps/NMTK_server/validation/tool_config_validator.py | jrawbits/nmtk-1 | 759781770b5f2464008ceb5376fd3922b1b877fa | [
"Unlicense"
] | null | null | null | import json
from NMTK_server import models
import decimal
import collections
import logging
logger = logging.getLogger(__name__)
class ToolConfigValidator(object):
def __init__(self, job, file_config, tool_config):
self.job = job
self.file_config = file_config
self.tool_config = tool_conf... | 42.466667 | 92 | 0.457433 |
5595ac0362ead28f6b05314134705270096c7ea7 | 360 | py | Python | compute.py | pltrdy/krypton-mining-calculator | 97f8417e7b911e68105e0333a69d5e31258cf523 | [
"MIT"
] | null | null | null | compute.py | pltrdy/krypton-mining-calculator | 97f8417e7b911e68105e0333a69d5e31258cf523 | [
"MIT"
] | null | null | null | compute.py | pltrdy/krypton-mining-calculator | 97f8417e7b911e68105e0333a69d5e31258cf523 | [
"MIT"
] | null | null | null | import requests
import json
import sys
import time
from api import *
blockTime = get_block_time()
difficulty = get_difficulty()
usd_price = get_usd_price()
data = {
'blockTime': blockTime,
'difficulty': difficulty,
'priceUsd': usd_price,
'lastUpdate': time.time(),
}
file(sys.argv[1], 'w').write('ethe... | 18.947368 | 73 | 0.683333 |
31871a62a1380485037700c4cdfee9b281b23131 | 1,126 | py | Python | src/lvgl/scripts/lv_conf_checker.py | sparquay/TTGO_TWatch_Library | 4f37e5f31f3d02f436183590a056f90a221721b6 | [
"MIT"
] | 1 | 2020-04-15T15:04:24.000Z | 2020-04-15T15:04:24.000Z | lvgl/scripts/lv_conf_checker.py | jc1995wade/mx287_littlevGL | e32bb55260dfb5ca87b0a47ffcc19d9de6685c64 | [
"MIT"
] | null | null | null | lvgl/scripts/lv_conf_checker.py | jc1995wade/mx287_littlevGL | e32bb55260dfb5ca87b0a47ffcc19d9de6685c64 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.6
'''
Generates a checker file for lv_conf.h from lv_conf_templ.h define all the not defined values
'''
import re
fin = open("../lv_conf_template.h", "r")
fout = open("../src/lv_conf_checker.h", "w")
fout.write(
'''/**
* GENERATED FILE, DO NOT EDIT IT!
* @file lv_conf_chec... | 18.459016 | 94 | 0.563943 |
a90e1741bacbbb6aab236e1e5b8decab84f67a7e | 2,513 | py | Python | Adafree_simpletest.py | Richard-Kirby/oscope | 9f0b849176cafdf805c0f080ed54f87f3c39c54b | [
"MIT"
] | null | null | null | Adafree_simpletest.py | Richard-Kirby/oscope | 9f0b849176cafdf805c0f080ed54f87f3c39c54b | [
"MIT"
] | null | null | null | Adafree_simpletest.py | Richard-Kirby/oscope | 9f0b849176cafdf805c0f080ed54f87f3c39c54b | [
"MIT"
] | null | null | null | # Simple example of reading the MCP3008 analog input channels and printing
# them all out.
# Author: Tony DiCola
# License: Public Domain
import time
import spidev
import time
import os
import csv
# Open SPI bus
spi = spidev.SpiDev()
spi.open(0, 0)
spi.max_speed_hz = 1250000
# Function to read SPI data from MCP300... | 24.163462 | 107 | 0.588938 |
a0099c35b1e2ce61075a8b4a947d454ce9daf539 | 493 | py | Python | application/__init__.py | numkem/pycollect-web | 1513d6033d7a865035c70e417f1dfcdf30454892 | [
"MIT"
] | null | null | null | application/__init__.py | numkem/pycollect-web | 1513d6033d7a865035c70e417f1dfcdf30454892 | [
"MIT"
] | null | null | null | application/__init__.py | numkem/pycollect-web | 1513d6033d7a865035c70e417f1dfcdf30454892 | [
"MIT"
] | null | null | null | from flask import Flask
from flask.ext.bower import Bower
from flask.ext.pymongo import PyMongo
from flask.ext.login import LoginManager
from flask.ext.bootstrap import Bootstrap
from flask.ext.debugtoolbar import DebugToolbarExtension
import logging
app = Flask('application')
app.config.from_pyfile('../etc/config.cf... | 22.409091 | 56 | 0.793103 |
bbaddb91930814906346f9aff0e92ca1c513abc4 | 727 | py | Python | cibyl/exceptions/jenkins_job_builder.py | snippergoals/cibyl | 1721450532593c86acaf3aff3c5a60d48213d38b | [
"Apache-2.0"
] | null | null | null | cibyl/exceptions/jenkins_job_builder.py | snippergoals/cibyl | 1721450532593c86acaf3aff3c5a60d48213d38b | [
"Apache-2.0"
] | null | null | null | cibyl/exceptions/jenkins_job_builder.py | snippergoals/cibyl | 1721450532593c86acaf3aff3c5a60d48213d38b | [
"Apache-2.0"
] | null | null | null | """
# Copyright 2022 Red Hat
#
# 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 agr... | 36.35 | 78 | 0.724897 |
4e5ed334cfdad015ad168b7a5686c8c3632f4677 | 587 | py | Python | examples/022_robot_from_github.py | weichengyuan1226/MAS-2021_compas_fab_intro | 55e82fa70aea0c4b6cf5072505f531ea7967f7f3 | [
"MIT"
] | 64 | 2019-08-07T07:19:06.000Z | 2022-03-22T16:48:23.000Z | examples/022_robot_from_github.py | weichengyuan1226/MAS-2021_compas_fab_intro | 55e82fa70aea0c4b6cf5072505f531ea7967f7f3 | [
"MIT"
] | 228 | 2019-07-08T07:55:30.000Z | 2022-03-25T16:39:17.000Z | examples/022_robot_from_github.py | weichengyuan1226/MAS-2021_compas_fab_intro | 55e82fa70aea0c4b6cf5072505f531ea7967f7f3 | [
"MIT"
] | 18 | 2019-08-04T16:42:37.000Z | 2022-01-12T18:36:06.000Z | import compas
from compas.robots import GithubPackageMeshLoader
from compas.robots import RobotModel
# Set high precision to import meshes defined in meters
compas.PRECISION = '12f'
# Select Github repository, package and branch where the model is stored
repository = 'ros-industrial/abb'
package = 'abb_irb6600_suppor... | 25.521739 | 72 | 0.800681 |
a1320dc343ecd487fcd5a8118a2ae86ec99572d8 | 2,112 | py | Python | diofant/tests/series/test_residues.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | 1 | 2021-08-22T09:34:15.000Z | 2021-08-22T09:34:15.000Z | diofant/tests/series/test_residues.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | null | null | null | diofant/tests/series/test_residues.py | project-kotinos/diofant___diofant | 882549ac3a4dac238695aa620c02fce6ca33f9d3 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from diofant import (Function, I, Rational, Symbol, exp, factorial, log, pi,
residue, root, sin)
from diofant.abc import a, s, x, z
__all__ = ()
def test_basic1():
assert residue(1/x, x, 0) == 1
assert residue(-2/x, x, 0) == -2
assert residue(81/x, x, 0) == 81
ass... | 27.076923 | 76 | 0.534564 |
0b7dfde95d8ed998fc099b417bb073ca0e14f5b2 | 997 | py | Python | benchmark/tests/test_18.py | trxw/qutip | b923c973edd9a071d86eb849650661549f73585f | [
"BSD-3-Clause"
] | 1 | 2015-11-06T06:35:06.000Z | 2015-11-06T06:35:06.000Z | benchmark/tests/test_18.py | trxw/qutip | b923c973edd9a071d86eb849650661549f73585f | [
"BSD-3-Clause"
] | null | null | null | benchmark/tests/test_18.py | trxw/qutip | b923c973edd9a071d86eb849650661549f73585f | [
"BSD-3-Clause"
] | null | null | null | from qutip import *
from numpy import *
from time import time
def test_18(runs=1):
"""
dissipative trilinear hamiltonian
"""
test_name='trilinear MC_F90 [3375]'
N0=15
N1=15
N2=15
gamma0=0.01
gamma1=0.05
gamma2=0.05
alpha=2
tlist=linspace(0,5,200)
a0=tensor(destroy(N0... | 23.186047 | 77 | 0.601805 |
e4cb2e216f3027a3103fb2376b186a7f9c2f4df5 | 3,068 | py | Python | improvement_over_1m/efficiency_exp_its_the_end.py | dalakada/TwiCSv2 | 40672a99a201f6e2aab9dd085e1f4a29e8253f3b | [
"MIT"
] | 2 | 2019-04-01T00:54:39.000Z | 2021-06-22T18:02:47.000Z | improvement_over_1m/efficiency_exp_its_the_end.py | dalakada/TwiCSv2 | 40672a99a201f6e2aab9dd085e1f4a29e8253f3b | [
"MIT"
] | null | null | null | improvement_over_1m/efficiency_exp_its_the_end.py | dalakada/TwiCSv2 | 40672a99a201f6e2aab9dd085e1f4a29e8253f3b | [
"MIT"
] | 2 | 2018-06-20T14:50:03.000Z | 2020-08-27T01:55:34.000Z |
#import SatadishaModule as phase1
import SatadishaModule_final_trie as phase1
import phase2_Trie as phase2
import datetime
from threading import Thread
import random
import math
from queue import Queue
import pandas as pd
import warnings
import numpy as np
import time
import trie as trie
import pickle
import matplot... | 25.566667 | 235 | 0.771186 |
e0ae48767c961007f511a77e018b364c76f5b7ba | 8,218 | py | Python | pyzo/codeeditor/style.py | l33tlinuxh4x0r/pyzo | 1e5e1cea6345dc8f78ab93321a7f9a01f8101be0 | [
"BSD-2-Clause"
] | 235 | 2016-03-05T17:12:12.000Z | 2022-03-22T06:35:45.000Z | pyzo/codeeditor/style.py | l33tlinuxh4x0r/pyzo | 1e5e1cea6345dc8f78ab93321a7f9a01f8101be0 | [
"BSD-2-Clause"
] | 423 | 2016-02-15T20:23:46.000Z | 2022-03-26T16:36:37.000Z | pyzo/codeeditor/style.py | l33tlinuxh4x0r/pyzo | 1e5e1cea6345dc8f78ab93321a7f9a01f8101be0 | [
"BSD-2-Clause"
] | 115 | 2016-04-01T14:31:33.000Z | 2022-03-17T10:59:45.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2013, the codeeditor development team
#
# Pyzo is distributed under the terms of the 2-Clause BSD License.
# The full license can be found in 'license.txt'.
""" Modyule style
Provides basic functionaliy for styling.
Styling is done using a dictionary of StyleFormat instances. ... | 32.482213 | 87 | 0.607934 |
691348f4469a848ad7efb8542fb5c3695a43b27f | 1,729 | py | Python | lib/mpvariable.py | chuanglaipv/realtime_object_detection_xavier | 694c91db953a2e18440fcdcf5f38df90ba063bfc | [
"MIT"
] | 102 | 2018-04-11T09:32:16.000Z | 2021-11-04T16:52:09.000Z | lib/mpvariable.py | chuanglaipv/realtime_object_detection_xavier | 694c91db953a2e18440fcdcf5f38df90ba063bfc | [
"MIT"
] | 24 | 2018-08-08T11:42:27.000Z | 2021-01-15T16:09:34.000Z | lib/mpvariable.py | chuanglaipv/realtime_object_detection_xavier | 694c91db953a2e18440fcdcf5f38df90ba063bfc | [
"MIT"
] | 39 | 2018-05-23T08:34:00.000Z | 2020-04-07T12:01:57.000Z | import multiprocessing
import ctypes
class MPVariable():
"""
SHARED VARIABLES IN MULTIPROSESSING
"""
running = multiprocessing.Value(ctypes.c_bool,True)
frame_counter = multiprocessing.Value(ctypes.c_int,0)
fps = multiprocessing.Value(ctypes.c_float,0.0)
fps_frames = multiprocessing.Value(c... | 43.225 | 96 | 0.748988 |
7cea8f3abfc8c5518d16914018b2328570c1ef47 | 5,110 | py | Python | api-dev/venv/lib/python3.6/site-packages/ethpm/_utils/deployments.py | twaddle-dev/CoVid-19 | 37b1ca12d7ca1a066ab1c0d4a02d9b038d44e62f | [
"Apache-2.0"
] | 1 | 2021-05-15T12:00:27.000Z | 2021-05-15T12:00:27.000Z | api-dev/venv/lib/python3.6/site-packages/ethpm/_utils/deployments.py | twaddle-dev/CoVid-19 | 37b1ca12d7ca1a066ab1c0d4a02d9b038d44e62f | [
"Apache-2.0"
] | null | null | null | api-dev/venv/lib/python3.6/site-packages/ethpm/_utils/deployments.py | twaddle-dev/CoVid-19 | 37b1ca12d7ca1a066ab1c0d4a02d9b038d44e62f | [
"Apache-2.0"
] | null | null | null | from typing import (
Any,
Dict,
Generator,
List,
Tuple,
)
from eth_utils import (
is_same_address,
to_bytes,
to_tuple,
)
from eth_utils.toolz import (
get_in,
)
from hexbytes import (
HexBytes,
)
from ethpm.exceptions import (
BytecodeLinkingError,
EthPMValidationError,... | 37.29927 | 99 | 0.609002 |
7bc430ae43af9e038362d1e563a67ef9530d7b0d | 1,291 | py | Python | client/paddleflow/common/exception/paddleflow_sdk_exception.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 23 | 2021-12-31T02:36:13.000Z | 2022-03-29T07:38:43.000Z | client/paddleflow/common/exception/paddleflow_sdk_exception.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 10 | 2022-01-05T08:47:37.000Z | 2022-03-29T11:59:43.000Z | client/paddleflow/common/exception/paddleflow_sdk_exception.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 19 | 2021-12-30T14:37:24.000Z | 2022-03-23T03:30:32.000Z | """
Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
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 agre... | 29.340909 | 74 | 0.687064 |
f93c32b9c9f39627ec16f71bb3ca94f9a868b7f3 | 3,041 | py | Python | venv/Lib/site-packages/metapensiero/pj/js_ast/expressions.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/metapensiero/pj/js_ast/expressions.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/metapensiero/pj/js_ast/expressions.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
# :Project: metapensiero.pj -- expressions
# :Created: gio 08 feb 2018 02:46:38 CET
# :Author: Alberto Berti <alberto@metapensiero.it>
# :License: GNU General Public License version 3 or later
# :Copyright: © 2018 Alberto Berti
#
import re
from .base import JSNode
from .operators impo... | 24.134921 | 67 | 0.575469 |
1eec338d37ad13ab8ee997842984844664473e20 | 5,698 | py | Python | Deep Learning nano degree/sagemaker-deployment/train.py | farabi1038/Online-Course-Project | 9471a6ed616a08cbacbf8db402cedbe465fe261f | [
"MIT"
] | 2 | 2020-08-07T07:59:53.000Z | 2021-05-09T18:11:06.000Z | Deep Learning nano degree/sagemaker-deployment/train.py | farabi1038/Online-Course-Project | 9471a6ed616a08cbacbf8db402cedbe465fe261f | [
"MIT"
] | null | null | null | Deep Learning nano degree/sagemaker-deployment/train.py | farabi1038/Online-Course-Project | 9471a6ed616a08cbacbf8db402cedbe465fe261f | [
"MIT"
] | null | null | null | import argparse
import json
import os
import pickle
import sys
import sagemaker_containers
import pandas as pd
import torch
import torch.optim as optim
import torch.utils.data
from model import LSTMClassifier
def model_fn(model_dir):
"""Load the PyTorch model from the `model_dir` directory."""
print("Loading ... | 37.486842 | 107 | 0.660407 |
d84fb8cd889d52fc36c2d4abd94bac62e69f2a85 | 7,003 | py | Python | Models/regressionTemplateTF/model.py | UTS-AnimalLogicAcademy/nuke-ML-server | 3bec5e9efc1f3101e7506401eb57e7b8c955f84c | [
"Apache-2.0"
] | 123 | 2019-05-14T19:50:42.000Z | 2022-03-21T11:32:30.000Z | Models/regressionTemplateTF/model.py | UTS-AnimalLogicAcademy/nuke-ML-server | 3bec5e9efc1f3101e7506401eb57e7b8c955f84c | [
"Apache-2.0"
] | 30 | 2019-05-23T18:48:29.000Z | 2021-06-26T01:17:13.000Z | Models/regressionTemplateTF/model.py | UTS-AnimalLogicAcademy/nuke-ML-server | 3bec5e9efc1f3101e7506401eb57e7b8c955f84c | [
"Apache-2.0"
] | 34 | 2019-05-14T17:43:26.000Z | 2021-11-10T23:53:02.000Z | # Copyright (c) 2020 Foundry.
#
# 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,... | 41.194118 | 100 | 0.630872 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.