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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6a952a0c6e9f23ef354e8ded859406787f17882c | 3,071 | py | Python | importgarmentdxf.py | r-tezuka/blender2.8_scale_and_location_changer_sample | 0c1b2d31adb0174c7634783ac91fb07650ba7b81 | [
"Apache-2.0"
] | null | null | null | importgarmentdxf.py | r-tezuka/blender2.8_scale_and_location_changer_sample | 0c1b2d31adb0174c7634783ac91fb07650ba7b81 | [
"Apache-2.0"
] | null | null | null | importgarmentdxf.py | r-tezuka/blender2.8_scale_and_location_changer_sample | 0c1b2d31adb0174c7634783ac91fb07650ba7b81 | [
"Apache-2.0"
] | null | null | null | import bpy
import math
import sys
############# lib ########################
def degToRad(deg):
return 2 * math.pi / 360 * deg
def getObjHeight(obj):
obj.select_set(True)
x, y, z = bpy.context.active_object.dimensions
return z
def getObjThickness(obj):
obj.select_set(True)
x, y, z = bpy.cont... | 29.815534 | 160 | 0.57929 |
d279e738ad2a40fd09f0d65e5a8cb2251f5d5a88 | 17,375 | py | Python | cogs/roles.py | 8ka1alu/vs-cog | d5729948c86ef2bd5f7a227e3514db055ccb652d | [
"MIT"
] | null | null | null | cogs/roles.py | 8ka1alu/vs-cog | d5729948c86ef2bd5f7a227e3514db055ccb652d | [
"MIT"
] | 2 | 2021-06-08T21:57:07.000Z | 2022-01-13T02:59:38.000Z | cogs/roles.py | 8ka1alu/vs-cog | d5729948c86ef2bd5f7a227e3514db055ccb652d | [
"MIT"
] | null | null | null | from discord.ext import commands # Bot Commands Frameworkのインポート
import discord
import asyncio
import random
import datetime
great_owner_id = 459936557432963103
# コグとして用いるクラスを定義。
class roles(commands.Cog):
# rolesクラスのコンストラクタ。Botを受取り、インスタンス変数として保持。
def __init__(self, bot):
self.bot = bot
# メインとなるro... | 46.333333 | 453 | 0.489784 |
a9945448e950e74e839a5caabd3f985c7f5082aa | 26,972 | py | Python | openstack-placement-1.0.0/placement/objects/allocation.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | openstack-placement-1.0.0/placement/objects/allocation.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | openstack-placement-1.0.0/placement/objects/allocation.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 43.363344 | 79 | 0.671622 |
3646b926f12f2186bbb7023c94eabfc5c300fb9f | 9,143 | py | Python | bcipy/acquisition/protocols/lsl/lsl_connector.py | mberkanbicer/BciPy | c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a | [
"MIT"
] | 32 | 2020-11-13T17:53:25.000Z | 2022-03-24T21:12:31.000Z | bcipy/acquisition/protocols/lsl/lsl_connector.py | mberkanbicer/BciPy | c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a | [
"MIT"
] | 20 | 2020-12-02T17:40:42.000Z | 2022-03-16T16:38:05.000Z | bcipy/acquisition/protocols/lsl/lsl_connector.py | mberkanbicer/BciPy | c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a | [
"MIT"
] | 10 | 2020-12-16T02:32:37.000Z | 2022-03-23T16:31:59.000Z | # pylint: disable=fixme
"""Defines the driver for the Device for communicating with
LabStreamingLayer (LSL)."""
import logging
from typing import List, Dict, Any
import pylsl
from bcipy.acquisition.protocols.connector import Connector
from bcipy.acquisition.connection_method import ConnectionMethod
from bcipy.acquisit... | 37.937759 | 98 | 0.631084 |
119b24f7e581ff5f9dd8ad6ea105caaa42a9c5c6 | 455 | py | Python | day-06/part-2/loic.py | lypnol/adventofcode-2017 | 03ced3df3eb80e5c7965c4120e3932919067cb15 | [
"MIT"
] | 16 | 2017-12-02T11:56:25.000Z | 2018-02-10T15:09:23.000Z | day-06/part-2/loic.py | lypnol/adventofcode-2017 | 03ced3df3eb80e5c7965c4120e3932919067cb15 | [
"MIT"
] | 19 | 2017-12-01T07:54:22.000Z | 2017-12-19T17:41:02.000Z | day-06/part-2/loic.py | lypnol/adventofcode-2017 | 03ced3df3eb80e5c7965c4120e3932919067cb15 | [
"MIT"
] | 4 | 2017-12-04T23:58:12.000Z | 2018-02-01T08:53:16.000Z | from submission import Submission
class LoicSubmission(Submission):
def run(self, s):
d = [int(x) for x in s.split("\t")]
t = {}
compteur = 0
while tuple(d) not in t.keys():
t[tuple(d)] = compteur
compteur += 1
buffer = max(d)
i = d.index(buffer)
d = self.data_update(d, i)
return compteur... | 17.5 | 37 | 0.569231 |
177595074e038a6ad903261608c35330f2e36c77 | 923 | py | Python | bathroom/c.py | mahasak/codejam-2017 | d04bc16602b0babc4995b05def695d245e3ef490 | [
"MIT"
] | null | null | null | bathroom/c.py | mahasak/codejam-2017 | d04bc16602b0babc4995b05def695d245e3ef490 | [
"MIT"
] | null | null | null | bathroom/c.py | mahasak/codejam-2017 | d04bc16602b0babc4995b05def695d245e3ef490 | [
"MIT"
] | null | null | null | import sys
def solve(n,k):
if k == 1:
if n == 1:
return [0,0]
else:
(l,x) = divmod(n-1, 2)
if x == 0:
m = l
else:
m = l + 1
return [m,l];
else:
(n1,m1) = divmod(n-1, 2)
(k1,m2) = divmod(k-1, 2)
if m1 == 0:
n2 = n1
else:
n2 =... | 17.092593 | 52 | 0.419285 |
1704a40681413e074c4882fa4b34f8f11861354b | 2,872 | py | Python | tests/test_xonfig.py | con-f-use/xonsh | bff0794b68f0d9266d8d920f10170c982927ccf6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/test_xonfig.py | con-f-use/xonsh | bff0794b68f0d9266d8d920f10170c982927ccf6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/test_xonfig.py | con-f-use/xonsh | bff0794b68f0d9266d8d920f10170c982927ccf6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """Tests the xonfig command.
Actually, just a down payment on a full test.
Currently exercises only these options:
- xonfig info
- xonfig jupyter_kernel
"""
import io
import re
import pytest # noqa F401
from xonsh.webconfig import main as web_main
from xonsh.xonfig import xonfig_main
def test_xonfg_he... | 25.192982 | 82 | 0.572772 |
0b424e1c4c035643aad07512c0b913ddcb3d2306 | 6,475 | py | Python | rl_utils.py | iwangjian/ByteCup2018 | c59c6a495f81c493eaaf7fda710c8acd7ef148b9 | [
"MIT"
] | 80 | 2018-09-08T01:11:36.000Z | 2022-01-18T13:41:30.000Z | rl_utils.py | Whoolly/ByteCup2018 | 348bdee3215c146ef7d6e4fe1fecbe4598798c8a | [
"MIT"
] | 3 | 2018-12-02T15:08:05.000Z | 2020-02-10T04:11:28.000Z | rl_utils.py | Whoolly/ByteCup2018 | 348bdee3215c146ef7d6e4fe1fecbe4598798c8a | [
"MIT"
] | 21 | 2018-10-27T07:40:25.000Z | 2022-03-28T12:30:01.000Z | """ RL training utilities"""
import math
from time import time
from datetime import timedelta
from cytoolz import concat
import numpy as np
import torch
from torch.nn import functional as F
from torch import autograd
from torch.nn.utils import clip_grad_norm_
from metric import compute_rouge_l, compute_rouge_n
from ... | 34.078947 | 79 | 0.57668 |
7563837b24e426cdfacd02440da5c55fc194bba4 | 1,223 | py | Python | setup.py | remingu/napalm-gaia | 7c8914b38d57f7e3274d0c07ae710eebdee59252 | [
"Apache-2.0"
] | 2 | 2020-03-06T01:38:05.000Z | 2020-06-03T23:52:15.000Z | setup.py | remingu/napalm-gaia | 7c8914b38d57f7e3274d0c07ae710eebdee59252 | [
"Apache-2.0"
] | 2 | 2020-02-28T14:00:09.000Z | 2020-03-18T23:19:57.000Z | setup.py | remingu/napalm-gaia | 7c8914b38d57f7e3274d0c07ae710eebdee59252 | [
"Apache-2.0"
] | 2 | 2020-04-22T14:32:06.000Z | 2021-02-19T02:06:08.000Z | from setuptools import setup, find_packages
from os import path
import sys
if sys.version_info < (3, 6):
sys.exit('Sorry, Python < 3.6 is not supported')
lpath = path.abspath(path.dirname(__file__))
with open(path.join(lpath, 'README.md'), encoding='utf-8') as fh:
long_description = fh.read()
with open(path... | 33.054054 | 92 | 0.690106 |
58294d1676c0ef0dac39744037a872b31e8afeaa | 1,226 | py | Python | pygaggle/data/convert_monot5_output_to_msmarco_run.py | Elfsong/pygaggle | 2bb2f0eb9cc34ac626ffb7648b73b4695468eba7 | [
"Apache-2.0"
] | 166 | 2020-04-24T10:15:34.000Z | 2022-03-29T23:00:58.000Z | pygaggle/data/convert_monot5_output_to_msmarco_run.py | Elfsong/pygaggle | 2bb2f0eb9cc34ac626ffb7648b73b4695468eba7 | [
"Apache-2.0"
] | 151 | 2020-04-25T16:40:15.000Z | 2022-03-12T01:00:02.000Z | pygaggle/data/convert_monot5_output_to_msmarco_run.py | Elfsong/pygaggle | 2bb2f0eb9cc34ac626ffb7648b73b4695468eba7 | [
"Apache-2.0"
] | 100 | 2020-04-24T20:53:13.000Z | 2022-03-22T21:29:02.000Z | """
This script convert monoT5 output file to msmarco run file
"""
import collections
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--t5_output", type=str, required=True,
help="tsv file with two columns, <label> and <score>")
parser.add_argument("--t5_output_ids", type=str... | 42.275862 | 99 | 0.663132 |
15a518c3791bf856c10ea93eab9f956e9767b6f5 | 2,484 | py | Python | dask_cuml/tests/test_linear_regression.py | deltadu/dask-cuml | bafe79addf6d5e98401e990cc08e1ba176ba4362 | [
"Apache-2.0"
] | 18 | 2019-03-08T05:26:50.000Z | 2021-11-08T12:09:41.000Z | dask_cuml/tests/test_linear_regression.py | deltadu/dask-cuml | bafe79addf6d5e98401e990cc08e1ba176ba4362 | [
"Apache-2.0"
] | 37 | 2019-03-08T01:18:02.000Z | 2019-07-26T20:04:31.000Z | dask_cuml/tests/test_linear_regression.py | deltadu/dask-cuml | bafe79addf6d5e98401e990cc08e1ba176ba4362 | [
"Apache-2.0"
] | 16 | 2019-03-07T23:50:00.000Z | 2020-09-30T19:13:11.000Z | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 28.883721 | 77 | 0.675523 |
1444f01e68cf4636417d471309fdf417ef5536f9 | 619 | py | Python | fastreid/modeling/backbones/__init__.py | qslia/fast-reid | 4508251d7439c6c20e8e2d9573c6123b1f388cc5 | [
"Apache-2.0"
] | 2,194 | 2020-04-06T01:37:56.000Z | 2022-03-30T22:17:28.000Z | fastreid/modeling/backbones/__init__.py | qslia/fast-reid | 4508251d7439c6c20e8e2d9573c6123b1f388cc5 | [
"Apache-2.0"
] | 542 | 2020-04-14T08:00:05.000Z | 2022-03-29T07:39:40.000Z | fastreid/modeling/backbones/__init__.py | qslia/fast-reid | 4508251d7439c6c20e8e2d9573c6123b1f388cc5 | [
"Apache-2.0"
] | 667 | 2020-04-08T02:06:03.000Z | 2022-03-29T00:57:32.000Z | # encoding: utf-8
"""
@author: liaoxingyu
@contact: sherlockliao01@gmail.com
"""
from .build import build_backbone, BACKBONE_REGISTRY
from .resnet import build_resnet_backbone
from .osnet import build_osnet_backbone
from .resnest import build_resnest_backbone
from .resnext import build_resnext_backbone
from .regnet ... | 32.578947 | 64 | 0.861066 |
a259a361be42a7caa7f72f962a8e6025c6ed6576 | 7,168 | py | Python | homeassistant/components/netgear_lte/__init__.py | jamiewalters/home-assistant | 83be1aed38a40b12a39055ad904e42277f9d3677 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/netgear_lte/__init__.py | jamiewalters/home-assistant | 83be1aed38a40b12a39055ad904e42277f9d3677 | [
"Apache-2.0"
] | 2 | 2019-04-15T02:43:04.000Z | 2019-04-15T02:49:10.000Z | homeassistant/components/netgear_lte/__init__.py | jamiewalters/home-assistant | 83be1aed38a40b12a39055ad904e42277f9d3677 | [
"Apache-2.0"
] | 1 | 2019-06-19T07:43:11.000Z | 2019-06-19T07:43:11.000Z | """Support for Netgear LTE modems."""
import asyncio
from datetime import timedelta
import logging
import aiohttp
import attr
import voluptuous as vol
from homeassistant.const import (
CONF_HOST, CONF_MONITORED_CONDITIONS, CONF_NAME, CONF_PASSWORD,
CONF_RECIPIENT, EVENT_HOMEASSISTANT_STOP)
from homeassistant.... | 29.619835 | 75 | 0.664342 |
1f94992e3c6e75ab9fe6c7457f79a0589c44a540 | 8,972 | py | Python | genrl/agents/deep/a2c/a2c.py | matrig/genrl | 25eb018f18a9a1d0865c16e5233a2a7ccddbfd78 | [
"MIT"
] | 390 | 2020-05-03T17:34:02.000Z | 2022-03-05T11:29:07.000Z | genrl/agents/deep/a2c/a2c.py | matrig/genrl | 25eb018f18a9a1d0865c16e5233a2a7ccddbfd78 | [
"MIT"
] | 306 | 2020-05-03T05:53:53.000Z | 2022-03-12T00:27:28.000Z | genrl/agents/deep/a2c/a2c.py | matrig/genrl | 25eb018f18a9a1d0865c16e5233a2a7ccddbfd78 | [
"MIT"
] | 64 | 2020-05-05T20:23:30.000Z | 2022-03-30T08:43:10.000Z | from typing import Any, Dict
import gym
import torch
import torch.optim as opt
from torch.nn import functional as F
from genrl.agents.deep.base import OnPolicyAgent
from genrl.utils import (
compute_returns_and_advantage,
get_env_properties,
get_model,
safe_mean,
)
class A2C(OnPolicyAgent):
"""A... | 37.383333 | 98 | 0.618034 |
93ef64d57bdefee99ddc0b9a65fbb5d93b4491a2 | 409 | py | Python | src/code-challenges/codewars/6KYU/spinWords/spin_words.py | maltewirz/code-challenges | 97777b10963f19bc587ddd984f0526b221c081f8 | [
"MIT"
] | 1 | 2020-08-30T07:52:20.000Z | 2020-08-30T07:52:20.000Z | src/code-challenges/codewars/6KYU/spinWords/spin_words.py | maltewirz/code-challenges | 97777b10963f19bc587ddd984f0526b221c081f8 | [
"MIT"
] | 6 | 2020-08-12T07:05:04.000Z | 2021-08-23T06:10:10.000Z | src/code-challenges/codewars/6KYU/spinWords/spin_words.py | maltewirz/code-challenges | 97777b10963f19bc587ddd984f0526b221c081f8 | [
"MIT"
] | null | null | null | # https://www.codewars.com/kata/5264d2b162488dc400000001/discuss/python
def spin_words(sentence):
wordList = sentence.split()
result = []
for word in wordList:
if len(word) >= 5:
result.append(word[::-1])
else:
result.append(word)
return " ".join(result)
# Alte... | 25.5625 | 79 | 0.591687 |
b43673ad24de6ae908850009df8fde50c0784ee8 | 605 | py | Python | accounts/views.py | vansjyo/OSVI-RemoteControl | 6d3dd6aa1cceac2254171d57b33975df08cda2a8 | [
"MIT"
] | null | null | null | accounts/views.py | vansjyo/OSVI-RemoteControl | 6d3dd6aa1cceac2254171d57b33975df08cda2a8 | [
"MIT"
] | null | null | null | accounts/views.py | vansjyo/OSVI-RemoteControl | 6d3dd6aa1cceac2254171d57b33975df08cda2a8 | [
"MIT"
] | null | null | null | # accounts/views.py
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
from django.views import generic
from django.contrib.auth import logout
from django.shortcuts import render
class SignUp(generic.CreateView):
form_class = UserCreationForm
success_url = reverse_lazy(... | 24.2 | 54 | 0.761983 |
569b61dfd0395059880f696b302b0ac634b1cc99 | 118 | py | Python | tests/context.py | ctcutler/dotty | 64d8dc47833e3a7ee73e26b1d2075c8f33b89601 | [
"MIT"
] | null | null | null | tests/context.py | ctcutler/dotty | 64d8dc47833e3a7ee73e26b1d2075c8f33b89601 | [
"MIT"
] | null | null | null | tests/context.py | ctcutler/dotty | 64d8dc47833e3a7ee73e26b1d2075c8f33b89601 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import dotty
| 19.666667 | 82 | 0.728814 |
fd0f0f500b9fe3a7c5b74b781968d71e6026afe6 | 61,450 | py | Python | src/signalalign/hiddenMarkovModel.py | kishwarshafin/signalAlign | c9b7b9232ef6fb76aa427670981c969b887f4860 | [
"MIT"
] | null | null | null | src/signalalign/hiddenMarkovModel.py | kishwarshafin/signalAlign | c9b7b9232ef6fb76aa427670981c969b887f4860 | [
"MIT"
] | null | null | null | src/signalalign/hiddenMarkovModel.py | kishwarshafin/signalAlign | c9b7b9232ef6fb76aa427670981c969b887f4860 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""hiddenMarkovModel.py contains objects for handling HMMs for SignalAlign"""
########################################################################
# File: hiddenMarkovModel.py
# executable: hiddenMarkovModel.py
#
# Author: Andrew Bailey
# History: 08/10/18 Created
############################... | 47.895557 | 150 | 0.59891 |
788426a5474cd746d7f96fcf02d96485c121e0bd | 33,818 | py | Python | Python Project Filter-Detect-GUI/mne/channels/layout.py | JulienL3vesque/Hexoskin_RnD_OSM | b524430d6f4b2b300d119b6a1586141e6c2d14a3 | [
"MIT"
] | null | null | null | Python Project Filter-Detect-GUI/mne/channels/layout.py | JulienL3vesque/Hexoskin_RnD_OSM | b524430d6f4b2b300d119b6a1586141e6c2d14a3 | [
"MIT"
] | null | null | null | Python Project Filter-Detect-GUI/mne/channels/layout.py | JulienL3vesque/Hexoskin_RnD_OSM | b524430d6f4b2b300d119b6a1586141e6c2d14a3 | [
"MIT"
] | null | null | null | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Marijn van Vliet <w.m.vanvliet@gmail.com>
# Jona Sassenhagen <jona.sass... | 34.472987 | 79 | 0.581406 |
22dd641ab6240b2e0b544b76878453bf59a0ebb0 | 40,749 | py | Python | raiden/tests/integration/long_running/test_settlement.py | sangaman/raiden | d67d780909148f34528e129fd777dbfcdf0322dc | [
"MIT"
] | null | null | null | raiden/tests/integration/long_running/test_settlement.py | sangaman/raiden | d67d780909148f34528e129fd777dbfcdf0322dc | [
"MIT"
] | null | null | null | raiden/tests/integration/long_running/test_settlement.py | sangaman/raiden | d67d780909148f34528e129fd777dbfcdf0322dc | [
"MIT"
] | null | null | null | import random
from hashlib import sha256
import gevent
import pytest
from eth_utils import to_checksum_address
from gevent.timeout import Timeout
from raiden import waiting
from raiden.api.python import RaidenAPI
from raiden.app import App
from raiden.constants import EMPTY_SIGNATURE, UINT64_MAX
from raiden.exception... | 38.118803 | 99 | 0.745859 |
2423ffc469cc6e0c034b440598188ef3c423d53b | 2,912 | py | Python | paddlenlp/datasets/paws-x.py | frozenfish123/PaddleNLP | b9c2910fb58730c8341067122c347cde5f6e7567 | [
"Apache-2.0"
] | 1 | 2021-06-24T05:27:43.000Z | 2021-06-24T05:27:43.000Z | paddlenlp/datasets/paws-x.py | liliustb/PaddleNLP | 17fe183370809337d42390c0842272cef87c5c9d | [
"Apache-2.0"
] | null | null | null | paddlenlp/datasets/paws-x.py | liliustb/PaddleNLP | 17fe183370809337d42390c0842272cef87c5c9d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle 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 appli... | 38.315789 | 90 | 0.614011 |
e76e51314471071f031712652fd054d6aaa72604 | 3,081 | py | Python | IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/positioning/ipositioning.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | 4 | 2016-03-30T14:31:52.000Z | 2019-02-02T05:01:32.000Z | IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/positioning/ipositioning.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | 1 | 2020-03-06T04:49:42.000Z | 2020-03-06T04:49:42.000Z | IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/positioning/ipositioning.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | 2 | 2019-08-30T23:36:13.000Z | 2019-11-08T16:52:01.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Positioning interfaces.
@since: 14.0
"""
from zope.interface import Attribute, Interface
class IPositioningReceiver(Interface):
"""
An interface for positioning providers.
"""
def positionReceived(latitude, long... | 25.675 | 79 | 0.610841 |
71165d46e57988f8d8a8cd5c927360532e66a108 | 1,238 | py | Python | wsgi/iportalen_django/articles/admin.py | I-sektionen/i-portalen | 1713e5814d40c0da1bf3278d60a561e7d3df3550 | [
"MIT"
] | 4 | 2016-09-21T17:06:01.000Z | 2018-02-06T16:36:44.000Z | wsgi/iportalen_django/articles/admin.py | I-sektionen/i-portalen | 1713e5814d40c0da1bf3278d60a561e7d3df3550 | [
"MIT"
] | 149 | 2016-03-07T23:50:47.000Z | 2022-03-11T23:16:33.000Z | wsgi/iportalen_django/articles/admin.py | I-sektionen/i-portalen | 1713e5814d40c0da1bf3278d60a561e7d3df3550 | [
"MIT"
] | 1 | 2016-03-07T23:02:06.000Z | 2016-03-07T23:02:06.000Z | from django.contrib import admin
from .models import Article, OtherAttachment, ImageAttachment
from utils.admin import HiddenModelAdmin, iportalen_admin_site, iportalen_superadmin_site
class OtherAttachmentInline(admin.StackedInline):
model = OtherAttachment
readonly_fields = ('file_name', 'file')
extra =... | 30.95 | 89 | 0.792407 |
a07dda4dd86c42beb7862d322a1190c7ad188672 | 1,580 | py | Python | tracker/covid_tracker/urls.py | mcdomx/marks-covid-tracker | df4cf1ba201e52d401f48c246f5f3a1b3de64752 | [
"MIT"
] | 1 | 2020-08-07T18:19:03.000Z | 2020-08-07T18:19:03.000Z | tracker/covid_tracker/urls.py | mcdomx/marks-covid-tracker | df4cf1ba201e52d401f48c246f5f3a1b3de64752 | [
"MIT"
] | 11 | 2021-06-09T17:46:15.000Z | 2022-03-12T00:58:34.000Z | tracker/covid_tracker/urls.py | mcdomx/marks-covid-tracker | df4cf1ba201e52d401f48c246f5f3a1b3de64752 | [
"MIT"
] | null | null | null | """tracker URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 43.888889 | 125 | 0.725949 |
eb92efcd56b3abff794d668211660aab2bf06c18 | 170 | py | Python | src/tarski/fstrips/hybrid/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 29 | 2018-11-26T20:31:04.000Z | 2021-12-29T11:08:40.000Z | src/tarski/fstrips/hybrid/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 101 | 2018-06-07T13:10:01.000Z | 2022-03-11T11:54:00.000Z | src/tarski/fstrips/hybrid/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 18 | 2018-11-01T22:44:39.000Z | 2022-02-28T04:57:15.000Z | from . problem import HybridProblem as Problem
from .. action import Action
from . reaction import Reaction
from . differential_constraints import DifferentialConstraint
| 34 | 61 | 0.841176 |
0f57afe4795d735aa9bd8669de5a5f70635c9f1a | 548 | py | Python | python/clockwork/tasks/variant_call_make_jobs_tsv.py | oxfordmmm/clockwork | be1f6ea49debf8cb2b8f1ba974df2dc567d150fd | [
"MIT"
] | 1 | 2020-01-10T06:43:39.000Z | 2020-01-10T06:43:39.000Z | python/clockwork/tasks/variant_call_make_jobs_tsv.py | oxfordmmm/clockwork | be1f6ea49debf8cb2b8f1ba974df2dc567d150fd | [
"MIT"
] | null | null | null | python/clockwork/tasks/variant_call_make_jobs_tsv.py | oxfordmmm/clockwork | be1f6ea49debf8cb2b8f1ba974df2dc567d150fd | [
"MIT"
] | null | null | null | import os
from clockwork import db, utils, lock_file
def run(options):
lock = lock_file.LockFile(os.path.join(options.pipeline_root, 'variant_call.lock'))
database = db.Db(options.db_config_file)
database.make_variant_call_or_mykrobe_jobs_tsv(
'variant_call',
options.outfile,
option... | 28.842105 | 87 | 0.709854 |
901679fad9a143adabd552efc1da4313ed599978 | 2,465 | py | Python | util/build_json.py | supernifty/wordnerd | 7433e6b5d8bb35c4fe56fead3f4b4fb4d9e349af | [
"MIT"
] | null | null | null | util/build_json.py | supernifty/wordnerd | 7433e6b5d8bb35c4fe56fead3f4b4fb4d9e349af | [
"MIT"
] | null | null | null | util/build_json.py | supernifty/wordnerd | 7433e6b5d8bb35c4fe56fead3f4b4fb4d9e349af | [
"MIT"
] | null | null | null | import json
import sys
# builds a sqlite db with words, writes to data.db
result = dict()
jsondata = {'words': [], 'definitions': []}
word_id = 0
def process( index_filename, data_filename ):
global result
global word_id
global jsondata
data = dict()
idx_file = open('wordnet/dict/%s' % inde... | 31.602564 | 123 | 0.585396 |
b5690332d31c1d08d73a322c61797181cc23a839 | 193 | py | Python | src/division.py | dashsanjay/calculationEngine | 9b7e57a15698e7c07961d178f65d9bd76e1afb78 | [
"MIT"
] | null | null | null | src/division.py | dashsanjay/calculationEngine | 9b7e57a15698e7c07961d178f65d9bd76e1afb78 | [
"MIT"
] | 1 | 2021-11-05T18:14:31.000Z | 2021-11-06T05:59:17.000Z | src/division.py | dashsanjay/calculationEngine | 9b7e57a15698e7c07961d178f65d9bd76e1afb78 | [
"MIT"
] | 4 | 2021-11-04T04:20:18.000Z | 2021-11-05T13:42:30.000Z | import math
def div(a, b):
#This program divides two numbers and return the result
if b==0:
return "Error" #if denominator is 0 then return error
result = a/b
return result
| 24.125 | 61 | 0.673575 |
0dadf09a19da3bcb93c120d662188d10200647b6 | 772 | py | Python | tensorflow_federated/python/learning/metrics/__init__.py | tensorflow/federated | 5748b1a7dc4a5be3b2b9da9959eabe586347078a | [
"Apache-2.0"
] | 1,918 | 2019-02-22T21:17:28.000Z | 2022-03-30T14:49:53.000Z | tensorflow_federated/python/learning/metrics/__init__.py | tensorflow/federated | 5748b1a7dc4a5be3b2b9da9959eabe586347078a | [
"Apache-2.0"
] | 999 | 2019-02-22T21:47:44.000Z | 2022-03-31T11:06:42.000Z | tensorflow_federated/python/learning/metrics/__init__.py | tensorflow/federated | 5748b1a7dc4a5be3b2b9da9959eabe586347078a | [
"Apache-2.0"
] | 498 | 2019-02-22T21:17:56.000Z | 2022-03-29T02:54:15.000Z | # Copyright 2021, The TensorFlow Federated 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... | 45.411765 | 96 | 0.784974 |
5df6f26c4e0f21ab4ae81b15b4866ca9ad4b0dd8 | 619 | bzl | Python | helpers/k8s.bzl | digital-peace-talks/argument-analysis-research | 587b52bedb79a0c9497b8c39ccc70edf4d165249 | [
"MIT"
] | null | null | null | helpers/k8s.bzl | digital-peace-talks/argument-analysis-research | 587b52bedb79a0c9497b8c39ccc70edf4d165249 | [
"MIT"
] | null | null | null | helpers/k8s.bzl | digital-peace-talks/argument-analysis-research | 587b52bedb79a0c9497b8c39ccc70edf4d165249 | [
"MIT"
] | null | null | null | _TEMPLATE = "//k8s:deploy.yaml"
def _template_manifest_impl(ctx):
name = '{}'.format(ctx.label).replace("//cmd/", "").replace("/", "-").split(":", 1)[0]
ctx.actions.expand_template(
template = ctx.file.template,
output = ctx.outputs.source_file,
substitutions = {
"{NAME}": name,
},
)
templ... | 24.76 | 88 | 0.621971 |
262e9f1bf454028942f80a8e6ca5d5ba0b8f50fb | 24,006 | py | Python | test/test_os_file_management.py | Wolkabout/WolkConnect-Python- | 11412e3f88911170f587b5e857d07ab41c8f52b5 | [
"Apache-2.0"
] | 6 | 2016-12-19T13:36:44.000Z | 2018-05-10T15:08:15.000Z | test/test_os_file_management.py | Wolkabout/WolkConnect-Python | 11412e3f88911170f587b5e857d07ab41c8f52b5 | [
"Apache-2.0"
] | 5 | 2019-02-23T09:37:12.000Z | 2021-09-17T13:54:58.000Z | test/test_os_file_management.py | Wolkabout/WolkConnect-Python- | 11412e3f88911170f587b5e857d07ab41c8f52b5 | [
"Apache-2.0"
] | 3 | 2016-08-15T22:19:00.000Z | 2017-12-28T09:48:37.000Z | """Tests for OSFileManagement."""
# Copyright 2020 WolkAbout Technology s.r.o.
#
# 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
#
#... | 38.907618 | 79 | 0.691994 |
434ff1e7ea6a21ec8114ecdab165b6ad70a88197 | 7,581 | py | Python | webapp/graphite/settings.py | graphite-server/graphite-web | ce985a1be41a26054e44a2d9d39047d6db6cb710 | [
"Apache-2.0"
] | 1 | 2016-12-20T13:42:47.000Z | 2016-12-20T13:42:47.000Z | webapp/graphite/settings.py | graphite-server/graphite-web | ce985a1be41a26054e44a2d9d39047d6db6cb710 | [
"Apache-2.0"
] | null | null | null | webapp/graphite/settings.py | graphite-server/graphite-web | ce985a1be41a26054e44a2d9d39047d6db6cb710 | [
"Apache-2.0"
] | null | null | null | """Copyright 2008 Orbitz WorldWide
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | 32.122881 | 109 | 0.758211 |
f5878773f846efd53f3c21d85b6c86a0a0c4ba01 | 1,212 | py | Python | userbot/plugins/gdaftrnoon.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | null | null | null | userbot/plugins/gdaftrnoon.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | 1 | 2022-01-09T11:35:06.000Z | 2022-01-09T11:35:06.000Z | userbot/plugins/gdaftrnoon.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | null | null | null | from . import *
@bot.on(admin_cmd(pattern="gdaftrnoon(.*)"))
async def xd(event):
await event.edit("Sending To all Group good AfterNoon")
event.pattern_match.group(1)
async for tele in borg.iter_dialogs():
if tele.is_group:
chat = tele.id
lol = 0
done = 0
... | 43.285714 | 519 | 0.356436 |
97af59d482d0997a9e5f45eb6466d03db9abe375 | 3,360 | py | Python | tests/test_parser.py | wenisman/grafyaml | 26e53da91426896d5877146fe3ec339a61ede8da | [
"Apache-2.0"
] | 8 | 2020-10-07T14:24:24.000Z | 2022-03-13T16:37:55.000Z | tests/test_parser.py | wenisman/grafyaml | 26e53da91426896d5877146fe3ec339a61ede8da | [
"Apache-2.0"
] | 1 | 2022-03-14T22:49:23.000Z | 2022-03-14T22:49:23.000Z | tests/test_parser.py | wenisman/grafyaml | 26e53da91426896d5877146fe3ec339a61ede8da | [
"Apache-2.0"
] | 5 | 2021-03-21T18:54:21.000Z | 2022-02-15T22:59:53.000Z | # Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 31.698113 | 76 | 0.56369 |
2ef0a118b29c2d6172f5cbbf76ae21a64df1a657 | 311 | py | Python | pyxif/__init__.py | zenwerk/Pyxif | 775f9329881368fed83e8c8b1a45321e627da40f | [
"MIT"
] | 1 | 2022-02-15T11:32:18.000Z | 2022-02-15T11:32:18.000Z | pyxif/__init__.py | zenwerk/Pyxif | 775f9329881368fed83e8c8b1a45321e627da40f | [
"MIT"
] | null | null | null | pyxif/__init__.py | zenwerk/Pyxif | 775f9329881368fed83e8c8b1a45321e627da40f | [
"MIT"
] | null | null | null | from ._remove import remove
from ._load_and_dump import load, dump, ImageGroup, PhotoGroup, GPSInfoGroup
from ._transplant import transplant
from ._insert import insert
try:
from ._thumbnail import thumbnail
except ImportError:
print("'thumbnail' function depends on PIL or Pillow.")
VERSION = '0.4.3' | 28.272727 | 76 | 0.778135 |
9ae5d8a6206320c841ce0a1490c09f5fc67db299 | 4,723 | py | Python | encode/mpeg-pcc-tmc13/encode_wrapper.py | haiqwang/pcb | 84eeb5ed9c758fd4a2f94c29ab8698ca84c73aea | [
"Apache-2.0"
] | 1 | 2021-04-25T01:39:26.000Z | 2021-04-25T01:39:26.000Z | encode/mpeg-pcc-tmc13/encode_wrapper.py | haiqwang/pcb | 84eeb5ed9c758fd4a2f94c29ab8698ca84c73aea | [
"Apache-2.0"
] | null | null | null | encode/mpeg-pcc-tmc13/encode_wrapper.py | haiqwang/pcb | 84eeb5ed9c758fd4a2f94c29ab8698ca84c73aea | [
"Apache-2.0"
] | 1 | 2021-04-26T12:04:29.000Z | 2021-04-26T12:04:29.000Z | '''
Python wrapper to encode with MPEG G-PCC standard
Author: Haiqiang Wang
Data: 04/22/2021
'''
import os
import re
import subprocess
def make_cfg(gpcc_bin_path, ref_path, cfg_dir, output_dir, g, c):
if not os.path.exists(cfg_dir):
os.makedirs(cfg_dir)
if not os.path.exists(output_dir):
os.... | 33.735714 | 127 | 0.620792 |
f156086a4021096c72fa404f371f4156551b1ceb | 23,371 | py | Python | utils/imagetools.py | s0hv/Not-a-bo | 6a6d5c4dfbfd7c0635e200d70fcaf7c12f8a009f | [
"MIT"
] | 6 | 2019-11-15T00:57:15.000Z | 2022-01-08T08:11:08.000Z | utils/imagetools.py | s0hv/Not-a-bo | 6a6d5c4dfbfd7c0635e200d70fcaf7c12f8a009f | [
"MIT"
] | null | null | null | utils/imagetools.py | s0hv/Not-a-bo | 6a6d5c4dfbfd7c0635e200d70fcaf7c12f8a009f | [
"MIT"
] | 3 | 2018-12-25T14:42:08.000Z | 2021-07-22T15:56:43.000Z | """
MIT License
Copyright (c) 2017 s0hvaperuna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... | 30.791831 | 146 | 0.607933 |
e3e215d1365d480faf7f2377496146b135e01e07 | 5,921 | py | Python | CIM100/IEC61968/AssetModels/ConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/IEC61968/AssetModels/ConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/IEC61968/AssetModels/ConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 52.866071 | 519 | 0.726735 |
9f8ce0fb9ba3ee0c3287dc7b188f1c855fee24bf | 2,276 | py | Python | aiogram/types/update.py | victorusachev/aiogram | 9571669ca4b06165031d8f9830130f3c638b60d8 | [
"MIT"
] | 1 | 2020-02-27T02:46:51.000Z | 2020-02-27T02:46:51.000Z | aiogram/types/update.py | Kylmakalle/aiogram | 550c41e1752aa08c493d7cb4ec5fec402d8e849c | [
"MIT"
] | 1 | 2019-10-18T19:33:20.000Z | 2019-10-18T19:33:20.000Z | aiogram/types/update.py | Kylmakalle/aiogram | 550c41e1752aa08c493d7cb4ec5fec402d8e849c | [
"MIT"
] | null | null | null | from __future__ import annotations
from . import base
from . import fields
from .callback_query import CallbackQuery
from .chosen_inline_result import ChosenInlineResult
from .inline_query import InlineQuery
from .message import Message
from .poll import Poll
from .pre_checkout_query import PreCheckoutQuery
from .ship... | 37.311475 | 99 | 0.755272 |
38b791252d9aa0f629c27d53c3efb223a50279ef | 13,560 | py | Python | conformity/fields/logging.py | arareko/conformity | a24d6027e7195d20c43065a06f610182a16fe9cd | [
"Apache-2.0"
] | 26 | 2017-07-03T04:52:35.000Z | 2021-08-15T00:19:00.000Z | conformity/fields/logging.py | arareko/conformity | a24d6027e7195d20c43065a06f610182a16fe9cd | [
"Apache-2.0"
] | 16 | 2017-05-01T19:31:56.000Z | 2019-10-10T14:22:01.000Z | conformity/fields/logging.py | arareko/conformity | a24d6027e7195d20c43065a06f610182a16fe9cd | [
"Apache-2.0"
] | 8 | 2019-05-13T17:48:24.000Z | 2021-09-08T11:27:39.000Z | from __future__ import (
absolute_import,
unicode_literals,
)
import collections
import logging
from typing import (
Any as AnyType,
Hashable as HashableType,
List as ListType,
Mapping,
Optional,
Tuple as TupleType,
)
import six
from conformity import fields
from conformity.constants ... | 45.810811 | 119 | 0.550221 |
4d512c1f62caf61fccd71f4679a076e73a52550a | 711 | py | Python | setup_app/static.py | duttarnab/community-edition-setup | cc87861440397648216af899f87d6868a8064190 | [
"MIT"
] | 178 | 2015-02-18T19:36:13.000Z | 2022-03-27T19:38:58.000Z | setup_app/static.py | duttarnab/community-edition-setup | cc87861440397648216af899f87d6868a8064190 | [
"MIT"
] | 640 | 2015-01-02T16:54:56.000Z | 2022-03-30T18:51:08.000Z | setup_app/static.py | duttarnab/community-edition-setup | cc87861440397648216af899f87d6868a8064190 | [
"MIT"
] | 76 | 2015-02-04T21:55:09.000Z | 2022-03-11T19:24:47.000Z | class InstallTypes:
NONE = 0
LOCAL = '1'
REMOTE = '2'
class colors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
DANGER... | 18.230769 | 37 | 0.535865 |
12fc1aa6ef1099f65687f8af206073203ae4c96c | 14,824 | py | Python | lib/datasets/pascal_voc.py | jinyu121/CIOD | 37ab2ce14635c4b5cef2ea43b8439c5cd0e0f662 | [
"MIT"
] | 33 | 2019-07-09T07:14:40.000Z | 2022-02-17T03:00:36.000Z | lib/datasets/pascal_voc.py | jinyu121/CIOD | 37ab2ce14635c4b5cef2ea43b8439c5cd0e0f662 | [
"MIT"
] | 7 | 2020-01-10T16:37:12.000Z | 2021-11-26T02:02:13.000Z | lib/datasets/pascal_voc.py | jinyu121/CIOD | 37ab2ce14635c4b5cef2ea43b8439c5cd0e0f662 | [
"MIT"
] | 7 | 2019-07-18T02:27:44.000Z | 2020-04-28T09:41:27.000Z | from __future__ import absolute_import
from __future__ import print_function
import os
import pickle
import subprocess
import uuid
import xml.etree.ElementTree as ET
# import PIL
import numpy as np
import scipy.io as sio
import scipy.sparse
from tqdm import tqdm
# TODO: make fast_rcnn irrelevant
# >>>> obsolete, bec... | 39.849462 | 119 | 0.552617 |
2f0607189c7e893f7d80d21f224f62db7a96b4d2 | 3,443 | py | Python | src/train.py | Hzx66666/FairMOT_PS | c0b2ef18cd712ebd2512ce73672667a72a9d4f04 | [
"MIT"
] | null | null | null | src/train.py | Hzx66666/FairMOT_PS | c0b2ef18cd712ebd2512ce73672667a72a9d4f04 | [
"MIT"
] | null | null | null | src/train.py | Hzx66666/FairMOT_PS | c0b2ef18cd712ebd2512ce73672667a72a9d4f04 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import os
import json
import torch
import torch.utils.data
from torchvision.transforms import transforms as T
from opts import opts
from models.model import create_model, load_model, save_m... | 34.089109 | 86 | 0.643334 |
dec9fe68d24def2c564d51bafb225b4e06efdb37 | 3,089 | py | Python | tests/core/test_setget.py | psumesh/siliconcompiler | 14663c1d0d6c46994bc9bb24595db7e4ac4e1600 | [
"Apache-2.0"
] | null | null | null | tests/core/test_setget.py | psumesh/siliconcompiler | 14663c1d0d6c46994bc9bb24595db7e4ac4e1600 | [
"Apache-2.0"
] | null | null | null | tests/core/test_setget.py | psumesh/siliconcompiler | 14663c1d0d6c46994bc9bb24595db7e4ac4e1600 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Silicon Compiler Authors. All Rights Reserved.
import siliconcompiler
import re
def test_setget():
'''API test for set/get methods
Performs set or add based on API example for each entry in schema and
ensures that we can recover the same value back. Also tests that keypaths in
schema ... | 32.861702 | 95 | 0.546455 |
bed0baa456cf504a60e9aeb3c3041b154ec6df7a | 19,094 | py | Python | rmgpy/data/kinetics/common.py | mbprend/RMG-Py | 29e111d683f2daa0b376417be60e76b32ce8a993 | [
"MIT"
] | null | null | null | rmgpy/data/kinetics/common.py | mbprend/RMG-Py | 29e111d683f2daa0b376417be60e76b32ce8a993 | [
"MIT"
] | null | null | null | rmgpy/data/kinetics/common.py | mbprend/RMG-Py | 29e111d683f2daa0b376417be60e76b32ce8a993 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... | 48.339241 | 119 | 0.591285 |
0b172c693d737b1262a401fef9c7b8f60c31f1db | 1,222 | py | Python | examples/scripts/ephemeris/create_ephemeris_object.py | fossabot/pyaurorax | cb3e72a90f3107302d4f9fd4b0478fe98616354d | [
"MIT"
] | null | null | null | examples/scripts/ephemeris/create_ephemeris_object.py | fossabot/pyaurorax | cb3e72a90f3107302d4f9fd4b0478fe98616354d | [
"MIT"
] | 45 | 2021-11-07T22:02:23.000Z | 2022-03-09T03:04:27.000Z | examples/scripts/ephemeris/create_ephemeris_object.py | fossabot/pyaurorax | cb3e72a90f3107302d4f9fd4b0478fe98616354d | [
"MIT"
] | 1 | 2022-01-16T17:28:14.000Z | 2022-01-16T17:28:14.000Z | import pyaurorax
import datetime
def main():
# set values
program = "themis"
platform = "themisa"
instrument_type = "footprint"
epoch = datetime.datetime(2020, 1, 1, 0, 0)
location_geo = pyaurorax.Location(lat=51.049999, lon=-114.066666)
location_gsm = pyaurorax.Location(lat=150.25, lon=-1... | 31.333333 | 71 | 0.517185 |
6e8f58ac46fa19cd45495edd0db4cab9816e67bc | 3,436 | py | Python | VariableDictionnary.py | Didou09/GEMMES-1 | 4b95e53bedff47da8bc063308102982708b7e6af | [
"MIT"
] | null | null | null | VariableDictionnary.py | Didou09/GEMMES-1 | 4b95e53bedff47da8bc063308102982708b7e6af | [
"MIT"
] | null | null | null | VariableDictionnary.py | Didou09/GEMMES-1 | 4b95e53bedff47da8bc063308102982708b7e6af | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def VariableDictionnary(result) :
"""
Contains additional informations for each variables
VarDictype : name of each variable, unit, intensive or extensive
OrganizedVar : list of variables that lookalike
"""
VarDictype = {
### EXTENSIVE VARIBLES
... | 38.177778 | 103 | 0.422584 |
386fa6a7a7dd25535588b2da920792e2dba6c3ff | 1,950 | py | Python | manage.py | Keegan-Evans/data302 | b4e94b8c21953ec8d71089eab9c3284ce67437ce | [
"BSD-3-Clause"
] | null | null | null | manage.py | Keegan-Evans/data302 | b4e94b8c21953ec8d71089eab9c3284ce67437ce | [
"BSD-3-Clause"
] | 10 | 2019-10-25T19:10:14.000Z | 2021-04-28T17:19:50.000Z | manage.py | Keegan-Evans/data302 | b4e94b8c21953ec8d71089eab9c3284ce67437ce | [
"BSD-3-Clause"
] | 5 | 2020-01-16T15:37:00.000Z | 2021-04-28T17:20:35.000Z | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 26 | 78 | 0.585641 |
f77aec1e6efce15ea7ba1ac3c332ebfdd2580718 | 368 | py | Python | config.py | tweetbrain/twitter-test | 7f558ec966baa4f6f7c82cbf78fa1e219565587d | [
"MIT"
] | null | null | null | config.py | tweetbrain/twitter-test | 7f558ec966baa4f6f7c82cbf78fa1e219565587d | [
"MIT"
] | null | null | null | config.py | tweetbrain/twitter-test | 7f558ec966baa4f6f7c82cbf78fa1e219565587d | [
"MIT"
] | null | null | null | import json
import os
try:
with open('secrets.json', 'r') as secrets_file:
secrets = json.load(secrets_file)
except FileNotFoundError:
secrets = os.environ
class Config:
CONSUMER_KEY = secrets["CONSUMER_KEY"]
CONSUMER_SECRET = secrets["CONSUMER_SECRET"]
ACCESS_TOKEN = secrets["ACCESS_TOKEN... | 24.533333 | 51 | 0.717391 |
16aefd95b39bbd44f9390655069444b7ae4c6dda | 516 | py | Python | player/Player.py | TvSeriesFans/CineMonster | 036a3223618afd536932d21b0e86d18d0fba3b28 | [
"Apache-2.0"
] | 15 | 2017-09-17T17:52:43.000Z | 2020-08-31T15:41:12.000Z | player/Player.py | TvSeriesFans/CineMonster | 036a3223618afd536932d21b0e86d18d0fba3b28 | [
"Apache-2.0"
] | 13 | 2017-03-14T13:24:14.000Z | 2021-08-20T13:52:54.000Z | player/Player.py | TvSeriesFans/CineMonster | 036a3223618afd536932d21b0e86d18d0fba3b28 | [
"Apache-2.0"
] | 27 | 2017-07-01T18:33:49.000Z | 2021-08-05T09:13:18.000Z | # -------------------------------------------
# CineMonster - A Quiz Bot for Telegram About Series and Movies
# @author: Edward "Toy" Facundo
# @site: http://edwardfacundo.wordpress.com
# -------------------------------------------
class Player:
id = ''
points = 0
name = ''
def __init__(self, uid):
... | 21.5 | 63 | 0.501938 |
6d7743f5947c0111bdf1729f506de4c8be68e88a | 6,702 | py | Python | core/model/.ipynb_checkpoints/net1-checkpoint.py | yoohyewony/mcan | 5e6fa78ca76d05fa936d473d3cf7ca9c563a354e | [
"Apache-2.0"
] | null | null | null | core/model/.ipynb_checkpoints/net1-checkpoint.py | yoohyewony/mcan | 5e6fa78ca76d05fa936d473d3cf7ca9c563a354e | [
"Apache-2.0"
] | null | null | null | core/model/.ipynb_checkpoints/net1-checkpoint.py | yoohyewony/mcan | 5e6fa78ca76d05fa936d473d3cf7ca9c563a354e | [
"Apache-2.0"
] | null | null | null | # --------------------------------------------------------
# mcan-vqa (Deep Modular Co-Attention Networks)
# Licensed under The MIT License [see LICENSE for details]
# Written by Yuhao Cui https://github.com/cuiyuhao1996
# --------------------------------------------------------
from core.model.net_utils import FC, ML... | 31.464789 | 84 | 0.524918 |
a0011f8ce288bb21f7624764ccbafdf43fc4e032 | 264,397 | py | Python | 2022-02-09/frames_to_video_converter/frames_to_video_converter.py | GrahamAnto/cannabis-data-science | 1d5f3085e7b2858b6791840b90335be4669268b3 | [
"MIT"
] | 1 | 2022-03-10T12:37:02.000Z | 2022-03-10T12:37:02.000Z | 2022-02-09/frames_to_video_converter/frames_to_video_converter.py | GrahamAnto/cannabis-data-science | 1d5f3085e7b2858b6791840b90335be4669268b3 | [
"MIT"
] | null | null | null | 2022-02-09/frames_to_video_converter/frames_to_video_converter.py | GrahamAnto/cannabis-data-science | 1d5f3085e7b2858b6791840b90335be4669268b3 | [
"MIT"
] | null | null | null |
<!DOCTYPE html>
<html lang="en" data-color-mode="dark" data-light-theme="light" data-dark-theme="dark">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars.githubusercontent.com">
<link rel="dns-prefetch" href="h... | 84.60704 | 17,489 | 0.677099 |
88e639f2ce3e6beeeea2808f9fdaaea874740709 | 2,349 | py | Python | config/settings/local.py | salah-hegazi/datadog-alert-system | 2bc6fc32eb11708b0b6b3c6ea2ef9f466110ef35 | [
"MIT"
] | null | null | null | config/settings/local.py | salah-hegazi/datadog-alert-system | 2bc6fc32eb11708b0b6b3c6ea2ef9f466110ef35 | [
"MIT"
] | null | null | null | config/settings/local.py | salah-hegazi/datadog-alert-system | 2bc6fc32eb11708b0b6b3c6ea2ef9f466110ef35 | [
"MIT"
] | null | null | null | from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY... | 39.813559 | 97 | 0.58493 |
6362963ee246041e4403414c6e271219ef5c61d1 | 4,462 | py | Python | cooperative_action_control/Multi-agents_cooperation/runner.py | gingkg/man-machine_counteraction | ca61aeee046c1fcf11adba4f7c782a5f71d7de2e | [
"MIT"
] | null | null | null | cooperative_action_control/Multi-agents_cooperation/runner.py | gingkg/man-machine_counteraction | ca61aeee046c1fcf11adba4f7c782a5f71d7de2e | [
"MIT"
] | null | null | null | cooperative_action_control/Multi-agents_cooperation/runner.py | gingkg/man-machine_counteraction | ca61aeee046c1fcf11adba4f7c782a5f71d7de2e | [
"MIT"
] | null | null | null | import numpy as np
import os
from common.rollout import RolloutWorker, CommRolloutWorker
from agent.agent import Agents, CommAgents
from common.replay_buffer import ReplayBuffer
import matplotlib.pyplot as plt
class Runner:
def __init__(self, env, args):
self.env = env
if args.alg.find('commnet')... | 43.320388 | 170 | 0.609144 |
4f9fc2fbe5160df24cf35bfb4333b03177e504b5 | 2,999 | py | Python | tests/test_Personal_Fitness.py | JI511/Personal_Fitness | 25d54908398caf9291e70069dca97a567b1bd94b | [
"MIT"
] | null | null | null | tests/test_Personal_Fitness.py | JI511/Personal_Fitness | 25d54908398caf9291e70069dca97a567b1bd94b | [
"MIT"
] | 75 | 2019-04-01T01:57:34.000Z | 2019-09-26T00:14:28.000Z | tests/test_Personal_Fitness.py | JI511/Personal_Fitness | 25d54908398caf9291e70069dca97a567b1bd94b | [
"MIT"
] | 1 | 2019-08-11T07:25:15.000Z | 2019-08-11T07:25:15.000Z | # ----------------------------------------------------------------------------------------------------------------------
# Personal Fitness unit tests
# ----------------------------------------------------------------------------------------------------------------------
# imports
import unittest
import tempfile
i... | 38.448718 | 120 | 0.463488 |
1042ffe1734b5923d92fecbf1d03947c9b6f4e7c | 1,291 | py | Python | Geometry/CaloEventSetup/test/aliFile2Screen_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Geometry/CaloEventSetup/test/aliFile2Screen_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Geometry/CaloEventSetup/test/aliFile2Screen_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("read")
process.load('CondCore.CondDB.CondDB_cfi')
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)
process.source = cms.Source("EmptySource")
process.CondDB.connect = cms.string('sqlite_file:myfile.db')
process.PoolDBESSourc... | 29.340909 | 82 | 0.699458 |
93b7738e65a02ff891827c02c3bf74664d3a2bf5 | 106,972 | py | Python | tccli/services/cvm/cvm_client.py | zyh911/tencentcloud-cli | dfc5dbd660d4c60d265921c4edc630091478fc41 | [
"Apache-2.0"
] | null | null | null | tccli/services/cvm/cvm_client.py | zyh911/tencentcloud-cli | dfc5dbd660d4c60d265921c4edc630091478fc41 | [
"Apache-2.0"
] | null | null | null | tccli/services/cvm/cvm_client.py | zyh911/tencentcloud-cli | dfc5dbd660d4c60d265921c4edc630091478fc41 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import json
import tccli.options_define as OptionsDefine
import tccli.format_output as FormatOutput
from tccli.nice_command import NiceCommand
import tccli.error_msg as ErrorMsg
import tccli.help_template as HelpTemplate
from tccli import __version__
from tccli.utils import Utils
from ... | 42.048742 | 105 | 0.705512 |
45f7a9a63d5e34b9807dd95ac99a1ac570bb9715 | 7,855 | py | Python | src/image_generator.py | antonmattsson/diabetic_retinopathy | 6aaa0ab3631d1cb0075d3acf2778822d62d1b532 | [
"MIT"
] | null | null | null | src/image_generator.py | antonmattsson/diabetic_retinopathy | 6aaa0ab3631d1cb0075d3acf2778822d62d1b532 | [
"MIT"
] | null | null | null | src/image_generator.py | antonmattsson/diabetic_retinopathy | 6aaa0ab3631d1cb0075d3acf2778822d62d1b532 | [
"MIT"
] | null | null | null | import numpy as np
from skimage.io import imread
from skimage.transform import resize
from sklearn.feature_extraction.image import extract_patches_2d
from keras.utils import Sequence, to_categorical
from numpy.core.defchararray import add, replace
import matplotlib.pyplot as plt
class ImageGenerator(Sequence):
'''... | 44.885714 | 114 | 0.693571 |
69055d4d6a23bb99f543fb5fad197e179c7b0794 | 859 | py | Python | ooobuild/dyn/drawing/measure_properties.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/drawing/measure_properties.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/drawing/measure_properties.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 33.038462 | 83 | 0.762515 |
c80cf7fd5fd698e87b413606374a2d0582a151ee | 3,806 | py | Python | src/models/DispRefine2D.py | sunshuofeng/Bi3D | aa4a4bf739017d0a9bf0149a6df891f3b97752cb | [
"BSD-Source-Code"
] | null | null | null | src/models/DispRefine2D.py | sunshuofeng/Bi3D | aa4a4bf739017d0a9bf0149a6df891f3b97752cb | [
"BSD-Source-Code"
] | null | null | null | src/models/DispRefine2D.py | sunshuofeng/Bi3D | aa4a4bf739017d0a9bf0149a6df891f3b97752cb | [
"BSD-Source-Code"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 Xuanyi Li (xuanyili.edu@gmail.com)
# Copyright (c) 2020 NVIDIA
#
# 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 li... | 33.095652 | 107 | 0.652916 |
f755629790bb8cde966f4ceb680ec5a084e18788 | 9,889 | py | Python | custom_components/hacs/hacsbase/data.py | Lucstricke/integration | 1543686f3d99c8f16ec4fc37b2edd70b2a3e29a5 | [
"MIT"
] | 1 | 2021-12-12T18:19:48.000Z | 2021-12-12T18:19:48.000Z | custom_components/hacs/hacsbase/data.py | Lucstricke/integration | 1543686f3d99c8f16ec4fc37b2edd70b2a3e29a5 | [
"MIT"
] | null | null | null | custom_components/hacs/hacsbase/data.py | Lucstricke/integration | 1543686f3d99c8f16ec4fc37b2edd70b2a3e29a5 | [
"MIT"
] | null | null | null | """Data handler for HACS."""
import asyncio
import os
from homeassistant.core import callback
from custom_components.hacs.helpers.classes.manifest import HacsManifest
from custom_components.hacs.helpers.functions.register_repository import (
register_repository,
)
from custom_components.hacs.helpers.functions.sto... | 42.995652 | 93 | 0.639498 |
1167fb36a6faa95ef144f5b8b1ff42ee4bcfda3c | 361 | py | Python | 2-2_Q2.py | Soooyeon-Kim/Algorithm | 28a191d7382d9c3bb6d9afb19f4cff642c3aec03 | [
"MIT"
] | null | null | null | 2-2_Q2.py | Soooyeon-Kim/Algorithm | 28a191d7382d9c3bb6d9afb19f4cff642c3aec03 | [
"MIT"
] | null | null | null | 2-2_Q2.py | Soooyeon-Kim/Algorithm | 28a191d7382d9c3bb6d9afb19f4cff642c3aec03 | [
"MIT"
] | null | null | null | # 2주차 실습 2번 줄세우기
def lining(n) :
MOD = int(1e9 + 7)
dp = [[0, 0] for i in range(101)]
dp[1][0] = 1
dp[1][1] = 1
for i in range(2, 101):
dp[i][0] = (dp[i - 1][0] + dp[i - 1][1]) % MOD # 끝이 여학생인 경우
dp[i][1] = dp[i - 1][0] # 끝이 남학생인 경우 -> 자기 앞에 여학생만 와야 한다!!!
... | 27.769231 | 68 | 0.401662 |
a41d247dd75d806c85a974f8352f921796f5c206 | 186 | py | Python | benchmarking/framework/run_all_t.py | coyizumi/nvme-hpe | d2be43668a92891e81150232e17e4fa6a415f398 | [
"MIT"
] | null | null | null | benchmarking/framework/run_all_t.py | coyizumi/nvme-hpe | d2be43668a92891e81150232e17e4fa6a415f398 | [
"MIT"
] | null | null | null | benchmarking/framework/run_all_t.py | coyizumi/nvme-hpe | d2be43668a92891e81150232e17e4fa6a415f398 | [
"MIT"
] | null | null | null | # Authors: Coy Humphrey, Jayden Navarro
# Project: HPE UCSC Senior Design 2016
# Date: 4-7-2016
import ib_send_bw
from framework import setDirectory
setDirectory()
ib_send_bw.run_t()
| 16.909091 | 39 | 0.77957 |
89320d8c052e0ecffa026da1e3dfe47ea33fc16b | 8,696 | py | Python | concepts/formats.py | ymizoguchi/concepts | 7c7533a90e6dbd55d15f52f95f7f0f99e1ca6f47 | [
"MIT"
] | null | null | null | concepts/formats.py | ymizoguchi/concepts | 7c7533a90e6dbd55d15f52f95f7f0f99e1ca6f47 | [
"MIT"
] | null | null | null | concepts/formats.py | ymizoguchi/concepts | 7c7533a90e6dbd55d15f52f95f7f0f99e1ca6f47 | [
"MIT"
] | 1 | 2020-10-13T12:44:46.000Z | 2020-10-13T12:44:46.000Z | # formats.py - parse and serialize FCA context tables
"""Parse and serialize formal contexts in different formats."""
import io
import os
import csv
import contextlib
from ._compat import PY2, text_type, zip, with_metaclass, StringIO
from . import _compat_csv
from . import tools
__all__ = ['Format']
class Format... | 32.207407 | 81 | 0.567042 |
0f15885d8a5efb1853198499898d63ec8fb4de3e | 3,396 | py | Python | libs/configs/DOTA1.0/CSL/cfgs_res50_dota_v24.py | loceyi/CSL_RetinaNet_Tensorflow | c2de594ca1754dfa87f7271aa01052b0d001967a | [
"Apache-2.0"
] | 187 | 2020-03-11T05:41:59.000Z | 2022-03-28T04:44:03.000Z | libs/configs/DOTA1.0/CSL/cfgs_res50_dota_v24.py | loceyi/CSL_RetinaNet_Tensorflow | c2de594ca1754dfa87f7271aa01052b0d001967a | [
"Apache-2.0"
] | 13 | 2020-07-16T09:00:11.000Z | 2021-11-05T12:15:35.000Z | libs/configs/DOTA1.0/CSL/cfgs_res50_dota_v24.py | loceyi/CSL_RetinaNet_Tensorflow | c2de594ca1754dfa87f7271aa01052b0d001967a | [
"Apache-2.0"
] | 31 | 2020-03-21T08:11:36.000Z | 2022-03-16T09:18:33.000Z | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import os
import tensorflow as tf
import math
"""
v19 + pulse label
"""
# ------------------------------------------------
VERSION = 'RetinaNet_DOTA_1x_20191219'
NET_NAME = 'resnet50_v1d' # 'MobilenetV2'
ADD_BOX_IN_TENSORBOARD ... | 30.053097 | 105 | 0.660483 |
dedea4c38a97431ea4d2d62a96a01426a1c57e1e | 99 | py | Python | script/SG1M-DoubleArmV7A.py | WRS-TDRRC/WRS-TDRRC-2020SG1 | 5656ac6f8561a77f500aaf8dbe3f3aec5ce0ebe7 | [
"CC0-1.0"
] | 1 | 2021-09-22T00:36:24.000Z | 2021-09-22T00:36:24.000Z | script/SG1M-DoubleArmV7A.py | WRS-TDRRC/WRS-TDRRC-2020SG1 | 5656ac6f8561a77f500aaf8dbe3f3aec5ce0ebe7 | [
"CC0-1.0"
] | 1 | 2021-07-11T23:05:02.000Z | 2021-07-11T23:05:02.000Z | script/SG1M-DoubleArmV7A.py | WRS-TDRRC/WRS-TDRRC-2020SG1 | 5656ac6f8561a77f500aaf8dbe3f3aec5ce0ebe7 | [
"CC0-1.0"
] | null | null | null | import WRSUtil
WRSUtil.loadProject(
"MultiSceneViews", "SG1M", "AGXSimulator", "DoubleArmV7A")
| 24.75 | 62 | 0.747475 |
fad198dc113a366e451f55e352666076c61621cf | 166 | py | Python | example/example/wsgi.py | valsplat/django-ajaximage | 6e6ae53464acb1c308149f264d437246f1571288 | [
"MIT"
] | 11 | 2018-01-29T12:57:58.000Z | 2020-07-27T22:47:14.000Z | example/example/wsgi.py | valsplat/django-ajaximage | 6e6ae53464acb1c308149f264d437246f1571288 | [
"MIT"
] | 5 | 2021-03-19T03:23:05.000Z | 2022-03-11T23:58:21.000Z | example/example/wsgi.py | valsplat/django-ajaximage | 6e6ae53464acb1c308149f264d437246f1571288 | [
"MIT"
] | 2 | 2019-09-03T11:22:56.000Z | 2020-04-10T14:20:57.000Z | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
| 27.666667 | 67 | 0.837349 |
3254e1b86dbe0697951710615d6a0d6d1944237c | 53,919 | gyp | Python | net/net.gyp | SlimKatLegacy/android_external_chromium | bc611cda58cc18d0dbaa8a7aee05eb3c0742e573 | [
"BSD-3-Clause"
] | 2 | 2017-02-20T14:25:04.000Z | 2019-12-13T13:58:28.000Z | net/net.gyp | SlimKatLegacy/android_external_chromium | bc611cda58cc18d0dbaa8a7aee05eb3c0742e573 | [
"BSD-3-Clause"
] | 2 | 2017-07-25T09:37:22.000Z | 2017-08-04T07:18:56.000Z | net/net.gyp | SlimKatLegacy/android_external_chromium | bc611cda58cc18d0dbaa8a7aee05eb3c0742e573 | [
"BSD-3-Clause"
] | 2 | 2020-01-12T00:55:53.000Z | 2020-11-04T06:36:41.000Z | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'net_base',
'type': '<(library)',
'dependencies': [... | 37.314187 | 104 | 0.595764 |
de4ed9b012b731199a76ec689ab4e3afd2407790 | 9,964 | py | Python | src/m4_functions_vs_methods.py | thuerje/02-ObjectsFunctionsAndMethods | f2eb90f0e344f12883d5b11a2d3242c22b10c100 | [
"MIT"
] | null | null | null | src/m4_functions_vs_methods.py | thuerje/02-ObjectsFunctionsAndMethods | f2eb90f0e344f12883d5b11a2d3242c22b10c100 | [
"MIT"
] | null | null | null | src/m4_functions_vs_methods.py | thuerje/02-ObjectsFunctionsAndMethods | f2eb90f0e344f12883d5b11a2d3242c22b10c100 | [
"MIT"
] | null | null | null | """
Demonstrates using (calling) FUNCTIONS and using (calling) METHODS:
-- what is similar, and
-- how they differ.
Authors: David Mutchler, Dave Fisher, Vibha Alangar, Amanda Stouder,
their colleagues and Jess Thuer.
""" # DONE PUT YOUR NAME IN THE ABOVE LINE.
##########################################... | 34.597222 | 79 | 0.541851 |
c10358a10d3ef4464cb7a38a489cdfe2602f19e8 | 1,323 | py | Python | os_client_config/defaults.py | mail2nsrajesh/os-client-config | 30c8729f782c0c13ca872260085d5b7b7c37df61 | [
"Apache-2.0"
] | null | null | null | os_client_config/defaults.py | mail2nsrajesh/os-client-config | 30c8729f782c0c13ca872260085d5b7b7c37df61 | [
"Apache-2.0"
] | null | null | null | os_client_config/defaults.py | mail2nsrajesh/os-client-config | 30c8729f782c0c13ca872260085d5b7b7c37df61 | [
"Apache-2.0"
] | 1 | 2020-07-21T02:18:23.000Z | 2020-07-21T02:18:23.000Z | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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 appli... | 31.5 | 75 | 0.668178 |
dac9733af4075f4e8fc402e1233b9f075dffabd5 | 4,951 | py | Python | size_tracker.py | TwidWawMon/Sims4SlowGrowthMod | dd50fb7a67666b71b4828325344551c7fcb1b0c8 | [
"MIT"
] | null | null | null | size_tracker.py | TwidWawMon/Sims4SlowGrowthMod | dd50fb7a67666b71b4828325344551c7fcb1b0c8 | [
"MIT"
] | null | null | null | size_tracker.py | TwidWawMon/Sims4SlowGrowthMod | dd50fb7a67666b71b4828325344551c7fcb1b0c8 | [
"MIT"
] | null | null | null | import services
from sims.sim_info_types import Gender
from util import get_sim_info
from sim_modifier import set_all_sims_normal, set_sim_normal, set_sizes
from logger import Logger
import json
import os
import random
import tempfile
save_file_path = os.path.join(tempfile.gettempdir(), "sims4.txt")
class SizeTracke... | 34.144828 | 125 | 0.606948 |
7f6f9f2731e7561061288ee716fc5d48f94330aa | 2,082 | py | Python | AbatementProject/InputDisplacement/py_local/COE_abate.py | ChampionApe/GamsPythonModels | aaa234b2627cda2b92e478e8e8503bf9778aebeb | [
"MIT"
] | null | null | null | AbatementProject/InputDisplacement/py_local/COE_abate.py | ChampionApe/GamsPythonModels | aaa234b2627cda2b92e478e8e8503bf9778aebeb | [
"MIT"
] | null | null | null | AbatementProject/InputDisplacement/py_local/COE_abate.py | ChampionApe/GamsPythonModels | aaa234b2627cda2b92e478e8e8503bf9778aebeb | [
"MIT"
] | null | null | null | def equation(name,domains,conditions,LHS,RHS):
return f"""{name}{domains}{'$('+conditions+')' if conditions != '' else conditions}.. {LHS} =E= {RHS};"""
class V1:
def __init__(self,version='std',**kwargs):
self.version = version
def run(self,vartext,domains,conditions,name):
if self.version is 'std':
out = ... | 47.318182 | 125 | 0.637848 |
f9401bd2ca3c217db416046e663f3874691af001 | 387 | py | Python | python/cursoemvideo-python/03-mundo-3/listas/lista 1/dividindo valores em varias listas.py | Alex4gtx/estudos | cf5908c543be1b112157b1c95f3d987484ff2505 | [
"MIT"
] | null | null | null | python/cursoemvideo-python/03-mundo-3/listas/lista 1/dividindo valores em varias listas.py | Alex4gtx/estudos | cf5908c543be1b112157b1c95f3d987484ff2505 | [
"MIT"
] | null | null | null | python/cursoemvideo-python/03-mundo-3/listas/lista 1/dividindo valores em varias listas.py | Alex4gtx/estudos | cf5908c543be1b112157b1c95f3d987484ff2505 | [
"MIT"
] | null | null | null | lista = []
par = []
impar = []
while True:
lista.append(int(input('Digite um numero: ')))
q = str(input('Deseja continuar? [S/N] ')).strip().upper()[0]
if q in 'Nn':
break
for v in lista:
if v % 2 == 0:
par.append(v)
else:
impar.append(v)
print(f'{30*"-="}\nA lista completa é... | 25.8 | 103 | 0.555556 |
5fdb63703a26a68c2bc05c2a472de67672919b78 | 7,935 | py | Python | docs/source/conf.py | emilianobonassi/lnav | 37f46af7a691192fba4a889e4e4da6cbfcaac8e4 | [
"BSD-2-Clause"
] | null | null | null | docs/source/conf.py | emilianobonassi/lnav | 37f46af7a691192fba4a889e4e4da6cbfcaac8e4 | [
"BSD-2-Clause"
] | 3 | 2015-09-30T22:25:05.000Z | 2015-10-01T00:05:46.000Z | docs/source/conf.py | emilianobonassi/lnav | 37f46af7a691192fba4a889e4e4da6cbfcaac8e4 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# lnav documentation build configuration file, created by
# sphinx-quickstart on Fri Jul 12 21:09:39 2013.
#
# 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.
#
# All co... | 31.613546 | 80 | 0.708759 |
1ba4166ce7f2332f3a69ca756be036afcf2dd108 | 1,490 | py | Python | HCBASimWeb/user/forms.py | pribond/HCBASimWeb | 0ed9d3ae5b7b2aad7d5410740fe3d0d5f6114331 | [
"BSD-3-Clause"
] | 10 | 2016-11-28T05:01:24.000Z | 2020-04-04T17:04:11.000Z | HCBASimWeb/user/forms.py | pribond/HCBASimWeb | 0ed9d3ae5b7b2aad7d5410740fe3d0d5f6114331 | [
"BSD-3-Clause"
] | 349 | 2017-03-25T23:44:47.000Z | 2021-03-20T03:46:39.000Z | HCBASimWeb/user/forms.py | pribond/HCBASimWeb | 0ed9d3ae5b7b2aad7d5410740fe3d0d5f6114331 | [
"BSD-3-Clause"
] | 2 | 2016-12-02T15:34:40.000Z | 2017-03-21T13:51:39.000Z | # -*- coding: utf-8 -*-
"""User forms."""
from flask_wtf import Form
from wtforms import PasswordField, StringField
from wtforms.validators import DataRequired, Email, EqualTo, Length
from .models import User
class RegisterForm(Form):
"""Register form."""
username = StringField('Username',
... | 36.341463 | 98 | 0.607383 |
5bfdfe16deded11a66a1509b81a8e0583e6797be | 5,150 | py | Python | dynamic_programming/knapsack.py | Jacksole/Python | 8d8b403aa621e510da808cda38642a3c9da1d28d | [
"MIT"
] | null | null | null | dynamic_programming/knapsack.py | Jacksole/Python | 8d8b403aa621e510da808cda38642a3c9da1d28d | [
"MIT"
] | 1 | 2020-07-28T16:58:18.000Z | 2020-07-28T16:58:18.000Z | dynamic_programming/knapsack.py | Jacksole/Python | 8d8b403aa621e510da808cda38642a3c9da1d28d | [
"MIT"
] | null | null | null | """
Given weights and values of n items, put these items in a knapsack of
capacity W to get the maximum total value in the knapsack.
Note that only the integer weights 0-1 knapsack problem is solvable
using dynamic programming.
"""
def MF_knapsack(i, wt, val, j):
"""
This code involves the concept of memory... | 35.763889 | 102 | 0.594175 |
16bc9f8f261b53958b885666eca3c9ac04f9daff | 3,854 | py | Python | Raws-Maji/Lapis ReLiGHTs [BD]/lapis_bdmenu02.py | Ichunjo/encode-script | 389a9f497e637eaade6f99acee816636856961d4 | [
"MIT"
] | 36 | 2019-11-08T20:50:07.000Z | 2022-03-23T05:43:55.000Z | Raws-Maji/Lapis ReLiGHTs [BD]/lapis_bdmenu02.py | Ichunjo/encode-script | 389a9f497e637eaade6f99acee816636856961d4 | [
"MIT"
] | 1 | 2019-11-08T21:26:16.000Z | 2019-11-08T21:26:16.000Z | Raws-Maji/Lapis ReLiGHTs [BD]/lapis_bdmenu02.py | Ichunjo/encode-script | 389a9f497e637eaade6f99acee816636856961d4 | [
"MIT"
] | 7 | 2019-11-08T21:10:47.000Z | 2022-03-28T21:57:04.000Z | """Lapis script"""
__author__ = 'Vardë'
import os
import sys
import shlex
import subprocess
from typing import NamedTuple, Optional, Dict, Any
from pathlib import Path
from functools import partial
from regress import Regress, ReconstructMulti
import debandshit as dbs
import vardefunc as vdf
import atomchtools as atf... | 27.140845 | 117 | 0.639076 |
0d970784b8cbe815033b6d75e9b1805c1bf769c1 | 514 | py | Python | plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name='name',
parent_name='scattercarpet.marker.colorbar.tickformatstop',
**kwargs
):
super(NameValidator, self).__init__(
plotl... | 27.052632 | 67 | 0.620623 |
cbc88eb802fd54879e1f116a727db75fbcc43da0 | 3,460 | py | Python | awacs/clouddirectory.py | alanjjenkins/awacs | 0065e1833eae6a6070edb4ab4f180fd10b26c19a | [
"BSD-2-Clause"
] | null | null | null | awacs/clouddirectory.py | alanjjenkins/awacs | 0065e1833eae6a6070edb4ab4f180fd10b26c19a | [
"BSD-2-Clause"
] | null | null | null | awacs/clouddirectory.py | alanjjenkins/awacs | 0065e1833eae6a6070edb4ab4f180fd10b26c19a | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "Amazon Cloud Directory"
prefix = "clouddirectory"
class Action(BaseAction):
def __init__(self, action: str = None) -> ... | 39.770115 | 88 | 0.799133 |
d2c5f8ef7256909f34f345eae686051263dcbd98 | 26,463 | py | Python | Lib/site-packages/notebook/services/kernels/handlers.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/notebook/services/kernels/handlers.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/notebook/services/kernels/handlers.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | """Tornado handlers for kernels.
Preliminary documentation at https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping#kernels-api
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import json
import logging
from text... | 40.901082 | 144 | 0.613687 |
0c07b2a8a15a73909e8363182415c0f830efddd0 | 18,948 | py | Python | validateResource.py | aheynig/Redfish-Service-Validator | 0acc466582adccefcba96c7904c767155b7e2576 | [
"CNRI-Python",
"Linux-OpenIB"
] | 22 | 2017-08-23T16:47:35.000Z | 2022-03-21T09:35:42.000Z | validateResource.py | aheynig/Redfish-Service-Validator | 0acc466582adccefcba96c7904c767155b7e2576 | [
"CNRI-Python",
"Linux-OpenIB"
] | 404 | 2017-03-09T05:23:50.000Z | 2022-03-30T03:13:52.000Z | validateResource.py | aheynig/Redfish-Service-Validator | 0acc466582adccefcba96c7904c767155b7e2576 | [
"CNRI-Python",
"Linux-OpenIB"
] | 27 | 2017-03-06T17:33:56.000Z | 2022-03-30T21:03:25.000Z | # Copyright Notice:
# Copyright 2016-2021 DMTF. All rights reserved.
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Service-Validator/blob/master/LICENSE.md
import logging
from collections import Counter, OrderedDict
from io import StringIO
import common.traverse as traverse
... | 47.72796 | 166 | 0.623654 |
c46d19f1d055a60083200192596ef6fecf37ca64 | 8,846 | py | Python | .history/pages/intro_20220303154629.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/pages/intro_20220303154629.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/pages/intro_20220303154629.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | """
Off Multipage Cheatsheet
https://github.com/daniellewisDL/streamlit-cheat-sheet
@daniellewisDL : https://github.com/daniellewisDL
"""
import streamlit as st
from pathlib import Path
import base64
from modules.toc import *
# Initial page config
st.set_page_config(
page_title='Code Compendium Intro Page',
... | 27.302469 | 228 | 0.658829 |
eb9012c4195554d6dc1652aaffe5724a2fc7a84a | 1,764 | py | Python | helpers/db_models.py | Holovin/D_UxRepostBot_Legacy | 858bbfc4193758a268cc8c6f2f4ee8637f20351d | [
"MIT"
] | 2 | 2017-06-27T06:08:40.000Z | 2017-07-04T22:13:29.000Z | helpers/db_models.py | Holovin/D_UxRepostBot_Legacy | 858bbfc4193758a268cc8c6f2f4ee8637f20351d | [
"MIT"
] | null | null | null | helpers/db_models.py | Holovin/D_UxRepostBot_Legacy | 858bbfc4193758a268cc8c6f2f4ee8637f20351d | [
"MIT"
] | null | null | null | from peewee import *
from pytz import timezone
from datetime import datetime
from config import Config
from helpers.db_connect import Database
class BaseModel(Model):
class Meta:
database = Database.get_db()
class Settings(BaseModel):
id = PrimaryKeyField(primary_key=True)
# channel for check ... | 27.5625 | 101 | 0.721088 |
d2ab44aba46a7d4c2a0d875c996252834dc96d1d | 11,676 | py | Python | src/rogerthat/restapi/messaging.py | goubertbrent/oca-backend | b9f59cc02568aecb55d4b54aec05245790ea25fd | [
"Apache-2.0"
] | null | null | null | src/rogerthat/restapi/messaging.py | goubertbrent/oca-backend | b9f59cc02568aecb55d4b54aec05245790ea25fd | [
"Apache-2.0"
] | null | null | null | src/rogerthat/restapi/messaging.py | goubertbrent/oca-backend | b9f59cc02568aecb55d4b54aec05245790ea25fd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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 appl... | 43.405204 | 124 | 0.789911 |
99d425438100d4b6fab641372347d1f463eee942 | 7,342 | py | Python | kubeflow/fairing/deployers/job/job.py | songm28/fairing | 0c44992baa85e6bac7fbbd3c22d00f300b8186ba | [
"Apache-2.0"
] | null | null | null | kubeflow/fairing/deployers/job/job.py | songm28/fairing | 0c44992baa85e6bac7fbbd3c22d00f300b8186ba | [
"Apache-2.0"
] | null | null | null | kubeflow/fairing/deployers/job/job.py | songm28/fairing | 0c44992baa85e6bac7fbbd3c22d00f300b8186ba | [
"Apache-2.0"
] | 2 | 2020-05-11T07:48:28.000Z | 2021-05-28T10:32:21.000Z | import logging
import json
import uuid
from kubernetes import client as k8s_client
from kubeflow.fairing import utils
from kubeflow.fairing.constants import constants
from kubeflow.fairing.kubernetes.manager import KubeManager
from kubeflow.fairing.deployers.deployer import DeployerInterface
logger = logging.getLog... | 39.902174 | 96 | 0.646554 |
620c5ed8c4bee26f18fd819137fcdfa0b1ac59cd | 1,208 | py | Python | app.py | michal-siedlecki/messages-api | 34adaaf6752e8d96a6f988a84ad28f2f81a501af | [
"MIT"
] | null | null | null | app.py | michal-siedlecki/messages-api | 34adaaf6752e8d96a6f988a84ad28f2f81a501af | [
"MIT"
] | null | null | null | app.py | michal-siedlecki/messages-api | 34adaaf6752e8d96a6f988a84ad28f2f81a501af | [
"MIT"
] | null | null | null | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from config import API_URL
app = Flask(__name__)
app.config.from_object(os.environ['APP_SETTINGS'])
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
from messages import views
# A route to return messages_app info.
@... | 22.792453 | 63 | 0.70447 |
7c05eab5ae1a593041a03bca3400a7e42841bb0f | 578 | py | Python | Python/test.py | zharmedia386/Data-Science-Stuff | 40183c329e3b30c582c545c260ca7916f29e2f09 | [
"MIT"
] | null | null | null | Python/test.py | zharmedia386/Data-Science-Stuff | 40183c329e3b30c582c545c260ca7916f29e2f09 | [
"MIT"
] | null | null | null | Python/test.py | zharmedia386/Data-Science-Stuff | 40183c329e3b30c582c545c260ca7916f29e2f09 | [
"MIT"
] | null | null | null | Barang = ['kunci','ember','jaket','ban','mobil']
print(Barang)
# beberapa method yang bisa digunakan untuk memanipulasi list
# method untuk menambah data kedalam list
Barang.append('sepeda')
print(Barang)
Barang.extend('dompet')
print(Barang)
Barang.insert(3,'sepeda')
print(Barang)
# method untuk menghitung anggota... | 18.645161 | 61 | 0.745675 |
41e139126f2fe37db90ac8bad4ad65b6608e295a | 41,316 | py | Python | dask/dataframe/tests/test_shuffle.py | eric-bonfadini/dask | c2278fece0d4fb4af1e63b6ca26e6a90f63b0fc3 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/tests/test_shuffle.py | eric-bonfadini/dask | c2278fece0d4fb4af1e63b6ca26e6a90f63b0fc3 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/tests/test_shuffle.py | eric-bonfadini/dask | c2278fece0d4fb4af1e63b6ca26e6a90f63b0fc3 | [
"BSD-3-Clause"
] | null | null | null | import itertools
import multiprocessing as mp
import os
import pickle
import random
import string
import tempfile
from concurrent.futures import ProcessPoolExecutor
from copy import copy
from functools import partial
from unittest import mock
import numpy as np
import pandas as pd
import pytest
import dask
import das... | 32.712589 | 109 | 0.619469 |
35f0bdd233393ce0f6f0ad6fae553ccafa610e27 | 4,350 | py | Python | cryspy/A_functions_base/preferred_orientation.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | cryspy/A_functions_base/preferred_orientation.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | cryspy/A_functions_base/preferred_orientation.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | import numpy
from .unit_cell import calc_eq_ccs_by_unit_cell_parameters
from .powder_diffraction_const_wavelength import calc_gamma_nu_by_ttheta_phi
def calc_cos_ang(cell, h_1, k_1, l_1, h_2, k_2, l_2):
"""Calculate directed cosines."""
q_1_x, q_1_y, q_1_z = cell.calc_k_loc(h_1, k_1, l_1)
q_2_x, q_2_y, q_... | 39.908257 | 111 | 0.691954 |
1c64b45aba7723e9e035375f4949b3a95ca6a32a | 25,091 | py | Python | vnpy/gateway/minitest/minitest_gateway.py | wenhaoLong/vnpyTrader | ff37e288042b9d9f9350a1c528a53c77d56ae849 | [
"MIT"
] | null | null | null | vnpy/gateway/minitest/minitest_gateway.py | wenhaoLong/vnpyTrader | ff37e288042b9d9f9350a1c528a53c77d56ae849 | [
"MIT"
] | null | null | null | vnpy/gateway/minitest/minitest_gateway.py | wenhaoLong/vnpyTrader | ff37e288042b9d9f9350a1c528a53c77d56ae849 | [
"MIT"
] | 2 | 2021-03-07T18:13:21.000Z | 2021-12-13T10:20:10.000Z | """
"""
from datetime import datetime
from vnpy.api.mini import (
THOST_FTDC_OAS_Submitted,
THOST_FTDC_OAS_Accepted,
THOST_FTDC_OAS_Rejected,
THOST_FTDC_OST_NoTradeQueueing,
THOST_FTDC_OST_PartTradedQueueing,
THOST_FTDC_OST_AllTraded,
THOST_FTDC_OST_Canceled,
THOST_FTDC_D_Buy,
THO... | 30.673594 | 99 | 0.565262 |
b5792ffc3a8902397f364e5e784ae92152e9d998 | 5,423 | py | Python | src/brain_training.py | irlrobot/memory_loss | cda0356653998313ffcc9211a2bb211699aff0d7 | [
"Apache-2.0"
] | null | null | null | src/brain_training.py | irlrobot/memory_loss | cda0356653998313ffcc9211a2bb211699aff0d7 | [
"Apache-2.0"
] | null | null | null | src/brain_training.py | irlrobot/memory_loss | cda0356653998313ffcc9211a2bb211699aff0d7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Memory Loss
github.com/irlrobot/memory_loss
"""
QUESTIONS = [
{
"question": "Remember these words, Epic, Bird, Taco, Sphere. "\
"Was the second word, bird?",
"answer": "yes"
},
# {
# "question": "Remember these words, Map, Computer, Fish, ... | 29.155914 | 86 | 0.441453 |
d9fcdb31bef7875b85928faa7e9da7b94594c152 | 4,945 | py | Python | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/GPDBStorageBaseTestCase.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/GPDBStorageBaseTestCase.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/GPDBStorageBaseTestCase.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2004-Present Pivotal Software, Inc.
This program and the accompanying materials are made available under
the terms of the 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.... | 40.203252 | 134 | 0.688777 |
a3132ec7423ecd10822e5238d7800b86aaa8625d | 467 | py | Python | add_data.py | Mashex/BookFlix | bdac6dbc56ba0c90f6ee7a2308f93e54dcb759c7 | [
"Unlicense"
] | null | null | null | add_data.py | Mashex/BookFlix | bdac6dbc56ba0c90f6ee7a2308f93e54dcb759c7 | [
"Unlicense"
] | null | null | null | add_data.py | Mashex/BookFlix | bdac6dbc56ba0c90f6ee7a2308f93e54dcb759c7 | [
"Unlicense"
] | 1 | 2019-09-30T20:02:11.000Z | 2019-09-30T20:02:11.000Z | import csv
from books.models import Book
with open('scripts/output_with_8000_desc_genre.csv') as f:
reader = csv.reader(f)
print(next(reader))
print ()
for row in reader:
Book.objects.create(goodreads_book_id = row[1],
book_id = row[0],
published_date = row[8],
author = row[7],
title = row[10],
or... | 22.238095 | 58 | 0.659529 |
02f113d4c59f6a32442085555ba2e2c3f1de8db4 | 1,941 | py | Python | befunge/state.py | malloc47/befunge.py | 6bf3f5f667200c1d4f4a389c3c1e82780743db2c | [
"FSFAP"
] | 1 | 2015-09-23T20:43:44.000Z | 2015-09-23T20:43:44.000Z | befunge/state.py | malloc47/befunge.py | 6bf3f5f667200c1d4f4a389c3c1e82780743db2c | [
"FSFAP"
] | null | null | null | befunge/state.py | malloc47/befunge.py | 6bf3f5f667200c1d4f4a389c3c1e82780743db2c | [
"FSFAP"
] | null | null | null | import sys
from befunge.syntax import Tokens, directions
from befunge.board import BefungeBoard
class State(object):
"""keeps track of all state, along with the board and stack"""
def __init__(self, board=BefungeBoard()):
self.pos = (0, 0)
self.direction = Tokens.MDIR[0]
self.literal ... | 32.898305 | 74 | 0.532715 |
9f1df44d3c4376c8e06d7957bc40e97488784ac0 | 639 | py | Python | enthought/util/wx/__init__.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/util/wx/__init__.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | Latest/venv/Lib/site-packages/pyface/wx/__init__.py | adamcvj/SatelliteTracker | 49a8f26804422fdad6f330a5548e9f283d84a55d | [
"Apache-2.0"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | 42.6 | 79 | 0.58216 |
4acfa2844b17899ada6716ce0403c97b76c3b664 | 1,313 | py | Python | get_gt_txt.py | NJUShane/yolo3-pytorch | 16b3711a10ba64d41a943bb6690232f9747385fb | [
"MIT"
] | 5 | 2021-07-07T17:32:32.000Z | 2022-01-08T03:53:21.000Z | get_gt_txt.py | yddcode/yolo-keras | 230c037d7a9240bb19b29116e8ba2d1f062df128 | [
"MIT"
] | null | null | null | get_gt_txt.py | yddcode/yolo-keras | 230c037d7a9240bb19b29116e8ba2d1f062df128 | [
"MIT"
] | 1 | 2020-10-30T04:07:04.000Z | 2020-10-30T04:07:04.000Z | #----------------------------------------------------#
# 获取测试集的ground-truth
# 具体视频教程可查看
# https://www.bilibili.com/video/BV1zE411u7Vw
#----------------------------------------------------#
import sys
import os
import glob
import xml.etree.ElementTree as ET
image_ids = open('VOCdevkit/VOC2007/ImageSets/... | 37.514286 | 85 | 0.529322 |
0fba1edcb797a9383727db3a51e7d4b53c476679 | 3,304 | py | Python | tests/chainer_tests/functions_tests/array_tests/test_permutate.py | yuhonghong66/chainer | 15d475f54fc39587abd7264808c5e4b33782df9e | [
"MIT"
] | 1 | 2019-02-12T23:10:16.000Z | 2019-02-12T23:10:16.000Z | tests/chainer_tests/functions_tests/array_tests/test_permutate.py | nolfwin/chainer | 8d776fcc1e848cb9d3800a6aab356eb91ae9d088 | [
"MIT"
] | 2 | 2018-01-09T23:05:30.000Z | 2018-01-19T01:19:34.000Z | tests/chainer_tests/functions_tests/array_tests/test_permutate.py | nolfwin/chainer | 8d776fcc1e848cb9d3800a6aab356eb91ae9d088 | [
"MIT"
] | 1 | 2018-05-28T22:43:34.000Z | 2018-05-28T22:43:34.000Z | import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
@testing.parameterize(*testing.product_dict(
[{'shape': (3,), 'dtype': 'f', 'axis': 0, 'inv': False},
{... | 32.07767 | 79 | 0.625303 |
dd9acf0ded61a3539b7a9b0f85310909b76cb63c | 3,615 | py | Python | DQN_PER.py | wotmd5731/pytorch_dqn | fb3062c3aff1e5e249551807e53e974363f7595c | [
"MIT"
] | 11 | 2018-04-22T16:03:17.000Z | 2021-09-02T09:10:04.000Z | DQN_PER.py | wotmd5731/pytorch_dqn | fb3062c3aff1e5e249551807e53e974363f7595c | [
"MIT"
] | null | null | null | DQN_PER.py | wotmd5731/pytorch_dqn | fb3062c3aff1e5e249551807e53e974363f7595c | [
"MIT"
] | 1 | 2021-04-06T12:12:19.000Z | 2021-04-06T12:12:19.000Z | # -*- coding: utf-8 -*-
import random
import numpy as np
import time
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
#import torchvision.transforms as T
import argparse
from argument import get_args
args = get_args('DQN_PER')
from env ... | 25.104167 | 113 | 0.606639 |
94248f87358cce1640cd799f2c0d707264159c25 | 4,799 | py | Python | python/level2_simple_inference/2_object_detection/YOLOV3_coco_detection_picture/src/object_detect.py | coldenheart/123 | 798768bba7dfaef051a46d8e1df48bc671de5213 | [
"Apache-2.0"
] | null | null | null | python/level2_simple_inference/2_object_detection/YOLOV3_coco_detection_picture/src/object_detect.py | coldenheart/123 | 798768bba7dfaef051a46d8e1df48bc671de5213 | [
"Apache-2.0"
] | null | null | null | python/level2_simple_inference/2_object_detection/YOLOV3_coco_detection_picture/src/object_detect.py | coldenheart/123 | 798768bba7dfaef051a46d8e1df48bc671de5213 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append("../../../../common")
sys.path.append("../")
import os
import numpy as np
import acl
import atlas_utils.utils as utils
from PIL import Image, ImageDraw, ImageFont
from atlas_utils.acl_dvpp import Dvpp
import atlas_utils.constants as const
from atlas_utils.acl_model import Model
from atlas_uti... | 37.787402 | 110 | 0.62638 |
3d45fc30ab899b62ab8e13a78f05b881621256c2 | 9,329 | py | Python | tests/unit/service/test_messaging.py | davetobin/ignition | eb183dca3fb2041d3f6249467a3265e7eb1d8905 | [
"Apache-2.0"
] | 1 | 2019-09-02T15:23:08.000Z | 2019-09-02T15:23:08.000Z | tests/unit/service/test_messaging.py | davetobin/ignition | eb183dca3fb2041d3f6249467a3265e7eb1d8905 | [
"Apache-2.0"
] | 62 | 2019-09-16T14:51:32.000Z | 2020-07-08T13:28:50.000Z | tests/unit/service/test_messaging.py | accanto-systems/ignition | 87087b81dfa7f8f69525f4dd9c74db715e336eca | [
"Apache-2.0"
] | 4 | 2021-08-17T14:38:54.000Z | 2022-02-09T14:33:57.000Z | import unittest
import time
import copy
from unittest.mock import patch, MagicMock, call
from ignition.service.messaging import PostalService, KafkaDeliveryService, KafkaInboxService, Envelope, Message, MessagingProperties
from kafka import KafkaProducer
class TestPostalService(unittest.TestCase):
def setUp(self... | 51.541436 | 209 | 0.731054 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.