hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0851d8ec021205dc7bb80669be4b6689a85558b0 | 2,253 | py | Python | SqrMelon/gl_shaders.py | vslotman/sqrmelon | 3ce3fc475d24b4b716091d3bdd9486c82118e93e | [
"MIT"
] | 93 | 2018-04-14T17:29:40.000Z | 2021-05-09T23:04:51.000Z | SqrMelon/gl_shaders.py | vslotman/sqrmelon | 3ce3fc475d24b4b716091d3bdd9486c82118e93e | [
"MIT"
] | 24 | 2020-04-17T18:51:02.000Z | 2021-06-06T15:39:26.000Z | SqrMelon/gl_shaders.py | thijskruithof/sqrmelon | 05c846540686055af3559158bf4ed9e905ab1f35 | [
"MIT"
] | 8 | 2018-04-21T12:56:32.000Z | 2020-02-05T12:01:20.000Z | from OpenGL.GL import *
from OpenGL.GL.shaders import ShaderProgram
def compileProgram(*shaders, **named):
"""Create a new program, attach shaders and validate
shaders -- arbitrary number of shaders to attach to the
generated program.
separable (keyword only) -- set the separable flag to allow
... | 42.509434 | 102 | 0.700843 |
05acbb558d2ff7abee7b43b1907e422b788068ea | 835 | py | Python | backend/models/consumer_event.py | SINTEF-SE/PySSMic | 9f1883fb9309bc10946b5954437514d874a8c652 | [
"MIT"
] | null | null | null | backend/models/consumer_event.py | SINTEF-SE/PySSMic | 9f1883fb9309bc10946b5954437514d874a8c652 | [
"MIT"
] | 124 | 2018-09-11T10:44:34.000Z | 2018-11-15T12:34:58.000Z | backend/models/consumer_event.py | SINTEF-SE/PySSMic | 9f1883fb9309bc10946b5954437514d874a8c652 | [
"MIT"
] | 3 | 2018-11-14T14:59:55.000Z | 2018-11-16T08:16:31.000Z | class ConsumerEvent:
regTime = 0
startTime = 0
latestTime = 0
csvName = ""
houseId = 0
deviceId = 0
id = 0
def __init__(self, reg_time, start_time, latest_time, ids, csv_name):
self.regTime = int(reg_time)
self.startTime = int(start_time)
self.latestTime = int(la... | 33.4 | 103 | 0.579641 |
023bdf7d6ebefd2d7c50befd7d732ad266be4972 | 1,346 | py | Python | examples/wmbarb.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 125 | 2016-11-24T09:04:28.000Z | 2022-01-22T14:06:56.000Z | examples/wmbarb.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 52 | 2017-11-08T23:23:02.000Z | 2022-03-20T03:17:39.000Z | examples/wmbarb.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 25 | 2017-08-27T10:50:43.000Z | 2022-01-29T14:56:05.000Z | #
# File:
# wmbarb.py
#
# Synopsis:
# Draws four different wind barbs at different positions.
#
# Category:
# Wind barbs.
#
# Author:
# Fred Clare
#
# Date of initial publication:
# March, 2005
#
# Description:
# Draws four different wind barbs at different positions.
# Scales the sizes.
#
#... | 21.365079 | 74 | 0.637444 |
76daccb30107bf7843b57c1eb7f99f5bf509d66d | 830 | py | Python | tests/storage/conftest.py | gvtulder/vdirsyncer | 7a92aa20b1910eb5cc3c451a9a2fa62e76c80141 | [
"BSD-3-Clause"
] | 1 | 2020-11-27T04:17:28.000Z | 2020-11-27T04:17:28.000Z | tests/storage/conftest.py | scheibler/vdirsyncer | 7a92aa20b1910eb5cc3c451a9a2fa62e76c80141 | [
"BSD-3-Clause"
] | null | null | null | tests/storage/conftest.py | scheibler/vdirsyncer | 7a92aa20b1910eb5cc3c451a9a2fa62e76c80141 | [
"BSD-3-Clause"
] | 1 | 2019-09-19T09:51:36.000Z | 2019-09-19T09:51:36.000Z | # -*- coding: utf-8 -*-
import pytest
import uuid
@pytest.fixture
def slow_create_collection(request):
# We need to properly clean up because otherwise we might run into
# storage limits.
to_delete = []
def delete_collections():
for s in to_delete:
s.delete_collection()
req... | 21.842105 | 70 | 0.625301 |
6ba95a8dff924b7fc03fa4a2d47562fac9c918ed | 5,976 | py | Python | utils/paginations.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | null | null | null | utils/paginations.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | 1 | 2021-05-27T11:03:53.000Z | 2021-05-27T11:03:53.000Z | utils/paginations.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | null | null | null | from dateutil import parser
from django.conf import settings
from rest_framework.pagination import BasePagination
from rest_framework.response import Response
from utils.time_constants import MAX_TIMESTAMP
class EndlessPagination(BasePagination):
page_size = 20
def __init__(self):
super(EndlessPagina... | 42.992806 | 101 | 0.621988 |
0e2dfc6ea4090182068fcd2a46e977d84abf473d | 1,490 | py | Python | pdfstream/vend/qt_kicker.py | st3107/pdfstream | 6e1829d889e5f5400386513efe993ad0596da8a5 | [
"BSD-3-Clause"
] | null | null | null | pdfstream/vend/qt_kicker.py | st3107/pdfstream | 6e1829d889e5f5400386513efe993ad0596da8a5 | [
"BSD-3-Clause"
] | 34 | 2020-07-08T16:24:52.000Z | 2020-11-21T17:55:13.000Z | pdfstream/vend/qt_kicker.py | xpdAcq/PDFstream | dcd9a368ab80cfb61c4198b9f06d8c972b2e2538 | [
"BSD-3-Clause"
] | 5 | 2020-12-02T11:26:06.000Z | 2022-03-30T00:25:30.000Z | import asyncio
import sys
_QT_KICKER_INSTALLED = {}
def install_qt_kicker(loop=None, update_rate=0.03):
"""Install a periodic callback to integrate Qt and asyncio event loops.
If a version of the Qt bindings are not already imported, this function
will do nothing.
It is safe to call this function m... | 28.653846 | 77 | 0.671141 |
7c5e8470126deafaa3ffba9bb33d28fceece41ae | 5,244 | py | Python | src/niveristand/_decorators.py | robertkarol/niveristand-python | dd47ea4024a23c4a978636e34e0ffc8de6e2c47a | [
"MIT"
] | null | null | null | src/niveristand/_decorators.py | robertkarol/niveristand-python | dd47ea4024a23c4a978636e34e0ffc8de6e2c47a | [
"MIT"
] | null | null | null | src/niveristand/_decorators.py | robertkarol/niveristand-python | dd47ea4024a23c4a978636e34e0ffc8de6e2c47a | [
"MIT"
] | null | null | null | from functools import wraps
import inspect
from niveristand import _errormessages, errors
from niveristand.clientapi._datatypes import DataType
from niveristand.clientapi._datatypes import rtprimitives
rt_seq_mode_id = '__rtseq_mode__'
def nivs_rt_sequence(func):
from niveristand.library._tasks import get_schedu... | 35.432432 | 118 | 0.640351 |
686cfbcd990064cb3c3172a481093713183c09b4 | 15,108 | py | Python | chunky3d/vtk_utils.py | dslawinski-fp/chunky3d | 55ae4752f802b2aaf925a03a1048bf7dc292e809 | [
"MIT"
] | 7 | 2020-02-13T15:40:49.000Z | 2021-11-16T13:42:36.000Z | chunky3d/vtk_utils.py | dslawinski-fp/chunky3d | 55ae4752f802b2aaf925a03a1048bf7dc292e809 | [
"MIT"
] | 18 | 2020-02-18T11:30:32.000Z | 2022-03-30T07:17:14.000Z | chunky3d/vtk_utils.py | dslawinski-fp/chunky3d | 55ae4752f802b2aaf925a03a1048bf7dc292e809 | [
"MIT"
] | 6 | 2020-02-13T21:23:16.000Z | 2022-03-30T14:07:01.000Z | import logging
import os
import warnings
import vtk
from vtk.util import numpy_support
import numpy as np
logging.debug(("VTK version:", vtk.VTK_VERSION))
# region VTK I/O
# Great explanation of VTK file and data formats are in
# "VTK Textbook" and "VTK User Guide" chapter 12: "Readers" and 19: "VTK File Formats"... | 27.619744 | 111 | 0.672756 |
66eafc31642f6e2f6be3fa027b4861c46aea96a8 | 5,684 | py | Python | src/CCLM_OUTS.py | bijanfallah/OI_CCLM | 831efc1092c70fb75048c467f2f3157e8e15ecb7 | [
"MIT"
] | null | null | null | src/CCLM_OUTS.py | bijanfallah/OI_CCLM | 831efc1092c70fb75048c467f2f3157e8e15ecb7 | [
"MIT"
] | null | null | null | src/CCLM_OUTS.py | bijanfallah/OI_CCLM | 831efc1092c70fb75048c467f2f3157e8e15ecb7 | [
"MIT"
] | null | null | null | from __future__ import division
__author__ = 'Bijan'
'''
This is a function to plot CCLM outputs.
'''
from netCDF4 import Dataset as NetCDFFile
import numpy as np
import matplotlib.pyplot as plt
#from matplotlib.backends.backend_pdf import PdfPages
import os
import cartopy.crs as ccrs
import cartopy.feature
def rand_s... | 37.150327 | 127 | 0.57354 |
70e295b836c2e36852f53497506b46a1a6dd3900 | 152 | py | Python | Code/TDATA2RDFANDV/converter/Functions/skip_addRows.py | oeg-upm/bimerr-epw | 32f706378fc1953d74e820df498506dab92bbcd7 | [
"Apache-2.0"
] | null | null | null | Code/TDATA2RDFANDV/converter/Functions/skip_addRows.py | oeg-upm/bimerr-epw | 32f706378fc1953d74e820df498506dab92bbcd7 | [
"Apache-2.0"
] | null | null | null | Code/TDATA2RDFANDV/converter/Functions/skip_addRows.py | oeg-upm/bimerr-epw | 32f706378fc1953d74e820df498506dab92bbcd7 | [
"Apache-2.0"
] | null | null | null | def skipRows_addHeader(numberRowstoSkip,contents,headers):
contents = contents[numberRowstoSkip:]
contents.insert(0,headers)
return contents | 38 | 58 | 0.789474 |
e0fe48e352f33e2543117a85c367b330f2484dca | 1,135 | py | Python | nemo_text_processing/text_normalization/__init__.py | jinsongpan/NeMo | 27f5f2dc6ecf7e0fd4225eedb2500cee6284e7d7 | [
"Apache-2.0"
] | null | null | null | nemo_text_processing/text_normalization/__init__.py | jinsongpan/NeMo | 27f5f2dc6ecf7e0fd4225eedb2500cee6284e7d7 | [
"Apache-2.0"
] | null | null | null | nemo_text_processing/text_normalization/__init__.py | jinsongpan/NeMo | 27f5f2dc6ecf7e0fd4225eedb2500cee6284e7d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 35.46875 | 97 | 0.762115 |
26a5ab4092b2585292625836464de2f3d112e896 | 918 | py | Python | python/code_challenges/quick_sort/quick-sort.py | Edward-Regalado/data-structures-and-algorithms | 64dde17da5946fafc82b1bf7e83fc212e6b2e4cf | [
"MIT"
] | null | null | null | python/code_challenges/quick_sort/quick-sort.py | Edward-Regalado/data-structures-and-algorithms | 64dde17da5946fafc82b1bf7e83fc212e6b2e4cf | [
"MIT"
] | 20 | 2021-04-02T20:02:34.000Z | 2022-03-07T10:31:27.000Z | python/code_challenges/quick_sort/quick-sort.py | Edward-Regalado/data-structures-and-algorithms | 64dde17da5946fafc82b1bf7e83fc212e6b2e4cf | [
"MIT"
] | 1 | 2022-01-25T03:19:12.000Z | 2022-01-25T03:19:12.000Z | def partition(arr, low, high):
i = (low -1)
pivot = arr[high]
for j in range(low, high):
# if curr element is smaller than or equal to pivot
if arr[j] <= pivot:
# increment index of smaller element
i += 1
arr[i], arr[j] = arr[j], arr[i]
arr[i + 1],... | 23.538462 | 71 | 0.541394 |
e56a8b21b95b3e332b5072efbd6ca2fcc959a19d | 7,570 | py | Python | cloudmersive_validate_api_client/models/validate_postal_code_response.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 3 | 2018-06-23T21:37:21.000Z | 2020-04-20T23:07:36.000Z | cloudmersive_validate_api_client/models/validate_postal_code_response.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 1 | 2019-02-04T17:03:35.000Z | 2019-03-02T20:16:52.000Z | cloudmersive_validate_api_client/models/validate_postal_code_response.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 2 | 2019-03-21T15:54:15.000Z | 2020-05-27T17:30:43.000Z | # coding: utf-8
"""
validateapi
The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501
OpenAPI spec version: v1
Ge... | 32.913043 | 240 | 0.624571 |
a15bc11aa0e7f4299833980f93bcf33cde5e685b | 841 | py | Python | tests/test_discovery.py | jamescrowley321/py-oidc | 0e0feb0d8301de66bf98e7fe274541d05e76103b | [
"Apache-2.0"
] | 2 | 2020-07-06T16:47:32.000Z | 2020-07-30T16:44:18.000Z | tests/test_discovery.py | jamescrowley321/py-identity-model | 0e0feb0d8301de66bf98e7fe274541d05e76103b | [
"Apache-2.0"
] | 18 | 2020-07-02T18:48:48.000Z | 2021-08-01T21:53:35.000Z | tests/test_discovery.py | jamescrowley321/py-identity-model | 0e0feb0d8301de66bf98e7fe274541d05e76103b | [
"Apache-2.0"
] | null | null | null | from py_identity_model import DiscoveryDocumentRequest, get_discovery_document
from .test_utils import get_config
TEST_DISCO_ADDRESS = get_config()["TEST_DISCO_ADDRESS"]
def test_get_discovery_document_is_successful():
disco_doc_request = DiscoveryDocumentRequest(address=TEST_DISCO_ADDRESS)
disco_doc_respons... | 40.047619 | 87 | 0.83591 |
79d0d6238a0b80a693cd75b1fbf6e38dd518c185 | 6,810 | py | Python | src/aceinna/devices/parsers/dum_packet_parser.py | xhaidong/python-openimu | 9cd20ed61f62d0abd964e37700972bc97e3d0e8c | [
"Apache-2.0"
] | null | null | null | src/aceinna/devices/parsers/dum_packet_parser.py | xhaidong/python-openimu | 9cd20ed61f62d0abd964e37700972bc97e3d0e8c | [
"Apache-2.0"
] | null | null | null | src/aceinna/devices/parsers/dum_packet_parser.py | xhaidong/python-openimu | 9cd20ed61f62d0abd964e37700972bc97e3d0e8c | [
"Apache-2.0"
] | null | null | null | import struct
import collections
from ..dmu.configuration_field import CONFIGURATION_FIELD_DEFINES_SINGLETON
from ..dmu.eeprom_field import EEPROM_FIELD_DEFINES_SINGLETON
from .dmu_field_parser import decode_value
class DMU_PACKET_STATUS(object):
PREV_PACKET_TYPE = ''
PREV_TIME_FIELD_VALUE = ''
PRE_ELAPSE... | 27.24 | 108 | 0.59163 |
77e7284d70c27288d68de2f6522f0b367e0597cc | 1,782 | py | Python | test.py | Barbany/Multi-speaker-Neural-Vocoder | a3f5c266603b17bcbe264e750947140f302272c8 | [
"MIT"
] | 13 | 2018-06-27T09:59:25.000Z | 2021-05-28T08:05:52.000Z | test.py | Barbany/Multi-speaker-Neural-Vocoder | a3f5c266603b17bcbe264e750947140f302272c8 | [
"MIT"
] | 2 | 2018-06-28T02:05:41.000Z | 2020-03-02T14:00:04.000Z | test.py | Barbany/Multi-speaker-Neural-Vocoder | a3f5c266603b17bcbe264e750947140f302272c8 | [
"MIT"
] | 3 | 2018-06-28T02:02:20.000Z | 2019-08-11T04:04:32.000Z | import torch
import numpy as np
from torch.utils.data import Dataset, DataLoader
import utils
class myDataset(Dataset):
def __init__(self):
ratio_min=0
ratio_max=0.8
npynamecond= 'conditioning'+'_'+str(ratio_min)+'_'+str(ratio_max)+'.npy'
npynamedata= 'cdatamatrix'+'_'+st... | 27.415385 | 80 | 0.609989 |
7012401ed95c292ade5baa5f293d6fe2fc7ae2f6 | 3,598 | py | Python | scripts/generateProjectionEvalData.py | dsbrown1331/safe-imitation-learning | dc4f40a7f51f4ff98994371d6aa026ec8181557a | [
"MIT"
] | 1 | 2020-05-22T14:04:50.000Z | 2020-05-22T14:04:50.000Z | scripts/generateProjectionEvalData.py | dsbrown1331/safe-imitation-learning | dc4f40a7f51f4ff98994371d6aa026ec8181557a | [
"MIT"
] | null | null | null | scripts/generateProjectionEvalData.py | dsbrown1331/safe-imitation-learning | dc4f40a7f51f4ff98994371d6aa026ec8181557a | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import bound_methods
from numpy import nan, inf
#plot results for experiment4_1
#rewards are feasible in that all start states end up at goal within 25 steps
sample_flag = 4
chain_length = 10000
step = 0.01
alpha = 100
size = 9
num_reps = 200
rolloutLength = 100
numD... | 33.943396 | 287 | 0.594497 |
c556cc90be67c813e6fe42c8e3201dfddb3021d1 | 3,306 | py | Python | convlab/human_eval/run.py | ngduyanhece/ConvLab | a04582a77537c1a706fbf64715baa9ad0be1301a | [
"MIT"
] | 405 | 2019-06-17T05:38:47.000Z | 2022-03-29T15:16:51.000Z | convlab/human_eval/run.py | ngduyanhece/ConvLab | a04582a77537c1a706fbf64715baa9ad0be1301a | [
"MIT"
] | 69 | 2019-06-20T22:57:41.000Z | 2022-03-04T12:12:07.000Z | convlab/human_eval/run.py | ngduyanhece/ConvLab | a04582a77537c1a706fbf64715baa9ad0be1301a | [
"MIT"
] | 124 | 2019-06-17T05:11:23.000Z | 2021-12-31T05:58:18.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
from parlai.core.params import ParlaiParser
from parlai.mturk.core.mturk_manager import MTurkManager
from task_config import task_config
from worlds import MultiWozEvalWorld
MASTER_QUALIF = {
'QualificationTypeId': '2F1QJWKUDD8XAD... | 28.016949 | 78 | 0.652753 |
4a4f7f114fd195de82b345d89cdc0b90326b77d6 | 1,205 | py | Python | python/Ip scanner/main.py | Abhishek-op/Awful-Scripts | 28902890155f54631ab0fd0c341ad7cba24ac425 | [
"MIT"
] | 2 | 2021-07-20T12:56:28.000Z | 2021-12-13T02:53:51.000Z | python/Ip scanner/main.py | Abhishek-op/Awful-Scripts | 28902890155f54631ab0fd0c341ad7cba24ac425 | [
"MIT"
] | null | null | null | python/Ip scanner/main.py | Abhishek-op/Awful-Scripts | 28902890155f54631ab0fd0c341ad7cba24ac425 | [
"MIT"
] | null | null | null | import requests
def findip():
print("[--]Enter Hostname")
IP = input()
try:
hurl = 'http://ip-api.com/json/'
url = hurl+IP
response = requests.get(url)
return response.json()
except Exception as e:
print("[-]Error: check your net connection")
return {}
... | 29.390244 | 64 | 0.443983 |
119c66f00cdef1d73152bbf228b93ffe981f27c1 | 3,253 | py | Python | mercury_engine_data_structures/object.py | Antidote/mercury-engine-data-structures | d8e8ba1eacaa37f4fc76b78bb208ffc2cde61f64 | [
"MIT"
] | null | null | null | mercury_engine_data_structures/object.py | Antidote/mercury-engine-data-structures | d8e8ba1eacaa37f4fc76b78bb208ffc2cde61f64 | [
"MIT"
] | null | null | null | mercury_engine_data_structures/object.py | Antidote/mercury-engine-data-structures | d8e8ba1eacaa37f4fc76b78bb208ffc2cde61f64 | [
"MIT"
] | null | null | null | from typing import Dict, Union, Type
import construct
from construct import Construct, Probe, Struct, Adapter
from construct.core import FocusedSeq, Byte, If, IfThenElse, Optional, Peek
import mercury_engine_data_structures.dread_data
from mercury_engine_data_structures.common_types import make_vector
from mercury_en... | 30.401869 | 136 | 0.602828 |
adf627b923234f97f86ede0badcba405dbf2ea52 | 2,555 | py | Python | scraper.py | dietofworms/img-scraper | 81a90a5354b14d8fd4c3a2c4d6798a18bd5859a5 | [
"MIT"
] | null | null | null | scraper.py | dietofworms/img-scraper | 81a90a5354b14d8fd4c3a2c4d6798a18bd5859a5 | [
"MIT"
] | 1 | 2019-05-02T07:22:52.000Z | 2019-05-02T07:28:19.000Z | scraper.py | skarmaniolos/img-scraper | 81a90a5354b14d8fd4c3a2c4d6798a18bd5859a5 | [
"MIT"
] | null | null | null | import sys
import os
import requests
from re import sub, finditer
from bs4 import BeautifulSoup
from io import BytesIO
from PIL import Image
# gets img from url and save to destination
def download_file(url, dest_dir, filename=None):
if(filename is None):
filename = urlsplit(url).path.split("/")[-1]
... | 31.9375 | 84 | 0.564384 |
5afe7c32e42242dfd29aff70628d15841341e088 | 1,706 | py | Python | sssh/db.py | phizaz/ssher | a273fac6b8d9016dd5cc59dc32c888658ee8172c | [
"MIT"
] | 3 | 2016-06-12T07:41:58.000Z | 2018-04-13T13:36:01.000Z | sssh/db.py | phizaz/ssher | a273fac6b8d9016dd5cc59dc32c888658ee8172c | [
"MIT"
] | null | null | null | sssh/db.py | phizaz/ssher | a273fac6b8d9016dd5cc59dc32c888658ee8172c | [
"MIT"
] | null | null | null | from os.path import join, exists, dirname
DB_PATH = join(dirname(__file__), 'ssher_db.txt')
class DB:
def __init__(self):
self.db = self.read_db()
def get_name(self, name):
names = list(map(lambda x: x[0], self.db))
if name not in names:
return False
return self.db... | 27.516129 | 63 | 0.516999 |
dffed03eb0f9a2b84c31874e6b95e239366cb3eb | 3,297 | py | Python | tests/attacks/evasion/test_auto_projected_gradient_descent.py | mcguires5/adversarial-robustness-toolbox | f8b0552859eaf31c5b66e1d14d28b89178795ad0 | [
"MIT"
] | 1 | 2020-07-12T03:45:23.000Z | 2020-07-12T03:45:23.000Z | tests/attacks/evasion/test_auto_projected_gradient_descent.py | mcguires5/adversarial-robustness-toolbox | f8b0552859eaf31c5b66e1d14d28b89178795ad0 | [
"MIT"
] | 105 | 2020-08-24T06:15:43.000Z | 2022-03-24T08:03:16.000Z | tests/attacks/evasion/test_auto_projected_gradient_descent.py | mcguires5/adversarial-robustness-toolbox | f8b0552859eaf31c5b66e1d14d28b89178795ad0 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020
#
# 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
# r... | 41.734177 | 120 | 0.733394 |
dde99939b5d5fb2db0fe5f3efbc004af3fc48ac1 | 491 | py | Python | src/utils/config.py | dciborow/SubscriptionPolicy | 100718bca552fb92edcb1867a94aba1f2d131edc | [
"MIT"
] | 1 | 2021-07-23T16:37:17.000Z | 2021-07-23T16:37:17.000Z | src/utils/config.py | dciborow/SubscriptionPolicy | 100718bca552fb92edcb1867a94aba1f2d131edc | [
"MIT"
] | null | null | null | src/utils/config.py | dciborow/SubscriptionPolicy | 100718bca552fb92edcb1867a94aba1f2d131edc | [
"MIT"
] | 1 | 2021-06-16T20:12:35.000Z | 2021-06-16T20:12:35.000Z | import os
import json
class Configuration:
def __init__(self, config_path: str):
if not os.path.exists(config_path):
raise Exception("Config file not found: ", config_path)
config = None
with open(config_path, "r") as input:
config = input.readlines()
co... | 28.882353 | 67 | 0.562118 |
c3e46c53bb8d3a50ec9f534c5fa382dde246b2d5 | 4,782 | py | Python | src/reservations/azext_reservations/vendored_sdks/quota/operations/_operation_operations.py | rahuls-microsoft/azure-cli-extensions | 815a8bcf3d025af1c191498ad29456006fc30e14 | [
"MIT"
] | null | null | null | src/reservations/azext_reservations/vendored_sdks/quota/operations/_operation_operations.py | rahuls-microsoft/azure-cli-extensions | 815a8bcf3d025af1c191498ad29456006fc30e14 | [
"MIT"
] | null | null | null | src/reservations/azext_reservations/vendored_sdks/quota/operations/_operation_operations.py | rahuls-microsoft/azure-cli-extensions | 815a8bcf3d025af1c191498ad29456006fc30e14 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.318584 | 133 | 0.652656 |
734e5fd26caff99e6745ceb278598defd5d1f38e | 774 | py | Python | main.py | KidsInMyBasement/Halloween-Art-Project-21 | 616bd1254eaa81148d381b5a63613a92f91eda67 | [
"MIT"
] | null | null | null | main.py | KidsInMyBasement/Halloween-Art-Project-21 | 616bd1254eaa81148d381b5a63613a92f91eda67 | [
"MIT"
] | null | null | null | main.py | KidsInMyBasement/Halloween-Art-Project-21 | 616bd1254eaa81148d381b5a63613a92f91eda67 | [
"MIT"
] | null | null | null | import turtle
import random as rand
score = 0
#-----game configuration----
"""def score():"""
# shape = "turtle"
color = "purple"
size = 4
tr = turtle.Turtle()
wn = turtle.Screen()
wn.addshape('bg2.gif')
wn.bgcolor("black")
wn.addshape('ghost.gif')
# x = tr.shape('ghost.gif')
#-----initialize turtle-----
... | 22.114286 | 37 | 0.625323 |
3e77d7b0f59879e19f461e32e9049ae0ed623923 | 137,185 | py | Python | dojo/forms.py | maerifat/django-DefectDojo | ba1a415219ff20e8b4e909ef14f750de9b80297e | [
"BSD-3-Clause"
] | null | null | null | dojo/forms.py | maerifat/django-DefectDojo | ba1a415219ff20e8b4e909ef14f750de9b80297e | [
"BSD-3-Clause"
] | 206 | 2020-04-20T16:03:18.000Z | 2022-01-15T23:07:48.000Z | dojo/forms.py | maerifat/django-DefectDojo | ba1a415219ff20e8b4e909ef14f750de9b80297e | [
"BSD-3-Clause"
] | 1 | 2020-12-06T15:44:44.000Z | 2020-12-06T15:44:44.000Z | import os
import re
from datetime import datetime, date
import pickle
from crispy_forms.bootstrap import InlineRadios, InlineCheckboxes
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout
from django.db.models import Count, Q
from dateutil.relativedelta import relativedelta
from django imp... | 43.371799 | 311 | 0.648941 |
e7f4fbe0133ad9947c40d9b0c4cf3cb72acd027c | 2,133 | py | Python | qa/rpc-tests/getchaintips.py | monsterdev13/MonsterNode | 79be9557bb527f68eb78d944d5edb474b87cafda | [
"MIT"
] | null | null | null | qa/rpc-tests/getchaintips.py | monsterdev13/MonsterNode | 79be9557bb527f68eb78d944d5edb474b87cafda | [
"MIT"
] | null | null | null | qa/rpc-tests/getchaintips.py | monsterdev13/MonsterNode | 79be9557bb527f68eb78d944d5edb474b87cafda | [
"MIT"
] | 1 | 2018-05-13T20:34:51.000Z | 2018-05-13T20:34:51.000Z | #!/usr/bin/env python2
# Copyright (c) 2018-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, an... | 35.55 | 70 | 0.643226 |
e4c0a1b2e3e59b803d696bb85aae48a0afa85d8d | 4,473 | py | Python | bokeh/models/graphs.py | TheLaw1337/bokeh | ca6c4abf3b0cef587136b8431e9d6ee6acbedc2f | [
"BSD-3-Clause"
] | 15,193 | 2015-01-01T05:11:45.000Z | 2022-03-31T19:30:20.000Z | bokeh/models/graphs.py | TheLaw1337/bokeh | ca6c4abf3b0cef587136b8431e9d6ee6acbedc2f | [
"BSD-3-Clause"
] | 9,554 | 2015-01-01T03:16:54.000Z | 2022-03-31T22:59:39.000Z | bokeh/models/graphs.py | TheLaw1337/bokeh | ca6c4abf3b0cef587136b8431e9d6ee6acbedc2f | [
"BSD-3-Clause"
] | 4,829 | 2015-01-02T03:35:32.000Z | 2022-03-30T16:40:26.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 26.157895 | 87 | 0.484909 |
cba4135331ff19cb520c3b082edb2d2ff1a7d135 | 2,377 | py | Python | WebMirror/management/rss_parser_funcs/feed_parse_extractInfiniteNovelTranslations.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 193 | 2016-08-02T22:04:35.000Z | 2022-03-09T20:45:41.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractInfiniteNovelTranslations.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 533 | 2016-08-23T20:48:23.000Z | 2022-03-28T15:55:13.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractInfiniteNovelTranslations.py | rrosajp/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 19 | 2015-08-13T18:01:08.000Z | 2021-07-12T17:13:09.000Z | def extractInfiniteNovelTranslations(item):
"""
# Infinite Novel Translations
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
tagmap = [
('Ascendance of a Bookworm', 'Ascend... | 72.030303 | 137 | 0.430374 |
05e9657894ebf91d149b92af51ca14c18270853a | 1,391 | py | Python | src/python/logic/Decision&Loop.py | hiteshsahu/Python4ML | be193f78035d669c2c8d9da4ddd7a791e6e625f6 | [
"Apache-2.0"
] | null | null | null | src/python/logic/Decision&Loop.py | hiteshsahu/Python4ML | be193f78035d669c2c8d9da4ddd7a791e6e625f6 | [
"Apache-2.0"
] | null | null | null | src/python/logic/Decision&Loop.py | hiteshsahu/Python4ML | be193f78035d669c2c8d9da4ddd7a791e6e625f6 | [
"Apache-2.0"
] | null | null | null | """
elif = else if
Decision tree In Python
- if: elif: else:
. while : else:
- for x in : else:
Breaking & Passing
- pass : add to empty if condition
- break: breaks loop
- continue: skip loop
Range:
- range(n) : return sequence of 0 to n-1
- range(n,m): sequence of n+1,n+2 .. <m
- range(n,m,l): sequence of n,... | 18.302632 | 103 | 0.525521 |
18885bb5b36af526984077b4a5fce0438fea1c92 | 19,503 | py | Python | renderer/rasterRenderer.py | WhereGroup/mapconverter | cd0aa5f533194c85cf6e098fadc079ea61b63fce | [
"MIT"
] | 9 | 2020-05-13T13:45:54.000Z | 2022-03-30T10:43:45.000Z | renderer/rasterRenderer.py | WhereGroup/mapconverter | cd0aa5f533194c85cf6e098fadc079ea61b63fce | [
"MIT"
] | 4 | 2020-09-09T10:01:08.000Z | 2022-01-15T17:59:11.000Z | renderer/rasterRenderer.py | WhereGroup/mapconverter | cd0aa5f533194c85cf6e098fadc079ea61b63fce | [
"MIT"
] | 1 | 2022-03-16T17:08:16.000Z | 2022-03-16T17:08:16.000Z | import re
from dictionaries.raster_stretch import stretch_dict
from modules.functions import change_interface, convert_rgb_string_to_hex
from modules.arcGisModules import ArcGisModules
from feature.fills.gradientFillSymbol import FeatureGradientFillSymbol
class RasterRenderer:
def __init__(self):
pass
... | 52.286863 | 120 | 0.72153 |
b174fc4c4f6c2425d930fc815b949575d3d99dda | 9,742 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20160601/express_route_circuit_authorization.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20160601/express_route_circuit_authorization.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20160601/express_route_circuit_authorization.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 65.38255 | 3,049 | 0.722644 |
3d2c035b90f6b5b84751c78ea386c548a7766d44 | 70,468 | py | Python | python/ccxt/async_support/cdax.py | pcriadoperez/ccxt | fd0db4bad42f4f937c401cdb4cd0bcc4e716282e | [
"MIT"
] | null | null | null | python/ccxt/async_support/cdax.py | pcriadoperez/ccxt | fd0db4bad42f4f937c401cdb4cd0bcc4e716282e | [
"MIT"
] | null | null | null | python/ccxt/async_support/cdax.py | pcriadoperez/ccxt | fd0db4bad42f4f937c401cdb4cd0bcc4e716282e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.... | 45.521964 | 730 | 0.493401 |
0dce87ab67dcd7ff0be9f03509718f1a96986424 | 1,249 | py | Python | neural_compressor/experimental/common/metric.py | kevinintel/neural-compressor | b57645566aeff8d3c18dc49d2739a583c072f940 | [
"Apache-2.0"
] | 172 | 2021-09-14T18:34:17.000Z | 2022-03-30T06:49:53.000Z | neural_compressor/experimental/common/metric.py | kevinintel/neural-compressor | b57645566aeff8d3c18dc49d2739a583c072f940 | [
"Apache-2.0"
] | 40 | 2021-09-14T02:26:12.000Z | 2022-03-29T08:34:04.000Z | neural_compressor/experimental/common/metric.py | kevinintel/neural-compressor | b57645566aeff8d3c18dc49d2739a583c072f940 | [
"Apache-2.0"
] | 33 | 2021-09-15T07:27:25.000Z | 2022-03-25T08:30:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | 40.290323 | 94 | 0.710168 |
ffc466ed2934f9cb786337ae8b332b733c453f8c | 1,494 | py | Python | executionTimeCalculation/calculation.py | Leticia07/algorithm-analysis | a15592f9b26a63937bb4dadf7a3e1f1183359bed | [
"MIT"
] | null | null | null | executionTimeCalculation/calculation.py | Leticia07/algorithm-analysis | a15592f9b26a63937bb4dadf7a3e1f1183359bed | [
"MIT"
] | null | null | null | executionTimeCalculation/calculation.py | Leticia07/algorithm-analysis | a15592f9b26a63937bb4dadf7a3e1f1183359bed | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
import math
class Calculation:
def __init__(self, elements, processing):
self.elements = elements
self.processing = processing
def sortCalculation(self, complexity):
try:
return complexity / self.processing
except... | 38.307692 | 129 | 0.649264 |
9838595d34bd2b89d9c15c9b132c7e9ece48743d | 14,558 | py | Python | exchangelib/autodiscover/properties.py | mishmashclone/ecederstrand-exchangelib | 1bbae0e527dc82a45bf3b5946b438d69de96c20f | [
"BSD-2-Clause"
] | null | null | null | exchangelib/autodiscover/properties.py | mishmashclone/ecederstrand-exchangelib | 1bbae0e527dc82a45bf3b5946b438d69de96c20f | [
"BSD-2-Clause"
] | null | null | null | exchangelib/autodiscover/properties.py | mishmashclone/ecederstrand-exchangelib | 1bbae0e527dc82a45bf3b5946b438d69de96c20f | [
"BSD-2-Clause"
] | null | null | null | from ..errors import ErrorNonExistentMailbox, AutoDiscoverFailed
from ..fields import TextField, EmailAddressField, ChoiceField, Choice, EWSElementField, OnOffField, BooleanField, \
IntegerField, BuildField, ProtocolListField
from ..properties import EWSElement
from ..transport import DEFAULT_ENCODING, NOAUTH, NTLM... | 44.519878 | 127 | 0.711774 |
0e1b7225929c62869ea8df8d740fdfe69c5f6f42 | 13,488 | py | Python | tests/hdx/freshness/test_freshness_CKAN.py | OCHA-DAP/hdx-data-freshness | c5957f16cf3907749f68f05e0dd3db791c1ae348 | [
"MIT"
] | 5 | 2017-06-01T06:07:24.000Z | 2020-02-09T14:55:29.000Z | tests/hdx/freshness/test_freshness_CKAN.py | OCHA-DAP/hdx-data-freshness | c5957f16cf3907749f68f05e0dd3db791c1ae348 | [
"MIT"
] | 5 | 2017-02-28T12:19:41.000Z | 2022-02-03T22:20:23.000Z | tests/hdx/freshness/test_freshness_CKAN.py | OCHA-DAP/hdx-data-freshness | c5957f16cf3907749f68f05e0dd3db791c1ae348 | [
"MIT"
] | 1 | 2018-04-02T07:48:39.000Z | 2018-04-02T07:48:39.000Z | """
Unit tests for the freshness class.
"""
import json
import logging
import os
import random
from datetime import datetime, timedelta
from os.path import join
import gspread
import pytest
from gspread.urls import DRIVE_FILES_API_V3_URL
from hdx.data.dataset import Dataset
from hdx.database import Database
from hdx.... | 36.953425 | 95 | 0.544336 |
f2f7b345bbf4e408924db3b97c965d5c9505157f | 20,569 | py | Python | flask_multipass_cern.py | javfg/flask-multipass-cern | 7456e1fe49248cb143d03b868f6244944daabd40 | [
"MIT"
] | null | null | null | flask_multipass_cern.py | javfg/flask-multipass-cern | 7456e1fe49248cb143d03b868f6244944daabd40 | [
"MIT"
] | null | null | null | flask_multipass_cern.py | javfg/flask-multipass-cern | 7456e1fe49248cb143d03b868f6244944daabd40 | [
"MIT"
] | null | null | null | # This file is part of Flask-Multipass-CERN.
# Copyright (C) 2020 - 2021 CERN
#
# Flask-Multipass-CERN is free software; you can redistribute
# it and/or modify it under the terms of the MIT License; see
# the LICENSE file for more details.
import logging
from datetime import datetime
from functools import wraps
from ... | 39.179048 | 116 | 0.597452 |
2f9763c327f4f396299cd3982123775f0c24a2f4 | 20,602 | py | Python | cocoLRPapi-master/PythonAPI/pycocotools/cocoevalLRP.py | cancam/LRP | d7be1fd1ded2f828490bf1730c2db83d206a8d3a | [
"MIT"
] | 64 | 2018-07-05T13:39:55.000Z | 2021-09-22T08:47:01.000Z | cocoLRPapi-master/PythonAPI/pycocotools/cocoevalLRP.py | cancam/LRP | d7be1fd1ded2f828490bf1730c2db83d206a8d3a | [
"MIT"
] | 7 | 2019-07-02T11:05:45.000Z | 2020-10-17T16:58:38.000Z | cocoLRPapi-master/PythonAPI/pycocotools/cocoevalLRP.py | cancam/LRP | d7be1fd1ded2f828490bf1730c2db83d206a8d3a | [
"MIT"
] | 14 | 2018-07-11T06:30:24.000Z | 2021-03-16T01:44:24.000Z | __author__ = 'tsungyi'
import numpy as np
import datetime
import time
from collections import defaultdict
from . import mask as maskUtils
import copy
import pdb
import sys
class COCOevalLRP:
# Interface for evaluating detection on the Microsoft COCO dataset.
#
# The usage for CocoEval is as follows:
#... | 45.179825 | 196 | 0.503301 |
6dd1445246a156412af150e9775acb8e388fd242 | 718 | py | Python | dt_cw.py | jaadeoye/oral-cancer-risk-predictor | bdc8f153242c61058fab2edd8c8a160511e6046f | [
"MIT"
] | null | null | null | dt_cw.py | jaadeoye/oral-cancer-risk-predictor | bdc8f153242c61058fab2edd8c8a160511e6046f | [
"MIT"
] | null | null | null | dt_cw.py | jaadeoye/oral-cancer-risk-predictor | bdc8f153242c61058fab2edd8c8a160511e6046f | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn import metrics
import numpy as np
from imblearn.combine import SMOTEENN
from imblearn.combine import SMOTETomek
from sklearn.tree import DecisionTreeClassifier
import pickle
#import data
df_train = pd.read_csv('/Users/jaadeoye/Desktop/screen_ml/screen_full3.csv')
features = ['V1', 'V3',... | 35.9 | 85 | 0.683844 |
f4e6430a3889cbe3668e301f12aeda2306f09458 | 17,824 | py | Python | diagrams/__init__.py | vanife/diagrams | b58537bba4e954d49726e85b386acaa2bf6341c5 | [
"MIT"
] | null | null | null | diagrams/__init__.py | vanife/diagrams | b58537bba4e954d49726e85b386acaa2bf6341c5 | [
"MIT"
] | null | null | null | diagrams/__init__.py | vanife/diagrams | b58537bba4e954d49726e85b386acaa2bf6341c5 | [
"MIT"
] | null | null | null | import contextvars
import os
import uuid
from pathlib import Path
from typing import List, Union, Dict
from graphviz import Digraph
# Global contexts for a diagrams and a cluster.
#
# These global contexts are for letting the clusters and nodes know
# where context they are belong to. So the all clusters and nodes do... | 33.007407 | 122 | 0.579387 |
440bbe92b9b9a5c3956e62bc18b4aabc3e162b48 | 418 | py | Python | CRF/venv/Scripts/pip-script.py | cadia-lvl/NER | d32e7d6b6817bf5c26d237fa61739f9ef4ccd710 | [
"Apache-2.0"
] | 2 | 2021-03-19T15:13:37.000Z | 2021-03-19T16:04:43.000Z | CRF/venv/Scripts/pip-script.py | cadia-lvl/NER | d32e7d6b6817bf5c26d237fa61739f9ef4ccd710 | [
"Apache-2.0"
] | 1 | 2021-05-14T13:26:03.000Z | 2021-05-17T09:31:12.000Z | CRF/venv/Scripts/pip-script.py | cadia-lvl/NER | d32e7d6b6817bf5c26d237fa61739f9ef4ccd710 | [
"Apache-2.0"
] | 1 | 2020-09-11T09:21:40.000Z | 2020-09-11T09:21:40.000Z | #!C:\Users\auzi\PycharmProjects\CRF\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.arg... | 32.153846 | 70 | 0.645933 |
452d6a0d6432b4ac59b032f77e9d44d302bd8029 | 8,450 | py | Python | nengo/spa/spa.py | hunse/nengo | 5fcd7b18aa9496e5c47c38c6408430cd9f68a720 | [
"BSD-2-Clause"
] | null | null | null | nengo/spa/spa.py | hunse/nengo | 5fcd7b18aa9496e5c47c38c6408430cd9f68a720 | [
"BSD-2-Clause"
] | null | null | null | nengo/spa/spa.py | hunse/nengo | 5fcd7b18aa9496e5c47c38c6408430cd9f68a720 | [
"BSD-2-Clause"
] | null | null | null | import warnings
import numpy as np
import nengo
from nengo.spa.vocab import Vocabulary
from nengo.spa.module import Module
from nengo.spa.utils import enable_spa_params
from nengo.utils.compat import iteritems
class SPA(nengo.Network):
"""Base class for SPA models.
This expands the standard Network system ... | 37.723214 | 78 | 0.579408 |
1e95975f9159db8ebb7648cbb2564a7e3d5e8bcf | 2,719 | py | Python | matroids/NulityMatroid.py | PotassiumIodide/matroid-theory-in-python | 51c06ba728c9d9002234fe98b1bc84bffb86a0cb | [
"MIT"
] | 2 | 2020-11-27T09:51:49.000Z | 2021-11-10T07:16:34.000Z | matroids/NulityMatroid.py | PotassiumIodide/matroid-theory-in-python | 51c06ba728c9d9002234fe98b1bc84bffb86a0cb | [
"MIT"
] | 1 | 2020-11-16T07:22:29.000Z | 2020-11-16T07:22:29.000Z | matroids/NulityMatroid.py | PotassiumIodide/matroid-theory-in-python | 51c06ba728c9d9002234fe98b1bc84bffb86a0cb | [
"MIT"
] | null | null | null | from functools import cached_property
from typing import Callable, TypeVar
from .Matroid import Matroid
from matroids.construct import (
independent_sets,
dependent_sets,
bases,
circuits,
rank_function,
closure_function,
flats,
open_sets,
hyperplanes,
spanning_sets,
)
from .co... | 31.616279 | 92 | 0.69989 |
fcdf39a6af62f58b529253af6094fea2fe5f2541 | 122,066 | py | Python | env/lib/python3.6/site-packages/torch/_torch_docs.py | bopopescu/smart_contracts7 | 40a487cb3843e86ab5e4cb50b1aafa2095f648cd | [
"Apache-2.0"
] | null | null | null | env/lib/python3.6/site-packages/torch/_torch_docs.py | bopopescu/smart_contracts7 | 40a487cb3843e86ab5e4cb50b1aafa2095f648cd | [
"Apache-2.0"
] | null | null | null | env/lib/python3.6/site-packages/torch/_torch_docs.py | bopopescu/smart_contracts7 | 40a487cb3843e86ab5e4cb50b1aafa2095f648cd | [
"Apache-2.0"
] | 1 | 2020-07-24T17:53:25.000Z | 2020-07-24T17:53:25.000Z | """Adds docstrings to functions defined in the torch._C"""
import torch._C
from torch._C import _add_docstr as add_docstr
add_docstr(torch._C.abs,
r"""abs(input, out=None) -> Tensor
Computes the element-wise absolute value of the given :attr:`input` tensor.
Example::
>>> torch.abs(torch.FloatTensor(... | 24.123715 | 129 | 0.622032 |
c071b66bd691c5570255d730ff26a600cdb6ff5a | 32,839 | py | Python | unitorch/models/detectron2/meta_arch/yolo5.py | fuliucansheng/UniTorch | 47038321593ce4e7eabda555bd58c0cf89482146 | [
"MIT"
] | 2 | 2022-02-05T08:52:00.000Z | 2022-03-27T07:01:34.000Z | unitorch/models/detectron2/meta_arch/yolo5.py | Lixin-Qian/unitorch | 47038321593ce4e7eabda555bd58c0cf89482146 | [
"MIT"
] | null | null | null | unitorch/models/detectron2/meta_arch/yolo5.py | Lixin-Qian/unitorch | 47038321593ce4e7eabda555bd58c0cf89482146 | [
"MIT"
] | 1 | 2022-03-27T07:01:13.000Z | 2022-03-27T07:01:13.000Z | # Copyright (c) FULIUCANSHENG.
# Licensed under the MIT License.
import logging
import math
import time
import numpy as np
import torch
import torchvision
from torch import nn, Tensor
from typing import List, Dict, Tuple
from detectron2.config import configurable
from detectron2.layers import ShapeSpec, Conv2d
from d... | 40.047561 | 115 | 0.537471 |
d721a69ff8ef95e9d41900ee9f05894f8e1a9fb7 | 1,666 | py | Python | app/__init__.py | RamtinHaf/Secure-Social-media | 1958f190a36f3618fec12e51546383817d05d75c | [
"MIT"
] | null | null | null | app/__init__.py | RamtinHaf/Secure-Social-media | 1958f190a36f3618fec12e51546383817d05d75c | [
"MIT"
] | null | null | null | app/__init__.py | RamtinHaf/Secure-Social-media | 1958f190a36f3618fec12e51546383817d05d75c | [
"MIT"
] | null | null | null | from flask import Flask, g
from config import Config
from flask_bootstrap import Bootstrap
from flask_login import LoginManager, current_user
import sqlite3
import os
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from flask_wtf.csrf import CSRFProtect
# cr... | 26.03125 | 75 | 0.711885 |
f0d7a204ea0a6ea10e682179c7c520c956ff5776 | 22,474 | py | Python | tools/accuracy_checker/accuracy_checker/metrics/text_detection.py | apankratovantonp/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 5 | 2020-03-09T07:39:04.000Z | 2021-08-16T07:17:28.000Z | tools/accuracy_checker/accuracy_checker/metrics/text_detection.py | ananda89/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/accuracy_checker/metrics/text_detection.py | ananda89/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 3 | 2020-07-06T08:45:26.000Z | 2020-11-12T10:14:45.000Z | """
Copyright (c) 2019 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... | 43.638835 | 120 | 0.651775 |
77c1f2ce5210aedc3becfd36aa3e42b1d7725182 | 1,026 | py | Python | ExamplesFromChapters/Chapter3/ClusteringWithGaussians.py | pyarnold/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers | d91ec0e751f2016b5a02457de205c7c5ad9880c2 | [
"MIT"
] | 1 | 2020-12-18T01:07:45.000Z | 2020-12-18T01:07:45.000Z | ExamplesFromChapters/Chapter3/ClusteringWithGaussians.py | pyarnold/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers | d91ec0e751f2016b5a02457de205c7c5ad9880c2 | [
"MIT"
] | null | null | null | ExamplesFromChapters/Chapter3/ClusteringWithGaussians.py | pyarnold/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers | d91ec0e751f2016b5a02457de205c7c5ad9880c2 | [
"MIT"
] | null | null | null | import numpy as np
import pymc as pm
data = np.loadtxt("../../Chapter3_MCMC/data/mixture_data.csv", delimiter=",")
p = pm.Uniform("p", 0, 1)
assignment = pm.Categorical("assignment", [p, 1 - p], size=data.shape[0])
taus = 1.0 / pm.Uniform("stds", 0, 100, size=2) ** 2 # notice the size!
centers = pm.Normal("cent... | 24.428571 | 78 | 0.680312 |
77e33a71b5ce05b596f44a592aedaa3ca84bb8b2 | 4,591 | py | Python | davis2017/evaluation.py | caganselim/davisforall | e6937544763ae62efdea3fc0575a854411ea2fef | [
"BSD-3-Clause"
] | null | null | null | davis2017/evaluation.py | caganselim/davisforall | e6937544763ae62efdea3fc0575a854411ea2fef | [
"BSD-3-Clause"
] | null | null | null | davis2017/evaluation.py | caganselim/davisforall | e6937544763ae62efdea3fc0575a854411ea2fef | [
"BSD-3-Clause"
] | null | null | null | import sys
from tqdm import tqdm
import warnings
warnings.filterwarnings("ignore", category=RuntimeWarning)
import numpy as np
from davis2017.davis import VOSDataset
from davis2017.metrics import db_eval_boundary, db_eval_iou
from davis2017 import utils
from davis2017.results import Results
from scipy.optimize import ... | 49.365591 | 143 | 0.615334 |
9d25753d6827c6061abb70e5faa551ac57395864 | 6,762 | py | Python | bindings/python/ensmallen_graph/datasets/string/streptomycesrapamycinicus.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/streptomycesrapamycinicus.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/streptomycesrapamycinicus.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Streptomyces rapamycinicus.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: ... | 35.403141 | 223 | 0.706891 |
d763a026077b711e262925f14bb0dda337817bc5 | 2,609 | py | Python | python/tink/mac/_mac_key_templates.py | ekmixon/tink | 9753ffddd4d04aa56e0605ff4a0db46f2fb80529 | [
"Apache-2.0"
] | null | null | null | python/tink/mac/_mac_key_templates.py | ekmixon/tink | 9753ffddd4d04aa56e0605ff4a0db46f2fb80529 | [
"Apache-2.0"
] | null | null | null | python/tink/mac/_mac_key_templates.py | ekmixon/tink | 9753ffddd4d04aa56e0605ff4a0db46f2fb80529 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 40.138462 | 77 | 0.791491 |
a3b8d79f0ff3edf89b82633d47f102ec2d0ae59c | 3,508 | py | Python | examples/plot_letters.py | LemonLison/pystruct | 5606e643d1a0a3701b93b848a2a02c49e83c4f1e | [
"BSD-2-Clause"
] | 501 | 2015-01-06T16:24:04.000Z | 2022-03-22T03:53:03.000Z | examples/plot_letters.py | kingjr/pystruct | 23c6d8f6ab34a88b63386a595debbfdfa13345fe | [
"BSD-2-Clause"
] | 104 | 2015-01-02T19:05:04.000Z | 2022-02-13T20:18:38.000Z | examples/plot_letters.py | kingjr/pystruct | 23c6d8f6ab34a88b63386a595debbfdfa13345fe | [
"BSD-2-Clause"
] | 145 | 2015-02-04T03:42:52.000Z | 2022-03-04T13:16:37.000Z | """
===============================
OCR Letter sequence recognition
===============================
This example illustrates the use of a chain CRF for optical character
recognition. The example is taken from Taskar et al "Max-margin markov random
fields".
Each example consists of a handwritten word, that was presegme... | 38.130435 | 79 | 0.711231 |
0ff9d03a02693d17b0189cec877fdc301ee1014a | 4,179 | py | Python | run_train_and_test.py | tipt0p/periodic_behavior_bn_wd | 8d77bfc21cd011cd3d705042c2b51735ec2b8b7d | [
"Apache-2.0"
] | 1 | 2021-12-21T21:19:43.000Z | 2021-12-21T21:19:43.000Z | run_train_and_test.py | tipt0p/periodic_behavior_bn_wd | 8d77bfc21cd011cd3d705042c2b51735ec2b8b7d | [
"Apache-2.0"
] | null | null | null | run_train_and_test.py | tipt0p/periodic_behavior_bn_wd | 8d77bfc21cd011cd3d705042c2b51735ec2b8b7d | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
import os
import subprocess
import argparse
import datetime
import time
parser = argparse.ArgumentParser(description='Managing experiments')
parser.add_argument('--test', action='store_true',
help='print (test) or os.system (run)')
args = parser.parse_args()
if arg... | 33.701613 | 188 | 0.602058 |
49ff137e970c10d318e30ab3324bd5ce6bcaeda5 | 1,370 | py | Python | gcpdiag/queries/kms_stub.py | GoogleCloudPlatform/gcpdiag | 1fb20974c80b54c145cb4281d8b254a0ad59667d | [
"Apache-2.0"
] | 63 | 2021-09-28T16:29:19.000Z | 2022-03-30T02:01:15.000Z | gcpdiag/queries/kms_stub.py | GoogleCloudPlatform/gcpdiag | 1fb20974c80b54c145cb4281d8b254a0ad59667d | [
"Apache-2.0"
] | 10 | 2021-10-06T11:59:44.000Z | 2022-03-24T16:41:38.000Z | gcpdiag/queries/kms_stub.py | GoogleCloudPlatform/gcpdiag | 1fb20974c80b54c145cb4281d8b254a0ad59667d | [
"Apache-2.0"
] | 20 | 2021-09-28T18:38:29.000Z | 2022-03-24T10:19:56.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 26.862745 | 77 | 0.745985 |
8b88fd71cace5bf633a7f1bcb48b0013d126861e | 691 | py | Python | manage.py | michaldomino/Voice-interface-optimization-server | fff59d4c5db599e35d4b5f3915bbb272d2000a26 | [
"MIT"
] | null | null | null | manage.py | michaldomino/Voice-interface-optimization-server | fff59d4c5db599e35d4b5f3915bbb272d2000a26 | [
"MIT"
] | null | null | null | manage.py | michaldomino/Voice-interface-optimization-server | fff59d4c5db599e35d4b5f3915bbb272d2000a26 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Voice_interface_optimization_server.settings')
try:
from django.core.management import execute_from_... | 30.043478 | 99 | 0.691751 |
2f8b57f11d6c3fbb6d7a5ed563fecd35e13866e9 | 39,109 | py | Python | virtual/lib/python3.8/site-packages/mypy/checkmember.py | RobbinGIT/Awards | fb214ee6762a4f21be0b9fc247b939b3703daa8c | [
"MIT"
] | null | null | null | virtual/lib/python3.8/site-packages/mypy/checkmember.py | RobbinGIT/Awards | fb214ee6762a4f21be0b9fc247b939b3703daa8c | [
"MIT"
] | 2 | 2021-06-08T20:56:42.000Z | 2021-06-10T22:35:15.000Z | virtual/lib/python3.6/site-packages/mypy/checkmember.py | catherine244/Reviews | 30138f5ad09a39c1b6866c8bacf3fd0c89abbd00 | [
"MIT"
] | null | null | null | """Type checking of attribute access"""
from typing import cast, Callable, Optional, Union
from typing_extensions import TYPE_CHECKING
from mypy.types import (
Type, Instance, AnyType, TupleType, TypedDictType, CallableType, FunctionLike, TypeVarDef,
Overloaded, TypeVarType, UnionType, PartialType, TypeOfAny,... | 44.644977 | 98 | 0.633563 |
8984587f3821a057a398fd1afa0c880daf9142b2 | 6,462 | py | Python | pbesa/kernel/agent/Agent.py | akenfactory/pbesa | 2ebc731a680f14e0fba85ffef0248eb9ea4bd944 | [
"MIT"
] | 2 | 2020-10-22T22:23:40.000Z | 2021-09-14T01:18:01.000Z | pbesa/kernel/agent/Agent.py | akenfactory/pbesa | 2ebc731a680f14e0fba85ffef0248eb9ea4bd944 | [
"MIT"
] | 2 | 2020-05-27T13:59:42.000Z | 2022-03-02T14:58:12.000Z | pbesa/kernel/agent/Agent.py | akenfactory/pbesa | 2ebc731a680f14e0fba85ffef0248eb9ea4bd944 | [
"MIT"
] | 1 | 2020-05-27T13:50:40.000Z | 2020-05-27T13:50:40.000Z | # -*- coding: utf-8 -*-
"""
----------------------------------------------------------
------------------------- PBESA --------------------------
----------------------------------------------------------
@autor AKEN & SIDRE
@version 3.0.1
@date 27/07/20
"""
# --------------------------------------------------------
... | 33.65625 | 149 | 0.52476 |
db36cd1e731854737d25d8a57ab8cdd072473ff9 | 2,737 | py | Python | keg/configfile.py | 0xf4b1/keg | 3c8b63420c2f91381f06ecb744122b16c5fb65a0 | [
"MIT"
] | 16 | 2018-08-18T13:33:07.000Z | 2022-03-08T10:11:08.000Z | keg/configfile.py | MrMoonKr/keg-doc | d17aaba70fd7e8fd56960212b82323b40bfc580b | [
"MIT"
] | 9 | 2018-08-22T17:09:23.000Z | 2018-08-30T00:02:58.000Z | keg/configfile.py | MrMoonKr/keg-doc | d17aaba70fd7e8fd56960212b82323b40bfc580b | [
"MIT"
] | 4 | 2016-04-28T03:20:08.000Z | 2022-02-08T20:47:14.000Z | from collections import namedtuple
from typing import Dict, Iterable, Type, TypeVar
from . import blizini
from .patch import PatchEntry
# A content/encoding key pair
KeyPair = namedtuple("KeyPair", ["content_key", "encoding_key"])
def parse_key_pair(value: str) -> KeyPair:
"""
Parse a string that contains two or... | 30.411111 | 88 | 0.707344 |
4ba5c7e8ec1d21a008fbc8c79baa3017aaaf10bd | 728 | py | Python | src/nth_root.py | baggakunal/learning-python | 8b510f5b4bbcf4aa595b636eb61dc92947abdffb | [
"MIT"
] | null | null | null | src/nth_root.py | baggakunal/learning-python | 8b510f5b4bbcf4aa595b636eb61dc92947abdffb | [
"MIT"
] | null | null | null | src/nth_root.py | baggakunal/learning-python | 8b510f5b4bbcf4aa595b636eb61dc92947abdffb | [
"MIT"
] | null | null | null |
def nth_root(radicand: int, n: int) -> float:
return radicand ** (1/n)
def ordinal_suffix(value: int) -> str:
s = str(value)
if s.endswith('11'):
return 'th'
elif s.endswith('12'):
return 'th'
elif s.endswith('13'):
return 'th'
elif s.endswith('1'):
return 'st... | 22.060606 | 89 | 0.557692 |
1ca6491b4ed0fdc9b86e4e9964ef7e6075f7b41b | 9,456 | py | Python | stepwise_mkt_param/model_inference.py | harriliu/marketing_mix_modeling | 2a80d229d9a8652111664dc2c010720d87d07d6b | [
"MIT"
] | null | null | null | stepwise_mkt_param/model_inference.py | harriliu/marketing_mix_modeling | 2a80d229d9a8652111664dc2c010720d87d07d6b | [
"MIT"
] | null | null | null | stepwise_mkt_param/model_inference.py | harriliu/marketing_mix_modeling | 2a80d229d9a8652111664dc2c010720d87d07d6b | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import seaborn as sns
import math
class driver_analysis:
def __init__(self, beta):
self.beta = beta*(10**10)
def get_sat_lvl(self, data, ds, alpha, media_var):
'''
Retu... | 50.031746 | 144 | 0.580795 |
c6de2ff9d27cea3e5ca2f998767e207866e21de4 | 705 | py | Python | api/generator/free_ride_token_generator.py | seunkoko/tms_backend | 75a7e3bf9ddd2c4723728b3b5aed742f5976460e | [
"MIT"
] | null | null | null | api/generator/free_ride_token_generator.py | seunkoko/tms_backend | 75a7e3bf9ddd2c4723728b3b5aed742f5976460e | [
"MIT"
] | null | null | null | api/generator/free_ride_token_generator.py | seunkoko/tms_backend | 75a7e3bf9ddd2c4723728b3b5aed742f5976460e | [
"MIT"
] | null | null | null | import uuid
from datetime import datetime, timedelta
try:
from ..models import FreeRide
except:
from moov_backend.api.models import FreeRide
# free-ride token generator
def generate_free_ride_token(user_email):
free_ride_token = None
count = 1
# runs until a unique token is generated
while ... | 27.115385 | 90 | 0.699291 |
af955b0374c9c1499aadfb94e998514168b3c475 | 688 | py | Python | djaveNav/nav_with_settings.py | dasmith2/djaveNav | 8a99e310e0524a19cb4ef1b0edfe1d1845437dbc | [
"MIT"
] | null | null | null | djaveNav/nav_with_settings.py | dasmith2/djaveNav | 8a99e310e0524a19cb4ef1b0edfe1d1845437dbc | [
"MIT"
] | null | null | null | djaveNav/nav_with_settings.py | dasmith2/djaveNav | 8a99e310e0524a19cb4ef1b0edfe1d1845437dbc | [
"MIT"
] | null | null | null | """ The difference between nav and nav_with_settings is nav_with_settings puts
account stuff to the right of the navigation. So you'll probably want to use
this for your top level navigation. """
from djaveNav.nav import Nav, NavItem
class NavWithAccount(Nav):
def __init__(self, nav_list, settings_view_name, curren... | 36.210526 | 78 | 0.757267 |
d795479685400fb44e4df69fdad0f2bd829d78c9 | 418 | py | Python | hackerrank_problems/Angry_Professor.py | sreshtha10/CC | 77147ce863dab64ecb2f76dd09560d963c763fa0 | [
"MIT"
] | 2 | 2021-11-26T13:50:59.000Z | 2021-11-26T14:00:16.000Z | hackerrank_problems/Angry_Professor.py | sreshthamehrotra00/CC | 77147ce863dab64ecb2f76dd09560d963c763fa0 | [
"MIT"
] | null | null | null | hackerrank_problems/Angry_Professor.py | sreshthamehrotra00/CC | 77147ce863dab64ecb2f76dd09560d963c763fa0 | [
"MIT"
] | null | null | null | test_cases = int(input())
outcomes = []
for test in range(test_cases):
arr = list(map(int,input().split()))
student_timings = list(map(int,input().split()))
onTime = 0
for student_timing in student_timings:
if student_timing <= 0:
onTime += 1
if onTime < arr[1]:
outcomes.... | 26.125 | 52 | 0.607656 |
71471635a72b959d0f4a4d8d6b4b3cd27fd7246f | 8,609 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2020-03-03T23:11:13.000Z | 2020-03-30T18:50:55.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.284946 | 188 | 0.655477 |
c9a29219dbeb3ca0bc44425f804f7176ec73879f | 328 | py | Python | threepy/geometry/QuadGeometry.py | district10/three.py | e46a41267d210b8daecc2a0cc81350493132c8da | [
"MIT"
] | 2 | 2019-04-09T15:57:17.000Z | 2019-04-10T04:15:53.000Z | threepy/geometry/QuadGeometry.py | district10/three.py | e46a41267d210b8daecc2a0cc81350493132c8da | [
"MIT"
] | null | null | null | threepy/geometry/QuadGeometry.py | district10/three.py | e46a41267d210b8daecc2a0cc81350493132c8da | [
"MIT"
] | null | null | null | from threepy.geometry import *
class QuadGeometry(SurfaceGeometry):
def __init__(self, width=2, height=2, widthResolution=4,
heightResolution=4):
super().__init__(-width / 2, width / 2, widthResolution, -height / 2,
height / 2, heightResolution, lambda u, v: [u,... | 29.818182 | 78 | 0.606707 |
8597334d3e22e0b72f5583ba6460ae95769036f1 | 913 | py | Python | src/config.py | Scapogo/space-whiskey | be699586357515d87f904934ddd665588b7584b7 | [
"BSD-3-Clause"
] | null | null | null | src/config.py | Scapogo/space-whiskey | be699586357515d87f904934ddd665588b7584b7 | [
"BSD-3-Clause"
] | 17 | 2018-09-12T01:01:02.000Z | 2018-10-07T20:02:26.000Z | src/config.py | Scapogo/space-whiskey | be699586357515d87f904934ddd665588b7584b7 | [
"BSD-3-Clause"
] | 3 | 2018-09-15T15:39:29.000Z | 2018-10-05T17:50:26.000Z | # -*- coding: utf-8 -*-
"""
space-whiskey.config
~~~~~~~~~~~~~~
:copyright: © 2018 by Phil Royer.
:license: BSD, see LICENSE for more details.
"""
import os
import utils
import json
import logging
class Config:
def __init__(self):
self.file = 'config.json'
self.fullscreen = True
... | 24.675676 | 71 | 0.58379 |
93be0ab6a3db9db9bdfbc679c235fdb8a4e27c13 | 7,576 | py | Python | regionmask/test/test_Regions.py | COVID-Weather/regionmask | 54f2bebe5f99bd73da1341eec7d6b1d569bf5436 | [
"MIT"
] | null | null | null | regionmask/test/test_Regions.py | COVID-Weather/regionmask | 54f2bebe5f99bd73da1341eec7d6b1d569bf5436 | [
"MIT"
] | null | null | null | regionmask/test/test_Regions.py | COVID-Weather/regionmask | 54f2bebe5f99bd73da1341eec7d6b1d569bf5436 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import six
from shapely.geometry import MultiPolygon, Polygon
from regionmask import Regions, _OneRegion
# =============================================================================
# set up the testing regions
name = "Example"
numbers1 = [0, 1]
names = ["Unit Square1", "Unit Squ... | 28.916031 | 87 | 0.684398 |
6a3b642ec41430e18d4d889d74acb69254ae5482 | 4,670 | py | Python | pinakes/main/approval/tests/services/test_process_root_request.py | mkanoor/pinakes | cfcc6e8e12e9c68d7930f41075b5e4e0dfee51c3 | [
"Apache-2.0"
] | null | null | null | pinakes/main/approval/tests/services/test_process_root_request.py | mkanoor/pinakes | cfcc6e8e12e9c68d7930f41075b5e4e0dfee51c3 | [
"Apache-2.0"
] | null | null | null | pinakes/main/approval/tests/services/test_process_root_request.py | mkanoor/pinakes | cfcc6e8e12e9c68d7930f41075b5e4e0dfee51c3 | [
"Apache-2.0"
] | null | null | null | """ Module to test processing root requests """
from unittest.mock import Mock, call
import pytest
from pinakes.main.approval.tests.factories import (
WorkflowFactory,
RequestFactory,
)
from pinakes.main.approval.services.process_root_request import (
ProcessRootRequest,
)
from pinakes.main.approval.tasks i... | 31.554054 | 79 | 0.698073 |
5fbe2769664ca14075fd4a94ec343e417b91e17b | 1,259 | py | Python | src/dagster_pipeline/train_pipeline.py | hectorLop/Spanish-LaLiga-Prediction | ac7b81622a391e7b77734528b9d106190e6b8827 | [
"MIT"
] | null | null | null | src/dagster_pipeline/train_pipeline.py | hectorLop/Spanish-LaLiga-Prediction | ac7b81622a391e7b77734528b9d106190e6b8827 | [
"MIT"
] | null | null | null | src/dagster_pipeline/train_pipeline.py | hectorLop/Spanish-LaLiga-Prediction | ac7b81622a391e7b77734528b9d106190e6b8827 | [
"MIT"
] | 1 | 2021-12-15T11:06:10.000Z | 2021-12-15T11:06:10.000Z | from pathlib import Path
from src.config.config import DATA_DIR, CODE_DIR
from src.config.logger_config import logger
from src.training.utils import load_data, train_model
from dagster import solid, pipeline, Output, OutputDefinition, execute_pipeline
import pandas as pd
@solid(
output_defs=[
OutputDefini... | 33.131579 | 79 | 0.733916 |
27ae28c20ab97a2098e447c023981f244aa66e5e | 8,867 | py | Python | nnvm/tests/python/frontend/coreml/test_forward.py | dendisuhubdy/tvm | 7cb85d81968cd69576d923852d812590b93cc26d | [
"Apache-2.0"
] | null | null | null | nnvm/tests/python/frontend/coreml/test_forward.py | dendisuhubdy/tvm | 7cb85d81968cd69576d923852d812590b93cc26d | [
"Apache-2.0"
] | null | null | null | nnvm/tests/python/frontend/coreml/test_forward.py | dendisuhubdy/tvm | 7cb85d81968cd69576d923852d812590b93cc26d | [
"Apache-2.0"
] | null | null | null | import numpy as np
from coremltools.models.neural_network import NeuralNetworkBuilder
from coremltools.models import datatypes
import tvm
from tvm.contrib import graph_runtime
import topi
import topi.testing
import nnvm.symbol as sym
import nnvm.compiler
from nnvm.testing.config import ctx_list
from nnvm import front... | 37.893162 | 94 | 0.624789 |
c764718d35a02c29f16fb223b693543034dc2b6b | 3,622 | py | Python | scalability/experiments/run_response_payload_size_experiment.py | Deland-Labs/ic | 047172b01e0afc0e61448669d4ec98b2425c6853 | [
"Apache-2.0"
] | 1 | 2021-12-01T03:48:42.000Z | 2021-12-01T03:48:42.000Z | scalability/experiments/run_response_payload_size_experiment.py | Deland-Labs/ic | 047172b01e0afc0e61448669d4ec98b2425c6853 | [
"Apache-2.0"
] | null | null | null | scalability/experiments/run_response_payload_size_experiment.py | Deland-Labs/ic | 047172b01e0afc0e61448669d4ec98b2425c6853 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
In this experiment, we incrementally increase the size of the response payload and observe the
latency from the perspective of the client.
"""
import codecs
import json
import os
import sys
import gflags
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import com... | 34.169811 | 115 | 0.655163 |
82ad9fad47c0397a566aa8e032a0e698d06eafa5 | 257 | py | Python | dc_plc/dc_documents/doctype/dc_doc_meta/dc_doc_meta.py | igrekus/dc_plc | 76fbb6b1c98ff9d0de46f7979b76cd775834be79 | [
"MIT"
] | 3 | 2020-09-06T11:34:42.000Z | 2022-03-12T04:52:58.000Z | dc_plc/dc_documents/doctype/dc_doc_meta/dc_doc_meta.py | igrekus/dc_plc | 76fbb6b1c98ff9d0de46f7979b76cd775834be79 | [
"MIT"
] | null | null | null | dc_plc/dc_documents/doctype/dc_doc_meta/dc_doc_meta.py | igrekus/dc_plc | 76fbb6b1c98ff9d0de46f7979b76cd775834be79 | [
"MIT"
] | 5 | 2020-06-18T07:47:14.000Z | 2022-01-13T06:33:46.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, igrekus and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class DC_Doc_Meta(Document):
pass
| 23.363636 | 49 | 0.774319 |
20ee7c281dc4e5651547ce57cb308e369913d661 | 15,495 | py | Python | tests/test_api.py | plimy/pyhelics | b7bbde50956533496502ccc5f8b333426cfaf0c5 | [
"BSD-3-Clause"
] | null | null | null | tests/test_api.py | plimy/pyhelics | b7bbde50956533496502ccc5f8b333426cfaf0c5 | [
"BSD-3-Clause"
] | null | null | null | tests/test_api.py | plimy/pyhelics | b7bbde50956533496502ccc5f8b333426cfaf0c5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
CURRENT_DIRECTORY = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(CURRENT_DIRECTORY)
sys.path.append(os.path.dirname(CURRENT_DIRECTORY))
import time
import pytest
import pytest as pt
import helics as h
from test_init import createBroker, cr... | 41.878378 | 159 | 0.73656 |
0f5bdcadce94d6788623b2a781705dc810eaff1c | 31,292 | py | Python | predict/macbert2-f.py | DataArk/CHIP2021-Task1-Top1 | e352198d96d31c60541e4a271f20cc23b3ab6b92 | [
"Apache-2.0"
] | 15 | 2021-12-18T06:08:55.000Z | 2022-03-30T00:41:45.000Z | predict/macbert2-f.py | confstantine/nlp-task | cb152e885bc6f6f1243a12ad90b1c715eb548736 | [
"Apache-2.0"
] | 1 | 2021-12-20T05:57:37.000Z | 2021-12-20T13:43:07.000Z | predict/macbert2-f.py | DataArk/CHIP2021-Task1-Top1 | e352198d96d31c60541e4a271f20cc23b3ab6b92 | [
"Apache-2.0"
] | 1 | 2021-12-27T04:49:35.000Z | 2021-12-27T04:49:35.000Z | import os
import jieba
import torch
import pickle
import torch.nn as nn
import torch.optim as optim
from ark_nlp.dataset import TMDataset
from ark_nlp.processor.vocab import CharVocab
from ark_nlp.processor.tokenizer.tm import TransfomerTokenizer
from ark_nlp.nn import Bert
from ark_nlp.dataset import BaseDataset
imp... | 34.7303 | 162 | 0.539052 |
84f1d9b36486efc3600689e1d704186740fd137a | 1,331 | py | Python | zorg/jenkins/jobs/delete_old_jobs.py | antiagainst/llvm-zorg | a5b58cdd800d0d45b1bdd1f7fe058db6acbfd918 | [
"Apache-2.0"
] | 27 | 2019-01-15T03:03:58.000Z | 2022-03-22T23:31:36.000Z | zorg/jenkins/jobs/delete_old_jobs.py | antiagainst/llvm-zorg | a5b58cdd800d0d45b1bdd1f7fe058db6acbfd918 | [
"Apache-2.0"
] | 21 | 2020-05-29T01:12:26.000Z | 2022-03-29T20:06:22.000Z | zorg/jenkins/jobs/delete_old_jobs.py | antiagainst/llvm-zorg | a5b58cdd800d0d45b1bdd1f7fe058db6acbfd918 | [
"Apache-2.0"
] | 38 | 2019-02-10T02:46:33.000Z | 2022-03-26T10:27:29.000Z | #!/usr/bin/env python
import glob
import os
import subprocess
import sys
import time
import xml.etree.ElementTree as ET
new_jobs = set()
for g in glob.glob('build/jenkins/job/*'):
new_jobs.add(os.path.basename(g))
if len(new_jobs) == 0:
print "No new jobs?!?"
sys.exit(1)
query = subprocess.check_output([... | 25.596154 | 91 | 0.666416 |
d60c321b37e47339a7e30c9d07fd5fd703eba751 | 2,128 | py | Python | apps/journal/migrations/0001_initial.py | KolevDarko/lifehq | 88d92f5fe76f2fb6511f2a892e096d95a69985d8 | [
"MIT"
] | null | null | null | apps/journal/migrations/0001_initial.py | KolevDarko/lifehq | 88d92f5fe76f2fb6511f2a892e096d95a69985d8 | [
"MIT"
] | null | null | null | apps/journal/migrations/0001_initial.py | KolevDarko/lifehq | 88d92f5fe76f2fb6511f2a892e096d95a69985d8 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2018-05-15 13:51
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('base', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 42.56 | 155 | 0.575188 |
8a7b47f7b4eeba0b0c7e1146037bacb7b0df3f1a | 604 | py | Python | bubblesort.py | amitdubey/DataStructures_In_Python | 766cdab85c8619f7d28d4a0fa1a17288e2b13aa8 | [
"BSD-2-Clause"
] | 1 | 2021-01-29T05:18:43.000Z | 2021-01-29T05:18:43.000Z | bubblesort.py | amitdubey/DataStructures_In_Python | 766cdab85c8619f7d28d4a0fa1a17288e2b13aa8 | [
"BSD-2-Clause"
] | null | null | null | bubblesort.py | amitdubey/DataStructures_In_Python | 766cdab85c8619f7d28d4a0fa1a17288e2b13aa8 | [
"BSD-2-Clause"
] | null | null | null | from typing import List
def bubble_sort(our_list):
has_swapped = True
num_of_iterations = 0
while(has_swapped):
has_swapped = False
for i in range(len(our_list) - num_of_iterations - 1):
if our_list[i] > our_list[i+1]:
# Swap
... | 24.16 | 75 | 0.536424 |
122cd27bd44dad37ac51fe67fe39d0d69e54f773 | 182 | py | Python | config.py | longnow/plexmark | 71fe71bddbc18a413fcd11e0882bab8c1523e9a6 | [
"MIT"
] | 3 | 2021-01-07T21:50:16.000Z | 2021-03-10T02:24:46.000Z | config.py | longnow/plexmark | 71fe71bddbc18a413fcd11e0882bab8c1523e9a6 | [
"MIT"
] | null | null | null | config.py | longnow/plexmark | 71fe71bddbc18a413fcd11e0882bab8c1523e9a6 | [
"MIT"
] | null | null | null | PORT = 3004
REQUEST_TIMEOUT = 300
DB_NAME = "plx"
DB_USER = "yang"
DB_POOL_MIN = 1
DB_POOL_MAX = 3
DATA_DIR = "/opt/local/plexmark-data"
MAX_WORKERS = 5
CLEANUP_MAX_AGE = 604800
| 13 | 37 | 0.725275 |
198946886bfb63847ef912d8636d88ddaa0771fc | 2,167 | py | Python | parcels/kernels/diffusion.py | jelletreep/parcels | 7ba3e08de7de046474373f6a5fe02835fc99a8dc | [
"MIT"
] | 1 | 2020-10-01T02:27:00.000Z | 2020-10-01T02:27:00.000Z | parcels/kernels/diffusion.py | jelletreep/parcels | 7ba3e08de7de046474373f6a5fe02835fc99a8dc | [
"MIT"
] | null | null | null | parcels/kernels/diffusion.py | jelletreep/parcels | 7ba3e08de7de046474373f6a5fe02835fc99a8dc | [
"MIT"
] | null | null | null | """Collection of pre-built diffusion kernels"""
import math
from parcels import rng as random
__all__ = ['BrownianMotion2D', 'SpatiallyVaryingBrownianMotion2D']
def BrownianMotion2D(particle, fieldset, time):
"""Kernel for simple Brownian particle diffusion in zonal and meridional direction.
Assumes that f... | 45.145833 | 97 | 0.718505 |
dbd5f638ac42e78a05c3ad6f3e3b5d61cef493cd | 1,603 | py | Python | sos_trades_core/sos_processes/test/test_sellar_coupling_new_types/usecase.py | os-climate/sostrades-core | bcaa9b5e393ffbd0963e75a9315b27caf8b0abd9 | [
"Apache-2.0"
] | 8 | 2022-01-10T14:44:28.000Z | 2022-03-31T08:57:14.000Z | sos_trades_core/sos_processes/test/test_sellar_coupling_new_types/usecase.py | os-climate/sostrades-core | bcaa9b5e393ffbd0963e75a9315b27caf8b0abd9 | [
"Apache-2.0"
] | null | null | null | sos_trades_core/sos_processes/test/test_sellar_coupling_new_types/usecase.py | os-climate/sostrades-core | bcaa9b5e393ffbd0963e75a9315b27caf8b0abd9 | [
"Apache-2.0"
] | 1 | 2022-02-21T14:51:45.000Z | 2022-02-21T14:51:45.000Z | '''
Copyright 2022 Airbus SAS
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | 32.06 | 74 | 0.689956 |
b3b9827a1b7210c6bd848543c2e4969ec1d6e92a | 17,142 | py | Python | multiplayer_snake/server/server.py | sheepy0125/multiplayer-snake | 07d28c54811ff41ab1ba5bffc3ec73247021bffd | [
"MIT"
] | null | null | null | multiplayer_snake/server/server.py | sheepy0125/multiplayer-snake | 07d28c54811ff41ab1ba5bffc3ec73247021bffd | [
"MIT"
] | 5 | 2021-11-15T14:55:43.000Z | 2021-11-18T14:32:45.000Z | multiplayer_snake/server/server.py | sheepy0125/multiplayer-snake | 07d28c54811ff41ab1ba5bffc3ec73247021bffd | [
"MIT"
] | null | null | null | """
Snake, but multiplayer
Created by sheepy0125
2021-11-14
Server side code!
"""
### Setup ###
import multiplayer_snake.constants as constants
from multiplayer_snake.shared.common import hisock, pygame, Logger
from multiplayer_snake.shared.tools import (
get_public_ip,
get_discriminator,
check_username,
... | 27.78282 | 97 | 0.558745 |
bf3c4a516ae16561cfa081672b77faa8adb3fd63 | 806 | py | Python | merkle_tree/merktest.py | kevaundray/research | 16f20848c614b580071fed3d2ff1dc69688fa4f4 | [
"MIT"
] | 1,351 | 2015-09-22T08:17:10.000Z | 2022-03-31T22:48:07.000Z | merkle_tree/merktest.py | kevaundray/research | 16f20848c614b580071fed3d2ff1dc69688fa4f4 | [
"MIT"
] | 42 | 2016-08-31T14:43:29.000Z | 2021-12-05T23:10:31.000Z | merkle_tree/merktest.py | LaudateCorpus1/research | 6e8b7b367e7f1b18b4b92151df01dfeaa0774a23 | [
"MIT"
] | 334 | 2015-09-20T10:15:23.000Z | 2022-03-28T17:46:57.000Z | from merk import merkle_tree, mk_multi_proof, verify_multi_proof
def test_multi_merkle_tree():
leaves = [i.to_bytes(32, 'big') for i in range(16)]
tree = merkle_tree(leaves)
for i in range(65536):
indices = [j for j in range(16) if (i>>j)%2 == 1]
proof = mk_multi_proof(tree, indices)
... | 44.777778 | 105 | 0.645161 |
ed922ba966e4f1389ff39276c2ef5a41458b392a | 7,609 | py | Python | models/tensorflow/cnn_model_util/datasets.py | lynex/nnfusion | 6332697c71b6614ca6f04c0dac8614636882630d | [
"MIT"
] | 639 | 2020-09-05T10:00:59.000Z | 2022-03-30T08:42:39.000Z | models/tensorflow/cnn_model_util/datasets.py | QPC-database/nnfusion | 99ada47c50f355ca278001f11bc752d1c7abcee2 | [
"MIT"
] | 252 | 2020-09-09T05:35:36.000Z | 2022-03-29T04:58:41.000Z | models/tensorflow/cnn_model_util/datasets.py | QPC-database/nnfusion | 99ada47c50f355ca278001f11bc752d1c7abcee2 | [
"MIT"
] | 104 | 2020-09-05T10:01:08.000Z | 2022-03-23T10:59:13.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 30.194444 | 80 | 0.677093 |
51deb4fcaa6e73ef7bef2c193bc56f6178d2026e | 57,601 | py | Python | python/mxnet/contrib/onnx/mx2onnx/_op_translations.py | luobao-intel/incubator-mxnet | e9b138a54d41882267bc2955a3df6edd093679c7 | [
"Apache-2.0"
] | 1 | 2019-01-20T13:56:45.000Z | 2019-01-20T13:56:45.000Z | python/mxnet/contrib/onnx/mx2onnx/_op_translations.py | luobao-intel/incubator-mxnet | e9b138a54d41882267bc2955a3df6edd093679c7 | [
"Apache-2.0"
] | 2 | 2021-12-10T01:51:15.000Z | 2021-12-14T21:58:40.000Z | python/mxnet/contrib/onnx/mx2onnx/_op_translations.py | luobao-intel/incubator-mxnet | e9b138a54d41882267bc2955a3df6edd093679c7 | [
"Apache-2.0"
] | 1 | 2019-06-11T05:30:18.000Z | 2019-06-11T05:30:18.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 30.157592 | 99 | 0.638235 |
685e145e0515a89bbf1c9763fb3060dae457969c | 8,078 | py | Python | Code/PreProcessing/Task-C/PreProcessing_User_Posts_Test_TaskC.py | AshwinAmbal/CLPsych_Challenge_2019 | cc20d3458d2e52717ca93c47268d2bcfabb0b2f7 | [
"Apache-2.0"
] | null | null | null | Code/PreProcessing/Task-C/PreProcessing_User_Posts_Test_TaskC.py | AshwinAmbal/CLPsych_Challenge_2019 | cc20d3458d2e52717ca93c47268d2bcfabb0b2f7 | [
"Apache-2.0"
] | null | null | null | Code/PreProcessing/Task-C/PreProcessing_User_Posts_Test_TaskC.py | AshwinAmbal/CLPsych_Challenge_2019 | cc20d3458d2e52717ca93c47268d2bcfabb0b2f7 | [
"Apache-2.0"
] | null | null | null | import csv
from datetime import datetime
from nltk.corpus import stopwords
import nltk
import re
import unidecode
import json
#import random
from collections import defaultdict
from nltk.sentiment.vader import SentimentIntensityAnalyzer
csv.field_size_limit(100000000)
vader = SentimentIntensityAnalyzer()
with open('C:... | 38.28436 | 181 | 0.613518 |
10e33b8ea6110bc2372d883bd75b1aa3ebbf1ffd | 39,640 | py | Python | sdk/python/pulumi_azure_native/network/v20180701/express_route_circuit_peering.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20180701/express_route_circuit_peering.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20180701/express_route_circuit_peering.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 53.495277 | 6,323 | 0.691019 |
fb8dc259448bb787ad94a41117bf91663063a7ae | 5,019 | py | Python | battle_system.py | BrainiaK1911/Lochwynne-University | 804c245460568357be0d6b1127e893bac757c0cd | [
"Apache-2.0"
] | null | null | null | battle_system.py | BrainiaK1911/Lochwynne-University | 804c245460568357be0d6b1127e893bac757c0cd | [
"Apache-2.0"
] | 7 | 2021-11-29T08:35:31.000Z | 2021-11-30T09:11:02.000Z | battle_system.py | BrainiaK1911/Lochwynne-University | 804c245460568357be0d6b1127e893bac757c0cd | [
"Apache-2.0"
] | null | null | null | import time
import numpy as np
import sys
def delay_print(s):
# print one character at a time
for c in s:
sys.stdout.write(c)
sys.stdout.flush()
time.sleep(0.05)
# Create the class
class Student:
def __init__(self, name, type, abilities, level, power_ratings, health='=============... | 33.019737 | 158 | 0.569038 |
e63d0ecdd53002f980b86f943db17b9475ccccf8 | 2,318 | py | Python | testapp/tests.py | tomi77/tastypie-sorl-thumbnail | b8fb5d412401c1922891b93e10df2a8fe7f00912 | [
"MIT"
] | 1 | 2016-07-12T16:01:11.000Z | 2016-07-12T16:01:11.000Z | testapp/tests.py | tomi77/tastypie-sorl-thumbnail | b8fb5d412401c1922891b93e10df2a8fe7f00912 | [
"MIT"
] | null | null | null | testapp/tests.py | tomi77/tastypie-sorl-thumbnail | b8fb5d412401c1922891b93e10df2a8fe7f00912 | [
"MIT"
] | null | null | null | import json
import six
from django.conf import settings
from sorl.thumbnail.images import ImageFile
try:
from unittest import mock
except ImportError:
from mock import mock
try:
from tastypie.test import ResourceTestCaseMixin
from django.test import TestCase
class ThumbnailFieldTestCaseBase(Reso... | 33.114286 | 126 | 0.654443 |
6311cbce7dc2e90191ddc21590ebd2c4001f26cf | 3,806 | py | Python | data_poor_fl/coordinate_finalizers_test.py | lamylio/federated | 3f79e71344016ae5e5ec550557af25e5c169a934 | [
"Apache-2.0"
] | 1 | 2022-03-16T02:13:39.000Z | 2022-03-16T02:13:39.000Z | data_poor_fl/coordinate_finalizers_test.py | notminusone/federated | 6a709f5598450232b918c046cfeba849f479d5cb | [
"Apache-2.0"
] | null | null | null | data_poor_fl/coordinate_finalizers_test.py | notminusone/federated | 6a709f5598450232b918c046cfeba849f479d5cb | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in writing... | 40.489362 | 78 | 0.731477 |
7832111640f3fdd34bc58325abb4d35e731b4367 | 5,909 | py | Python | arcade/examples/turn_and_move.py | yegarti/arcade | 1862e61aab9a7dc646265005b0e808d953a9dfe3 | [
"MIT"
] | null | null | null | arcade/examples/turn_and_move.py | yegarti/arcade | 1862e61aab9a7dc646265005b0e808d953a9dfe3 | [
"MIT"
] | null | null | null | arcade/examples/turn_and_move.py | yegarti/arcade | 1862e61aab9a7dc646265005b0e808d953a9dfe3 | [
"MIT"
] | null | null | null | """
Turn and Move Example.
Right-click to cause the tank to move to that point.
"""
import math
import arcade
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
SCREEN_TITLE = "Turn and Move Example"
# Image might not be lined up right, set this to offset
IMAGE_ROTATION = 90
class Player(arcade.Sprite):
"""
Sprite t... | 30.61658 | 83 | 0.630733 |
a79fc2d1796c1e098408e2b7403c6198bd6b952d | 3,886 | py | Python | halici/settings.py | matua34/villageMarket | bdd183300f748afcd72ce3f87e3891bd2ed823a4 | [
"BSL-1.0"
] | null | null | null | halici/settings.py | matua34/villageMarket | bdd183300f748afcd72ce3f87e3891bd2ed823a4 | [
"BSL-1.0"
] | null | null | null | halici/settings.py | matua34/villageMarket | bdd183300f748afcd72ce3f87e3891bd2ed823a4 | [
"BSL-1.0"
] | null | null | null | """
Django settings for halici project.
Generated by 'django-admin startproject' using Django 3.1.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
f... | 26.256757 | 92 | 0.656202 |
661ea43a7d3a8569bf9d5f2f239393c2bb74d03c | 940 | py | Python | zerver/lib/camo.py | fearless0307/zulip | 378d14af7ea73a9a83c7245706cd918bec5a37bf | [
"Apache-2.0"
] | 4 | 2019-06-04T09:06:53.000Z | 2019-06-04T09:07:47.000Z | zerver/lib/camo.py | fearless0307/zulip | 378d14af7ea73a9a83c7245706cd918bec5a37bf | [
"Apache-2.0"
] | 10 | 2019-02-26T11:10:42.000Z | 2019-02-26T14:30:24.000Z | zerver/lib/camo.py | fearless0307/zulip | 378d14af7ea73a9a83c7245706cd918bec5a37bf | [
"Apache-2.0"
] | 1 | 2020-01-07T15:49:54.000Z | 2020-01-07T15:49:54.000Z | from django.conf import settings
import codecs
import hashlib
import hmac
def generate_camo_url(url: str) -> str:
encoded_url = url.encode("utf-8")
encoded_camo_key = settings.CAMO_KEY.encode("utf-8")
digest = hmac.new(encoded_camo_key, encoded_url, hashlib.sha1).hexdigest()
hex_encoded_url = codecs.en... | 37.6 | 119 | 0.71383 |
2ed0879789e84c6dde7d1099384024558511cb21 | 15,171 | py | Python | games/jyungo.py | s-en/muzero-general | b33af78155a24ae92c77021dc3ff3843c8d4bb85 | [
"MIT"
] | null | null | null | games/jyungo.py | s-en/muzero-general | b33af78155a24ae92c77021dc3ff3843c8d4bb85 | [
"MIT"
] | null | null | null | games/jyungo.py | s-en/muzero-general | b33af78155a24ae92c77021dc3ff3843c8d4bb85 | [
"MIT"
] | null | null | null | import datetime
import math
import os
import numpy
import torch
from .abstract_game import AbstractGame
class MuZeroConfig:
def __init__(self):
# More information is available here: https://github.com/werner-duvaud/muzero-general/wiki/Hyperparameter-Optimization
self.seed = 0 # Seed for numpy,... | 39.818898 | 244 | 0.602399 |
53d36ec1c8cf4eae69791c1c2f4349639651a378 | 5,371 | py | Python | sockets.py | csportat/CMPUT404-assignment-websockets | f841cca15c9841ed7258f726b2b6560e433a8800 | [
"Apache-2.0"
] | null | null | null | sockets.py | csportat/CMPUT404-assignment-websockets | f841cca15c9841ed7258f726b2b6560e433a8800 | [
"Apache-2.0"
] | null | null | null | sockets.py | csportat/CMPUT404-assignment-websockets | f841cca15c9841ed7258f726b2b6560e433a8800 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) 2013-2014 Abram Hindle
# Copyright 2021 Tianying Xia
# 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/LIC... | 28.721925 | 114 | 0.636194 |
46b640c83cdf82ec643404853c5b3ac899feac4c | 1,219 | py | Python | hazelcast/protocol/codec/list_compare_and_remove_all_codec.py | buraksezer/hazelcast-python-client | 4cc593ef7de994bd84fdac8331b81b309cce30a0 | [
"Apache-2.0"
] | 3 | 2020-05-01T15:01:54.000Z | 2021-01-27T14:51:45.000Z | hazelcast/protocol/codec/list_compare_and_remove_all_codec.py | buraksezer/hazelcast-python-client | 4cc593ef7de994bd84fdac8331b81b309cce30a0 | [
"Apache-2.0"
] | null | null | null | hazelcast/protocol/codec/list_compare_and_remove_all_codec.py | buraksezer/hazelcast-python-client | 4cc593ef7de994bd84fdac8331b81b309cce30a0 | [
"Apache-2.0"
] | 1 | 2020-12-01T20:00:35.000Z | 2020-12-01T20:00:35.000Z | from hazelcast.serialization.bits import *
from hazelcast.protocol.client_message import ClientMessage
from hazelcast.protocol.codec.list_message_type import *
REQUEST_TYPE = LIST_COMPAREANDREMOVEALL
RESPONSE_TYPE = 101
RETRYABLE = False
def calculate_size(name, values):
""" Calculates the request payload size""... | 32.078947 | 77 | 0.767842 |
63c517cfb154a32d46a5cc5fe0f22306d0d44283 | 2,238 | py | Python | embeddingapi/embedding-build-android-tests/ant/crosswalk_ant_build_app.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | embeddingapi/embedding-build-android-tests/ant/crosswalk_ant_build_app.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | embeddingapi/embedding-build-android-tests/ant/crosswalk_ant_build_app.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | 39.263158 | 80 | 0.747096 |
b10dd8a62e775e4527034aba24c33b538c3c074a | 19,141 | py | Python | services/core/MultiBuilding/multibuilding/agent.py | Entek-Technical-Services/BEMOSS3.5 | 581a205b4129530474a5ceee93cb36ef62992d4c | [
"BSD-3-Clause"
] | 73 | 2017-07-11T21:46:41.000Z | 2022-03-11T03:35:25.000Z | services/core/MultiBuilding/multibuilding/agent.py | Entek-Technical-Services/BEMOSS3.5 | 581a205b4129530474a5ceee93cb36ef62992d4c | [
"BSD-3-Clause"
] | 19 | 2017-10-10T22:06:15.000Z | 2022-03-28T21:03:33.000Z | services/core/MultiBuilding/multibuilding/agent.py | Entek-Technical-Services/BEMOSS3.5 | 581a205b4129530474a5ceee93cb36ef62992d4c | [
"BSD-3-Clause"
] | 36 | 2017-06-24T00:17:03.000Z | 2022-03-31T13:58:36.000Z | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright (c) 2015, Battelle Memorial Institute
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistrib... | 42.347345 | 90 | 0.580011 |
0ad3c89acc004dbfc2d7606fcc41c5b76321c2d8 | 1,690 | py | Python | settings.py | princeofdatamining/blueking-sample | 7d8b345d5052aa70b7f8566d3648c78655e3fced | [
"Apache-2.0"
] | null | null | null | settings.py | princeofdatamining/blueking-sample | 7d8b345d5052aa70b7f8566d3648c78655e3fced | [
"Apache-2.0"
] | 4 | 2020-02-12T03:14:14.000Z | 2021-06-10T22:05:36.000Z | settings.py | hanseryukiri/jenkins | 808c70164bb26d90f28bab542d2d5dc9e2d5e1f3 | [
"Apache-2.0"
] | 1 | 2020-03-24T06:22:40.000Z | 2020-03-24T06:22:40.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云(BlueKing) available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obt... | 36.73913 | 115 | 0.727811 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.