hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7951ad713e836dd5189c5aecb9f4d2e602977807 | 1,457 | py | Python | MRNet_code/utils/dice_loss.py | jiwei0921/MRNet | 0778f52abb19fd4ae29a5ede21c06afa37c11ba4 | [
"MIT"
] | 61 | 2021-06-13T15:40:06.000Z | 2022-03-30T03:01:58.000Z | PaddleCare/Deep_learning/TRansformer/transformer/MRNet-main/MRNet_code/utils/dice_loss.py | momozi1996/Medical_AI_analysis | e1736a9e0d4c1b0996badbbeb870703fef119ab2 | [
"OML"
] | null | null | null | PaddleCare/Deep_learning/TRansformer/transformer/MRNet-main/MRNet_code/utils/dice_loss.py | momozi1996/Medical_AI_analysis | e1736a9e0d4c1b0996badbbeb870703fef119ab2 | [
"OML"
] | 11 | 2021-06-19T06:46:31.000Z | 2022-02-18T07:56:47.000Z | import torch
from torch.autograd import Function
import numpy as np
class DiceCoeff(Function):
"""Dice coeff for individual examples"""
def forward(self, input, target):
self.save_for_backward(input, target)
eps = 0.0001
self.inter = torch.dot(input.view(-1), target.view(-1))
... | 27.490566 | 79 | 0.601235 |
7951adc70a033df0a8c1781cd1fe250fbdea553f | 499 | py | Python | adslproxy/config.py | ruoshuifuping/AdslProxyPool | 271aec68432509911a19b0c11777309a81f21fc9 | [
"MIT"
] | 2 | 2017-07-17T11:00:55.000Z | 2018-03-15T09:56:53.000Z | adslproxy/config.py | ruoshuifuping/AdslProxyPool | 271aec68432509911a19b0c11777309a81f21fc9 | [
"MIT"
] | null | null | null | adslproxy/config.py | ruoshuifuping/AdslProxyPool | 271aec68432509911a19b0c11777309a81f21fc9 | [
"MIT"
] | 1 | 2018-11-22T10:03:14.000Z | 2018-11-22T10:03:14.000Z | # coding:utf-8
# 拨号间隔
ADSL_CYCLE = 251
# 拨号出错重试间隔
ADSL_ERROR_CYCLE = 10
# ADSL命令
ADSL_BASH = 'adsl-stop;adsl-start'
# 代理运行端口
PROXY_PORT = 8888
# 客户端唯一标识
CLIENT_NAME = 'adsl1'
# 拨号网卡
ADSL_IFNAME = 'ppp0'
# Redis数据库IP
REDIS_HOST = '39.105.26.123'
# Redis数据库密码, 如无则填None
REDIS_PASSWORD = 'QKhQLSCKJGEFXgQXgfDULJjGGj_... | 12.475 | 64 | 0.727455 |
7951aedafb09c3b8aa03d378cec5ae9e2d4509e5 | 474 | py | Python | datastructure/practice/c7/c_7_43.py | stoneyangxu/python-kata | 979af91c74718a525dcd2a83fe53ec6342af9741 | [
"MIT"
] | null | null | null | datastructure/practice/c7/c_7_43.py | stoneyangxu/python-kata | 979af91c74718a525dcd2a83fe53ec6342af9741 | [
"MIT"
] | null | null | null | datastructure/practice/c7/c_7_43.py | stoneyangxu/python-kata | 979af91c74718a525dcd2a83fe53ec6342af9741 | [
"MIT"
] | null | null | null | import unittest
from datastructure.links.PositionList import PositionList
class MyTestCase(unittest.TestCase):
def test_something(self):
L = PositionList()
L.add_last(1)
L.add_last(2)
L.add_last(3)
L.add_last(4)
L.add_last(5)
L.add_last(6)
L.add_last... | 18.96 | 57 | 0.57173 |
7951af432dc28e4b1fa23d920ddeba8a01ae99ed | 622 | py | Python | questionnaire/migrations/0007_auto_20210505_2146.py | smlaming/Roomate-Finder | 864d6633f4303b53596d8fe62572bf7808c6c443 | [
"MIT"
] | null | null | null | questionnaire/migrations/0007_auto_20210505_2146.py | smlaming/Roomate-Finder | 864d6633f4303b53596d8fe62572bf7808c6c443 | [
"MIT"
] | null | null | null | questionnaire/migrations/0007_auto_20210505_2146.py | smlaming/Roomate-Finder | 864d6633f4303b53596d8fe62572bf7808c6c443 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-05-06 01:46
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('questionnaire', '0006_auto_20210420_1201'),
]
operations = [
migrations.AlterField(
model_name='qu... | 31.1 | 244 | 0.689711 |
7951afeef007ccb63ff8cb4a2a37cbe23bed5f19 | 2,034 | py | Python | .history/run_update_20220325120859.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | .history/run_update_20220325120859.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | .history/run_update_20220325120859.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | import subprocess
from sys import stderr, stdout
from pathlib import Path
from os import rename, getcwd, path
import yaml
# Default values
ONSTART_DOWNLOAD = False
ONSTART_CONVERT = False
CURRENT_DIR = Path(getcwd())
CONFIG_FILENAME = 'config.yml'
CONFIG_ABSPATH = CURRENT_DIR.joinpath(CONFIG_FILENAME)
ZIP_NAME = 'G... | 29.478261 | 94 | 0.635693 |
7951b191b91bd50f602658019e1148dff220c067 | 1,904 | py | Python | tests/test_nml_generation.py | fossabot/wknml | 942a571f07618e0fb79498f141128b9ae16aaf4a | [
"MIT"
] | null | null | null | tests/test_nml_generation.py | fossabot/wknml | 942a571f07618e0fb79498f141128b9ae16aaf4a | [
"MIT"
] | null | null | null | tests/test_nml_generation.py | fossabot/wknml | 942a571f07618e0fb79498f141128b9ae16aaf4a | [
"MIT"
] | null | null | null | from wknml import parse_nml, write_nml
from wknml.nml_generation import generate_graph, generate_nml
import os
import filecmp
def test_generate_nml():
with open("testdata/nml_with_invalid_ids.nml", "r") as file:
test_nml = parse_nml(file)
(graph, parameter_dict) = generate_graph(test_nml)
test_res... | 37.333333 | 127 | 0.722689 |
7951b1a24e7930a10cb74471c585cd9fbb5005ce | 7,504 | py | Python | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw39c.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw39c.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw39c.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | # individual nan corrected
# Final nan matches highest probable label (optional)
import pandas as pd
import numpy as np
from tqdm import tqdm
import matplotlib.pyplot as plt
SAMPLE = '../input/sample_submission.csv'
label_names = {
0: "Nucleoplasm",
1: "Nuclear membrane",
2: "Nucleoli",
... | 40.782609 | 135 | 0.472948 |
7951b1f1ca811a0066b18d30dd81c51f8ab29a03 | 1,491 | py | Python | discovery-provider/src/api/v1/models/activities.py | ppak10/audius-protocol | 4dd9df787cbd39f86c5623ce7899b3855b7b314e | [
"Apache-2.0"
] | null | null | null | discovery-provider/src/api/v1/models/activities.py | ppak10/audius-protocol | 4dd9df787cbd39f86c5623ce7899b3855b7b314e | [
"Apache-2.0"
] | null | null | null | discovery-provider/src/api/v1/models/activities.py | ppak10/audius-protocol | 4dd9df787cbd39f86c5623ce7899b3855b7b314e | [
"Apache-2.0"
] | null | null | null | from flask_restx import fields
from flask_restx.fields import MarshallingError
from flask_restx.marshalling import marshal
from .common import ns
from .tracks import track, track_full
from .playlists import playlist_model, full_playlist_model
class ItemType(fields.Raw):
def format(self, value):
if value ==... | 31.0625 | 72 | 0.649229 |
7951b2972569a508049cd3e24ab316cb8be312f6 | 5,531 | py | Python | samples/support_bundle_e2800.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 5 | 2016-08-23T17:52:22.000Z | 2019-05-16T08:45:30.000Z | samples/support_bundle_e2800.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-11-10T05:30:21.000Z | 2019-04-05T15:03:37.000Z | samples/support_bundle_e2800.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 7 | 2016-08-25T16:11:44.000Z | 2021-02-22T05:31:25.000Z | #!/bin/env python
"""
The Clear BSD License
Copyright (c) – 2016, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
* Redistributions of ... | 46.478992 | 843 | 0.775447 |
7951b2ba17ea407e089ab8a11dce9e9f3ac5b249 | 2,187 | py | Python | upsplus_iot.py | mikvdw/upsplus | ed7e8eb1607e8dce6e3b3d1a19e315ec8cfe37a3 | [
"MIT"
] | null | null | null | upsplus_iot.py | mikvdw/upsplus | ed7e8eb1607e8dce6e3b3d1a19e315ec8cfe37a3 | [
"MIT"
] | null | null | null | upsplus_iot.py | mikvdw/upsplus | ed7e8eb1607e8dce6e3b3d1a19e315ec8cfe37a3 | [
"MIT"
] | null | null | null | # ''' Update the status of batteries to IoT platform '''
import time
import smbus
import requests
from ina219 import INA219,DeviceRangeError
import random
DEVICE_BUS = 1
DEVICE_ADDR = 0x17
PROTECT_VOLT = 3700
SAMPLE_TIME = 2
FEED_URL = "https://api.thekoziolfoundation.com/feed"
time.sleep(random.randint(0, 59))
DATA ... | 35.274194 | 116 | 0.689072 |
7951b3154ff3f8a2505bb163ecf39f166b71ed5e | 464 | py | Python | packages/selenium/galaxy/project_galaxy_selenium.py | ResearchObject/galaxy | 39c7c3dfd417eb01d276e86046825bfea2208291 | [
"CC-BY-3.0"
] | 4 | 2015-05-12T20:36:41.000Z | 2017-06-26T15:34:02.000Z | packages/selenium/galaxy/project_galaxy_selenium.py | ResearchObject/galaxy | 39c7c3dfd417eb01d276e86046825bfea2208291 | [
"CC-BY-3.0"
] | 52 | 2015-03-16T14:02:14.000Z | 2021-12-24T09:50:23.000Z | packages/selenium/galaxy/project_galaxy_selenium.py | ResearchObject/galaxy | 39c7c3dfd417eb01d276e86046825bfea2208291 | [
"CC-BY-3.0"
] | 1 | 2016-03-21T12:54:06.000Z | 2016-03-21T12:54:06.000Z | # -*- coding: utf-8 -*-
__version__ = '20.9.1.dev0'
PROJECT_NAME = "galaxy-selenium"
PROJECT_OWNER = PROJECT_USERAME = "galaxyproject"
PROJECT_URL = "https://github.com/galaxyproject/galaxy"
PROJECT_AUTHOR = 'Galaxy Project and Community'
PROJECT_DESCRIPTION = 'Galaxy Selenium Interaction Framework'
PROJECT_EMAIL = '... | 33.142857 | 64 | 0.760776 |
7951b36a5dcb9680cf37923754bb63e71302c311 | 6,040 | py | Python | gui/api_call_renderers_test.py | patriotemeritus/grr | bf2b9268c8b9033ab091e27584986690438bd7c3 | [
"Apache-2.0"
] | 1 | 2016-02-13T15:40:20.000Z | 2016-02-13T15:40:20.000Z | gui/api_call_renderers_test.py | patriotemeritus/grr | bf2b9268c8b9033ab091e27584986690438bd7c3 | [
"Apache-2.0"
] | 3 | 2020-02-11T22:29:15.000Z | 2021-06-10T17:44:31.000Z | gui/api_call_renderers_test.py | wandec/grr | 7fb7e6d492d1325a5fe1559d3aeae03a301c4baa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Tests for API call renderers."""
# pylint: disable=unused-import,g-bad-import-order
from grr.lib import server_plugins
# pylint: enable=unused-import,g-bad-import-order
import json
from grr.gui import api_aff4_object_renderers
from grr.gui import api_call_renderers
from grr.lib import fla... | 31.458333 | 78 | 0.684768 |
7951b42058e49f9a08ad63854c58dd040cdaa90f | 4,322 | py | Python | tests/integration/elasticsearch_/test_instrumented_transport.py | hackerrdave/signalfx-python-tracing | 55f50c7b71cea642bb18733e452988a32f899fbb | [
"Apache-2.0"
] | null | null | null | tests/integration/elasticsearch_/test_instrumented_transport.py | hackerrdave/signalfx-python-tracing | 55f50c7b71cea642bb18733e452988a32f899fbb | [
"Apache-2.0"
] | null | null | null | tests/integration/elasticsearch_/test_instrumented_transport.py | hackerrdave/signalfx-python-tracing | 55f50c7b71cea642bb18733e452988a32f899fbb | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019 SignalFx, Inc. All rights reserved.
from time import sleep
from opentracing.mocktracer import MockTracer
import elasticsearch
import docker
import pytest
from signalfx_tracing.libraries import elasticsearch_config
from signalfx_tracing import instrument, uninstrument
from tests.utils import rando... | 39.651376 | 120 | 0.672374 |
7951b4404d2cd43ac27f6dca90ac4e07079e7a85 | 445 | py | Python | examples/scripts/ephemeris/create_ephemeris_search_object.py | fossabot/pyaurorax | cb3e72a90f3107302d4f9fd4b0478fe98616354d | [
"MIT"
] | null | null | null | examples/scripts/ephemeris/create_ephemeris_search_object.py | fossabot/pyaurorax | cb3e72a90f3107302d4f9fd4b0478fe98616354d | [
"MIT"
] | 45 | 2021-11-07T22:02:23.000Z | 2022-03-09T03:04:27.000Z | examples/scripts/ephemeris/create_ephemeris_search_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():
s = pyaurorax.ephemeris.Search(datetime.datetime(2020, 1, 1, 0, 0, 0),
datetime.datetime(2020, 1, 10, 0, 0, 0),
programs=["swarm"],
platforms=["swarma"],
... | 26.176471 | 75 | 0.433708 |
7951b4b6ae21ff2178d25af72fd97064f4c48c3f | 6,656 | py | Python | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/5-extending_bound_20.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/5-extending_bound_20.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/5-extending_bound_20.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import Tuple, FrozenSet
from collections import Iterable
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msat_make_not, msat_mak... | 37.60452 | 89 | 0.626953 |
7951b517a5289981266695286b89a65a6cd610c2 | 3,906 | py | Python | fabtools/python_setuptools.py | hagai26/fabtools | 2992546df965892acafe34895251012a74a51611 | [
"BSD-2-Clause"
] | 1 | 2016-02-12T02:05:41.000Z | 2016-02-12T02:05:41.000Z | fabtools/python_setuptools.py | datascopeanalytics/fabtools | 430073d2b1d8a61ec11fef2aff57ded4c505681f | [
"BSD-2-Clause"
] | null | null | null | fabtools/python_setuptools.py | datascopeanalytics/fabtools | 430073d2b1d8a61ec11fef2aff57ded4c505681f | [
"BSD-2-Clause"
] | 1 | 2020-10-26T15:03:37.000Z | 2020-10-26T15:03:37.000Z | """
Python packages
===============
This module provides tools for installing Python packages using
the ``easy_install`` command provided by `setuptools`_.
.. _setuptools: http://pythonhosted.org/setuptools/
"""
from fabric.api import cd, run
from fabtools.utils import download, run_as_root
EZ_SETUP_URL = 'https... | 25.86755 | 80 | 0.651562 |
7951b73a28ca6cdaa1b4e8686651217e6bdcd281 | 58 | py | Python | basic/loops/for_list.py | robertob45/learning-python | 7407f7d9e513792150eb2b65ebc644b5f8632c56 | [
"MIT"
] | null | null | null | basic/loops/for_list.py | robertob45/learning-python | 7407f7d9e513792150eb2b65ebc644b5f8632c56 | [
"MIT"
] | null | null | null | basic/loops/for_list.py | robertob45/learning-python | 7407f7d9e513792150eb2b65ebc644b5f8632c56 | [
"MIT"
] | null | null | null | list = [1,2,3,4,5,6,7,8,9,10]
for x in list:
print(x)
| 14.5 | 29 | 0.534483 |
7951b7aad1464d5f384bc7bf47476b78b4327858 | 845 | py | Python | 4 fuzzy distances.py | satyarth42/Soft-computing-lab | 0142332e8c17d358c3518cd2bdfef1f74b1a340d | [
"MIT"
] | null | null | null | 4 fuzzy distances.py | satyarth42/Soft-computing-lab | 0142332e8c17d358c3518cd2bdfef1f74b1a340d | [
"MIT"
] | null | null | null | 4 fuzzy distances.py | satyarth42/Soft-computing-lab | 0142332e8c17d358c3518cd2bdfef1f74b1a340d | [
"MIT"
] | null | null | null | import numpy as np
a = [x for x in input().split(" ")]
b = [x for x in input().split(" ")]
d_a = {}
d_b = {}
for x in a:
x = x.split(',')
d_a[int(x[0])]=float(x[1])
for x in b:
x = x.split(',')
d_b[int(x[0])]=float(x[1])
print("set A "+str(d_a))
print("set B "+str(d_b))
hamming_dist =... | 22.837838 | 50 | 0.539645 |
7951b7b6e428e1455dc65523fa2df7293140543f | 1,998 | py | Python | twsyncer/main.py | sorrowless/twsyncer | ed46ebf0075f4fe663d1b3c17e7c48f78602b1a7 | [
"Apache-2.0"
] | 1 | 2021-09-17T15:21:16.000Z | 2021-09-17T15:21:16.000Z | twsyncer/main.py | sorrowless/twsyncer | ed46ebf0075f4fe663d1b3c17e7c48f78602b1a7 | [
"Apache-2.0"
] | 1 | 2022-01-18T14:25:48.000Z | 2022-01-21T22:00:54.000Z | twsyncer/main.py | sorrowless/twsyncer | ed46ebf0075f4fe663d1b3c17e7c48f78602b1a7 | [
"Apache-2.0"
] | 1 | 2022-01-18T14:26:12.000Z | 2022-01-18T14:26:12.000Z | from .config import load_config
from .ghub import GithubWorker
from .twarrior import TaskWarriorWorker
from .worker import Worker
import os
def main():
config = load_config()
if not config:
dry_run = os.environ.get("TW_DRY_RUN", True)
# Actually you getting str from env, let's roughly convert... | 33.864407 | 79 | 0.668669 |
7951b7c363df98996e9e2fc8b043df7078d7fc3d | 6,119 | py | Python | Source/sgc/widgets/switch.py | tvenissat/CSCI-413-A-Team-FooBar-Project-01 | 53240fea5b4e2a1f688083d2a7fe9cd40827bb0d | [
"MIT"
] | null | null | null | Source/sgc/widgets/switch.py | tvenissat/CSCI-413-A-Team-FooBar-Project-01 | 53240fea5b4e2a1f688083d2a7fe9cd40827bb0d | [
"MIT"
] | null | null | null | Source/sgc/widgets/switch.py | tvenissat/CSCI-413-A-Team-FooBar-Project-01 | 53240fea5b4e2a1f688083d2a7fe9cd40827bb0d | [
"MIT"
] | 1 | 2019-10-30T20:44:35.000Z | 2019-10-30T20:44:35.000Z | # Copyright 2010-2012 the SGC project developers.
# See the LICENSE file at the top-level directory of this distribution
# and at http://program.sambull.org/sgc/license.html.
"""
Switch widget, allows the user to change a boolean setting.
"""
import pygame
from pygame.locals import *
from pygame import display, draw... | 36.207101 | 80 | 0.547639 |
7951b888d59377b3e5f7c1141855b8372b9ee75c | 2,149 | py | Python | tests/equivalence_test.py | cgruber/make-open-easy | b433ba61d2f7b32d06eb7df8db38ba545827ad5e | [
"Apache-2.0"
] | 5 | 2016-05-08T00:55:46.000Z | 2020-03-14T06:57:30.000Z | tests/equivalence_test.py | cgruber/make-open-easy | b433ba61d2f7b32d06eb7df8db38ba545827ad5e | [
"Apache-2.0"
] | null | null | null | tests/equivalence_test.py | cgruber/make-open-easy | b433ba61d2f7b32d06eb7df8db38ba545827ad5e | [
"Apache-2.0"
] | 10 | 2015-06-08T21:15:13.000Z | 2021-10-16T15:06:01.000Z | #!/usr/bin/env python
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Tests for moe.actions.EquivalenceCheck."""
__author__ = 'dbentley@google.com (Daniel Bentley)'
import gflags as flags
from google.apputils import basetest
from moe import actions
from moe import base
from moe import codebase_utils
from moe... | 29.438356 | 76 | 0.695672 |
7951bcdadb5588e46251133f29c3f2fa96b6a14b | 21,514 | py | Python | Chimera/python3_scripts/sequencer.py | zzpwahaha/Chimera-Control-Trim | df1bbf6bea0b87b8c7c9a99dce213fdc249118f2 | [
"MIT"
] | null | null | null | Chimera/python3_scripts/sequencer.py | zzpwahaha/Chimera-Control-Trim | df1bbf6bea0b87b8c7c9a99dce213fdc249118f2 | [
"MIT"
] | null | null | null | Chimera/python3_scripts/sequencer.py | zzpwahaha/Chimera-Control-Trim | df1bbf6bea0b87b8c7c9a99dce213fdc249118f2 | [
"MIT"
] | null | null | null | from time import sleep
from axis_fifo import AXIS_FIFO
from devices import fifo_devices
from devices import gpio_devices
from axi_gpio import AXI_GPIO
from dac81416 import DAC81416
from ad9959 import AD9959
from test_sequencer import write_point as TS_write_point
from reset_all import reset
from writeToSeqGPIO import w... | 39.914657 | 173 | 0.697964 |
7951bce8ab95e47ff8d6c373a8cef615166f882c | 11,093 | py | Python | plotly_study/graph_objs/sunburst/hoverlabel/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | plotly_study/graph_objs/sunburst/hoverlabel/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | plotly_study/graph_objs/sunburst/hoverlabel/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | from plotly_study.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#f... | 34.237654 | 88 | 0.565582 |
7951be6aededc604b847b5a4bd0a6424ff1c393d | 3,113 | py | Python | eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-x86_64-ucs4.egg/EGG-INFO/scripts/mask_quality.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-x86_64-ucs4.egg/EGG-INFO/scripts/mask_quality.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-x86_64-ucs4.egg/EGG-INFO/scripts/mask_quality.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 1 | 2020-07-25T21:03:18.000Z | 2020-07-25T21:03:18.000Z | #!/afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.7
"""
Masks an AXT or MAF file based on quality (from a binned_array) and
outputs AXT or MAF.
Binned array form of quality scores can be generated with `qv_to_bqv.py`.
usage: %prog input output
-i, --input=N: Format of input (axt or maf)
-o, --o... | 31.444444 | 104 | 0.612271 |
7951bf8558808751e0c6702c596e64637786e70e | 1,511 | py | Python | src/utils/archive/roc_img.py | xmuyzz/IVContrast | f3100e54f1808e1a796acd97ef5d23d0a2fd4f6c | [
"MIT"
] | null | null | null | src/utils/archive/roc_img.py | xmuyzz/IVContrast | f3100e54f1808e1a796acd97ef5d23d0a2fd4f6c | [
"MIT"
] | null | null | null | src/utils/archive/roc_img.py | xmuyzz/IVContrast | f3100e54f1808e1a796acd97ef5d23d0a2fd4f6c | [
"MIT"
] | null | null | null | #--------------------------------------------------------------------------------------
# Deep learning for classification for contrast CT;
# Transfer learning using Google Inception V3;
#-----------------------------------------------------------------------------------------
import os
import numpy as np
import pandas... | 29.627451 | 90 | 0.499669 |
7951bf9d752b67a9460634d77ce6bd44c14e2eb3 | 1,231 | py | Python | scripts/pat_comp_cordic.py | tzaumiaan/vhdl_repo | 1fc24e1fc1b6930de069f37cc80922cbb7dd2c2c | [
"MIT"
] | null | null | null | scripts/pat_comp_cordic.py | tzaumiaan/vhdl_repo | 1fc24e1fc1b6930de069f37cc80922cbb7dd2c2c | [
"MIT"
] | null | null | null | scripts/pat_comp_cordic.py | tzaumiaan/vhdl_repo | 1fc24e1fc1b6930de069f37cc80922cbb7dd2c2c | [
"MIT"
] | null | null | null | import verif_utils
w_data = 16
thr_err = 8
class pattern_comparator(verif_utils.pattern_comparator):
def run(self) -> int:
cnt_err = 0
for p_, d_ in self.pattern_list:
cnt_err += verif_utils.check_pat_diff(p_, d_, f_diff=line_comp_cordic)
return cnt_err
def lin... | 34.194444 | 91 | 0.556458 |
7951c06e847047cc41968ea987954dd8636d101d | 553 | py | Python | trick.py | Fog-Wolf/flask_toolkots | 1ca320f5cf9ebb14f56b054c952be06bacd4936d | [
"MIT"
] | 4 | 2020-09-10T08:32:53.000Z | 2020-09-16T06:05:46.000Z | trick.py | Fog-Wolf/flask_toolkits | 1ca320f5cf9ebb14f56b054c952be06bacd4936d | [
"MIT"
] | null | null | null | trick.py | Fog-Wolf/flask_toolkits | 1ca320f5cf9ebb14f56b054c952be06bacd4936d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ░░░░░░░░░░░░░░░░░░░░░░░░▄░░
# ░░░░░░░░░▐█░░░░░░░░░░░▄▀▒▌░
# ░░░░░░░░▐▀▒█░░░░░░░░▄▀▒▒▒▐
# ░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐
# ░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐
# ░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌
# ░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒
# ░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐
# ░▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄
# ░▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒
#... | 23.041667 | 56 | 0.24774 |
7951c0c6d4e283afcb48ecf7053acb9e1c01c928 | 1,626 | py | Python | test_rpic.py | clamytoe/Random-Picture | 8acef2bf179d94032a0aef5d54078befa6cb401f | [
"MIT"
] | 4 | 2019-08-18T02:06:05.000Z | 2021-05-15T00:49:03.000Z | test_rpic.py | clamytoe/Random-Picture | 8acef2bf179d94032a0aef5d54078befa6cb401f | [
"MIT"
] | null | null | null | test_rpic.py | clamytoe/Random-Picture | 8acef2bf179d94032a0aef5d54078befa6cb401f | [
"MIT"
] | null | null | null | from os import path, rmdir, sys, unlink
import pytest
from rpic import Wallhaven
PLATFORM = sys.platform
@pytest.fixture(scope="session")
def haven():
return Wallhaven()
def test_url(haven):
url = (
"https://wallhaven.cc/search?categories=111&purity=100&"
"atleast=1920x1080&sorting=random&... | 25.809524 | 75 | 0.686347 |
7951c234c897b66587a135ab2359e2790f1fda45 | 2,884 | py | Python | Chapter05/webapp/blog/controllers.py | jayakumardhananjayan/pythonwebtut | a7547473fec5b90a91aea5395131e6eff245b495 | [
"MIT"
] | 4 | 2019-05-16T16:34:06.000Z | 2021-09-10T17:47:36.000Z | Chapter05/webapp/blog/controllers.py | jayakumardhananjayan/pythonwebtut | a7547473fec5b90a91aea5395131e6eff245b495 | [
"MIT"
] | null | null | null | Chapter05/webapp/blog/controllers.py | jayakumardhananjayan/pythonwebtut | a7547473fec5b90a91aea5395131e6eff245b495 | [
"MIT"
] | 1 | 2018-11-29T13:54:38.000Z | 2018-11-29T13:54:38.000Z | from sqlalchemy import func
from flask import render_template, Blueprint, flash, redirect, url_for, current_app
from .models import db, Post, Tag, Comment, User, tags
from .forms import CommentForm
blog_blueprint = Blueprint(
'blog',
__name__,
template_folder='../templates/blog',
url_prefix="/blog"
)
... | 28.27451 | 112 | 0.610957 |
7951c36467770bf6c45e78684fecb32d630b462c | 1,059 | py | Python | Array/FirstBadVersion.py | menghanY/LeetCode-Python | 85f9dc4a5b18a3b8a4a3d7b3a6eeb0e935901534 | [
"MIT"
] | null | null | null | Array/FirstBadVersion.py | menghanY/LeetCode-Python | 85f9dc4a5b18a3b8a4a3d7b3a6eeb0e935901534 | [
"MIT"
] | null | null | null | Array/FirstBadVersion.py | menghanY/LeetCode-Python | 85f9dc4a5b18a3b8a4a3d7b3a6eeb0e935901534 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/first-bad-version/
# You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on the previous version, all the versions after a bad version are also ba... | 44.125 | 271 | 0.68272 |
7951c45b8db38dac6468a25a64ed56dab7445fee | 983 | py | Python | modules/role_tag/cog.py | abrahammurciano/rolling-tags | 189a05087c55f255be110ce6239518c1113bd24f | [
"MIT"
] | 2 | 2021-02-02T16:28:52.000Z | 2021-04-19T11:13:04.000Z | modules/role_tag/cog.py | abrahammurciano/rolling-tags | 189a05087c55f255be110ce6239518c1113bd24f | [
"MIT"
] | 4 | 2021-04-21T15:31:24.000Z | 2022-01-20T23:27:45.000Z | modules/role_tag/cog.py | abrahammurciano/rolling-tags | 189a05087c55f255be110ce6239518c1113bd24f | [
"MIT"
] | 1 | 2021-04-22T14:17:50.000Z | 2021-04-22T14:17:50.000Z | from modules.role_tag.role import Role
from modules.role_tag.member import Member
from discord.ext import commands
import discord
class RoleTagsCog(commands.Cog, name="Role Tags"):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.Cog.listener()
async def on_member_update(self, before: discord.Mem... | 28.085714 | 81 | 0.732452 |
7951c4621320ead3274e7bfc2b56767f3c7c8d13 | 4,502 | py | Python | titer_model/implementation-nextstrain-augur/base/prediction.py | blab/dengue | 5eacc47fbd77c59e7342d5be4aa81f7d3b4ff0bf | [
"CC-BY-4.0",
"MIT"
] | 4 | 2019-03-31T22:03:48.000Z | 2020-06-16T21:04:24.000Z | titer_model/implementation-nextstrain-augur/base/prediction.py | emmahodcroft/dengue-antigenic-dynamics | 5eacc47fbd77c59e7342d5be4aa81f7d3b4ff0bf | [
"CC-BY-4.0",
"MIT"
] | 4 | 2018-10-12T02:13:10.000Z | 2019-07-24T02:44:53.000Z | titer_model/implementation-nextstrain-augur/base/prediction.py | emmahodcroft/dengue-antigenic-dynamics | 5eacc47fbd77c59e7342d5be4aa81f7d3b4ff0bf | [
"CC-BY-4.0",
"MIT"
] | 5 | 2018-09-10T23:14:09.000Z | 2020-12-27T20:57:34.000Z | from __future__ import division, print_function
import numpy as np
import time
from collections import defaultdict
from base.io_util import myopen
from itertools import izip
import pandas as pd
def LBI(tree, tau=0.001, attr='lbi'):
'''
traverses the tree in postorder and preorder to calculate the
up and do... | 39.147826 | 89 | 0.635717 |
7951c612dbc697b10391c85f6669a5abee4cbdd8 | 2,179 | py | Python | setup.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | setup.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | setup.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 33.523077 | 245 | 0.649839 |
7951c6da18afea0dcb145c3653b7b89f78f9ad60 | 2,462 | py | Python | utils.py | bkong1990/pytorch-adda | a503bc47187e61f06636d843be067ffb889dda6f | [
"MIT"
] | 415 | 2017-08-22T11:29:38.000Z | 2022-03-22T15:54:17.000Z | utils.py | bkong1990/pytorch-adda | a503bc47187e61f06636d843be067ffb889dda6f | [
"MIT"
] | 26 | 2017-12-19T02:53:21.000Z | 2021-12-08T06:29:44.000Z | utils.py | bkong1990/pytorch-adda | a503bc47187e61f06636d843be067ffb889dda6f | [
"MIT"
] | 136 | 2017-11-15T01:08:40.000Z | 2022-03-23T23:19:50.000Z | """Utilities for ADDA."""
import os
import random
import torch
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
import params
from datasets import get_mnist, get_usps
def make_variable(tensor, volatile=False):
"""Convert Tensor to Variable."""
if torch.cuda.is_available():
t... | 26.473118 | 79 | 0.637693 |
7951c73956c506bd02c34e5c7fd3e559875c08fd | 4,805 | py | Python | pyelect/utils.py | cjerdonek/sf-election-data | ad9a86245d6bb2aa7b488d94b24b0ba9ca999b1e | [
"BSD-3-Clause"
] | null | null | null | pyelect/utils.py | cjerdonek/sf-election-data | ad9a86245d6bb2aa7b488d94b24b0ba9ca999b1e | [
"BSD-3-Clause"
] | null | null | null | pyelect/utils.py | cjerdonek/sf-election-data | ad9a86245d6bb2aa7b488d94b24b0ba9ca999b1e | [
"BSD-3-Clause"
] | null | null | null | """Project-wide helper functions."""
import logging
import os
import yaml
_log = logging.getLogger()
FILE_MANUAL = 'manual'
FILE_AUTO_GENERATED = 'auto_generated'
FILE_AUTO_UPDATED = 'auto_updated'
FILE_TYPES = (FILE_MANUAL, FILE_AUTO_UPDATED, FILE_AUTO_GENERATED)
DIR_PRE_DATA = 'pre_data'
KEY_META_COMMENTS = 'c... | 25.833333 | 103 | 0.685744 |
7951c7476cb998e605b8746ddd27d7af731a6432 | 529 | py | Python | lec4.py | Caleb0929/IA241 | 2fed3e8d0f12bb8180a3e53beed036949cd9eaa0 | [
"MIT"
] | null | null | null | lec4.py | Caleb0929/IA241 | 2fed3e8d0f12bb8180a3e53beed036949cd9eaa0 | [
"MIT"
] | null | null | null | lec4.py | Caleb0929/IA241 | 2fed3e8d0f12bb8180a3e53beed036949cd9eaa0 | [
"MIT"
] | null | null | null | """
lec 4 dict and tuple
"""
#my_tuple = 'a','b','c','d','e'
#print(my_tuple)
#my_2nd_tuple = ('a','b','c','d','e')
#print(my_2nd_tuple)
#not_a_tuple = ('a')
#print(type (not_a_tuple))
#is_a_tuple = ('a',)
#print(type (is_a_tuple))
#print(my_tuple[:])
my_car = {
'color': 'red',
'maker': 't... | 14.297297 | 37 | 0.572779 |
7951c784d422635fc6d5cb0596eeff1d1166a7d9 | 13,777 | py | Python | neurogym/utils/plotting.py | lijianhet/neurogym | b82981f7ecac556e9dd3c478ffc37cce49e4ead1 | [
"MIT"
] | null | null | null | neurogym/utils/plotting.py | lijianhet/neurogym | b82981f7ecac556e9dd3c478ffc37cce49e4ead1 | [
"MIT"
] | null | null | null | neurogym/utils/plotting.py | lijianhet/neurogym | b82981f7ecac556e9dd3c478ffc37cce49e4ead1 | [
"MIT"
] | null | null | null | """Plotting functions."""
import glob
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import gym
# TODO: This is changing user's plotting behavior for non-neurogym plots
mpl.rcParams['font.size'] = 7
mpl.rcParams['pdf.fonttype'] = 42
mpl.rcParams[... | 33.767157 | 82 | 0.575089 |
7951c796255457a419199d1cc4508eed48ddc81d | 15,051 | py | Python | venv/lib/python3.6/site-packages/openerplib/main.py | mathsaad/crudCRMOdoo | e6328a735ded31a3ebff3eb7e2ae9f39d2c48d29 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/openerplib/main.py | mathsaad/crudCRMOdoo | e6328a735ded31a3ebff3eb7e2ae9f39d2c48d29 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/openerplib/main.py | mathsaad/crudCRMOdoo | e6328a735ded31a3ebff3eb7e2ae9f39d2c48d29 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) Stephane Wirtel
# Copyright (C) 2011 Nicolas Vanhoren
# Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or ... | 39.712401 | 120 | 0.636503 |
7951c7f1520928499303c5622c13356d122b7e76 | 1,668 | py | Python | jdcloud_sdk/services/vm/models/BriefInstanceDiskAttachment.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/vm/models/BriefInstanceDiskAttachment.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/vm/models/BriefInstanceDiskAttachment.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 34.75 | 121 | 0.708633 |
7951c8aa92ba70f4a74ec305a24f5c52d507bfff | 1,104 | py | Python | contrib/opencensus-ext-azure/examples/metrics/standard.py | jtbeach/opencensus-python | 2e396b063a238b3e823b6efc136b9a0405dd5565 | [
"Apache-2.0"
] | 1 | 2019-09-21T13:52:19.000Z | 2019-09-21T13:52:19.000Z | contrib/opencensus-ext-azure/examples/metrics/standard.py | jtbeach/opencensus-python | 2e396b063a238b3e823b6efc136b9a0405dd5565 | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-azure/examples/metrics/standard.py | jtbeach/opencensus-python | 2e396b063a238b3e823b6efc136b9a0405dd5565 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, OpenCensus Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 29.837838 | 74 | 0.740942 |
7951c8d0ecf0483d0875943bafef6573ab964005 | 1,282 | py | Python | remind.py | vgeorgework/tk_gui_sqlite_project | f8de50ee685678d4eee238b3e60369cc9d699c92 | [
"Unlicense"
] | null | null | null | remind.py | vgeorgework/tk_gui_sqlite_project | f8de50ee685678d4eee238b3e60369cc9d699c92 | [
"Unlicense"
] | null | null | null | remind.py | vgeorgework/tk_gui_sqlite_project | f8de50ee685678d4eee238b3e60369cc9d699c92 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import Tkinter
import random
import backend as myback # i imported the backend file as an object
from Tkinter import StringVar
root = Tkinter.Tk()
root.configure(bg="white")
root.title("My Super To Do List")
root.geometry("500x500")
print "haiiiiiiiiiiii"
def add_task():... | 22.892857 | 101 | 0.74493 |
7951c9516d11bd6d3c054d467563f963e71cfb2f | 566 | py | Python | ginger/app/validators/base.py | MiracleWong/flask-api | a3e14c666284a39b3a9992558c494b869f9d864f | [
"MIT"
] | null | null | null | ginger/app/validators/base.py | MiracleWong/flask-api | a3e14c666284a39b3a9992558c494b869f9d864f | [
"MIT"
] | null | null | null | ginger/app/validators/base.py | MiracleWong/flask-api | a3e14c666284a39b3a9992558c494b869f9d864f | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""
created by MiracleWong on 2019/2/8
"""
from flask import request
from wtforms import Form
from app.libs.error_code import ParameterException
__author__ = 'MiracleWong'
class BaseForm(Form):
def __init__(self):
data = request.json
print(data)
super(BaseForm, sel... | 21.769231 | 53 | 0.644876 |
7951c9aa6a9a9f08ba51ecbf41c4bcc7f6268bca | 84 | py | Python | telethon/_updates/__init__.py | MrGam-oy/Telethon | acc512683c107f80d47ab0fdaac0d1ac9439d43c | [
"MIT"
] | null | null | null | telethon/_updates/__init__.py | MrGam-oy/Telethon | acc512683c107f80d47ab0fdaac0d1ac9439d43c | [
"MIT"
] | null | null | null | telethon/_updates/__init__.py | MrGam-oy/Telethon | acc512683c107f80d47ab0fdaac0d1ac9439d43c | [
"MIT"
] | null | null | null | from .entitycache import EntityCache, PackedChat
from .messagebox import MessageBox
| 28 | 48 | 0.857143 |
7951cad305af074540352b1394dcb9df0522e207 | 98 | py | Python | xknx/io/const.py | jonppe/xknx | b08a122b0f3c170d91aae6213a60c7038e451c93 | [
"MIT"
] | 1 | 2020-12-27T13:54:34.000Z | 2020-12-27T13:54:34.000Z | xknx/io/const.py | jonppe/xknx | b08a122b0f3c170d91aae6213a60c7038e451c93 | [
"MIT"
] | 1 | 2021-02-17T23:54:32.000Z | 2021-02-17T23:54:32.000Z | xknx/io/const.py | mielune/xknx | 57c248c386f2ae150d983f72a5a8da684097265d | [
"MIT"
] | null | null | null | """KNX Constants used within io."""
DEFAULT_MCAST_GRP = "224.0.23.12"
DEFAULT_MCAST_PORT = 3671
| 19.6 | 36 | 0.72449 |
7951cc7c784312b3d1728173d2ba65d41face630 | 1,284 | py | Python | electrum_gui/common/coin/registry.py | liuzjalex/electrum | 98f7c8bfdef071cd859d54f1f72c39688cde41cf | [
"MIT"
] | null | null | null | electrum_gui/common/coin/registry.py | liuzjalex/electrum | 98f7c8bfdef071cd859d54f1f72c39688cde41cf | [
"MIT"
] | null | null | null | electrum_gui/common/coin/registry.py | liuzjalex/electrum | 98f7c8bfdef071cd859d54f1f72c39688cde41cf | [
"MIT"
] | null | null | null | import json
import os
from typing import Dict
from electrum_gui.common.coin.data import ChainInfo, ChainModel, CoinInfo
def _load_chains(chains_json_name: str) -> Dict[str, ChainInfo]:
raw_chains = json.loads(open(chains_json_name).read())
ret = {}
for config in raw_chains:
config["chain_model"]... | 30.571429 | 87 | 0.715732 |
7951cc995dd01b1a2776c7be40015f38555452d4 | 439 | py | Python | transactions/migrations/0007_auto_20210108_2018.py | ankit-ryan/Banksystem | 40138fdec7e3eba0430571a63026f97fba37dbcc | [
"MIT"
] | null | null | null | transactions/migrations/0007_auto_20210108_2018.py | ankit-ryan/Banksystem | 40138fdec7e3eba0430571a63026f97fba37dbcc | [
"MIT"
] | null | null | null | transactions/migrations/0007_auto_20210108_2018.py | ankit-ryan/Banksystem | 40138fdec7e3eba0430571a63026f97fba37dbcc | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2021-01-08 14:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('transactions', '0006_auto_20201230_0702'),
]
operations = [
migrations.AlterField(
model_name='statement',
name='sta... | 23.105263 | 87 | 0.621868 |
7951cccccdce63e2f75707acb8de5fd8e6787fd5 | 23,843 | py | Python | stix_shifter_modules/splunk/tests/stix_translation/test_splunk_json_to_stix.py | grimmjow8/stix-shifter | 7d252fc241a606f0141ed50d64368d8a5e7e5c5a | [
"Apache-2.0"
] | 129 | 2019-10-09T17:13:03.000Z | 2022-03-03T08:25:46.000Z | stix_shifter_modules/splunk/tests/stix_translation/test_splunk_json_to_stix.py | grimmjow8/stix-shifter | 7d252fc241a606f0141ed50d64368d8a5e7e5c5a | [
"Apache-2.0"
] | 415 | 2019-10-03T14:29:20.000Z | 2022-03-31T18:23:41.000Z | stix_shifter_modules/splunk/tests/stix_translation/test_splunk_json_to_stix.py | grimmjow8/stix-shifter | 7d252fc241a606f0141ed50d64368d8a5e7e5c5a | [
"Apache-2.0"
] | 178 | 2019-10-08T22:18:48.000Z | 2022-03-21T11:04:05.000Z | import json
import logging
from stix_shifter_utils.stix_translation.src.json_to_stix import json_to_stix_translator
from stix_shifter.stix_translation import stix_translation
from stix_shifter_modules.splunk.entry_point import EntryPoint
from stix2validator import validate_instance
from stix_shifter_modules.splunk.stix... | 48.363083 | 162 | 0.624124 |
7951ccf9f6e4864b1283cfa3ef65c3b7323a1483 | 8,328 | py | Python | tft/data_formatters/electricity.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | tft/data_formatters/electricity.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | tft/data_formatters/electricity.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 31.78626 | 78 | 0.695965 |
7951cd27e78a3e6282eaa1b087b27d5e076b25a6 | 5,762 | py | Python | test/test_optimizer.py | fritzo/funsor | 1d07af18c21894dd56e2f4f877c7845430c3b729 | [
"Apache-2.0"
] | 198 | 2019-02-04T19:13:14.000Z | 2022-03-26T18:33:47.000Z | test/test_optimizer.py | fritzo/funsor | 1d07af18c21894dd56e2f4f877c7845430c3b729 | [
"Apache-2.0"
] | 334 | 2019-02-14T19:33:32.000Z | 2022-03-18T00:55:40.000Z | test/test_optimizer.py | fritzo/funsor | 1d07af18c21894dd56e2f4f877c7845430c3b729 | [
"Apache-2.0"
] | 19 | 2019-05-18T01:58:10.000Z | 2022-03-04T16:40:00.000Z | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
from collections import OrderedDict
import pytest
import funsor
from funsor.domains import Bint
from funsor.einsum import (
einsum,
naive_contract_einsum,
naive_einsum,
naive_plated_einsum,
)
from funsor.interpretatio... | 35.349693 | 87 | 0.692121 |
7951cd8b9e86e00d8bd6f36c356c6e8a1801417a | 3,082 | py | Python | pbge/scenes/waypoints.py | marblexu/gearhead-caramel | 8bf4572aefb5f3a1bafd20ad04dfa0b2f44be8b1 | [
"Apache-2.0"
] | null | null | null | pbge/scenes/waypoints.py | marblexu/gearhead-caramel | 8bf4572aefb5f3a1bafd20ad04dfa0b2f44be8b1 | [
"Apache-2.0"
] | null | null | null | pbge/scenes/waypoints.py | marblexu/gearhead-caramel | 8bf4572aefb5f3a1bafd20ad04dfa0b2f44be8b1 | [
"Apache-2.0"
] | 1 | 2022-02-24T13:23:01.000Z | 2022-02-24T13:23:01.000Z |
from .. import container,image,KeyObject,rpgmenu,frects,draw_text,default_border,my_state,alert
import pygame
class PuzzleMenu( rpgmenu.Menu ):
WIDTH = 350
HEIGHT = 250
MENU_HEIGHT = 75
FULL_RECT = frects.Frect(-175,-125,350,250)
TEXT_RECT = frects.Frect(-175,-125,350,165)
def __init__( sel... | 32.787234 | 145 | 0.55743 |
7951cdab5475ba4f1445607c7d395298858b69bb | 19,142 | py | Python | src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2019_03_01/test_managmentgroups.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 3,287 | 2016-07-26T17:34:33.000Z | 2022-03-31T09:52:13.000Z | src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2019_03_01/test_managmentgroups.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 19,206 | 2016-07-26T07:04:42.000Z | 2022-03-31T23:57:09.000Z | src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2019_03_01/test_managmentgroups.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 2,575 | 2016-07-26T06:44:40.000Z | 2022-03-31T22:56:06.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 48.831633 | 150 | 0.649775 |
7951cee890c9b9c12b1fbe55f0a2a704d6d0982f | 464 | py | Python | server/djangoapp/admin.py | ymitsutomi-personal/agfzb-CloudAppDevelopment_Capstone | 91ffa41d75f72d41403639d998f2fbea85c42d8b | [
"Apache-2.0"
] | null | null | null | server/djangoapp/admin.py | ymitsutomi-personal/agfzb-CloudAppDevelopment_Capstone | 91ffa41d75f72d41403639d998f2fbea85c42d8b | [
"Apache-2.0"
] | null | null | null | server/djangoapp/admin.py | ymitsutomi-personal/agfzb-CloudAppDevelopment_Capstone | 91ffa41d75f72d41403639d998f2fbea85c42d8b | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
# from .models import related models
from .models import *
# Register your models here.
class CarModelInline(admin.StackedInline):
model = CarModel
extra = 5
class CarMakeAdmin(admin.ModelAdmin):
inlines = [CarModelInline]
admin.site.register(CarMake, CarMakeAdmin)
a... | 17.846154 | 42 | 0.765086 |
7951cf719d2ba072f054235e65c4fee4012f88a5 | 3,920 | py | Python | sdks/python/http_client/v1/polyaxon_sdk/models/v1_events_response.py | rimon-safesitehq/polyaxon | c456d5bec00b36d75feabdccffa45b2be9a6346e | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_events_response.py | rimon-safesitehq/polyaxon | c456d5bec00b36d75feabdccffa45b2be9a6346e | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_events_response.py | rimon-safesitehq/polyaxon | c456d5bec00b36d75feabdccffa45b2be9a6346e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | 28.405797 | 79 | 0.59949 |
7951cfa62df492dcd527fc41724a3f6296c339f7 | 3,095 | py | Python | src/zptess/dbase/utils.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | src/zptess/dbase/utils.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | src/zptess/dbase/utils.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------
# Copyright (c) 2022
#
# See the LICENSE file for details
# see the AUTHORS file for authors
# ----------------------------------------------------------------------
#--------------------
# System wide imports
# -------------------
import os
imp... | 29.198113 | 105 | 0.559612 |
7951d06092873a757c9bf0d9a00145154eac0945 | 485 | py | Python | scale/scheduler/node/agent.py | kaydoh/scale | 1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee | [
"Apache-2.0"
] | 121 | 2015-11-18T18:15:33.000Z | 2022-03-10T01:55:00.000Z | scale/scheduler/node/agent.py | kaydoh/scale | 1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee | [
"Apache-2.0"
] | 1,415 | 2015-12-23T23:36:04.000Z | 2022-01-07T14:10:09.000Z | scale/scheduler/node/agent.py | kaydoh/scale | 1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee | [
"Apache-2.0"
] | 66 | 2015-12-03T20:38:56.000Z | 2020-07-27T15:28:11.000Z | """Defines the class that represents an agent in the scheduler"""
from __future__ import unicode_literals
class Agent(object):
"""This class represents an agent available to Scale."""
def __init__(self, agent_id, hostname):
"""Constructor
:param agent_id: The agent ID
:type agent_id:... | 25.526316 | 65 | 0.649485 |
7951d2b389f06c81b1a3a407fe38f4564b0b6a52 | 3,693 | py | Python | app/models.py | fnyaoke/blog | 89727db4e82e2c2852e38fc4662742696091f6ba | [
"MIT"
] | null | null | null | app/models.py | fnyaoke/blog | 89727db4e82e2c2852e38fc4662742696091f6ba | [
"MIT"
] | null | null | null | app/models.py | fnyaoke/blog | 89727db4e82e2c2852e38fc4662742696091f6ba | [
"MIT"
] | null | null | null | from werkzeug.security import generate_password_hash,check_password_hash
from . import db
from datetime import datetime
from flask_login import UserMixin
from . import login_manager
class User(UserMixin, db.Model):
"""
class modelling the users
"""
__tablename__='users'
#create the columns
i... | 23.980519 | 80 | 0.645275 |
7951d408b781ee158c13f34ec922d769eff59f3b | 3,227 | py | Python | etc/structure/project_name/settings.py | Lovekesh-GH/Restapi | e66c057b67356545564f348f1d067e2eb5f89e66 | [
"MIT"
] | 3 | 2021-08-08T05:36:31.000Z | 2022-03-10T13:27:22.000Z | etc/structure/project_name/settings.py | Lovekesh-GH/Restapi | e66c057b67356545564f348f1d067e2eb5f89e66 | [
"MIT"
] | 1 | 2021-07-10T17:31:59.000Z | 2021-07-11T06:14:53.000Z | etc/structure/project_name/settings.py | Lovekesh-GH/Restapi | e66c057b67356545564f348f1d067e2eb5f89e66 | [
"MIT"
] | 1 | 2021-07-10T17:39:00.000Z | 2021-07-10T17:39:00.000Z | """
Django settings for {{project_name}} project.
Generated by 'django-admin startproject' using Django 3.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
imp... | 24.823077 | 91 | 0.700341 |
7951d484094aa752a34510e30e98c026b356c49d | 329 | py | Python | web/private/deck_code_decode.py | mashirozx/hearthstone-deck-embed | 82768ce0ec33e9909cb2acb3e4911223fb8121d6 | [
"MIT"
] | 5 | 2018-12-16T16:34:38.000Z | 2019-05-26T20:46:11.000Z | web/private/deck_code_decode.py | mashirozx/hearthstone-deck-embed | 82768ce0ec33e9909cb2acb3e4911223fb8121d6 | [
"MIT"
] | 47 | 2018-12-22T13:56:29.000Z | 2020-11-01T17:02:28.000Z | web/private/deck_code_decode.py | Zevs6/Awesome-Deck | 7228b6ec613b941692c2e37bae95c6d199c82b56 | [
"MIT"
] | 2 | 2018-12-14T15:37:43.000Z | 2019-11-12T06:52:40.000Z | from hearthstone.deckstrings import Deck
from hearthstone.enums import FormatType
def deck_code_decode(deck_code):
# Deckstring decode. See:
# https://hearthsim.info/docs/deckstrings/
deck = Deck.from_deckstring(deck_code)
deck_hero = deck.heroes[0]
deck_card = deck.cards
return [deck_hero, de... | 27.416667 | 46 | 0.74772 |
7951d5523a5a707c62cb41aba3d77847d3d79557 | 23,365 | py | Python | LBH_to_eflux/observations/ssusi.py | jali7001/LBH_to_E_flux | ad51ea46f72855db805e28fa0ca0b227b43d2683 | [
"MIT"
] | 1 | 2021-02-12T19:59:36.000Z | 2021-02-12T19:59:36.000Z | LBH_to_eflux/observations/ssusi.py | jali7001/LBH_to_E_flux | ad51ea46f72855db805e28fa0ca0b227b43d2683 | [
"MIT"
] | 1 | 2021-11-02T05:14:33.000Z | 2021-11-02T05:14:33.000Z | LBH_to_eflux/observations/ssusi.py | jali7001/LBH_to_E_flux | ad51ea46f72855db805e28fa0ca0b227b43d2683 | [
"MIT"
] | 1 | 2021-04-10T23:01:29.000Z | 2021-04-10T23:01:29.000Z | from collections import OrderedDict
import numpy as np
from geospacepy.special_datetime import (datetimearr2jd,
datetime2jd,
jd2datetime)
import esabin
import datetime, os
import h5py
from sklearn import linear_model
from LBH_to_eflux.helpe... | 40.008562 | 156 | 0.589129 |
7951d5ca8ce161d8c8c9bbe1ea349c18cc23c10c | 28,856 | py | Python | google/cloud/aiplatform_v1beta1/types/__init__.py | TheMichaelHu/python-aiplatform | e03f373a7e44c354eda88875a41c771f6d7e3ce1 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1beta1/types/__init__.py | TheMichaelHu/python-aiplatform | e03f373a7e44c354eda88875a41c771f6d7e3ce1 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1beta1/types/__init__.py | TheMichaelHu/python-aiplatform | e03f373a7e44c354eda88875a41c771f6d7e3ce1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 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... | 28.290196 | 74 | 0.765872 |
7951d6e00c7aa8b96faa2135b77898acf1fb6381 | 25,259 | py | Python | hug/api.py | pnijhara/hug | 95e2f66baa57494b8751b43ad3da6c2d0e2d535d | [
"MIT"
] | 1 | 2021-06-17T12:02:25.000Z | 2021-06-17T12:02:25.000Z | hug/api.py | Warlockk/hug | 95e2f66baa57494b8751b43ad3da6c2d0e2d535d | [
"MIT"
] | 5 | 2021-06-29T18:34:13.000Z | 2021-06-29T18:34:44.000Z | hug/api.py | Warlockk/hug | 95e2f66baa57494b8751b43ad3da6c2d0e2d535d | [
"MIT"
] | 1 | 2021-06-17T12:02:26.000Z | 2021-06-17T12:02:26.000Z | """hug/api.py
Defines the dynamically generated Hug API object that is responsible for storing all routes and state within a module
Copyright (C) 2016 Timothy Edmund Crosley
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Softwar... | 38.979938 | 117 | 0.597055 |
7951d6e14ca41d9aa62f04448dc9fda38861b561 | 1,315 | py | Python | cli/polyaxon/connections/schemas/k8s_resources.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | null | null | null | cli/polyaxon/connections/schemas/k8s_resources.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | 1 | 2022-01-24T11:26:47.000Z | 2022-03-18T23:17:58.000Z | cli/polyaxon/connections/schemas/k8s_resources.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2022 Polyaxon, 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 ... | 30.581395 | 74 | 0.761217 |
7951d885baaf4e806b7a7fc6e6073a98c13d0a52 | 5,422 | py | Python | sktime/classification/feature_based/_matrix_profile_classifier.py | FilipBronic/sktime | d613d704cdc7263ad28fb4519d2d301f2ebd0779 | [
"BSD-3-Clause"
] | 5,349 | 2019-03-21T14:56:50.000Z | 2022-03-31T11:25:30.000Z | sktime/classification/feature_based/_matrix_profile_classifier.py | FilipBronic/sktime | d613d704cdc7263ad28fb4519d2d301f2ebd0779 | [
"BSD-3-Clause"
] | 1,803 | 2019-03-26T13:33:53.000Z | 2022-03-31T23:58:10.000Z | sktime/classification/feature_based/_matrix_profile_classifier.py | FilipBronic/sktime | d613d704cdc7263ad28fb4519d2d301f2ebd0779 | [
"BSD-3-Clause"
] | 911 | 2019-03-25T01:21:30.000Z | 2022-03-31T04:45:51.000Z | # -*- coding: utf-8 -*-
"""Martrix Profile classifier.
Pipeline classifier using the Matrix Profile transformer and an estimator.
"""
__author__ = ["Matthew Middlehurst"]
__all__ = ["MatrixProfileClassifier"]
import numpy as np
from sklearn.neighbors import KNeighborsClassifier
from sktime.base._base import _clone_... | 31.34104 | 86 | 0.63021 |
7951d8aa6cca26bb926e9e96f81cc4962564fb3d | 234,913 | py | Python | seahub/api2/views.py | odontomachus/seahub | 5b6f2153921da21a473d9ff20ce443d40efc93ab | [
"Apache-2.0"
] | null | null | null | seahub/api2/views.py | odontomachus/seahub | 5b6f2153921da21a473d9ff20ce443d40efc93ab | [
"Apache-2.0"
] | null | null | null | seahub/api2/views.py | odontomachus/seahub | 5b6f2153921da21a473d9ff20ce443d40efc93ab | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2012-2016 Seafile Ltd.
# encoding: utf-8
import logging
import os
import stat
from importlib import import_module
import json
import datetime
import posixpath
import re
from dateutil.relativedelta import relativedelta
from urllib2 import quote
from rest_framework import parsers
from rest_framework impo... | 39.667849 | 135 | 0.598256 |
7951d9c8c972c19b2e97a69a430ace6f9261baea | 806 | py | Python | d22/d22.py | panaC/aoc2020 | f56557dace7ffb127dd5cb65aaaa9545be3aa7fb | [
"MIT"
] | null | null | null | d22/d22.py | panaC/aoc2020 | f56557dace7ffb127dd5cb65aaaa9545be3aa7fb | [
"MIT"
] | null | null | null | d22/d22.py | panaC/aoc2020 | f56557dace7ffb127dd5cb65aaaa9545be3aa7fb | [
"MIT"
] | null | null | null | #! /usr/local/bin/python3
import operator
import sys
from collections import deque
from math import prod
#lns = map(lambda x: map(lambda y: int(y), filter(len, x.split('\n')[1:])), sys.stdin.read().split('\n\n'))
lns = [[int(y) for y in filter(len, x.split('\n')[1:])] for x in sys.stdin.read().split('\n\n')]
print(li... | 20.666667 | 107 | 0.575682 |
7951d9ded3475ce2adc6a0fdbd7020e128cf4134 | 593 | py | Python | ex028.py | erikamaylim/Python-CursoemVideo | 5a6809818c4c55a02ec52379d95f3d20c833df2e | [
"MIT"
] | null | null | null | ex028.py | erikamaylim/Python-CursoemVideo | 5a6809818c4c55a02ec52379d95f3d20c833df2e | [
"MIT"
] | null | null | null | ex028.py | erikamaylim/Python-CursoemVideo | 5a6809818c4c55a02ec52379d95f3d20c833df2e | [
"MIT"
] | null | null | null | '''Escreva um programa que faça o computador "pensar" em um número inteiro entre 0 e 5
e peça para o usuário tentar descobrir qual foi o número escolhido pelo computador.
O programa deve escrever na tela se o usuário venceu ou perdeu.'''
from random import randint
from time import sleep
num = randint(0, 5)
aposta = in... | 45.615385 | 100 | 0.726813 |
7951dabb30665d047982d3204f0b912aa2e81695 | 1,913 | py | Python | build_scripts/run_tests.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 3,882 | 2015-03-22T12:17:15.000Z | 2022-03-31T17:13:20.000Z | build_scripts/run_tests.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 638 | 2015-11-03T06:34:44.000Z | 2022-03-31T23:41:48.000Z | build_scripts/run_tests.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 301 | 2015-08-14T10:21:17.000Z | 2022-03-08T11:03:40.000Z | #! /usr/bin/python
"""Script to run PyType tests.
Usage:
$> python run_tests.py [TARGET] [TARGET] ...
A TARGET is a fully qualified name of a test target within the PyType
source tree. If no target is specified, all test targets listed in the
CMake files will be run.
"""
import argparse
import sys
import build_uti... | 33.561404 | 80 | 0.667015 |
7951db75238c3fc612a364b23507e674aa0d63e8 | 2,121 | py | Python | pos_core/urls.py | ardzix/pos_cooperative | 3d85884d50e501a50b6cd1c421d427a0b9373413 | [
"MIT"
] | 2 | 2018-04-29T19:59:04.000Z | 2020-01-29T10:32:28.000Z | pos_core/urls.py | ardzix/pos_cooperative | 3d85884d50e501a50b6cd1c421d427a0b9373413 | [
"MIT"
] | 1 | 2020-01-29T10:32:09.000Z | 2020-01-29T10:32:09.000Z | pos_core/urls.py | ardzix/pos_cooperative | 3d85884d50e501a50b6cd1c421d427a0b9373413 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from pos_core.views.role import *
from pos_core.views.profile import *
from pos_core.views.investor import *
from pos_core.views.brand import *
from pos_core.views.product import *
from pos_core.views.stock import *
from pos_core.views.discount import *
from pos_core.views.sale import *... | 46.108696 | 102 | 0.677982 |
7951db96c4e6c2507f8f82ea752089e91d4e8438 | 1,928 | py | Python | configs/app.default.py | lanPN85/flask-template | 231699db7561a87a92777adfa1d90c8ad69bda19 | [
"MIT"
] | null | null | null | configs/app.default.py | lanPN85/flask-template | 231699db7561a87a92777adfa1d90c8ad69bda19 | [
"MIT"
] | null | null | null | configs/app.default.py | lanPN85/flask-template | 231699db7561a87a92777adfa1d90c8ad69bda19 | [
"MIT"
] | null | null | null | from datetime import timedelta
# This will not affect gunicorn config
HOST = '0.0.0.0'
PORT = 5000
DEBUG = False
PROPAGATE_EXCEPTIONS = True
JWT_ACCESS_TOKEN_EXPIRES = timedelta(minutes=30)
JWT_REFRESH_TOKEN_EXPIRES = timedelta(days=15)
LOGCONFIG = {
'version': 1,
'disable_existing_loggers': False,
'fo... | 25.706667 | 66 | 0.48444 |
7951db9b0b54d09bcbf7622cc0d71249c576f240 | 543 | py | Python | src/discord/operations/abs.py | Colk-tech/discoplug | 76ae4a71d78d6709e8e393958f3f444cb501759c | [
"MIT"
] | null | null | null | src/discord/operations/abs.py | Colk-tech/discoplug | 76ae4a71d78d6709e8e393958f3f444cb501759c | [
"MIT"
] | 1 | 2022-03-24T08:30:10.000Z | 2022-03-24T09:15:11.000Z | src/discord/operations/abs.py | Colk-tech/discoplug | 76ae4a71d78d6709e8e393958f3f444cb501759c | [
"MIT"
] | null | null | null | from typing import Dict
from abc import ABCMeta, abstractmethod
from discord import Message
class AbstractOperation(metaclass=ABCMeta):
MY_INDEX: str = ""
IS_AUTHORIZATION_NEEDED: bool = False
@abstractmethod
def __init__(self, message: Message, context: Dict):
self.__message: Message = mess... | 23.608696 | 56 | 0.705341 |
7951dbd66d9142601fbddca9af139599d1468a21 | 4,044 | py | Python | test/Removed/SourceSignatures/Old/basic.py | Valkatraz/scons | 5e70c65f633dcecc035751c9f0c6f894088df8a0 | [
"MIT"
] | 1,403 | 2017-11-23T14:24:01.000Z | 2022-03-30T20:59:39.000Z | test/Removed/SourceSignatures/Old/basic.py | Valkatraz/scons | 5e70c65f633dcecc035751c9f0c6f894088df8a0 | [
"MIT"
] | 3,708 | 2017-11-27T13:47:12.000Z | 2022-03-29T17:21:17.000Z | test/Removed/SourceSignatures/Old/basic.py | Valkatraz/scons | 5e70c65f633dcecc035751c9f0c6f894088df8a0 | [
"MIT"
] | 281 | 2017-12-01T23:48:38.000Z | 2022-03-31T15:25:44.000Z | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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,
... | 30.636364 | 79 | 0.689664 |
7951dbef69fa032ffab349df72b6cd9c2246c57c | 12,192 | py | Python | tensorflow_graphics/geometry/transformation/tests/euler_test.py | ghosalsattam/graphics | 946aa03b5178d2fc557a81045b84df24af322afd | [
"Apache-2.0"
] | null | null | null | tensorflow_graphics/geometry/transformation/tests/euler_test.py | ghosalsattam/graphics | 946aa03b5178d2fc557a81045b84df24af322afd | [
"Apache-2.0"
] | null | null | null | tensorflow_graphics/geometry/transformation/tests/euler_test.py | ghosalsattam/graphics | 946aa03b5178d2fc557a81045b84df24af322afd | [
"Apache-2.0"
] | 1 | 2020-06-04T23:24:40.000Z | 2020-06-04T23:24:40.000Z | # Copyright 2020 The TensorFlow 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 41.469388 | 80 | 0.769275 |
7951dc50c257171cefd8de04e4939ea1006573c7 | 1,024 | py | Python | award_explore.py | diatomsRcool/NSF_awards | 2943629d68339f24f85e1badb8abf85ee8775839 | [
"MIT"
] | null | null | null | award_explore.py | diatomsRcool/NSF_awards | 2943629d68339f24f85e1badb8abf85ee8775839 | [
"MIT"
] | null | null | null | award_explore.py | diatomsRcool/NSF_awards | 2943629d68339f24f85e1badb8abf85ee8775839 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
data = []
f = range(1,75,1)
for n in f:
print(n)
in_file = open('/Users/annethessen/NSF_awards/award_data/' + str(n) + '.txt', 'r')
next(in_file)
for line in in_file:
line.strip('\n')
row = line.split('\t')
#print(row[0:24])
data.a... | 53.894737 | 430 | 0.664063 |
7951dd26439b3a60e35d81d369020f2a56685724 | 5,737 | py | Python | twitchbot/modloader.py | jostster/PythonTwitchBotFramework | 931fdac9226b0086b37a011fd7c0265580c87ef0 | [
"MIT"
] | null | null | null | twitchbot/modloader.py | jostster/PythonTwitchBotFramework | 931fdac9226b0086b37a011fd7c0265580c87ef0 | [
"MIT"
] | null | null | null | twitchbot/modloader.py | jostster/PythonTwitchBotFramework | 931fdac9226b0086b37a011fd7c0265580c87ef0 | [
"MIT"
] | null | null | null | import os
import traceback
from inspect import isclass
from typing import Dict
from .util import temp_syspath, get_py_files, get_file_name
from .channel import Channel
from .command import Command
from .config import cfg
from .enums import Event
from .message import Message
from .disabled_mods import is_mod_disabled
f... | 30.194737 | 103 | 0.626286 |
7951dd5f5116d68ccca7ba7459698db48cd15a77 | 357 | py | Python | brokenCalculator/BrokenCalc.py | evansMeja/Leetcode | dac2e00090afad47eb02b30e56848fbc0ea8b57f | [
"MIT"
] | null | null | null | brokenCalculator/BrokenCalc.py | evansMeja/Leetcode | dac2e00090afad47eb02b30e56848fbc0ea8b57f | [
"MIT"
] | null | null | null | brokenCalculator/BrokenCalc.py | evansMeja/Leetcode | dac2e00090afad47eb02b30e56848fbc0ea8b57f | [
"MIT"
] | null | null | null | class Solution:
def brokenCalc(self, X: 'int', Y: 'int') -> 'int':
if X>=Y:
return X-Y
else:
result = 0
while Y>X:
if Y%2==1:
result += 1
Y+=1
result += 1
Y//=2
res... | 23.8 | 54 | 0.319328 |
7951ddea308e0236295e35828a0c3f72b24ef4a3 | 637 | py | Python | app.py | LinggarM/Priority-Task-Selection-Using-Evolutionary-Programming | f0d5b6a127deddff8632cc8fbcfb3ddf3419f798 | [
"MIT"
] | null | null | null | app.py | LinggarM/Priority-Task-Selection-Using-Evolutionary-Programming | f0d5b6a127deddff8632cc8fbcfb3ddf3419f798 | [
"MIT"
] | null | null | null | app.py | LinggarM/Priority-Task-Selection-Using-Evolutionary-Programming | f0d5b6a127deddff8632cc8fbcfb3ddf3419f798 | [
"MIT"
] | null | null | null | from flask import Flask, request, render_template
import knapsack
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def index():
if request.method == 'POST':
jumlah_tugas = request.form['jumlah_tugas']
nama_tugas = request.form['nama_tugas']
skala_prioritas = request.form['skala_priorita... | 35.388889 | 132 | 0.720565 |
7951df96f7e3265e07d9f097bebe2245764edf5e | 2,261 | py | Python | parsl/tests/test_data/test_file_apps.py | daheise/parsl | 22fa8c75cdce782a0fa832692d8f19d7f57c25ab | [
"Apache-2.0"
] | null | null | null | parsl/tests/test_data/test_file_apps.py | daheise/parsl | 22fa8c75cdce782a0fa832692d8f19d7f57c25ab | [
"Apache-2.0"
] | null | null | null | parsl/tests/test_data/test_file_apps.py | daheise/parsl | 22fa8c75cdce782a0fa832692d8f19d7f57c25ab | [
"Apache-2.0"
] | null | null | null | import os
import pytest
import parsl
from parsl.app.app import App
from parsl.data_provider.files import File
from parsl.tests.configs.local_threads import config
@App('bash')
def cat(inputs=[], outputs=[], stdout=None, stderr=None):
infiles = ' '.join([i.filepath for i in inputs])
return """echo {i}
ca... | 27.573171 | 88 | 0.574967 |
7951e090988cbaf47c039d2a5b9194dce6ac9539 | 17,624 | py | Python | code/Managed Software Update/munki.py | zdw/munki | df2028a946c182f8ce39b11ec4dff49953281fb5 | [
"Apache-2.0"
] | 2 | 2015-02-28T11:01:44.000Z | 2017-01-29T14:54:42.000Z | code/Managed Software Update/munki.py | zdw/munki | df2028a946c182f8ce39b11ec4dff49953281fb5 | [
"Apache-2.0"
] | null | null | null | code/Managed Software Update/munki.py | zdw/munki | df2028a946c182f8ce39b11ec4dff49953281fb5 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
#
# munki.py
# Managed Software Update
#
# Created by Greg Neagle on 2/11/10.
# Copyright 2010-2011 Greg Neagle.
#
# 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
#
# ... | 33.065666 | 79 | 0.631241 |
7951e0b174f01128a0ca47a35e49aa73ea3a0317 | 15 | py | Python | projects/pyside6/test.py | on-nix/python-on-nix | d8a7fa21b76ac3b8a1a3fedb41e86352769b09ed | [
"Unlicense"
] | 25 | 2021-10-30T19:54:59.000Z | 2022-03-29T06:11:02.000Z | projects/pyside6/test.py | on-nix/python-on-nix | d8a7fa21b76ac3b8a1a3fedb41e86352769b09ed | [
"Unlicense"
] | 21 | 2021-10-19T01:09:38.000Z | 2022-03-24T16:08:53.000Z | projects/pyside6/test.py | on-nix/python | d8a7fa21b76ac3b8a1a3fedb41e86352769b09ed | [
"Unlicense"
] | 3 | 2022-01-25T20:25:13.000Z | 2022-03-08T02:58:50.000Z | import PySide6
| 7.5 | 14 | 0.866667 |
7951e21c5aad283fe69321c988c2fc46c6d778ee | 5,049 | py | Python | tests/unit/test_extensionregistry.py | temoctzin/radish | 1d904b9a7bf9eb5b263c86e3fc3a996956747ecc | [
"MIT"
] | null | null | null | tests/unit/test_extensionregistry.py | temoctzin/radish | 1d904b9a7bf9eb5b263c86e3fc3a996956747ecc | [
"MIT"
] | null | null | null | tests/unit/test_extensionregistry.py | temoctzin/radish | 1d904b9a7bf9eb5b263c86e3fc3a996956747ecc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
radish
~~~~~~
Behavior Driven Development tool for Python - the root from red to green
Copyright: MIT, Timo Furrer <tuxtimo@gmail.com>
"""
import pytest
from radish.extensionregistry import extension
import radish.exceptions as errors
def test_register_simple_extension... | 26.573684 | 96 | 0.673005 |
7951e2eab5140a66f76f6dc992f486b6f302f99d | 465 | py | Python | {{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/utils/models.py | anthonyalmarza/django-rest-sqlite-template | 2313d8b49fb11ad53f75cd8d09de4107287dca6c | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/utils/models.py | anthonyalmarza/django-rest-sqlite-template | 2313d8b49fb11ad53f75cd8d09de4107287dca6c | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/utils/models.py | anthonyalmarza/django-rest-sqlite-template | 2313d8b49fb11ad53f75cd8d09de4107287dca6c | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.translation import gettext_lazy as _
class TimeStampedModel(models.Model):
"""
TimeStampedModel is the base abstract class to be used for all models with
this project.
"""
created = models.DateTimeField(_("Created"), auto_now_add=True)
modified =... | 24.473684 | 78 | 0.692473 |
7951e2eee3ff931cb13f2b9c78fa3f359f42163e | 4,111 | py | Python | NYRegentsPrep/settings.py | WalterSchaertl/NYRP | bd9554fba80ed11f9c8efbc6c19b5a5cb987e3b6 | [
"MIT"
] | 1 | 2018-09-27T01:44:48.000Z | 2018-09-27T01:44:48.000Z | NYRegentsPrep/settings.py | WalterSchaertl/NYRP | bd9554fba80ed11f9c8efbc6c19b5a5cb987e3b6 | [
"MIT"
] | 5 | 2021-04-08T18:23:14.000Z | 2021-09-22T17:37:53.000Z | NYRegentsPrep/settings.py | WalterSchaertl/NYRP | bd9554fba80ed11f9c8efbc6c19b5a5cb987e3b6 | [
"MIT"
] | null | null | null | """
Django settings for NYRegentsPrep project.
Generated by 'django-admin startproject' using Django 1.11.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/... | 27.590604 | 103 | 0.722209 |
7951e428732decda63bbe6550801ebb268fa5dcc | 969 | py | Python | tests/regressions.py | Coddo-Python/spotify-downloader | c3016df81caacc3c7e1969077caecaacf6d008f1 | [
"MIT"
] | null | null | null | tests/regressions.py | Coddo-Python/spotify-downloader | c3016df81caacc3c7e1969077caecaacf6d008f1 | [
"MIT"
] | null | null | null | tests/regressions.py | Coddo-Python/spotify-downloader | c3016df81caacc3c7e1969077caecaacf6d008f1 | [
"MIT"
] | null | null | null | import sys
from spotdl.__main__ import console_entry_point
from spotdl.download import ffmpeg
SONGS = {
"https://open.spotify.com/track/6CN3e26iQSj1N5lomh0mfO": "Eminem - Like Toy Soldiers.mp3",
"https://open.spotify.com/track/3bNv3VuUOKgrf5hu3YcuRo": "Adele - Someone Like You.mp3",
"https://open.spotify.... | 32.3 | 114 | 0.680083 |
7951e67228bca5f588e84a15608c00c429ed8d47 | 1,831 | py | Python | tests/asm_store/test_asm_sta.py | CyberZHG/mos-6502-restricted-assembler | a492a82dc9cc30225264fe777180aad5d0b4201a | [
"MIT"
] | null | null | null | tests/asm_store/test_asm_sta.py | CyberZHG/mos-6502-restricted-assembler | a492a82dc9cc30225264fe777180aad5d0b4201a | [
"MIT"
] | null | null | null | tests/asm_store/test_asm_sta.py | CyberZHG/mos-6502-restricted-assembler | a492a82dc9cc30225264fe777180aad5d0b4201a | [
"MIT"
] | null | null | null | from unittest import TestCase
from asm_6502 import Assembler, AssembleError
class TestAssembleSTA(TestCase):
def setUp(self) -> None:
self.assembler = Assembler()
def test_sta_error_immediate(self):
code = "STA #$00"
with self.assertRaises(AssembleError) as e:
self.assem... | 30.516667 | 98 | 0.586019 |
7951e763760589cefbf1dbcc9c53a57a6944ced7 | 4,846 | py | Python | sample/astfile.py | RiS3-Lab/FICS- | 82c8abef52ca943946b7e82a16998cf67f1d2049 | [
"Apache-2.0"
] | 37 | 2020-12-04T09:15:50.000Z | 2022-03-28T13:33:29.000Z | sample/astfile.py | RiS3-Lab/FICS- | 82c8abef52ca943946b7e82a16998cf67f1d2049 | [
"Apache-2.0"
] | 7 | 2020-12-03T08:14:31.000Z | 2021-11-24T14:14:03.000Z | sample/astfile.py | RiS3-Lab/FICS- | 82c8abef52ca943946b7e82a16998cf67f1d2049 | [
"Apache-2.0"
] | 19 | 2020-12-04T08:43:31.000Z | 2022-03-28T13:33:27.000Z | from collections import Counter
import networkx as nx
from learning.similarity import counter_cosine_similarity
class ASTFile:
def __init__(self, ast_file, arguments, ast=None, feature_type=''):
self.ast_file = ast_file
self.arguments = arguments
self.ast = ast
if self.ast is Non... | 42.884956 | 120 | 0.5487 |
7951e819e6bff90875989c969eb6d84671758e24 | 1,318 | py | Python | var/spack/repos/builtin/packages/heppdt/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/heppdt/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/heppdt/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Heppdt(AutotoolsPackage):
"""The HepPID library contains translation methods for particle... | 50.692308 | 113 | 0.786039 |
7951e827326f5622a1e3e40e5ec7eff2321153be | 526,474 | py | Python | sympy/integrals/rubi/rubi_tests/tests/test_miscellaneous_algebra.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 1 | 2022-01-31T16:02:46.000Z | 2022-01-31T16:02:46.000Z | sympy/integrals/rubi/rubi_tests/tests/test_miscellaneous_algebra.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 3 | 2022-02-04T14:45:16.000Z | 2022-02-04T14:45:45.000Z | sympy/integrals/rubi/rubi_tests/tests/test_miscellaneous_algebra.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 1 | 2022-02-04T13:50:29.000Z | 2022-02-04T13:50:29.000Z | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.rubimain import rubi_integrate
from sympy.functions import log, sqrt,... | 330.077743 | 3,421 | 0.471252 |
7951e8642b30faa0308ce92775099bd2849ec534 | 12,604 | py | Python | aws_logging_handlers/S3/__init__.py | pagliaccl/aws_logging_handlers | 930966a61bfa2ba4b856fc6d45e88bff6d56e6db | [
"MIT"
] | null | null | null | aws_logging_handlers/S3/__init__.py | pagliaccl/aws_logging_handlers | 930966a61bfa2ba4b856fc6d45e88bff6d56e6db | [
"MIT"
] | null | null | null | aws_logging_handlers/S3/__init__.py | pagliaccl/aws_logging_handlers | 930966a61bfa2ba4b856fc6d45e88bff6d56e6db | [
"MIT"
] | null | null | null | """
S3 Binding Module with logging handler and stream object
"""
__author__ = 'Omri Eival'
import atexit
import signal
import threading
import queue
import gzip
import codecs
from logging import StreamHandler
from io import BufferedIOBase, BytesIO
from boto3 import Session
from datetime import datetime
from aws_logg... | 35.011111 | 133 | 0.634481 |
7951e8ab2206bb904e00683a4ed5a2aae4d8efd2 | 25,611 | py | Python | usaspending_api/awards/v2/data_layer/orm.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | 1 | 2022-01-28T16:08:04.000Z | 2022-01-28T16:08:04.000Z | usaspending_api/awards/v2/data_layer/orm.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | null | null | null | usaspending_api/awards/v2/data_layer/orm.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | null | null | null | import copy
import logging
from collections import OrderedDict
from decimal import Decimal
from django.db.models import Sum, F, Subquery
from typing import Optional
from usaspending_api.awards.models import (
Award,
FinancialAccountsByAwards,
ParentAward,
TransactionFABS,
TransactionFPDS,
Tran... | 41.848039 | 117 | 0.660576 |
7951e94a08edcc5f251a0b90f2834d9a7c5c6ad6 | 80 | py | Python | bin/hello_world.py | Cray-HPE/metal-net-scripts | 86755c78b5a8d6fb28a96ae78b6b0b9a1dccc546 | [
"MIT"
] | null | null | null | bin/hello_world.py | Cray-HPE/metal-net-scripts | 86755c78b5a8d6fb28a96ae78b6b0b9a1dccc546 | [
"MIT"
] | null | null | null | bin/hello_world.py | Cray-HPE/metal-net-scripts | 86755c78b5a8d6fb28a96ae78b6b0b9a1dccc546 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
foo = 'world'
print(f'Hello, {foo.capitalize()}!'.rstrip())
| 16 | 45 | 0.6375 |
7951e9638f0ba5c0aa4410cf8d136cdb544c5918 | 7,029 | py | Python | eth2/beacon/types/blocks.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | null | null | null | eth2/beacon/types/blocks.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | 2 | 2019-04-30T06:22:12.000Z | 2019-06-14T04:27:18.000Z | eth2/beacon/types/blocks.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Sequence
from eth._utils.datatypes import Configurable
from eth.constants import ZERO_HASH32
from eth_typing import BLSSignature, Hash32
from eth_utils import humanize_hash
import ssz
from ssz.sedes import List, bytes32, bytes96, uint64
from eth2.b... | 31.520179 | 75 | 0.62797 |
7951ea66e81e254b1f8b2f8cd28ed5d4576c3005 | 1,009 | py | Python | ca_nb_moncton/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 19 | 2015-05-26T03:18:50.000Z | 2022-01-31T03:27:41.000Z | ca_nb_moncton/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 119 | 2015-01-09T06:09:35.000Z | 2022-01-20T23:05:05.000Z | ca_nb_moncton/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 17 | 2015-11-23T05:00:10.000Z | 2021-09-15T16:03:33.000Z | from utils import CanadianJurisdiction
from pupa.scrape import Organization
class Moncton(CanadianJurisdiction):
classification = 'legislature'
division_id = 'ocd-division/country:ca/csd:1307022'
division_name = 'Moncton'
name = 'Moncton City Council'
url = 'http://www.moncton.ca'
def get_org... | 43.869565 | 180 | 0.702676 |
7951eb3ce7992dd3eaa0c1bffeb23481076b2430 | 2,589 | py | Python | process_threading/mutil_process.py | wanghuafeng/auth_login_tools | b8b8c87d8d9b92c29c1eca6625cf1040d83ecdd0 | [
"MIT"
] | 3 | 2017-08-11T20:59:00.000Z | 2017-10-04T01:23:24.000Z | process_threading/mutil_process.py | wanghuafeng/auth_login_tools | b8b8c87d8d9b92c29c1eca6625cf1040d83ecdd0 | [
"MIT"
] | null | null | null | process_threading/mutil_process.py | wanghuafeng/auth_login_tools | b8b8c87d8d9b92c29c1eca6625cf1040d83ecdd0 | [
"MIT"
] | 1 | 2018-07-26T02:49:41.000Z | 2018-07-26T02:49:41.000Z | # coding:utf-8
"""
多线程阻塞与非阻塞实现
网络请求时,用于断开请求端连接,后续逻辑继续执行
"""
import threading
import time
def thread_tst():
def gen_thread():
#方法一:将要执行的方法作为参数传给Thread的构造方法
def action(arg):
time.sleep(5)
print 'the arg is:%s\r' %arg
for i in xrange(4):
t =threading.Thread(t... | 26.96875 | 101 | 0.585168 |
7951ec9714c4128a0e7f677555deda4bd96a7b25 | 13,006 | py | Python | wwyfcs/trainer/train_language_model.py | shc558/wwyfcs | 05ca6c94f59f7317e4e597d3df18f549dcadf7c1 | [
"MIT"
] | 1 | 2021-03-24T18:00:03.000Z | 2021-03-24T18:00:03.000Z | wwyfcs/trainer/train_language_model.py | shc558/wwyfcs | 05ca6c94f59f7317e4e597d3df18f549dcadf7c1 | [
"MIT"
] | null | null | null | wwyfcs/trainer/train_language_model.py | shc558/wwyfcs | 05ca6c94f59f7317e4e597d3df18f549dcadf7c1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Fine-tuning DialoGPT using language modeling based on
Huggingface transformers run_language_modeling.py &
tutorial from Nathan Cooper
"""
import pandas as pd
import logging
import math
import os
import pickle
from dataclasses import dataclass, field
from typing import Optional, Dict, List, T... | 36.027701 | 136 | 0.658312 |
7951ecdaee268109ad913547f4a389308b5b2c9f | 3,662 | py | Python | configs/tuturial/sort-fpga.py | zslwyuan/gem5-HDL_v1.0 | 7f21d9b368b33c0f1426bc1e79c61574a49f169f | [
"BSD-3-Clause"
] | 1 | 2019-06-07T19:42:28.000Z | 2019-06-07T19:42:28.000Z | configs/tuturial/sort-fpga.py | zslwyuan/gem5-HDL_v1.0 | 7f21d9b368b33c0f1426bc1e79c61574a49f169f | [
"BSD-3-Clause"
] | null | null | null | configs/tuturial/sort-fpga.py | zslwyuan/gem5-HDL_v1.0 | 7f21d9b368b33c0f1426bc1e79c61574a49f169f | [
"BSD-3-Clause"
] | null | null | null | import optparse
import sys
import os
import m5
from m5.defines import buildEnv
from m5.objects import *
from m5.util import addToPath, fatal
addToPath('../')
from ruby import Ruby
from common import Options
from common import Simulation
from common import CacheConfig
from common import CpuConfig
from common import ... | 33.290909 | 79 | 0.698798 |
7951edfee46ec52bc6806dd791612c5532973657 | 9,706 | py | Python | app/parse_html.py | jjdelvalle/gradcafe_analysis | a5d72bd7e60d014d5ed1111ea2a32cb503f89c55 | [
"MIT"
] | 3 | 2021-01-21T16:23:00.000Z | 2021-01-27T16:31:04.000Z | app/parse_html.py | mehmetsuci/gradcafe_analysis | a5d72bd7e60d014d5ed1111ea2a32cb503f89c55 | [
"MIT"
] | null | null | null | app/parse_html.py | mehmetsuci/gradcafe_analysis | a5d72bd7e60d014d5ed1111ea2a32cb503f89c55 | [
"MIT"
] | 3 | 2021-01-15T05:16:24.000Z | 2022-02-24T19:55:33.000Z | from bs4 import BeautifulSoup
import datetime, time
from IPython.core.debugger import Pdb
import sys, re
import os.path
from collections import Counter
import seaborn as sns
import matplotlib.pyplot as plt
import pandas
PROGS = [
('Computer Engineering', 'Electrical and Computer Engineering'),
('Computer Engi... | 38.515873 | 284 | 0.523697 |
7951ee0d331b1cdf4c8189896fdbd335f290e621 | 1,614 | py | Python | mayan/apps/history/api.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | 3 | 2020-02-03T11:58:51.000Z | 2020-10-20T03:52:21.000Z | mayan/apps/history/api.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | null | null | null | mayan/apps/history/api.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | 2 | 2020-10-24T11:10:06.000Z | 2021-03-03T20:05:38.000Z | from __future__ import absolute_import
import json
import pickle
from django.db import models
from django.core import serializers
from .models import HistoryType, History
from .runtime_data import history_types_dict
def register_history_type(history_type_dict):
namespace = history_type_dict['namespace']
na... | 34.340426 | 135 | 0.675341 |
7951ee4307308904bbcaf3a94ef888dcd671e1fa | 2,871 | py | Python | gracebot/detector.py | Roald87/GraceDB | 5c7e6cc93a33b00c1c30ce040ef26326c003630d | [
"Apache-2.0"
] | 7 | 2019-05-16T20:08:11.000Z | 2021-10-07T03:15:00.000Z | gracebot/detector.py | Roald87/GraceDB | 5c7e6cc93a33b00c1c30ce040ef26326c003630d | [
"Apache-2.0"
] | 24 | 2019-07-07T06:14:12.000Z | 2021-09-21T18:50:50.000Z | gracebot/detector.py | Roald87/GraceDB | 5c7e6cc93a33b00c1c30ce040ef26326c003630d | [
"Apache-2.0"
] | null | null | null | import logging
import requests
from datetime import timedelta, datetime
from html.parser import HTMLParser
class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.data = []
def handle_data(self, data):
if data[:2] != "\n":
self.data.append(data)... | 28.71 | 87 | 0.58342 |
7951ee4d316535dc030a79d497ac8b0f23df0a6a | 5,753 | py | Python | mother_agents.py | dimelab-public/MTConnect-Testbed-Simulator-Public | 4b42052953d042418ddecbd5ed8608ccbdbaa189 | [
"MIT"
] | null | null | null | mother_agents.py | dimelab-public/MTConnect-Testbed-Simulator-Public | 4b42052953d042418ddecbd5ed8608ccbdbaa189 | [
"MIT"
] | null | null | null | mother_agents.py | dimelab-public/MTConnect-Testbed-Simulator-Public | 4b42052953d042418ddecbd5ed8608ccbdbaa189 | [
"MIT"
] | 1 | 2019-12-09T14:52:18.000Z | 2019-12-09T14:52:18.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 17 09:19:19 2019
@author: smehdi@ncsu.edu
"""
import pandas as pd
master = pd.read_csv('dbs\master.csv')
ports =list(master['agentPorts'])
machines =list(master['machines'])
for port in ports:
PO=str(port)
i=(ports.index(port))
path='temp_folder/Org '+str(i... | 29.654639 | 129 | 0.582479 |
7951ee7aedc728446bb9f8af97f77ef886f5dd56 | 814 | py | Python | setup.py | Nishk23/Flappy-bird | 31991f93f9c7b6de465253ef837c4aca022f80ff | [
"MIT"
] | null | null | null | setup.py | Nishk23/Flappy-bird | 31991f93f9c7b6de465253ef837c4aca022f80ff | [
"MIT"
] | null | null | null | setup.py | Nishk23/Flappy-bird | 31991f93f9c7b6de465253ef837c4aca022f80ff | [
"MIT"
] | null | null | null | import os
import sys
from distutils.core import setup
import py2exe
origIsSystemDLL = py2exe.build_exe.isSystemDLL
def isSystemDLL(pathname):
dlls = ("libfreetype-6.dll", "libogg-0.dll", "sdl_ttf.dll")
if os.path.basename(pathname).lower() in dlls:
return 0
return origIsSystemDLL(pathna... | 22 | 64 | 0.563882 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.