hexsha
stringlengths
40
40
size
int64
1
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
239
max_stars_repo_name
stringlengths
5
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
239
max_issues_repo_name
stringlengths
5
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
239
max_forks_repo_name
stringlengths
5
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.03M
avg_line_length
float64
1
958k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
79721308e6a43d5679880d61660dcd515c3b304f
47
py
Python
myenv/lib/python2.7/site-packages/bootstrap3/__init__.py
dkumarlinux/saleor
e3a852fed7da38e4141b0755bd282012f508c7b9
[ "BSD-3-Clause" ]
1
2021-02-08T07:49:35.000Z
2021-02-08T07:49:35.000Z
myenv/lib/python2.7/site-packages/bootstrap3/__init__.py
dkumarlinux/saleor
e3a852fed7da38e4141b0755bd282012f508c7b9
[ "BSD-3-Clause" ]
2
2022-02-10T16:51:56.000Z
2022-02-10T18:23:52.000Z
myenv/lib/python2.7/site-packages/bootstrap3/__init__.py
dkumarlinux/saleor
e3a852fed7da38e4141b0755bd282012f508c7b9
[ "BSD-3-Clause" ]
1
2020-11-04T08:39:52.000Z
2020-11-04T08:39:52.000Z
# -*- coding: utf-8 -*- __version__ = '8.2.1'
11.75
23
0.510638
79721342ba45ac9b80509bfc9fa00f1bbe065a20
1,611
py
Python
201-300/221-230/224-basicCalculator/basicCalculator.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
201-300/221-230/224-basicCalculator/basicCalculator.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
201-300/221-230/224-basicCalculator/basicCalculator.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
class Solution: def get_num(self, s, start): index = start while index < len(s) and s[index].isdigit(): index += 1 return int(s[start:index]), index def calculate_helper(self, s, start): result, sign, index = 0, 1, start operator = ['+', '-'] while ...
29.833333
62
0.418994
797214b0305b941979afc1560b2424802ffeec28
7,116
py
Python
snake.py
mkcarl/AI_plays_snake
6288399e09a404bf3a322e41164efa0e0a142617
[ "MIT" ]
155
2018-11-24T12:55:01.000Z
2022-03-19T15:19:30.000Z
snake.py
mkcarl/AI_plays_snake
6288399e09a404bf3a322e41164efa0e0a142617
[ "MIT" ]
2
2019-02-04T16:44:09.000Z
2019-11-09T16:15:59.000Z
snake.py
mkcarl/AI_plays_snake
6288399e09a404bf3a322e41164efa0e0a142617
[ "MIT" ]
55
2018-11-24T12:31:33.000Z
2021-07-17T04:49:13.000Z
import random from pygame import draw from brain import * class snake: def __init__(self, width, height, brainLayer, size, random_weights=True, random_bases=True, random_start=False): self.list = [] self.width = width self.height = height self.steps_taken = 0 self.no_of_sam...
36.121827
158
0.525295
79721559c2470b3e599cb129c2aeb37de111eef1
1,485
py
Python
examples/multiobjective/preferences/ggde3_zdt2.py
NatalieGvozdetska/jMetalPy
ab791b25ba025ccfde4f6be36b6fae254ece48ad
[ "MIT" ]
null
null
null
examples/multiobjective/preferences/ggde3_zdt2.py
NatalieGvozdetska/jMetalPy
ab791b25ba025ccfde4f6be36b6fae254ece48ad
[ "MIT" ]
null
null
null
examples/multiobjective/preferences/ggde3_zdt2.py
NatalieGvozdetska/jMetalPy
ab791b25ba025ccfde4f6be36b6fae254ece48ad
[ "MIT" ]
null
null
null
from jmetal.algorithm.multiobjective.gde3 import GDE3 from jmetal.problem import ZDT2 from jmetal.util.observer import ProgressBarObserver, VisualizerObserver from jmetal.util.solutions import read_solutions, print_function_values_to_file, print_variables_to_file from jmetal.util.solutions.comparator import GDominanceC...
41.25
121
0.744108
7972165b5224f5f9f4f6ce3dac9bb83baf118ee4
9,323
py
Python
handle_model_files.py
pinakigupta/BehaviorRL
ab67d155197c46f3e8551af9763e490b781e8eeb
[ "MIT" ]
6
2020-03-09T01:06:37.000Z
2020-09-16T04:51:24.000Z
handle_model_files.py
pinakigupta/BehaviorRL
ab67d155197c46f3e8551af9763e490b781e8eeb
[ "MIT" ]
null
null
null
handle_model_files.py
pinakigupta/BehaviorRL
ab67d155197c46f3e8551af9763e490b781e8eeb
[ "MIT" ]
null
null
null
import site import os import sys import glob import time from mpi4py import MPI from settings import req_dirs, models_folder, ray_folder from shutil import copyfile import subprocess pathname = os.getcwd() homepath = os.path.expanduser("~") s3pathname = homepath+'/s3-drive/groups/Behavior/Pinaki' def makedirpath(pa...
34.275735
102
0.614824
79721791c7b5d39a4d16cd2f91636a063d2db4bf
1,001
py
Python
PyGitUp/tests/test_tracking.py
hugovk/PyGitUp
c3da6c8db8628c1e23da22fe2fcbf5d96c6a7a44
[ "MIT" ]
431
2015-01-01T15:33:40.000Z
2022-03-02T22:41:06.000Z
PyGitUp/tests/test_tracking.py
hugovk/PyGitUp
c3da6c8db8628c1e23da22fe2fcbf5d96c6a7a44
[ "MIT" ]
86
2015-01-12T14:41:06.000Z
2021-10-02T14:30:09.000Z
PyGitUp/tests/test_tracking.py
hugovk/PyGitUp
c3da6c8db8628c1e23da22fe2fcbf5d96c6a7a44
[ "MIT" ]
38
2015-01-20T09:46:07.000Z
2021-10-12T02:06:31.000Z
# System imports import os from os.path import join from git import * from PyGitUp.tests import basepath, init_master, update_file test_name = 'tracking' repo_path = join(basepath, test_name + os.sep) def _read_file(path): with open(path) as f: return f.read() def setup(): master_path, master = in...
20.854167
60
0.681319
797217f0643c87e41bd472ae59d116c31da3df7c
104
py
Python
mnist_example/visualize_data.py
iaroslav-ai/learn-to-learn
773f9415d53d15cc81d8220250e532e95b7e0324
[ "MIT" ]
1
2017-01-01T04:35:36.000Z
2017-01-01T04:35:36.000Z
visualize_data.py
iaroslav-ai/one-shot
3a12377d38708de2566fdc3bf2fe8dccf4a5a29a
[ "MIT" ]
null
null
null
visualize_data.py
iaroslav-ai/one-shot
3a12377d38708de2566fdc3bf2fe8dccf4a5a29a
[ "MIT" ]
null
null
null
import data_loader as dl import matplotlib.pyplot as plt a = dl.get_image(77) plt.imshow(a) plt.show()
14.857143
31
0.759615
797218069f71b9d453e01d6b025bfb5d5448f26e
1,866
py
Python
setup.py
lzrvch/pyspikelib
b1f09f916291a1cd45c61d7f963c6cfcc611265b
[ "MIT" ]
3
2021-07-21T22:59:01.000Z
2021-08-05T04:01:56.000Z
setup.py
vanyalzr/pyspikelib
b1f09f916291a1cd45c61d7f963c6cfcc611265b
[ "MIT" ]
null
null
null
setup.py
vanyalzr/pyspikelib
b1f09f916291a1cd45c61d7f963c6cfcc611265b
[ "MIT" ]
null
null
null
"""pyspikelib: A set of tools for neuronal spiking data mining""" import os import re import codecs import setuptools here = os.path.abspath(os.path.dirname(__file__)) with open('README.md', 'r') as fh: LONG_DESCRIPTION = fh.read() def read(*parts): with codecs.open(os.path.join(here, *parts), 'r') as fp: ...
25.561644
88
0.685959
79721807c1a61a9e74e3dc72e5a62eeda1bdec69
393
py
Python
pictures/asgi.py
JeremiahNgige/gallery
572c24bd808ea6bc12411f0e72396449dcdfe4f5
[ "MIT" ]
null
null
null
pictures/asgi.py
JeremiahNgige/gallery
572c24bd808ea6bc12411f0e72396449dcdfe4f5
[ "MIT" ]
null
null
null
pictures/asgi.py
JeremiahNgige/gallery
572c24bd808ea6bc12411f0e72396449dcdfe4f5
[ "MIT" ]
null
null
null
""" ASGI config for pictures project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETT...
23.117647
78
0.78626
79721863d971e7458d85a1ee6efc76e25f26c7b1
11,954
py
Python
models/model.py
im73/MAE_INformer
b585a21dd1cc3997ff9feba06d9862cc864848f8
[ "Apache-2.0" ]
null
null
null
models/model.py
im73/MAE_INformer
b585a21dd1cc3997ff9feba06d9862cc864848f8
[ "Apache-2.0" ]
null
null
null
models/model.py
im73/MAE_INformer
b585a21dd1cc3997ff9feba06d9862cc864848f8
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from utils.masking import TriangularCausalMask, ProbMask from models.encoder import Encoder, EncoderLayer, ConvLayer, EncoderStack from models.decoder import Decoder, DecoderLayer from models.attn import FullAttention, ProbAttention, AttentionLa...
45.625954
123
0.556466
797218fa8e1fdaac5e9a20012c6db55bdda610a9
14,046
py
Python
mySQL_Python_Examples/IEDC_MySQLCodeSnippets.py
IndEcol/IE_data_commons
93bca19c7b447aa9e7ba777dc10df9d09eaf1a05
[ "MIT" ]
13
2018-07-11T08:21:16.000Z
2022-03-25T13:40:08.000Z
mySQL_Python_Examples/IEDC_MySQLCodeSnippets.py
IndEcol/IE_data_commons
93bca19c7b447aa9e7ba777dc10df9d09eaf1a05
[ "MIT" ]
23
2018-06-22T12:35:50.000Z
2021-08-03T17:23:13.000Z
mySQL_Python_Examples/IEDC_MySQLCodeSnippets.py
IndEcol/IE_data_commons
93bca19c7b447aa9e7ba777dc10df9d09eaf1a05
[ "MIT" ]
2
2018-09-12T07:17:49.000Z
2019-06-14T15:12:22.000Z
# -*- coding: utf-8 -*- """ Created on Mon Jul 30 14:01:15 2018 @author: spauliuk """ import pymysql import datetime import IEDC_PW conn = pymysql.connect(host='www.industrialecology.uni-freiburg.de', port=3306, user=IEDC_PW.IEDC_write_access_user, passwd=IEDC_PW.IEDC_write_access_user_PW, db='iedc_review', autocom...
38.587912
2,906
0.721415
797219267e7a139d69b186de7542ccaedcb5c032
2,163
py
Python
source/BotApi.py
icYFTL/Community_D
2ed407b0d8732fee8e8376ddd394aac1e044de11
[ "MIT" ]
null
null
null
source/BotApi.py
icYFTL/Community_D
2ed407b0d8732fee8e8376ddd394aac1e044de11
[ "MIT" ]
null
null
null
source/BotApi.py
icYFTL/Community_D
2ed407b0d8732fee8e8376ddd394aac1e044de11
[ "MIT" ]
null
null
null
from Config import Config from source.JSONWorker import JSONWorker import vk_api from vk_api.longpoll import VkLongPoll, VkEventType import random import hues class BotApi: def __init__(self, token): self.token = token self.vk = None self.users = Config.admins self.get_session() ...
36.661017
115
0.515025
7972199d538140d7e3e5076233a66f3d8358c928
14,008
py
Python
tests/ui_tests/app/configuration.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
tests/ui_tests/app/configuration.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
tests/ui_tests/app/configuration.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
import json import allure from retrying import retry from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException, \ TimeoutException from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.remote.webelement import WebElement from tests.ui_tests.ap...
42.83792
96
0.681611
79721a3544a1f5e1cd1803542a49375b0dccf9d1
1,014
py
Python
src/web/faces.py
kchen0x/emotion-detection
08402e724d218feb5d3df1fa31f9631cf97d3629
[ "MIT" ]
1
2018-02-04T11:25:23.000Z
2018-02-04T11:25:23.000Z
src/web/faces.py
kchen0x/emotion-detection
08402e724d218feb5d3df1fa31f9631cf97d3629
[ "MIT" ]
null
null
null
src/web/faces.py
kchen0x/emotion-detection
08402e724d218feb5d3df1fa31f9631cf97d3629
[ "MIT" ]
null
null
null
from flask import Flask, jsonify, make_response, request, abort, redirect, send_file import logging import emotion_gender_processor as eg_processor app = Flask(__name__) @app.route('/') def index(): return redirect("https://ekholabs.ai", code=302) @app.route('/classifyImage', methods=['GET']) def upload(): ...
31.6875
114
0.70217
79721a82d007ad3c61b0109fb9d5436a70843821
931
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/AddNetworkSecurityGroupRulesSpec.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/AddNetworkSecurityGroupRulesSpec.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/AddNetworkSecurityGroupRulesSpec.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
33.25
75
0.750806
79721aa5720b255e0531330dae7bd191abcac5d3
12,915
py
Python
.history/handtracking_v007_20220601211918.py
JacobHA/HandsFree
a374bcb823370963a1c0e30cbb4866018d6d4169
[ "MIT" ]
null
null
null
.history/handtracking_v007_20220601211918.py
JacobHA/HandsFree
a374bcb823370963a1c0e30cbb4866018d6d4169
[ "MIT" ]
null
null
null
.history/handtracking_v007_20220601211918.py
JacobHA/HandsFree
a374bcb823370963a1c0e30cbb4866018d6d4169
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Aug 2 00:20:41 2021 @author: jacob """ import cv2 import mediapipe as mp from vedo import * from time import sleep from google.protobuf.json_format import MessageToDict import numpy as np from utils import * MEMORY_DEBUG = False THUMB_TIP_INDEX = 4 INDEX_TIP_INDEX = 8 MI...
43.338926
176
0.569725
79721aed49e915a9fafcb04e32b9eb3d2cc70071
679
py
Python
src/bioregistry/curation/clean_name_suffixes.py
Adafede/bioregistry
9b6a281354554005d985499f9d61aecb58a0a84c
[ "MIT" ]
17
2021-09-14T17:58:16.000Z
2022-03-11T06:22:11.000Z
src/bioregistry/curation/clean_name_suffixes.py
Adafede/bioregistry
9b6a281354554005d985499f9d61aecb58a0a84c
[ "MIT" ]
148
2021-09-18T08:52:46.000Z
2022-03-23T15:57:35.000Z
src/bioregistry/curation/clean_name_suffixes.py
Adafede/bioregistry
9b6a281354554005d985499f9d61aecb58a0a84c
[ "MIT" ]
9
2021-09-28T20:18:53.000Z
2022-03-14T17:23:35.000Z
"""Remove uninformative suffixes in names of resources.""" import click from tabulate import tabulate import bioregistry suffixes = ["id", "accession"] @click.command() def _main(): rows = [] registry = bioregistry.read_registry() for prefix, resource in registry.items(): name = bioregistry.get...
25.148148
77
0.639175
79721b1723573844d8927730ffdf99e986985356
861
py
Python
pincer/utils/insertion.py
mwath/Pincer
9894aacb483b8a64f6927ae6dba526b95a7d16e7
[ "MIT" ]
null
null
null
pincer/utils/insertion.py
mwath/Pincer
9894aacb483b8a64f6927ae6dba526b95a7d16e7
[ "MIT" ]
null
null
null
pincer/utils/insertion.py
mwath/Pincer
9894aacb483b8a64f6927ae6dba526b95a7d16e7
[ "MIT" ]
null
null
null
# Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. from inspect import getfullargspec, Parameter, Signature from typing import Any, Union, Callable, Mapping, List from .types import Coro from ..objects.message import MessageContext def should_pass_cls(call: Union[Coro,...
27.774194
77
0.699187
79721d52b37bbd0d92425e45e4b245b627b08c5d
3,906
py
Python
allennlp/modules/scalar_mix.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
65
2020-11-13T05:36:29.000Z
2022-03-26T22:45:46.000Z
allennlp/modules/scalar_mix.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
11
2021-05-26T16:22:17.000Z
2022-03-02T04:03:18.000Z
allennlp/modules/scalar_mix.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
10
2020-11-21T15:25:02.000Z
2022-02-25T11:09:50.000Z
from typing import List import torch from torch.nn import ParameterList, Parameter from allennlp.common.checks import ConfigurationError class ScalarMix(torch.nn.Module): """ Computes a parameterised scalar mixture of N tensors, ``mixture = gamma * sum(s_k * tensor_k)`` where ``s = softmax(w)``, with ``w...
47.634146
104
0.601639
79721dea5ca3c7a883d1dd2404388ad829b761db
4,452
py
Python
murano_tempest_tests/tests/api/application_catalog/base.py
aqsamm/murano-hot-doc
b09cc17ee5b41f209dd15ee4dbe5d1d5d7e6107f
[ "Apache-2.0" ]
1
2021-07-28T23:19:49.000Z
2021-07-28T23:19:49.000Z
murano_tempest_tests/tests/api/application_catalog/base.py
aqsamm/murano-hot-doc
b09cc17ee5b41f209dd15ee4dbe5d1d5d7e6107f
[ "Apache-2.0" ]
null
null
null
murano_tempest_tests/tests/api/application_catalog/base.py
aqsamm/murano-hot-doc
b09cc17ee5b41f209dd15ee4dbe5d1d5d7e6107f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 Mirantis, 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.apache.org/licenses/LICENSE-2.0 # # Unless requir...
34.78125
78
0.657233
79721ef1fadb4c5e95ab41d4c35c696f5b9a7320
1,130
py
Python
tests/python-playground/least_squares_1.py
marcocannici/scs
799a4f7daed4294cd98c73df71676195e6c63de4
[ "MIT" ]
25
2017-06-30T15:31:33.000Z
2021-04-21T20:12:18.000Z
tests/python-playground/least_squares_1.py
marcocannici/scs
799a4f7daed4294cd98c73df71676195e6c63de4
[ "MIT" ]
34
2017-06-07T01:18:17.000Z
2021-04-24T09:44:00.000Z
tests/python-playground/least_squares_1.py
marcocannici/scs
799a4f7daed4294cd98c73df71676195e6c63de4
[ "MIT" ]
13
2017-06-07T01:16:09.000Z
2021-06-07T09:12:56.000Z
# This is automatically-generated code. # Uses the jinja2 library for templating. import cvxpy as cp import numpy as np import scipy as sp # setup problemID = "least_squares_1" prob = None opt_val = None # Variable declarations import scipy.sparse as sps n = 20 m = 30 np.random.seed(1) x = cp.Variable(n) A ...
17.936508
69
0.659292
79721ef3ade09c239b424d6e4e2e87e8a6d5141e
465
py
Python
linepy/__init__.py
paqsy23/selfbot
ee5c998a8c20aeac50e81ef1981e3ba99f4bb965
[ "BSD-3-Clause" ]
null
null
null
linepy/__init__.py
paqsy23/selfbot
ee5c998a8c20aeac50e81ef1981e3ba99f4bb965
[ "BSD-3-Clause" ]
null
null
null
linepy/__init__.py
paqsy23/selfbot
ee5c998a8c20aeac50e81ef1981e3ba99f4bb965
[ "BSD-3-Clause" ]
null
null
null
from .client import LineClient from .channel import LineChannel from .poll import LinePoll from akad.ttypes import OpType __copyright__ = 'Copyright 2017 by Fadhiil Rachman' __version__ = '1.9.2' __license__ = 'BSD-3-Clause' __author__ = 'Fadhiil Rachman' __author_email__ = 'fadhiilra...
33.214286
64
0.694624
797221529e1b8a2019f31161f901396be2b895dd
2,405
py
Python
Fermi_Pico_Game/Fermi_Pico.py
vishalmajumdar95/Python_Simple_Mini_Project_Games
cdef54eaefc6528a2a10984e60abd0872adc56d4
[ "MIT" ]
1
2021-08-05T08:29:32.000Z
2021-08-05T08:29:32.000Z
Fermi_Pico_Game/Fermi_Pico.py
vishalmajumdar95/Python_Simple_Mini_Project_Games
cdef54eaefc6528a2a10984e60abd0872adc56d4
[ "MIT" ]
null
null
null
Fermi_Pico_Game/Fermi_Pico.py
vishalmajumdar95/Python_Simple_Mini_Project_Games
cdef54eaefc6528a2a10984e60abd0872adc56d4
[ "MIT" ]
null
null
null
import random def getSecretNum(numDigits): # Returns a string that is numDigits long, made up of unique random digits. numbers = list(range(10)) random.shuffle(numbers) secretNum = '' for i in range(numDigits): secretNum += str(numbers[i]) # print (secretNum) return secretNum def getCl...
32.945205
91
0.585863
797221b2d843178f9978265770bb5657c50debc6
3,510
py
Python
bindings/python/ensmallen/datasets/string/enterococcussp8g7msg3316.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/enterococcussp8g7msg3316.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/enterococcussp8g7msg3316.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Enterococcus sp. 8G7_MSG3316. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--p...
33.428571
223
0.679487
797221ba85dd5e097f24af74c1329778edc2f5cf
6,084
py
Python
flopy/modflow/mfpval.py
geowat/flopy
b6b110a8807e18dca9b0b7491db0a72b36709098
[ "CC0-1.0", "BSD-3-Clause" ]
1
2021-03-17T09:15:54.000Z
2021-03-17T09:15:54.000Z
flopy/modflow/mfpval.py
geowat/flopy
b6b110a8807e18dca9b0b7491db0a72b36709098
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
flopy/modflow/mfpval.py
geowat/flopy
b6b110a8807e18dca9b0b7491db0a72b36709098
[ "CC0-1.0", "BSD-3-Clause" ]
2
2020-01-03T17:14:39.000Z
2020-03-04T14:21:27.000Z
""" mfpval module. Contains the ModflowPval class. Note that the user can access the ModflowPval class as `flopy.modflow.ModflowPval`. Additional information for this MODFLOW package can be found at the `Online MODFLOW Guide <http://water.usgs.gov/ogw/modflow-nwt/MODFLOW-NWT-Guide/parameter_value_file.htm>`_. ...
28.56338
86
0.537475
79722270be738094b5a4b2273a50f22d8f85bf02
521
py
Python
src/dsrlib/ui/wizard/first.py
fraca7/dsremap
fb8f4fb13e74b512ed0cac05387fbe9694faebcf
[ "MIT" ]
8
2020-09-06T02:15:10.000Z
2022-01-12T22:49:20.000Z
src/dsrlib/ui/wizard/first.py
fraca7/dsremap
fb8f4fb13e74b512ed0cac05387fbe9694faebcf
[ "MIT" ]
5
2021-03-29T20:37:46.000Z
2021-09-19T13:20:24.000Z
src/dsrlib/ui/wizard/first.py
fraca7/dsremap
fb8f4fb13e74b512ed0cac05387fbe9694faebcf
[ "MIT" ]
2
2020-09-16T01:45:49.000Z
2021-06-12T12:38:15.000Z
#!/usr/bin/env python3 from .pages.common import DeviceChoicePage, DeviceNotConfiguredPage from .base import Wizard, ManifestWizardMixin from .arduino import HexUploaderWizardMixin from .pizero import SetupSDWizardMixin class FirstLaunchWizard(HexUploaderWizardMixin, ManifestWizardMixin, SetupSDWizardMixin, Wizard):...
37.214286
97
0.798464
7972239e9abbcae85bad5745401bc1d04b33bfcd
1,721
py
Python
tests/run_test2.py
astooke/gtimer
2146dab459e5d959feb291821733d3d3ba7c523c
[ "MIT" ]
8
2016-09-08T05:40:40.000Z
2020-04-29T18:17:54.000Z
tests/run_test2.py
astooke/gtimer
2146dab459e5d959feb291821733d3d3ba7c523c
[ "MIT" ]
1
2022-01-27T13:11:58.000Z
2022-01-27T13:11:58.000Z
tests/run_test2.py
astooke/gtimer
2146dab459e5d959feb291821733d3d3ba7c523c
[ "MIT" ]
null
null
null
# from __future__ import absolute_import # import gtimer as gt from context import gtimer as gt import time import test2_b # import data_glob as g # @gt.wrap def funky(): print "inside funky" time.sleep(0.1) gt.stamp('wrapped_1') time.sleep(0.1) gt.stamp('first') # for i in [1, 2, 3]: dumdum = test2_b...
22.064103
61
0.558977
797224ca694e75a5f25374cd06556cc09f06ab40
4,718
py
Python
dev/build_prevalidation.py
defaultUser4/spinnaker
d9bd121edd08a58f43dfde6bcb938d476c18fe68
[ "Apache-2.0" ]
null
null
null
dev/build_prevalidation.py
defaultUser4/spinnaker
d9bd121edd08a58f43dfde6bcb938d476c18fe68
[ "Apache-2.0" ]
null
null
null
dev/build_prevalidation.py
defaultUser4/spinnaker
d9bd121edd08a58f43dfde6bcb938d476c18fe68
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2017 Google 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.apache.org/licenses/LICENSE-2.0 # # Unless required by...
41.385965
111
0.752226
7972257d20f2c7331e64252587130ca020f5701d
3,261
py
Python
flaskoidc/models.py
mgorsk1/flaskoidc
10ea856bdcb9d7ee0044f03eb5eb24a12ea9b1fb
[ "Apache-2.0" ]
null
null
null
flaskoidc/models.py
mgorsk1/flaskoidc
10ea856bdcb9d7ee0044f03eb5eb24a12ea9b1fb
[ "Apache-2.0" ]
null
null
null
flaskoidc/models.py
mgorsk1/flaskoidc
10ea856bdcb9d7ee0044f03eb5eb24a12ea9b1fb
[ "Apache-2.0" ]
null
null
null
import logging import time from authlib.oidc.core.errors import LoginRequiredError from flask import current_app as app, session from sqlalchemy import Column, Integer, String LOGGER = logging.getLogger(f"flaskoidc.{__name__}") class OAuth2Token(app.db.Model): id = Column(Integer, primary_key=True) user_id ...
32.61
96
0.628948
797225f6dc9d924cab8c69dd5b3097f887866887
19,580
py
Python
statsmodels/iolib/summary2.py
saedsaleh/statsmodels
7df5291f04f406f127242736008f72cb4a579262
[ "BSD-3-Clause" ]
null
null
null
statsmodels/iolib/summary2.py
saedsaleh/statsmodels
7df5291f04f406f127242736008f72cb4a579262
[ "BSD-3-Clause" ]
null
null
null
statsmodels/iolib/summary2.py
saedsaleh/statsmodels
7df5291f04f406f127242736008f72cb4a579262
[ "BSD-3-Clause" ]
null
null
null
from statsmodels.compat.python import (lrange, iterkeys, iteritems, lzip, reduce, itervalues, zip, string_types, range) from statsmodels.compat.collections import OrderedDict import numpy as np import pandas as pd import datetime import textw...
35.026834
79
0.581767
7972267976cab0adf52b39079e713806c0a5fd21
10,785
py
Python
dataset.py
masoudML/Spatio_Temporal_Adversarial_VSR
e49fe9c4287d8e9f24c330e02ade24e479d121d3
[ "MIT" ]
null
null
null
dataset.py
masoudML/Spatio_Temporal_Adversarial_VSR
e49fe9c4287d8e9f24c330e02ade24e479d121d3
[ "MIT" ]
null
null
null
dataset.py
masoudML/Spatio_Temporal_Adversarial_VSR
e49fe9c4287d8e9f24c330e02ade24e479d121d3
[ "MIT" ]
null
null
null
import torch.utils.data as data import torch import numpy as np import os from os import listdir from os.path import join from PIL import Image, ImageOps import random import pyflow from skimage import img_as_float from random import randrange import os.path def is_image_file(filename): return any(filename.endswit...
41.964981
195
0.620306
797227242623353c1950ffc4211cba9e04f3c159
9,175
py
Python
models/official/detection/executor/tpu_executor.py
tengqi159/tpu
4528ca48dc02ffdde564cfa55e8118d89d43a1be
[ "Apache-2.0" ]
2
2020-06-09T01:10:04.000Z
2021-07-01T02:32:42.000Z
models/official/detection/executor/tpu_executor.py
chisyliu/tpu
4528ca48dc02ffdde564cfa55e8118d89d43a1be
[ "Apache-2.0" ]
null
null
null
models/official/detection/executor/tpu_executor.py
chisyliu/tpu
4528ca48dc02ffdde564cfa55e8118d89d43a1be
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2019 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 # ...
38.71308
87
0.678474
797227647cb5f8f9284a92e1c2f94a91c845ab9d
2,628
py
Python
tests/test_export_testcase.py
msakai/onnx-chainer
fcab3530cea7a1130aa9a43aa7de6683ee354d11
[ "MIT" ]
79
2017-12-13T13:26:33.000Z
2022-03-28T06:32:02.000Z
tests/test_export_testcase.py
msakai/onnx-chainer
fcab3530cea7a1130aa9a43aa7de6683ee354d11
[ "MIT" ]
191
2017-12-14T12:49:38.000Z
2019-11-07T01:45:14.000Z
tests/test_export_testcase.py
msakai/onnx-chainer
fcab3530cea7a1130aa9a43aa7de6683ee354d11
[ "MIT" ]
26
2018-02-05T08:13:30.000Z
2019-08-07T03:09:55.000Z
import os import chainer import chainer.functions as F import chainer.links as L import numpy as np import onnx import pytest from onnx_chainer import export_testcase @pytest.fixture(scope='function') def model(): return chainer.Sequential( L.Convolution2D(None, 16, 5, 1, 2), F.relu, L.C...
33.692308
79
0.671994
797227ce4469da7cf4b2139330c0faac8e44a431
699
py
Python
custom_user/bin/django-admin.py
karthikixm/custom-user-model
bcc48f7f5f673c8870af7d63787b99fda1f9ef18
[ "Unlicense" ]
null
null
null
custom_user/bin/django-admin.py
karthikixm/custom-user-model
bcc48f7f5f673c8870af7d63787b99fda1f9ef18
[ "Unlicense" ]
null
null
null
custom_user/bin/django-admin.py
karthikixm/custom-user-model
bcc48f7f5f673c8870af7d63787b99fda1f9ef18
[ "Unlicense" ]
null
null
null
#!/home/karthik/projects/customUserModel/custom_user/bin/python3 # When the django-admin.py deprecation ends, remove this script. import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-admin.p...
31.772727
80
0.732475
79722aa159211bdbbe0f5993b380e8d857366d46
2,110
py
Python
frappe/utils/dateutils.py
snehapatil1/frappe
dd2c33e34ad120e6305a2fa230a72d23a7a03e98
[ "MIT" ]
1
2020-12-07T22:35:21.000Z
2020-12-07T22:35:21.000Z
frappe/utils/dateutils.py
snehapatil1/frappe
dd2c33e34ad120e6305a2fa230a72d23a7a03e98
[ "MIT" ]
11
2018-04-01T18:36:05.000Z
2018-10-04T07:56:07.000Z
frappe/utils/dateutils.py
snehapatil1/frappe
dd2c33e34ad120e6305a2fa230a72d23a7a03e98
[ "MIT" ]
3
2018-01-16T17:59:55.000Z
2019-09-24T16:02:10.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults import datetime from frappe.utils import get_datetime from six import string_types # global values -- used for caching dateformats = { 'yyyy...
27.763158
99
0.700948
79722b57b4e9828f46a2b02845934de1dc1d7e1f
70,290
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations/_application_gateways_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations/_application_gateways_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations/_application_gateways_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# 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 ...
50.677722
240
0.679286
79722b5ca4c7cefdbc3f5131b68bac1266b4c173
2,075
py
Python
contrib/devtools/check-doc.py
BioA3/BioA3
a7ad7021121aaa468b11a9925972e315cea70f50
[ "MIT" ]
null
null
null
contrib/devtools/check-doc.py
BioA3/BioA3
a7ad7021121aaa468b11a9925972e315cea70f50
[ "MIT" ]
null
null
null
contrib/devtools/check-doc.py
BioA3/BioA3
a7ad7021121aaa468b11a9925972e315cea70f50
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' This checks if all command line args are documented. Return value is 0 to indicate no error. Author:...
43.229167
300
0.688193
79722b9810581ab9fe9a9b224b2cb07ce83227d2
417
py
Python
chimaera/clones_estimators.py
drugilsberg/chimaera
4e548a62684d5bb4663a57f9bfc6df3f87cd4c41
[ "MIT" ]
3
2019-07-25T14:15:44.000Z
2021-12-15T06:09:26.000Z
chimaera/clones_estimators.py
drugilsberg/chimaera
4e548a62684d5bb4663a57f9bfc6df3f87cd4c41
[ "MIT" ]
3
2019-10-08T08:52:00.000Z
2021-02-15T06:10:25.000Z
chimaera/clones_estimators.py
drugilsberg/chimaera
4e548a62684d5bb4663a57f9bfc6df3f87cd4c41
[ "MIT" ]
3
2019-03-29T05:35:23.000Z
2020-11-26T10:30:38.000Z
"""Select the CloneEstimator.""" import logging logger = logging.getLogger('chimaera.clones_estimators') from .clustering.hdbscan import Hdbscan def get_clones_estimator(method, *args, **kwargs): clustering_method = None if method == 'hdbscan': clustering_method = Hdbscan(*args, **kwargs) else: ...
29.785714
69
0.719424
79722bd42baa27aa24adba63b757fae4fafc74de
6,785
py
Python
sso/usersettings/models.py
uktrade/staff-sso
c23da74415befdaed60649a9a940b1ba8331581e
[ "MIT" ]
7
2018-07-30T16:18:52.000Z
2022-03-21T12:58:20.000Z
sso/usersettings/models.py
uktrade/staff-sso
c23da74415befdaed60649a9a940b1ba8331581e
[ "MIT" ]
55
2017-06-26T12:49:01.000Z
2022-03-09T15:48:49.000Z
sso/usersettings/models.py
uktrade/staff-sso
c23da74415befdaed60649a9a940b1ba8331581e
[ "MIT" ]
1
2020-05-28T07:17:26.000Z
2020-05-28T07:17:26.000Z
import json from django.contrib.auth import get_user_model from django.db import models from django.utils.translation import gettext_lazy as _ UserModel = get_user_model() class UserSettings(models.Model): """This model defines a list of app settings that a specified user_id can access""" user = models.Fo...
30.563063
98
0.574945
79722c07ca896dbefea6659689929c9a9a00daae
9,239
py
Python
google/api_core/gapic_v1/method.py
lidizheng/python-api-core
ffa528e088dc5e426ed5652be022c8fb43834e25
[ "Apache-2.0" ]
4
2021-10-20T12:39:09.000Z
2022-02-26T15:02:08.000Z
google/api_core/gapic_v1/method.py
lidizheng/python-api-core
ffa528e088dc5e426ed5652be022c8fb43834e25
[ "Apache-2.0" ]
null
null
null
google/api_core/gapic_v1/method.py
lidizheng/python-api-core
ffa528e088dc5e426ed5652be022c8fb43834e25
[ "Apache-2.0" ]
1
2021-10-20T13:47:10.000Z
2021-10-20T13:47:10.000Z
# Copyright 2017 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, s...
38.177686
79
0.667713
79722c395c6bae65e484139d7da4b08215952a1f
11,599
py
Python
saleor/graphql/app/tests/queries/test_apps.py
eanknd/saleor
08aa724176be00d7aaf654f14e9ae99dd4327f97
[ "CC-BY-4.0" ]
1,392
2021-10-06T15:54:28.000Z
2022-03-31T20:50:55.000Z
saleor/graphql/app/tests/queries/test_apps.py
eanknd/saleor
08aa724176be00d7aaf654f14e9ae99dd4327f97
[ "CC-BY-4.0" ]
888
2021-10-06T10:48:54.000Z
2022-03-31T11:00:30.000Z
saleor/graphql/app/tests/queries/test_apps.py
eanknd/saleor
08aa724176be00d7aaf654f14e9ae99dd4327f97
[ "CC-BY-4.0" ]
538
2021-10-07T16:21:27.000Z
2022-03-31T22:58:57.000Z
import graphene import pytest from freezegun import freeze_time from .....app.models import App from .....app.types import AppType from .....core.jwt import create_access_token_for_app from .....webhook.models import Webhook from ....tests.utils import assert_no_permission, get_graphql_content from ...enums import App...
26.361364
88
0.554186
79722e3ac432c4eced7eb6618fa34fad9c213cfb
1,274
py
Python
app/auth/forms.py
josphat-mwangi/Blog-
646f4d4caeb8c2d9ae5baa001997beb2c6d2a62e
[ "MIT" ]
null
null
null
app/auth/forms.py
josphat-mwangi/Blog-
646f4d4caeb8c2d9ae5baa001997beb2c6d2a62e
[ "MIT" ]
null
null
null
app/auth/forms.py
josphat-mwangi/Blog-
646f4d4caeb8c2d9ae5baa001997beb2c6d2a62e
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, BooleanField from wtforms.validators import DataRequired, Length, Email, EqualTo,Required from ..models import User class RegistrationForm(FlaskForm): email = StringField('Your Email Address', validators=[Required(), Ema...
41.096774
79
0.72135
797231e29a070b43a5ec4cda374e7c20185ee264
5,205
py
Python
dowut/vis.py
csams/dowut
cdbcb9ee78125f364ede861c83fa9c332de868ff
[ "Apache-2.0" ]
1
2021-01-05T15:50:12.000Z
2021-01-05T15:50:12.000Z
dowut/vis.py
csams/dowut
cdbcb9ee78125f364ede861c83fa9c332de868ff
[ "Apache-2.0" ]
null
null
null
dowut/vis.py
csams/dowut
cdbcb9ee78125f364ede861c83fa9c332de868ff
[ "Apache-2.0" ]
null
null
null
import argparse import json import os import re from glob import glob import matplotlib.pyplot as plt import pandas as pd import seaborn as sns sns.set_style("dark") def parse_args(): description = """Measure how you spend time by tracking key presses and changes to window focus or title.""" p = argpars...
31.932515
79
0.635543
797231f97df018c64a02ce972811d3bfcb237b7e
12,931
py
Python
train.py
zpf1452233/yolov4-keras
1c895592a750d3e206c09a09d185c0f9b64282c6
[ "MIT" ]
1
2020-12-01T03:05:26.000Z
2020-12-01T03:05:26.000Z
train.py
zpf1452233/yolov4-keras
1c895592a750d3e206c09a09d185c0f9b64282c6
[ "MIT" ]
null
null
null
train.py
zpf1452233/yolov4-keras
1c895592a750d3e206c09a09d185c0f9b64282c6
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import keras.backend as K from keras.layers import Input, Lambda from keras.models import Model from keras.optimizers import Adam from keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, EarlyStopping from nets.yolo4 import yolo_body from nets.loss ...
42.536184
138
0.550151
79723253d4dcf98b20e987138df45d6caf0d9a14
2,034
py
Python
layers/decoder_layer.py
feather-ai/transformers-tutorial
64bfae21851333855862552e870a7ada3db99e7b
[ "Apache-2.0" ]
6
2021-09-29T01:15:33.000Z
2022-03-16T04:40:28.000Z
layers/decoder_layer.py
emrul17/transformers-tutorial
64bfae21851333855862552e870a7ada3db99e7b
[ "Apache-2.0" ]
null
null
null
layers/decoder_layer.py
emrul17/transformers-tutorial
64bfae21851333855862552e870a7ada3db99e7b
[ "Apache-2.0" ]
2
2022-01-13T13:28:59.000Z
2022-01-28T09:39:14.000Z
import torch.nn as nn from .mha import MultiHeadAttention from .efficient_mha import MultiHeadAttention as EfficientMultiHeadAttention from .pwffn import PWFFN from .residual_layer_norm import ResidualLayerNorm class DecoderLayer(nn.Module): def __init__(self, d_model, num_heads, d_ff, dropout=0.3, effici...
42.375
121
0.670108
797232b78d60c811b6ec59d01dae3a0e8c1d29a9
239
py
Python
stubs/3.2/doctest.py
TimSimpsonR/mypy
5e6fd6335e0662b0477e1d678269f33e6f4194ba
[ "PSF-2.0" ]
1
2019-06-27T11:34:27.000Z
2019-06-27T11:34:27.000Z
stubs/3.2/doctest.py
silky/mypy
de6a8d3710df9f49109cb682f2092e4967bfb92c
[ "PSF-2.0" ]
null
null
null
stubs/3.2/doctest.py
silky/mypy
de6a8d3710df9f49109cb682f2092e4967bfb92c
[ "PSF-2.0" ]
null
null
null
# Stubs for doctest # NOTE: These are incomplete! from typing import Any, Tuple # TODO arguments missing def testmod(module: Any = None, *, name: str = None, globs: Any = None, verbose: bool = None) -> Tuple[int, int]: pass
23.9
71
0.656904
7972338832958e62c8270348650393f2e1f4627b
403
py
Python
nc/migrations/0003_auto_20180115_1141.py
OpenDataPolicingNC/Traffic-Stops
74e0d16ad2ac32addca6f04d34c2ddf36d023990
[ "MIT" ]
25
2015-09-12T23:10:52.000Z
2021-03-24T08:39:46.000Z
nc/migrations/0003_auto_20180115_1141.py
OpenDataPolicingNC/Traffic-Stops
74e0d16ad2ac32addca6f04d34c2ddf36d023990
[ "MIT" ]
159
2015-07-01T03:57:23.000Z
2021-04-17T21:09:19.000Z
nc/migrations/0003_auto_20180115_1141.py
copelco/NC-Traffic-Stops
74e0d16ad2ac32addca6f04d34c2ddf36d023990
[ "MIT" ]
8
2015-10-02T16:56:40.000Z
2020-10-18T01:16:29.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nc', '0002_agency_census_profile_id'), ] operations = [ migrations.AlterField( model_name='stop', na...
20.15
54
0.605459
797233e01315d95abc11e88b5202ea8fef06ea98
1,778
py
Python
csr/constructors.py
mdekstrand/csr
665ceefff882d7e42db41034246b6ddb1f93e372
[ "MIT" ]
11
2021-02-07T16:37:31.000Z
2022-03-19T15:19:16.000Z
csr/constructors.py
mdekstrand/csr
665ceefff882d7e42db41034246b6ddb1f93e372
[ "MIT" ]
25
2021-02-11T22:42:01.000Z
2022-01-27T21:04:31.000Z
csr/constructors.py
lenskit/csr
03fde2d8c3cb7eb330028f34765ff2a06f849631
[ "MIT" ]
2
2021-02-07T02:05:04.000Z
2021-06-01T15:23:09.000Z
""" Numba-accessible constructors for CSRs. """ from .csr import CSR import numpy as np from numba import njit @njit def create_empty(nrows, ncols): """ Create an empty CSR of the specified size. .. note:: This function can be used from Numba. """ nrows = np.int32(nrows) ncols = np.int32(nc...
25.768116
85
0.643982
797234777b342114c91d7878f3df1050932bbb62
12,551
py
Python
scripts/oneapi.py
jeffreymcallister/oneAPI-spec
f8866385ba59ebc9ccd3bdc45f478f9f73f12bc6
[ "CC-BY-4.0", "MIT" ]
null
null
null
scripts/oneapi.py
jeffreymcallister/oneAPI-spec
f8866385ba59ebc9ccd3bdc45f478f9f73f12bc6
[ "CC-BY-4.0", "MIT" ]
null
null
null
scripts/oneapi.py
jeffreymcallister/oneAPI-spec
f8866385ba59ebc9ccd3bdc45f478f9f73f12bc6
[ "CC-BY-4.0", "MIT" ]
null
null
null
# Copyright (c) 2020, 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 source code must retain the above copyright notice, # this list of conditions and the following ...
31.61461
122
0.616764
79723494f891ed60cf371a79ac769b6a7d422fbe
2,037
py
Python
app.py
company-lol/flipdot-mqtt
7986955e5308c6fb12c2c39db1eb497909ea1665
[ "MIT" ]
null
null
null
app.py
company-lol/flipdot-mqtt
7986955e5308c6fb12c2c39db1eb497909ea1665
[ "MIT" ]
null
null
null
app.py
company-lol/flipdot-mqtt
7986955e5308c6fb12c2c39db1eb497909ea1665
[ "MIT" ]
null
null
null
import logging import asyncio from os import path import sys from hbmqtt.client import MQTTClient, ClientException from hbmqtt.mqtt.constants import QOS_1, QOS_2 from flipdotapi import remote_sign as sign import configparser import logging @asyncio.coroutine def mqtt_listener(): C = MQTTClient() yield from ...
29.955882
101
0.67403
797234b8f3c6da2ecf38aa1b9e95fbf157961aa3
1,248
py
Python
src/Graphik.py
dmccoystephenson/Rock-Paper-Scissors
32bc38838afa1a0547eb5b3055974507d5e208e4
[ "MIT" ]
null
null
null
src/Graphik.py
dmccoystephenson/Rock-Paper-Scissors
32bc38838afa1a0547eb5b3055974507d5e208e4
[ "MIT" ]
null
null
null
src/Graphik.py
dmccoystephenson/Rock-Paper-Scissors
32bc38838afa1a0547eb5b3055974507d5e208e4
[ "MIT" ]
null
null
null
import pygame black = (0,0,0) white = (255,255,255) red = (200,0,0) green = (0,200,0) blue = (0,0,200) # @author Daniel McCoy Stephenson # @since February 3rd, 2022 class Graphik: def __init__(self, gameDisplay): self.gameDisplay = gameDisplay def drawRectangle(self, xpos, ypos, width, height, colo...
36.705882
99
0.630609
7972352555477d21b874bbca9136b90e0f8ebc64
688
py
Python
bynPatch.py
Ricx8/bynPatch
3b2a509bfadb0eedc12decf40546c846f94da6fa
[ "MIT" ]
null
null
null
bynPatch.py
Ricx8/bynPatch
3b2a509bfadb0eedc12decf40546c846f94da6fa
[ "MIT" ]
null
null
null
bynPatch.py
Ricx8/bynPatch
3b2a509bfadb0eedc12decf40546c846f94da6fa
[ "MIT" ]
null
null
null
import os import sys binData = None fDir = sys.argv[1] word = sys.argv[2] patchString = sys.argv[3] lenWord = len(word) lenPatch = len(patchString) if (lenWord > lenPatch): patchString = patchString.ljust(lenWord, ' ') if (lenPatch > lenWord): patchString = patchString[:lenWord] with open(fDir, "rb") as fH...
20.235294
57
0.651163
79723548c40c44cce3e49e5dd75af1a751743683
1,692
py
Python
tools/AKS/examples/googlenet.py
Carles-Figuerola/Vitis-AI
fc043ea4aca1f9fe4e18962e6a6ae397812bb34b
[ "Apache-2.0" ]
1
2021-04-01T06:38:48.000Z
2021-04-01T06:38:48.000Z
tools/AKS/examples/googlenet.py
cy333/Vitis-AI
611b82cfc32ea2fe04491432bf8feed1f378c9de
[ "Apache-2.0" ]
null
null
null
tools/AKS/examples/googlenet.py
cy333/Vitis-AI
611b82cfc32ea2fe04491432bf8feed1f378c9de
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2019 Xilinx 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 ...
26.030769
74
0.680851
797235b0fadec7129aaf12dbf3ae0cdc8f49bd8d
996
py
Python
chef/cookbooks/cpe_nightly_reboot/files/default/logout_bootstrap.py
1dustindavis/IT-CPE
bf7c097cb0c3749a533799e1ceeb60eebc658f10
[ "BSD-3-Clause" ]
1
2020-08-13T07:56:12.000Z
2020-08-13T07:56:12.000Z
chef/cookbooks/cpe_nightly_reboot/files/default/logout_bootstrap.py
1dustindavis/IT-CPE
bf7c097cb0c3749a533799e1ceeb60eebc658f10
[ "BSD-3-Clause" ]
null
null
null
chef/cookbooks/cpe_nightly_reboot/files/default/logout_bootstrap.py
1dustindavis/IT-CPE
bf7c097cb0c3749a533799e1ceeb60eebc658f10
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python """Forced logout + Munki bootstrap.""" import sys import os import signal with open('/private/etc/paths.d/munki', 'rb') as f: munkipath = f.read().strip() sys.path.append(os.path.join(munkipath, 'munkilib')) try: import munkicommon except ImportError: sys.exit(-1) munki_bootstrap = \ '/Use...
23.714286
69
0.699799
7972362e3d929d66fa0031e38c287b61b0d146e2
2,756
py
Python
caffeflow/convert.py
xmartlabs/caffe-tensorflow
4618f89c8ae60cffbc0ffd991a8cb984acc3a164
[ "MIT" ]
1
2019-11-15T14:42:17.000Z
2019-11-15T14:42:17.000Z
caffeflow/convert.py
xmartlabs/caffe-tensorflow
4618f89c8ae60cffbc0ffd991a8cb984acc3a164
[ "MIT" ]
null
null
null
caffeflow/convert.py
xmartlabs/caffe-tensorflow
4618f89c8ae60cffbc0ffd991a8cb984acc3a164
[ "MIT" ]
16
2017-08-02T10:29:06.000Z
2021-11-14T23:05:00.000Z
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, unicode_literals import os import numpy as np import argparse from caffeflow import KaffeError, print_stderr from caffeflow.tensorflow import TensorFlowTransformer def fatal_error(msg): print_stderr(msg) exit(-1) def va...
39.371429
118
0.664369
7972371704fede7c179729bd2006bf4ec4f1957b
5,837
py
Python
tests/algos/torch/test_utility.py
alxlampe/d3rlpy
af7e6bd018a51f95138d121f59c50dc36ec87e3a
[ "MIT" ]
2
2021-04-21T08:19:29.000Z
2021-05-17T09:08:06.000Z
tests/algos/torch/test_utility.py
alxlampe/d3rlpy
af7e6bd018a51f95138d121f59c50dc36ec87e3a
[ "MIT" ]
null
null
null
tests/algos/torch/test_utility.py
alxlampe/d3rlpy
af7e6bd018a51f95138d121f59c50dc36ec87e3a
[ "MIT" ]
null
null
null
import numpy as np import torch import pytest import copy from unittest.mock import Mock from d3rlpy.algos.torch.utility import soft_sync, hard_sync from d3rlpy.algos.torch.utility import set_eval_mode, set_train_mode from d3rlpy.algos.torch.utility import freeze, unfreeze from d3rlpy.algos.torch.utility import torch_...
24.320833
78
0.666781
7972380b2caef3dc4478111e89bfda444135180c
3,331
py
Python
_bak/v0.5.1/Controller/Algorithm_CWT.py
hello-sea/DeepLearning_Wavelet-LSTM
1606c16005a5338333b4943f782f57311c6b5e49
[ "MIT" ]
95
2018-04-13T03:34:51.000Z
2022-03-30T10:10:28.000Z
_bak/v0.5/Controller/Algorithm_CWT.py
Dlaiven/DeepLearning_Wavelet-LSTM
1606c16005a5338333b4943f782f57311c6b5e49
[ "MIT" ]
3
2019-07-18T11:19:53.000Z
2020-12-28T05:45:19.000Z
_bak/v0.5/Controller/Algorithm_CWT.py
Dlaiven/DeepLearning_Wavelet-LSTM
1606c16005a5338333b4943f782f57311c6b5e49
[ "MIT" ]
35
2018-07-27T09:21:18.000Z
2021-11-30T02:13:01.000Z
# -*- coding: utf-8 -*- ''' ***** 计算包 ***** ''' import numpy as np import pywt #小波分析包 from scipy import signal from sklearn import preprocessing from sklearn.preprocessing.data import minmax_scale # 0-1 标准化 from wavelets import Morlet,cwt, WaveletAnalysis # https://github.com/aaren/wavelets # pip install git+https...
27.991597
127
0.591114
7972385e7a0c2d88671ea7ce3f15da433f8970ef
3,924
py
Python
testing/scripts/test_operator_updates.py
juldou/seldon-core
34021ee3ead41c729ff57efd1964ab3f0d37861e
[ "Apache-2.0" ]
3,049
2017-12-21T14:50:09.000Z
2022-03-30T18:14:15.000Z
testing/scripts/test_operator_updates.py
juldou/seldon-core
34021ee3ead41c729ff57efd1964ab3f0d37861e
[ "Apache-2.0" ]
3,678
2017-12-22T16:21:30.000Z
2022-03-31T20:32:31.000Z
testing/scripts/test_operator_updates.py
juldou/seldon-core
34021ee3ead41c729ff57efd1964ab3f0d37861e
[ "Apache-2.0" ]
714
2018-01-03T11:29:49.000Z
2022-03-31T03:49:59.000Z
import pytest from seldon_e2e_utils import ( assert_model, assert_model_during_op, retry_run, wait_for_rollout, wait_for_status, ) SELDON_VERSIONS_TO_TEST = [ "1.3.0", "1.4.0", "1.5.0", "1.6.0", "1.7.0", "1.8.0", "1.9.0", "1.10.0", ] @pytest.mark.sequential @pytes...
32.163934
108
0.652396
797239f9cefc5734c27d53c9180bc8829c84f984
1,811
py
Python
src/cftp/cftp/cftp.py
sandutsar/pywonderland
2c55c5a4ae50332bd6c1028b1e1d9f371218d200
[ "MIT" ]
null
null
null
src/cftp/cftp/cftp.py
sandutsar/pywonderland
2c55c5a4ae50332bd6c1028b1e1d9f371218d200
[ "MIT" ]
null
null
null
src/cftp/cftp/cftp.py
sandutsar/pywonderland
2c55c5a4ae50332bd6c1028b1e1d9f371218d200
[ "MIT" ]
null
null
null
""" Sample a random state in a finite, irreducible Markov chain from its stationary distribution using monotone CFTP. """ import random from tqdm import tqdm class MonotoneMarkovChain: """ This class holds a Markov chain object that implements following methods: 1. `new_random_update`: return a new rand...
30.694915
77
0.586416
79723a710c1c96cf233cc91f8f99b5f90405b38c
5,183
py
Python
vasp/enmd/inivel-new.py
hsulab/DailyScripts
26b03cfb721fd66f39c86df50d2ec5866e651d6e
[ "MIT" ]
2
2020-06-08T21:39:44.000Z
2020-10-18T15:12:47.000Z
vasp/enmd/inivel-new.py
hsulab/DailyScripts
26b03cfb721fd66f39c86df50d2ec5866e651d6e
[ "MIT" ]
null
null
null
vasp/enmd/inivel-new.py
hsulab/DailyScripts
26b03cfb721fd66f39c86df50d2ec5866e651d6e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import numpy as np dot = np.dot norm = np.linalg.norm mass_dict = {'H': 1.0, 'C': 12.0, 'O': 16.0, \ 'Pt': 195.0, 'Ag': 107.9} def read_poscar(poscar='POSCAR', format='vasp5'): """read POSCAR""" with open(poscar, 'r') as reader: ...
30.309942
83
0.557206
79723a9a4f06e2942c3677e9a32be19dda1ab32a
266
py
Python
lib/python/pyflyby/_version.py
antocuni/pyflyby
f919dc12ca81b401e8fad92f2d8e68627f0f8ac4
[ "BSD-3-Clause" ]
2
2019-03-18T21:54:51.000Z
2020-02-06T20:17:14.000Z
lib/python/pyflyby/_version.py
asmeurer/pyflyby
150fe51858036ecbcf9f474c46bb18a78220502f
[ "BSD-3-Clause" ]
null
null
null
lib/python/pyflyby/_version.py
asmeurer/pyflyby
150fe51858036ecbcf9f474c46bb18a78220502f
[ "BSD-3-Clause" ]
null
null
null
# pyflyby/_version.py. # License for THIS FILE ONLY: CC0 Public Domain Dedication # http://creativecommons.org/publicdomain/zero/1.0/ from __future__ import (absolute_import, division, print_function, with_statement) __version__ = '1.6.7'
26.6
66
0.710526
79723c5ae23804a8d58ac878dcd858098710910d
2,732
py
Python
drift_detection/fhddms.py
JanSurft/tornado
2c07686c5358d2bcb15d6edac3126ad9346c3c76
[ "MIT" ]
103
2017-10-01T20:24:58.000Z
2022-03-16T09:09:10.000Z
drift_detection/fhddms.py
JanSurft/tornado
2c07686c5358d2bcb15d6edac3126ad9346c3c76
[ "MIT" ]
2
2019-09-17T11:06:26.000Z
2021-11-08T23:57:46.000Z
drift_detection/fhddms.py
JanSurft/tornado
2c07686c5358d2bcb15d6edac3126ad9346c3c76
[ "MIT" ]
28
2018-12-18T00:43:10.000Z
2022-03-04T08:39:47.000Z
""" The Tornado Framework By Ali Pesaranghader University of Ottawa, Ontario, Canada E-mail: apesaran -at- uottawa -dot- ca / alipsgh -at- gmail -dot- com --- *** The Stacking Fast Hoeffding Drift Detection Method (FHDDMS) Implementation *** Paper: Reservoir of Diverse Adaptive Learners and Stacking Fast Hoeffdi...
34.582278
124
0.597731
79723c8ca5dee844bce6aa3f8f95703a624bafc8
261
py
Python
all_domains/python/closures_and_decorators/standardize_mobile_number_using_decorators.py
ejspeiro/HackerRank
2e489588e8d7102acb676cc49fe07ee83e4f66e9
[ "MIT" ]
null
null
null
all_domains/python/closures_and_decorators/standardize_mobile_number_using_decorators.py
ejspeiro/HackerRank
2e489588e8d7102acb676cc49fe07ee83e4f66e9
[ "MIT" ]
null
null
null
all_domains/python/closures_and_decorators/standardize_mobile_number_using_decorators.py
ejspeiro/HackerRank
2e489588e8d7102acb676cc49fe07ee83e4f66e9
[ "MIT" ]
null
null
null
def wrapper(f): def fun(l): f('+91 {} {}'.format(n[-10:-5], n[-5:]) for n in l) return fun @wrapper def sort_phone(l): print(*sorted(l), sep='\n') if __name__ == '__main__': l = [input() for _ in range(int(input()))] sort_phone(l)
20.076923
59
0.536398
79723d74ea9dfc61f6de2b3a5e16e10f7b4bc96e
4,331
py
Python
tests/stairlight/test_cli.py
tosh223/stairlight
a9b01d3453c34bd1af66e8a9c353576f0eeefb5d
[ "MIT" ]
null
null
null
tests/stairlight/test_cli.py
tosh223/stairlight
a9b01d3453c34bd1af66e8a9c353576f0eeefb5d
[ "MIT" ]
null
null
null
tests/stairlight/test_cli.py
tosh223/stairlight
a9b01d3453c34bd1af66e8a9c353576f0eeefb5d
[ "MIT" ]
null
null
null
from typing import Any, Dict, Iterator, List, Union import pytest import src.stairlight.cli as cli_main from stairlight import StairLight from tests.conftest import teardown_rm_config, teardown_rm_file @pytest.fixture(scope="session") def stairlight_init() -> Iterator[StairLight]: stairlight = StairLight(config...
32.320896
86
0.598476
79723d8932ef628cf50ac5a10ae5f27abae3c60b
126
py
Python
Python OOP/3. Inheritance/Exercise/files_04_Need_For_Speed/race_motorcycle.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python OOP/3. Inheritance/Exercise/files_04_Need_For_Speed/race_motorcycle.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python OOP/3. Inheritance/Exercise/files_04_Need_For_Speed/race_motorcycle.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
from files_04_Need_For_Speed.motorcycle import Motorcycle class RaceMotorcycle(Motorcycle): DEFAULT_FUEL_CONSUMPTION = 8
25.2
57
0.849206
79723ded1b412711c2795c48870fec22261cac92
237
py
Python
utils/writer.py
Mrityunjay2668/ObjectDetection
d3582311e5cf563c4f2ba7fdd87d8f56b60cccb1
[ "Apache-2.0" ]
4
2020-02-01T21:11:08.000Z
2020-11-14T05:05:01.000Z
utils/writer.py
Mrityunjay2668/ObjectDetection
d3582311e5cf563c4f2ba7fdd87d8f56b60cccb1
[ "Apache-2.0" ]
1
2020-01-13T04:59:00.000Z
2020-01-13T04:59:00.000Z
utils/writer.py
Mrityunjay2668/ObjectDetection
d3582311e5cf563c4f2ba7fdd87d8f56b60cccb1
[ "Apache-2.0" ]
2
2020-03-01T14:06:21.000Z
2021-04-23T02:12:42.000Z
from torch.utils.tensorboard import SummaryWriter def log(*args): iteration, loss, accuracy = args writer = SummaryWriter() writer.add_scalar("Loss", loss, iteration) writer.add_scalar("Accuracy", accuracy, iteration)
23.7
54
0.725738
79723f7ddf294e709265ffaab4a25f38cc8f3259
914
py
Python
Paths/Distribute Nodes x.py
davidtahim/Glyphs-Scripts
5ed28805b5fe03c63d904ad2f79117844c22aa44
[ "Apache-2.0" ]
1
2021-09-04T18:41:30.000Z
2021-09-04T18:41:30.000Z
Paths/Distribute Nodes x.py
davidtahim/Glyphs-Scripts
5ed28805b5fe03c63d904ad2f79117844c22aa44
[ "Apache-2.0" ]
null
null
null
Paths/Distribute Nodes x.py
davidtahim/Glyphs-Scripts
5ed28805b5fe03c63d904ad2f79117844c22aa44
[ "Apache-2.0" ]
null
null
null
#MenuTitle: Distribute Nodes horizontally # -*- coding: utf-8 -*- __doc__=""" Distributes the selected nodes horizontally. """ import GlyphsApp Font = Glyphs.font Doc = Glyphs.currentDocument selectedLayer = Font.selectedLayers[0] try: selection = selectedLayer.selection() selectionXList = [ n.x for n in selection...
26.882353
78
0.734136
79723ff44806d1d0a56f6125df940961d65cdebb
1,522
py
Python
extensions/utils/db.py
ppotatoo/saberbot
90452e0273fdcc04ab35ca6cbc6f52734818e1bb
[ "MIT" ]
1
2021-05-31T03:06:06.000Z
2021-05-31T03:06:06.000Z
extensions/utils/db.py
ppotatoo/saberbot
90452e0273fdcc04ab35ca6cbc6f52734818e1bb
[ "MIT" ]
null
null
null
extensions/utils/db.py
ppotatoo/saberbot
90452e0273fdcc04ab35ca6cbc6f52734818e1bb
[ "MIT" ]
null
null
null
from asyncpg import Pool async def update_user_stats(snowflake: int, pool: Pool, data: dict) -> None: """Function for updating user stats.""" query = """ INSERT INTO users (snowflake, id, name, avatar, country, pp, rank, country_rank, player_role, history, ranked_acc, total_score, ranked_score, total_...
31.708333
178
0.51117
797240746aafe26f1e731a4c1bc21ba807b49b04
415
py
Python
kissim/tests/io/test_io_pocket_dataframe.py
AJK-dev/kissim
15375000d47b5d5485322fc725809f853a3659de
[ "MIT" ]
15
2020-06-23T14:46:07.000Z
2022-02-03T04:23:56.000Z
kissim/tests/io/test_io_pocket_dataframe.py
volkamerlab/kissim
35198a5efd4b651dd3952bf26ac5098fd1c4dfaa
[ "MIT" ]
66
2020-11-05T11:45:21.000Z
2021-12-15T12:11:20.000Z
kissim/tests/io/test_io_pocket_dataframe.py
AJK-dev/kissim
15375000d47b5d5485322fc725809f853a3659de
[ "MIT" ]
3
2021-02-27T12:56:27.000Z
2022-02-03T04:23:57.000Z
""" Unit and regression test for kissim.io.PocketDataFrame class methods. Note that class - methods (`from_structure_klifs_id`) - attributes (`_residue_ids`, `residue_ixs`) and - properties (`residues`) are tested in test_io.py. Note also that PocketDataFrame is a subclass of opencadd's PocketKlifs class, which is...
27.666667
78
0.754217
797240c235fd58d06acec841d4424cd3a88e1575
18,221
py
Python
ckanext/canada/triggers.py
Jmikelittle/ckanext-canada
68f42b576b1995c1632cfda16c7ba410bf8a49c9
[ "MIT" ]
1
2020-04-28T16:40:07.000Z
2020-04-28T16:40:07.000Z
ckanext/canada/triggers.py
Jmikelittle/ckanext-canada
68f42b576b1995c1632cfda16c7ba410bf8a49c9
[ "MIT" ]
null
null
null
ckanext/canada/triggers.py
Jmikelittle/ckanext-canada
68f42b576b1995c1632cfda16c7ba410bf8a49c9
[ "MIT" ]
null
null
null
from ckanapi import LocalCKAN from ckantoolkit import h def update_triggers(): """Create/update triggers used by PD tables""" lc = LocalCKAN() # *_error functions return NULL or ARRAY[[field_name, error_message]] lc.action.datastore_function_create( name=u'required_error', or_replace...
37.724638
115
0.495143
797242393126f532a6198e0d38efe224a94a650e
2,950
py
Python
lib/python2.7/site-packages/openopt/solvers/Standalone/sa.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
5
2017-01-23T16:23:43.000Z
2022-01-20T16:14:06.000Z
lib/python2.7/site-packages/openopt/solvers/Standalone/sa.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
1
2015-04-24T06:46:25.000Z
2015-04-24T06:46:25.000Z
lib/python2.7/site-packages/openopt/solvers/Standalone/sa.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
8
2016-05-30T13:35:17.000Z
2021-06-15T22:24:29.000Z
import random import math #import logging import numpy as np from openopt.kernel.setDefaultIterFuncs import IS_MAX_FUN_EVALS_REACHED def P(prev_score,next_score,temperature): if next_score > prev_score: return 1.0 else: return math.exp( -abs(next_score-prev_score)/temperature ) class Objective...
34.705882
112
0.645424
797242ed6fa4c52d7259e9a2388a156f0676b9ad
16,176
py
Python
agent.py
CJuanvip/rl-pricing
dd7092f854ac26b0a6bd760df9b5da8fda6c2d87
[ "MIT" ]
12
2020-02-16T05:12:05.000Z
2022-03-19T12:13:51.000Z
agent.py
CJuanvip/rl-pricing
dd7092f854ac26b0a6bd760df9b5da8fda6c2d87
[ "MIT" ]
null
null
null
agent.py
CJuanvip/rl-pricing
dd7092f854ac26b0a6bd760df9b5da8fda6c2d87
[ "MIT" ]
5
2020-02-05T11:37:37.000Z
2021-12-13T08:59:11.000Z
import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.optim as optim from torch.utils.tensorboard import SummaryWriter import gym import random from collections import deque, namedtuple import logging from tqdm import tqdm import argparse import os import time import yaml im...
41.583548
366
0.590875
797243099938fc2b40662542cb9a8bdb3d78e69b
486
py
Python
Day01-15/code/Day14/socket1.py
bdfd/Python_Zero2Hero_DS
9dafe90b8112fdc3d07e1aa02e41ed3f019f733c
[ "MIT" ]
3
2022-01-15T19:06:19.000Z
2022-01-18T16:47:27.000Z
Day01-15/code/Day14/socket1.py
bdfd/4.5_Data-Science-Python-Zero2Hero-
9dafe90b8112fdc3d07e1aa02e41ed3f019f733c
[ "MIT" ]
null
null
null
Day01-15/code/Day14/socket1.py
bdfd/4.5_Data-Science-Python-Zero2Hero-
9dafe90b8112fdc3d07e1aa02e41ed3f019f733c
[ "MIT" ]
1
2022-02-28T23:37:59.000Z
2022-02-28T23:37:59.000Z
""" 套接字 - 基于TCP协议创建时间服务器 Version: 0.1 Author: BDFD Date: 2018-03-22 """ from socket import * from time import * server = socket(AF_INET, SOCK_STREAM) server.bind(('localhost', 6789)) server.listen() print('服务器已经启动正在监听客户端连接.') while True: client, addr = server.accept() print('客户端%s:%d连接成功.' % (addr[0], addr[1...
20.25
53
0.654321
7972433d6bffe99d65440ddd13c9dd0b51d714b5
570
py
Python
Task 3: Hindi data/get_word_vectors.py
rajsemlawat02/NER-using-Deep-Learning
0c423eac6d7f332ff0d81c7c8454b80b7ac2d74f
[ "MIT" ]
24
2017-06-13T12:37:45.000Z
2020-06-17T18:29:04.000Z
Task 3: Hindi data/get_word_vectors.py
anonymous31173/NER-using-Deep-Learning
56f9248e890b579eb1a93352fb7420fd2a137c83
[ "MIT" ]
4
2017-05-25T13:28:36.000Z
2022-01-07T11:23:33.000Z
Task 3: Hindi data/get_word_vectors.py
anonymous31173/NER-using-Deep-Learning
56f9248e890b579eb1a93352fb7420fd2a137c83
[ "MIT" ]
12
2017-04-28T06:56:48.000Z
2020-08-19T19:40:57.000Z
import gensim.models.word2vec as w2v import numpy as np import os trained_model = w2v.Word2Vec.load(os.path.join("../data/", "hindi_word2Vec_small.w2v")) def get_sentence_vectors(sentence): """ Returns word vectors for complete sentence as a python list""" s = sentence.strip().split() vec = [ get_word_vector(word...
23.75
87
0.715789
797244ba844fc6d3d604f537f75189461b3eabfd
2,245
py
Python
pype/hosts/maya/plugins/publish/validate_camera_attributes.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/hosts/maya/plugins/publish/validate_camera_attributes.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/hosts/maya/plugins/publish/validate_camera_attributes.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
from maya import cmds import pyblish.api import pype.api import pype.hosts.maya.api.action class ValidateCameraAttributes(pyblish.api.InstancePlugin): """Validates Camera has no invalid attribute keys or values. The Alembic file format does not a specifc subset of attributes as such we validate that no ...
32.536232
78
0.573274
7972459363e922f08504210ff051cd05a0b953d3
55,405
py
Python
tools/gyp/pylib/gyp/generator/xcode.py
zypeh/utf8rewind
46dd600a4716f80debbe4bbbe4a5b19daf0e2cb2
[ "MIT" ]
6
2015-08-25T19:16:20.000Z
2021-04-19T16:47:58.000Z
deps/gyp/pylib/gyp/generator/xcode.py
free1978/mapbox-gl-native
2a50fccd24e762d0de5a53bac358e5ddfea8d213
[ "BSD-2-Clause" ]
3
2022-02-11T02:35:41.000Z
2022-03-07T13:05:17.000Z
deps/gyp/pylib/gyp/generator/xcode.py
free1978/mapbox-gl-native
2a50fccd24e762d0de5a53bac358e5ddfea8d213
[ "BSD-2-Clause" ]
1
2022-03-27T05:53:28.000Z
2022-03-27T05:53:28.000Z
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import filecmp import gyp.common import gyp.xcodeproj_file import gyp.xcode_ninja import errno import os import sys import posixpath import re import shutil import...
44.789814
80
0.677827
79724598bac1ec9ff3364e0ddf6c1af77993dd34
5,170
py
Python
Content/Scripts/uepy/editor_spawner.py
dfb/uepy
4d60297e8aa7bbbd097da9464f9163c83b18c733
[ "BSD-2-Clause" ]
2
2021-03-04T17:55:57.000Z
2021-03-22T16:09:50.000Z
Content/Scripts/uepy/editor_spawner.py
dfb/uepy
4d60297e8aa7bbbd097da9464f9163c83b18c733
[ "BSD-2-Clause" ]
null
null
null
Content/Scripts/uepy/editor_spawner.py
dfb/uepy
4d60297e8aa7bbbd097da9464f9163c83b18c733
[ "BSD-2-Clause" ]
null
null
null
# Creates a tab/window in the editor for spawning Python-based actors import uepy, time from uepy import umg, editor from uepy import log, logTB class SpawnerTab(uepy.UUserWidget_PGLUE): def __init__(self): self.num = int(time.time()) def Construct(self, vboxRoot): log('editor_spawner.SpawnerT...
43.813559
104
0.668279
797246246919a609c88a96eb46d44a348ec55211
5,492
py
Python
nicos_sinq/narziss/setups/narziss.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_sinq/narziss/setups/narziss.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_sinq/narziss/setups/narziss.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
description = 'Standard setup for NARZISS' motprefix = 'SQ:NARZISS:mota:' cterprefix = 'SQ:NARZISS:counter' devices = dict( mom = device('nicos_ess.devices.epics.motor.EpicsMotor', description = 'Monochromator omega', motorpv = motprefix + 'm1', errormsgpv = motprefix + 'm1-MsgTxt', ...
36.131579
88
0.600692
7972467469e12d9f1ed89f29d95e757e0a6ea217
1,291
py
Python
Lists/List_Methods/append_en.py
sagarbabalsure/pythonCodes
33ba4290b6452ffcab6283c4b3040837c1bbf6b5
[ "MIT" ]
65
2018-06-29T16:37:54.000Z
2021-06-11T07:56:33.000Z
Lists/List_Methods/append_en.py
sagarbabalsure/pythonCodes
33ba4290b6452ffcab6283c4b3040837c1bbf6b5
[ "MIT" ]
20
2018-06-29T18:01:56.000Z
2018-09-08T15:41:10.000Z
Lists/List_Methods/append_en.py
sagarbabalsure/pythonCodes
33ba4290b6452ffcab6283c4b3040837c1bbf6b5
[ "MIT" ]
62
2018-06-29T17:21:26.000Z
2021-05-30T17:37:12.000Z
#added by @Azharoo #Python 3 """ The append() method adds an item to the end of the list. The item can be numbers, strings, another list, dictionary etc. the append() method only modifies the original list. It doesn't return any value. """ #Example 1: Adding Element to a List my_list = ['python', 'codes', 1, 2, 3] ...
28.688889
190
0.711851
797246ce4fa462b03439a878a040f5529eccec44
30,640
py
Python
autotest/ogr/ogr_kml.py
robe2/gdal
78573efe69f1506c112209501068c0b043438295
[ "MIT" ]
null
null
null
autotest/ogr/ogr_kml.py
robe2/gdal
78573efe69f1506c112209501068c0b043438295
[ "MIT" ]
null
null
null
autotest/ogr/ogr_kml.py
robe2/gdal
78573efe69f1506c112209501068c0b043438295
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: KML Driver testing. # Author: Matuesz Loskot <mateusz@loskot.net> # #######################################################################...
35.87822
1,092
0.641775
7972474729038c67b69f065d0fc67008fc452bb9
280
py
Python
leetcode/476-Number-Complement/NumComplement.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/476-Number-Complement/NumComplement.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/476-Number-Complement/NumComplement.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution(object): def findComplement(self, num): """ :type num: int :rtype: int """ res = 0 i = 0 while num: res += (1 - (num & 1)) << i num = num >> 1 i += 1 return res
20
39
0.364286
7972481602da4a1532923ac5206ced4f9f7642d8
2,159
py
Python
tests/e2e/test_mock_chat_application.py
alex-zywicki/asynction
390412f275f475f10c8b16b64cbedcc6f63f6a3e
[ "MIT" ]
22
2021-05-06T09:48:05.000Z
2022-03-25T00:04:46.000Z
tests/e2e/test_mock_chat_application.py
skytotwo/asynction
e060d0e488b4adb67b8d0bc89b65d905dea9c841
[ "MIT" ]
169
2021-04-04T10:29:37.000Z
2022-03-31T22:18:44.000Z
tests/e2e/test_mock_chat_application.py
skytotwo/asynction
e060d0e488b4adb67b8d0bc89b65d905dea9c841
[ "MIT" ]
2
2021-05-24T12:53:11.000Z
2022-02-07T17:35:35.000Z
from unittest.mock import Mock import jsonschema import pytest import socketio @pytest.mark.parametrize( argnames="server_url_fixture", argvalues=["mock_server_url", "cli_mock_server_url"], ids=["mock_server", "cli_mock_server"], ) @pytest.mark.filterwarnings("error") def test_automatic_mock_event_emissi...
30.408451
83
0.69245
79724862598f2b7ca9d6553960823f7168d73cfc
18,998
py
Python
vis.py
ML-KULeuven/soccermix
9f23c98b8e20b5cfeb569a43f8a2b110bf50dfd2
[ "MIT" ]
27
2020-06-25T11:00:02.000Z
2022-01-07T17:21:21.000Z
vis.py
dhruvkadam/soccermix
9f23c98b8e20b5cfeb569a43f8a2b110bf50dfd2
[ "MIT" ]
null
null
null
vis.py
dhruvkadam/soccermix
9f23c98b8e20b5cfeb569a43f8a2b110bf50dfd2
[ "MIT" ]
6
2020-07-26T20:41:26.000Z
2021-12-08T22:13:27.000Z
from scipy import linalg import matplotlib.pyplot as plt import matplotlib as mpl import matplotsoccer as mps import numpy as np import math def dual_axes(figsize=4): fig, axs = plt.subplots(1, 2) fig.set_size_inches((figsize * 3, figsize)) return axs[0], axs[1] def loc_angle_axes(figsize=4): fig, _...
32.145516
130
0.541952
79724951ab054ffea87534b96b83ee68ee5438ad
54,977
py
Python
tests/client/test_client.py
suryatmodulus/prefect
e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42
[ "Apache-2.0" ]
3
2021-11-09T10:46:58.000Z
2022-03-11T04:22:35.000Z
tests/client/test_client.py
suryatmodulus/prefect
e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42
[ "Apache-2.0" ]
8
2021-10-11T16:42:59.000Z
2022-03-31T08:42:24.000Z
tests/client/test_client.py
suryatmodulus/prefect
e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42
[ "Apache-2.0" ]
1
2022-03-11T04:22:40.000Z
2022-03-11T04:22:40.000Z
import datetime import json from pathlib import Path import uuid from unittest.mock import MagicMock import marshmallow import pendulum import pytest import requests import toml import prefect from prefect.client.client import Client, FlowRunInfoResult, TaskRunInfoResult from prefect.utilities.graphql import GraphQLR...
30.340508
88
0.577878
79724aedea28242a35c79c104e685636af5f0c0e
25,289
py
Python
src/fullnode.py
VJTI-AI-Blockchain/vjtichain
3aee25bac8412d78741f76ed301220b899ae5928
[ "MIT" ]
19
2019-03-07T12:06:05.000Z
2021-02-03T15:41:54.000Z
src/fullnode.py
VJTI-AI-Blockchain/vjtichain
3aee25bac8412d78741f76ed301220b899ae5928
[ "MIT" ]
null
null
null
src/fullnode.py
VJTI-AI-Blockchain/vjtichain
3aee25bac8412d78741f76ed301220b899ae5928
[ "MIT" ]
9
2019-03-05T08:25:42.000Z
2021-09-01T11:18:36.000Z
import json import time from functools import lru_cache from multiprocessing import Pool, Process from threading import Thread, Timer from typing import Any, Dict, List from datetime import datetime import hashlib import inspect import requests import waitress from bottle import BaseTemplate, Bottle, request, response,...
34.128205
203
0.633319
79724b18ab7f02cdc6ce19a4c55ec7f4731457c3
588
py
Python
LPTHW/ex005.py
jesielin/SnakeRace
f695b1e31d3e2842c9eda437353d510a1866bccd
[ "MIT" ]
null
null
null
LPTHW/ex005.py
jesielin/SnakeRace
f695b1e31d3e2842c9eda437353d510a1866bccd
[ "MIT" ]
null
null
null
LPTHW/ex005.py
jesielin/SnakeRace
f695b1e31d3e2842c9eda437353d510a1866bccd
[ "MIT" ]
null
null
null
my_name = 'Shawn' my_age = 25 # not a lie my_height = 74 # inches my_weight = 180 # lbs my_eyes = 'Blue' my_teeth = 'White' my_hair = 'Black' print "Let's talk about %s." % my_name print "He's %d inches tall." % my_height print "He's %d pounds heavy." % my_weight print "Actually that's not heavy." print "He's got %...
32.666667
105
0.683673
79724c6860458ac5f9b06d18b92567ed515c4374
961
py
Python
p2/app/ejercicios/ejercicio2.py
Paszser/DAI
86e9385b3cb8994ac772dc3150cb27d14c626184
[ "Apache-2.0" ]
null
null
null
p2/app/ejercicios/ejercicio2.py
Paszser/DAI
86e9385b3cb8994ac772dc3150cb27d14c626184
[ "Apache-2.0" ]
null
null
null
p2/app/ejercicios/ejercicio2.py
Paszser/DAI
86e9385b3cb8994ac772dc3150cb27d14c626184
[ "Apache-2.0" ]
null
null
null
import time def ordena(lista): tiempo_sort, lista_sort = selection_sort(lista) tiempo_bubble, lista_bubble = bubble_sort(lista) return tiempo_bubble, tiempo_sort, lista_sort, lista_bubble def selection_sort(vector): arr = vector.split(',') arr = [int(i) for i in arr] start_time = time.time() ...
28.264706
63
0.579605
79724c69115350195f7d0a6fae0cd5e143f17e4c
1,026
py
Python
tweetpik_cli/tweetpik_cli/utils/parser.py
bossjones/sandbox
9ae6a01576d42ff2616f38bad0df2c6d73afe91f
[ "MIT" ]
4
2022-02-23T11:03:32.000Z
2022-03-07T20:01:42.000Z
tweetpik_cli/tweetpik_cli/utils/parser.py
bossjones/sandbox
9ae6a01576d42ff2616f38bad0df2c6d73afe91f
[ "MIT" ]
null
null
null
tweetpik_cli/tweetpik_cli/utils/parser.py
bossjones/sandbox
9ae6a01576d42ff2616f38bad0df2c6d73afe91f
[ "MIT" ]
1
2022-02-23T11:03:32.000Z
2022-02-23T11:03:32.000Z
# https://stackoverflow.com/questions/9626535/get-protocol-host-name-from-url # TODO: Use this for test data # urls = [ # "http://stackoverflow.com:8080/some/folder?test=/questions/9626535/get-domain-name-from-url", # "Stackoverflow.com:8080/some/folder?test=/questions/9626535/get-domain-name-from-url", # "http://stack...
51.3
137
0.693957
79724d0fac9b432fd09fe015f6ab8afc58985768
157
py
Python
src/adafruit_blinka/microcontroller/allwinner/a33/__init__.py
tekktrik/Adafruit_Blinka
d094997a471301a2147d58f1693aa1d3a49df6cd
[ "MIT" ]
null
null
null
src/adafruit_blinka/microcontroller/allwinner/a33/__init__.py
tekktrik/Adafruit_Blinka
d094997a471301a2147d58f1693aa1d3a49df6cd
[ "MIT" ]
null
null
null
src/adafruit_blinka/microcontroller/allwinner/a33/__init__.py
tekktrik/Adafruit_Blinka
d094997a471301a2147d58f1693aa1d3a49df6cd
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries # # SPDX-License-Identifier: MIT """Definition for the AllWinner A33 chip"""
31.4
79
0.789809
79724d647e31830a4aa62d1e804006cd0b570a8d
12,666
py
Python
test/test_matgame.py
egtaonline/GameAnalysis
32be1a6b9f616e794362639367ad64360f3e118f
[ "Apache-2.0" ]
7
2017-05-17T10:40:45.000Z
2021-10-30T12:20:24.000Z
test/test_matgame.py
egtaonline/gameanalysis
32be1a6b9f616e794362639367ad64360f3e118f
[ "Apache-2.0" ]
1
2016-11-07T12:10:18.000Z
2016-11-07T12:10:18.000Z
test/test_matgame.py
egtaonline/GameAnalysis
32be1a6b9f616e794362639367ad64360f3e118f
[ "Apache-2.0" ]
3
2015-05-04T19:58:32.000Z
2016-05-17T14:08:28.000Z
"""Test matrix game""" import itertools import json import random import numpy as np import numpy.random as rand import pytest from gameanalysis import gamegen from gameanalysis import matgame from gameanalysis import paygame from gameanalysis import rsgame from gameanalysis import utils def full_game(role_names, r...
27.594771
85
0.568609
79724dd9e68fe72979a39fc89defe2fb67f90c1d
128
py
Python
grafanalib/__init__.py
czerwe/grafanalib
59e1845f7b5a547f3daf392e7ddae11051fefe89
[ "MIT" ]
null
null
null
grafanalib/__init__.py
czerwe/grafanalib
59e1845f7b5a547f3daf392e7ddae11051fefe89
[ "MIT" ]
null
null
null
grafanalib/__init__.py
czerwe/grafanalib
59e1845f7b5a547f3daf392e7ddae11051fefe89
[ "MIT" ]
null
null
null
import dashboard import datasource import fabric from api import api __version__ = '0.4.0' # 0.4.0: InfluxDB datasoruce added
14.222222
34
0.773438
79724eaf6a5552e8f9f644f6ba8e78685f450af5
579
py
Python
examples/rpc_server.py
fordoo/fizznet
55d83d11c3b37c3bde7fae8c3579e5cb712d1940
[ "MIT" ]
60
2015-10-16T03:18:38.000Z
2021-06-04T07:39:53.000Z
examples/rpc_server.py
fordoo/fizznet
55d83d11c3b37c3bde7fae8c3579e5cb712d1940
[ "MIT" ]
4
2015-11-20T09:38:29.000Z
2016-09-06T15:27:35.000Z
examples/rpc_server.py
fordoo/fizznet
55d83d11c3b37c3bde7fae8c3579e5cb712d1940
[ "MIT" ]
15
2015-11-07T19:14:28.000Z
2019-10-12T07:35:50.000Z
# -*- coding: utf-8 -*- import sys sys.path.append('../') from tornado import ioloop from example_utils import log_initialize from torpc import DuplexRPCServer if __name__ == '__main__': log_initialize() server = DuplexRPCServer(('127.0.0.1', 5000)) @server.service.register() def sum(x, y): ...
18.09375
52
0.644214
79724fd3e981dddff8b4eba5211dd4235174d4d6
3,377
py
Python
d1scan/settings.py
jun168/d1scan
596612459c735fc5fed794756c4e7054ba5bf655
[ "MIT" ]
19
2019-04-04T05:53:50.000Z
2022-03-13T08:19:15.000Z
d1scan/settings.py
jun168/d1scan
596612459c735fc5fed794756c4e7054ba5bf655
[ "MIT" ]
1
2021-08-20T16:14:43.000Z
2021-08-20T16:14:43.000Z
d1scan/settings.py
DisMeo/d1scan
596612459c735fc5fed794756c4e7054ba5bf655
[ "MIT" ]
7
2019-07-14T11:49:01.000Z
2022-03-13T08:19:16.000Z
""" Django settings for d1scan project. Generated by 'django-admin startproject' using Django 2.1.5. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # ...
25.778626
91
0.680486
797250432f9298c99886834217631f3b1f59455a
9,487
py
Python
pybamm/expression_tree/operations/convert_to_casadi.py
ehtec/PyBaMM
4afbead093a8231e785ebdcca7373c1dbb31e379
[ "BSD-3-Clause" ]
330
2019-04-17T11:36:57.000Z
2022-03-28T16:49:55.000Z
pybamm/expression_tree/operations/convert_to_casadi.py
ehtec/PyBaMM
4afbead093a8231e785ebdcca7373c1dbb31e379
[ "BSD-3-Clause" ]
1,530
2019-03-26T18:13:03.000Z
2022-03-31T16:12:53.000Z
pybamm/expression_tree/operations/convert_to_casadi.py
ehtec/PyBaMM
4afbead093a8231e785ebdcca7373c1dbb31e379
[ "BSD-3-Clause" ]
178
2019-03-27T13:48:04.000Z
2022-03-31T09:30:11.000Z
# # Convert a PyBaMM expression tree to a CasADi expression tree # import pybamm import casadi import numpy as np from scipy import special class CasadiConverter(object): def __init__(self, casadi_symbols=None): self._casadi_symbols = casadi_symbols or {} pybamm.citations.register("Andersson2019"...
44.125581
88
0.556656
79725096730a071c4973184b04a471ed5d5865aa
1,157
py
Python
th_twitter/forms.py
Leopere/django-th
86c999d16bcf30b6224206e5b40824309834ac8c
[ "BSD-3-Clause" ]
1,069
2015-01-07T01:55:57.000Z
2022-02-17T10:50:57.000Z
th_twitter/forms.py
barrygolden/django-th
86c999d16bcf30b6224206e5b40824309834ac8c
[ "BSD-3-Clause" ]
207
2015-01-06T21:41:17.000Z
2018-02-20T14:10:15.000Z
th_twitter/forms.py
barrygolden/django-th
86c999d16bcf30b6224206e5b40824309834ac8c
[ "BSD-3-Clause" ]
117
2015-01-04T16:21:13.000Z
2022-02-22T06:18:49.000Z
# coding: utf-8 from django import forms from django.core.exceptions import ValidationError from django.forms import TextInput from django.utils.translation import ugettext as _ from th_twitter.models import Twitter class TwitterForm(forms.ModelForm): """ form to handle Twitter service """ clas...
26.295455
108
0.631806
79725124e4ecebce3fc4d8d941420ec018bc56a5
5,868
py
Python
Athos/tests/tf/unittests/test_convolution.py
kanav99/EzPC
094e75111d00883dd90ef328bd47a7c0a1eb689f
[ "MIT" ]
null
null
null
Athos/tests/tf/unittests/test_convolution.py
kanav99/EzPC
094e75111d00883dd90ef328bd47a7c0a1eb689f
[ "MIT" ]
null
null
null
Athos/tests/tf/unittests/test_convolution.py
kanav99/EzPC
094e75111d00883dd90ef328bd47a7c0a1eb689f
[ "MIT" ]
null
null
null
""" Authors: Pratik Bhatu. Copyright: Copyright (c) 2021 Microsoft Research 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, co...
37.139241
87
0.644001
7972520fbf1ad55cd09d1fbe3a94f361deed3f88
2,974
py
Python
Framework/utilities/logger/LoggingConfig.py
jonreding2010/MAQS.Python
43f73784fa9f0ab46545b0275fa8de38d86c76ed
[ "MIT" ]
null
null
null
Framework/utilities/logger/LoggingConfig.py
jonreding2010/MAQS.Python
43f73784fa9f0ab46545b0275fa8de38d86c76ed
[ "MIT" ]
null
null
null
Framework/utilities/logger/LoggingConfig.py
jonreding2010/MAQS.Python
43f73784fa9f0ab46545b0275fa8de38d86c76ed
[ "MIT" ]
null
null
null
from Framework.utilities.helper import Config, StringProcessor from Framework.utilities.logger import ConsoleLogger, FileLogger, LoggingEnabled, MessageType import os class LoggingConfig: # Get our logging state - Yes, no or on failure. # @return The log enabled state def get_logging_enabled_setting(self)...
40.189189
144
0.682582
79725247e5f77c50593c2768b3bb6e661e775393
324
py
Python
crawlerUtils/utils/crawlerOthers.py
Tyrone-Zhao/crawlerUtils
529a683de53b46111871573a2786245f7ac922a8
[ "MIT" ]
18
2019-03-03T07:15:00.000Z
2022-02-26T22:09:46.000Z
crawlerUtils/utils/crawlerOthers.py
Tyrone-Zhao/crawlerUtils
529a683de53b46111871573a2786245f7ac922a8
[ "MIT" ]
null
null
null
crawlerUtils/utils/crawlerOthers.py
Tyrone-Zhao/crawlerUtils
529a683de53b46111871573a2786245f7ac922a8
[ "MIT" ]
3
2019-03-20T15:59:07.000Z
2021-04-14T04:40:50.000Z
def index_of_str(s1, s2): ''' 索引s2在s1中的位置 ''' n1=len(s1) n2=len(s2) for i in range(n1-n2+1): if s1[i:i+n2]==s2: return i else: return -1 def index_of_str2(s1, s2): ''' 索引s2在s1中的位置 ''' lt=s1.split(s2,1) if len(lt)==1: return -1 return len(lt[0...
17.052632
28
0.487654
7972526031715383607138fabd22690786b9925b
197
py
Python
output/models/ms_data/datatypes/facets/unsigned_int/unsigned_int_min_inclusive004_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/datatypes/facets/unsigned_int/unsigned_int_min_inclusive004_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/datatypes/facets/unsigned_int/unsigned_int_min_inclusive004_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.datatypes.facets.unsigned_int.unsigned_int_min_inclusive004_xsd.unsigned_int_min_inclusive004 import ( FooType, Test, ) __all__ = [ "FooType", "Test", ]
19.7
129
0.746193
79725620a6b6dda6b914e5acefc537f91bebe18c
80
py
Python
pytest_asyncio/__init__.py
Sharpeye90/pytest-asyncio
813423de99ddfa16796ea7f37f60baa65afa6759
[ "Apache-2.0" ]
null
null
null
pytest_asyncio/__init__.py
Sharpeye90/pytest-asyncio
813423de99ddfa16796ea7f37f60baa65afa6759
[ "Apache-2.0" ]
null
null
null
pytest_asyncio/__init__.py
Sharpeye90/pytest-asyncio
813423de99ddfa16796ea7f37f60baa65afa6759
[ "Apache-2.0" ]
null
null
null
"""The main point for importing pytest-asyncio items.""" __version__ = "0.10.0"
26.666667
56
0.7125