hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
731a5b94603a881cbdad31e6b399fc2db646e99b | 4,162 | py | Python | elegy/optimizer_test.py | sooheon/elegy | cad6f832cac1a34684c4f4f2c4a386cbfa817623 | [
"Apache-2.0"
] | null | null | null | elegy/optimizer_test.py | sooheon/elegy | cad6f832cac1a34684c4f4f2c4a386cbfa817623 | [
"Apache-2.0"
] | null | null | null | elegy/optimizer_test.py | sooheon/elegy | cad6f832cac1a34684c4f4f2c4a386cbfa817623 | [
"Apache-2.0"
] | null | null | null | import jax
import elegy
import unittest
import numpy as np
import jax.numpy as jnp
import optax
| 30.602941 | 88 | 0.606439 |
731a5f37b2d3af866a1a81886741f91cddda5c09 | 6,929 | py | Python | scripts/version.py | nfnty/docker | cdc68f57fdb6bd472b78d6ef6cbc77f430bd5089 | [
"MIT"
] | 54 | 2015-03-08T23:45:21.000Z | 2021-01-11T12:35:07.000Z | scripts/version.py | nfnty/docker | cdc68f57fdb6bd472b78d6ef6cbc77f430bd5089 | [
"MIT"
] | 4 | 2015-04-10T08:58:29.000Z | 2015-11-08T08:34:55.000Z | scripts/version.py | nfnty/docker | cdc68f57fdb6bd472b78d6ef6cbc77f430bd5089 | [
"MIT"
] | 16 | 2015-04-08T23:54:07.000Z | 2020-04-08T22:03:12.000Z | #!/usr/bin/python3
''' Check image package versions '''
import argparse
import distutils.version
import re
import subprocess
from typing import Any, Dict, Sequence, Tuple
import lxml.html # type: ignore
import requests
from termcolor import cprint
from utils.image import IMAGES, path_dockerfile
TIMEOUT = (31, 181... | 35.533333 | 97 | 0.593159 |
731bcc2e7423a542f77047dce4151ada325579ea | 2,441 | py | Python | nazrul.py | rakesh0703/Content_Parser_of_works_of_kazi_nazrul | c3e2060effe7b7576ee5b034a9aba3df648d6358 | [
"Apache-2.0"
] | null | null | null | nazrul.py | rakesh0703/Content_Parser_of_works_of_kazi_nazrul | c3e2060effe7b7576ee5b034a9aba3df648d6358 | [
"Apache-2.0"
] | null | null | null | nazrul.py | rakesh0703/Content_Parser_of_works_of_kazi_nazrul | c3e2060effe7b7576ee5b034a9aba3df648d6358 | [
"Apache-2.0"
] | null | null | null | # -- coding: UTF-8 --
"""
Spyder Editor
This is a temporary script file.
"""
from bs4 import BeautifulSoup
import sys
import os
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
import urllib.parse,urllib.request,urllib.error
base="https://nazrul-rachanabali.nltr.org/"
page=urllib.request.... | 29.059524 | 87 | 0.530111 |
731c7020273e619e347b608e87b47d20ed636f00 | 3,515 | py | Python | core/handler.py | mh4x0f/kinproxy | 72dd24eb5ff5286c2bb57524124934a54614f9ec | [
"MIT"
] | 5 | 2018-01-20T15:33:14.000Z | 2021-06-29T04:26:44.000Z | core/handler.py | mh4x0f/kinproxy | 72dd24eb5ff5286c2bb57524124934a54614f9ec | [
"MIT"
] | null | null | null | core/handler.py | mh4x0f/kinproxy | 72dd24eb5ff5286c2bb57524124934a54614f9ec | [
"MIT"
] | 1 | 2019-03-08T18:46:05.000Z | 2019-03-08T18:46:05.000Z | try:
from mitmproxy import controller, proxy
from mitmproxy.proxy.server import ProxyServer
except:
from libmproxy import controller, proxy
from libmproxy.proxy.server import ProxyServer
from plugins import *
from threading import Thread
from core.config.settings import SettingsINI
# MIT License
#
# Co... | 33.47619 | 80 | 0.657183 |
731d1cfc50fdedf83932598a710d90798e979c30 | 4,940 | py | Python | mapping/sandbox/graphslam/graphslam_pipeline.py | sameeptandon/sail-car-log | 0ee3d598bb09d389bcbd2ebf73cd4b2411e796be | [
"BSD-2-Clause"
] | 1 | 2021-02-24T03:11:13.000Z | 2021-02-24T03:11:13.000Z | mapping/sandbox/graphslam/graphslam_pipeline.py | sameeptandon/sail-car-log | 0ee3d598bb09d389bcbd2ebf73cd4b2411e796be | [
"BSD-2-Clause"
] | null | null | null | mapping/sandbox/graphslam/graphslam_pipeline.py | sameeptandon/sail-car-log | 0ee3d598bb09d389bcbd2ebf73cd4b2411e796be | [
"BSD-2-Clause"
] | 3 | 2015-03-18T14:36:04.000Z | 2018-07-04T02:57:24.000Z | import os
from os.path import join as pjoin
from subprocess import check_call
from ruffus import files, follows, pipeline_run, pipeline_printout, pipeline_printout_graph, jobs_limit
from graphslam_config import GRAPHSLAM_PATH,\
GRAPHSLAM_MATCH_DIR, GRAPHSLAM_OPT_POS_DIR, GRAPHSLAM_ALIGN_DIR,\
MATCHES_FI... | 37.424242 | 185 | 0.654049 |
731e4596b4a14f1da0dc95574358cfa12ef495f2 | 319 | py | Python | sandbox/wavelets.py | EtalumaSupport/LumaViewPro | ab9678c04fc561e6fce8b774c5d87cc91d6f3e07 | [
"MIT"
] | null | null | null | sandbox/wavelets.py | EtalumaSupport/LumaViewPro | ab9678c04fc561e6fce8b774c5d87cc91d6f3e07 | [
"MIT"
] | 59 | 2021-03-26T19:22:59.000Z | 2021-12-04T00:42:12.000Z | sandbox/wavelets.py | EtalumaSupport/LumaViewPro | ab9678c04fc561e6fce8b774c5d87cc91d6f3e07 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from astropy.convolution import RickerWavelet2DKernel
ricker_2d_kernel = RickerWavelet2DKernel(5)
plt.imshow(ricker_2d_kernel, interpolation='none', origin='lower')
plt.xlabel('x [pixels]')
plt.ylabel('y [pixels]')
plt.colorbar()
plt.show()
print(ricker_2d_kernel)
| 22.785714 | 66 | 0.793103 |
731e657c5103db0d7c66fbe61179c7894a85d4d3 | 5,267 | py | Python | tests/test_errors.py | raymundl/firepit | 5b913806eef646c02bd55e301b19baa052aa29d5 | [
"Apache-2.0"
] | null | null | null | tests/test_errors.py | raymundl/firepit | 5b913806eef646c02bd55e301b19baa052aa29d5 | [
"Apache-2.0"
] | null | null | null | tests/test_errors.py | raymundl/firepit | 5b913806eef646c02bd55e301b19baa052aa29d5 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
from firepit.exceptions import IncompatibleType
from firepit.exceptions import InvalidAttr
from firepit.exceptions import InvalidStixPath
from firepit.exceptions import InvalidViewname
from firepit.exceptions import StixPatternError
from .helpers import tmp_storage
def test_empty_res... | 35.587838 | 101 | 0.652933 |
731f66af557f8e0f3fe1a093bf5c18d9478212d8 | 11,798 | py | Python | script/run_scribus.py | csneofreak/public-domain-season-songs | d6e559e7cfe6e3a7ab784855a096d02ae8c656cd | [
"Unlicense"
] | 14 | 2015-12-18T10:52:15.000Z | 2021-01-11T14:43:47.000Z | script/run_scribus.py | csneofreak/public-domain-season-songs | d6e559e7cfe6e3a7ab784855a096d02ae8c656cd | [
"Unlicense"
] | 1 | 2015-12-05T19:30:01.000Z | 2015-12-05T19:30:01.000Z | script/run_scribus.py | csneofreak/public-domain-season-songs | d6e559e7cfe6e3a7ab784855a096d02ae8c656cd | [
"Unlicense"
] | 9 | 2015-03-11T04:09:23.000Z | 2021-12-18T21:44:47.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import json
import os
import math
import scribus
import simplebin
import inspect
from collections import defaultdict
PWD = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
DATA_FILE = pwd("data.json")
CACHE_FILE = pwd("cache.json")
MANUEL... | 37.693291 | 152 | 0.66418 |
73204039a36f632a872aa19aeb8f09ee3f95315d | 424 | py | Python | 12-transformar_metro.py | tainagirotto/exercicios-py | 39107c05a0a8e5230cd48876ad8e1ad6f0a2ff59 | [
"MIT"
] | null | null | null | 12-transformar_metro.py | tainagirotto/exercicios-py | 39107c05a0a8e5230cd48876ad8e1ad6f0a2ff59 | [
"MIT"
] | null | null | null | 12-transformar_metro.py | tainagirotto/exercicios-py | 39107c05a0a8e5230cd48876ad8e1ad6f0a2ff59 | [
"MIT"
] | null | null | null | # Ler um nmero em metros e mostrar seu valor em cm e mm:
m = float(input('Digite o valor em metros: '))
dm = m * 10
cm = m * 100
mm = m * 1000
km = m/1000
hm = m/100
dam = m/10
print('O valor em cm {}' .format(cm))
print('O valor em milmetros {}' .format(mm))
print('O valor em dm {}' .format(dm))
print('O valor em... | 24.941176 | 57 | 0.613208 |
73212f2cfd8e6dccfeaf70d354cab83a3bcc2ae2 | 3,059 | py | Python | src/urls.py | chunky2808/Hire-Me | 7a43fb2f555a5f46e285d24c18457c2ce1c0d225 | [
"MIT"
] | null | null | null | src/urls.py | chunky2808/Hire-Me | 7a43fb2f555a5f46e285d24c18457c2ce1c0d225 | [
"MIT"
] | 6 | 2020-02-12T00:41:15.000Z | 2022-03-11T23:20:37.000Z | src/urls.py | chunky2808/Hire-Me | 7a43fb2f555a5f46e285d24c18457c2ce1c0d225 | [
"MIT"
] | null | null | null | """src URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Clas... | 50.147541 | 119 | 0.676038 |
7322d738208c1e92a29dc1677393b7f139a60b9b | 1,546 | py | Python | re_compare/re_compare.py | gchase/re-compare | c717094053fd5938ea7f0a46dcfec75bc077cb7e | [
"MIT"
] | null | null | null | re_compare/re_compare.py | gchase/re-compare | c717094053fd5938ea7f0a46dcfec75bc077cb7e | [
"MIT"
] | null | null | null | re_compare/re_compare.py | gchase/re-compare | c717094053fd5938ea7f0a46dcfec75bc077cb7e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import logging
import argparse
import traceback
import os
import sys
from analysis import Analysis
from collector import Collector
from config import DEBUG, DEFAULT_LOG_FILE_DIR
if __name__ == '__main__':
main()
| 24.539683 | 82 | 0.641656 |
7323e7284674358cab716226cc5bccd1b52ec055 | 1,216 | py | Python | venv/Lib/site-packages/nipype/conftest.py | richung99/digitizePlots | 6b408c820660a415a289726e3223e8f558d3e18b | [
"MIT"
] | 585 | 2015-01-12T16:06:47.000Z | 2022-03-26T14:51:08.000Z | nipype/conftest.py | tamires-consulting/nipype | b7879d75a63b6500b2e7d2c3eba5aa7670339274 | [
"Apache-2.0"
] | 2,329 | 2015-01-01T09:56:41.000Z | 2022-03-30T14:24:49.000Z | nipype/conftest.py | tamires-consulting/nipype | b7879d75a63b6500b2e7d2c3eba5aa7670339274 | [
"Apache-2.0"
] | 487 | 2015-01-20T01:04:52.000Z | 2022-03-21T21:22:47.000Z | import os
import shutil
from tempfile import mkdtemp
import pytest
import numpy
import py.path as pp
NIPYPE_DATADIR = os.path.realpath(
os.path.join(os.path.dirname(__file__), "testing/data")
)
temp_folder = mkdtemp()
data_dir = os.path.join(temp_folder, "data")
shutil.copytree(NIPYPE_DATADIR, data_dir)
def py... | 26.434783 | 76 | 0.709704 |
732764ebd0702a98bf1fa40e238672b9d8162849 | 397 | py | Python | tests/test_modules/test_ADPandABlocks/test_adpandablocks_blocks.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_ADPandABlocks/test_adpandablocks_blocks.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_ADPandABlocks/test_adpandablocks_blocks.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | from mock import Mock
from malcolm.testutil import ChildTestCase
from malcolm.modules.ADPandABlocks.blocks import pandablocks_runnable_block
| 33.083333 | 78 | 0.7733 |
73276ed229a6cddfa545672ed9e4e28191eeb79e | 2,939 | py | Python | pymbolic/mapper/coefficient.py | sv2518/pymbolic | 42687a410b1c355beec510b91c18f97e5137795b | [
"MIT"
] | null | null | null | pymbolic/mapper/coefficient.py | sv2518/pymbolic | 42687a410b1c355beec510b91c18f97e5137795b | [
"MIT"
] | null | null | null | pymbolic/mapper/coefficient.py | sv2518/pymbolic | 42687a410b1c355beec510b91c18f97e5137795b | [
"MIT"
] | null | null | null | __copyright__ = "Copyright (C) 2013 Andreas Kloeckner"
__license__ = """
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, ... | 35.841463 | 77 | 0.639673 |
7328644eaa6b2ec01fefc42231719421b2897b5b | 1,958 | py | Python | day_06/balancer.py | anglerud/advent_of_code_2017 | eff27d43cd9eb7c60271887c80cb88f1ae50c48d | [
"MIT"
] | 3 | 2017-12-06T21:23:19.000Z | 2020-04-12T09:49:53.000Z | day_06/balancer.py | anglerud/advent_of_code_2017 | eff27d43cd9eb7c60271887c80cb88f1ae50c48d | [
"MIT"
] | null | null | null | day_06/balancer.py | anglerud/advent_of_code_2017 | eff27d43cd9eb7c60271887c80cb88f1ae50c48d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
""" """
import typing as t
import attr
import click
def detect_loop(memory: Memory) -> int:
"""Find how many steps until we detect a loop."""
arrangements_seen = set()
balancer_rounds = 0
while memory not in arrangements_seen:
arrangements_seen.add(memo... | 23.035294 | 76 | 0.62666 |
7329f5fd535980ef38334fa719dd3596b7005058 | 176 | py | Python | python-while/exercise4.py | crobert7/Py-Basics | c1d1a1441de6cbee409c59ddda2b11bc7ee16df1 | [
"MIT"
] | null | null | null | python-while/exercise4.py | crobert7/Py-Basics | c1d1a1441de6cbee409c59ddda2b11bc7ee16df1 | [
"MIT"
] | null | null | null | python-while/exercise4.py | crobert7/Py-Basics | c1d1a1441de6cbee409c59ddda2b11bc7ee16df1 | [
"MIT"
] | null | null | null | word = input('Type a word: ')
while word != 'chupacabra':
word = input('Type a word: ')
if word == 'chupacabra':
print('You are out of the loop')
break | 25.142857 | 40 | 0.5625 |
732ac32a2f056f0d1b4317192e07425ea49f8e2a | 1,268 | bzl | Python | pw_build/selects.bzl | mspang/pigweed | 89ff5f98f38b1ff7a1ff0633c590479e9b592a14 | [
"Apache-2.0"
] | null | null | null | pw_build/selects.bzl | mspang/pigweed | 89ff5f98f38b1ff7a1ff0633c590479e9b592a14 | [
"Apache-2.0"
] | 1 | 2021-06-18T13:54:41.000Z | 2021-06-18T13:54:41.000Z | pw_build/selects.bzl | mspang/pigweed | 89ff5f98f38b1ff7a1ff0633c590479e9b592a14 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Pigweed 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 in ... | 39.625 | 79 | 0.729495 |
732b698a8ba47881b21329d7619d19e7979a1509 | 1,433 | py | Python | subscriptions/models.py | emil-magnusson/py-on-api | 50967ea9d6a189c2c1cb75bd3e2b8ab817077634 | [
"MIT"
] | null | null | null | subscriptions/models.py | emil-magnusson/py-on-api | 50967ea9d6a189c2c1cb75bd3e2b8ab817077634 | [
"MIT"
] | 4 | 2021-03-30T14:10:30.000Z | 2021-09-22T19:29:56.000Z | subscriptions/models.py | emil-magnusson/py-on-api | 50967ea9d6a189c2c1cb75bd3e2b8ab817077634 | [
"MIT"
] | null | null | null | # subscriptions/models.py
import uuid
from django.db import models
from accesses.models import Accesses, Services
| 37.710526 | 105 | 0.752966 |
732bbfe89e64414c6afc65b3cfb58bb41674d875 | 2,848 | py | Python | leboncrevard/job.py | mclbn/leboncrevard | ee1b2a445eeda8f8561b5c62289b994dff38cfa9 | [
"ISC"
] | 5 | 2017-03-14T00:28:13.000Z | 2019-02-06T15:38:21.000Z | leboncrevard/job.py | mclbn/leboncrevard | ee1b2a445eeda8f8561b5c62289b994dff38cfa9 | [
"ISC"
] | null | null | null | leboncrevard/job.py | mclbn/leboncrevard | ee1b2a445eeda8f8561b5c62289b994dff38cfa9 | [
"ISC"
] | 5 | 2017-02-25T07:31:26.000Z | 2019-02-06T15:38:27.000Z | import smtplib
import time
from email.mime.text import MIMEText
from leboncrevard import scrapper, config
| 33.904762 | 81 | 0.458567 |
732c359d55e1699fb9b02c52c8e5453f0946a5bf | 13,825 | py | Python | tsl/data/datamodule/splitters.py | TorchSpatiotemporal/tsl | da13493b0cf83826bf41fe78a67e8d4ce1d7a8a0 | [
"MIT"
] | 4 | 2022-03-21T09:16:33.000Z | 2022-03-30T12:24:30.000Z | tsl/data/datamodule/splitters.py | TorchSpatiotemporal/tsl | da13493b0cf83826bf41fe78a67e8d4ce1d7a8a0 | [
"MIT"
] | null | null | null | tsl/data/datamodule/splitters.py | TorchSpatiotemporal/tsl | da13493b0cf83826bf41fe78a67e8d4ce1d7a8a0 | [
"MIT"
] | null | null | null | import functools
from copy import deepcopy
from datetime import datetime
from typing import Mapping, Callable, Union, Tuple, Optional
import numpy as np
from tsl.utils.python_utils import ensure_list
from ..spatiotemporal_dataset import SpatioTemporalDataset
from ..utils import SynchMode
__all__ = [
'Splitter',
... | 34.051724 | 115 | 0.650922 |
732d71e2f7609d24712a7e6d1541ad6047bd54bf | 3,483 | py | Python | demo.py | bringBackm/SSD | 6cbc9018fd7365d7c65cf6d4da90c14cced5e542 | [
"MIT"
] | null | null | null | demo.py | bringBackm/SSD | 6cbc9018fd7365d7c65cf6d4da90c14cced5e542 | [
"MIT"
] | null | null | null | demo.py | bringBackm/SSD | 6cbc9018fd7365d7c65cf6d4da90c14cced5e542 | [
"MIT"
] | null | null | null | import glob
import os
import torch
from PIL import Image
from tqdm import tqdm
from ssd.config import cfg
from ssd.data.datasets import COCODataset, VOCDataset
from ssd.modeling.predictor import Predictor
from ssd.modeling.vgg_ssd import build_ssd_model
import argparse
import numpy as np
from ssd.utils.viz import dra... | 35.540816 | 128 | 0.669251 |
732dd28306f669f7a332fd1f3c061993b13d2ff5 | 800 | py | Python | quiz/bot/storage/shelter.py | shubham-king/guess-the-melody | 1658a17f41b39cfd212175a03e043b3be7bc0e56 | [
"MIT"
] | 4 | 2019-06-15T15:32:43.000Z | 2020-02-21T09:45:36.000Z | quiz/bot/storage/shelter.py | shubham-king/guess-the-melody | 1658a17f41b39cfd212175a03e043b3be7bc0e56 | [
"MIT"
] | 4 | 2020-07-05T07:20:26.000Z | 2021-04-25T21:05:53.000Z | quiz/bot/storage/shelter.py | shubham-king/guess-the-melody | 1658a17f41b39cfd212175a03e043b3be7bc0e56 | [
"MIT"
] | 7 | 2020-06-13T20:11:41.000Z | 2021-11-09T07:47:02.000Z | from shelve import DbfilenameShelf, open
from typing import Type
from quiz.config import Config
from quiz.types import ContextManager, DictAccess
| 26.666667 | 65 | 0.665 |
73321c0acbdf4ab01ceed6d568aada4c5a634a97 | 125 | py | Python | src/applications/task310/apps.py | SergeyNazarovSam/SergeyPythonfirst | fd2bddf1f5ba28c6802be921177917f369f7ef2e | [
"MIT"
] | 2 | 2020-12-17T20:19:21.000Z | 2020-12-22T12:46:43.000Z | src/applications/task310/apps.py | alexander-sidorov/tms-z43 | 61ecd204f5de4e97ff0300f6ef91c36c2bcda31c | [
"MIT"
] | 4 | 2021-04-20T08:40:30.000Z | 2022-02-10T07:50:30.000Z | src/applications/task310/apps.py | SergeyNazarovSam/SergeyPythonfirst | fd2bddf1f5ba28c6802be921177917f369f7ef2e | [
"MIT"
] | 1 | 2021-02-10T06:42:19.000Z | 2021-02-10T06:42:19.000Z | from django.apps import AppConfig
| 17.857143 | 34 | 0.72 |
7332ce4b3b7c7b972d457f074400634cb61ce765 | 5,686 | py | Python | scripts/data_creation_v3.py | deepchecks/url_classification_dl | 029fddb78e019cf288adcc2fd46be3435536d469 | [
"CC0-1.0"
] | 3 | 2021-05-22T09:20:54.000Z | 2022-03-14T15:58:17.000Z | scripts/data_creation_v3.py | deepchecks/url_classification_dl | 029fddb78e019cf288adcc2fd46be3435536d469 | [
"CC0-1.0"
] | 1 | 2021-11-15T11:22:48.000Z | 2021-12-11T13:32:19.000Z | scripts/data_creation_v3.py | deepchecks/url_classification_dl | 029fddb78e019cf288adcc2fd46be3435536d469 | [
"CC0-1.0"
] | 6 | 2021-05-15T17:46:22.000Z | 2022-03-24T11:24:59.000Z | import whois
from datetime import datetime, timezone
import math
import pandas as pd
import numpy as np
from pyquery import PyQuery
from requests import get
| 29.769634 | 90 | 0.536933 |
7333549135a1f86b79763216b9dd3553195359bb | 5,175 | py | Python | rgnn_at_scale/models/gat.py | sigeisler/robustness_of_gnns_at_scale | 0f4844711ace599f54c2abc760b53680a80d6a32 | [
"MIT"
] | 11 | 2021-11-01T19:54:41.000Z | 2022-01-27T11:34:11.000Z | rgnn_at_scale/models/gat.py | sigeisler/robustness_of_gnns_at_scale | 0f4844711ace599f54c2abc760b53680a80d6a32 | [
"MIT"
] | 1 | 2021-12-13T21:14:56.000Z | 2022-01-16T17:37:36.000Z | rgnn_at_scale/models/gat.py | sigeisler/robustness_of_gnns_at_scale | 0f4844711ace599f54c2abc760b53680a80d6a32 | [
"MIT"
] | 2 | 2021-11-05T00:42:18.000Z | 2022-01-12T10:10:30.000Z | from typing import Any, Dict, Tuple
import torch
from torch_geometric.nn import GATConv
from torch_sparse import SparseTensor, set_diag
from rgnn_at_scale.aggregation import ROBUST_MEANS
from rgnn_at_scale.models.gcn import GCN
| 36.443662 | 119 | 0.636329 |
7334d673ab4fa7b6545531cff68878e44e4b4835 | 902 | py | Python | code/renderer/randomize/material.py | jonathangranskog/shading-scene-representations | 9c9033a1ca05095c7e2ccfeb4da3046b687bef3d | [
"MIT"
] | 21 | 2020-09-28T10:38:04.000Z | 2022-03-12T08:46:09.000Z | code/renderer/randomize/material.py | jonathangranskog/shading-scene-representations | 9c9033a1ca05095c7e2ccfeb4da3046b687bef3d | [
"MIT"
] | null | null | null | code/renderer/randomize/material.py | jonathangranskog/shading-scene-representations | 9c9033a1ca05095c7e2ccfeb4da3046b687bef3d | [
"MIT"
] | 1 | 2020-12-16T14:56:21.000Z | 2020-12-16T14:56:21.000Z | import numpy as np
import pyrr
import os | 32.214286 | 184 | 0.586475 |
7335cb0ff48cfe398a0b353de5f1570850d9c8fa | 3,752 | py | Python | frappe/core/doctype/sms_settings/sms_settings.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | frappe/core/doctype/sms_settings/sms_settings.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | frappe/core/doctype/sms_settings/sms_settings.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, throw, msgprint
from frappe.utils import nowdate
from frappe.model.document import Documen... | 27.188406 | 98 | 0.711354 |
7335d3017f92ccc28bd13ffbbbef33f7a8f4f467 | 481 | py | Python | blog/migrations/0041_auto_20190504_0855.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-05-20T08:42:49.000Z | 2020-05-20T08:42:49.000Z | blog/migrations/0041_auto_20190504_0855.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 14 | 2020-03-24T17:31:08.000Z | 2022-03-11T23:59:30.000Z | blog/migrations/0041_auto_20190504_0855.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-04-13T12:37:37.000Z | 2020-04-13T12:37:37.000Z | # Generated by Django 2.1.5 on 2019-05-04 07:55
import blog.formatChecker
from django.db import migrations, models
| 24.05 | 123 | 0.638254 |
73360c2d69e50730324e4dc6677481e54cc8e26d | 1,850 | py | Python | tardis/model/tests/test_csvy_model.py | Youssef15015/tardis | adde5b0114f23634fe5afef6937b285174ad6b55 | [
"BSD-3-Clause"
] | null | null | null | tardis/model/tests/test_csvy_model.py | Youssef15015/tardis | adde5b0114f23634fe5afef6937b285174ad6b55 | [
"BSD-3-Clause"
] | 2 | 2019-06-10T11:24:50.000Z | 2019-06-18T17:28:59.000Z | tardis/model/tests/test_csvy_model.py | Youssef15015/tardis | adde5b0114f23634fe5afef6937b285174ad6b55 | [
"BSD-3-Clause"
] | 1 | 2019-06-10T10:21:41.000Z | 2019-06-10T10:21:41.000Z | import numpy as np
import numpy.testing as npt
import tardis
import os
from astropy import units as u
from tardis.io.config_reader import Configuration
from tardis.model import Radial1DModel
import pytest
DATA_PATH = os.path.join(tardis.__path__[0],'model','tests','data')
| 44.047619 | 107 | 0.682162 |
73391ce9c005d2972ce3d22ec1870d858657b9ce | 34,911 | py | Python | wepppy/taudem/topaz_emulator.py | hwbeeson/wepppy | 6358552df99853c75be8911e7ef943108ae6923e | [
"BSD-3-Clause"
] | null | null | null | wepppy/taudem/topaz_emulator.py | hwbeeson/wepppy | 6358552df99853c75be8911e7ef943108ae6923e | [
"BSD-3-Clause"
] | null | null | null | wepppy/taudem/topaz_emulator.py | hwbeeson/wepppy | 6358552df99853c75be8911e7ef943108ae6923e | [
"BSD-3-Clause"
] | null | null | null | from typing import List
import os
import json
from os.path import join as _join
from os.path import exists as _exists
import math
from osgeo import gdal, osr
import numpy as np
from scipy.ndimage import label
from subprocess import Popen, PIPE
from pprint import pprint
from wepppy.all_your_base.geo import read_tif... | 37.619612 | 120 | 0.540661 |
733a0eff21e557f8f32c9d92815d4f668db0c2d8 | 47,930 | py | Python | PyRSM/utils.py | chdahlqvist/RSMmap | 53984967d612eaf4feb90ba4972109638f6cf70a | [
"MIT"
] | 3 | 2021-05-18T16:40:13.000Z | 2022-03-17T15:32:31.000Z | PyRSM/utils.py | chdahlqvist/RSMmap | 53984967d612eaf4feb90ba4972109638f6cf70a | [
"MIT"
] | null | null | null | PyRSM/utils.py | chdahlqvist/RSMmap | 53984967d612eaf4feb90ba4972109638f6cf70a | [
"MIT"
] | 1 | 2022-01-19T11:04:21.000Z | 2022-01-19T11:04:21.000Z | """
Set of functions used by the PyRSM class to compute detection maps and optimize the parameters
of the RSM algorithm and PSF-subtraction techniques via the auto-RSM and auto-S/N frameworks
"""
__author__ = 'Carl-Henrik Dahlqvist'
from scipy.interpolate import Rbf
import pandas as pd
import numpy.linalg as la
from v... | 38.590982 | 242 | 0.614542 |
733a51b0598b93f7ddad878e61c9f58e36f463d6 | 4,618 | py | Python | src/custom_dataset.py | devJWSong/transformer-multiturn-dialogue-pytorch | 4ddedaef45f31d75e88bdb909a4451173faec4c8 | [
"MIT"
] | 11 | 2021-03-22T10:22:42.000Z | 2021-09-15T23:50:46.000Z | src/custom_dataset.py | devjwsong/transformer-chatbot-pytorch | 4ddedaef45f31d75e88bdb909a4451173faec4c8 | [
"MIT"
] | 1 | 2021-12-10T04:52:39.000Z | 2021-12-10T04:52:40.000Z | src/custom_dataset.py | devjwsong/transformer-chatbot-pytorch | 4ddedaef45f31d75e88bdb909a4451173faec4c8 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
from tqdm import tqdm
import torch
import pickle
import json
| 38.483333 | 129 | 0.529017 |
733ab2bdfefcfa168386562dc21d727ee4511840 | 1,588 | py | Python | research/codec/codec_example.py | FXTD-ODYSSEY/QBinder | b4b288e7c0ef09d2382e3d6678a5c41950257b76 | [
"MIT"
] | 13 | 2020-11-29T15:02:57.000Z | 2022-02-11T03:12:25.000Z | research/codec/codec_example.py | FXTD-ODYSSEY/QBinder | b4b288e7c0ef09d2382e3d6678a5c41950257b76 | [
"MIT"
] | 8 | 2020-11-30T02:47:56.000Z | 2021-05-19T03:44:16.000Z | research/codec/codec_example.py | FXTD-ODYSSEY/QtConfig | 978cddf26c0305677b65b04d206138970cb73762 | [
"MIT"
] | 2 | 2020-11-30T01:59:19.000Z | 2021-12-17T06:44:54.000Z | # -*- coding: future_fstrings -*-
import codecs
import pdb
import string
# NOTE https://stackoverflow.com/questions/38777818/how-do-i-properly-create-custom-text-codecs
# prepare map from numbers to letters
_encode_table = {str(number): bytes(letter) for number, letter in enumerate(string.ascii_lowercase)}
# prepar... | 28.872727 | 100 | 0.714736 |
733b44cae4895b7b97c2632f68beb2990e9371cb | 370 | py | Python | benchmark_python_lkml.py | Ladvien/rust_lookml_parser | a99a9663f2e0ccd0e7eff0fb6ec4f4496032265c | [
"MIT"
] | null | null | null | benchmark_python_lkml.py | Ladvien/rust_lookml_parser | a99a9663f2e0ccd0e7eff0fb6ec4f4496032265c | [
"MIT"
] | null | null | null | benchmark_python_lkml.py | Ladvien/rust_lookml_parser | a99a9663f2e0ccd0e7eff0fb6ec4f4496032265c | [
"MIT"
] | null | null | null | import lkml
from time import time_ns
from rich import print
FILE_PATH = "/Users/ladvien/rusty_looker/src/resources/test.lkml"
with open(FILE_PATH, "r") as f:
lookml = f.read()
startTime = time_ns() // 1_000_000
result = lkml.load(lookml)
print(result)
executionTime = (time_ns() // 1_000_000) - startTime
print('... | 26.428571 | 65 | 0.735135 |
733c41f200ce9ccff635234faca97343a23e5190 | 1,595 | py | Python | Linear_Regression.py | svdeepak99/TSA-Twitter_Sentiment_Analysis | 41c13682ccc110025c5fbd396c0982d54febc6cc | [
"MIT"
] | null | null | null | Linear_Regression.py | svdeepak99/TSA-Twitter_Sentiment_Analysis | 41c13682ccc110025c5fbd396c0982d54febc6cc | [
"MIT"
] | null | null | null | Linear_Regression.py | svdeepak99/TSA-Twitter_Sentiment_Analysis | 41c13682ccc110025c5fbd396c0982d54febc6cc | [
"MIT"
] | null | null | null | from keras.models import Sequential, load_model
from keras.layers import Dense
import csv
import numpy as np
import os
LOAD_MODEL = False
with open("Linear_Regression/Normalized_Attributes.csv", "r", newline='') as fp:
reader = csv.reader(fp)
headings = next(reader)
dataset = np.array(list(read... | 32.55102 | 116 | 0.680251 |
733c8d8b8ea4cf5eaafe8785802f0c3c067c38ff | 3,141 | py | Python | UserCode/bressler/multibubblescintillationcheck.py | cericdahl/SBCcode | 90a7841a5c1208d64f71a332289d9005a011aa21 | [
"MIT"
] | 4 | 2018-08-27T18:02:34.000Z | 2020-06-09T21:19:04.000Z | UserCode/bressler/multibubblescintillationcheck.py | SBC-Collaboration/SBC-Analysis | 90a7841a5c1208d64f71a332289d9005a011aa21 | [
"MIT"
] | null | null | null | UserCode/bressler/multibubblescintillationcheck.py | SBC-Collaboration/SBC-Analysis | 90a7841a5c1208d64f71a332289d9005a011aa21 | [
"MIT"
] | 4 | 2019-06-20T21:36:26.000Z | 2020-11-10T17:23:14.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 2 19:33:02 2021
@author: bressler
"""
import SBCcode as sbc
import numpy as np
import pulse_integrator as pi
import gc
if __name__ == "__main__":
main() | 36.523256 | 97 | 0.539 |
733cfbac832497fb734f7d0cde01792ad3325cd5 | 4,038 | py | Python | app/core/models.py | echosisdev/openmrs-disa-sync | 077331c5b96394f15cc90aba7ce4018e10d5608d | [
"MIT"
] | null | null | null | app/core/models.py | echosisdev/openmrs-disa-sync | 077331c5b96394f15cc90aba7ce4018e10d5608d | [
"MIT"
] | null | null | null | app/core/models.py | echosisdev/openmrs-disa-sync | 077331c5b96394f15cc90aba7ce4018e10d5608d | [
"MIT"
] | null | null | null | from django.db import models
from django.db.models.signals import pre_save, post_save
from core.utils.constants import Constants
from core.utils.data_convertion import DataConversion
# def insert_formatted_nid(sender, instance, created, *args, **kwargs):
# if created:
# instance.formatted_nid = Dat... | 38.826923 | 78 | 0.733779 |
733e97b6658e7e2eb8c13752d62cc0a274acaa1f | 1,533 | py | Python | ceibacli/job_schedulers/slurm.py | cffbots/ceiba-cli | 7e77199c1fe919f024c4707b65578fec320713a6 | [
"Apache-2.0"
] | 2 | 2020-11-10T08:52:15.000Z | 2020-11-10T08:52:17.000Z | ceibacli/job_schedulers/slurm.py | cffbots/ceiba-cli | 7e77199c1fe919f024c4707b65578fec320713a6 | [
"Apache-2.0"
] | 24 | 2020-09-22T09:58:38.000Z | 2021-01-14T11:02:33.000Z | ceibacli/job_schedulers/slurm.py | cffbots/ceiba-cli | 7e77199c1fe919f024c4707b65578fec320713a6 | [
"Apache-2.0"
] | 1 | 2022-02-03T13:46:07.000Z | 2022-02-03T13:46:07.000Z | """Interface to the `SLURM job scheduler <https://slurm.schedmd.com/documentation.html>`_
.. autofunction:: create_slurm_script
"""
from pathlib import Path
from typing import Any, Dict, List
from ..utils import Options
def create_slurm_script(opts: Options, jobs: List[Dict[str, Any]], jobs_metadata: List[Options]... | 29.480769 | 104 | 0.666014 |
733ee42203016605540515b9f13fedcc898ddec0 | 5,290 | py | Python | thumbor/url.py | wking/thumbor | 97a55594a67e3cf3b5e7d09cde5944bc821eeb1e | [
"MIT"
] | null | null | null | thumbor/url.py | wking/thumbor | 97a55594a67e3cf3b5e7d09cde5944bc821eeb1e | [
"MIT"
] | null | null | null | thumbor/url.py | wking/thumbor | 97a55594a67e3cf3b5e7d09cde5944bc821eeb1e | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import re
from urllib import quote
| 31.117647 | 119 | 0.479017 |
733f199984f8b993cc317085788a45b7c591ad8b | 1,084 | py | Python | Projects/herdimmunity/Person.py | Tech-at-DU/ACS-1111.1-Object-Oriented-Programming | e4405678282b7fbd78a3b8337116b61083417343 | [
"MIT"
] | null | null | null | Projects/herdimmunity/Person.py | Tech-at-DU/ACS-1111.1-Object-Oriented-Programming | e4405678282b7fbd78a3b8337116b61083417343 | [
"MIT"
] | null | null | null | Projects/herdimmunity/Person.py | Tech-at-DU/ACS-1111.1-Object-Oriented-Programming | e4405678282b7fbd78a3b8337116b61083417343 | [
"MIT"
] | 1 | 2021-11-01T21:04:52.000Z | 2021-11-01T21:04:52.000Z | import random
from Virus import Virus
| 37.37931 | 86 | 0.665129 |
733fd1e0e78df5be2052554568f783ebcd9a6ad0 | 1,741 | py | Python | Cursos/Alura/Python3_Avancando_na_orientacao_a_objetos/models_playlist3.py | ramonvaleriano/python- | ada70918e945e8f2d3b59555e9ccc35cf0178dbd | [
"MIT"
] | null | null | null | Cursos/Alura/Python3_Avancando_na_orientacao_a_objetos/models_playlist3.py | ramonvaleriano/python- | ada70918e945e8f2d3b59555e9ccc35cf0178dbd | [
"MIT"
] | null | null | null | Cursos/Alura/Python3_Avancando_na_orientacao_a_objetos/models_playlist3.py | ramonvaleriano/python- | ada70918e945e8f2d3b59555e9ccc35cf0178dbd | [
"MIT"
] | null | null | null |
class Filme(Programa):
class Serie(Programa):
class Playlist:
vingadores = Filme('Vigadores - Guerra Infinita', 2018, 160)
atlanta = Serie('Atlatan', 2018, 2)
tmep = Filme('Todo mundo em pnico', 1999, 100)
demolidor = Serie('Demolidor', 2016, 2)
filmes_e_series = [vingadores, atlanta, demolidor, tmep]
playlist_... | 24.871429 | 88 | 0.638713 |
73401ec9a9c7c85f7251558930f267232a9f7bb1 | 3,275 | py | Python | blackjack/game.py | cuiqui/blackjack | 5ecb0ae1c065fa284c2209222f6f958e1f514249 | [
"MIT"
] | null | null | null | blackjack/game.py | cuiqui/blackjack | 5ecb0ae1c065fa284c2209222f6f958e1f514249 | [
"MIT"
] | null | null | null | blackjack/game.py | cuiqui/blackjack | 5ecb0ae1c065fa284c2209222f6f958e1f514249 | [
"MIT"
] | null | null | null | import constants as c
from deck import Deck
from player import Human, RandomAI
if __name__ == '__main__':
g = Game()
g.new()
g.run()
| 31.490385 | 102 | 0.487328 |
73407d37b530e40b65a5d94f1bc5d3086355dead | 1,084 | py | Python | numba/tests/__init__.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2019-12-04T07:13:18.000Z | 2019-12-04T07:13:18.000Z | numba/tests/__init__.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | numba/tests/__init__.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-09-18T15:03:46.000Z | 2020-09-18T15:03:46.000Z | from numba import unittest_support as unittest
import gc
from os.path import dirname, join
import multiprocessing
import sys
import time
import warnings
from unittest.suite import TestSuite
from numba.testing import load_testsuite
from numba.testing import ddt # for backward compatibility
try:
import faulthandl... | 27.1 | 64 | 0.737085 |
7340e2ed735c34bf4441bf796759a517ee89ee90 | 5,377 | py | Python | src/clustar/fit.py | clustar/Clustar | 83e155feffc10c4bf172f8ec769fb3c5ffe1d579 | [
"MIT"
] | 4 | 2021-02-24T17:27:25.000Z | 2021-06-28T04:45:32.000Z | src/clustar/fit.py | clustar/Clustar | 83e155feffc10c4bf172f8ec769fb3c5ffe1d579 | [
"MIT"
] | 3 | 2021-04-05T14:53:26.000Z | 2021-06-27T20:17:14.000Z | src/clustar/fit.py | clustar/Clustar | 83e155feffc10c4bf172f8ec769fb3c5ffe1d579 | [
"MIT"
] | 1 | 2021-02-15T16:13:05.000Z | 2021-02-15T16:13:05.000Z | """
Clustar module for fitting-related methods.
This module is designed for the 'ClustarData' object. All listed methods take
an input parameter of a 'ClustarData' object and return a 'ClustarData' object
after processing the method. As a result, all changes are localized within the
'ClustarData' object.
Visit <https... | 29.382514 | 78 | 0.563139 |
73411a436e5f2edebb124c6122419fcdeef298b3 | 970 | py | Python | tests/wizard/namedwizardtests/urls.py | felixxm/django-formtools | ba62c6fa14edbd4197bda8ed0d23eb006ebebeba | [
"BSD-3-Clause"
] | null | null | null | tests/wizard/namedwizardtests/urls.py | felixxm/django-formtools | ba62c6fa14edbd4197bda8ed0d23eb006ebebeba | [
"BSD-3-Clause"
] | null | null | null | tests/wizard/namedwizardtests/urls.py | felixxm/django-formtools | ba62c6fa14edbd4197bda8ed0d23eb006ebebeba | [
"BSD-3-Clause"
] | 1 | 2019-11-04T22:52:19.000Z | 2019-11-04T22:52:19.000Z | from django.conf.urls import url
from .forms import (
CookieContactWizard, Page1, Page2, Page3, Page4, SessionContactWizard,
)
urlpatterns = [
url(r'^nwiz_session/(?P<step>.+)/$', get_named_session_wizard(), name='nwiz_session'),
url(r'^nwiz_session/$', get_named_session_wizard(), name='nwiz_session_st... | 32.333333 | 90 | 0.670103 |
73418fc41479ed48faa479be47ae0461c5d41885 | 907 | py | Python | setup.py | ajayp10/derive_event_pm4py | d1fd16c65081348b617dc0697b372a294c91023a | [
"MIT"
] | null | null | null | setup.py | ajayp10/derive_event_pm4py | d1fd16c65081348b617dc0697b372a294c91023a | [
"MIT"
] | null | null | null | setup.py | ajayp10/derive_event_pm4py | d1fd16c65081348b617dc0697b372a294c91023a | [
"MIT"
] | null | null | null | import pathlib
from setuptools import setup
CURRENT_PATH = pathlib.Path(__file__).parent
README = (CURRENT_PATH/"README.md").read_text()
setup(
name="derive_event_pm4py",
version="1.0.1",
description="It derives new events based on rules provided as inputs.",
long_description=README,
long_descrip... | 28.34375 | 75 | 0.651599 |
73425bf1b2ce90f77e267345bd3b090b0208b790 | 16,334 | py | Python | tests/service/ai/test_not_killing_itself_ai.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | tests/service/ai/test_not_killing_itself_ai.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | tests/service/ai/test_not_killing_itself_ai.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | import unittest
from datetime import datetime, timezone
from typing import List
from chillow.service.ai.not_killing_itself_ai import NotKillingItselfAI
from chillow.model.action import Action
from chillow.model.cell import Cell
from chillow.model.direction import Direction
from chillow.model.game import Game
from chil... | 52.185304 | 120 | 0.53355 |
73441d4a3b24e3d3313825da48a3c91f2e8b65de | 1,123 | py | Python | setup.py | meisanggou/ldapuser | 45a9e5eba8bbf173ce2ec87f9a32cff8db549e7c | [
"MIT"
] | null | null | null | setup.py | meisanggou/ldapuser | 45a9e5eba8bbf173ce2ec87f9a32cff8db549e7c | [
"MIT"
] | null | null | null | setup.py | meisanggou/ldapuser | 45a9e5eba8bbf173ce2ec87f9a32cff8db549e7c | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# coding: utf-8
# __author__ = 'meisanggou'
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
if sys.version_info <= (2, 7):
sys.stderr.write("ERROR: ldap-user requires Python Version 2.7 or above.\n")
sys.stderr.write("Your Pyt... | 25.522727 | 81 | 0.685663 |
73455aa40d8fdaf8fad425f0bc60becf47571215 | 4,387 | py | Python | tests/test_infection.py | chinapnr/covid-19-data | 409fa260c16e09b7ef820435c5086207bb5e40ef | [
"MIT"
] | 3 | 2020-05-27T01:21:50.000Z | 2020-08-20T07:54:42.000Z | tests/test_infection.py | chinapnr/covid-19-data | 409fa260c16e09b7ef820435c5086207bb5e40ef | [
"MIT"
] | 24 | 2020-03-26T10:45:34.000Z | 2020-04-06T06:13:50.000Z | tests/test_infection.py | chinapnr/covid-19-data | 409fa260c16e09b7ef820435c5086207bb5e40ef | [
"MIT"
] | null | null | null | import json
import pytest
| 35.096 | 90 | 0.581947 |
734586c386b99571285203cdfc4477ce123175a7 | 19,442 | py | Python | tests/test_util_owsutil.py | TimFranken/pydov | da393129207c93ab845a28525864c13374459dbf | [
"MIT"
] | null | null | null | tests/test_util_owsutil.py | TimFranken/pydov | da393129207c93ab845a28525864c13374459dbf | [
"MIT"
] | null | null | null | tests/test_util_owsutil.py | TimFranken/pydov | da393129207c93ab845a28525864c13374459dbf | [
"MIT"
] | null | null | null | """Module grouping tests for the pydov.util.owsutil module."""
import copy
import re
import pytest
from numpy.compat import unicode
from owslib.etree import etree
from owslib.fes import (
PropertyIsEqualTo,
FilterRequest,
)
from owslib.iso import MD_Metadata
from owslib.util import nspath_eval
from pydov.util... | 40.419958 | 79 | 0.620152 |
7347c43851f55966f151bfafefba0299301f676e | 1,430 | py | Python | manage.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | manage.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | manage.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
manage
~~~~~~
Flask-Script Manager
"""
import os
from flask.ext.script import Manager
from flask.ext.migrate import MigrateCommand
from fbone import create_app
from fbone.extensions import db
from fbone.utils import PROJECT_PATH, MALE
from fbone.modules.user import User, ADMI... | 23.442623 | 94 | 0.692308 |
7347cda8008de4de3e2356287a34d7f4b9da7478 | 444 | py | Python | llvmsqlite_util/benchmarking/micro/aggregate.py | KowalskiThomas/LLVMSQLite | a36b85dfadf44b0a4008d9f01ebd79d5ca2cace4 | [
"blessing"
] | null | null | null | llvmsqlite_util/benchmarking/micro/aggregate.py | KowalskiThomas/LLVMSQLite | a36b85dfadf44b0a4008d9f01ebd79d5ca2cace4 | [
"blessing"
] | null | null | null | llvmsqlite_util/benchmarking/micro/aggregate.py | KowalskiThomas/LLVMSQLite | a36b85dfadf44b0a4008d9f01ebd79d5ca2cace4 | [
"blessing"
] | null | null | null | import os
sql_files = [x for x in os.listdir(".") if x.endswith("sql")]
sql_files = list(sorted(sql_files, key = lambda x : int(x.split('.')[0])))
result = ""
for i, f in enumerate(sql_files):
i = i + 1
i = f.replace(".sql", "")
with open(f) as sql:
result += f"--- Query {i}\n"
result += s... | 26.117647 | 74 | 0.554054 |
73486adc08d97e3620d3c9533949d0a3a23b6c00 | 2,882 | py | Python | demos/crane/main.py | Starli8ht/KivyMD | 5a3425d4e39e8615a0ba8b879db1eb5d7bfb3b49 | [
"MIT"
] | null | null | null | demos/crane/main.py | Starli8ht/KivyMD | 5a3425d4e39e8615a0ba8b879db1eb5d7bfb3b49 | [
"MIT"
] | null | null | null | demos/crane/main.py | Starli8ht/KivyMD | 5a3425d4e39e8615a0ba8b879db1eb5d7bfb3b49 | [
"MIT"
] | null | null | null | """
MDCrane demo
=============
.. seealso::
`Material Design spec,
Crane <https://material.io/design/material-studies/crane.html#>`
Crane is a travel app that helps users find and book travel, lodging, and
restaurant options that match their input preferences.
"""
import os
import sys
from pathlib i... | 29.408163 | 77 | 0.519084 |
7349101381b3dbb9e23adbac5458b1fa8f012f0b | 8,368 | py | Python | tasks/lgutil/graph_net.py | HimmelStein/lg-flask | 562adfe16c3dd718faf694b8233586422d035e17 | [
"MIT"
] | null | null | null | tasks/lgutil/graph_net.py | HimmelStein/lg-flask | 562adfe16c3dd718faf694b8233586422d035e17 | [
"MIT"
] | null | null | null | tasks/lgutil/graph_net.py | HimmelStein/lg-flask | 562adfe16c3dd718faf694b8233586422d035e17 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from nltk.parse import DependencyGraph
from collections import defaultdict
import random
import sys
import copy
from json import dumps
from pprint import pprint
try:
from .lg_graph import LgGraph
except:
sys.path.append("/Users/tdong/git/lg-flask/tasks/lgutil")
from .lg_graph import... | 34.866667 | 113 | 0.518164 |
7349161371152ef9656dab45ddf6d709b3bf142a | 5,517 | py | Python | utils/transformations/char_level/char_dces_substitute.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | utils/transformations/char_level/char_dces_substitute.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | utils/transformations/char_level/char_dces_substitute.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# coding=UTF-8
"""
@Author: WEN Hao
@LastEditors: WEN Hao
@Description:
@Date: 2021-09-24
@LastEditTime: 2022-04-17
OpenAttackDCESSubstitute
"""
import random
from typing import NoReturn, List, Any, Optional
import numpy as np
from utils.transformations.base import CharSubstitute
from utils.... | 23.576923 | 84 | 0.518035 |
734ac6f57c878180c7a2282d8eb947a2ce6b549f | 2,588 | py | Python | piptools/repositories/base.py | LaudateCorpus1/pip-tools | 53c927262d816c336664afee9b03996bfb8f9c44 | [
"BSD-3-Clause"
] | 2 | 2021-12-02T11:41:02.000Z | 2021-12-27T12:01:53.000Z | piptools/repositories/base.py | LaudateCorpus1/pip-tools | 53c927262d816c336664afee9b03996bfb8f9c44 | [
"BSD-3-Clause"
] | 3 | 2020-11-20T18:42:20.000Z | 2021-06-20T09:38:27.000Z | piptools/repositories/base.py | LaudateCorpus1/pip-tools | 53c927262d816c336664afee9b03996bfb8f9c44 | [
"BSD-3-Clause"
] | 2 | 2021-07-13T08:53:43.000Z | 2022-02-02T14:10:58.000Z | import optparse
from abc import ABCMeta, abstractmethod
from contextlib import contextmanager
from typing import Iterator, Optional, Set
from pip._internal.index.package_finder import PackageFinder
from pip._internal.models.index import PyPI
from pip._internal.network.session import PipSession
from pip._internal.req i... | 34.506667 | 88 | 0.693199 |
734b4343088715a23f5435206ac174b0bc22413c | 11,371 | py | Python | tfx/orchestration/portable/execution_publish_utils.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/portable/execution_publish_utils.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/portable/execution_publish_utils.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 43.734615 | 97 | 0.735731 |
734bd8fdc6b5e208d672c4c4eac90f446f5043c6 | 6,220 | py | Python | src/dctm/datasets.py | spotify-research/dctm | e813aca23c3f54bc55ace5b3342aaec5cc7dad60 | [
"Apache-2.0"
] | 11 | 2020-08-11T10:18:48.000Z | 2021-12-23T15:34:46.000Z | src/dctm/datasets.py | spotify-research/dctm | e813aca23c3f54bc55ace5b3342aaec5cc7dad60 | [
"Apache-2.0"
] | null | null | null | src/dctm/datasets.py | spotify-research/dctm | e813aca23c3f54bc55ace5b3342aaec5cc7dad60 | [
"Apache-2.0"
] | 2 | 2020-09-02T23:02:11.000Z | 2020-11-17T05:16:29.000Z | #
# Copyright 2020 Spotify AB
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.910053 | 79 | 0.635852 |
734d1d2e2ae1a6d7737d630a4bc5c6e70adf63d2 | 28,079 | py | Python | billingbudgets/google/cloud/billing_budgets_v1beta1/proto/budget_model_pb2.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 1 | 2019-12-09T11:40:28.000Z | 2019-12-09T11:40:28.000Z | billingbudgets/google/cloud/billing_budgets_v1beta1/proto/budget_model_pb2.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 1 | 2019-03-29T22:03:48.000Z | 2019-04-02T22:24:45.000Z | billingbudgets/google/cloud/billing_budgets_v1beta1/proto/budget_model_pb2.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 1 | 2019-03-29T18:26:16.000Z | 2019-03-29T18:26:16.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/billing/budgets_v1beta1/proto/budget_model.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf import descriptor as _descriptor
from google.proto... | 36.849081 | 2,327 | 0.654795 |
734e2605b9fe6651d724a46a3b07b21d5d438537 | 4,010 | py | Python | torchreid/optim/sam.py | opencv/deep-person-reid | ccc305614e968d4b64cc7d4b6664eb42267e6250 | [
"MIT"
] | 1 | 2020-07-07T19:22:17.000Z | 2020-07-07T19:22:17.000Z | torchreid/optim/sam.py | opencv/deep-person-reid | ccc305614e968d4b64cc7d4b6664eb42267e6250 | [
"MIT"
] | 1 | 2020-06-04T15:22:09.000Z | 2020-06-04T15:22:09.000Z | torchreid/optim/sam.py | opencv/deep-person-reid | ccc305614e968d4b64cc7d4b6664eb42267e6250 | [
"MIT"
] | 4 | 2020-07-02T09:23:11.000Z | 2020-08-21T08:24:13.000Z | # Copyright 2020 Google Research
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
'''
Imported from: https://github.com/google-research/sam
'''
import torch
| 37.830189 | 131 | 0.56783 |
735158944908fbafce88d97668526717a22003eb | 11,958 | py | Python | src/konfiger_stream.py | konfiger/konfiger-python | 294fb2fed8a46f7e242825fc0b723b0ff7132c8c | [
"MIT"
] | 4 | 2019-09-25T02:18:43.000Z | 2020-01-21T19:16:05.000Z | src/konfiger_stream.py | keyvaluedb/key-value-db-python | 294fb2fed8a46f7e242825fc0b723b0ff7132c8c | [
"MIT"
] | null | null | null | src/konfiger_stream.py | keyvaluedb/key-value-db-python | 294fb2fed8a46f7e242825fc0b723b0ff7132c8c | [
"MIT"
] | null | null | null |
"""
The MIT License
Copyright 2020 Adewale Azeez <azeezadewale98@gmail.com>.
"""
import os.path
from .konfiger_util import type_of, is_string, is_char, is_bool, escape_string, un_escape_string
| 45.816092 | 150 | 0.511373 |
735211327e137e292f3ce5c7750409c77a35d0dd | 2,674 | py | Python | matematik.py | Drummersbrother/math_for_school | 5eaa22320298d59b770e68b9640b34a525875132 | [
"MIT"
] | null | null | null | matematik.py | Drummersbrother/math_for_school | 5eaa22320298d59b770e68b9640b34a525875132 | [
"MIT"
] | null | null | null | matematik.py | Drummersbrother/math_for_school | 5eaa22320298d59b770e68b9640b34a525875132 | [
"MIT"
] | null | null | null | import math
import numpy as np
import collections
import scipy.stats as sst
import matplotlib.pyplot as plt
def list_or_starargs(func):
"""This is a decorator to specify that a function either takes iterable input in the form of an iterable or a list of passed arguments.
If other arguments are needed, the func... | 33.848101 | 139 | 0.628646 |
7352cdca72cd11a42b689b908ad454fb587ad295 | 5,362 | py | Python | docly/ioutils/__init__.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 29 | 2020-12-31T08:27:32.000Z | 2022-02-15T08:48:51.000Z | docly/ioutils/__init__.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 4 | 2020-12-30T18:18:54.000Z | 2021-08-03T14:42:35.000Z | docly/ioutils/__init__.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 2 | 2022-01-04T17:58:22.000Z | 2022-02-05T13:04:14.000Z | import os
from pathlib import Path
import requests
import shutil
import sys
from distutils.version import LooseVersion
import time
from tqdm import tqdm
from docly.parser import parser as py_parser
from docly.tokenizers import tokenize_code_string
from docly import __version__
# from c2nl.objects import Code
UPDATE_... | 31.356725 | 82 | 0.610966 |
735333a22976a616b2a1727e7723502f1d1387bb | 21 | bzl | Python | java/version.bzl | symonk/selenium | 38e89630f1c4b1a0d3ac6e17765a6ccb58160f83 | [
"Apache-2.0"
] | null | null | null | java/version.bzl | symonk/selenium | 38e89630f1c4b1a0d3ac6e17765a6ccb58160f83 | [
"Apache-2.0"
] | null | null | null | java/version.bzl | symonk/selenium | 38e89630f1c4b1a0d3ac6e17765a6ccb58160f83 | [
"Apache-2.0"
] | null | null | null | SE_VERSION = "4.2.1"
| 10.5 | 20 | 0.619048 |
735414eb5a0cf25ba65326dd7cc3a0b2acaea272 | 2,978 | py | Python | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import utils
def main():
# Parse the input file:
comet_df = pd.read_csv(snakemake.input[0], sep="\t", header=0,
usecols=["Peptide", "Charge1", "Charge2", "Charge3"],
index_col=False)
# Determine if MSMS and RT predictio... | 46.53125 | 131 | 0.624244 |
7354ded194b9ee5cde59d94c66a6556bf76f8b32 | 1,497 | py | Python | GettingStarted/gettingstarted.py | rohitp934/roadtoadatascientist | 50724b63c2692659cdd48e9ed20e856c231695fd | [
"MIT"
] | null | null | null | GettingStarted/gettingstarted.py | rohitp934/roadtoadatascientist | 50724b63c2692659cdd48e9ed20e856c231695fd | [
"MIT"
] | null | null | null | GettingStarted/gettingstarted.py | rohitp934/roadtoadatascientist | 50724b63c2692659cdd48e9ed20e856c231695fd | [
"MIT"
] | null | null | null | #importing necessary modules
from sklearn.linear_model import Perceptron
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
import numpy as np
# Data and labels
Xtrain = [[182, 80, 34], [176, 70, 33], [161, 60, 28], [154, 55, 27], [166, 63, 30], [189, 90, 36], [175, 63, 28], ... | 38.384615 | 174 | 0.676687 |
7356af2b787834d2216080e3079e961a0d62871f | 909 | py | Python | libs/optimizers.py | bxtkezhan/AILabs | 6328aa65a3ce5f450389a5a848b641ba36f0e9c5 | [
"MIT"
] | null | null | null | libs/optimizers.py | bxtkezhan/AILabs | 6328aa65a3ce5f450389a5a848b641ba36f0e9c5 | [
"MIT"
] | null | null | null | libs/optimizers.py | bxtkezhan/AILabs | 6328aa65a3ce5f450389a5a848b641ba36f0e9c5 | [
"MIT"
] | null | null | null | import numpy as np
| 31.344828 | 72 | 0.563256 |
735716881d6460c9c4e13489b7256920b070c665 | 122,809 | py | Python | pennylane/transforms/qcut.py | therooler/pennylane | 88a8a5960a2ffd218a12f85ace632021eef2abf5 | [
"Apache-2.0"
] | null | null | null | pennylane/transforms/qcut.py | therooler/pennylane | 88a8a5960a2ffd218a12f85ace632021eef2abf5 | [
"Apache-2.0"
] | null | null | null | pennylane/transforms/qcut.py | therooler/pennylane | 88a8a5960a2ffd218a12f85ace632021eef2abf5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Xanadu Quantum Technologies Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 38.741009 | 117 | 0.629905 |
735799fe024faf41da595642a3d8bdb3ba238a42 | 1,693 | py | Python | tools/SDKTool/src/ui/dialog/progress_bar_dialog.py | Passer-D/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 1,210 | 2020-08-18T07:57:36.000Z | 2022-03-31T15:06:05.000Z | tools/SDKTool/src/ui/dialog/progress_bar_dialog.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 37 | 2020-08-24T02:48:38.000Z | 2022-01-30T06:41:52.000Z | tools/SDKTool/src/ui/dialog/progress_bar_dialog.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 275 | 2020-08-18T08:35:16.000Z | 2022-03-31T15:06:07.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making GameAISDK available.
This source code file is licensed under the GNU General Public License Version 3.
For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package.
Copyright... | 31.351852 | 111 | 0.705848 |
7358c21d44c9b2e4044c283c45da55bafa2452ee | 2,469 | py | Python | 9/main.py | misterwilliam/advent-of-code | b8ddcbc5efcf62c7e5e4244339029783ac9f90b6 | [
"MIT"
] | null | null | null | 9/main.py | misterwilliam/advent-of-code | b8ddcbc5efcf62c7e5e4244339029783ac9f90b6 | [
"MIT"
] | null | null | null | 9/main.py | misterwilliam/advent-of-code | b8ddcbc5efcf62c7e5e4244339029783ac9f90b6 | [
"MIT"
] | null | null | null | import itertools
import unittest
data = """Faerun to Norrath = 129
Faerun to Tristram = 58
Faerun to AlphaCentauri = 13
Faerun to Arbre = 24
Faerun to Snowdin = 60
Faerun to Tambi = 71
Faerun to Straylight = 67
Norrath to Tristram = 142
Norrath to AlphaCentauri = 15
Norrath to Arbre = 135
Norrath to Snowdin = 75
Norra... | 26.548387 | 85 | 0.665857 |
73592c3ecd42d5c4a472b3d8242eb4b399af73f6 | 1,000 | py | Python | 100-Exercicios/ex039.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | 100-Exercicios/ex039.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | 100-Exercicios/ex039.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | #Exerccio Python 39: Faa um programa que leia o ano de nascimento de um jovem e informe, de acordo com a sua idade, se ele ainda vai se alistar ao servio militar, se a hora exata de se alistar ou se j passou do tempo do alistamento. Seu programa tambm dever mostrar o tempo que falta ou que passou do prazo.
import dat... | 62.5 | 315 | 0.75 |
735938898c03a603b4b3dd0bb3da69ebc37d8938 | 10,903 | py | Python | fish_dashboard/scrapyd/scrapyd_service.py | SylvanasSun/FishFishJump | 696212d242d8d572f3f1b43925f3d8ab8acc6a2d | [
"MIT"
] | 60 | 2018-03-09T07:06:10.000Z | 2021-11-18T15:53:04.000Z | fish_dashboard/scrapyd/scrapyd_service.py | qiubaiying/FishFishJump | 696212d242d8d572f3f1b43925f3d8ab8acc6a2d | [
"MIT"
] | 1 | 2018-04-03T11:05:54.000Z | 2018-04-03T20:06:41.000Z | fish_dashboard/scrapyd/scrapyd_service.py | qiubaiying/FishFishJump | 696212d242d8d572f3f1b43925f3d8ab8acc6a2d | [
"MIT"
] | 8 | 2018-03-12T03:07:00.000Z | 2021-06-11T05:16:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from fish_core.utils.common_utils import format_dict_to_str, get_current_date, list_to_str, str_to_list
from fish_dashboard.scrapyd.model import ScrapydStatusVO, JobListDO, JobStatus, JobPriority, ProjectListVO, SpiderListVO
from fish_dashboard.scrapyd.scrapyd_db import Sql... | 46.199153 | 120 | 0.604879 |
7359bba7e09630706e6e5d4a81fb814a396993e5 | 1,750 | py | Python | apps/shared/storage.py | bensternthal/affiliates | e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1 | [
"BSD-3-Clause"
] | null | null | null | apps/shared/storage.py | bensternthal/affiliates | e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1 | [
"BSD-3-Clause"
] | null | null | null | apps/shared/storage.py | bensternthal/affiliates | e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1 | [
"BSD-3-Clause"
] | null | null | null | import os
from tempfile import mkstemp
from django.conf import settings
from django.core.files import locks
from django.core.files.move import file_move_safe
from django.core.files.storage import FileSystemStorage
from django.utils.text import get_valid_filename
| 32.407407 | 79 | 0.652571 |
735a0631d562698eec79867185c8831049a8bf3f | 3,783 | py | Python | bin/dupeFinder.py | kebman/dupe-finder-py | 3ac23da711577466043b5032a4022516f4ccef95 | [
"BSD-3-Clause"
] | 1 | 2018-02-17T09:00:48.000Z | 2018-02-17T09:00:48.000Z | bin/dupeFinder.py | kebman/dupe-finder-py | 3ac23da711577466043b5032a4022516f4ccef95 | [
"BSD-3-Clause"
] | null | null | null | bin/dupeFinder.py | kebman/dupe-finder-py | 3ac23da711577466043b5032a4022516f4ccef95 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
import os
import hashlib
import datetime
import sqlite3
from sqlite3 import Error
def sha256(fname):
"""Return sha256 hash from input file (fname).
:param fname:
:return: Sha256 hash digest in hexadecimal"""
hash_sha256 = hashlib.sha256()
with open(fname, "rb") as f:
for chunk in iter(lam... | 29.787402 | 111 | 0.694422 |
735afc924941206a74f98559fb49787e7b5af8e7 | 309 | py | Python | Python/factorialIterative.py | Ricardoengithub/Factorial | 0c45201bbe1ad94bf0d090381eb662cf2a281fda | [
"MIT"
] | null | null | null | Python/factorialIterative.py | Ricardoengithub/Factorial | 0c45201bbe1ad94bf0d090381eb662cf2a281fda | [
"MIT"
] | null | null | null | Python/factorialIterative.py | Ricardoengithub/Factorial | 0c45201bbe1ad94bf0d090381eb662cf2a281fda | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 15.45 | 43 | 0.501618 |
735c291e6927c7998102106ab071603c6808076b | 5,919 | py | Python | code_old/sort.py | benwoo1110/A-List-of-Sorts-v2 | 2d404bda6c6ddc689e705cad6966f2a656ddac2f | [
"MIT"
] | 6 | 2020-06-29T01:57:44.000Z | 2022-01-14T09:00:03.000Z | code_old/sort.py | benwoo1110/A-List-of-Sorts-v2 | 2d404bda6c6ddc689e705cad6966f2a656ddac2f | [
"MIT"
] | null | null | null | code_old/sort.py | benwoo1110/A-List-of-Sorts-v2 | 2d404bda6c6ddc689e705cad6966f2a656ddac2f | [
"MIT"
] | 1 | 2021-03-26T04:30:37.000Z | 2021-03-26T04:30:37.000Z | ######################################
# Import and initialize the librarys #
#####################################
from code.pygame_objects import *
from code.algorithm.bubblesort import bubblesort
from code.algorithm.insertionsort import insertionsort
from code.algorithm.bogosort import bogosort
from code.algorithm.m... | 31.994595 | 112 | 0.487751 |
735e36175591a886d021d1f42c7e0f23a0bc609d | 489 | py | Python | catkin_ws/src/tutorials/scripts/number_sub.py | vipulkumbhar/AuE893Spring19_VipulKumbhar | f741d5299b2804fd541b2bba64b8a4fba8521f33 | [
"MIT"
] | 3 | 2020-12-04T22:00:12.000Z | 2022-02-09T15:53:14.000Z | catkin_ws/src/tutorials/scripts/number_sub.py | vipulkumbhar/AuE893Spring19_VipulKumbhar | f741d5299b2804fd541b2bba64b8a4fba8521f33 | [
"MIT"
] | 1 | 2020-04-15T19:58:30.000Z | 2020-04-15T19:58:30.000Z | catkin_ws/src/tutorials/scripts/number_sub.py | vipulkumbhar/AuE893Spring19_VipulKumbhar | f741d5299b2804fd541b2bba64b8a4fba8521f33 | [
"MIT"
] | 1 | 2020-05-21T21:59:21.000Z | 2020-05-21T21:59:21.000Z | #!/usr/bin/env python
import rospy
from std_msgs.msg import Int64
counter = 0
pub = None
if __name__ == '__main__':
rospy.init_node('number_counter')
sub = rospy.Subscriber("/number", Int64, callback_number)
pub = rospy.Publisher("/number_count", Int64, queue_size =10)
rospy.spin()
| 18.807692 | 66 | 0.666667 |
735e8db4e1d5d21ba03d9d6374f1111bc5cde6f4 | 806 | py | Python | setup.py | eddo888/perdy | 616473e9bde3ad58dc1ebf054fb78a7cc48c3adf | [
"MIT"
] | null | null | null | setup.py | eddo888/perdy | 616473e9bde3ad58dc1ebf054fb78a7cc48c3adf | [
"MIT"
] | null | null | null | setup.py | eddo888/perdy | 616473e9bde3ad58dc1ebf054fb78a7cc48c3adf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import codecs
from os import path
from setuptools import setup
pwd = path.abspath(path.dirname(__file__))
with codecs.open(path.join(pwd, 'README.md'), 'r', encoding='utf8') as input:
long_description = input.read()
version='1.7'
setup(
name='Perdy',
version=version,
license='MIT',
... | 19.190476 | 77 | 0.682382 |
736056399bf64b21d6f7dca419596b81048da99f | 2,658 | py | Python | utils/slack_send.py | IntelliGrape/pennypincher | d0d503eb8a480bf28f308ff52834170cca5a53d7 | [
"MIT"
] | null | null | null | utils/slack_send.py | IntelliGrape/pennypincher | d0d503eb8a480bf28f308ff52834170cca5a53d7 | [
"MIT"
] | null | null | null | utils/slack_send.py | IntelliGrape/pennypincher | d0d503eb8a480bf28f308ff52834170cca5a53d7 | [
"MIT"
] | null | null | null | from tabulate import tabulate
from slack.errors import SlackApiError
import sys
import logging
import slack
| 45.050847 | 122 | 0.598947 |
73612698a39e054c2b652bdecf1e853efdbc6d55 | 526 | py | Python | src/importer/importer.py | tiefenauer/ip7-python | 512105ba39110ec77d2ea0961dd7c2a42d4ec26d | [
"MIT"
] | null | null | null | src/importer/importer.py | tiefenauer/ip7-python | 512105ba39110ec77d2ea0961dd7c2a42d4ec26d | [
"MIT"
] | null | null | null | src/importer/importer.py | tiefenauer/ip7-python | 512105ba39110ec77d2ea0961dd7c2a42d4ec26d | [
"MIT"
] | null | null | null | import logging
from abc import ABC, abstractmethod
from pony.orm import db_session, commit
log = logging.getLogger(__name__)
| 21.04 | 52 | 0.653992 |
73617c822f5af71e4276c1b4c85554260d13ae06 | 982 | py | Python | news/pybo/migrations/0006_auto_20211010_0322.py | Smashh712/nrib | 375c9625e9efa6bb9a6f466312de3c6fcd5818a4 | [
"MIT"
] | null | null | null | news/pybo/migrations/0006_auto_20211010_0322.py | Smashh712/nrib | 375c9625e9efa6bb9a6f466312de3c6fcd5818a4 | [
"MIT"
] | null | null | null | news/pybo/migrations/0006_auto_20211010_0322.py | Smashh712/nrib | 375c9625e9efa6bb9a6f466312de3c6fcd5818a4 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-10-09 18:22
from django.db import migrations, models
| 28.882353 | 73 | 0.580448 |
7361d838090b7ba746e73857fad1d1b69e7ce317 | 852 | py | Python | anno_gen/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | null | null | null | anno_gen/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | null | null | null | anno_gen/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | 1 | 2021-09-29T04:10:10.000Z | 2021-09-29T04:10:10.000Z | import json
import os
ref = json.load(open("/home/lijun/downloads/kf1_meta/references/kf1_all.json","r"))
files = ref["filesProcessed"]
print(len(files))
output = json.load(open("/mnt/ssdb/kevinq/adaptive_temporal_shift_module/exp/iod_kf1_all/output.json","r"))
output["filesProcessed"] = files
jname = "/mnt/ssdb/ke... | 32.769231 | 107 | 0.738263 |
73622863ce396d64c3c5ebe2afec91bcbe2b4043 | 2,561 | py | Python | monotone_bipartition/search.py | mvcisback/monotone-bipartition | c92262fac14258ed25619681ebcb0f8734044d22 | [
"MIT"
] | 1 | 2017-05-17T22:47:33.000Z | 2017-05-17T22:47:33.000Z | monotone_bipartition/search.py | mvcisback/multidim-threshold | c92262fac14258ed25619681ebcb0f8734044d22 | [
"MIT"
] | 10 | 2019-04-01T17:05:14.000Z | 2020-05-01T17:23:18.000Z | monotone_bipartition/search.py | mvcisback/monotone-bipartition | c92262fac14258ed25619681ebcb0f8734044d22 | [
"MIT"
] | 4 | 2017-02-03T01:30:03.000Z | 2018-04-25T22:28:23.000Z | from enum import Enum, auto
import funcy as fn
import numpy as np
from monotone_bipartition import rectangles as mdtr
from monotone_bipartition import refine
EPS = 1e-4
def binsearch(r, oracle, eps=EPS, find_lambda=False):
"""Binary search over the diagonal of the rectangle.
Returns the lower and upper ... | 28.775281 | 77 | 0.636861 |
73623a0c8d94829ad21399f5bae6f22979a769e7 | 1,562 | py | Python | api/web/apps/auth/views.py | procool/itstructure | 6aa3a43e1a759f5509f130ddf911779645dc89d0 | [
"BSD-2-Clause"
] | null | null | null | api/web/apps/auth/views.py | procool/itstructure | 6aa3a43e1a759f5509f130ddf911779645dc89d0 | [
"BSD-2-Clause"
] | null | null | null | api/web/apps/auth/views.py | procool/itstructure | 6aa3a43e1a759f5509f130ddf911779645dc89d0 | [
"BSD-2-Clause"
] | null | null | null | from flask import url_for
from flaskcbv.view import View
from flaskcbv.conf import settings
from misc.mixins import HelperMixin
from misc.views import JSONView
| 26.474576 | 107 | 0.608195 |
7363b08e9959a774b4c96272382532b62b203a94 | 2,069 | py | Python | tests/test_heart_forest.py | RainingComputers/pykitml | 1c3e50cebcdb6c4da63979ef9a812b44d23a4857 | [
"MIT"
] | 34 | 2020-03-06T07:53:43.000Z | 2022-03-13T06:12:29.000Z | tests/test_heart_forest.py | RainingComputers/pykitml | 1c3e50cebcdb6c4da63979ef9a812b44d23a4857 | [
"MIT"
] | 6 | 2021-06-08T22:43:23.000Z | 2022-03-08T13:57:33.000Z | tests/test_heart_forest.py | RainingComputers/pykitml | 1c3e50cebcdb6c4da63979ef9a812b44d23a4857 | [
"MIT"
] | 1 | 2020-11-30T21:20:32.000Z | 2020-11-30T21:20:32.000Z | from pykitml.testing import pktest_graph, pktest_nograph
if __name__ == '__main__':
try:
test_heart_forest.__wrapped__()
test_predict_heart_forest.__wrapped__()
except AssertionError:
pass | 29.140845 | 88 | 0.685839 |
736486ab642c356a4d5f9aa4e677a035c93276d3 | 25,682 | py | Python | pdf_audit.py | marctjones/perception | 9a9fe4e5cef6a2aa66544066d8c03e0e9c3b0528 | [
"MIT"
] | null | null | null | pdf_audit.py | marctjones/perception | 9a9fe4e5cef6a2aa66544066d8c03e0e9c3b0528 | [
"MIT"
] | null | null | null | pdf_audit.py | marctjones/perception | 9a9fe4e5cef6a2aa66544066d8c03e0e9c3b0528 | [
"MIT"
] | null | null | null | from globals import Globals
import os
import subprocess
import datetime as dt
from urllib import \
request as request
# urlopen
from io import \
StringIO, BytesIO
import string
import requests
import re
import csv
import threading
import utils as utils
import time
import datetime as datetime
import multiproces... | 43.825939 | 133 | 0.50035 |
7df69847b16a72c401c8d03768fb93c74d01b5c9 | 2,114 | py | Python | morepath/tests/test_method_directive.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | morepath/tests/test_method_directive.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | morepath/tests/test_method_directive.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | import morepath
from webtest import TestApp as Client
| 21.793814 | 72 | 0.580889 |
7df6fe1ea2b65847f447c2f9cd2b5b13e71d4aef | 14,020 | py | Python | edb/edgeql/tracer.py | hyperdrivetech/edgedb | 6d84d607889eca771e902f28c2329e388fd172b0 | [
"Apache-2.0"
] | null | null | null | edb/edgeql/tracer.py | hyperdrivetech/edgedb | 6d84d607889eca771e902f28c2329e388fd172b0 | [
"Apache-2.0"
] | null | null | null | edb/edgeql/tracer.py | hyperdrivetech/edgedb | 6d84d607889eca771e902f28c2329e388fd172b0 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2015-present MagicStack Inc. and the EdgeDB 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... | 27.984032 | 78 | 0.604922 |
7df75836ee916a28f4a031535dcb56b53a8daeb4 | 255 | py | Python | libraries/website/docs/snippets/envs/tree_to_list.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 95 | 2020-01-02T23:02:34.000Z | 2022-03-08T18:57:24.000Z | libraries/website/docs/snippets/envs/tree_to_list.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 44 | 2020-01-05T03:07:45.000Z | 2021-08-11T20:45:53.000Z | libraries/website/docs/snippets/envs/tree_to_list.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 5 | 2020-04-04T16:46:36.000Z | 2022-03-30T08:10:02.000Z | from typing import List
from mathy_core import ExpressionParser, MathExpression
parser = ExpressionParser()
expression: MathExpression = parser.parse("4 + 2x")
nodes: List[MathExpression] = expression.to_list()
# len([4,+,2,*,x])
assert len(nodes) == 5
| 25.5 | 55 | 0.74902 |
7df75aa4524bb4f5a708857ab0d660fb8ccedfb8 | 603 | py | Python | math/0x04-convolutions_and_pooling/test/2-main.py | cbarros7/holbertonschool-machine_learning | 1edb4c253441f6319b86c9c590d1e7dd3fc32bf4 | [
"MIT"
] | 1 | 2022-03-09T19:12:22.000Z | 2022-03-09T19:12:22.000Z | math/0x04-convolutions_and_pooling/test/2-main.py | cbarros7/holbertonschool-machine_learning | 1edb4c253441f6319b86c9c590d1e7dd3fc32bf4 | [
"MIT"
] | null | null | null | math/0x04-convolutions_and_pooling/test/2-main.py | cbarros7/holbertonschool-machine_learning | 1edb4c253441f6319b86c9c590d1e7dd3fc32bf4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
convolve_grayscale_padding = __import__(
'2-convolve_grayscale_padding').convolve_grayscale_padding
if __name__ == '__main__':
dataset = np.load('../../supervised_learning/data/MNIST.npz')
images = dataset['X_train']
print(ima... | 27.409091 | 68 | 0.6733 |
7df78eabcc3fb72c6b36049cdb0e6b3517bdbd8a | 2,950 | py | Python | code.py | surojitnath/olympic-hero | aee1ddf291bf5097fa7fd5442483fbbe87ec001f | [
"MIT"
] | null | null | null | code.py | surojitnath/olympic-hero | aee1ddf291bf5097fa7fd5442483fbbe87ec001f | [
"MIT"
] | null | null | null | code.py | surojitnath/olympic-hero | aee1ddf291bf5097fa7fd5442483fbbe87ec001f | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Path of the file
data=pd.read_csv(path)
data.rename(columns={'Total':'Total_Medals'},inplace =True)
data.head(10)
#Code starts here
# --------------
try:
data['Better_Event'] = np.where(... | 27.570093 | 109 | 0.694915 |
7df8cceb59a2bcfb8715aedd4215b42ada0971fd | 7,096 | py | Python | planes/kissSlope/kissSlopeWing2.py | alexpGH/blenderCadCamTools | 1db2a750ed227d46e174350a2e37c4951c669867 | [
"MIT"
] | 3 | 2020-12-28T11:58:26.000Z | 2021-05-31T03:03:04.000Z | planes/kissSlope/kissSlopeWing2.py | alexpGH/blenderCadCamTools | 1db2a750ed227d46e174350a2e37c4951c669867 | [
"MIT"
] | null | null | null | planes/kissSlope/kissSlopeWing2.py | alexpGH/blenderCadCamTools | 1db2a750ed227d46e174350a2e37c4951c669867 | [
"MIT"
] | null | null | null | import bpy
import math
import numpy as np
#=== add scripts dir to path
import sys
import os
#=== define path of scripts dir
libDir=bpy.path.abspath("//../../scripts/") # version1: relative to current file
#libDir="/where/you/placed/blenderCadCam/scripts/" #version 2: usa an absolute path
if not libDir in sys.path:
... | 29.322314 | 140 | 0.567644 |
7dfb15185b5928b42e0c69caa80b31116a8fea1a | 1,715 | py | Python | saleor/order/migrations/0072_django_price_2.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 19 | 2019-12-03T17:28:07.000Z | 2021-09-10T21:30:52.000Z | saleor/order/migrations/0072_django_price_2.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 51 | 2019-12-06T08:06:07.000Z | 2021-05-06T02:10:50.000Z | saleor/order/migrations/0072_django_price_2.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 20 | 2020-02-03T00:38:59.000Z | 2022-01-03T13:07:52.000Z | # Generated by Django 2.2.4 on 2019-08-14 09:13
from django.conf import settings
from django.db import migrations, models
| 31.181818 | 85 | 0.58484 |
7dfb769eb03d5be318cb102a630728947e956816 | 9,382 | py | Python | miping/training/features.py | mclgoerg/MiningPersonalityInGerman | 4c5811a0f72100b7afef9695475a6de9251444b7 | [
"Apache-2.0"
] | 1 | 2020-09-11T01:11:19.000Z | 2020-09-11T01:11:19.000Z | miping/training/features.py | mclgoerg/MiningPersonalityInGerman | 4c5811a0f72100b7afef9695475a6de9251444b7 | [
"Apache-2.0"
] | null | null | null | miping/training/features.py | mclgoerg/MiningPersonalityInGerman | 4c5811a0f72100b7afef9695475a6de9251444b7 | [
"Apache-2.0"
] | 2 | 2020-08-12T15:57:06.000Z | 2020-12-17T18:11:03.000Z | import numpy as np
from sklearn.preprocessing import FunctionTransformer
from sklearn.pipeline import Pipeline
from sklearn.pipeline import FeatureUnion
from sklearn.preprocessing import StandardScaler
from ..models.profile import Profile
from ..interfaces.helper import Helper
from ..interfaces.glove import GloVe
fro... | 32.351724 | 77 | 0.588361 |
7dfc55af75328775b1d9e9abc358301541231f7c | 1,383 | py | Python | tests/unit/test_serializers.py | launchpadrecruits/placebo | 7b6db70a341d935a2e250b76d1ea47e56e8c9d92 | [
"Apache-2.0"
] | 1 | 2019-06-10T13:52:41.000Z | 2019-06-10T13:52:41.000Z | tests/unit/test_serializers.py | launchpadrecruits/placebo | 7b6db70a341d935a2e250b76d1ea47e56e8c9d92 | [
"Apache-2.0"
] | 1 | 2018-10-01T13:11:50.000Z | 2018-10-01T13:11:50.000Z | tests/unit/test_serializers.py | launchpadrecruits/lpr-placebo | 7b6db70a341d935a2e250b76d1ea47e56e8c9d92 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Mitch Garnaat
#
# 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 wri... | 33.731707 | 187 | 0.707158 |
7dfc5fe7b48790825f5784ca8956028cbaaac9a8 | 1,267 | py | Python | Chapter11/web_03.py | vabyte/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 84 | 2018-08-09T09:30:03.000Z | 2022-01-04T23:20:38.000Z | Chapter11/web_03.py | jiro74/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 1 | 2019-11-04T18:57:40.000Z | 2020-09-07T08:52:25.000Z | Chapter11/web_03.py | jiro74/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 33 | 2018-09-26T11:05:55.000Z | 2022-03-15T10:31:10.000Z | import urllib.request
import urllib.parse
import json
def http_request(url, query=None, method=None, headers={}, data=None):
"""Perform an HTTP request and return the associated response."""
parts = vars(urllib.parse.urlparse(url))
if query:
parts['query'] = urllib.parse.urlencode(query)
url ... | 31.675 | 75 | 0.594317 |
7dfda8cef5923a2a0d78158e8c874838389cfd46 | 3,678 | py | Python | src/oci/dns/models/external_master.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/dns/models/external_master.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/dns/models/external_master.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # 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... | 27.244444 | 245 | 0.609027 |
7dff476f5b07538c175407ac6793f4c21aad8c8f | 899 | py | Python | cinder/tests/unit/backup/fake_service_with_verify.py | puremudassir/cinder | 99aad0d094e726d328ea815cea8ebdc14957da8c | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/backup/fake_service_with_verify.py | puremudassir/cinder | 99aad0d094e726d328ea815cea8ebdc14957da8c | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/backup/fake_service_with_verify.py | puremudassir/cinder | 99aad0d094e726d328ea815cea8ebdc14957da8c | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2014 Deutsche Telekom AG
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 37.458333 | 78 | 0.719689 |
b400a722c717d6322475d075e5e6ca07343e213f | 2,195 | py | Python | src/fasttick.py | JevinJ/Bittrex-Notify | ea1057fa2fd59d191893eb7a4c31f35db789ba29 | [
"MIT"
] | 12 | 2017-08-15T08:40:44.000Z | 2018-01-30T20:55:20.000Z | src/fasttick.py | alimogh/BittrexNotify | ea1057fa2fd59d191893eb7a4c31f35db789ba29 | [
"MIT"
] | 5 | 2017-08-30T15:46:03.000Z | 2018-02-16T09:18:27.000Z | src/fasttick.py | alimogh/BittrexNotify | ea1057fa2fd59d191893eb7a4c31f35db789ba29 | [
"MIT"
] | 3 | 2017-08-28T17:58:03.000Z | 2017-12-05T02:05:18.000Z | import config
import misc
def heartbeat():
"""
Processes data from Bittrex into a simpler dictionary,
calls the save function on it, deletes the oldest
saved dictionary(if it's out of lookback range), and finally
creates a list of the best coins to be used in tkinter listboxes.
:return: A list... | 45.729167 | 99 | 0.615034 |
b4012c4378e508ce63325920dec3916fc3ec12bc | 2,325 | py | Python | src/mlb_statsapi/model/api/game.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | src/mlb_statsapi/model/api/game.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | src/mlb_statsapi/model/api/game.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | """
created by nikos at 4/26/21
"""
import datetime
from ..base import MLBStatsAPIEndpointModel
from mlb_statsapi.utils.stats_api_object import configure_api
YMDTHMS = '%Y-%m-%dT%H:%M:%SZ'
YYYYMMDD_HHMMSS = '%Y%m%d_%H%M%S'
MMDDYYYY_HHMMSS = '%m%d%Y_%H%M%S'
| 25.549451 | 64 | 0.667957 |