hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e11a8e425c834148530d1f4e74a6a8f4d690673a | 146 | py | Python | Curso Python/ex009.py | sandro-fidelis/Cursos | cee1960181b1309be93034694cab8cf2878e2194 | [
"MIT"
] | null | null | null | Curso Python/ex009.py | sandro-fidelis/Cursos | cee1960181b1309be93034694cab8cf2878e2194 | [
"MIT"
] | null | null | null | Curso Python/ex009.py | sandro-fidelis/Cursos | cee1960181b1309be93034694cab8cf2878e2194 | [
"MIT"
] | null | null | null | n = int(input('Qual tabuada deseja ver: '))
c=1
print(11*'=')
while c <= 10:
print('{} x {:2} = {}'.format(n,c,c*n))
c += 1
print(11*'=')
| 18.25 | 43 | 0.493151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.335616 |
e11b19ef6b4d98bab620857b523abf42ea96c9a9 | 8,782 | py | Python | train.py | genisplaja/tf-diffwave | 32b0b403e7ca157f015f9af9f7dcdfa79e312a6a | [
"MIT"
] | 23 | 2020-09-29T08:38:09.000Z | 2022-03-16T03:00:44.000Z | train.py | genisplaja/tf-diffwave | 32b0b403e7ca157f015f9af9f7dcdfa79e312a6a | [
"MIT"
] | 1 | 2020-10-03T08:36:48.000Z | 2020-10-03T08:36:48.000Z | train.py | genisplaja/tf-diffwave | 32b0b403e7ca157f015f9af9f7dcdfa79e312a6a | [
"MIT"
] | 7 | 2020-09-29T19:11:53.000Z | 2022-01-06T14:29:21.000Z | import argparse
import json
import os
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import tqdm
from config import Config
from dataset import LJSpeech
from model import DiffWave
class Trainer:
"""WaveGrad trainer.
"""
def __init__(self, model, lj, config):
"""Initial... | 37.370213 | 86 | 0.535186 | 6,799 | 0.774197 | 0 | 0 | 0 | 0 | 0 | 0 | 1,730 | 0.196994 |
e11c13c2da24636a124e7f9a0bd4c8ced1cf20aa | 1,122 | py | Python | src/foxdot/research/boudoir/180617_1936_chuchotement_pantophobique.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | 4 | 2018-06-29T18:39:34.000Z | 2021-06-20T16:44:29.000Z | src/foxdot/research/boudoir/180617_1936_chuchotement_pantophobique.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | null | null | null | src/foxdot/research/boudoir/180617_1936_chuchotement_pantophobique.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | null | null | null | # boudoir - chuchotement pantophobique
# https://www.youtube.com/watch?v=KL2zW6Q5hWs
# https://gist.github.com/jf-parent/c8ea7e54e30593af01512f4e21b54670
Scale.default = Scale.major
Root.default = 0
Clock.bpm = 120
b1.reset() >> glass(
[0],
dur = 16,
).after(16, 'stop')
def play1():
print('play1')
p1... | 20.4 | 68 | 0.496435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 205 | 0.182709 |
e1215b8a95ad1e693c4f500b1993173740393e02 | 14,101 | py | Python | cogs/fun.py | Der-Eddy/discord_bot | bc2511e6d030ee2e099410bd846ea871fe3f109d | [
"MIT"
] | 122 | 2016-08-05T02:27:31.000Z | 2022-03-21T07:53:10.000Z | cogs/fun.py | Der-Eddy/discord_bot | bc2511e6d030ee2e099410bd846ea871fe3f109d | [
"MIT"
] | 15 | 2017-12-07T14:28:20.000Z | 2021-11-19T13:03:37.000Z | cogs/fun.py | Der-Eddy/discord_bot | bc2511e6d030ee2e099410bd846ea871fe3f109d | [
"MIT"
] | 100 | 2016-08-21T18:12:29.000Z | 2022-02-19T11:21:23.000Z | import random
import urllib.parse
import sqlite3
import asyncio
import aiohttp
import discord
from discord.ext import commands
import loadconfig
class fun(commands.Cog):
def __init__(self, bot):
self.bot = bot
async def cog_command_error(self, ctx, error):
print('Error in {0.comm... | 55.956349 | 226 | 0.582654 | 13,965 | 0.985672 | 0 | 0 | 13,446 | 0.94904 | 13,128 | 0.926595 | 8,706 | 0.614483 |
e121641fdd16503ebb092e218a41471693799a5f | 3,362 | py | Python | src/service/plugins/ssrs/ssr.py | awesome-archive/ssrs | 29c6e02d08270b3d9ca2174f29d4d32733acfdb6 | [
"Apache-2.0"
] | 32 | 2018-05-09T06:08:34.000Z | 2022-02-18T14:21:23.000Z | src/service/plugins/ssrs/ssr.py | awesome-archive/ssrs | 29c6e02d08270b3d9ca2174f29d4d32733acfdb6 | [
"Apache-2.0"
] | 1 | 2019-08-08T07:24:31.000Z | 2019-08-08T07:24:31.000Z | src/service/plugins/ssrs/ssr.py | awesome-archive/ssrs | 29c6e02d08270b3d9ca2174f29d4d32733acfdb6 | [
"Apache-2.0"
] | 19 | 2018-08-02T08:11:05.000Z | 2021-07-07T02:10:18.000Z | # !/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
import json
import copy
import socket
import subprocess
import six
class SSR:
class Service:
def __init__(self, conf):
self.conf = conf
def update(self, array):
self.conf.update(array)
def port_open(self... | 34.659794 | 118 | 0.496133 | 3,231 | 0.961035 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.135336 |
e122eb0c0e3191c6ed28f670de3cb045fb8a32e8 | 1,866 | py | Python | asconnect/models/beta_detail.py | guojiubo/asconnect | 1c725dc2036f0617854f19b9a310a91c42239c72 | [
"MIT"
] | 14 | 2020-09-30T14:45:38.000Z | 2022-03-04T09:49:26.000Z | asconnect/models/beta_detail.py | guojiubo/asconnect | 1c725dc2036f0617854f19b9a310a91c42239c72 | [
"MIT"
] | 8 | 2020-09-30T14:50:18.000Z | 2022-01-25T06:18:20.000Z | asconnect/models/beta_detail.py | guojiubo/asconnect | 1c725dc2036f0617854f19b9a310a91c42239c72 | [
"MIT"
] | 7 | 2020-10-09T18:06:18.000Z | 2022-01-25T05:21:12.000Z | """Build beta detail models for the API"""
import enum
from typing import Dict, Optional
import deserialize
from asconnect.models.common import BaseAttributes, Links, Relationship, Resource
class ExternalBetaState(enum.Enum):
"""External beta state."""
PROCESSING = "PROCESSING"
PROCESSING_EXCEPTION = ... | 32.172414 | 81 | 0.758307 | 1,627 | 0.871919 | 0 | 0 | 660 | 0.353698 | 0 | 0 | 702 | 0.376206 |
e126ebf5b69520889633dea016ffe4b49b9b61da | 922 | py | Python | code2.py | cskurdal/VRSurfing | 6d3dae816a59b5949cac29d60b05ed75616c97f9 | [
"MIT"
] | null | null | null | code2.py | cskurdal/VRSurfing | 6d3dae816a59b5949cac29d60b05ed75616c97f9 | [
"MIT"
] | null | null | null | code2.py | cskurdal/VRSurfing | 6d3dae816a59b5949cac29d60b05ed75616c97f9 | [
"MIT"
] | null | null | null | import math
from plotter import Plotter
from plots import LinePlot
import board
import digitalio
import busio
import adafruit_sdcard
import storage
from adafruit_bitmapsaver import save_pixels
def plot():
sines = list(math.sin(math.radians(x))
for x in range(0, 361, 4))
lineplot... | 23.641026 | 71 | 0.659436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.262473 |
e1284d4bbaf6bf582868bfb66265b4397932b66a | 385 | py | Python | scripts/compile-tests.py | PENGUINLIONG/liella | d0d4bc3e05419705712384b15d1c5db00ee12f73 | [
"Apache-2.0",
"MIT"
] | null | null | null | scripts/compile-tests.py | PENGUINLIONG/liella | d0d4bc3e05419705712384b15d1c5db00ee12f73 | [
"Apache-2.0",
"MIT"
] | null | null | null | scripts/compile-tests.py | PENGUINLIONG/liella | d0d4bc3e05419705712384b15d1c5db00ee12f73 | [
"Apache-2.0",
"MIT"
] | null | null | null | from os import listdir
import subprocess
for f in listdir("tests/vulkan"):
if f.endswith(".spv"):
continue
print(f"-- compiling test {f}")
p = subprocess.run(["glslangValidator", f"tests/vulkan/{f}", "-H", "-o", f"tests/vulkan/{f}.spv"], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)... | 29.615385 | 162 | 0.644156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.290909 |
e1297aff417ed953bdd6f0365aac41a401e15814 | 5,769 | py | Python | collections/nemo_asr/nemo_asr/parts/dataset.py | petermartigny/NeMo | b20821e637314940e36b63d32c601c43d1b74051 | [
"Apache-2.0"
] | 1 | 2020-03-22T11:23:11.000Z | 2020-03-22T11:23:11.000Z | collections/nemo_asr/nemo_asr/parts/dataset.py | petermartigny/NeMo | b20821e637314940e36b63d32c601c43d1b74051 | [
"Apache-2.0"
] | null | null | null | collections/nemo_asr/nemo_asr/parts/dataset.py | petermartigny/NeMo | b20821e637314940e36b63d32c601c43d1b74051 | [
"Apache-2.0"
] | 1 | 2020-08-25T06:43:34.000Z | 2020-08-25T06:43:34.000Z | # Taken straight from Patter https://github.com/ryanleary/patter
# TODO: review, and copyright and fix/add comments
import torch
from torch.utils.data import Dataset
from .manifest import Manifest
def seq_collate_fn(batch):
def find_max_len(seq, index):
max_len = -1
for item in seq:
i... | 39.244898 | 78 | 0.600277 | 3,251 | 0.563529 | 0 | 0 | 0 | 0 | 0 | 0 | 2,010 | 0.348414 |
e129ccfbd3be47531b273fb3289a20523a49c675 | 5,277 | py | Python | HandSComp.py | CRZaug/NonlinearWaves | 2adfc2cc5e0c18576c6b73420a913ef1ce23000d | [
"MIT"
] | null | null | null | HandSComp.py | CRZaug/NonlinearWaves | 2adfc2cc5e0c18576c6b73420a913ef1ce23000d | [
"MIT"
] | null | null | null | HandSComp.py | CRZaug/NonlinearWaves | 2adfc2cc5e0c18576c6b73420a913ef1ce23000d | [
"MIT"
] | null | null | null | """
~~~ IMPORT EXPERIMENTAL DATA, PROCESS, AND NONDIMENSIONALIZE ~~~
This code reads in the rescaled Snodgrass data and compares parameters
to known parameters found in the Henderson and Segur paper.
1. Get distances
2. Read in the gauge data for each event (get frequencies and Fourier magnitudes)
3. Adjust the y ax... | 28.370968 | 95 | 0.548607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,914 | 0.362706 |
e12ad429759f61a8d7e2d053224398fdfc9dad67 | 19 | py | Python | pkgs/conf-pkg/src/genie/libs/conf/rip/__init__.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | 94 | 2018-04-30T20:29:15.000Z | 2022-03-29T13:40:31.000Z | pkgs/conf-pkg/src/genie/libs/conf/rip/__init__.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | 67 | 2018-12-06T21:08:09.000Z | 2022-03-29T18:00:46.000Z | pkgs/conf-pkg/src/genie/libs/conf/rip/__init__.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | 49 | 2018-06-29T18:59:03.000Z | 2022-03-10T02:07:59.000Z | from .rip import *
| 9.5 | 18 | 0.684211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e12b12da65a67d3755d54e62e2738980186e27db | 15,542 | py | Python | src/services/explorer/core.py | solomonricky/epic-awesome-gamer | a6ecff90a716bb145931bb4042f9510e68698694 | [
"Apache-2.0"
] | null | null | null | src/services/explorer/core.py | solomonricky/epic-awesome-gamer | a6ecff90a716bb145931bb4042f9510e68698694 | [
"Apache-2.0"
] | null | null | null | src/services/explorer/core.py | solomonricky/epic-awesome-gamer | a6ecff90a716bb145931bb4042f9510e68698694 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Time : 2022/1/17 15:20
# Author : QIN2DIM
# Github : https://github.com/QIN2DIM
# Description:
import os.path
import time
from hashlib import sha256
from typing import List, Optional, Union, Dict
import cloudscraper
import yaml
from lxml import etree # skipcq: BAN-B410 - Ignore... | 33.786957 | 140 | 0.559452 | 16,464 | 0.944904 | 0 | 0 | 5,595 | 0.321109 | 0 | 0 | 6,131 | 0.351871 |
e12b30211ce2a1a3e4ccda61c62066c6b101ba25 | 7,312 | py | Python | model/utils.py | Tiamat-Tech/VAENAR-TTS | 69b6b5be1ab5168cfd3c6ab902075638e76a3b8d | [
"MIT"
] | 62 | 2021-07-15T10:09:56.000Z | 2022-03-31T02:53:09.000Z | model/utils.py | Tiamat-Tech/VAENAR-TTS | 69b6b5be1ab5168cfd3c6ab902075638e76a3b8d | [
"MIT"
] | 3 | 2021-07-19T14:45:26.000Z | 2022-03-31T02:38:57.000Z | model/utils.py | Tiamat-Tech/VAENAR-TTS | 69b6b5be1ab5168cfd3c6ab902075638e76a3b8d | [
"MIT"
] | 10 | 2021-07-19T03:20:44.000Z | 2022-02-21T07:07:38.000Z | import torch
import torch.nn as nn
from torch.nn import functional as F
class LinearNorm(nn.Module):
def __init__(self, in_features, out_features, activation=None,
use_bias=True, kernel_initializer='glorot_uniform', bias_initializer='zeros'):
super(LinearNorm, self).__init__()
... | 37.88601 | 112 | 0.583425 | 7,189 | 0.983178 | 0 | 0 | 870 | 0.118982 | 0 | 0 | 336 | 0.045952 |
e12bf8233ff1f13a2dd46e4e371f37801c0e563f | 2,186 | py | Python | fedjax/legacy/core/federated_algorithm.py | alshedivat/fedjax | ff46ba9955f167160353d7be72f6f5e1febee32c | [
"Apache-2.0"
] | null | null | null | fedjax/legacy/core/federated_algorithm.py | alshedivat/fedjax | ff46ba9955f167160353d7be72f6f5e1febee32c | [
"Apache-2.0"
] | null | null | null | fedjax/legacy/core/federated_algorithm.py | alshedivat/fedjax | ff46ba9955f167160353d7be72f6f5e1febee32c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.15625 | 80 | 0.747027 | 1,386 | 0.634035 | 0 | 0 | 450 | 0.205855 | 0 | 0 | 1,662 | 0.760293 |
0100201d7067edc12b14792aa66df0f99a8f5f65 | 2,306 | py | Python | lib/galaxy/webapps/galaxy/services/jobs.py | itisAliRH/galaxy | b3b693ea0788f773442c8481472a87f43ccb10d7 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/galaxy/services/jobs.py | itisAliRH/galaxy | b3b693ea0788f773442c8481472a87f43ccb10d7 | [
"CC-BY-3.0"
] | 6 | 2021-11-11T20:57:49.000Z | 2021-12-10T15:30:33.000Z | lib/galaxy/webapps/galaxy/services/jobs.py | itisAliRH/galaxy | b3b693ea0788f773442c8481472a87f43ccb10d7 | [
"CC-BY-3.0"
] | null | null | null | from enum import Enum
from typing import (
Any,
Dict,
)
from galaxy import (
exceptions,
model,
)
from galaxy.managers import hdas
from galaxy.managers.context import ProvidesUserContext
from galaxy.managers.jobs import (
JobManager,
JobSearch,
view_show_job,
)
from galaxy.schema.fields imp... | 28.469136 | 98 | 0.662186 | 1,896 | 0.822203 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.043799 |
0101f0c173a9caa73adb1fcaf5f05657435355f6 | 1,984 | py | Python | tests/deephub/trainer/test_early_stopping.py | deeplab-ai/deephub | b1d271436fab69cdfad14f19fa2e29c5338f18d6 | [
"Apache-2.0"
] | 8 | 2019-10-17T12:46:13.000Z | 2020-03-12T08:09:40.000Z | tests/deephub/trainer/test_early_stopping.py | deeplab-ai/deephub | b1d271436fab69cdfad14f19fa2e29c5338f18d6 | [
"Apache-2.0"
] | 12 | 2019-10-22T13:11:56.000Z | 2022-02-10T00:23:30.000Z | tests/deephub/trainer/test_early_stopping.py | deeplab-ai/deephub | b1d271436fab69cdfad14f19fa2e29c5338f18d6 | [
"Apache-2.0"
] | 1 | 2019-10-17T13:21:27.000Z | 2019-10-17T13:21:27.000Z | import pytest
import numpy as np
from deephub.models.registry.toy import DebugToyModel
from deephub.models.feeders import MemorySamplesFeeder
from deephub.trainer import Trainer
@pytest.mark.slow
def test_early_stopping(tmpdir):
model_params = {
'type': 'toy:DebugToyModel',
'model_dir': str(tmpd... | 36.072727 | 107 | 0.594758 | 0 | 0 | 0 | 0 | 1,801 | 0.907762 | 0 | 0 | 484 | 0.243952 |
0102028974c26fedb9d3e8e681861c033e610fbc | 2,157 | py | Python | tests/switchconfig/conftest.py | utsc-networking/utsc-tools | d5bc10cf825f1be46999d5a42da62cc0df456f0c | [
"MIT"
] | null | null | null | tests/switchconfig/conftest.py | utsc-networking/utsc-tools | d5bc10cf825f1be46999d5a42da62cc0df456f0c | [
"MIT"
] | null | null | null | tests/switchconfig/conftest.py | utsc-networking/utsc-tools | d5bc10cf825f1be46999d5a42da62cc0df456f0c | [
"MIT"
] | null | null | null | from typing import TYPE_CHECKING
import pytest
from . import CapturedOutput
from utsc.switchconfig import config
from prompt_toolkit.application import create_app_session
from prompt_toolkit.input import create_pipe_input
if TYPE_CHECKING:
from .. import MockedUtil
from pytest_mock import MockerFixture
@p... | 31.26087 | 103 | 0.696801 | 0 | 0 | 239 | 0.110802 | 428 | 0.198424 | 0 | 0 | 1,414 | 0.65554 |
0104208de3be81be65db916a9965b3d5c0b060ef | 10,742 | py | Python | hf/protocol/frame.py | HashFast/hashfast-tools | 9617691ac997f12085b688c3ecc6746e8510976d | [
"BSD-3-Clause"
] | 1 | 2020-12-15T02:49:36.000Z | 2020-12-15T02:49:36.000Z | hf/protocol/frame.py | HashFast/hashfast-tools | 9617691ac997f12085b688c3ecc6746e8510976d | [
"BSD-3-Clause"
] | null | null | null | hf/protocol/frame.py | HashFast/hashfast-tools | 9617691ac997f12085b688c3ecc6746e8510976d | [
"BSD-3-Clause"
] | 3 | 2015-09-02T00:31:06.000Z | 2020-12-15T02:52:06.000Z | # Copyright (c) 2014, HashFast Technologies LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of... | 41.474903 | 106 | 0.67129 | 4,851 | 0.451592 | 0 | 0 | 166 | 0.015453 | 0 | 0 | 5,302 | 0.493577 |
01044352dba301fc4c0e8b880755aef7cda79a1f | 561 | py | Python | page/models.py | Dynamicist-handa/EscuelaLingua | 198abfcc14204d8ecd2706f2de2650293219662e | [
"Apache-2.0"
] | null | null | null | page/models.py | Dynamicist-handa/EscuelaLingua | 198abfcc14204d8ecd2706f2de2650293219662e | [
"Apache-2.0"
] | null | null | null | page/models.py | Dynamicist-handa/EscuelaLingua | 198abfcc14204d8ecd2706f2de2650293219662e | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.conf import settings
from courses.models import Course
# Create your models here.
class Update(models.Model):
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
null=True
)
course = models.ForeignKey(Course, on_... | 26.714286 | 69 | 0.741533 | 432 | 0.770053 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.130125 |
010633c8fe4a1f8f50f2cbc160f034fdd91b60e5 | 11,162 | py | Python | src/command.py | 2minchul/chip-helper | 437d33938a19bab7e7380ff9dd0e7e98ec26fdb7 | [
"Apache-2.0"
] | 2 | 2020-05-12T06:11:39.000Z | 2020-07-17T10:45:20.000Z | src/command.py | 2minchul/chip-helper | 437d33938a19bab7e7380ff9dd0e7e98ec26fdb7 | [
"Apache-2.0"
] | 3 | 2021-06-08T21:30:59.000Z | 2022-03-12T00:28:26.000Z | src/command.py | 2minchul/chip-helper | 437d33938a19bab7e7380ff9dd0e7e98ec26fdb7 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import re
import sys
from operator import itemgetter
from typing import Optional
import sentry_sdk
import youtube_dl
from selenium.common.exceptions import SessionNotCreatedException
from cmd_tool import (
get_execution_path,
exit_enter,
get_input_path_or_exit,
get_chrome_dri... | 34.450617 | 110 | 0.610554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,988 | 0.253478 |
0108aa0614cb046c0695b8425a9b7d179e4c447f | 1,338 | py | Python | code/get.py | tionn/holo-at-on | 8bda6e73d94184fa6fde3c1d26640e96341ae2a2 | [
"CC0-1.0"
] | null | null | null | code/get.py | tionn/holo-at-on | 8bda6e73d94184fa6fde3c1d26640e96341ae2a2 | [
"CC0-1.0"
] | null | null | null | code/get.py | tionn/holo-at-on | 8bda6e73d94184fa6fde3c1d26640e96341ae2a2 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import io
import urllib2
import string
from BeautifulSoup import BeautifulSoup
import pandas as pd
import sys
city_url = 'http://twblg.dict.edu.tw/holodict_new/index/xiangzhen_level1.jsp?county=1'
def extract_items(base_url):
html = urllib2.urlopen(base_url).read()
... | 24.777778 | 89 | 0.672646 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 482 | 0.354412 |
01092c860365112e2ab6bab4644a012763fb75a9 | 3,729 | py | Python | Soccer_league_project1.py | denisela1/Soccer_League_P1 | 5bc6de71259643ed2a6d9791ddbc70773f1c259d | [
"BSD-3-Clause-Clear"
] | 1 | 2018-02-26T08:47:15.000Z | 2018-02-26T08:47:15.000Z | Soccer_league_project1.py | denisela1/Soccer_League_P1 | 5bc6de71259643ed2a6d9791ddbc70773f1c259d | [
"BSD-3-Clause-Clear"
] | null | null | null | Soccer_league_project1.py | denisela1/Soccer_League_P1 | 5bc6de71259643ed2a6d9791ddbc70773f1c259d | [
"BSD-3-Clause-Clear"
] | null | null | null | import csv
#global variables for teams:
sharks = []
dragons = []
raptors = []
#read the csv file with the player info and create a player dictionary:
def read_players():
player_reader = csv.reader(open('soccer_players.csv'))
player_dictionary = {}
for row in player_reader:
key = row[0]
play... | 33.594595 | 97 | 0.61196 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,022 | 0.274068 |
010b4ad2a97b357a77ffe35ad3089e6223aec664 | 2,312 | py | Python | Gobot-Mecanum/robot.py | FRC1076/2019-Parade | 3824449ed10e33b401efb646fd2e6470c3941c8b | [
"MIT"
] | null | null | null | Gobot-Mecanum/robot.py | FRC1076/2019-Parade | 3824449ed10e33b401efb646fd2e6470c3941c8b | [
"MIT"
] | 2 | 2019-06-17T23:38:23.000Z | 2019-06-17T23:39:43.000Z | Gobot-Mecanum/robot.py | FRC1076/2019-Parade | 3824449ed10e33b401efb646fd2e6470c3941c8b | [
"MIT"
] | null | null | null | import wpilib
import wpilib.drive
import ctre
import robotmap
from wpilib.interfaces import GenericHID
RIGHT_HAND = GenericHID.Hand.kRight
LEFT_HAND = GenericHID.Hand.kLeft
class Robot(wpilib.TimedRobot):
def robotInit(self):
front_left_motor = ctre.WPI_TalonSRX(robotmap.mecanum['front_left_motor'])
... | 27.2 | 86 | 0.608564 | 1,814 | 0.784602 | 0 | 0 | 0 | 0 | 0 | 0 | 555 | 0.240052 |
01122030ff57d9377ddf61352858ba09c5197d30 | 139 | py | Python | blog/urls.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | blog/urls.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | blog/urls.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path
from .views import blog
urlpatterns = [
path('', blog, name='blog'),
]
| 15.444444 | 32 | 0.705036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.057554 |
0112992950dc4c577579c050f7017281022ccc42 | 139 | py | Python | iris_sdk/models/maps/local_rate_center_list.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/local_rate_center_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/local_rate_center_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.maps.base_map import BaseMap
class LocalRateCenterListMap(BaseMap):
rate_center_id = None | 19.857143 | 49 | 0.791367 | 65 | 0.467626 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.151079 |
01157eaf40b4347f7763196480bf6b81341c469b | 5,374 | py | Python | webapp/services/hexun_service.py | myfreshcity/mystock | 3a8832e8c498128683b6af528da92d7fda32386d | [
"MIT"
] | 2 | 2016-09-19T09:18:17.000Z | 2022-02-16T14:55:51.000Z | webapp/services/hexun_service.py | myfreshcity/mystock | 3a8832e8c498128683b6af528da92d7fda32386d | [
"MIT"
] | 2 | 2020-04-29T13:01:45.000Z | 2020-04-29T13:01:45.000Z | webapp/services/hexun_service.py | myfreshcity/mystock | 3a8832e8c498128683b6af528da92d7fda32386d | [
"MIT"
] | 2 | 2018-06-29T15:09:36.000Z | 2019-09-05T09:26:06.000Z | import re
import traceback
import urllib2
import pandas as pd
import json,random,time,datetime
from bs4 import BeautifulSoup
from pandas.tseries.offsets import YearEnd
from sqlalchemy import text
from webapp import db, app
from webapp.models import FinanceBasic
headers = {'User-Agent':'Mozilla/5.0 (Windows; U; Wind... | 36.067114 | 128 | 0.595646 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,202 | 0.216733 |
0118814a3663bee91c59984af98f47d72c8f9e4c | 2,555 | py | Python | machine-learning-and-ai/handwriting-classifier/neural_network_handwriting_classifier.py | fraserlove/python | b449259c02e73102e37a4cd42018dbcc6b04d0ba | [
"Apache-2.0"
] | 16 | 2020-06-11T16:54:55.000Z | 2022-01-07T01:36:05.000Z | machine-learning-and-ai/handwriting-classifier/neural_network_handwriting_classifier.py | fraserlove/python-projects | b449259c02e73102e37a4cd42018dbcc6b04d0ba | [
"Apache-2.0"
] | null | null | null | machine-learning-and-ai/handwriting-classifier/neural_network_handwriting_classifier.py | fraserlove/python-projects | b449259c02e73102e37a4cd42018dbcc6b04d0ba | [
"Apache-2.0"
] | 15 | 2020-06-14T08:29:50.000Z | 2021-08-05T17:25:42.000Z | import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data', one_hot = True)
# Network hyperparameters
learning_rate = 0.0001 # 1.95 for sigmoid activation function
batch_size = 10
update_step = 10
input_nodes = 784 # 28x38 images as input
layer_1_... | 46.454545 | 132 | 0.768689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.094325 |
011929cc6bf535432cf049cfeb608476447f32f5 | 1,157 | py | Python | 202_happyNumber.py | stuti-rastogi/leetcode-python-solutions | 73593fe642a06a83cde974ba5e6de3a7b396ec84 | [
"MIT"
] | 4 | 2018-07-24T08:36:42.000Z | 2019-08-25T17:48:47.000Z | 202_happyNumber.py | stuti-rastogi/leetcodesolutions | 73593fe642a06a83cde974ba5e6de3a7b396ec84 | [
"MIT"
] | null | null | null | 202_happyNumber.py | stuti-rastogi/leetcodesolutions | 73593fe642a06a83cde974ba5e6de3a7b396ec84 | [
"MIT"
] | null | null | null | class Solution(object):
def isHappy(self, n):
"""
:type n: int
:rtype: bool
"""
seen = set()
while (True):
sumOfSquaredDigits = 0
while n > 0:
digit = n % 10
n = n // 10
sumOfSquaredDigits += digi... | 26.906977 | 46 | 0.395851 | 540 | 0.466724 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.547969 |
011acc08c0fc9cd09faf7e3c06fdec11827adac8 | 434 | py | Python | dataclazzes/playlist.py | navrudh/youtube-music-helper-scripts | 7bae74d698e15e11bac427e42bd0a21e08163f88 | [
"MIT"
] | null | null | null | dataclazzes/playlist.py | navrudh/youtube-music-helper-scripts | 7bae74d698e15e11bac427e42bd0a21e08163f88 | [
"MIT"
] | null | null | null | dataclazzes/playlist.py | navrudh/youtube-music-helper-scripts | 7bae74d698e15e11bac427e42bd0a21e08163f88 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from dataclazzes.track import Track
@dataclass
class Playlist:
"""Class for storing playlist information."""
id: str
title: str
tracks: [Track] = field(default_factory=list)
@staticmethod
def from_raw(raw_playlists: list):
return [
... | 22.842105 | 72 | 0.663594 | 342 | 0.788018 | 0 | 0 | 353 | 0.813364 | 0 | 0 | 64 | 0.147465 |
011b749c0cb7168d1d612e734d1940a1245eb56c | 9,091 | py | Python | entity.py | PIRXrav/pyhack | af5c86fb721053d8a3e819ab772c8144a23b86bf | [
"MIT"
] | null | null | null | entity.py | PIRXrav/pyhack | af5c86fb721053d8a3e819ab772c8144a23b86bf | [
"MIT"
] | null | null | null | entity.py | PIRXrav/pyhack | af5c86fb721053d8a3e819ab772c8144a23b86bf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# pylint: disable=C0103
"""
Définie la classe entity
Permet de modeliser le personnage et des monstre
"""
from random import choice
from vect import Vect
from astar import calc_path_astart
import chars
class Player():
"""
Classe Player :
"""
BULLET_MAX = 10
HP_MAX = 10
... | 24.438172 | 79 | 0.494995 | 8,775 | 0.963545 | 794 | 0.087186 | 0 | 0 | 0 | 0 | 2,199 | 0.241463 |
011dbd3f8e4f3dc4a3cd128fe4d90224e86d26f2 | 3,488 | py | Python | apps/Ipo.py | KiloSat/FirstNivesh | 0fe200e08bb9f7d89de91f59eb14448fa7b972b9 | [
"MIT"
] | null | null | null | apps/Ipo.py | KiloSat/FirstNivesh | 0fe200e08bb9f7d89de91f59eb14448fa7b972b9 | [
"MIT"
] | null | null | null | apps/Ipo.py | KiloSat/FirstNivesh | 0fe200e08bb9f7d89de91f59eb14448fa7b972b9 | [
"MIT"
] | 2 | 2021-04-03T16:39:23.000Z | 2021-08-15T08:09:21.000Z | import streamlit as st
def app():
import plotly.express as px
import plotly.graph_objects as go
from textblob import TextBlob
import tweepy
import sys
import pandas as pd
api_key = 'q7QHHHAKEwd5igoUvVrx5sCiw'
api_secret_key = 'i7uhcFirM38bnbYscv32beJnMpsmMxFdYSHitwfSCPIeMj7L... | 35.591837 | 109 | 0.610952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 781 | 0.223911 |
011ec6d9a369d9cd8fa960e87d7fc5aabbdb09f6 | 2,447 | py | Python | tests/test_unit_varfilter.py | gomibaya/pyVarfilter | 098414223e575dda3fabe7b8ccb1b16f6f8da3a0 | [
"MIT"
] | null | null | null | tests/test_unit_varfilter.py | gomibaya/pyVarfilter | 098414223e575dda3fabe7b8ccb1b16f6f8da3a0 | [
"MIT"
] | null | null | null | tests/test_unit_varfilter.py | gomibaya/pyVarfilter | 098414223e575dda3fabe7b8ccb1b16f6f8da3a0 | [
"MIT"
] | null | null | null | import unittest
import logging
from varfilter import varfilter, filter
class TestVarfilter(unittest.TestCase):
def setUp(self):
print("Preparando el contexto")
self.source1 = {"teststr1": "Value teststr1",
"testint1": 10}
self.source2 = {"teststr2": "Value teststr2... | 34.464789 | 73 | 0.495709 | 2,219 | 0.906825 | 0 | 0 | 0 | 0 | 0 | 0 | 583 | 0.238251 |
01203f70632858bfabcba480840b28432e8c773f | 4,989 | py | Python | tests/test_extensions/test_arithmatex.py | pawamoy/pymdown-extensions | 90de4c0c52456751141e898af3941c729914a80e | [
"MIT"
] | null | null | null | tests/test_extensions/test_arithmatex.py | pawamoy/pymdown-extensions | 90de4c0c52456751141e898af3941c729914a80e | [
"MIT"
] | null | null | null | tests/test_extensions/test_arithmatex.py | pawamoy/pymdown-extensions | 90de4c0c52456751141e898af3941c729914a80e | [
"MIT"
] | null | null | null | """Test cases for Arithmatex."""
from .. import util
class TestArithmatexLimit(util.MdCase):
"""Test limiting Arithmatex inline and block inputs."""
extension = [
'pymdownx.arithmatex'
]
extension_configs = {'pymdownx.arithmatex': {'inline_syntax': ['round'], 'block_syntax': ['square']}}
... | 28.83815 | 371 | 0.453999 | 4,927 | 0.987573 | 0 | 0 | 0 | 0 | 0 | 0 | 3,339 | 0.669272 |
012152e2a37577150f9d63f073997bc92e0bc861 | 197 | py | Python | source/applications/advanced/hand_eye_calibration/ur_hand_eye_calibration/3rdParty/rtde-2.3.6/setup.py | ebruun/python-samples | 746e5090f45659c60f01bf831a0308966d713b21 | [
"BSD-3-Clause"
] | 10 | 2020-12-03T22:59:39.000Z | 2022-03-27T07:31:42.000Z | source/applications/advanced/hand_eye_calibration/ur_hand_eye_calibration/3rdParty/rtde-2.3.6/setup.py | ebruun/python-samples | 746e5090f45659c60f01bf831a0308966d713b21 | [
"BSD-3-Clause"
] | 55 | 2019-07-23T09:05:27.000Z | 2020-11-02T14:42:55.000Z | source/applications/advanced/hand_eye_calibration/ur_hand_eye_calibration/3rdParty/rtde-2.3.6/setup.py | ebruun/python-samples | 746e5090f45659c60f01bf831a0308966d713b21 | [
"BSD-3-Clause"
] | 4 | 2020-01-09T08:36:23.000Z | 2020-09-12T20:28:31.000Z | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="UrRtde",
packages=["rtde"],
version=1.0,
description="Real-Time Data Exchange (RTDE) python client + examples",
)
| 19.7 | 74 | 0.639594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.477157 |
0121afa2ee5440a70a9a651bed1ddda312a2e7ae | 891 | py | Python | code/roman2int.py | wp-lai/xpython | 3d90362e56173052d8dd66817feffd67dc07db91 | [
"MIT"
] | 5 | 2016-11-17T07:35:05.000Z | 2018-04-07T16:34:16.000Z | code/roman2int.py | wp-lai/xpython | 3d90362e56173052d8dd66817feffd67dc07db91 | [
"MIT"
] | null | null | null | code/roman2int.py | wp-lai/xpython | 3d90362e56173052d8dd66817feffd67dc07db91 | [
"MIT"
] | null | null | null | """
Task:
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
Symbol Value
I 1 (unus)
V 5 (quinque)
X 10 (decem)
L 50 (quinquaginta)
C 100 (centum)
D 500 (quingenti)
M 1,000 (mille)
>>> roman_to_int("DCXXI")
621
>>> roman_to_int("VI")
6
>>> roman_to_int... | 18.183673 | 62 | 0.539843 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 453 | 0.508418 |
01243d69b6f9b70a1311214737f35975b0a644a4 | 2,082 | py | Python | test/test_upstream.py | bninja/rump | 3b6c4ff29974b3c04a260d8275567beebb296e5d | [
"0BSD"
] | 6 | 2015-07-27T09:02:36.000Z | 2018-07-18T11:11:33.000Z | test/test_upstream.py | bninja/rump | 3b6c4ff29974b3c04a260d8275567beebb296e5d | [
"0BSD"
] | null | null | null | test/test_upstream.py | bninja/rump | 3b6c4ff29974b3c04a260d8275567beebb296e5d | [
"0BSD"
] | null | null | null | import mock
import pytest
from rump import parser, Server, Upstream, Selection, exc
@pytest.fixture
def parse():
return parser.for_upstream()
def test_upstream_valid(parse):
cases = [
('hi',
Upstream(Selection(Server('http', 'hi'), 1))),
('https://hi',
Upstream(Selection(S... | 28.135135 | 66 | 0.583573 | 0 | 0 | 0 | 0 | 61 | 0.029299 | 0 | 0 | 351 | 0.168588 |
0124ac8c7a202aa897f92f830d9e99028d3f1d5a | 1,113 | py | Python | places/admin.py | moshthepitt/shulezote | e903a208948ab5294183e2a8c2dac9360a184654 | [
"MIT"
] | 2 | 2015-12-02T08:14:34.000Z | 2020-12-16T19:56:46.000Z | places/admin.py | moshthepitt/shulezote | e903a208948ab5294183e2a8c2dac9360a184654 | [
"MIT"
] | 4 | 2016-10-04T12:15:42.000Z | 2021-06-10T19:47:39.000Z | places/admin.py | moshthepitt/shulezote | e903a208948ab5294183e2a8c2dac9360a184654 | [
"MIT"
] | 1 | 2018-08-20T14:19:32.000Z | 2018-08-20T14:19:32.000Z | from django.contrib import admin
from places.models import County, Constituency, Province, District
from places.models import Division, Location, SubLocation, SchoolZone
class CountyAdmin(admin.ModelAdmin):
search_fields = ['name']
class ProvinceAdmin(admin.ModelAdmin):
search_fields = ['name']
class Dis... | 24.195652 | 69 | 0.779874 | 543 | 0.487871 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.043127 |
0125022bc1c32fb48c4660789e204445cd4abb92 | 520 | py | Python | pygeems/__init__.py | arkottke/pygeems | 5bfb563dbc151dc7d7581c31de0061e564cf7d84 | [
"MIT"
] | 3 | 2019-01-11T04:44:29.000Z | 2022-01-05T01:09:46.000Z | pygeems/__init__.py | arkottke/pygeems | 5bfb563dbc151dc7d7581c31de0061e564cf7d84 | [
"MIT"
] | null | null | null | pygeems/__init__.py | arkottke/pygeems | 5bfb563dbc151dc7d7581c31de0061e564cf7d84 | [
"MIT"
] | 1 | 2021-02-21T17:29:21.000Z | 2021-02-21T17:29:21.000Z | """pyGEEMs: Geotechnical earthquake engineering models implemented in Python."""
import pathlib
from pkg_resources import get_distribution
import scipy.constants
FPATH_DATA = pathlib.Path(__file__).parent / "data"
KPA_TO_ATM = scipy.constants.kilo / scipy.constants.atm
__author__ = "Albert Kottke"
__copyright__ = "... | 26 | 80 | 0.796154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.296154 |
012579b5541f7896f0ff2928c89b8dec890eb8d1 | 414 | py | Python | Ago-Dic-2020/sena-martinez-angel-david/Primer Parcial/Gui.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2020/sena-martinez-angel-david/Primer Parcial/Gui.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2020/sena-martinez-angel-david/Primer Parcial/Gui.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | from tkinter import *
from tkinter.ttk import *
# creando ventana tkinter
root = Tk()
# Agregando herramientas a la ventana
Label(root, text = 'PuntosExtra', font =(
'Verdana', 15)).pack(side = TOP, pady = 10)
# Insertando la imagen de login
foto = PhotoImage(file = r"C:\Users\david\OneDrive\Imágenes\lo... | 25.875 | 72 | 0.669082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.419277 |
012711b60afee7420df0f399f035f95d78d3df36 | 2,200 | py | Python | custom/ewsghana/urls.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | custom/ewsghana/urls.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | custom/ewsghana/urls.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import patterns, url, include
from corehq.apps.api.urls import CommCareHqApi
from custom.ewsghana.resources.v0_1 import EWSLocationResource
from custom.ewsghana.views import EWSConfigView, EWSGlobalStats, InputStockView, EWSUserExtensionView, \
DashboardRedirectReportView
hq_api = CommCareHqA... | 64.705882 | 108 | 0.753636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,207 | 0.548636 |
01274e1a8dfe413246f9258fed40ee9356e14195 | 9,288 | py | Python | ee559/hw2/classifier.py | chenying-wang/usc-ee-coursework-public | 5bc94c2350bcebf1036fb058fe7dc4f7e31e1de1 | [
"MIT"
] | 1 | 2021-03-24T10:46:20.000Z | 2021-03-24T10:46:20.000Z | ee559/hw2/classifier.py | chenying-wang/usc-ee-coursework-public | 5bc94c2350bcebf1036fb058fe7dc4f7e31e1de1 | [
"MIT"
] | null | null | null | ee559/hw2/classifier.py | chenying-wang/usc-ee-coursework-public | 5bc94c2350bcebf1036fb058fe7dc4f7e31e1de1 | [
"MIT"
] | 1 | 2021-03-25T09:18:45.000Z | 2021-03-25T09:18:45.000Z | import numpy as np
from scipy.spatial.distance import cdist
import sys
from plot_area import plot_area
COLOR = ['tab:blue', 'tab:orange', 'tab:green']
class BaseClassifier:
d = -1
c = -1
def __init__(self, d):
super().__init__()
if (d <= 0):
raise RuntimeError("Classifier.D/... | 42.605505 | 135 | 0.602498 | 9,130 | 0.982989 | 0 | 0 | 0 | 0 | 0 | 0 | 525 | 0.056525 |
0127942a3e99b818d3bf03948c616cc5027b74c1 | 1,920 | py | Python | Web/discussManager.py | cmd2001/Open-TesutoHime | 2c30aa35650383adfb99496aebd425dffd287eda | [
"MIT"
] | 11 | 2020-11-28T16:45:35.000Z | 2021-08-31T07:56:26.000Z | Web/discussManager.py | cmd2001/Open-TesutoHime | 2c30aa35650383adfb99496aebd425dffd287eda | [
"MIT"
] | null | null | null | Web/discussManager.py | cmd2001/Open-TesutoHime | 2c30aa35650383adfb99496aebd425dffd287eda | [
"MIT"
] | 2 | 2021-05-16T03:09:58.000Z | 2021-08-21T07:24:58.000Z | import sys
from utils import *
class DiscussManager:
def add_discuss(self, problem_id: int, username: str, data: str):
db = db_connect()
cursor = db.cursor()
try:
cursor.execute("INSERT INTO Discuss(Problem_ID, Username, Data, Time) VALUES(%s, %s, %s, %s)",
... | 32 | 106 | 0.577604 | 1,849 | 0.963021 | 0 | 0 | 0 | 0 | 0 | 0 | 406 | 0.211458 |
0128d2dc205aef3ebf52d764565e44d09f889dd0 | 1,977 | py | Python | casimir/force_calc/force_calc_mc.py | charlesblakemore/opt_lev_analysis | 704f174e9860907de349688ed82b5812bbb07c2d | [
"MIT"
] | null | null | null | casimir/force_calc/force_calc_mc.py | charlesblakemore/opt_lev_analysis | 704f174e9860907de349688ed82b5812bbb07c2d | [
"MIT"
] | null | null | null | casimir/force_calc/force_calc_mc.py | charlesblakemore/opt_lev_analysis | 704f174e9860907de349688ed82b5812bbb07c2d | [
"MIT"
] | 1 | 2019-11-27T19:10:25.000Z | 2019-11-27T19:10:25.000Z | import math, sys, random, mcint
from scipy import integrate
import numpy as np
gap = float(sys.argv[1])
lam = float(sys.argv[2])
print(gap, lam)
## calculate the yukawa force over a distributed test mass assumed to be cube
D = 5 # diameter of bead (um)
rhob = 2e3 # density bead (kg/m^3)
rhoa = 19.3e3 # density attr... | 27.082192 | 121 | 0.616591 | 0 | 0 | 351 | 0.177542 | 0 | 0 | 0 | 0 | 572 | 0.289327 |
012a1022a18b104991ad25c5bfeca0df7e5858c1 | 8,823 | py | Python | robot-server/robot_server/robot/calibration/tip_length/user_flow.py | Axel-Jacobsen/opentrons | c543d95c25003f2e784560efaa6a91f051d4cd33 | [
"Apache-2.0"
] | 1 | 2022-03-17T20:38:04.000Z | 2022-03-17T20:38:04.000Z | robot-server/robot_server/robot/calibration/tip_length/user_flow.py | Axel-Jacobsen/opentrons | c543d95c25003f2e784560efaa6a91f051d4cd33 | [
"Apache-2.0"
] | null | null | null | robot-server/robot_server/robot/calibration/tip_length/user_flow.py | Axel-Jacobsen/opentrons | c543d95c25003f2e784560efaa6a91f051d4cd33 | [
"Apache-2.0"
] | null | null | null | import logging
from typing import (
Dict, Awaitable, Callable, Any, Set, List, Optional,
TYPE_CHECKING)
from opentrons.types import Mount, Point, Location
from opentrons.config import feature_flags as ff
from opentrons.hardware_control import ThreadManager, CriticalPoint
from opentrons.protocol_api import labwa... | 38.867841 | 99 | 0.656693 | 7,395 | 0.83815 | 0 | 0 | 82 | 0.009294 | 3,357 | 0.380483 | 899 | 0.101893 |
012aa2038cdc99acbfdd28f90d56ceb7c6e6b261 | 1,572 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/WGL/ARB/pbuffer.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/WGL/ARB/pbuffer.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/WGL/ARB/pbuffer.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.WGL import _types as _cs
# End users want this...
from OpenGL.raw.WGL._types import *
from OpenGL.raw.WGL import _errors
from OpenGL.constant import Constant as _C
imp... | 42.486486 | 111 | 0.811705 | 0 | 0 | 0 | 0 | 560 | 0.356234 | 0 | 0 | 345 | 0.219466 |
012c3b0eb2f715797ab316942c7962c44dea54d6 | 1,885 | py | Python | dj_warning_forms/forms.py | dnmellen/dj-warning-forms | 25213821f41ad6864cb7eda7bd2f6640d4418561 | [
"BSD-3-Clause"
] | 3 | 2022-03-15T09:09:08.000Z | 2022-03-23T12:30:47.000Z | dj_warning_forms/forms.py | dnmellen/dj-warning-forms | 25213821f41ad6864cb7eda7bd2f6640d4418561 | [
"BSD-3-Clause"
] | 1 | 2022-03-16T08:04:07.000Z | 2022-03-18T21:18:38.000Z | dj_warning_forms/forms.py | dnmellen/dj-warning-forms | 25213821f41ad6864cb7eda7bd2f6640d4418561 | [
"BSD-3-Clause"
] | null | null | null | from collections import namedtuple
import inspect
from django import forms
FormFieldWarning = namedtuple("FormFieldWarning", ["message", "description"])
class WarningFormMixin:
"""Classes using WarningFormMixin should implement methods to catch warnings
>>> def warning_mailboxes(self) -> List[FormFieldWarn... | 33.660714 | 80 | 0.523607 | 1,727 | 0.91618 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.197878 |
012f17bafc339e27fe0149bdbf1a7b12a681ef93 | 29 | py | Python | demo2022.py | finaleo83/demo01 | 579782f564ab0f5cc95f6b5e63644c5f930c0019 | [
"Unlicense"
] | null | null | null | demo2022.py | finaleo83/demo01 | 579782f564ab0f5cc95f6b5e63644c5f930c0019 | [
"Unlicense"
] | null | null | null | demo2022.py | finaleo83/demo01 | 579782f564ab0f5cc95f6b5e63644c5f930c0019 | [
"Unlicense"
] | null | null | null | print("Hello, World! Again!") | 29 | 29 | 0.689655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.758621 |
01314db002cc9b5ea847e74d9af1164332434719 | 8,791 | py | Python | ai/ai.py | TED-996/pro-evolution-foosball | ced46dd7340664d7c7ca7679c6582c7636e2c2a8 | [
"MIT"
] | null | null | null | ai/ai.py | TED-996/pro-evolution-foosball | ced46dd7340664d7c7ca7679c6582c7636e2c2a8 | [
"MIT"
] | null | null | null | ai/ai.py | TED-996/pro-evolution-foosball | ced46dd7340664d7c7ca7679c6582c7636e2c2a8 | [
"MIT"
] | null | null | null | from numpy import array, arange, argmax
from numpy.random import choice
from itertools import product
from ai.NN import NN
import pickle
from random import random, randrange, randint
from collections import deque
from math import floor
class AI:
MEMORY_DIMENSION = 90000
def __init__(self, load: bool = False,... | 41.079439 | 110 | 0.615402 | 8,552 | 0.972813 | 0 | 0 | 0 | 0 | 0 | 0 | 1,325 | 0.150722 |
013309a59e2c92190292c61529ffae1f691b50cb | 243 | py | Python | Desafio49.py | VictorCastao/Curso-em-Video-Python | aeee8baaa73c04b839a27ae37ba24ecc0b863075 | [
"MIT"
] | null | null | null | Desafio49.py | VictorCastao/Curso-em-Video-Python | aeee8baaa73c04b839a27ae37ba24ecc0b863075 | [
"MIT"
] | null | null | null | Desafio49.py | VictorCastao/Curso-em-Video-Python | aeee8baaa73c04b839a27ae37ba24ecc0b863075 | [
"MIT"
] | null | null | null | print('=' * 12 + 'Desafio 49' + '=' * 12)
numero = int(input('Digite o número para a tabuada: '))
print('=' * 13)
print(f'Tabuada do {numero}')
print('=' * 13)
for i in range(1,11):
print(f'{numero} x {i:2} = {numero * i}')
print('=' * 13) | 30.375 | 55 | 0.555556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.483607 |
01343ef465fcba8903301425b1e7414924d1fd27 | 1,686 | py | Python | Shared_Files/Music_Pallete.py | EricCacciavillani/LyreBird | 858657faef39d1adcba19ff0213210ba490b4afa | [
"MIT"
] | 1 | 2019-05-04T02:34:20.000Z | 2019-05-04T02:34:20.000Z | Shared_Files/Music_Pallete.py | EricCacciavillani/LyreBird | 858657faef39d1adcba19ff0213210ba490b4afa | [
"MIT"
] | null | null | null | Shared_Files/Music_Pallete.py | EricCacciavillani/LyreBird | 858657faef39d1adcba19ff0213210ba490b4afa | [
"MIT"
] | 1 | 2019-04-04T19:14:09.000Z | 2019-04-04T19:14:09.000Z | import pretty_midi
import sys
import numpy as np
from tqdm import tqdm
from collections import Counter
sys.path.append('..')
from Pre_Production.Midi_Pre_Processor import *
from Shared_Files.Global_Util import *
class MusicPallete:
def __init__(self, pre_processor_obj):
self.__all_possible_instr_note_pai... | 33.058824 | 129 | 0.682681 | 1,472 | 0.873072 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.03618 |
01347244fcb03a5c18ef357b962ba9072723419d | 1,408 | py | Python | test/SIT/Bootstrap/TestBootstrap.py | antonelloceravola/ToolBOSCore | b03414a867a9f0585e06bb8e4f299c4be1357f3a | [
"BSD-3-Clause"
] | null | null | null | test/SIT/Bootstrap/TestBootstrap.py | antonelloceravola/ToolBOSCore | b03414a867a9f0585e06bb8e4f299c4be1357f3a | [
"BSD-3-Clause"
] | null | null | null | test/SIT/Bootstrap/TestBootstrap.py | antonelloceravola/ToolBOSCore | b03414a867a9f0585e06bb8e4f299c4be1357f3a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# launches the unit testing
#
# Copyright (C)
# Honda Research Institute Europe GmbH
# Carl-Legien-Str. 30
# 63073 Offenbach/Main
# Germany
#
# UNPUBLISHED PROPRIETARY MATERIAL.
# ALL RIGHTS RESERVED.
#
#
import os
import tempfile
import unittest
from ToolBOSCo... | 22.349206 | 87 | 0.665483 | 880 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 448 | 0.318182 |
0139cdb76dae20ff11cf54b33120c3d867395d2f | 9,566 | py | Python | GoogleCalendar.py | InRong/Glance | cc15659436bba2b4bee396b4a3e595a157f31401 | [
"Apache-2.0"
] | null | null | null | GoogleCalendar.py | InRong/Glance | cc15659436bba2b4bee396b4a3e595a157f31401 | [
"Apache-2.0"
] | null | null | null | GoogleCalendar.py | InRong/Glance | cc15659436bba2b4bee396b4a3e595a157f31401 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Module for adding Google Calendar Functionality.
#
# by Peter Juett
# References:https://developers.google.com/calendar/quickstart/python
#
# Copyright 2018
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#... | 37.810277 | 146 | 0.569935 | 7,918 | 0.827723 | 0 | 0 | 0 | 0 | 0 | 0 | 2,521 | 0.263538 |
013c4fb306411e4299bc53f9a104c56ba9d36105 | 1,705 | py | Python | pypub/scrapers/jneuroscience.py | ScholarTools/pypub | 1fcdf895d4777aea7882a1812fef307255702a80 | [
"MIT"
] | 1 | 2016-07-03T17:53:54.000Z | 2016-07-03T17:53:54.000Z | pypub/scrapers/jneuroscience.py | ScholarTools/pypub | 1fcdf895d4777aea7882a1812fef307255702a80 | [
"MIT"
] | 8 | 2015-12-28T19:53:36.000Z | 2021-12-13T19:41:39.000Z | pypub/scrapers/jneuroscience.py | ScholarTools/pypub | 1fcdf895d4777aea7882a1812fef307255702a80 | [
"MIT"
] | 1 | 2016-06-21T15:08:46.000Z | 2016-06-21T15:08:46.000Z | # -*- coding: utf-8 -*-
"""
For an example page see:
http://www.jneurosci.org/content/23/10/4355.long#ref-list-1
Note that JNeuroscience seems to be part of a consortium with J Physiology,
J Neurophysiology, PNS, etc
perhaps check out HighWire Press?
"""
import requests
from bs4 import BeautifulSoup
class JNeuros... | 31.574074 | 100 | 0.649853 | 1,135 | 0.662194 | 0 | 0 | 0 | 0 | 0 | 0 | 1,338 | 0.78063 |
013c7675c37f149bc9d81184f6cde81bed1535d6 | 1,089 | py | Python | fastapi-master-api/app/api/models/create_metric.py | SionAbes/fullstack-porfolio | 6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9 | [
"MIT"
] | 1 | 2021-12-25T09:19:25.000Z | 2021-12-25T09:19:25.000Z | fastapi-master-api/app/api/models/create_metric.py | SionAbes/fullstack-porfolio | 6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9 | [
"MIT"
] | null | null | null | fastapi-master-api/app/api/models/create_metric.py | SionAbes/fullstack-porfolio | 6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import annotations
import re # noqa: F401
from datetime import date, datetime # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
class CreateMetric(BaseModel):
"""NOTE: This class is... | 30.25 | 96 | 0.708907 | 788 | 0.7236 | 0 | 0 | 0 | 0 | 0 | 0 | 615 | 0.564738 |
013c77d6a4350f96399efe1ca86c27a469b9fa59 | 32 | py | Python | src/logic_analyzer_bfms/__init__.py | pybfms/pybfms_logic_analyzer | 7696e16c53a7248a0660ba1cc8f108cda03c1e08 | [
"Apache-2.0"
] | null | null | null | src/logic_analyzer_bfms/__init__.py | pybfms/pybfms_logic_analyzer | 7696e16c53a7248a0660ba1cc8f108cda03c1e08 | [
"Apache-2.0"
] | null | null | null | src/logic_analyzer_bfms/__init__.py | pybfms/pybfms_logic_analyzer | 7696e16c53a7248a0660ba1cc8f108cda03c1e08 | [
"Apache-2.0"
] | 1 | 2020-11-22T08:37:39.000Z | 2020-11-22T08:37:39.000Z |
from .la_initiator_bfm import * | 16 | 31 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
013c7f4681cad6f22cf85afe8bfe0932af367f65 | 6,940 | py | Python | postprocessing/science/compute_diff_seissol_data.py | jrekoske/SeisSol | 63087cf5fabc6e1b09a4d6b1e0ac46aaee2a1dfe | [
"BSD-3-Clause"
] | null | null | null | postprocessing/science/compute_diff_seissol_data.py | jrekoske/SeisSol | 63087cf5fabc6e1b09a4d6b1e0ac46aaee2a1dfe | [
"BSD-3-Clause"
] | null | null | null | postprocessing/science/compute_diff_seissol_data.py | jrekoske/SeisSol | 63087cf5fabc6e1b09a4d6b1e0ac46aaee2a1dfe | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import h5py
import numpy as np
import argparse
import os
import seissolxdmf as sx
import seissolxdmfwriter as sw
# These 2 latter modules are on pypi (e.g. pip install seissolxdmf)
def read_reshape2d(sx, dataname):
"""read seissol dataset
and if there is only one time stamp
create... | 31.689498 | 97 | 0.65072 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,946 | 0.280403 |
013d0a444d8fcc0b669cdc39b7c00090f97916cd | 110 | py | Python | iFarm/iFarmapp/urls.py | vmakar0v/smart-farm | 47bd7be4b40bbca57492ae5b8da09cc0635bfa2a | [
"Apache-2.0"
] | null | null | null | iFarm/iFarmapp/urls.py | vmakar0v/smart-farm | 47bd7be4b40bbca57492ae5b8da09cc0635bfa2a | [
"Apache-2.0"
] | null | null | null | iFarm/iFarmapp/urls.py | vmakar0v/smart-farm | 47bd7be4b40bbca57492ae5b8da09cc0635bfa2a | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.home_P, name='home_P')
]
| 15.714286 | 41 | 0.681818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.090909 |
013dad2ac33defe55487634726ea099424ed06bd | 538 | py | Python | yandex/yandex2016_b_b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | yandex/yandex2016_b_b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | yandex/yandex2016_b_b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | def count_bit_sum(N):
bit = [0] * max_bitlen
if N <= 0:
return bit[:]
for i in range(N.bit_length() - 1):
bit[i] = 1 << (N.bit_length() - 2)
bit[N.bit_length()-1] = N - (1 << (N.bit_length() - 1)) + 1
return [bit[i] + b for i, b in enumerate(count_bit_sum(N - (1 << (N.bit_length() - ... | 38.428571 | 93 | 0.539033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
013ea56ed2c4a516c4e4235a0ba8239ea63b5e56 | 2,639 | py | Python | gnuradio-3.7.13.4/gr-filter/python/filter/design/api_object.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | 1 | 2021-03-09T07:32:37.000Z | 2021-03-09T07:32:37.000Z | gnuradio-3.7.13.4/gr-filter/python/filter/design/api_object.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | gnuradio-3.7.13.4/gr-filter/python/filter/design/api_object.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# G... | 32.9875 | 70 | 0.635847 | 1,857 | 0.703676 | 0 | 0 | 0 | 0 | 0 | 0 | 1,306 | 0.494884 |
013f03299525978dd3d212a41f6f91fa29b63b14 | 1,262 | py | Python | classes/announcement.py | jamflcjamflc/TopRace | 5c02941c8787884302a91f33f6b26bbdc13d79ce | [
"Apache-2.0"
] | null | null | null | classes/announcement.py | jamflcjamflc/TopRace | 5c02941c8787884302a91f33f6b26bbdc13d79ce | [
"Apache-2.0"
] | null | null | null | classes/announcement.py | jamflcjamflc/TopRace | 5c02941c8787884302a91f33f6b26bbdc13d79ce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# announcement
# helper class for toprace
# Alfredo Martin 2021
import pygame
version = 'announcement.v.1.0.0'
class Announcement:
def __init__(self, screen=None, text='', time=5, color=(255, 0, 0)):
"""initiallizes the Announcement instance
screen: pygame canvas instance... | 28.681818 | 80 | 0.594295 | 1,075 | 0.851823 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.424723 |
013f53227578c72e73628747ce0b65e0ad1aa92b | 3,633 | py | Python | policies/regularizers.py | IST-DASLab/ACDC | ac53210b6adc1f2506ff909de08172ed9cad25d5 | [
"Apache-2.0"
] | 6 | 2021-11-26T01:21:03.000Z | 2022-01-10T15:41:50.000Z | policies/regularizers.py | IST-DASLab/ACDC | ac53210b6adc1f2506ff909de08172ed9cad25d5 | [
"Apache-2.0"
] | 1 | 2021-11-28T10:51:08.000Z | 2021-11-30T01:30:29.000Z | policies/regularizers.py | IST-DASLab/ACDC | ac53210b6adc1f2506ff909de08172ed9cad25d5 | [
"Apache-2.0"
] | 1 | 2021-12-21T13:25:43.000Z | 2021-12-21T13:25:43.000Z | """
Implement regularization policies here
"""
import torch
import torch.nn as nn
from policies.policy import PolicyBase
import logging
def build_reg_from_config(model, reg_config):
"""
This function build regularizer given the model (only need for weigths typically)
and regularizer configuration.
""... | 33.330275 | 93 | 0.624002 | 2,187 | 0.601982 | 0 | 0 | 0 | 0 | 0 | 0 | 1,153 | 0.317369 |
013fd9370c82568c8a3976632bf333b9c95292c6 | 938 | py | Python | coupons/models.py | sLeeNguyen/sales-support | 3f0a6977c8c26743373a70b4296516b7a71ccf4a | [
"Apache-2.0"
] | 1 | 2021-03-22T14:07:30.000Z | 2021-03-22T14:07:30.000Z | coupons/models.py | sLeeNguyen/sales-support | 3f0a6977c8c26743373a70b4296516b7a71ccf4a | [
"Apache-2.0"
] | null | null | null | coupons/models.py | sLeeNguyen/sales-support | 3f0a6977c8c26743373a70b4296516b7a71ccf4a | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.utils import timezone
from stores.models import Store
class Coupon(models.Model):
SCOPE_CHOICES = [
('I', 'Toàn bộ hoá đơn'),
('P', 'Sản phẩm'),
]
BENEFICIARY_CHOICES = [
('E', 'Mọi khách hàng'),
('N', 'Khách hàng hệ thống'),
... | 33.5 | 90 | 0.686567 | 861 | 0.896875 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.127083 |
014128990469de76bed3ac346da105ea98a96243 | 5,527 | py | Python | web_api/bearings/resources/inventory.py | zhanghe06/flask_restful | 6ef54f3f7efbbaff6169e963dcf45ab25e11e593 | [
"MIT"
] | 1 | 2020-12-04T03:15:47.000Z | 2020-12-04T03:15:47.000Z | web_api/bearings/resources/inventory.py | zhanghe06/flask_restful | 6ef54f3f7efbbaff6169e963dcf45ab25e11e593 | [
"MIT"
] | 1 | 2021-06-01T22:24:27.000Z | 2021-06-01T22:24:27.000Z | web_api/bearings/resources/inventory.py | zhanghe06/flask_restful | 6ef54f3f7efbbaff6169e963dcf45ab25e11e593 | [
"MIT"
] | 2 | 2020-12-04T03:16:18.000Z | 2021-09-04T14:10:12.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: inventory.py
@time: 2018-06-28 00:22
"""
from __future__ import unicode_literals
from flask import jsonify, make_response
from flask_restful import Resource, marshal, reqparse
from web_api.bearings.outputs.inventory import field... | 30.368132 | 106 | 0.616971 | 4,586 | 0.82735 | 0 | 0 | 0 | 0 | 0 | 0 | 1,863 | 0.3361 |
01417896f15a60c73ebefea3a8b55b1d8117b7c4 | 2,141 | py | Python | bob/db/swan/query_bio.py | bioidiap/bob.db.swan | 676510d47cb08b65be04f51d45746127c36bf2ce | [
"BSD-3-Clause"
] | null | null | null | bob/db/swan/query_bio.py | bioidiap/bob.db.swan | 676510d47cb08b65be04f51d45746127c36bf2ce | [
"BSD-3-Clause"
] | null | null | null | bob/db/swan/query_bio.py | bioidiap/bob.db.swan | 676510d47cb08b65be04f51d45746127c36bf2ce | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# from bob.bio.spear.database import AudioBioFile
import bob.bio.base
import bob.io.base
import bob.io.video
from bob.extension import rc
from .common import SwanVideoFile, SwanAudioFile, SwanVideoDatabase
# class SwanAudioBioFile(SwanAudioFile, AudioBioFile):
# """SwanAudioBioFile are vide... | 38.927273 | 79 | 0.683793 | 1,795 | 0.838393 | 0 | 0 | 0 | 0 | 0 | 0 | 577 | 0.2695 |
0145f0c317a0b7c0a803c27a724e95a60c8be847 | 226 | py | Python | example.py | austitech/Tokenizer | 005bd6772ef3298b222c05e3357bf22961978a57 | [
"MIT"
] | null | null | null | example.py | austitech/Tokenizer | 005bd6772ef3298b222c05e3357bf22961978a57 | [
"MIT"
] | null | null | null | example.py | austitech/Tokenizer | 005bd6772ef3298b222c05e3357bf22961978a57 | [
"MIT"
] | null | null | null | from tokenizer import StringTokenizer
from token import tokentype
text = open('test.ex', 'r').read()
t = StringTokenizer(text=text, tokentype=tokentype)
token_generator = t.create_token_generator()
print(token_generator)
| 18.833333 | 51 | 0.783186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.053097 |
014639d9ec97c6ecdda8d9da8e1c9b7abc9b6d28 | 2,008 | py | Python | scripts/smilx_pv_visualisation.py | aneube/smili-spine | 3cd8f95077d4bc1f5ac6146bc5356c3131f22e4b | [
"BSD-2-Clause"
] | 17 | 2015-03-09T19:22:07.000Z | 2021-05-24T20:25:08.000Z | scripts/smilx_pv_visualisation.py | oddway/smili | 4205b08e5fdcf5ae4fa94747a6dbeac0bb5e0cf0 | [
"BSD-2-Clause"
] | 16 | 2015-08-20T03:30:15.000Z | 2019-10-22T12:21:14.000Z | scripts/smilx_pv_visualisation.py | oddway/smili | 4205b08e5fdcf5ae4fa94747a6dbeac0bb5e0cf0 | [
"BSD-2-Clause"
] | 11 | 2015-06-22T00:11:01.000Z | 2021-12-26T21:29:52.000Z | #!/usr/bin/smilx
'''=========================================================================
The Software is copyright (c) Commonwealth Scientific and Industrial Research Organisation (CSIRO)
ABN 41 687 119 230.
All rights reserved.
Licensed under the CSIRO BSD 3-Clause License
You may not use this file exc... | 38.615385 | 149 | 0.728586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,480 | 0.737052 |
014640d43ebc7a1a3b58c97712655fc4e51f491b | 6,887 | py | Python | src/genie/libs/parser/iosxe/tests/ShowPlatformSoftwareFed/cli/equal/golden_output3_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxe/tests/ShowPlatformSoftwareFed/cli/equal/golden_output3_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxe/tests/ShowPlatformSoftwareFed/cli/equal/golden_output3_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output ={
"lentry_label": {
24: {
"aal": {
"deagg_vrf_id": 0,
"eos0": {"adj_hdl": "0xf9000002", "hw_hdl": "0x7f02737e2ca8"},
"eos1": {"adj_hdl": "0xf9000002", "hw_hdl": "0x7f02737e2a98"},
"id": 1996488716,
"... | 38.909605 | 88 | 0.283287 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,244 | 0.325831 |
0146de801330617849875f5bc5ee04e2b90625fa | 3,610 | py | Python | tests/test_simulator_utility.py | tancheng/cache-sim | adfcbec961543a8424988cbadacb575c551f3cc3 | [
"MIT"
] | 27 | 2016-02-06T20:49:19.000Z | 2021-11-02T03:11:26.000Z | tests/test_simulator_utility.py | tancheng/cache-sim | adfcbec961543a8424988cbadacb575c551f3cc3 | [
"MIT"
] | 5 | 2020-02-24T18:57:11.000Z | 2021-09-01T00:27:18.000Z | tests/test_simulator_utility.py | tancheng/cache-sim | adfcbec961543a8424988cbadacb575c551f3cc3 | [
"MIT"
] | 16 | 2016-02-06T20:49:06.000Z | 2022-01-14T02:49:14.000Z | #!/usr/bin/env python3
import nose.tools as nose
from cachesimulator.bin_addr import BinaryAddress
from cachesimulator.word_addr import WordAddress
def test_get_bin_addr_unpadded():
"""get_bin_addr should return unpadded binary address of word address"""
nose.assert_equal(
BinaryAddress(word_addr=Wo... | 31.12069 | 77 | 0.713573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,332 | 0.368975 |
0146ed0b2f2154ab28c5b238a6e0624fb4e5747e | 10,347 | py | Python | stubs.min/System/Windows/__init___parts/Vector.py | denfromufa/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2017-07-07T11:15:45.000Z | 2017-07-07T11:15:45.000Z | stubs.min/System/Windows/__init___parts/Vector.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/__init___parts/Vector.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class Vector(object,IFormattable):
"""
Represents a displacement in 2-D space.
Vector(x: float,y: float)
"""
@staticmethod
def Add(*__args):
"""
Add(vector: Vector,point: Point) -> Point
Translates the specified point by the specified vector and returns the
resulting point.
... | 30.612426 | 215 | 0.667053 | 10,341 | 0.99942 | 0 | 0 | 5,721 | 0.552914 | 0 | 0 | 8,670 | 0.837924 |
0148eac89948dbf7e99bb94cb77565537c9937b2 | 6,869 | py | Python | binary_eight_queens_enhanced_num.py | MiniMarvin/oito-rainhas | 67be60d798a99ac218b2bbc53eabf47a563dce7b | [
"MIT"
] | null | null | null | binary_eight_queens_enhanced_num.py | MiniMarvin/oito-rainhas | 67be60d798a99ac218b2bbc53eabf47a563dce7b | [
"MIT"
] | null | null | null | binary_eight_queens_enhanced_num.py | MiniMarvin/oito-rainhas | 67be60d798a99ac218b2bbc53eabf47a563dce7b | [
"MIT"
] | null | null | null | import random
import math
from collections import OrderedDict
class BinaryEightQueensEnhancedNum:
def __init__(self, populationSize, crossOverMethod=1, selectMethod=1, mutationMethod=1, entireFit=False):
'''
inicializa a classe.
@params populationSize o tamanho da população.
'''
... | 32.709524 | 125 | 0.526569 | 6,788 | 0.986915 | 0 | 0 | 0 | 0 | 0 | 0 | 818 | 0.11893 |
014a513ce67d34f43fbb3d224139ad39fdd0d756 | 639 | py | Python | problems/07/solution_07.py | r1cc4rdo/daily_coding_problem | 6ac85309fad2f64231ac7ab94aa4158e18bdec40 | [
"Unlicense"
] | 158 | 2018-01-25T06:33:30.000Z | 2022-03-14T23:18:05.000Z | problems/07/solution_07.py | r1cc4rdo/daily_coding_problem | 6ac85309fad2f64231ac7ab94aa4158e18bdec40 | [
"Unlicense"
] | 9 | 2018-07-04T00:31:57.000Z | 2020-05-16T21:02:30.000Z | problems/07/solution_07.py | r1cc4rdo/daily_coding_problem | 6ac85309fad2f64231ac7ab94aa4158e18bdec40 | [
"Unlicense"
] | 50 | 2018-06-22T16:48:44.000Z | 2022-01-11T16:45:48.000Z | def coding_problem_07(s):
"""
Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded.
Examples:
>>> coding_problem_07('111') # possible interpretations: 'aaa', 'ka', 'ak'
3
>>> coding_problem_07('2626') # 'zz', 'zbf', 'bfz', 'bfbf'
4... | 26.625 | 115 | 0.610329 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 308 | 0.482003 |
014ad83f5b068ba0e043359ccb1ae8ec77fba56c | 1,201 | py | Python | lfs/manage/views/criteria.py | michael-hahn/django-lfs | 26c3471a8f8d88269c84f714f507b952dfdb6397 | [
"BSD-3-Clause"
] | 345 | 2015-01-03T19:19:27.000Z | 2022-03-20T11:00:50.000Z | lfs/manage/views/criteria.py | mxins/django-lfs | bf42ed80ce0e1ec96db6ab985adcc614ea79dfc8 | [
"BSD-3-Clause"
] | 73 | 2015-01-06T14:54:02.000Z | 2022-03-11T23:11:34.000Z | lfs/manage/views/criteria.py | mxins/django-lfs | bf42ed80ce0e1ec96db6ab985adcc614ea79dfc8 | [
"BSD-3-Clause"
] | 148 | 2015-01-07T16:30:08.000Z | 2022-03-25T21:20:58.000Z | # django imports
from django.conf import settings
from django.contrib.auth.decorators import permission_required
from django.http import HttpResponse
# lfs imports
from lfs.core.utils import import_symbol
@permission_required("core.manage_shop")
def add_criterion(request):
"""
Adds a new criterion form.
... | 27.295455 | 77 | 0.717735 | 0 | 0 | 0 | 0 | 989 | 0.82348 | 0 | 0 | 336 | 0.279767 |
014b1316bbc807d3a6c4e323a2ddb1f35250a147 | 428 | py | Python | components/studio/apps/migrations/0055_appinstance_access.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 25 | 2020-05-08T22:24:54.000Z | 2022-03-11T18:16:58.000Z | components/studio/apps/migrations/0055_appinstance_access.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 75 | 2020-05-08T22:15:59.000Z | 2021-11-22T10:00:04.000Z | components/studio/apps/migrations/0055_appinstance_access.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 12 | 2020-11-04T13:09:46.000Z | 2022-03-14T16:22:40.000Z | # Generated by Django 3.1.7 on 2021-05-26 12:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('apps', '0054_auto_20210525_1114'),
]
operations = [
migrations.AddField(
model_name='appinstance',
name='access',
... | 22.526316 | 92 | 0.61215 | 335 | 0.78271 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.252336 |
014c661b4ee9f1765fe9a71fd14a56e7f1881ebd | 1,512 | py | Python | modulo-3/aulas/funcao_2.py | Luis-Felipe-N/curso-em-video-python | 09ff58ae31ae0360ebec74de609011d527956065 | [
"MIT"
] | null | null | null | modulo-3/aulas/funcao_2.py | Luis-Felipe-N/curso-em-video-python | 09ff58ae31ae0360ebec74de609011d527956065 | [
"MIT"
] | null | null | null | modulo-3/aulas/funcao_2.py | Luis-Felipe-N/curso-em-video-python | 09ff58ae31ae0360ebec74de609011d527956065 | [
"MIT"
] | null | null | null | # COMO TRABALHAMOS MUITO COM ROTINAS, CRIAR UMA FUNÇÃO E CHAMA-LA NO CÓDIGO FACILITA MUITO NÃO TER QUE ESCREVER A MESMA LINHA VÁRIAS VEZES
# USAMOS O COMANDO DEF PARA DECLARAR UMA FUNCAO, DEPOIS UM NOME PARA A FUNÇÃO EX:
# def nomeDaFuncao():
# # BLOCO COM O CÓDIGO QUE DESEJA QUE SEJÁ EXECULTADO NA CHAMADA DA FUNÇ... | 22.909091 | 138 | 0.671958 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,049 | 0.683388 |
014ca2e3d1790bdd33dbe16cd9e24261132907eb | 5,160 | py | Python | ph5/utilities/tests/test_seg2toph5.py | iris-edu-int/PH5 | 2056191ec3db1dbcbbd18facba56750d3c5cc5b4 | [
"MIT"
] | 21 | 2016-12-07T20:09:31.000Z | 2022-03-07T22:23:57.000Z | ph5/utilities/tests/test_seg2toph5.py | iris-edu-int/PH5 | 2056191ec3db1dbcbbd18facba56750d3c5cc5b4 | [
"MIT"
] | 395 | 2016-11-03T03:43:55.000Z | 2022-03-08T20:54:22.000Z | ph5/utilities/tests/test_seg2toph5.py | iris-edu-int/PH5 | 2056191ec3db1dbcbbd18facba56750d3c5cc5b4 | [
"MIT"
] | 6 | 2016-10-25T22:22:38.000Z | 2021-05-10T18:19:45.000Z | '''
Tests for seg2toph5
'''
import os
import sys
import unittest
import logging
from mock import patch
from testfixtures import OutputCapture, LogCapture
from ph5.utilities import seg2toph5, initialize_ph5
from ph5.core.tests.test_base import LogTestCase, TempDirTestCase,\
initialize_ex
from ph5.core import ph5ap... | 43 | 77 | 0.605426 | 4,786 | 0.927519 | 0 | 0 | 0 | 0 | 0 | 0 | 1,893 | 0.36686 |
014d029371edfc926a3b46e79008ce4486f7ec74 | 29 | py | Python | pydreamer/models/__init__.py | rogerscristo/pydreamer | e44fdf8b35fe48662ed619100fdd5d9d6858f6db | [
"MIT"
] | 75 | 2021-10-12T13:17:48.000Z | 2022-03-04T14:43:30.000Z | pydreamer/models/__init__.py | LvZut/pydreamer | e3a522e13319d3667b526abb5f5747ab68e3c04e | [
"MIT"
] | 2 | 2022-01-17T06:49:50.000Z | 2022-02-17T19:45:24.000Z | pydreamer/models/__init__.py | LvZut/pydreamer | e3a522e13319d3667b526abb5f5747ab68e3c04e | [
"MIT"
] | 10 | 2021-11-27T18:20:26.000Z | 2022-03-14T09:06:52.000Z | from .dreamer import Dreamer
| 14.5 | 28 | 0.827586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
014d7f5347c2db899cb4f07a82d8e90ce6a5c1f4 | 1,251 | py | Python | zcash/test_node.py | gwynethallwright/cs291d_project | 7d9bbb32acec855e777b93b88153869393d458d3 | [
"Apache-2.0"
] | null | null | null | zcash/test_node.py | gwynethallwright/cs291d_project | 7d9bbb32acec855e777b93b88153869393d458d3 | [
"Apache-2.0"
] | null | null | null | zcash/test_node.py | gwynethallwright/cs291d_project | 7d9bbb32acec855e777b93b88153869393d458d3 | [
"Apache-2.0"
] | null | null | null | import time
from zcash.node import *
node1 = Node(8002, "node 1")
node1.start()
# wait for string
time.sleep(2)
node1.print_blockchain()
time.sleep(2)
node2 = Node(8003, "node 2")
node2.start()
# wait for string
time.sleep(2)
node2.print_blockchain()
node1.get_balance()
node2.get_balance()
# node1 mint and... | 18.397059 | 118 | 0.751399 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 331 | 0.264588 |
014e3e728d1d9378b4810966f0de08c19709bfa8 | 822 | py | Python | archived_lectures/Fall_2019/common_python/common_python/tests/tellurium/test_util.py | ModelEngineering/topics-course | cd0d73e4056663d170465669ecd699e8e74e35a0 | [
"MIT"
] | 2 | 2018-10-24T21:31:30.000Z | 2019-10-23T20:29:22.000Z | archived_lectures/Fall_2019/common_python/common_python/tests/tellurium/test_util.py | ModelEngineering/topics-course | cd0d73e4056663d170465669ecd699e8e74e35a0 | [
"MIT"
] | 1 | 2019-05-31T21:59:30.000Z | 2019-05-31T21:59:30.000Z | archived_lectures/Fall_2019/common_python/common_python/tests/tellurium/test_util.py | ModelEngineering/topics-course | cd0d73e4056663d170465669ecd699e8e74e35a0 | [
"MIT"
] | 9 | 2018-10-31T20:48:42.000Z | 2019-11-20T21:47:43.000Z | from common_python.tellurium import util
import pandas as pd
import numpy as np
import unittest
class TestFunctions(unittest.TestCase):
def testDfToSer(self):
data = range(5)
df = pd.DataFrame({'a': data, 'b': [2*d for d in data]})
ser = util.dfToSer(df)
assert(len(ser) == len(df.columns)*len(df))... | 25.6875 | 60 | 0.656934 | 675 | 0.821168 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.026764 |
014f313e34df031bf86f179460a6096cdeb0e1a1 | 535 | py | Python | hr_timesheet_invoice_release/account_invoice.py | sunflowerit/odoo-modules | 77e11c4868c3f94c031542b48e5d83797cf4a28d | [
"MIT"
] | null | null | null | hr_timesheet_invoice_release/account_invoice.py | sunflowerit/odoo-modules | 77e11c4868c3f94c031542b48e5d83797cf4a28d | [
"MIT"
] | 4 | 2016-10-19T17:01:04.000Z | 2018-01-12T18:34:58.000Z | hr_timesheet_invoice_release/account_invoice.py | sunflowerit/odoo-modules | 77e11c4868c3f94c031542b48e5d83797cf4a28d | [
"MIT"
] | 1 | 2018-03-08T16:23:52.000Z | 2018-03-08T16:23:52.000Z | # -*- coding: utf-8 -*-
# © 2017 Sunflower IT (http://sunflowerweb.nl)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import fields, models, api, _
from openerp.exceptions import Warning
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
@api.multi
def release... | 29.722222 | 72 | 0.665421 | 314 | 0.585821 | 0 | 0 | 240 | 0.447761 | 0 | 0 | 200 | 0.373134 |
01507b0361d9bced76109c780b90eccee027d206 | 4,205 | py | Python | blocklenium/selenium_worker.py | jpunkt/blocklenium | dbe81b900d9c9781443d2cac2920815cb5f0a779 | [
"MIT"
] | null | null | null | blocklenium/selenium_worker.py | jpunkt/blocklenium | dbe81b900d9c9781443d2cac2920815cb5f0a779 | [
"MIT"
] | 1 | 2020-07-17T10:11:42.000Z | 2020-07-17T14:44:59.000Z | blocklenium/selenium_worker.py | jpunkt/blocklenium | dbe81b900d9c9781443d2cac2920815cb5f0a779 | [
"MIT"
] | null | null | null | import configparser
import logging
import threading
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
logger = logging.getLogger(__name__)
class SeleniumWorker(threading.... | 36.885965 | 75 | 0.572889 | 3,915 | 0.931034 | 0 | 0 | 0 | 0 | 0 | 0 | 1,179 | 0.28038 |
0150a51530726ef3c2430cedd19b6ce0d322142d | 1,595 | py | Python | setup.py | LaudateCorpus1/evohome-async | 333223df05b7881d6d9b831eb41d209846dd9a98 | [
"Apache-2.0"
] | 2 | 2020-11-18T14:33:49.000Z | 2021-12-27T14:52:54.000Z | setup.py | LaudateCorpus1/evohome-async | 333223df05b7881d6d9b831eb41d209846dd9a98 | [
"Apache-2.0"
] | 4 | 2021-03-10T16:54:31.000Z | 2022-01-21T10:16:33.000Z | setup.py | LaudateCorpus1/evohome-async | 333223df05b7881d6d9b831eb41d209846dd9a98 | [
"Apache-2.0"
] | 9 | 2020-12-06T08:07:45.000Z | 2022-02-08T07:03:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
"""The setup.py file."""
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.install import install
VERSION = "0.3.15"
URL = "https://github.com/zxdavb/evohome-async"
with open("README.md", "r") as fh:
LONG_DESCRIPTION = fh.re... | 28.482143 | 86 | 0.648276 | 308 | 0.193103 | 0 | 0 | 0 | 0 | 0 | 0 | 756 | 0.473981 |
0153baca680ffab8056f0a843270c4080b86ff69 | 74,403 | py | Python | tests/test_model_factory.py | TForce1/pcg_gazebo | 9ff88016b7b6903236484958ca7c6ed9f8ffb346 | [
"ECL-2.0",
"Apache-2.0"
] | 40 | 2020-02-04T18:16:49.000Z | 2022-02-22T11:36:34.000Z | tests/test_model_factory.py | awesomebytes/pcg_gazebo | 4f335dd460ef7c771f1df78b46a92fad4a62cedc | [
"ECL-2.0",
"Apache-2.0"
] | 75 | 2020-01-23T13:40:50.000Z | 2022-02-09T07:26:01.000Z | tests/test_model_factory.py | GimpelZhang/gazebo_world_generator | eb7215499d0ddc972d804c988fadab1969579b1b | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2020-09-10T06:35:41.000Z | 2022-02-20T19:08:17.000Z | #!/usr/bin/env python
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# 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... | 41.705717 | 79 | 0.51342 | 72,270 | 0.971332 | 0 | 0 | 0 | 0 | 0 | 0 | 7,244 | 0.097362 |
015472fb9c391cf927e9fc40a91f9c791db806b8 | 3,646 | py | Python | scripts/server2ros.py | wjvanderlip/radbot_nuke | 7ea4bf049f4249ddbe033bd6453d80a4d6a604e2 | [
"MIT"
] | null | null | null | scripts/server2ros.py | wjvanderlip/radbot_nuke | 7ea4bf049f4249ddbe033bd6453d80a4d6a604e2 | [
"MIT"
] | null | null | null | scripts/server2ros.py | wjvanderlip/radbot_nuke | 7ea4bf049f4249ddbe033bd6453d80a4d6a604e2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import numpy as np
import pickle
import time
import socket
from rospy.numpy_msg import numpy_msg
from radbot_nuke.msg import detector_msg
rospy.init_node('detServer', anonymous=False)
pub = rospy.Publisher('/detector_data', detector_msg, queue_size=10)
def send_ros_msg(ts, adc, de... | 33.145455 | 159 | 0.626166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,401 | 0.384257 |
01584c384f8f8eea463542d1db5fde7c51f316cc | 3,166 | py | Python | yubin/__init__.py | mritu301/NLP-Labeling | 403b06c25984646be9ed8f37c5777d32acc3dec1 | [
"MIT"
] | 3 | 2019-10-28T00:07:25.000Z | 2020-01-17T05:25:08.000Z | yubin/__init__.py | alvations/yubin | 403b06c25984646be9ed8f37c5777d32acc3dec1 | [
"MIT"
] | null | null | null | yubin/__init__.py | alvations/yubin | 403b06c25984646be9ed8f37c5777d32acc3dec1 | [
"MIT"
] | null | null | null | import re
from itertools import chain
from collections import defaultdict, namedtuple
import pandas as pd
from tqdm import tqdm
Address = namedtuple('Address', ['to', 'kai', 'ku', 'mune', 'chome', 'ban',
'go', 'postal', 'endgo', 'tokens'])
class Postman:
"""
Converts Japanese... | 40.075949 | 93 | 0.549905 | 3,053 | 0.916817 | 0 | 0 | 0 | 0 | 0 | 0 | 1,070 | 0.321321 |
015973c0cde41c6d39371ea08957e73b3b7deff2 | 476 | py | Python | setup.py | vmraid/vitalpbx | 3debc302763e53393ccb9610cb117a7d4872d59a | [
"MIT"
] | null | null | null | setup.py | vmraid/vitalpbx | 3debc302763e53393ccb9610cb117a7d4872d59a | [
"MIT"
] | null | null | null | setup.py | vmraid/vitalpbx | 3debc302763e53393ccb9610cb117a7d4872d59a | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# get version from __version__ variable in vitalpbx/__init__.py
from vitalpbx import __version__ as version
setup(
name='vitalpbx',
version=version,
description='Something',
author='So... | 23.8 | 63 | 0.781513 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.289916 |
015a6e13245e57ce78b8a86522e4aae0bd1d03bc | 381 | py | Python | 1030.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 6 | 2021-04-13T00:33:43.000Z | 2022-02-10T10:23:59.000Z | 1030.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | null | null | null | 1030.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 3 | 2021-03-23T18:42:24.000Z | 2022-02-10T10:24:07.000Z | for g in range(int(input())):
n, k = [int(x) for x in input().split()]
v = [1 for x in range(1, n+1)]
m = 0
i = p = 1
while (m < n-1):
if v[i] == 1: p += 1
if p == k:
v[i] = 0
m += 1
p = 0
i += 1
if i == n: i = 0
i = 0
while... | 22.411765 | 44 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.034121 |
015a892c046052f40a511917cfd969000101e5c9 | 8,215 | py | Python | onionstudio.py | jarret/onionstudio | 5ebf0a75cf1e7960822c96a987668be5ed82aa41 | [
"MIT"
] | 11 | 2020-01-09T19:48:20.000Z | 2020-11-21T19:59:36.000Z | onionstudio.py | jarret/onionstudio | 5ebf0a75cf1e7960822c96a987668be5ed82aa41 | [
"MIT"
] | null | null | null | onionstudio.py | jarret/onionstudio | 5ebf0a75cf1e7960822c96a987668be5ed82aa41 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2020 Jarret Dyrbye
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php
import time
import sys
import json
import argparse
from twisted.internet import reactor
from twisted.internet.task import Loo... | 37.340909 | 79 | 0.597687 | 5,674 | 0.690688 | 0 | 0 | 0 | 0 | 0 | 0 | 2,073 | 0.252343 |
015a901776e9ca3956396eb5890b4a755eb6a932 | 4,078 | py | Python | mavsim_holodeck/rosflight_holodeck.py | sethmnielsen/mavsim_template_files | 453ec4f7d38fc2d1162198b554834b5bdb7de96f | [
"MIT"
] | null | null | null | mavsim_holodeck/rosflight_holodeck.py | sethmnielsen/mavsim_template_files | 453ec4f7d38fc2d1162198b554834b5bdb7de96f | [
"MIT"
] | null | null | null | mavsim_holodeck/rosflight_holodeck.py | sethmnielsen/mavsim_template_files | 453ec4f7d38fc2d1162198b554834b5bdb7de96f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from __future__ import print_function
from rosflight_holodeck_interface import ROSflightHolodeck
import numpy as np
import matplotlib.pyplot as plt
from tqdm import tqdm
import time
import holodeck
from holodeck import agents
from holodeck.environments import *
from holodeck import sensors
from I... | 34.268908 | 92 | 0.540216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,051 | 0.257724 |
015b648e126b7003dc4ab0b7712ea0d4e285061d | 6,762 | py | Python | projects/Graphing_and_DataEntry/graphing_calculator.py | DavidsonNext/WWW | cf486e641e19d0b8c3823cceafc5389f0b3d6bb7 | [
"Apache-2.0"
] | null | null | null | projects/Graphing_and_DataEntry/graphing_calculator.py | DavidsonNext/WWW | cf486e641e19d0b8c3823cceafc5389f0b3d6bb7 | [
"Apache-2.0"
] | null | null | null | projects/Graphing_and_DataEntry/graphing_calculator.py | DavidsonNext/WWW | cf486e641e19d0b8c3823cceafc5389f0b3d6bb7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
from IPython.display import HTML
# <markdowncell>
# #Graphing Calculator - inspired by AP Calculus
# Graphing calculators are permitted for use during "calculator active" problems on AP exams. Here we attempt to provide open access to those functionali... | 40.981818 | 184 | 0.484028 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,697 | 0.250961 |
015c37dadd907a823b8a57e0e66db4c591cdd0d4 | 3,294 | py | Python | pyinsar/processing/discovery/coherence.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 8 | 2019-03-15T19:51:27.000Z | 2022-02-16T07:27:36.000Z | pyinsar/processing/discovery/coherence.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 1 | 2022-02-08T03:48:56.000Z | 2022-02-09T01:33:27.000Z | pyinsar/processing/discovery/coherence.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 2 | 2021-01-12T05:32:21.000Z | 2021-01-13T08:35:26.000Z | # The MIT License (MIT)
# Copyright (c) 2017 Massachusetts Institute of Technology
#
# Authors: Cody Rude
# This software is part of the NSF DIBBS Project "An Infrastructure for
# Computer Aided Discovery in Geoscience" (PI: V. Pankratius) and
# NASA AIST Project "Computer-Aided Discovery of Earth Surface
# Deformation... | 38.302326 | 104 | 0.697936 | 1,564 | 0.474803 | 0 | 0 | 0 | 0 | 0 | 0 | 2,046 | 0.621129 |
015dfc2575ba43d461c6f8e236abfb9df3bf731f | 997 | py | Python | conf.py | Kurento/doc-fiware | 053537edec34fff65e7044f0310ac8c539e011a7 | [
"Apache-2.0"
] | null | null | null | conf.py | Kurento/doc-fiware | 053537edec34fff65e7044f0310ac8c539e011a7 | [
"Apache-2.0"
] | 1 | 2018-11-22T12:48:37.000Z | 2018-11-22T12:48:37.000Z | conf.py | Kurento/doc-fiware | 053537edec34fff65e7044f0310ac8c539e011a7 | [
"Apache-2.0"
] | 3 | 2018-05-13T09:46:50.000Z | 2018-12-31T13:06:48.000Z | # -*- coding: utf-8 -*-
#
# on_rtd is whether we are on readthedocs.org
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
sys.path.append(os.path.abspath('extensions'))
extensions = [
'sphinx.ext.graphviz',
'sphinx.ext.todo',
'wikipedia',
'examplecode'
]
on_rtd = os.environ.get('READTHEDOC... | 24.925 | 82 | 0.706118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 672 | 0.674022 |
015e1ccb959f266ccad863b921198255b5930975 | 2,372 | py | Python | Day21/dice.py | squidbot/aoc2021 | aae5cf2017562150ec01d6cce5200ebc2b02f19d | [
"MIT"
] | null | null | null | Day21/dice.py | squidbot/aoc2021 | aae5cf2017562150ec01d6cce5200ebc2b02f19d | [
"MIT"
] | null | null | null | Day21/dice.py | squidbot/aoc2021 | aae5cf2017562150ec01d6cce5200ebc2b02f19d | [
"MIT"
] | null | null | null | test_input = [4, 8]
puzzle_input = [4, 9]
def part1():
position = puzzle_input
score = [0,0]
die_roll = 0
num_rolls = 0
cur_player = 0
while True:
die_total = 0
for _ in range(3):
num_rolls += 1
die_roll += 1
if die_roll > 100:
... | 32.493151 | 124 | 0.544266 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.029933 |
015f0c33210496779ba5007e68d3fe09693fe4a9 | 1,666 | py | Python | visualizeSIM.py | Jhko725/ProteinStructureReconstruction.jl | 18ec2f5a63e3c07d4498da363a8befc86e7ad68c | [
"MIT"
] | null | null | null | visualizeSIM.py | Jhko725/ProteinStructureReconstruction.jl | 18ec2f5a63e3c07d4498da363a8befc86e7ad68c | [
"MIT"
] | null | null | null | visualizeSIM.py | Jhko725/ProteinStructureReconstruction.jl | 18ec2f5a63e3c07d4498da363a8befc86e7ad68c | [
"MIT"
] | null | null | null | from typing import Optional
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.axis import Axis
from matplotlib.patches import Rectangle
from superresolution import SIM_3D_Data
def make_axis_if_none(ax: Optional[Axis]) -> Axis:
if ax is None:
_, ax = plt.subplots(1, 1, figsize = (10, 10))... | 36.217391 | 124 | 0.696279 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.130252 |
01628e3852b55e9865865ff86cdf3e6ad3323fe8 | 1,097 | py | Python | misc/disablepasscomplexity.py | brianfinley/confluent | 6458eac93b1e3c6d45e26a7ddb434d692b5cdff2 | [
"Apache-2.0"
] | 27 | 2015-02-11T13:56:46.000Z | 2021-12-28T14:17:20.000Z | misc/disablepasscomplexity.py | brianfinley/confluent | 6458eac93b1e3c6d45e26a7ddb434d692b5cdff2 | [
"Apache-2.0"
] | 32 | 2015-09-23T13:19:04.000Z | 2022-03-15T13:50:45.000Z | misc/disablepasscomplexity.py | brianfinley/confluent | 6458eac93b1e3c6d45e26a7ddb434d692b5cdff2 | [
"Apache-2.0"
] | 24 | 2015-07-14T20:41:55.000Z | 2021-07-15T04:18:51.000Z | #!/usr/bin/python2
import pyghmi.util.webclient as webclient
import json
import os
import sys
missingargs = False
if 'XCCUSER' not in os.environ:
print('Must set XCCUSER environment variable')
missingargs = True
if 'XCCPASS' not in os.environ:
print('Must set XCCPASS environment variable')
missingargs ... | 33.242424 | 90 | 0.688241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.350957 |
0162a9072742aec24078e0ec6e07600eec4b5259 | 193 | py | Python | get_topics.py | FoamyGuy/CircuitPython_Repo_Topics | 9a606e9549bcd663d6290c0648466022c1b964db | [
"MIT"
] | null | null | null | get_topics.py | FoamyGuy/CircuitPython_Repo_Topics | 9a606e9549bcd663d6290c0648466022c1b964db | [
"MIT"
] | null | null | null | get_topics.py | FoamyGuy/CircuitPython_Repo_Topics | 9a606e9549bcd663d6290c0648466022c1b964db | [
"MIT"
] | null | null | null | from github import Github
from my_token import token
g = Github(token)
repo = g.get_repo("adafruit/Adafruit_CircuitPython_Display_Text")
repo_topics = repo.get_topics()
print(repo_topics)
| 16.083333 | 65 | 0.797927 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.238342 |
0163e63b0f0a4b6a54cef6dce6ac42cdbc68fb82 | 1,200 | py | Python | tests/test_write_simple.py | ZELLMECHANIK-DRESDEN/fcswrite | 3b696a0fd4a34f7d3999d4e28bd7981fe38494d2 | [
"BSD-3-Clause"
] | 8 | 2018-03-15T00:04:47.000Z | 2021-11-15T09:32:18.000Z | tests/test_write_simple.py | ZELLMECHANIK-DRESDEN/fcswrite | 3b696a0fd4a34f7d3999d4e28bd7981fe38494d2 | [
"BSD-3-Clause"
] | 6 | 2017-05-03T10:19:55.000Z | 2021-11-17T01:57:56.000Z | tests/test_write_simple.py | ZELLMECHANIK-DRESDEN/fcswrite | 3b696a0fd4a34f7d3999d4e28bd7981fe38494d2 | [
"BSD-3-Clause"
] | 2 | 2018-06-28T19:18:01.000Z | 2018-11-05T15:20:04.000Z | import hashlib
import os
import tempfile
import numpy as np
import fcswrite
def test_write_fcs():
"""test that fcm can read the data files"""
fname = tempfile.mktemp(suffix=".fcs", prefix="write_test")
data = 1.0*np.arange(400).reshape((100, 4))
chn_names = ['cha', 'chb', 'ch3', 'ch4']
# monkey-... | 27.906977 | 69 | 0.615833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.229167 |
0165ca0a608b2f11c5571565ecd2b89540a7f4ec | 1,810 | py | Python | adam_visual_perception/preprocessor.py | isi-vista/adam-visual-perception | 8ad6ed883b184b5407a1bf793617b226c78b3a13 | [
"MIT"
] | 1 | 2020-07-21T10:52:26.000Z | 2020-07-21T10:52:26.000Z | adam_visual_perception/preprocessor.py | isi-vista/adam-visual-perception | 8ad6ed883b184b5407a1bf793617b226c78b3a13 | [
"MIT"
] | null | null | null | adam_visual_perception/preprocessor.py | isi-vista/adam-visual-perception | 8ad6ed883b184b5407a1bf793617b226c78b3a13 | [
"MIT"
] | 2 | 2020-07-21T15:30:42.000Z | 2021-01-20T21:54:09.000Z | from moviepy.editor import VideoFileClip
from datetime import datetime
import numpy as np
import time
import os
def manage_time(timestamp):
"""
Given the string representation of a the time using the
"minutes:seconds[:miliseconds]" representation, returns the number
of seconds using double precision
... | 29.672131 | 83 | 0.654696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 593 | 0.327624 |
0165f80525bcd690617df14c805c36b82363c9f9 | 119 | py | Python | experiments/localization.py | seba-1511/cervix.kaggle | 5bf956a85481a961fb9af237aba2d2254cf6921a | [
"Apache-2.0"
] | null | null | null | experiments/localization.py | seba-1511/cervix.kaggle | 5bf956a85481a961fb9af237aba2d2254cf6921a | [
"Apache-2.0"
] | null | null | null | experiments/localization.py | seba-1511/cervix.kaggle | 5bf956a85481a961fb9af237aba2d2254cf6921a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
def get_localization(args):
# TODO: Implement the localization fitting the centers
pass
| 19.833333 | 58 | 0.731092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.630252 |
0166496ddadc3242ff31aa5f6df7726900b884d0 | 505 | py | Python | test/demo-random.py | ruth-ann/snap-python | fe98de7b5697b3d60eb3497893e24801ae1916f9 | [
"BSD-3-Clause"
] | 242 | 2015-01-01T08:40:28.000Z | 2022-03-18T05:22:09.000Z | test/demo-random.py | ruth-ann/snap-python | fe98de7b5697b3d60eb3497893e24801ae1916f9 | [
"BSD-3-Clause"
] | 99 | 2015-01-24T07:55:27.000Z | 2021-10-30T18:20:13.000Z | test/demo-random.py | ruth-ann/snap-python | fe98de7b5697b3d60eb3497893e24801ae1916f9 | [
"BSD-3-Clause"
] | 105 | 2015-03-03T06:45:17.000Z | 2022-02-24T15:52:40.000Z | import snap
G = snap.GenFull(snap.PNEANet, 100)
# get a new random generator, provide the seed value
Rnd = snap.TRnd(42)
# randomize the generator, every execution will produce a different sequence.
# Comment out the line to get the same sequence on every execution.
Rnd.Randomize()
for i in range(0,10):
# provi... | 25.25 | 77 | 0.724752 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 333 | 0.659406 |
01685654bd4a20e989dd7468c19a080303cdaf20 | 1,846 | py | Python | learn-python/basics/basicCommands.py | pradeep-charism/python-projects | 5933bbbc309e6e271701ac2643a657e0928e7090 | [
"MIT"
] | null | null | null | learn-python/basics/basicCommands.py | pradeep-charism/python-projects | 5933bbbc309e6e271701ac2643a657e0928e7090 | [
"MIT"
] | null | null | null | learn-python/basics/basicCommands.py | pradeep-charism/python-projects | 5933bbbc309e6e271701ac2643a657e0928e7090 | [
"MIT"
] | null | null | null | print("Thank you Jesus")
# Read a value from standard input a value
# input("Thank you")
# Evaluate expression
x = 1
print(x)
x += 3
print(x)
# loops
if x > 1:
print("great than 1")
else:
print("less than 1")
n = 3
while n > 1:
print(n)
n -= 1
# Arithmetic operator
print({100 % 3}, {100 / 3})
z =... | 15.644068 | 97 | 0.583965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 892 | 0.483207 |