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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
48515b328f979a13dbeabdf77684ab84524531f5 | 26,641 | py | Python | VMBackup/main/freezesnapshotter.py | shridpant/azure-linux-extensions | 4b5e66f33d5b93b15b427a9438931f0414f12a6e | [
"Apache-2.0"
] | 266 | 2015-01-05T04:13:15.000Z | 2022-03-24T17:52:51.000Z | VMBackup/main/freezesnapshotter.py | shridpant/azure-linux-extensions | 4b5e66f33d5b93b15b427a9438931f0414f12a6e | [
"Apache-2.0"
] | 703 | 2015-01-27T07:16:57.000Z | 2022-03-29T09:01:23.000Z | VMBackup/main/freezesnapshotter.py | shridpant/azure-linux-extensions | 4b5e66f33d5b93b15b427a9438931f0414f12a6e | [
"Apache-2.0"
] | 276 | 2015-01-20T11:11:15.000Z | 2022-03-24T12:40:49.000Z | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2014 Microsoft 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
#
# U... | 59.334076 | 263 | 0.68282 |
b7e2638b6d46303e411c950202b8734b0b69224f | 2,476 | py | Python | stable_baselines/common/input.py | erniejunior/stable-baselines | 9f3346f2538e4efb3d32503d585b6a627b04fa74 | [
"MIT"
] | 49 | 2020-07-24T18:17:12.000Z | 2022-01-04T15:30:52.000Z | stable_baselines/common/input.py | erniejunior/stable-baselines | 9f3346f2538e4efb3d32503d585b6a627b04fa74 | [
"MIT"
] | 14 | 2020-07-21T20:21:08.000Z | 2022-03-12T00:42:18.000Z | stable_baselines/common/input.py | erniejunior/stable-baselines | 9f3346f2538e4efb3d32503d585b6a627b04fa74 | [
"MIT"
] | 5 | 2020-07-27T12:35:00.000Z | 2021-07-19T03:04:21.000Z | import numpy as np
import tensorflow as tf
from gym.spaces import Discrete, Box, MultiBinary, MultiDiscrete
def observation_input(ob_space, batch_size=None, name='Ob', scale=False):
"""
Build observation input with encoding depending on the observation space type
When using Box ob_space, the input will b... | 48.54902 | 118 | 0.672456 |
290291a1bdc292feef8381cf9cc85bf2aaaa0df9 | 2,249 | py | Python | tests/test_ba/test_assetmanager.py | SahandAslani/ballistica | 7e3814cd2a1920ea8f5820cb1cdbb4dc5420d30e | [
"MIT"
] | 2 | 2020-07-02T22:18:58.000Z | 2020-07-02T22:19:49.000Z | tests/test_ba/test_assetmanager.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | null | null | null | tests/test_ba/test_assetmanager.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | null | null | null | # Copyright (c) 2011-2020 Eric Froemling
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... | 36.274194 | 79 | 0.670965 |
03cab5957ee74bbcebb8dcb2d9f9aabf7ce0d7d0 | 606 | py | Python | tests/python/test_abs.py | squarefk/test_actions | dd3b0305c49b577102786eb1c24c590ef160bc30 | [
"MIT"
] | 2 | 2021-04-20T04:53:07.000Z | 2021-04-20T04:53:12.000Z | tests/python/test_abs.py | squarefk/test_actions | dd3b0305c49b577102786eb1c24c590ef160bc30 | [
"MIT"
] | 3 | 2020-08-24T09:07:15.000Z | 2020-08-24T09:18:29.000Z | tests/python/test_abs.py | squarefk/test_actions | dd3b0305c49b577102786eb1c24c590ef160bc30 | [
"MIT"
] | 1 | 2021-11-23T11:16:54.000Z | 2021-11-23T11:16:54.000Z | import taichi as ti
@ti.all_archs
def test_abs():
x = ti.field(ti.f32)
y = ti.field(ti.f32)
N = 16
ti.root.dense(ti.i, N).place(x)
ti.root.dense(ti.i, N).place(y)
ti.root.lazy_grad()
@ti.kernel
def func():
for i in range(N):
x[i] = ti.abs(y[i])
for i in rang... | 16.378378 | 37 | 0.452145 |
5485d71180870425ced043adcc39e77e3c25dd84 | 14,860 | py | Python | tests/test_ban_tk_connect.py | FlorianSW/hll_rcon_tool | 26a37b07eaab34dfb5a6d10c0f02e0fcae51dd88 | [
"MIT"
] | 49 | 2020-03-07T13:09:21.000Z | 2022-03-19T14:24:13.000Z | tests/test_ban_tk_connect.py | FlorianSW/hll_rcon_tool | 26a37b07eaab34dfb5a6d10c0f02e0fcae51dd88 | [
"MIT"
] | 48 | 2020-03-26T22:19:40.000Z | 2021-12-12T17:31:06.000Z | tests/test_ban_tk_connect.py | FlorianSW/hll_rcon_tool | 26a37b07eaab34dfb5a6d10c0f02e0fcae51dd88 | [
"MIT"
] | 48 | 2020-03-03T09:44:36.000Z | 2022-03-18T07:33:39.000Z | from unittest import mock
from rcon.game_logs import auto_ban_if_tks_right_after_connection
@mock.patch("rcon.game_logs.get_player_profile", autospec=True, return_value=None)
@mock.patch(
"rcon.game_logs.get_config",
return_value={
"BAN_TK_ON_CONNECT": {
"enabled": True,
"messa... | 41.163435 | 308 | 0.581023 |
bca9aca223e926104ce85f5b70b7161a53199330 | 1,614 | py | Python | adventofcode/twentytwenty/day8.py | Launchpaddy/adventofcode-1 | 1104b981ca2e8f65a0349cfee1d63bd2aa365d28 | [
"MIT"
] | null | null | null | adventofcode/twentytwenty/day8.py | Launchpaddy/adventofcode-1 | 1104b981ca2e8f65a0349cfee1d63bd2aa365d28 | [
"MIT"
] | null | null | null | adventofcode/twentytwenty/day8.py | Launchpaddy/adventofcode-1 | 1104b981ca2e8f65a0349cfee1d63bd2aa365d28 | [
"MIT"
] | null | null | null | def main():
calculate_num()
def calculate_num():
"""Calculate the answer
"""
total = 0
lines_run = []
total = run_recursion(0, lines_run, total)
print('Accumulator Value:', total)
return total
def run_recursion(index, lines_run, total):
"""Recursively iterate through the data to ... | 24.454545 | 74 | 0.578067 |
678eb0956582061738193912b937301d29822068 | 5,138 | py | Python | nevergrad/optimization/test_optimizerlib.py | GuodongZhu/nevergrad | 446bc2ef0c7ef318578013721843f7701507fd67 | [
"MIT"
] | 1 | 2019-01-28T19:52:06.000Z | 2019-01-28T19:52:06.000Z | nevergrad/optimization/test_optimizerlib.py | GuodongZhu/nevergrad | 446bc2ef0c7ef318578013721843f7701507fd67 | [
"MIT"
] | null | null | null | nevergrad/optimization/test_optimizerlib.py | GuodongZhu/nevergrad | 446bc2ef0c7ef318578013721843f7701507fd67 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import random
import warnings
from pathlib import Path
from unittest import SkipTest
from unittest import TestCase
from t... | 45.469027 | 130 | 0.673998 |
a23ffd86da7d7249f2bf0c69a4bfdd26cee3e9ee | 636 | py | Python | sgx-ansible/roles/role-gantsign.keyboard/molecule/default/tests/test_role.py | integritee-network/sgx-setup | f685041ef1b0611a5a28ee624e4695e06788f825 | [
"Apache-2.0"
] | 4 | 2019-10-11T13:51:27.000Z | 2021-06-17T12:55:52.000Z | sgx-ansible/roles/role-gantsign.keyboard/molecule/default/tests/test_role.py | integritee-network/sgx-setup | f685041ef1b0611a5a28ee624e4695e06788f825 | [
"Apache-2.0"
] | 8 | 2021-09-10T08:52:48.000Z | 2022-02-07T14:59:22.000Z | sgx-ansible/roles/role-gantsign.keyboard/molecule/default/tests/test_role.py | integritee-network/sgx-setup | f685041ef1b0611a5a28ee624e4695e06788f825 | [
"Apache-2.0"
] | 1 | 2021-05-22T12:54:31.000Z | 2021-05-22T12:54:31.000Z | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_keyboard_file(host):
kb = host.file('/etc/default/keyboard')
assert kb.exists
assert kb.is_file
assert kb.user == 'roo... | 27.652174 | 67 | 0.709119 |
d03316a7647f1d0f736db34ce4d3d362aa3b0c4d | 3,412 | py | Python | PS_utils.py | thuyvytran/CAPS-Continuous-Action-Policy-Shaping | ff44ab20119ba9fccecb2e86d5eaf6e0c0119ac7 | [
"MIT"
] | null | null | null | PS_utils.py | thuyvytran/CAPS-Continuous-Action-Policy-Shaping | ff44ab20119ba9fccecb2e86d5eaf6e0c0119ac7 | [
"MIT"
] | null | null | null | PS_utils.py | thuyvytran/CAPS-Continuous-Action-Policy-Shaping | ff44ab20119ba9fccecb2e86d5eaf6e0c0119ac7 | [
"MIT"
] | null | null | null | from operator import truediv
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from torch.distributions.normal import Normal
from scipy.special import expit
def sample_normal(agent, actor, observation, with_noise=False, max_action=2, env_only=False,
with_grad_en... | 37.494505 | 101 | 0.55129 |
a7f67df4ebf915dcaf1290c750d0329ee819e7d1 | 8,143 | py | Python | microsoft_network_monitor_v2.py | Vector35/kaitai | 71fd8c31289aaeba12f48ae394631f9a56cfe056 | [
"MIT"
] | 20 | 2019-09-28T01:44:58.000Z | 2022-03-09T08:35:56.000Z | microsoft_network_monitor_v2.py | Vector35/kaitai | 71fd8c31289aaeba12f48ae394631f9a56cfe056 | [
"MIT"
] | 4 | 2020-12-23T01:51:26.000Z | 2021-12-15T14:41:50.000Z | microsoft_network_monitor_v2.py | Vector35/kaitai | 71fd8c31289aaeba12f48ae394631f9a56cfe056 | [
"MIT"
] | 4 | 2020-02-20T18:47:27.000Z | 2021-06-17T01:24:09.000Z | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
from pkg_resources import parse_version
from . import kaitaistruct
from .kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO
from enum import Enum
if parse_version(kaitaistruct.__version__) < parse_version('0.9'):
... | 33.236735 | 132 | 0.601253 |
2b2d6d68ed44c9b3391c5d42a892e8fcd56a4cfd | 1,768 | py | Python | src/unet/model/unet.py | happog/robin | f1ef0983fcd163e5fae722a845b3fab2d3022c56 | [
"MIT"
] | 155 | 2018-10-29T08:11:48.000Z | 2022-03-11T01:55:02.000Z | src/unet/model/unet.py | happog/robin | f1ef0983fcd163e5fae722a845b3fab2d3022c56 | [
"MIT"
] | 11 | 2018-12-19T13:16:23.000Z | 2021-11-18T00:54:20.000Z | src/unet/model/unet.py | happog/robin | f1ef0983fcd163e5fae722a845b3fab2d3022c56 | [
"MIT"
] | 35 | 2018-12-28T14:38:19.000Z | 2022-02-21T10:58:50.000Z | from keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D
from keras.layers.core import SpatialDropout2D, Activation
from keras.layers.merge import concatenate
from keras.layers.normalization import BatchNormalization
from keras.models import Model
def double_conv_layer(inputs, filter):
conv = Conv2D(fil... | 30.482759 | 103 | 0.68552 |
b15c4d6d2561cc678574fc197a95d1d1d1ffafe3 | 430 | py | Python | nni/experiment/management.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 9,680 | 2019-05-07T01:42:30.000Z | 2022-03-31T16:48:33.000Z | nni/experiment/management.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,957 | 2019-05-06T21:44:21.000Z | 2022-03-31T09:21:53.000Z | nni/experiment/management.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,571 | 2019-05-07T06:42:55.000Z | 2022-03-31T03:19:24.000Z | from pathlib import Path
import random
import string
def generate_experiment_id() -> str:
return ''.join(random.sample(string.ascii_lowercase + string.digits, 8))
def create_experiment_directory(experiment_id: str) -> Path:
path = Path.home() / 'nni-experiments' / experiment_id
path.mkdir(parents=True, ... | 25.294118 | 76 | 0.732558 |
0f26057d79542601d19c88ce02a0452c25b9ee6b | 12,585 | py | Python | sdk/python/pulumi_azure_native/hanaonazure/outputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/hanaonazure/outputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/hanaonazure/outputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"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
from... | 34.291553 | 197 | 0.626857 |
ed1247ca00d325b3abde76f5cb8ce083eee97e7e | 36,417 | py | Python | tests/acceptance/test_Urls.py | AntonKuzminRussia/web-scout | 5b8fed2c5917c9ecc210052703a65f1204f4b347 | [
"MIT"
] | 6 | 2017-10-11T18:56:05.000Z | 2019-09-29T21:45:05.000Z | tests/acceptance/test_Urls.py | AntonKuzminRussia/web-scout | 5b8fed2c5917c9ecc210052703a65f1204f4b347 | [
"MIT"
] | 3 | 2021-03-31T19:17:30.000Z | 2021-12-13T20:16:23.000Z | tests/acceptance/test_Urls.py | AntonKuzminRussia/web-scout | 5b8fed2c5917c9ecc210052703a65f1204f4b347 | [
"MIT"
] | null | null | null | import subprocess
import os
import time
import re
runPath = os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + '/../../')
#TODO tests re as re, not as str only
class Test_Urls(object):
dict_path = '/tmp/wstest.dict'
headers_file_path = '/tmp/wstest.headers_file'
def get_results_count(self, out... | 33.287934 | 169 | 0.5046 |
c812e6345ce23046dfab6e30c21976fdde2c7039 | 912 | py | Python | make_recog_data.py | piruty/voice_actor_recog | e13abd51fc88f841b1bfb49c29def397014cfa22 | [
"MIT"
] | 4 | 2017-06-15T05:49:56.000Z | 2019-03-24T15:25:06.000Z | make_recog_data.py | piruty/voice_actor_recog | e13abd51fc88f841b1bfb49c29def397014cfa22 | [
"MIT"
] | null | null | null | make_recog_data.py | piruty/voice_actor_recog | e13abd51fc88f841b1bfb49c29def397014cfa22 | [
"MIT"
] | null | null | null | import subprocess
import time
from progressbar import ProgressBar
import make_mfcc_data
def cmd(cmd):
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
return stdout.rstrip()
dirs = cmd("ls voice2")
labels = dirs.splitlines()
if 'do... | 20.727273 | 89 | 0.652412 |
2d5c5b642eb68a87a1808f1daa019d08c9457180 | 2,081 | py | Python | application/workprogramsapp/permissions.py | anastasiiaCher/analytics_backend | 4c9c5964e80a1e1c1e8a20bfdeaf6b891b6ba9ea | [
"MIT"
] | null | null | null | application/workprogramsapp/permissions.py | anastasiiaCher/analytics_backend | 4c9c5964e80a1e1c1e8a20bfdeaf6b891b6ba9ea | [
"MIT"
] | null | null | null | application/workprogramsapp/permissions.py | anastasiiaCher/analytics_backend | 4c9c5964e80a1e1c1e8a20bfdeaf6b891b6ba9ea | [
"MIT"
] | null | null | null | from rest_framework import permissions
from workprogramsapp.expertise.models import UserExpertise
class IsOwnerOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow owners of an object to edit it.
"""
def has_object_permission(self, request, view, obj):
if request.metho... | 33.564516 | 111 | 0.702547 |
1d68cc20a4415b266010a969423302961650af64 | 9,152 | py | Python | assignments/assignment3/cs231n/data_utils.py | Zx55/cs231n-2019 | 448f177880bebd77abf444d1847b9059b8252c55 | [
"MIT"
] | null | null | null | assignments/assignment3/cs231n/data_utils.py | Zx55/cs231n-2019 | 448f177880bebd77abf444d1847b9059b8252c55 | [
"MIT"
] | null | null | null | assignments/assignment3/cs231n/data_utils.py | Zx55/cs231n-2019 | 448f177880bebd77abf444d1847b9059b8252c55 | [
"MIT"
] | null | null | null | from six.moves import cPickle as pickle
import numpy as np
import os
from scipy.misc import imread
import platform
def load_pickle(f):
version = platform.python_version_tuple()
if version[0] == '2':
return pickle.load(f)
elif version[0] == '3':
return pickle.load(f, encoding='latin1')
... | 34.798479 | 79 | 0.611014 |
22f2f20f825e529f60cf0292a185659398700988 | 3,835 | py | Python | app/views.py | congjinruo/JulyNovel | feff0adfecab1c21728fc177c94621b9b8707bbd | [
"Apache-2.0"
] | 5 | 2018-03-05T02:32:53.000Z | 2020-10-27T13:13:59.000Z | app/views.py | congjinruo/JulyNovel | feff0adfecab1c21728fc177c94621b9b8707bbd | [
"Apache-2.0"
] | null | null | null | app/views.py | congjinruo/JulyNovel | feff0adfecab1c21728fc177c94621b9b8707bbd | [
"Apache-2.0"
] | 1 | 2019-02-20T03:04:22.000Z | 2019-02-20T03:04:22.000Z | """
Routes and views for the flask application.
"""
# -*- coding: utf-8 -*-
import os
import requests
from config import Config
from urllib import parse
from flask import Flask, render_template, redirect, url_for, send_from_directory,request
from flask_graphql import GraphQLView
from .data.base import db_session
from .... | 26.267123 | 135 | 0.625033 |
29dcd3ff89fd7350d9335f5fa4482cad4af3e2e8 | 14,944 | py | Python | tests/test_cohort_preview_manifest.py | ImagingDataCommons/ISB-CGC-API | d3207a6ada958ad5ac3cb8834b216ec1108dcf1c | [
"Apache-2.0"
] | null | null | null | tests/test_cohort_preview_manifest.py | ImagingDataCommons/ISB-CGC-API | d3207a6ada958ad5ac3cb8834b216ec1108dcf1c | [
"Apache-2.0"
] | 5 | 2020-07-07T23:45:21.000Z | 2021-06-11T17:52:29.000Z | tests/test_cohort_preview_manifest.py | ImagingDataCommons/ISB-CGC-API | d3207a6ada958ad5ac3cb8834b216ec1108dcf1c | [
"Apache-2.0"
] | 2 | 2019-10-15T01:17:35.000Z | 2021-04-05T19:54:12.000Z | #
# Copyright 2020, Institute for Systems Biology
#
# 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 ag... | 33.506726 | 132 | 0.601847 |
8dedfb3bcc6095882561dbe17d80cf9f412c353d | 23,106 | py | Python | main.py | alldbi/Factorized-Spatial-Embeddings | f4d63ff069b735b4496d832850152bc07748c752 | [
"MIT"
] | 33 | 2018-07-16T06:10:23.000Z | 2022-03-14T16:47:14.000Z | main.py | alldbi/Factorized-Spatial-Embeddings | f4d63ff069b735b4496d832850152bc07748c752 | [
"MIT"
] | null | null | null | main.py | alldbi/Factorized-Spatial-Embeddings | f4d63ff069b735b4496d832850152bc07748c752 | [
"MIT"
] | 6 | 2018-07-16T15:03:32.000Z | 2020-07-13T13:46:23.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import glob, os, random, math, collections, time, argparse, shutil
from utils.warp import feature_warping2, image_warping2
from matplotlib import cm
# Parameter sett... | 38.89899 | 126 | 0.636242 |
9d3a329a62c37fd1b888502f8d23ddfbdbfda4f7 | 297 | py | Python | tests/test_generate_text_utils.py | Jeton-Digital/Synthetic-Data-Generator | 11e198028d1da93d9d68a2251f8372bb05ed6b60 | [
"MIT"
] | 1 | 2021-11-03T13:26:29.000Z | 2021-11-03T13:26:29.000Z | tests/test_generate_text_utils.py | Jeton-Digital/Synthetic-Data-Generator | 11e198028d1da93d9d68a2251f8372bb05ed6b60 | [
"MIT"
] | null | null | null | tests/test_generate_text_utils.py | Jeton-Digital/Synthetic-Data-Generator | 11e198028d1da93d9d68a2251f8372bb05ed6b60 | [
"MIT"
] | 1 | 2021-11-03T13:26:05.000Z | 2021-11-03T13:26:05.000Z | def not_contain_numeric(name_list):
for name in name_list:
for ch in name:
if ch.isnumeric():
return False
return True
def email_contains_at(email_list):
for email in email_list:
if "@" not in email:
return False
return True | 24.75 | 35 | 0.59596 |
e4af4945aed9b1903abda89ba191bc71670bd2f6 | 1,619 | py | Python | cheritest/trunk/tests/branch/test_raw_bltzal_gt.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 36 | 2015-05-29T16:47:19.000Z | 2022-02-08T21:16:26.000Z | cheritest/trunk/tests/branch/test_raw_bltzal_gt.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 2 | 2020-06-02T13:44:55.000Z | 2020-06-02T14:06:29.000Z | cheritest/trunk/tests/branch/test_raw_bltzal_gt.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 15 | 2015-06-11T07:10:58.000Z | 2021-06-18T05:14:54.000Z | #-
# Copyright (c) 2011 Robert N. M. Watson
# All rights reserved.
#
# This software was developed by SRI International and the University of
# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
# ("CTSRD"), as part of the DARPA CRASH research programme.
#
# @BERI_LICENSE_HEADER_START@
#
# License... | 40.475 | 95 | 0.765905 |
a8b8437ce30768ca779d7a2d82616d929f4e4765 | 2,888 | py | Python | blockrange.py | buzzkillb/snakes-on-a-chain | 09e18f0e985d3949195ed3475f2198baa2167130 | [
"MIT"
] | 4 | 2019-10-12T02:23:56.000Z | 2021-06-13T12:58:10.000Z | blockrange.py | buzzkillb/snakes-on-a-chain | 09e18f0e985d3949195ed3475f2198baa2167130 | [
"MIT"
] | null | null | null | blockrange.py | buzzkillb/snakes-on-a-chain | 09e18f0e985d3949195ed3475f2198baa2167130 | [
"MIT"
] | 4 | 2019-10-12T02:23:58.000Z | 2021-04-14T22:08:15.000Z | from denariusrpc.authproxy import AuthServiceProxy, JSONRPCException
import time
import sys
import datetime
import urllib
import json
from influxdb import InfluxDBClient
# rpc_user and rpc_password are set in the denarius.conf file
rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:32369"%("rpcuser", "rpcpassw... | 28.594059 | 92 | 0.638504 |
ab4753559512e7bbcdaf19b19147ff8ab726266e | 5,826 | py | Python | intersight/models/firmware_nfs_server.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/models/firmware_nfs_server.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/models/firmware_nfs_server.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-262
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class FirmwareNfsServer(object):
"""
NOTE: This cla... | 27.742857 | 96 | 0.586509 |
f04b2259d54a10bcdb0b3c47397e78e4380f21fb | 3,010 | py | Python | src/board.py | juangallostra/2048 | 3f4f1b33a964ea10b5b5aec9fb8f7f2335f5a7ab | [
"MIT"
] | 1 | 2018-01-20T06:49:38.000Z | 2018-01-20T06:49:38.000Z | src/board.py | juangallostra/2048 | 3f4f1b33a964ea10b5b5aec9fb8f7f2335f5a7ab | [
"MIT"
] | 1 | 2017-11-30T17:46:06.000Z | 2017-11-30T17:46:06.000Z | src/board.py | juangallostra/2048 | 3f4f1b33a964ea10b5b5aec9fb8f7f2335f5a7ab | [
"MIT"
] | null | null | null | import pygame
from pygame.locals import *
def hex_to_rgb(hex_color):
"""
Helper function to convert hex strings to RGB
"""
hex_color = hex_color.lstrip('#')
h_len = len(hex_color)
return tuple(int(hex_color[i:i + h_len // 3], 16) for i in range(0, h_len, h_len // 3))
class Board:
"""
... | 39.605263 | 102 | 0.636545 |
fe36a9c38f57d8429dfa27770f931ed47ff714d3 | 9,736 | py | Python | mne/channels/_dig_montage_utils.py | abramhindle/mne-python | 989390a484cba219aae74c778b71568586f9edb2 | [
"BSD-3-Clause"
] | null | null | null | mne/channels/_dig_montage_utils.py | abramhindle/mne-python | 989390a484cba219aae74c778b71568586f9edb2 | [
"BSD-3-Clause"
] | 1 | 2019-09-17T23:54:38.000Z | 2019-09-17T23:54:38.000Z | mne/channels/_dig_montage_utils.py | abramhindle/mne-python | 989390a484cba219aae74c778b71568586f9edb2 | [
"BSD-3-Clause"
] | null | null | null | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Marijn van Vliet <w.m.vanvliet@gmail.com>
# Jona Sassenhagen <jona.sass... | 34.402827 | 102 | 0.587818 |
33361f33a9eeaa778f09c1f52cf00bcef2769e0f | 2,756 | py | Python | datasets/full-emoticons-dataset/emoticon_dataset_generator.py | david00medina/cyberattack-forecasting | e8a18e474d9eec0800d06e3f21c9cd25cb54e831 | [
"MIT"
] | null | null | null | datasets/full-emoticons-dataset/emoticon_dataset_generator.py | david00medina/cyberattack-forecasting | e8a18e474d9eec0800d06e3f21c9cd25cb54e831 | [
"MIT"
] | null | null | null | datasets/full-emoticons-dataset/emoticon_dataset_generator.py | david00medina/cyberattack-forecasting | e8a18e474d9eec0800d06e3f21c9cd25cb54e831 | [
"MIT"
] | null | null | null | # ############################################################################################################
# Copyright (c) 2022 David Alberto Medina Medina. #
# ... | 70.666667 | 123 | 0.468433 |
441d47e7b0a3571874f47f873647a64cd9f8e0a1 | 2,663 | py | Python | evaluate.py | RManLuo/CP-GNN | a186d31167c1b00408de767b78271c5027882e23 | [
"MIT"
] | 14 | 2021-09-02T02:56:51.000Z | 2022-02-15T23:37:43.000Z | evaluate.py | RManLuo/CP-GNN | a186d31167c1b00408de767b78271c5027882e23 | [
"MIT"
] | null | null | null | evaluate.py | RManLuo/CP-GNN | a186d31167c1b00408de767b78271c5027882e23 | [
"MIT"
] | 2 | 2021-11-02T13:57:38.000Z | 2021-11-17T22:37:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/8/11 11:11
# @Author : Raymound luo
# @Mail : luolinhao1998@gmail.com
# @File : evaluate.py
# @Software: PyCharm
# @Describe:
from models import ContextGNN
from utils import load_data, evaluate, load_latest_model, save_attention_matrix, generate_a... | 45.135593 | 148 | 0.704469 |
5143f17eaa795407817e6d23285a5f621cf5e950 | 482 | py | Python | devices/interfaces.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | devices/interfaces.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | devices/interfaces.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | from abc import ABC
from enum import Enum
from typing import NewType
DeviceId = NewType('DeviceId', str)
class DeviceType(str, Enum):
"""
Basic types of devices: Client, Server, Service
"""
CLIENT = 'client'
SERVER = 'server'
SERVICE = 'service'
DEFAULT = 'default'
def __repr__(self)... | 19.28 | 83 | 0.66805 |
7832e9a426b75927002b862a650deb671e4f3094 | 21,847 | py | Python | merlin/models/torch/tabular/base.py | jperez999/models-1 | 44c71fd5168cae60c56ad300c6e21522a86c1908 | [
"Apache-2.0"
] | null | null | null | merlin/models/torch/tabular/base.py | jperez999/models-1 | 44c71fd5168cae60c56ad300c6e21522a86c1908 | [
"Apache-2.0"
] | null | null | null | merlin/models/torch/tabular/base.py | jperez999/models-1 | 44c71fd5168cae60c56ad300c6e21522a86c1908 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 34.242947 | 100 | 0.651028 |
af2392fe001782934da3ce2fccc19bfcbe857e4f | 5,859 | bzl | Python | tools/ng_setup_workspace.bzl | VamsiVempati/angular | 732026c3f56a91b016fcf79ebc581569d7c89618 | [
"MIT"
] | 1 | 2018-12-06T02:59:02.000Z | 2018-12-06T02:59:02.000Z | tools/ng_setup_workspace.bzl | VamsiVempati/angular | 732026c3f56a91b016fcf79ebc581569d7c89618 | [
"MIT"
] | 2 | 2022-03-02T11:13:43.000Z | 2022-03-02T11:13:47.000Z | tools/ng_setup_workspace.bzl | VamsiVempati/angular | 732026c3f56a91b016fcf79ebc581569d7c89618 | [
"MIT"
] | null | null | null | # Copyright Google Inc. All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license
"Install angular source dependencies"
load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")
load("@angular//packages/bazel/src:ng_se... | 23.914286 | 103 | 0.480116 |
ec37b150a2fa7d3f8e98bdbe2d38e815ba7bfc10 | 681 | py | Python | exercise19.py | ChinenyeEzeakor/exercise-1.1 | a027c2729b297240c039fd45a31e76272ae17d13 | [
"MIT"
] | null | null | null | exercise19.py | ChinenyeEzeakor/exercise-1.1 | a027c2729b297240c039fd45a31e76272ae17d13 | [
"MIT"
] | null | null | null | exercise19.py | ChinenyeEzeakor/exercise-1.1 | a027c2729b297240c039fd45a31e76272ae17d13 | [
"MIT"
] | null | null | null | def cheese_and_crackers(cheese_count, boxes_of_crackers):
print "You have %d cheeses!" % cheese_count
print "You have %d boxes of crackers!" % boxes_of_crackers
print "Man that's enough for a party!"
print "Get a blanket.\n"
print "We can just give the function numbers directly:"
cheese_and_crackers(20, 30)
p... | 28.375 | 71 | 0.769457 |
eff3600a3afd347b07faa17e9be5ce4fe65331c2 | 39,787 | py | Python | student_STARTUP/STARTUP.py | Aamer98/STARTUP_explore | ead758ef2f3b74c97a749687a9cb57a31586cc0f | [
"MIT"
] | null | null | null | student_STARTUP/STARTUP.py | Aamer98/STARTUP_explore | ead758ef2f3b74c97a749687a9cb57a31586cc0f | [
"MIT"
] | null | null | null | student_STARTUP/STARTUP.py | Aamer98/STARTUP_explore | ead758ef2f3b74c97a749687a9cb57a31586cc0f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.nn import functional as F
from torchvision import transforms, datasets
import torch.utils.data
torch.cuda.empty_cache()
from tqdm import tqdm
import argparse
import os
import numpy as np
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)),... | 39.549702 | 126 | 0.588886 |
36b2b7643c2fe314dd79d15742f1a7f58c9d7b25 | 753 | py | Python | setup.py | mgrubisic/PySeismoSoil | f8778be18a0d141918ff3f05c2e5279f5d02cdda | [
"FSFAP"
] | 1 | 2020-10-05T05:47:18.000Z | 2020-10-05T05:47:18.000Z | setup.py | mgrubisic/PySeismoSoil | f8778be18a0d141918ff3f05c2e5279f5d02cdda | [
"FSFAP"
] | null | null | null | setup.py | mgrubisic/PySeismoSoil | f8778be18a0d141918ff3f05c2e5279f5d02cdda | [
"FSFAP"
] | null | null | null | from setuptools import setup
setup(
name='PySeismoSoil',
version='v0.3.6',
description='PySeismoSoil',
author='Jian Shi',
license='BSD 3',
url='https://github.com/jsh9/PySeismoSoil',
packages=['PySeismoSoil'],
classifiers=['Intended Audience :: Science/Research',
'Topic ... | 30.12 | 57 | 0.533865 |
d22e790f560b51447016ed3ce2c5663688b5fd74 | 6,131 | py | Python | tests/unit/test_types.py | OvalMoney/momapper | 9bcf1909a80677cab831132444be27fa4adaa2a5 | [
"MIT"
] | null | null | null | tests/unit/test_types.py | OvalMoney/momapper | 9bcf1909a80677cab831132444be27fa4adaa2a5 | [
"MIT"
] | null | null | null | tests/unit/test_types.py | OvalMoney/momapper | 9bcf1909a80677cab831132444be27fa4adaa2a5 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest
from bson import Decimal128
from momapper import MappedClass, Field
from momapper.mongodb.collection import MappedCollection
from momapper.types import (
DecimalType,
ValidationError,
IntType,
FloatType,
StringType,
ByteType,
BoolType,
ListType... | 31.280612 | 88 | 0.669222 |
45451b97d4f7c0d42c86fc227cf2de163e89d397 | 18,751 | py | Python | src/tts_preparation/app/prepare.py | stefantaubert/tts-preparation | dad7bb4c0f5093ff63736ae9d6553c7cfe916734 | [
"MIT"
] | null | null | null | src/tts_preparation/app/prepare.py | stefantaubert/tts-preparation | dad7bb4c0f5093ff63736ae9d6553c7cfe916734 | [
"MIT"
] | null | null | null | src/tts_preparation/app/prepare.py | stefantaubert/tts-preparation | dad7bb4c0f5093ff63736ae9d6553c7cfe916734 | [
"MIT"
] | null | null | null | import shutil
from logging import getLogger
from pathlib import Path
from statistics import mean
from typing import Callable, Optional, Set, Tuple
import pandas as pd
from general_utils import load_obj, save_obj
from text_selection import get_common_durations
from text_utils import SymbolIdDict
from text_utils.types i... | 34.279707 | 254 | 0.736867 |
9e4f6e2eccfbb83086d67ad2ee2e81bd641df243 | 27,306 | py | Python | python/federatedml/ensemble/basic_algorithms/decision_tree/hetero/hetero_decision_tree_host.py | eliaskousk/FATE | 242e47d6ae439a3b69ecb1610cb370b29b024413 | [
"Apache-2.0"
] | 1 | 2022-02-07T06:23:15.000Z | 2022-02-07T06:23:15.000Z | python/federatedml/ensemble/basic_algorithms/decision_tree/hetero/hetero_decision_tree_host.py | eliaskousk/FATE | 242e47d6ae439a3b69ecb1610cb370b29b024413 | [
"Apache-2.0"
] | null | null | null | python/federatedml/ensemble/basic_algorithms/decision_tree/hetero/hetero_decision_tree_host.py | eliaskousk/FATE | 242e47d6ae439a3b69ecb1610cb370b29b024413 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.node import Node
from federatedml.util import LOGGER
from federatedml.protobuf.generated.boosting_tree_model_meta_pb2 import DecisionTreeModelMeta
from federatedml.protobuf.generated.boosting_tree_model_param_pb2 import DecisionTreeMo... | 45.585977 | 123 | 0.577089 |
9faa227874d1347d1eb48b066eed1b960f461c56 | 12,899 | py | Python | final_project/train.py | dbirman/cs375 | 7aeac1ed57eff74cbecb3e1091b01f00d34629a8 | [
"MIT"
] | null | null | null | final_project/train.py | dbirman/cs375 | 7aeac1ed57eff74cbecb3e1091b01f00d34629a8 | [
"MIT"
] | null | null | null | final_project/train.py | dbirman/cs375 | 7aeac1ed57eff74cbecb3e1091b01f00d34629a8 | [
"MIT"
] | 2 | 2017-12-02T01:46:28.000Z | 2018-01-08T21:36:58.000Z | """
Final project
"""
import os
import numpy as np
import tensorflow as tf
from tfutils import base, data, model, optimizer, utils
from data_provider import Combine_world
from yolo_tiny_net import YoloTinyNet
class ImageNetYOLO():
"""
Defines the ImageNet training experiment
"""
class Config():
... | 36.959885 | 104 | 0.562137 |
1bb38437031f5e6b01ff219be2016a4a6b04381b | 4,988 | py | Python | gaiasdk/sdk.py | Shivakishore14/pythonsdk | ffc11cb642138c9b0a2eb69944afc2340cf46c24 | [
"Apache-2.0"
] | null | null | null | gaiasdk/sdk.py | Shivakishore14/pythonsdk | ffc11cb642138c9b0a2eb69944afc2340cf46c24 | [
"Apache-2.0"
] | null | null | null | gaiasdk/sdk.py | Shivakishore14/pythonsdk | ffc11cb642138c9b0a2eb69944afc2340cf46c24 | [
"Apache-2.0"
] | null | null | null | import sys
import time
import os
import grpc
import plugin_pb2
import plugin_pb2_grpc
from grpc_health.v1.health import HealthServicer
from grpc_health.v1 import health_pb2, health_pb2_grpc
from concurrent import futures
from fnvhash import fnv1a_32
from job import Job, Argument, ManualInteraction, GetJob, JobWrapper... | 33.253333 | 116 | 0.623095 |
7c7be10b2be82b9084917bec34b49c8c483a4b91 | 1,748 | py | Python | faas_test/test_cases/10-requests-lambda.py | jaimedantas/pacs_locust | df61bcad24776f6f6e395a281f99f5d764099669 | [
"MIT"
] | null | null | null | faas_test/test_cases/10-requests-lambda.py | jaimedantas/pacs_locust | df61bcad24776f6f6e395a281f99f5d764099669 | [
"MIT"
] | null | null | null | faas_test/test_cases/10-requests-lambda.py | jaimedantas/pacs_locust | df61bcad24776f6f6e395a281f99f5d764099669 | [
"MIT"
] | null | null | null | from locust import HttpUser, TaskSet, task, constant
from locust import LoadTestShape
from skimage.io import imread_collection
import base64
import random
import glob
class UserTasks(TaskSet):
@task
def get_root(self):
json = {"fileContents": str(getImage())[2:]}
self.client.post("/", data=None... | 28.193548 | 90 | 0.649886 |
9825e5980e5baff22e5e7191e1def2f561b1db7f | 10,129 | py | Python | src/Network/test/test1/wild_VS_wild_mutant_1_neighbor80_test02.py | ruiyangsong/mCNN | 889f182245f919fb9c7a8d97965b11576b01a96c | [
"MIT"
] | null | null | null | src/Network/test/test1/wild_VS_wild_mutant_1_neighbor80_test02.py | ruiyangsong/mCNN | 889f182245f919fb9c7a8d97965b11576b01a96c | [
"MIT"
] | null | null | null | src/Network/test/test1/wild_VS_wild_mutant_1_neighbor80_test02.py | ruiyangsong/mCNN | 889f182245f919fb9c7a8d97965b11576b01a96c | [
"MIT"
] | null | null | null | from hyperopt import Trials, STATUS_OK, tpe
from hyperas import optim
from hyperas.distributions import choice, uniform
import os, sys
import numpy as np
from sklearn.utils import class_weight
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
from keras.utils import to_categorical
from k... | 48.004739 | 146 | 0.63412 |
f670a125ee2c5e7be2e17dfc270fccd15230b08e | 3,702 | py | Python | openmc/deplete/integrator/predictor.py | wbinventor/openmc | 02a281889bffcaa2573e1a090f006442d350d2f6 | [
"MIT"
] | 1 | 2019-04-10T12:41:16.000Z | 2019-04-10T12:41:16.000Z | openmc/deplete/integrator/predictor.py | wbinventor/openmc | 02a281889bffcaa2573e1a090f006442d350d2f6 | [
"MIT"
] | 5 | 2015-03-11T02:28:25.000Z | 2018-11-07T14:10:28.000Z | openmc/deplete/integrator/predictor.py | dryuri92/openmc | e28e42e8c250cd1ad586d1d9fd1d20847ad92edd | [
"MIT"
] | null | null | null | """First-order predictor algorithm."""
import copy
from collections.abc import Iterable
from .cram import deplete
from ..results import Results
def predictor(operator, timesteps, power=None, power_density=None,
print_out=True):
r"""Deplete using a first-order predictor algorithm.
Implements t... | 35.596154 | 80 | 0.598865 |
6b907588c356b4c37d4e200707d701b0ffe65864 | 302 | py | Python | Implementation/10170_NFC West vs North/10170_NFC West vs North.py | 7dudtj/BOJ_myCode | 37d105590a7963e2232102b3098fea3c3504b96f | [
"MIT"
] | 1 | 2022-03-30T15:50:47.000Z | 2022-03-30T15:50:47.000Z | Implementation/10170_NFC West vs North/10170_NFC West vs North.py | 7dudtj/BOJ_myCode | 37d105590a7963e2232102b3098fea3c3504b96f | [
"MIT"
] | null | null | null | Implementation/10170_NFC West vs North/10170_NFC West vs North.py | 7dudtj/BOJ_myCode | 37d105590a7963e2232102b3098fea3c3504b96f | [
"MIT"
] | 1 | 2021-07-20T07:11:06.000Z | 2021-07-20T07:11:06.000Z | print("""NFC West W L T
-----------------------
Seattle 13 3 0
San Francisco 12 4 0
Arizona 10 6 0
St. Louis 7 9 0
NFC North W L T
-----------------------
Green Bay 8 7 1
Chicago 8 8 0
Detroit 7 9 0
Minnesota 5 10 1""")
| 21.571429 | 32 | 0.390728 |
986efd8e332e074282ca3978bd5a60da4ba3f5c2 | 938 | py | Python | AnotherPrimeProblem.py | mayanksahu33/HackerEarth-1 | 680336d8e27de525b2dfeaf3fda6c7d2640bf93f | [
"MIT"
] | null | null | null | AnotherPrimeProblem.py | mayanksahu33/HackerEarth-1 | 680336d8e27de525b2dfeaf3fda6c7d2640bf93f | [
"MIT"
] | null | null | null | AnotherPrimeProblem.py | mayanksahu33/HackerEarth-1 | 680336d8e27de525b2dfeaf3fda6c7d2640bf93f | [
"MIT"
] | 1 | 2020-10-01T06:54:42.000Z | 2020-10-01T06:54:42.000Z | """
Given a number N find the smallest number K such that it satisfies all the 3 rules -
i) K >= N .
ii) K is a prime number
iii) K ≡ 1 (mod 11 )
"""
def SpecialSieveOfEratosthenes(low,up):
if low == 1:
low = 2
prime = [True for i in range(up + 1)]
p = 2
while (p * p <= up):
if (prime... | 18.76 | 84 | 0.536247 |
148b6ea6d9f027d9e69eac44e63b9f9be9371bd9 | 4,860 | py | Python | venv/lib/python3.8/site-packages/jupyter_server/tests/extension/test_manager.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 1 | 2022-03-17T12:56:14.000Z | 2022-03-17T12:56:14.000Z | venv/lib/python3.8/site-packages/jupyter_server/tests/extension/test_manager.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/jupyter_server/tests/extension/test_manager.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 1 | 2022-03-28T09:19:34.000Z | 2022-03-28T09:19:34.000Z | import os
import unittest.mock as mock
import pytest
from jupyter_core.paths import jupyter_config_path
from jupyter_server.extension.manager import ExtensionManager
from jupyter_server.extension.manager import ExtensionMetadataError
from jupyter_server.extension.manager import ExtensionModuleNotFound
from jupyter_se... | 36.541353 | 97 | 0.767284 |
08266a115b2e4569363ad793c9a7e2eaa6331846 | 64,247 | py | Python | tensorflow/python/eager/function.py | cameronaaron/tensorflow | dae1e7c69336d28897abf7853bde10110d48b15f | [
"Apache-2.0"
] | 1 | 2019-04-30T00:55:14.000Z | 2019-04-30T00:55:14.000Z | tensorflow/python/eager/function.py | h7lost/tensorflow | 8ae7343f3d24569b4bb142ddc7b58037267a2d3c | [
"Apache-2.0"
] | null | null | null | tensorflow/python/eager/function.py | h7lost/tensorflow | 8ae7343f3d24569b4bb142ddc7b58037267a2d3c | [
"Apache-2.0"
] | null | null | null | # 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... | 41.342986 | 104 | 0.701838 |
2c69943a79afa93b4d94888b96deecc5b0f6c639 | 2,292 | py | Python | acapy_client/models/v10_presentation_send_request_request.py | dbluhm/acapy-client | d92ef607ba2ff1152ec15429f2edb20976991424 | [
"Apache-2.0"
] | 4 | 2021-08-05T09:20:34.000Z | 2021-08-08T19:37:29.000Z | acapy_client/models/v10_presentation_send_request_request.py | dbluhm/acapy-client | d92ef607ba2ff1152ec15429f2edb20976991424 | [
"Apache-2.0"
] | null | null | null | acapy_client/models/v10_presentation_send_request_request.py | dbluhm/acapy-client | d92ef607ba2ff1152ec15429f2edb20976991424 | [
"Apache-2.0"
] | 2 | 2021-08-12T18:18:45.000Z | 2021-08-14T13:22:28.000Z | from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.indy_proof_request import IndyProofRequest
from ..types import UNSET, Unset
T = TypeVar("T", bound="V10PresentationSendRequestRequest")
@attr.s(auto_attribs=True)
class V10PresentationSendRequestRequest:
""" """
connection_... | 29.012658 | 77 | 0.643543 |
e7256747040363a351644109c0396582708e5020 | 943 | py | Python | tests/test_units/test_area.py | guillaume-florent/corelib | 9e25b862b5eaf1fe1a9b68af070a743184f992ba | [
"MIT"
] | 1 | 2018-05-05T02:11:59.000Z | 2018-05-05T02:11:59.000Z | tests/test_units/test_area.py | guillaume-florent/corelib | 9e25b862b5eaf1fe1a9b68af070a743184f992ba | [
"MIT"
] | null | null | null | tests/test_units/test_area.py | guillaume-florent/corelib | 9e25b862b5eaf1fe1a9b68af070a743184f992ba | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
r"""area.py tests"""
from corelib.units.area import cm2, convert
from corelib.units import convert_area
def test_areas():
r"""Test expected values"""
expected_value = 1e4
atol = 1e-10
assert expected_value - atol <= cm2(m2=1.) <= expected_value + atol
def test... | 30.419355 | 108 | 0.677625 |
e5177d204145c4c598aff607d0f1607293e83497 | 6,969 | py | Python | configure_data.py | AnastasiiaNovikova/sentiment-discovery | eaae55921038d674e2f16fbd0bfd2e63194a9545 | [
"BSD-3-Clause"
] | null | null | null | configure_data.py | AnastasiiaNovikova/sentiment-discovery | eaae55921038d674e2f16fbd0bfd2e63194a9545 | [
"BSD-3-Clause"
] | null | null | null | configure_data.py | AnastasiiaNovikova/sentiment-discovery | eaae55921038d674e2f16fbd0bfd2e63194a9545 | [
"BSD-3-Clause"
] | 1 | 2019-03-13T11:43:13.000Z | 2019-03-13T11:43:13.000Z | import os
import copy
import data_utils
class DataConfig(object):
def __init__(self, parser, defaults={}):
super(DataConfig,self).__init__()
self.parser = parser
self.defaults = defaults
def apply(self, opt):
print('configuring data')
for k, v in self.defaults.items():
... | 42.493902 | 140 | 0.602525 |
059c4d8c5db93c327d9dbb3ed8d8bb89726f90a7 | 3,489 | py | Python | asposepdfcloud/models/text_horizontal_alignment.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 7 | 2018-06-11T17:44:44.000Z | 2022-02-08T05:52:48.000Z | asposepdfcloud/models/text_horizontal_alignment.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 1 | 2021-03-20T22:16:15.000Z | 2021-06-27T15:11:52.000Z | asposepdfcloud/models/text_horizontal_alignment.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 4 | 2018-04-18T19:41:12.000Z | 2021-06-21T13:12:24.000Z | # coding: utf-8
"""
Aspose.PDF Cloud API Reference
Copyright (c) 2021 Aspose.PDF Cloud
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... | 27.690476 | 78 | 0.603038 |
6266f28dd64c7e5050489c76c1394d171d6d93de | 116 | py | Python | venv/Lib/site-packages/_pytest/_version.py | sukhjindersukh/todo_api_automation | 55ab6ab836a5f8f158ba78d550978e8e98d7bcb2 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/_pytest/_version.py | sukhjindersukh/todo_api_automation | 55ab6ab836a5f8f158ba78d550978e8e98d7bcb2 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/_pytest/_version.py | sukhjindersukh/todo_api_automation | 55ab6ab836a5f8f158ba78d550978e8e98d7bcb2 | [
"MIT"
] | null | null | null | # coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = '4.6.4'
| 23.2 | 46 | 0.724138 |
d80074a7bd4ba376fd730bbfa139c50fe2404c5e | 366 | py | Python | presidio_evaluator/dataset_formatters/dataset_formatter.py | msebragge/presidio-research | 305d18177c1cd3dc6bfac725677b1116a89d6f32 | [
"MIT"
] | 55 | 2020-01-10T01:27:59.000Z | 2022-02-25T09:43:36.000Z | presidio_evaluator/dataset_formatters/dataset_formatter.py | msebragge/presidio-research | 305d18177c1cd3dc6bfac725677b1116a89d6f32 | [
"MIT"
] | 19 | 2020-02-28T20:17:43.000Z | 2021-12-22T19:18:12.000Z | presidio_evaluator/dataset_formatters/dataset_formatter.py | msebragge/presidio-research | 305d18177c1cd3dc6bfac725677b1116a89d6f32 | [
"MIT"
] | 30 | 2020-01-25T21:46:14.000Z | 2021-12-09T06:05:24.000Z | from abc import ABC, abstractmethod
from typing import List
from presidio_evaluator import InputSample
class DatasetFormatter(ABC):
@abstractmethod
def to_input_samples(self) -> List[InputSample]:
"""
Translate a dataset structure into a list of documents, to be used by models and for evaluat... | 24.4 | 103 | 0.691257 |
48625018246dfbebaca090eb48100e018a2f49ba | 12,182 | py | Python | omaha/omaha_version_utils.py | huhisoft/omaha | 5ba31ce6214feca9e5bb8d70f30b74e4ac1c659e | [
"Apache-2.0"
] | 1 | 2021-11-18T19:23:31.000Z | 2021-11-18T19:23:31.000Z | omaha/omaha_version_utils.py | huhisoft/omaha | 5ba31ce6214feca9e5bb8d70f30b74e4ac1c659e | [
"Apache-2.0"
] | null | null | null | omaha/omaha_version_utils.py | huhisoft/omaha | 5ba31ce6214feca9e5bb8d70f30b74e4ac1c659e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2.4
#
# Copyright 2010 Google 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 o... | 32.227513 | 80 | 0.669102 |
86b928c5e304308fe9ae4b7530ecce29fad3594c | 1,576 | py | Python | tests/test_comment.py | barackmaund1/flaskblog | 3b6c40612b3483b37b60eaeb807c5f33e6d00505 | [
"MIT"
] | null | null | null | tests/test_comment.py | barackmaund1/flaskblog | 3b6c40612b3483b37b60eaeb807c5f33e6d00505 | [
"MIT"
] | 2 | 2021-06-08T21:32:02.000Z | 2022-03-12T00:29:24.000Z | tests/test_comment.py | barackmaund1/flaskblog | 3b6c40612b3483b37b60eaeb807c5f33e6d00505 | [
"MIT"
] | null | null | null | import unittest
from app.models import User,Comments,Post
from app import db
class CommentTest(unittest.TestCase):
def setUp(self):
self.new_comment = Comments(id= 1,comment='test comment',user=self.username,post_id = self.new_post)
def tearDown(self):
User.query.delete()
Post.query.d... | 37.52381 | 113 | 0.698604 |
4a85b9b5af8354b29b14b2523f830c7788eff949 | 3,291 | py | Python | gw_crawler/malicious_file_crawler/src/settings.py | virajut/k8-test-data | d2386c2a5c12623f868bd9923d1aa5b262b55b5e | [
"Apache-2.0"
] | null | null | null | gw_crawler/malicious_file_crawler/src/settings.py | virajut/k8-test-data | d2386c2a5c12623f868bd9923d1aa5b262b55b5e | [
"Apache-2.0"
] | null | null | null | gw_crawler/malicious_file_crawler/src/settings.py | virajut/k8-test-data | d2386c2a5c12623f868bd9923d1aa5b262b55b5e | [
"Apache-2.0"
] | null | null | null | # Scrapy settings for malicious_file_crawler project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest/topics/downlo... | 30.472222 | 87 | 0.783956 |
f6b6cee515561dd4fcdd90c07b3b2cd6dda8ff30 | 4,775 | py | Python | chainer/functions/array/get_item.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | chainer/functions/array/get_item.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | chainer/functions/array/get_item.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | import numpy
import chainer
from chainer.backends import cuda
from chainer import function_node
from chainer import utils
from chainer.utils import type_check
from chainer import variable
_numpy_supports_0d_bool_index = \
numpy.lib.NumpyVersion(numpy.__version__) >= '1.13.0'
class GetItem(function_node.Functio... | 32.04698 | 79 | 0.57089 |
d482fbfb4cc3a29c9cfe7afd5d4554f5e9a6277e | 3,115 | py | Python | config/base.py | kentaroy47/kaggle-wheat-arutema47 | f99de3926d4f3da3d65e3fbb94a6fa8676de4121 | [
"MIT"
] | 4 | 2021-01-04T04:23:33.000Z | 2021-01-26T05:47:12.000Z | config/base.py | kentaroy47/kaggle-wheat-arutema47 | f99de3926d4f3da3d65e3fbb94a6fa8676de4121 | [
"MIT"
] | null | null | null | config/base.py | kentaroy47/kaggle-wheat-arutema47 | f99de3926d4f3da3d65e3fbb94a6fa8676de4121 | [
"MIT"
] | null | null | null | import os
import pprint
import re
from ast import literal_eval
from colorama import Back, Fore
from easydict import EasyDict as edict
import yaml
from easydict import EasyDict as edict
def _get_default_config():
c = edict()
# dataset
c.data = edict()
c.data.name = 'data'
c.data.num_classes = 1
... | 23.961538 | 67 | 0.634992 |
b4711b50dd2309b5e08e0c12639a56fa2342aea3 | 675 | py | Python | homeassistant/components/airly/const.py | miccico/core | 14c205384171dee59c1a908f8449f9864778b2dc | [
"Apache-2.0"
] | 6 | 2017-08-02T19:26:39.000Z | 2020-03-14T22:47:41.000Z | homeassistant/components/airly/const.py | miccico/core | 14c205384171dee59c1a908f8449f9864778b2dc | [
"Apache-2.0"
] | 54 | 2020-11-17T07:04:57.000Z | 2022-03-31T06:45:39.000Z | homeassistant/components/airly/const.py | miccico/core | 14c205384171dee59c1a908f8449f9864778b2dc | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """Constants for Airly integration."""
ATTR_API_ADVICE = "ADVICE"
ATTR_API_CAQI = "CAQI"
ATTR_API_CAQI_DESCRIPTION = "DESCRIPTION"
ATTR_API_CAQI_LEVEL = "LEVEL"
ATTR_API_HUMIDITY = "HUMIDITY"
ATTR_API_PM1 = "PM1"
ATTR_API_PM10 = "PM10"
ATTR_API_PM10_LIMIT = "PM10_LIMIT"
ATTR_API_PM10_PERCENT = "PM10_PERCENT"
ATTR_API_P... | 30.681818 | 65 | 0.786667 |
731681b9145103f3de298b06cc3815b1693fe81d | 1,982 | py | Python | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/PickOutboundNumbersRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/PickOutboundNumbersRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/PickOutboundNumbersRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 35.392857 | 78 | 0.767911 |
80a1ce51d819a968c87b89d40b6e50b537261d67 | 733 | py | Python | ossPy/scrips/fuzzywuzzytest1.py | team-oss/dspg20oss | dd9a3c5cd9c26a95bbc9b478ead86f09d9a30d8d | [
"MIT"
] | 1 | 2020-06-11T20:03:08.000Z | 2020-06-11T20:03:08.000Z | ossPy/scrips/fuzzywuzzytest1.py | team-oss/dspg20oss | dd9a3c5cd9c26a95bbc9b478ead86f09d9a30d8d | [
"MIT"
] | null | null | null | ossPy/scrips/fuzzywuzzytest1.py | team-oss/dspg20oss | dd9a3c5cd9c26a95bbc9b478ead86f09d9a30d8d | [
"MIT"
] | 2 | 2020-07-23T19:39:23.000Z | 2021-10-07T15:33:25.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 20 20:24:06 2020
@author: dnb3k
"""
Ontology=ossPyFuncs.composeWorkplaceOntology()
lesserCompanies=multiCoWorkerTable.iloc[15000:-1]
lesserCompanies['guesses']=""
multiCoWorkerTable['guesses']=""
import difflib
#df['Name_r'] = df.Name_x.map(lamb... | 29.32 | 145 | 0.746248 |
ffaa051b060f557bcda17138ec8ee9c826b4a27b | 827 | py | Python | jp.atcoder/abc084/abc084_d/9132611.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc084/abc084_d/9132611.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc084/abc084_d/9132611.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
from math import floor, sqrt
def prime_nums(n):
sieve = set(range(2, n + 1))
non_prime = set(range(2 * 2, n + 1, 2))
sieve -= non_prime
for i in range(3, floor(sqrt(n)) + 1, 2):
if i in sieve:
non_prime = set(range(i * 2, n + 1, i))
sieve -= non_pr... | 21.205128 | 52 | 0.47763 |
dee5e7d65388e1ab314f10216effd9e913a1b79c | 6,268 | py | Python | pyfitterbap/comm/ui/expanding_widget.py | jetperch/fitterbap | dc29db72c2d7b01d90556a251be0a361574033bc | [
"Apache-2.0"
] | 21 | 2021-05-14T20:16:56.000Z | 2022-03-30T18:54:31.000Z | pyfitterbap/comm/ui/expanding_widget.py | jetperch/fitterbap | dc29db72c2d7b01d90556a251be0a361574033bc | [
"Apache-2.0"
] | null | null | null | pyfitterbap/comm/ui/expanding_widget.py | jetperch/fitterbap | dc29db72c2d7b01d90556a251be0a361574033bc | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Jetperch 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,... | 37.532934 | 106 | 0.662412 |
07b4c015db8ae71955629db51175c9b3cb59adb6 | 41,347 | py | Python | src/sagemaker/local/image.py | jbarz1/sagemaker-python-sdk | a7399455f5386d83ddc5cb15c0db00c04bd518ec | [
"Apache-2.0"
] | null | null | null | src/sagemaker/local/image.py | jbarz1/sagemaker-python-sdk | a7399455f5386d83ddc5cb15c0db00c04bd518ec | [
"Apache-2.0"
] | null | null | null | src/sagemaker/local/image.py | jbarz1/sagemaker-python-sdk | a7399455f5386d83ddc5cb15c0db00c04bd518ec | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2020 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 38.072744 | 100 | 0.63787 |
a966b7c9eaf3c5732baf9acf04e4fb3cebd082fb | 1,082 | py | Python | guild/prepare_cmd.py | guildai/_guild-python-legacy | e552eff820d8edcfeb10b26bd5c8651548507b4a | [
"Apache-2.0"
] | null | null | null | guild/prepare_cmd.py | guildai/_guild-python-legacy | e552eff820d8edcfeb10b26bd5c8651548507b4a | [
"Apache-2.0"
] | null | null | null | guild/prepare_cmd.py | guildai/_guild-python-legacy | e552eff820d8edcfeb10b26bd5c8651548507b4a | [
"Apache-2.0"
] | null | null | null | import guild.cmd_support
import guild.op
import guild.op_support
def main(args):
op = _prepare_op(args)
if args.preview:
_preview(op)
else:
_prepare(op)
def _prepare_op(args):
project = guild.cmd_support.project_for_args(args)
section = guild.cmd_support.model_or_resource_for_args(... | 25.162791 | 73 | 0.665434 |
6757cec0fe70f5966d00bcd98fa379d2187e87d8 | 2,365 | py | Python | tests/template_tests/syntax_tests/test_named_endblock.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/template_tests/syntax_tests/test_named_endblock.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/template_tests/syntax_tests/test_named_endblock.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class NamedEndblockTests(SimpleTestCase):
@setup({'namedendblocks01': '1{% block first %}_{% block second %}'
'2{% endblock second %}_{% endblock first %}3'})... | 43.796296 | 95 | 0.600423 |
6bdb6686d6a757d0d7221845d5580c32aa0e956a | 727 | py | Python | fake_private.py | iBELLinc/charlie-cello | c64904ae7538bf913150fd64f13eaa04d9ea4679 | [
"MIT"
] | null | null | null | fake_private.py | iBELLinc/charlie-cello | c64904ae7538bf913150fd64f13eaa04d9ea4679 | [
"MIT"
] | 1 | 2021-08-12T14:51:34.000Z | 2021-08-12T14:51:34.000Z | fake_private.py | iBELLinc/charlie-cello | c64904ae7538bf913150fd64f13eaa04d9ea4679 | [
"MIT"
] | null | null | null | import discord
# Information that should not be publicly acessible
TOKEN = "<placeholder>" # You will need to add your own token for testing
bot_admin = #<int placeholder> # UID of bot admin
guild_id = #<int placeholder> # The guild ID that the bot is active on
bot_channel = #<int placeholder> ... | 33.045455 | 85 | 0.678129 |
2c341eaa7befc5acb96ddc83d19c25d64c742ab4 | 3,681 | py | Python | q_learning.py | zholland/CMPUT690Project | 28063b396d14942d98bf11eb597a10dd09f2c9e8 | [
"MIT"
] | 1 | 2019-03-29T19:26:02.000Z | 2019-03-29T19:26:02.000Z | q_learning.py | zholland/CMPUT690Project | 28063b396d14942d98bf11eb597a10dd09f2c9e8 | [
"MIT"
] | null | null | null | q_learning.py | zholland/CMPUT690Project | 28063b396d14942d98bf11eb597a10dd09f2c9e8 | [
"MIT"
] | null | null | null | import gym
from gym.envs import register
from joblib import Parallel, delayed
from n_step_method import NStepMethodBase
import numpy as np
from tile_coding_action_value_function import TileCodingActionValueFunction
class Qlearning(NStepMethodBase):
def __init__(self, env, alpha, epsilon, gamma, action_value_func... | 41.829545 | 130 | 0.609889 |
7d3fe212e40c589ddd445f5b737dbfa25957218e | 1,053 | py | Python | setup.py | hredestig/cookiecutter-decaf-python | 0d25e474996d5b653a6d4042f2ec6bf5ecce1f1b | [
"Apache-2.0"
] | null | null | null | setup.py | hredestig/cookiecutter-decaf-python | 0d25e474996d5b653a6d4042f2ec6bf5ecce1f1b | [
"Apache-2.0"
] | 1 | 2017-08-04T10:34:53.000Z | 2017-08-04T10:34:53.000Z | setup.py | hredestig/cookiecutter-decaf-python | 0d25e474996d5b653a6d4042f2ec6bf5ecce1f1b | [
"Apache-2.0"
] | 1 | 2017-08-03T13:36:31.000Z | 2017-08-03T13:36:31.000Z | # !/usr/bin/env python
from distutils.core import setup
setup(
name='cookiecutter-decaf-python',
packages=[],
version='0.1.0',
description='Cookiecutter template for a Python package at Biosustain',
author='Henning Redestig',
license='BSD',
author_email='henred@dtu.dk',
url='https://git... | 35.1 | 75 | 0.614435 |
1c3f581920ca6d909ea815a12c43b203410bfd34 | 1,113 | py | Python | bluelog/extensions.py | meizhaohui/bluelog | e4ea274cec5abe78b142f23f99675d3fdf5f1170 | [
"MIT"
] | null | null | null | bluelog/extensions.py | meizhaohui/bluelog | e4ea274cec5abe78b142f23f99675d3fdf5f1170 | [
"MIT"
] | null | null | null | bluelog/extensions.py | meizhaohui/bluelog | e4ea274cec5abe78b142f23f99675d3fdf5f1170 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
@Author : Zhaohui Mei(梅朝辉)
@Email : mzh.whut@gmail.com
@Time : 2018/11/18 20:53
@File : extensions.py
@Version : 1.0
@Interpreter: Python3.6.2
@Software: PyCharm
@Description: 扩展类实例化
"""
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from ... | 25.295455 | 73 | 0.728661 |
e165e1c4b8a4045fd95494d88dcb2b2bdd578bf2 | 10,768 | py | Python | kafka_utils/kafka_cluster_manager/cmds/rebalance.py | akki/kafka-utils | fd2272fd2db61bc68113ef97b61194959fbd4525 | [
"Apache-2.0"
] | 1 | 2020-02-27T22:01:45.000Z | 2020-02-27T22:01:45.000Z | kafka_utils/kafka_cluster_manager/cmds/rebalance.py | akki/kafka-utils | fd2272fd2db61bc68113ef97b61194959fbd4525 | [
"Apache-2.0"
] | null | null | null | kafka_utils/kafka_cluster_manager/cmds/rebalance.py | akki/kafka-utils | fd2272fd2db61bc68113ef97b61194959fbd4525 | [
"Apache-2.0"
] | 3 | 2020-02-03T13:54:03.000Z | 2021-06-20T00:59:32.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ... | 41.57529 | 81 | 0.589432 |
84e7800edc331db293948b4363242ed4e50e9659 | 1,880 | py | Python | app/app.py | salmedina/hmr | ad4a272712078edb0abe4e19dde1b6b4ced7d7f1 | [
"MIT"
] | null | null | null | app/app.py | salmedina/hmr | ad4a272712078edb0abe4e19dde1b6b4ced7d7f1 | [
"MIT"
] | null | null | null | app/app.py | salmedina/hmr | ad4a272712078edb0abe4e19dde1b6b4ced7d7f1 | [
"MIT"
] | null | null | null | import argparse
import flask
from flask import Flask, render_template, request
from flask_bootstrap import Bootstrap
import os
import json
from PIL import ImageDraw, Image
UPLOAD_FOLDER = os.path.join('static', 'uploads')
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
Bootstrap(app)
def draw_bboxe... | 34.814815 | 90 | 0.703191 |
a7b7cf4b615a4796871aec49cedd28069b252a4a | 986 | py | Python | lesson001/test_lesson_01fuzzy.py | victorkaplunov/QAA_training | 4dcba01f934bbeed75c3d909f6dcd9228be673cf | [
"MIT"
] | null | null | null | lesson001/test_lesson_01fuzzy.py | victorkaplunov/QAA_training | 4dcba01f934bbeed75c3d909f6dcd9228be673cf | [
"MIT"
] | null | null | null | lesson001/test_lesson_01fuzzy.py | victorkaplunov/QAA_training | 4dcba01f934bbeed75c3d909f6dcd9228be673cf | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- encoding=utf8 -*-
"""Test of web service ip-api.com. Example of fuzzy testing and using
JSON schema. This test checks the default parameters of the JSON version."""
import json
import pytest
import requests
from faker import Faker
from faker.providers import internet
import jsonschema
REPEAT... | 27.388889 | 78 | 0.71501 |
4b83e12b9e4ab5cfb2fb0eb3de3361cbb6f85beb | 1,871 | py | Python | static-website/setup.py | onema/cdk-constructs | 8c25af39e0803c804a3c22541aa303904cde34b8 | [
"Apache-2.0"
] | 1 | 2021-07-04T02:40:22.000Z | 2021-07-04T02:40:22.000Z | static-website/setup.py | onema/cdk-constructs | 8c25af39e0803c804a3c22541aa303904cde34b8 | [
"Apache-2.0"
] | 1 | 2021-06-26T22:31:06.000Z | 2021-06-26T22:31:06.000Z | static-website/setup.py | onema/cdk-constructs | 8c25af39e0803c804a3c22541aa303904cde34b8 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md") as fp:
long_description = fp.read()
__version__ = "0.1.0"
setup(
name="onema-cdk.static-website",
version=__version__,
description="A CDK Python construct to create static S3 websites. This is a port of the AWS static site example h... | 30.672131 | 215 | 0.62961 |
4fd9f4829d4206ba0eed13af296eb14c1f784303 | 2,690 | py | Python | estatisticas_facebook/faceusers/models.py | danieldourado/estatisticas_facebook_django | 67274e647cf9e2261f1a7810cd9862a4040dfc06 | [
"MIT"
] | 2 | 2017-12-22T01:00:22.000Z | 2017-12-22T11:14:40.000Z | estatisticas_facebook/faceusers/models.py | danieldourado/estatisticas_facebook_django | 67274e647cf9e2261f1a7810cd9862a4040dfc06 | [
"MIT"
] | 18 | 2017-12-14T12:04:45.000Z | 2022-03-11T23:23:05.000Z | estatisticas_facebook/faceusers/models.py | danieldourado/estatisticas_facebook_django | 67274e647cf9e2261f1a7810cd9862a4040dfc06 | [
"MIT"
] | 1 | 2021-03-27T16:18:56.000Z | 2021-03-27T16:18:56.000Z | from django.core.urlresolvers import reverse
from django.db import models
from estatisticas_facebook.util.graph import *
def getFaceUser(user_json):
temp_user, created = FaceUsers.objects.get_or_create(id=user_json.get('id'))
temp_user.name = user_json.get('name')
return temp_user
def setInteract... | 47.192982 | 99 | 0.63829 |
730cae363d355073646ff1505a6738e7ce9dd3bb | 24,549 | py | Python | tfkit/test/test_model.py | jc-hou/TFkit | 127f52174dfdfce8792b03bfc05eee9495875d6c | [
"Apache-2.0"
] | null | null | null | tfkit/test/test_model.py | jc-hou/TFkit | 127f52174dfdfce8792b03bfc05eee9495875d6c | [
"Apache-2.0"
] | null | null | null | tfkit/test/test_model.py | jc-hou/TFkit | 127f52174dfdfce8792b03bfc05eee9495875d6c | [
"Apache-2.0"
] | null | null | null | import unittest
from torch import Tensor
from transformers import BertTokenizer, AutoModel, AutoTokenizer
import tfkit
import timeit
from tfkit.test import *
class TestModel(unittest.TestCase):
def testClas(self):
input = "One hundred thirty-four patients suspected of having pancreas cancer successfully... | 53.600437 | 2,588 | 0.613426 |
8b9e5eee706cb1f11269e815f59c1b512c24feeb | 927 | py | Python | tests/transformer/test_output_transformer_api.py | ambiata/atmosphere-python-sdk | 48880a8553000cdea59d63b0fba49e1f0f482784 | [
"MIT"
] | null | null | null | tests/transformer/test_output_transformer_api.py | ambiata/atmosphere-python-sdk | 48880a8553000cdea59d63b0fba49e1f0f482784 | [
"MIT"
] | 9 | 2021-02-21T21:53:03.000Z | 2021-11-05T06:06:55.000Z | tests/transformer/test_output_transformer_api.py | ambiata/atmosphere-python-sdk | 48880a8553000cdea59d63b0fba49e1f0f482784 | [
"MIT"
] | null | null | null | from atmosphere.transformer.output_transformer import OutputTransformer
from atmosphere.transformer.pydantic_models import PredictionResponse
from .utils import get_test_app
def test_valid_request():
class TestOutputTransformer(OutputTransformer):
def apply_transformation(self, msg) -> PredictionResponse... | 35.653846 | 87 | 0.615965 |
e53933a23a453c32f17c71f6bcd46ccf2de5b8df | 192 | py | Python | main.py | rug-gui/T-framework | d3629b97cdbbe216f5cdad8133c65065e837adbb | [
"MIT"
] | 3 | 2021-12-26T10:07:21.000Z | 2022-02-09T02:02:15.000Z | main.py | rug-gui/T-framework | d3629b97cdbbe216f5cdad8133c65065e837adbb | [
"MIT"
] | 1 | 2022-02-06T07:56:50.000Z | 2022-02-06T07:56:50.000Z | main.py | rug-gui/T-framework | d3629b97cdbbe216f5cdad8133c65065e837adbb | [
"MIT"
] | null | null | null | import sqlite3
conn = sqlite3.connect('personal.db')
c = conn.cursor()
x = c.execute("select OPTION,VALUE from PREFERENCES where OPTION='ViewMode'")
vmode=x.fetchall()
#print(vmode[0][1]) | 32 | 78 | 0.71875 |
bc687f72dbf7f7bded2d185e6796bfedceb4a24e | 345 | py | Python | src/629B.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | 2 | 2016-08-19T09:47:03.000Z | 2016-10-01T10:15:03.000Z | src/629B.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | null | null | null | src/629B.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | 1 | 2015-07-01T23:57:32.000Z | 2015-07-01T23:57:32.000Z | n = int(input())
f, m = [0]*368, [0]*368
for i in range(n):
s, a, b = input().split()
if s == 'F':
f[int(a)] += 1
f[int(b)+1] -= 1
elif s == 'M':
m[int(a)] += 1
m[int(b)+1] -= 1
for i in range(1, len(f)):
f[i] += f[i-1]
m[i] += m[i-1]
print(max([min(f[i], m[i])*2 f... | 19.166667 | 54 | 0.397101 |
e0dc69e1ccd081b96fefd15cdf8626d2d03ba679 | 106,970 | py | Python | Lib/test/test_shutil.py | milanbalazs/cpython | 5f0555e85688c27b064fdfe88cdc9b2b59432231 | [
"0BSD"
] | null | null | null | Lib/test/test_shutil.py | milanbalazs/cpython | 5f0555e85688c27b064fdfe88cdc9b2b59432231 | [
"0BSD"
] | null | null | null | Lib/test/test_shutil.py | milanbalazs/cpython | 5f0555e85688c27b064fdfe88cdc9b2b59432231 | [
"0BSD"
] | null | null | null | # Copyright (C) 2003 Python Software Foundation
import unittest
import unittest.mock
import shutil
import tempfile
import sys
import stat
import os
import os.path
import errno
import functools
import pathlib
import subprocess
import random
import string
import contextlib
import io
from shutil import (make_archive,
... | 39.988785 | 130 | 0.6056 |
3f0f7b1e59728f5f7e58549899b60632e4a02b7e | 3,766 | py | Python | gaps/edge/image_analysis.py | weiyuhan/gaps | 47582d34a6d6395a0b0b75dffca6c94839d4abf1 | [
"MIT"
] | null | null | null | gaps/edge/image_analysis.py | weiyuhan/gaps | 47582d34a6d6395a0b0b75dffca6c94839d4abf1 | [
"MIT"
] | null | null | null | gaps/edge/image_analysis.py | weiyuhan/gaps | 47582d34a6d6395a0b0b75dffca6c94839d4abf1 | [
"MIT"
] | 1 | 2020-05-20T12:14:56.000Z | 2020-05-20T12:14:56.000Z | from gaps.edge.fitness import dissimilarity_measure
from gaps.progress_bar import print_progress
class ImageAnalysis(object):
"""Cache for dissimilarity measures of individuals
Class have static lookup table where keys are Piece's id's.
For each pair puzzle pieces there is a map with values representing
... | 40.934783 | 99 | 0.624004 |
4d0f8765c2efe7296100a5da83646e63ae082611 | 18,419 | py | Python | hypernets/tabular/dataframe_mapper.py | DataCanvasIO/Hypernets | 4dd8b9846a3e205f03a23a770169cd1d14a98f03 | [
"Apache-2.0"
] | 1,080 | 2020-06-22T07:44:22.000Z | 2022-03-22T07:46:48.000Z | hypernets/tabular/dataframe_mapper.py | DataCanvasIO/Hypernets | 4dd8b9846a3e205f03a23a770169cd1d14a98f03 | [
"Apache-2.0"
] | 24 | 2020-08-06T02:06:37.000Z | 2022-03-31T03:34:35.000Z | hypernets/tabular/dataframe_mapper.py | DataCanvasIO/Hypernets | 4dd8b9846a3e205f03a23a770169cd1d14a98f03 | [
"Apache-2.0"
] | 170 | 2020-08-14T08:39:18.000Z | 2022-03-23T12:58:17.000Z | # -*- coding:utf-8 -*-
"""
Adapted from: https://github.com/scikit-learn-contrib/sklearn-pandas
1. Fix the problem of confusion of column names
2. Support `columns` is a callable object
"""
import contextlib
import numpy as np
import pandas as pd
from scipy import sparse as _sparse
from sklearn.base import BaseEstimat... | 40.216157 | 118 | 0.596069 |
cbcedb694b5d42b85316e4662f0e96cec99d0ddd | 2,826 | py | Python | instagram/views.py | Nancy-Muthinzi/ip2-instagram | cdfeb72b02dae35d5b6089386b5e61402a4b288b | [
"MIT"
] | null | null | null | instagram/views.py | Nancy-Muthinzi/ip2-instagram | cdfeb72b02dae35d5b6089386b5e61402a4b288b | [
"MIT"
] | null | null | null | instagram/views.py | Nancy-Muthinzi/ip2-instagram | cdfeb72b02dae35d5b6089386b5e61402a4b288b | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse, Http404, HttpResponseRedirect
import datetime as dt
from .models import Image, Profile, Comment, User
from django.contrib.auth.decorators import login_required
from .forms import CommentForm
from .email import send_we... | 29.747368 | 153 | 0.672682 |
afff92c5ef42dbd22f67a003b845a8c695d93677 | 967 | py | Python | app/user/views.py | beingvikasagain/recipe-app-api | 057771c5ae9103044d67785cf38d293a462dbc9e | [
"MIT"
] | null | null | null | app/user/views.py | beingvikasagain/recipe-app-api | 057771c5ae9103044d67785cf38d293a462dbc9e | [
"MIT"
] | null | null | null | app/user/views.py | beingvikasagain/recipe-app-api | 057771c5ae9103044d67785cf38d293a462dbc9e | [
"MIT"
] | null | null | null | from django.shortcuts import render
from user.serializers import UserSerializer, AuthTokenSerializer
from rest_framework import generics, authentication, permissions
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
class CreateUserView(generics.CreateAPIView... | 35.814815 | 66 | 0.783868 |
ee4a1d2cc9b1fb5868f9a2ae622437a37f0baf27 | 21,137 | py | Python | python/src/wslink/launcher.py | yasushi-saito/wslink | 25c7d3b2f6da25b100bc69efa4e06b1defe22ca1 | [
"BSD-3-Clause"
] | 51 | 2017-06-01T20:12:48.000Z | 2022-03-28T08:18:00.000Z | python/src/wslink/launcher.py | yasushi-saito/wslink | 25c7d3b2f6da25b100bc69efa4e06b1defe22ca1 | [
"BSD-3-Clause"
] | 70 | 2017-07-17T23:37:40.000Z | 2022-02-27T01:58:47.000Z | python/src/wslink/launcher.py | yasushi-saito/wslink | 25c7d3b2f6da25b100bc69efa4e06b1defe22ca1 | [
"BSD-3-Clause"
] | 19 | 2017-05-17T12:47:54.000Z | 2021-11-22T03:37:47.000Z | import argparse
import asyncio
import datetime
import io
import json
import logging
import os
import re
import string
import subprocess
import sys
import time
import uuid
from random import choice
from wslink import backends
STATUS_OK = 200
STATUS_BAD_REQUEST = 400
STATUS_NOT_FOUND = 404
STATUS_SERVICE_UNAVAILABLE =... | 35.053068 | 139 | 0.477977 |
88a838bb1dc662f138a4aa70ace30d93b568fbe8 | 2,161 | py | Python | app/client.py | egregiouss/http-client | 6a368724f15986906a2a413c9646f0cd7dbaa2c7 | [
"MIT"
] | null | null | null | app/client.py | egregiouss/http-client | 6a368724f15986906a2a413c9646f0cd7dbaa2c7 | [
"MIT"
] | null | null | null | app/client.py | egregiouss/http-client | 6a368724f15986906a2a413c9646f0cd7dbaa2c7 | [
"MIT"
] | null | null | null | import logging
import socket
import sys
import app.parser as parser
from app.request import Request
from app.response import Response
import re
from app.errors import *
cookies = {}
logger = logging.getLogger(__name__)
def parse_uri(uri):
_path = '/'
_scheme = ''
if re.match('http://', uri):
ur... | 24.280899 | 93 | 0.58584 |
7b4029e697552b50d4be5cb077b29db14760629c | 8,174 | py | Python | pydre/merge_tool.py | tkerwin/pydre | a100779801ffdc9855f09328bd28bf79ab6e679b | [
"Apache-2.0"
] | null | null | null | pydre/merge_tool.py | tkerwin/pydre | a100779801ffdc9855f09328bd28bf79ab6e679b | [
"Apache-2.0"
] | null | null | null | pydre/merge_tool.py | tkerwin/pydre | a100779801ffdc9855f09328bd28bf79ab6e679b | [
"Apache-2.0"
] | null | null | null | import sys
import os
import math
import glob
import pandas as pd
import re
import logging
import shutil
logger = logging.getLogger(__name__)
regular_expressions = ['(?:.*\\\)?(.*)_Sub_(\d+)_Drive_\d+\.dat', '(?:.*\\\)?([^_]+)_([^_]+)_([^_]+)_(\d+).dat']
regular_expressions_glob = ['*_Sub_*_Drive_*.dat', '*_*_*_*.dat'... | 45.160221 | 122 | 0.54918 |
cbb6c81dbb455fabce4f5052283272d9d2f9d5a0 | 16,205 | py | Python | qiskit/opflow/primitive_ops/pauli_sum_op.py | navaneethsdk/qiskit-terra | 66a029f2a67c14dbf34857d172b088d75d152b55 | [
"Apache-2.0"
] | null | null | null | qiskit/opflow/primitive_ops/pauli_sum_op.py | navaneethsdk/qiskit-terra | 66a029f2a67c14dbf34857d172b088d75d152b55 | [
"Apache-2.0"
] | null | null | null | qiskit/opflow/primitive_ops/pauli_sum_op.py | navaneethsdk/qiskit-terra | 66a029f2a67c14dbf34857d172b088d75d152b55 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 38.860911 | 100 | 0.603394 |
9fb82f4ad6c868c04cb3de6892833d1efd96865a | 3,259 | py | Python | disasm-coe.py | smdsbz/mips-disassembler | 3aacedbf861d7b3628ffb5ba8dab3a1859b7f7ce | [
"MIT"
] | null | null | null | disasm-coe.py | smdsbz/mips-disassembler | 3aacedbf861d7b3628ffb5ba8dab3a1859b7f7ce | [
"MIT"
] | null | null | null | disasm-coe.py | smdsbz/mips-disassembler | 3aacedbf861d7b3628ffb5ba8dab3a1859b7f7ce | [
"MIT"
] | 1 | 2021-03-02T09:33:46.000Z | 2021-03-02T09:33:46.000Z | # -*- coding: utf-8 -*-
import capstone as cs
'''
#### `.coe` File Format Example
```text
memory_initialization_radix=16;
memory_initialization_vector=
3C10BFC0 00000000 00000000 00000000
36100000 00000000 00000000 00000000
BE090010 00000000 00000000 00000000
8E110000 00000000 00000000 00000000
00000000 ... | 29.627273 | 79 | 0.608162 |
53ddd43115a6b208433d405bd42cd3dbada5b331 | 719 | py | Python | wildlifecompliance/migrations/0261_inspection_inspection_team_lead.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 1 | 2020-12-07T17:12:40.000Z | 2020-12-07T17:12:40.000Z | wildlifecompliance/migrations/0261_inspection_inspection_team_lead.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 14 | 2020-01-08T08:08:26.000Z | 2021-03-19T22:59:46.000Z | wildlifecompliance/migrations/0261_inspection_inspection_team_lead.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 15 | 2020-01-08T08:02:28.000Z | 2021-11-03T06:48:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-07-19 02:47
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | 29.958333 | 158 | 0.703755 |
0acb43da0b65c5305ee13708c93b194ef06a86d4 | 5,139 | py | Python | homedisplay/info_air_quality/management/commands/fetch_outside_air_quality.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 1 | 2016-11-28T04:35:06.000Z | 2016-11-28T04:35:06.000Z | homedisplay/info_air_quality/management/commands/fetch_outside_air_quality.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 160 | 2015-01-01T20:59:29.000Z | 2016-04-25T13:36:52.000Z | homedisplay/info_air_quality/management/commands/fetch_outside_air_quality.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 1 | 2015-02-25T21:24:01.000Z | 2015-02-25T21:24:01.000Z | from bs4 import BeautifulSoup
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils import timezone
from homedisplay.utils import publish_ws
import datetime
import json
import redis
import requests
class Command(BaseCommand):
args = ''
help = 'Fet... | 41.780488 | 160 | 0.526562 |
7b48d462eb8b9a2bab54c5a105e91563fc8871d3 | 1,922 | py | Python | quantum/extensions/flavor.py | aristanetworks/arista-ovs-quantum | 8e7fe17cafa70c3346e2a5d70da2d6e2637c338e | [
"Apache-2.0"
] | null | null | null | quantum/extensions/flavor.py | aristanetworks/arista-ovs-quantum | 8e7fe17cafa70c3346e2a5d70da2d6e2637c338e | [
"Apache-2.0"
] | null | null | null | quantum/extensions/flavor.py | aristanetworks/arista-ovs-quantum | 8e7fe17cafa70c3346e2a5d70da2d6e2637c338e | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 Nachi Ueno, NTT MCL, Inc. 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.... | 28.264706 | 78 | 0.639958 |
0b805bbf8ddac529eb87d35885d2453f03d98cb3 | 9,934 | py | Python | api-guide/source/conf.py | JohnGarbutt/nova | 21f6f7b63af920aa3a5501603c3debbcd5ec5bc5 | [
"Apache-2.0"
] | 2 | 2018-11-18T16:03:18.000Z | 2019-05-15T04:34:55.000Z | api-guide/source/conf.py | JohnGarbutt/nova | 21f6f7b63af920aa3a5501603c3debbcd5ec5bc5 | [
"Apache-2.0"
] | null | null | null | api-guide/source/conf.py | JohnGarbutt/nova | 21f6f7b63af920aa3a5501603c3debbcd5ec5bc5 | [
"Apache-2.0"
] | 2 | 2015-12-28T14:36:29.000Z | 2018-11-18T16:03:20.000Z | # -*- coding: utf-8 -*-
# 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, softwar... | 33.33557 | 79 | 0.707369 |
26322fd52c9097cd66e6970a18fff1e4c0d01684 | 3,016 | py | Python | DRR-Studies/script_main.py | PayamZandiyeh/DRR-Studies | 8b4f153b989af6b29bcfc517b188d5c132949b34 | [
"MIT"
] | 13 | 2019-12-14T09:26:53.000Z | 2022-03-23T02:50:11.000Z | DRR-Studies/script_main.py | BTAROCKET/DRR-Studies | 8b4f153b989af6b29bcfc517b188d5c132949b34 | [
"MIT"
] | null | null | null | DRR-Studies/script_main.py | BTAROCKET/DRR-Studies | 8b4f153b989af6b29bcfc517b188d5c132949b34 | [
"MIT"
] | 2 | 2020-01-27T17:35:49.000Z | 2021-11-02T13:18:31.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 7 13:55:00 2018
@author: Payam
"""
#%% import libraries
import itk
import numpy as np
from read_image import get_itk_image_type
import main_functions
import os
from StereoFlouroscopyRegistration.io.read_image import get_itk_image_type
input_file... | 41.315068 | 197 | 0.645889 |
375dbf88bd2b455a8a3652b570bbb62acff8d95e | 222 | py | Python | Strings/strpixel1.py | cyph3r-exe/python-practice-files | d95dd5eb14378c4f08fe4354d66356e3128de54e | [
"Apache-2.0"
] | null | null | null | Strings/strpixel1.py | cyph3r-exe/python-practice-files | d95dd5eb14378c4f08fe4354d66356e3128de54e | [
"Apache-2.0"
] | null | null | null | Strings/strpixel1.py | cyph3r-exe/python-practice-files | d95dd5eb14378c4f08fe4354d66356e3128de54e | [
"Apache-2.0"
] | null | null | null | #Indexing part 1
# 0123456789012345678
str = "come let's practice"
print(str[4:15])
#part2
print(str[4:15:2])
#part3
print(str[:12])
#part3
print(str[16:11])
#part4
print(str[16:11:-2])
#part5
print(str[::-1]) | 11.684211 | 27 | 0.644144 |
5b94942b8e3ff23c449e1a6a1cd8293924bd3570 | 1,751 | py | Python | trunk/VyPy/optimize/drivers/Driver.py | jiaxu825/VyPy | 47100bad9dea46f12cb8bfa1ba86886e06f5c85d | [
"BSD-3-Clause"
] | 1 | 2021-12-28T06:39:54.000Z | 2021-12-28T06:39:54.000Z | trunk/VyPy/optimize/drivers/Driver.py | paulcon/VyPy | 5acb40e8d19ea76f3cd45f9cf98f252ca15e23f6 | [
"BSD-3-Clause"
] | null | null | null | trunk/VyPy/optimize/drivers/Driver.py | paulcon/VyPy | 5acb40e8d19ea76f3cd45f9cf98f252ca15e23f6 | [
"BSD-3-Clause"
] | null | null | null |
# ----------------------------------------------------------------------
# Imports
# ----------------------------------------------------------------------
from VyPy.data import ibunch, obunch
# ----------------------------------------------------------------------
# Driver
# -------------------... | 32.425926 | 92 | 0.459737 |
4ba0aa716a9867b75bea9a0575c6447dced10d2e | 4,182 | py | Python | examples/unsupervised_learning/TSDAE/train_askubuntu_tsdae.py | faezakamran/sentence-transformers | 2158fff3aa96651b10fe367c41fdd5008a33c5c6 | [
"Apache-2.0"
] | 7,566 | 2019-07-25T07:45:17.000Z | 2022-03-31T22:15:35.000Z | examples/unsupervised_learning/TSDAE/train_askubuntu_tsdae.py | faezakamran/sentence-transformers | 2158fff3aa96651b10fe367c41fdd5008a33c5c6 | [
"Apache-2.0"
] | 1,444 | 2019-07-25T11:53:48.000Z | 2022-03-31T15:13:32.000Z | examples/unsupervised_learning/TSDAE/train_askubuntu_tsdae.py | faezakamran/sentence-transformers | 2158fff3aa96651b10fe367c41fdd5008a33c5c6 | [
"Apache-2.0"
] | 1,567 | 2019-07-26T15:19:28.000Z | 2022-03-31T19:57:35.000Z |
from sentence_transformers import SentenceTransformer, LoggingHandler
from sentence_transformers import models, util, datasets, evaluation, losses
import logging
import os
import gzip
from torch.utils.data import DataLoader
from datetime import datetime
import sys
#### Just some code to print debug information to std... | 38.018182 | 115 | 0.694165 |
dbcafc279ee5c7f9943ffbe486e50aac3af5cdec | 5,548 | py | Python | sources/skill/annexes/skill_bus_toulouse.py | pbillerot/alexa_pi_ynh | 685a9ded4762f8e5f6aa0d0c812c72e200a46e31 | [
"MIT"
] | 1 | 2019-09-06T06:49:43.000Z | 2019-09-06T06:49:43.000Z | sources/skill/annexes/skill_bus_toulouse.py | pbillerot/alexa_pi_ynh | 685a9ded4762f8e5f6aa0d0c812c72e200a46e31 | [
"MIT"
] | null | null | null | sources/skill/annexes/skill_bus_toulouse.py | pbillerot/alexa_pi_ynh | 685a9ded4762f8e5f6aa0d0c812c72e200a46e31 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from ask_sdk_core.skill_builder import SkillBuilder
from ask_sdk_core.utils import is_request_type, is_intent_name
from ask_sdk_model.ui import SimpleCard
from os import environ
from tisseo import prochains_passages
from six import PY2
try:
from HTMLParser import HTM... | 31.702857 | 79 | 0.682769 |
ddf51ee7ab73c924d4ac0eab9eb341db1075b8d0 | 807 | py | Python | add_mentions.py | UoA-eResearch/pivotonline_tweets | ce88efeb8eccbd0c2e6df5759638de47ce3f6065 | [
"MIT"
] | null | null | null | add_mentions.py | UoA-eResearch/pivotonline_tweets | ce88efeb8eccbd0c2e6df5759638de47ce3f6065 | [
"MIT"
] | null | null | null | add_mentions.py | UoA-eResearch/pivotonline_tweets | ce88efeb8eccbd0c2e6df5759638de47ce3f6065 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
from tqdm.auto import tqdm
with open("pivotonline_tweets_2020_twarc.geojson") as f:
tweets = json.load(f)
for i, tweet in enumerate(tqdm(tweets["features"])):
for other_tweet in tweets["features"]:
screen_name = other_tweet["properties"]["screen_name"]
if sc... | 40.35 | 83 | 0.636927 |
e9d629888b01d7055bf17c1cdd04f17fc8817029 | 5,279 | py | Python | sm-bbox/sm-bbox-annotation/sm-draw-bbox-annotation.py | RichardScottOZ/pyutil | 2ec893f5e24816382bb10a6987fed66363392631 | [
"Apache-2.0"
] | 2 | 2020-11-30T08:43:17.000Z | 2021-07-28T02:53:03.000Z | sm-bbox/sm-bbox-annotation/sm-draw-bbox-annotation.py | RichardScottOZ/pyutil | 2ec893f5e24816382bb10a6987fed66363392631 | [
"Apache-2.0"
] | 5 | 2020-07-19T16:13:11.000Z | 2021-07-22T05:23:42.000Z | sm-bbox/sm-bbox-annotation/sm-draw-bbox-annotation.py | RichardScottOZ/pyutil | 2ec893f5e24816382bb10a6987fed66363392631 | [
"Apache-2.0"
] | 6 | 2019-10-29T08:07:09.000Z | 2021-07-21T08:26:12.000Z | #!/usr/bin/env python3
# Author: Verdi March
"""Usage: ./sm-draw-bbox-annotation.py --ann-input-dir $IMG_ROOT/annotations --img-input-dir $IMG_ROOT/images $IMG_ROOT/bboxed_images"""
import argparse
import cv2
import json
import logging
import numpy as np
import os
from pathlib import Path
from typing import Any, Dic... | 34.503268 | 136 | 0.626255 |
e3bc54f86e5db496421279ffd5c11d28d7c31618 | 389 | py | Python | apps/users/migrations/0010_profile_rod.py | lucasjaroszewski/incremental-game | bae8823f986be0fd046bd50195d43fbc548fad90 | [
"MIT"
] | null | null | null | apps/users/migrations/0010_profile_rod.py | lucasjaroszewski/incremental-game | bae8823f986be0fd046bd50195d43fbc548fad90 | [
"MIT"
] | 5 | 2021-06-09T17:54:51.000Z | 2022-03-12T00:46:49.000Z | apps/users/migrations/0010_profile_rod.py | lucasjaroszewski/incremental-game | bae8823f986be0fd046bd50195d43fbc548fad90 | [
"MIT"
] | 1 | 2020-09-27T18:26:15.000Z | 2020-09-27T18:26:15.000Z | # Generated by Django 3.0.6 on 2020-07-30 20:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0009_auto_20200730_1732'),
]
operations = [
migrations.AddField(
model_name='profile',
name='rod',
... | 20.473684 | 59 | 0.596401 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.