hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c347d42305e260a0aaab0ad7a76123148f6e3b1
45,320
py
Python
irrd/integration_tests/run.py
irrdnet/irrd
6ba27f3bea4fa179525f9b1af68b2fa631d0b644
[ "BSD-2-Clause" ]
94
2015-02-03T22:50:51.000Z
2022-03-16T08:24:44.000Z
irrd/integration_tests/run.py
irrdnet/irrd
6ba27f3bea4fa179525f9b1af68b2fa631d0b644
[ "BSD-2-Clause" ]
286
2015-02-08T15:16:35.000Z
2022-03-31T22:38:38.000Z
irrd/integration_tests/run.py
irrdnet/irrd
6ba27f3bea4fa179525f9b1af68b2fa631d0b644
[ "BSD-2-Clause" ]
33
2015-02-03T22:50:57.000Z
2022-03-30T00:46:07.000Z
# flake8: noqa: W293 import sys import time import unittest import ujson import base64 import email import os import requests import signal import socket import sqlalchemy as sa import subprocess import textwrap import yaml from alembic import command, config from pathlib import Path from python_graphql_client impor...
46.915114
152
0.610989
import sys import time import unittest import ujson import base64 import email import os import requests import signal import socket import sqlalchemy as sa import subprocess import textwrap import yaml from alembic import command, config from pathlib import Path from python_graphql_client import GraphqlClient fro...
true
true
1c347e036313375a8dd918e7c672b537554f1142
625
py
Python
cultr/database/__init__.py
TrixiS/cultr
fe059fdf7838ad250bcdad7db5a88e3c3e789d9c
[ "MIT" ]
null
null
null
cultr/database/__init__.py
TrixiS/cultr
fe059fdf7838ad250bcdad7db5a88e3c3e789d9c
[ "MIT" ]
null
null
null
cultr/database/__init__.py
TrixiS/cultr
fe059fdf7838ad250bcdad7db5a88e3c3e789d9c
[ "MIT" ]
null
null
null
from typing import Generator from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession from sqlalchemy.orm import sessionmaker from . import db_models from ..config import settings engine = create_async_engine(settings.DATABASE_URI, echo=True) async_session = sessionmaker( engine, expire_on_commit=Fal...
25
68
0.7504
from typing import Generator from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession from sqlalchemy.orm import sessionmaker from . import db_models from ..config import settings engine = create_async_engine(settings.DATABASE_URI, echo=True) async_session = sessionmaker( engine, expire_on_commit=Fal...
true
true
1c347ea6db0106869ce0b9be812e2121fd128eed
6,417
py
Python
venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_stateful_set_list.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_stateful_set_list.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_stateful_set_list.py
DiptoChakrabarty/Kube-Automate
2072d1aadd58eb405c7308ff5cfecbf50300ead3
[ "MIT" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: release-1.15 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1bet...
32.739796
295
0.620228
import pprint import re import six class V1beta2StatefulSetList(object): openapi_types = { 'api_version': 'str', 'items': 'list[V1beta2StatefulSet]', 'kind': 'str', 'metadata': 'V1ListMeta' } attribute_map = { 'api_version': 'apiVersion', 'items': '...
true
true
1c347f5388c0292a8711ba961b56081b3d0bf22a
15,766
py
Python
view/ui/plaster.py
cmh1027/everytimeUtility
3d274113a6fd212a3f5d7ee957411ca11a93e960
[ "MIT" ]
null
null
null
view/ui/plaster.py
cmh1027/everytimeUtility
3d274113a6fd212a3f5d7ee957411ca11a93e960
[ "MIT" ]
4
2018-07-11T04:57:54.000Z
2020-10-12T14:23:54.000Z
view/ui/plaster.py
cmh1027/everytimeUtility
3d274113a6fd212a3f5d7ee957411ca11a93e960
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'plaster.ui' # # Created by: PyQt5 UI code generator 5.11.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("...
56.307143
114
0.736141
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(231, 223) self.verticalLayoutWidget = QtWidgets.QWidget(Form) self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 231, 221)) self.ve...
true
true
1c347f8817ee448d054612a79d5d81ae0a082ff1
4,500
py
Python
nengo/tests/test_simulator.py
ConorPQuinn/NengoDecimal
ef798db409417b23da6dcda761654b93a2b44342
[ "BSD-2-Clause" ]
null
null
null
nengo/tests/test_simulator.py
ConorPQuinn/NengoDecimal
ef798db409417b23da6dcda761654b93a2b44342
[ "BSD-2-Clause" ]
null
null
null
nengo/tests/test_simulator.py
ConorPQuinn/NengoDecimal
ef798db409417b23da6dcda761654b93a2b44342
[ "BSD-2-Clause" ]
null
null
null
import numpy as np import nengo import nengo.simulator from nengo.builder import Model from nengo.builder.node import build_pyfunc from nengo.builder.operator import Copy, Reset, DotInc, SimNoise from nengo.builder.signal import Signal from nengo.utils.compat import range, iteritems def test_steps(RefSimulator): ...
30.405405
79
0.606
import numpy as np import nengo import nengo.simulator from nengo.builder import Model from nengo.builder.node import build_pyfunc from nengo.builder.operator import Copy, Reset, DotInc, SimNoise from nengo.builder.signal import Signal from nengo.utils.compat import range, iteritems def test_steps(RefSimulator): ...
true
true
1c3480f4bf36cf025a44cc3f87ffafe292096841
464
py
Python
mapshader/tests/test_transforms.py
SapirLastimoza-Dooley/mapshader
9a7a893dd3fdfa7e20666d32c3788003393ffa10
[ "MIT" ]
1
2021-02-01T18:03:49.000Z
2021-02-01T18:03:49.000Z
mapshader/tests/test_transforms.py
SapirLastimoza-Dooley/mapshader
9a7a893dd3fdfa7e20666d32c3788003393ffa10
[ "MIT" ]
null
null
null
mapshader/tests/test_transforms.py
SapirLastimoza-Dooley/mapshader
9a7a893dd3fdfa7e20666d32c3788003393ffa10
[ "MIT" ]
null
null
null
import json from os import path from io import BytesIO import pytest import xarray as xr from datashader.transfer_functions import Image from mapshader.sources import MapSource from mapshader.core import render_map from mapshader.core import render_geojson from mapshader.sources import get_user_datasets from maps...
21.090909
54
0.846983
import json from os import path from io import BytesIO import pytest import xarray as xr from datashader.transfer_functions import Image from mapshader.sources import MapSource from mapshader.core import render_map from mapshader.core import render_geojson from mapshader.sources import get_user_datasets from maps...
true
true
1c34810189be8eac3c587ba7a479a0f467bda3e4
3,773
py
Python
auth/views.py
zand-yasin/BlogBook-Backend
01eebe2353f06261ab5045e481e10ec291b852ea
[ "MIT" ]
3
2020-08-25T18:40:16.000Z
2020-10-20T03:51:49.000Z
auth/views.py
zand-yasin/BlogBook-Backend
01eebe2353f06261ab5045e481e10ec291b852ea
[ "MIT" ]
12
2021-07-05T09:23:28.000Z
2021-07-30T03:47:41.000Z
auth/views.py
Nandan-unni/KeyBlogs-Django-Backend
4031e5e22fb27bf777f5f43a7faa1ed1389284dd
[ "MIT" ]
null
null
null
from rest_framework import views, status from rest_framework.response import Response from rest_framework_simplejwt.tokens import RefreshToken from django.contrib.auth import get_user_model, authenticate, login, logout from django.utils.http import urlsafe_base64_decode from django.utils.encoding import force_bytes fr...
38.111111
122
0.627087
from rest_framework import views, status from rest_framework.response import Response from rest_framework_simplejwt.tokens import RefreshToken from django.contrib.auth import get_user_model, authenticate, login, logout from django.utils.http import urlsafe_base64_decode from django.utils.encoding import force_bytes fr...
true
true
1c3481d8f7be27a6d80eacb0aadf14080eca9bc0
2,665
py
Python
tests/ons-mock/server.py
uk-gov-mirror/alphagov.govuk-shielded-vulnerable-people-service
5b191980dec554155e9d431a514a945072032e7c
[ "MIT" ]
3
2020-08-16T19:36:26.000Z
2020-10-29T14:35:01.000Z
tests/ons-mock/server.py
uk-gov-mirror/alphagov.govuk-shielded-vulnerable-people-service
5b191980dec554155e9d431a514a945072032e7c
[ "MIT" ]
101
2020-09-03T11:10:00.000Z
2021-10-01T03:03:46.000Z
tests/ons-mock/server.py
alphagov-mirror/govuk-shielded-vulnerable-people-service
f9cb4ae9046fc402f0878503733a23d42546cc53
[ "MIT" ]
6
2020-07-28T09:03:20.000Z
2021-04-10T18:04:56.000Z
from http.server import HTTPServer, BaseHTTPRequestHandler import json import re from fake_os_places_api_entry import FakeOSPlacesAPIEntry _postcode_to_uprn = {"LS287TQ": 10000000, "BB11TA": 1000000, "LE674AY": 1000, "L244AD": 2000, ...
38.071429
141
0.454034
from http.server import HTTPServer, BaseHTTPRequestHandler import json import re from fake_os_places_api_entry import FakeOSPlacesAPIEntry _postcode_to_uprn = {"LS287TQ": 10000000, "BB11TA": 1000000, "LE674AY": 1000, "L244AD": 2000, ...
true
true
1c3481fdb8ef31e875f8f06ce2d01a73abf4bb77
7,882
py
Python
tensorflow/contrib/keras/python/keras/utils/layer_utils.py
DEVESHTARASIA/tensorflow
d3edb8c60ed4fd831d62833ed22f5c23486c561c
[ "Apache-2.0" ]
384
2017-02-21T18:38:04.000Z
2022-02-22T07:30:25.000Z
tensorflow/contrib/keras/python/keras/utils/layer_utils.py
DEVESHTARASIA/tensorflow
d3edb8c60ed4fd831d62833ed22f5c23486c561c
[ "Apache-2.0" ]
15
2017-03-01T20:18:43.000Z
2020-05-07T10:33:51.000Z
udacity-car/lib/python2.7/site-packages/tensorflow/contrib/keras/python/keras/utils/layer_utils.py
808brick/CarND-Capstone
f9e536b4a9d96322d7e971073602c8969dbd9369
[ "MIT" ]
81
2017-02-21T19:31:19.000Z
2022-02-22T07:30:24.000Z
# Copyright 2015 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...
35.827273
81
0.65897
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.contrib.keras.python.keras import backend as K from tensorflow.contrib.keras.python.keras.utils.conv_utils import convert_kernel def print_summary(model, line...
true
true
1c34825a8ee5c966c486000b4d04fc9340575a66
1,903
py
Python
Commands/doublexp/doublexp.py
Chromeilion/kyoshi
ee7a448dde73831edbd0bc5e829cdf77f3a9a20d
[ "MIT" ]
1
2021-07-18T15:21:09.000Z
2021-07-18T15:21:09.000Z
Commands/doublexp/doublexp.py
Chromeilion/kyoshi
ee7a448dde73831edbd0bc5e829cdf77f3a9a20d
[ "MIT" ]
6
2021-07-18T14:37:07.000Z
2021-09-27T15:51:13.000Z
Commands/doublexp/doublexp.py
Chromeilion/kyoshi
ee7a448dde73831edbd0bc5e829cdf77f3a9a20d
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from Systems.levelsys import levelling import os from Systems.gettext_init import GettextInit # Set up environment variables: PREFIX = os.environ["BOT_PREFIX"] ERROR_EMB_COLOUR = discord.Colour(int(os.environ["ERROR_EMB_COLOUR"])) SUCCESS_EMB_COLOUR = discord.Colour(int...
36.596154
116
0.612717
import discord from discord.ext import commands from Systems.levelsys import levelling import os from Systems.gettext_init import GettextInit PREFIX = os.environ["BOT_PREFIX"] ERROR_EMB_COLOUR = discord.Colour(int(os.environ["ERROR_EMB_COLOUR"])) SUCCESS_EMB_COLOUR = discord.Colour(int(os.environ["SUCCESS_EMB_COLOUR...
true
true
1c3482a0f1bb99d8764898b5f1cd9e655b4f5b36
3,567
py
Python
gobiko/apns/exceptions.py
belkka/python-apns
35b0962eb50faf99d678d42ccec8cc3013a60eac
[ "MIT" ]
null
null
null
gobiko/apns/exceptions.py
belkka/python-apns
35b0962eb50faf99d678d42ccec8cc3013a60eac
[ "MIT" ]
null
null
null
gobiko/apns/exceptions.py
belkka/python-apns
35b0962eb50faf99d678d42ccec8cc3013a60eac
[ "MIT" ]
1
2018-08-27T04:04:02.000Z
2018-08-27T04:04:02.000Z
class APNsException(Exception): pass class InternalException(APNsException): pass class ImproperlyConfigured(APNsException): pass class BadCollapseId(APNsException): "The collapse identifier exceeds the maximum allowed size" pass class BadDeviceToken(APNsException): "The specified devi...
22.575949
193
0.746285
class APNsException(Exception): pass class InternalException(APNsException): pass class ImproperlyConfigured(APNsException): pass class BadCollapseId(APNsException): pass class BadDeviceToken(APNsException): pass class BadExpirationDate(APNsException): pass class BadMessageId(APNsE...
true
true
1c348353cae1e5d2994c4be5b943e32ee0ffda79
9,868
py
Python
tests/providers/microsoft/azure/transfers/test_sftp_to_wasb.py
takuti/airflow
0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e
[ "Apache-2.0" ]
27
2019-02-25T14:20:36.000Z
2022-03-22T09:35:13.000Z
tests/providers/microsoft/azure/transfers/test_sftp_to_wasb.py
takuti/airflow
0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e
[ "Apache-2.0" ]
200
2019-01-09T15:33:06.000Z
2022-01-12T09:13:42.000Z
tests/providers/microsoft/azure/transfers/test_sftp_to_wasb.py
takuti/airflow
0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e
[ "Apache-2.0" ]
14
2019-06-25T17:08:29.000Z
2022-03-29T13:25:53.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...
38.396887
110
0.681901
import unittest from unittest import mock from airflow import AirflowException from airflow.providers.microsoft.azure.transfers.sftp_to_wasb import SftpFile, SFTPToWasbOperator TASK_ID = "test-gcs-to-sftp-operator" WASB_CONN_ID = "wasb_default" SFTP_CONN_ID = "ssh_default" CONTAINER_NAME = "test-c...
true
true
1c34836839975671d78d43f89aec68536e835df9
654
py
Python
character.py
Aposhian/mystery
23429f0d5c207ce531edca1480455aedd15cf811
[ "BSD-2-Clause" ]
1
2020-07-27T23:54:27.000Z
2020-07-27T23:54:27.000Z
character.py
Aposhian/mystery
23429f0d5c207ce531edca1480455aedd15cf811
[ "BSD-2-Clause" ]
null
null
null
character.py
Aposhian/mystery
23429f0d5c207ce531edca1480455aedd15cf811
[ "BSD-2-Clause" ]
1
2021-11-09T19:54:33.000Z
2021-11-09T19:54:33.000Z
from eliza import Eliza class Character: def __init__(self, name, avatar, sprite, scriptfile): self.name = name self.coordinates = (0,0) self.avatar = avatar self.sprite = sprite self.eliza = Eliza() #self.outputbox = OutputBox() #self.inputbox = InputBox() ...
29.727273
57
0.608563
from eliza import Eliza class Character: def __init__(self, name, avatar, sprite, scriptfile): self.name = name self.coordinates = (0,0) self.avatar = avatar self.sprite = sprite self.eliza = Eliza() self.leadinfulfilled = False with open(sc...
true
true
1c3484259cce61701ac3aec64e03dc08151fe4b5
17,771
py
Python
onmt/utils/loss.py
USE-sum/usesum
eaf6dae0c451459551f728c0a8866777c20ed707
[ "MIT" ]
null
null
null
onmt/utils/loss.py
USE-sum/usesum
eaf6dae0c451459551f728c0a8866777c20ed707
[ "MIT" ]
1
2020-08-16T13:47:24.000Z
2020-08-16T13:47:24.000Z
onmt/utils/loss.py
USE-sum/usesum
eaf6dae0c451459551f728c0a8866777c20ed707
[ "MIT" ]
null
null
null
""" This file handles the details of the loss function during training. This includes: LossComputeBase and the standard NMTLossCompute, and sharded loss compute stuff. """ from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F import onmt import onmt.inputter...
39.057143
143
0.606381
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F import onmt import onmt.inputters as inputters from onmt.modules.sparse_losses import SparsemaxLoss from math import isnan def build_loss_compute(model, tgt_vocab, opt, train=True): device = torch.device("cuda" if ...
true
true
1c34857d0c2d2e15ec8e14ed43ddedd917058814
200
py
Python
pykrita/glTF_editor/bu_glTF/material/__init__.py
akirfin/krita_python_fun
74173d140b39f7f80f43f9474381e4adfa3b5f01
[ "MIT" ]
1
2021-10-01T00:25:43.000Z
2021-10-01T00:25:43.000Z
pykrita/glTF_editor/bu_glTF/material/__init__.py
akirfin/krita_python_fun
74173d140b39f7f80f43f9474381e4adfa3b5f01
[ "MIT" ]
null
null
null
pykrita/glTF_editor/bu_glTF/material/__init__.py
akirfin/krita_python_fun
74173d140b39f7f80f43f9474381e4adfa3b5f01
[ "MIT" ]
null
null
null
from .normalTextureInfo import NormalTextureInfo from .occlusionTextureInfo import OcclusionTextureInfo from .pbrMetallicRoughness import PbrMetallicRoughness class Material(object): """ """
25
54
0.815
from .normalTextureInfo import NormalTextureInfo from .occlusionTextureInfo import OcclusionTextureInfo from .pbrMetallicRoughness import PbrMetallicRoughness class Material(object):
true
true
1c3486b4d3ab68bff3a647585d6669d171d9367f
286
py
Python
traiders/backend/api/views/token.py
rdilruba/bounswe2019group2
b373908a4a8e92481f359297aba07245f0a23c1c
[ "Apache-2.0" ]
11
2019-02-15T12:08:32.000Z
2019-11-14T19:25:09.000Z
traiders/backend/api/views/token.py
bounswe/bounswe2019group2
05d41cf7b6bc1b3f994e82495d2a885a6eaa7cf3
[ "Apache-2.0" ]
279
2019-02-13T14:57:39.000Z
2022-03-12T00:02:30.000Z
traiders/backend/api/views/token.py
rdilruba/bounswe2019group2
b373908a4a8e92481f359297aba07245f0a23c1c
[ "Apache-2.0" ]
13
2019-03-20T08:30:55.000Z
2021-01-31T16:49:14.000Z
from rest_framework.viewsets import GenericViewSet from rest_framework import mixins from ..serializers import TokenSerializer class TokenViewSet(mixins.CreateModelMixin, GenericViewSet): """ Create or get already created token """ serializer_class = TokenSerializer
23.833333
60
0.79021
from rest_framework.viewsets import GenericViewSet from rest_framework import mixins from ..serializers import TokenSerializer class TokenViewSet(mixins.CreateModelMixin, GenericViewSet): serializer_class = TokenSerializer
true
true
1c3486e574d48b1b6e56d62abd94484044dca39e
64,507
py
Python
ffiwrappers/src/arlwrap.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
ffiwrappers/src/arlwrap.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
ffiwrappers/src/arlwrap.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
# Author: Bojan Nikolic <b.nikolic@mrao.cam.ac.uk> # ARL Wrapping Interface # In this file we declare the functions that need to be exposed to C (wrapped) --with the callback modifier # and the needed structs -- with cdef import numpy import collections import sys from astropy.coordinates import SkyCoord from astropy...
47.853858
165
0.750508
import numpy import collections import sys from astropy.coordinates import SkyCoord from astropy import units as u from processing_components.calibration.operations import apply_gaintable, create_gaintable_from_blockvisibility, qa_gaintable from processing_components.visibility.base import create_visibility, cop...
true
true
1c3486e97720206517862fb40985bad2ec8551e4
577
py
Python
test.py
tnemelck/kmeans
c1095c6bfc134f4fc9e2c79a781b42d5ee38620f
[ "OML" ]
null
null
null
test.py
tnemelck/kmeans
c1095c6bfc134f4fc9e2c79a781b42d5ee38620f
[ "OML" ]
null
null
null
test.py
tnemelck/kmeans
c1095c6bfc134f4fc9e2c79a781b42d5ee38620f
[ "OML" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 7 00:42:53 2018 @author: elvex """ import numpy as np import numpy.random as npr import random def init_board(N, mini = -1, maxi = 1): X = npr.uniform(mini, maxi (N, 2)) return X def init_board_gauss(N, k, mini = -1, maxi = -1, ecart_mi...
23.08
85
0.582322
import numpy as np import numpy.random as npr import random def init_board(N, mini = -1, maxi = 1): X = npr.uniform(mini, maxi (N, 2)) return X def init_board_gauss(N, k, mini = -1, maxi = -1, ecart_min = 0.05, ecart_max = 0.10): n = N//k X = [] for i in range(k): centre, s = npr.unifo...
true
true
1c348712057f34dba1eac147defbb4d6ce2a05b4
25,054
py
Python
awx/main/models/projects.py
SysBind/awx
2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f
[ "Apache-2.0" ]
1
2021-05-13T17:38:03.000Z
2021-05-13T17:38:03.000Z
awx/main/models/projects.py
SysBind/awx
2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f
[ "Apache-2.0" ]
11
2021-04-20T15:03:55.000Z
2021-07-14T21:34:16.000Z
awx/main/models/projects.py
TinLe/awx
73d8c12e3bf5b193305ed1202549331ea00088c1
[ "Apache-2.0" ]
1
2021-08-30T02:41:32.000Z
2021-08-30T02:41:32.000Z
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import datetime import os import urllib.parse as urlparse # Django from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_str, smart_text from djang...
38.485407
156
0.646963
import datetime import os import urllib.parse as urlparse from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_str, smart_text from django.utils.text import slugify from django.core.exceptions import Validatio...
true
true
1c3487ce1eb2d05b3106d67969bad7dcec987da5
28,051
py
Python
tests/mxnet/test_nn.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
null
null
null
tests/mxnet/test_nn.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
null
null
null
tests/mxnet/test_nn.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
null
null
null
import mxnet as mx import networkx as nx import numpy as np import scipy as sp import pytest import dgl import dgl.nn.mxnet as nn import dgl.function as fn import backend as F from test_utils.graph_cases import get_cases, random_graph, random_bipartite, random_dglgraph from test_utils import parametrize_idtype from mxn...
33.960048
110
0.593597
import mxnet as mx import networkx as nx import numpy as np import scipy as sp import pytest import dgl import dgl.nn.mxnet as nn import dgl.function as fn import backend as F from test_utils.graph_cases import get_cases, random_graph, random_bipartite, random_dglgraph from test_utils import parametrize_idtype from mxn...
true
true
1c3487cecc72f7c00dd34da8362cdb9ba0a14b65
2,127
py
Python
comparison/eval/metrics.py
killianlevacher/defenseInvGAN-src
8fa398536773c5bc00c906562d2d9359572b8157
[ "MIT" ]
14
2019-12-12T11:28:18.000Z
2022-03-09T11:56:04.000Z
comparison/eval/metrics.py
killianlevacher/defenseInvGAN-src
8fa398536773c5bc00c906562d2d9359572b8157
[ "MIT" ]
7
2019-12-16T22:20:01.000Z
2022-02-10T00:45:21.000Z
comparison/eval/metrics.py
killianlevacher/defenseInvGAN-src
8fa398536773c5bc00c906562d2d9359572b8157
[ "MIT" ]
2
2020-04-01T09:02:00.000Z
2021-08-01T14:27:11.000Z
import cPickle import tensorflow as tf from classifiers.cifar_model import Model as CIFARModel import utils import numpy as np import inception import fid def ComputeClassificationAccuracy(images, recons, labels, args, debug=True): model_paths = {'CIFAR': 'classifiers/model/cifar-10', 'CelebA'...
29.957746
111
0.657734
import cPickle import tensorflow as tf from classifiers.cifar_model import Model as CIFARModel import utils import numpy as np import inception import fid def ComputeClassificationAccuracy(images, recons, labels, args, debug=True): model_paths = {'CIFAR': 'classifiers/model/cifar-10', 'CelebA'...
true
true
1c34888dd7c4c965f8b0a566fa7ca6256d71885e
1,905
py
Python
src/rozbieznosci_dyscyplin/models.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
null
null
null
src/rozbieznosci_dyscyplin/models.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
41
2019-11-07T00:07:02.000Z
2022-02-27T22:09:39.000Z
src/rozbieznosci_dyscyplin/models.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.db.models import DO_NOTHING from bpp.fields import YearField from bpp.models import BazaModeluOdpowiedzialnosciAutorow, TupleField class RozbieznosciViewBase(models.Model): id = TupleField(models.IntegerField(), size=3, primary_key=True) rekord = models.ForeignKey("bp...
37.352941
108
0.728609
from django.db import models from django.db.models import DO_NOTHING from bpp.fields import YearField from bpp.models import BazaModeluOdpowiedzialnosciAutorow, TupleField class RozbieznosciViewBase(models.Model): id = TupleField(models.IntegerField(), size=3, primary_key=True) rekord = models.ForeignKey("bp...
true
true
1c348a468a745f1994d97461eb60b2dee436b18a
9,194
py
Python
sovrin/common/txn.py
sovrin-foundation/old-sovrin
d4e705054b7252c62fea00114060035c6eb314a4
[ "Apache-2.0" ]
3
2017-07-19T14:26:31.000Z
2020-05-16T16:09:37.000Z
sovrin/common/txn.py
sovrin-foundation/old-sovrin
d4e705054b7252c62fea00114060035c6eb314a4
[ "Apache-2.0" ]
null
null
null
sovrin/common/txn.py
sovrin-foundation/old-sovrin
d4e705054b7252c62fea00114060035c6eb314a4
[ "Apache-2.0" ]
3
2017-10-28T08:19:00.000Z
2021-06-06T10:48:55.000Z
import json from collections import OrderedDict from plenum.common.txn import TXN_TYPE, TARGET_NYM, ORIGIN, DATA, TXN_ID, TXN_TIME, \ RAW, ENC, HASH, NAME, VERSION, TYPE, POOL_TXN_TYPES, ALIAS, \ STEWARD, NYM, VERKEY from plenum.common.types import f, TaggedTuple ROLE = 'role' NONCE = 'nonce' ATTRIBUTES = "at...
40.148472
240
0.684359
import json from collections import OrderedDict from plenum.common.txn import TXN_TYPE, TARGET_NYM, ORIGIN, DATA, TXN_ID, TXN_TIME, \ RAW, ENC, HASH, NAME, VERSION, TYPE, POOL_TXN_TYPES, ALIAS, \ STEWARD, NYM, VERKEY from plenum.common.types import f, TaggedTuple ROLE = 'role' NONCE = 'nonce' ATTRIBUTES = "at...
true
true
1c348a5acb86adb0a976856e0be07a0ff3b78da9
504
py
Python
cnn_code/cuda.py
neurocaience/deepfreeze
2a8c7da7519df2bacb640917695bd7d226e8d4f4
[ "MIT" ]
1
2020-11-17T06:41:10.000Z
2020-11-17T06:41:10.000Z
cnn_code/cuda.py
neurocaience/DeepFreeze
2a8c7da7519df2bacb640917695bd7d226e8d4f4
[ "MIT" ]
null
null
null
cnn_code/cuda.py
neurocaience/DeepFreeze
2a8c7da7519df2bacb640917695bd7d226e8d4f4
[ "MIT" ]
1
2020-06-18T04:25:48.000Z
2020-06-18T04:25:48.000Z
"""============================================================================= Manage CUDA-related utility functions. =============================================================================""" import torch # ------------------------------------------------------------------------------ def device(): """R...
31.5
80
0.343254
import torch def device(): if torch.cuda.is_available(): return torch.cuda.current_device() else: return torch.device('cpu')
true
true
1c348b2a617346f4892a06a93923aa29bbc60222
121
py
Python
app/multiplication.py
magicalcarpet/python_modules_and_packages
663a957674c41d0dc33e3f6ca7eefe4c808606b4
[ "MIT" ]
null
null
null
app/multiplication.py
magicalcarpet/python_modules_and_packages
663a957674c41d0dc33e3f6ca7eefe4c808606b4
[ "MIT" ]
null
null
null
app/multiplication.py
magicalcarpet/python_modules_and_packages
663a957674c41d0dc33e3f6ca7eefe4c808606b4
[ "MIT" ]
null
null
null
def multiply(x, y): ''' Multiply two numbers x and y ''' print('multiplying x: {} * y: {}'.format(x, y))
20.166667
51
0.512397
def multiply(x, y): print('multiplying x: {} * y: {}'.format(x, y))
true
true
1c348d45c3fb17732c03fd82af2a1c1cdf2c030f
415
py
Python
acmicpc/9506/9506.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
3
2019-03-09T05:19:23.000Z
2019-04-06T09:26:36.000Z
acmicpc/9506/9506.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2020-02-23T10:38:04.000Z
2020-02-23T10:38:04.000Z
acmicpc/9506/9506.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2019-05-22T13:47:53.000Z
2019-05-22T13:47:53.000Z
def get_divisor(k): divisors = [] for i in range(1, k): if k % i == 0: divisors.append(i) return divisors while True: n = int(input()) if n == -1: break divisors = get_divisor(n) if n == sum(divisors): print(f'{n}', end=' = ') print(' + '.join...
23.055556
51
0.489157
def get_divisor(k): divisors = [] for i in range(1, k): if k % i == 0: divisors.append(i) return divisors while True: n = int(input()) if n == -1: break divisors = get_divisor(n) if n == sum(divisors): print(f'{n}', end=' = ') print(' + '.join...
true
true
1c348da64d28394f354e57927ffd94baebc17e4a
2,973
py
Python
src/data/traffic_data.py
r-anime/modbot
52e8f251273435e0146bd8d6633ff22549e138aa
[ "MIT" ]
3
2020-07-06T08:26:12.000Z
2021-04-20T05:31:38.000Z
src/data/traffic_data.py
r-anime/modbot
52e8f251273435e0146bd8d6633ff22549e138aa
[ "MIT" ]
8
2021-06-01T03:49:28.000Z
2022-03-18T02:27:43.000Z
src/data/traffic_data.py
r-anime/modbot
52e8f251273435e0146bd8d6633ff22549e138aa
[ "MIT" ]
1
2021-04-20T05:30:46.000Z
2021-04-20T05:30:46.000Z
import datetime from typing import Optional from sqlalchemy.sql import text from data.base_data import BaseModel, BaseData class TrafficMonthlyModel(BaseModel): """ Note: date is the first day of the month. """ _table = "traffic_monthly" _pk_field = "id" _columns = ["id", "date", "unique_pa...
29.147059
120
0.636394
import datetime from typing import Optional from sqlalchemy.sql import text from data.base_data import BaseModel, BaseData class TrafficMonthlyModel(BaseModel): _table = "traffic_monthly" _pk_field = "id" _columns = ["id", "date", "unique_pageviews", "total_pageviews"] class TrafficDailyModel(BaseMod...
true
true
1c348ea078265e308375f04362e7559419d8dd01
3,788
py
Python
homeassistant/components/mobile_app/__init__.py
headcode/home-assistant
ef338fa8803c9691c545cb335503723d271c652c
[ "Apache-2.0" ]
null
null
null
homeassistant/components/mobile_app/__init__.py
headcode/home-assistant
ef338fa8803c9691c545cb335503723d271c652c
[ "Apache-2.0" ]
null
null
null
homeassistant/components/mobile_app/__init__.py
headcode/home-assistant
ef338fa8803c9691c545cb335503723d271c652c
[ "Apache-2.0" ]
null
null
null
"""Integrates Native Apps to Home Assistant.""" from homeassistant import config_entries from homeassistant.const import CONF_WEBHOOK_ID from homeassistant.components.webhook import async_register as webhook_register from homeassistant.helpers import device_registry as dr from homeassistant.helpers.discovery import loa...
34.436364
79
0.693506
from homeassistant import config_entries from homeassistant.const import CONF_WEBHOOK_ID from homeassistant.components.webhook import async_register as webhook_register from homeassistant.helpers import device_registry as dr from homeassistant.helpers.discovery import load_platform from homeassistant.helpers.typing imp...
true
true
1c348ea9086c7076385dadaf15b2832eea654037
14,939
py
Python
tests/manage/pv_services/test_dynamic_pvc_accessmodes_with_reclaim_policies.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
tests/manage/pv_services/test_dynamic_pvc_accessmodes_with_reclaim_policies.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
tests/manage/pv_services/test_dynamic_pvc_accessmodes_with_reclaim_policies.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
import logging import pytest from ocs_ci.framework.testlib import ManageTest, tier1, tier3, acceptance from ocs_ci.ocs import constants from ocs_ci.ocs.exceptions import UnexpectedBehaviour from ocs_ci.ocs.resources import pod from ocs_ci.utility.retry import retry from tests import helpers from tests.fixtures import ...
34.501155
84
0.624674
import logging import pytest from ocs_ci.framework.testlib import ManageTest, tier1, tier3, acceptance from ocs_ci.ocs import constants from ocs_ci.ocs.exceptions import UnexpectedBehaviour from ocs_ci.ocs.resources import pod from ocs_ci.utility.retry import retry from tests import helpers from tests.fixtures import ...
true
true
1c34901541213febf90ddc158ba76566cb2e4c41
1,192
py
Python
fastai2/callback/data.py
mrT23/fastai2
7eaa4a6a10a8836fbbb90360a7df92d170d1bba3
[ "Apache-2.0" ]
null
null
null
fastai2/callback/data.py
mrT23/fastai2
7eaa4a6a10a8836fbbb90360a7df92d170d1bba3
[ "Apache-2.0" ]
null
null
null
fastai2/callback/data.py
mrT23/fastai2
7eaa4a6a10a8836fbbb90360a7df92d170d1bba3
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/14a_callback.data.ipynb (unless otherwise specified). __all__ = ['CollectDataCallback', 'WeightedDL', 'weighted_databunch'] # Cell from ..basics import * # Cell class CollectDataCallback(Callback): "Collect all batches, along with `pred` and `loss`, into `self.data...
37.25
105
0.685403
__all__ = ['CollectDataCallback', 'WeightedDL', 'weighted_databunch'] from ..basics import * class CollectDataCallback(Callback): def begin_fit(self): self.data = L() def after_batch(self): self.data.append(to_detach((self.xb,self.yb,self.pred,self.loss))) @delegates() class WeightedDL(TfmdDL): def ...
true
true
1c3490a494e5f7b00a2da5b5586d9f7d65b58fbd
336
py
Python
backend/base/urls/order_urls.py
drcan94/Dj-React-eCommerce
498395c2f03528bce8348e5f0aa88221a01b9df8
[ "MIT" ]
1
2022-01-08T14:11:03.000Z
2022-01-08T14:11:03.000Z
backend/base/urls/order_urls.py
drcan94/Dj-React-eCommerce
498395c2f03528bce8348e5f0aa88221a01b9df8
[ "MIT" ]
null
null
null
backend/base/urls/order_urls.py
drcan94/Dj-React-eCommerce
498395c2f03528bce8348e5f0aa88221a01b9df8
[ "MIT" ]
null
null
null
from django.urls import path from base.views import order_views as views urlpatterns = [ path('add/', views.addOrderItems, name="order-add"), path('myorders/', views.getMyOrders, name="myorders"), path('<str:pk>/', views.getOrderItem, name="user-order"), path('<str:pk>/pay/', views.updateOrderToPaid,...
28
63
0.681548
from django.urls import path from base.views import order_views as views urlpatterns = [ path('add/', views.addOrderItems, name="order-add"), path('myorders/', views.getMyOrders, name="myorders"), path('<str:pk>/', views.getOrderItem, name="user-order"), path('<str:pk>/pay/', views.updateOrderToPaid,...
true
true
1c3492f1e73b1b96940d9fdf764f48a4114cc549
41,729
py
Python
tests/accelerators/test_accelerator_connector.py
JanSellner/pytorch-lightning
0e0da8c3fc2c6d5e7ac54900621a82d213f8ebbf
[ "Apache-2.0" ]
null
null
null
tests/accelerators/test_accelerator_connector.py
JanSellner/pytorch-lightning
0e0da8c3fc2c6d5e7ac54900621a82d213f8ebbf
[ "Apache-2.0" ]
null
null
null
tests/accelerators/test_accelerator_connector.py
JanSellner/pytorch-lightning
0e0da8c3fc2c6d5e7ac54900621a82d213f8ebbf
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
40.592412
117
0.733231
import os from typing import Optional from unittest import mock from unittest.mock import Mock import pytest import torch import torch.distributed import pytorch_lightning from pytorch_lightning import Trainer from pytorch_lightning.accelerators.accelerator import Accelerator from pytorch_lightning.acce...
true
true
1c3493c81efda6be8fd6097e672472ea11706c75
2,360
py
Python
examples/federated_learning/yolov5_coco128_mistnet/train.py
davedavedavid/sedna
7ba3da9f85559ee842ba28d6785f885d38ca49fb
[ "Apache-2.0" ]
null
null
null
examples/federated_learning/yolov5_coco128_mistnet/train.py
davedavedavid/sedna
7ba3da9f85559ee842ba28d6785f885d38ca49fb
[ "Apache-2.0" ]
null
null
null
examples/federated_learning/yolov5_coco128_mistnet/train.py
davedavedavid/sedna
7ba3da9f85559ee842ba28d6785f885d38ca49fb
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The KubeEdge Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
46.27451
131
0.749576
import os from interface import mistnet, s3_transmitter from interface import Dataset, Estimator_edge from sedna.common.config import BaseConfig from sedna.core.federated_learning import FederatedLearningV2 from examples.ms_nnrt.ms_nnrt_models.ms_acl_inference import Inference from examples.ms_nnrt.ms_nnrt...
true
true
1c349402dc067fdf30894110cdcb17c3fa320b58
2,343
py
Python
meta_policy_search/envs/point_envs/point_env_2d.py
behzadhaghgoo/cml
e659c7ae10a52bbe1cbabf9d359aea43af19eb12
[ "MIT" ]
210
2018-10-17T01:04:48.000Z
2022-03-09T16:17:06.000Z
meta_policy_search/envs/point_envs/point_env_2d.py
behzadhaghgoo/cml
e659c7ae10a52bbe1cbabf9d359aea43af19eb12
[ "MIT" ]
13
2018-10-25T20:01:09.000Z
2022-01-24T13:11:24.000Z
meta_policy_search/envs/point_envs/point_env_2d.py
behzadhaghgoo/cml
e659c7ae10a52bbe1cbabf9d359aea43af19eb12
[ "MIT" ]
55
2018-10-18T22:00:51.000Z
2021-11-24T00:06:31.000Z
from meta_policy_search.envs.base import MetaEnv import numpy as np from gym.spaces import Box class MetaPointEnv(MetaEnv): def step(self, action): """ Run one timestep of the environment's dynamics. When end of episode is reached, reset() should be called to reset the environment's inte...
33
96
0.597098
from meta_policy_search.envs.base import MetaEnv import numpy as np from gym.spaces import Box class MetaPointEnv(MetaEnv): def step(self, action): prev_state = self._state self._state = prev_state + np.clip(action, -0.1, 0.1) reward = self.reward(prev_state, action, self._state) ...
true
true
1c34945971e73b95ec4287a210d713f7431f69e6
3,570
py
Python
Hybrid_Neuron_Simulation.py
emdgroup/brain_waves_for_planning_problems
4b4356f40470d8ecfb6152960d9c4f25a7a11b46
[ "Apache-2.0" ]
null
null
null
Hybrid_Neuron_Simulation.py
emdgroup/brain_waves_for_planning_problems
4b4356f40470d8ecfb6152960d9c4f25a7a11b46
[ "Apache-2.0" ]
null
null
null
Hybrid_Neuron_Simulation.py
emdgroup/brain_waves_for_planning_problems
4b4356f40470d8ecfb6152960d9c4f25a7a11b46
[ "Apache-2.0" ]
null
null
null
""" Attractor Network for 2DoF Robot Arm Author: Henry Powell and Mathias Winkel """ import sys import numpy as np from graphics import Graphics from ContinuousAttractorLayer import ContinuousAttractorLayer from WavePropagationLayer import WavePropagationLayer from setups import SETUPS if len(sys.argv) > 1: sele...
36.804124
137
0.713165
import sys import numpy as np from graphics import Graphics from ContinuousAttractorLayer import ContinuousAttractorLayer from WavePropagationLayer import WavePropagationLayer from setups import SETUPS if len(sys.argv) > 1: selected_setup = sys.argv[1] else: selected_setup = 's_maze' try: setup = SETUPS[...
true
true
1c3494ea262495a05c523a2fd9fa505070ad58b2
365
py
Python
bootstrap.py
dmitrii-bundin/x86_64-sysv-tools
d935f8644c77150a5400cbcecd97fcdcbe1b9bd6
[ "MIT" ]
1
2019-09-09T13:19:05.000Z
2019-09-09T13:19:05.000Z
bootstrap.py
dmitrii-bundin/x86_64-sysv-tools
d935f8644c77150a5400cbcecd97fcdcbe1b9bd6
[ "MIT" ]
5
2019-09-18T05:54:26.000Z
2019-10-13T04:15:08.000Z
bootstrap.py
dmitrii-bundin/x86_64-sysv-tools
d935f8644c77150a5400cbcecd97fcdcbe1b9bd6
[ "MIT" ]
null
null
null
#!/usr/bin/python3.7 import pip def install_package(package_name): print(f"Installing {package_name}...") if hasattr(pip, 'main'): pip.main(['install', package_name]) else: pip._internal.main(['install', package_name]) print(f"Package {package_name} installed successfully") if __name_...
26.071429
59
0.671233
import pip def install_package(package_name): print(f"Installing {package_name}...") if hasattr(pip, 'main'): pip.main(['install', package_name]) else: pip._internal.main(['install', package_name]) print(f"Package {package_name} installed successfully") if __name__ == "__main__":
false
true
1c34962ea4c82ad76bb790502dd26afe10c37022
6,345
py
Python
pecos/simulators/sparsesim/logical_sign.py
quantum-pecos/PECOS
44bc614a9152f3b316bacef6ca034f6a8a611293
[ "Apache-2.0" ]
15
2019-04-11T16:02:38.000Z
2022-03-15T16:56:36.000Z
pecos/simulators/sparsesim/logical_sign.py
quantum-pecos/PECOS
44bc614a9152f3b316bacef6ca034f6a8a611293
[ "Apache-2.0" ]
4
2018-10-04T19:30:09.000Z
2019-03-12T19:00:34.000Z
pecos/simulators/sparsesim/logical_sign.py
quantum-pecos/PECOS
44bc614a9152f3b316bacef6ca034f6a8a611293
[ "Apache-2.0" ]
3
2020-10-07T16:47:16.000Z
2022-02-01T05:34:54.000Z
# ========================================================================= # # Copyright 2018 National Technology & Engineering Solutions of Sandia, # LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, # the U.S. Government retains certain rights in this software. # # Licensed under the Apache...
37.544379
118
0.622695
def find_logical_signs(state, logical_circuit, delogical_circuit=None): if len(logical_circuit) != 1: raise Exception('Logical operators are expected to only have one tick.') if delogical_circuit and len(delogical_circuit) != 1: raise Exception('Delogical operators are expect...
true
true
1c3496b8cbe1d3ec4b9afe9a121970b48f4fb661
20,937
py
Python
main/Sapphire/Post_Process/DistFuncs.py
JonesRobM/SAPPHIRE
64fd62634279800642d21b959d0e8f2efd360ad4
[ "MIT" ]
null
null
null
main/Sapphire/Post_Process/DistFuncs.py
JonesRobM/SAPPHIRE
64fd62634279800642d21b959d0e8f2efd360ad4
[ "MIT" ]
2
2022-03-30T12:33:42.000Z
2022-03-30T12:34:41.000Z
main/Sapphire/Post_Process/DistFuncs.py
JonesRobM/Sapphire
fba875af56e48e2c5a4a3cf6788f51f359f63800
[ "MIT" ]
null
null
null
import numpy as np import os def distance(a, b): dx = abs(a[0] - b[0]) dy = abs(a[1] - b[1]) dz = abs(a[2] - b[2]) return np.sqrt(dx**2 + dy**2 + dz**2) def CoMDist(positions, CoM = None, homo = False, specie = None, elements = None): if homo == False: return [dista...
44.264271
132
0.558151
import numpy as np import os def distance(a, b): dx = abs(a[0] - b[0]) dy = abs(a[1] - b[1]) dz = abs(a[2] - b[2]) return np.sqrt(dx**2 + dy**2 + dz**2) def CoMDist(positions, CoM = None, homo = False, specie = None, elements = None): if homo == False: return [dista...
true
true
1c3497047196a31028998ae4617a866c66a753ef
4,399
py
Python
pygasus/model/decorators/lazy_property.py
talismud/pygasus
fb01c8bd51003b5a008b572182a96bad86ef769f
[ "BSD-3-Clause" ]
2
2021-11-18T09:35:10.000Z
2021-11-18T14:46:32.000Z
pygasus/model/decorators/lazy_property.py
talismud/pygasus
fb01c8bd51003b5a008b572182a96bad86ef769f
[ "BSD-3-Clause" ]
null
null
null
pygasus/model/decorators/lazy_property.py
talismud/pygasus
fb01c8bd51003b5a008b572182a96bad86ef769f
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 20201, LE GOFF Vincent # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and ...
33.838462
78
0.674926
_MISSING = object() class LazyPropertyDescriptor: def __init__(self, fget, fset=None): self.fget = fget self.fset = fset self.memory = {} def __get__(self, instance, owner=None): if instance is None: return self try...
true
true
1c34970ee35e01abe21bae0efd3466ad024f3479
298
py
Python
Lab 1. Routes/polyeditor/setup.py
Panda-Lewandowski/Software-engineering
f514c31bc665a54e4894bc6fab39f5cb4b2cbd70
[ "MIT" ]
1
2019-03-15T12:16:07.000Z
2019-03-15T12:16:07.000Z
Lab 1. Routes/polyeditor/setup.py
Panda-Lewandowski/Software-engineering
f514c31bc665a54e4894bc6fab39f5cb4b2cbd70
[ "MIT" ]
null
null
null
Lab 1. Routes/polyeditor/setup.py
Panda-Lewandowski/Software-engineering
f514c31bc665a54e4894bc6fab39f5cb4b2cbd70
[ "MIT" ]
1
2019-10-19T11:33:03.000Z
2019-10-19T11:33:03.000Z
from setuptools import setup, find_packages setup( name='polyeditor', version='polyeditor.__version__', packages=find_packages(), entry_points={ 'console_scripts': ['polyeditor = main:run_editor'] }, install_requires=[ 'PyQt5==5.10' ] )
19.866667
44
0.607383
from setuptools import setup, find_packages setup( name='polyeditor', version='polyeditor.__version__', packages=find_packages(), entry_points={ 'console_scripts': ['polyeditor = main:run_editor'] }, install_requires=[ 'PyQt5==5.10' ] )
true
true
1c349711beedf8b2182208c0042e23eada19e095
1,942
py
Python
old_python/ClassExpoSin.py
ChrisAndre/expsin
ab6960c009894989d668d13ab48f2517abf377a7
[ "MIT" ]
null
null
null
old_python/ClassExpoSin.py
ChrisAndre/expsin
ab6960c009894989d668d13ab48f2517abf377a7
[ "MIT" ]
null
null
null
old_python/ClassExpoSin.py
ChrisAndre/expsin
ab6960c009894989d668d13ab48f2517abf377a7
[ "MIT" ]
1
2020-04-10T10:24:01.000Z
2020-04-10T10:24:01.000Z
import math from ExpoSin import ExpoSin class ClassExpoSin(object): """ Represents the class of sinusoids defined by S_k2[r1, r2, psi, N]. An ExpoSin object can be constructed with this class using an initial tan(y1). """ def __init__(self, k2, r1, r2, angle, N=0): self.k2 = float(k2...
28.558824
90
0.553038
import math from ExpoSin import ExpoSin class ClassExpoSin(object): def __init__(self, k2, r1, r2, angle, N=0): self.k2 = float(k2) self.r1 = float(r1) self.r2 = float(r2) self.N = N self.psi = 2 * math.pi * N + angle def tany1Range(self): k2 = self.k...
true
true
1c3499010d88c6042fb15ac3dc48e94eb92db3d9
2,915
py
Python
pluginbase.py
haizaar/iris
1efe07181cb0ec2307b1385d65160b534b40f9a7
[ "MIT" ]
50
2018-05-29T13:49:41.000Z
2022-03-31T03:19:14.000Z
pluginbase.py
haizaar/iris
1efe07181cb0ec2307b1385d65160b534b40f9a7
[ "MIT" ]
22
2018-06-25T13:39:53.000Z
2021-02-02T08:30:55.000Z
pluginbase.py
haizaar/iris
1efe07181cb0ec2307b1385d65160b534b40f9a7
[ "MIT" ]
7
2018-08-12T06:02:59.000Z
2021-02-05T05:01:29.000Z
# a simple Python plugin loading system # see http://stackoverflow.com/questions/14510286/plugin-architecture-plugin # -manager-vs-inspecting-from-plugins-import import logging from utils import utils class PluginMount(type): """ A plugin mount point derived from: http://martyalchin.com/2008/jan/10/...
24.70339
79
0.606518
import logging from utils import utils class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): cls.plugins = [] else: cls.register_plugin(cls) def register_plugin(cls, plugin): ...
true
true
1c349a8db700b8c7abfa0a3b61b22bc079dd4091
313
py
Python
electrum_mona/plugins/coldcard/__init__.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
61
2017-08-06T08:51:49.000Z
2021-12-28T06:25:36.000Z
electrum_mona/plugins/coldcard/__init__.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
15
2017-09-12T07:15:01.000Z
2021-12-28T06:25:15.000Z
electrum_mona/plugins/coldcard/__init__.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
27
2017-08-18T19:40:30.000Z
2021-03-01T11:16:02.000Z
from electrum_mona.i18n import _ fullname = 'Coldcard Wallet' description = 'Provides support for the Coldcard hardware wallet from Coinkite' requires = [('ckcc-protocol', 'github.com/Coldcard/ckcc-protocol')] registers_keystore = ('hardware', 'coldcard', _("Coldcard Wallet")) available_for = ['qt', 'cmdline']
39.125
79
0.753994
from electrum_mona.i18n import _ fullname = 'Coldcard Wallet' description = 'Provides support for the Coldcard hardware wallet from Coinkite' requires = [('ckcc-protocol', 'github.com/Coldcard/ckcc-protocol')] registers_keystore = ('hardware', 'coldcard', _("Coldcard Wallet")) available_for = ['qt', 'cmdline']
true
true
1c349bd13a11bf740063716d405c8f522ae73dfc
23,198
py
Python
tests/test_ext.py
iomintz/jinja
6b9eb6df5a7804ec4210bf449296aae71eb5cd3e
[ "BSD-3-Clause" ]
1
2020-07-06T05:53:18.000Z
2020-07-06T05:53:18.000Z
tests/test_ext.py
iomintz/jinja
6b9eb6df5a7804ec4210bf449296aae71eb5cd3e
[ "BSD-3-Clause" ]
null
null
null
tests/test_ext.py
iomintz/jinja
6b9eb6df5a7804ec4210bf449296aae71eb5cd3e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ jinja2.testsuite.ext ~~~~~~~~~~~~~~~~~~~~ Tests for the extensions. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import pytest from jinja2 import Environment, DictLoader, contextfunction, nodes from jinja2.exception...
38.857621
81
0.541254
import re import pytest from jinja2 import Environment, DictLoader, contextfunction, nodes from jinja2.exceptions import TemplateAssertionError from jinja2.ext import Extension from jinja2.lexer import Token, count_newlines from jinja2._compat import BytesIO, itervalues, text_type importable_object = 23 _gettext_re...
true
true
1c349c39467a3ca68dc775d9b3b1980ea1bd73a5
7,700
py
Python
light_mappo-main/algorithms/algorithm/rMAPPOPolicy.py
daixiangxiang/Reinforcement_learning
90aabba61c609c5afd445205b94ebd87a309ff7c
[ "MIT" ]
null
null
null
light_mappo-main/algorithms/algorithm/rMAPPOPolicy.py
daixiangxiang/Reinforcement_learning
90aabba61c609c5afd445205b94ebd87a309ff7c
[ "MIT" ]
null
null
null
light_mappo-main/algorithms/algorithm/rMAPPOPolicy.py
daixiangxiang/Reinforcement_learning
90aabba61c609c5afd445205b94ebd87a309ff7c
[ "MIT" ]
null
null
null
""" # @Time : 2021/7/1 6:53 下午 # @Author : hezhiqiang01 # @Email : hezhiqiang01@baidu.com # @File : rMAPPOPolicy.py """ import torch from algorithms.algorithm.r_actor_critic import R_Actor, R_Critic from utils.util import update_linear_schedule #策略网络,网络定义 #每一个智能体的观测obs_space为一个14维的向量, # 有两个智能体,cent_obs_space...
54.225352
120
0.623117
import torch from algorithms.algorithm.r_actor_critic import R_Actor, R_Critic from utils.util import update_linear_schedule class RMAPPOPolicy: def __init__(self, args, obs_space, cent_obs_space, act_space, device=torch.device("cpu")): self.device = device self.lr = args.lr self.cri...
true
true
1c349d1c7cd02e86d19efc0c7a149bb9a4420182
160
py
Python
scripts/class-3/espiral_quadrado_colorido.py
GabrielMMelo/python4teens
287f79ada2f8ded669f6e26210e1407202e8ff80
[ "CC-BY-4.0" ]
2
2021-04-15T13:23:16.000Z
2022-02-01T18:31:58.000Z
scripts/class-3/espiral_quadrado_colorido.py
GabrielMMelo/python4teens
287f79ada2f8ded669f6e26210e1407202e8ff80
[ "CC-BY-4.0" ]
null
null
null
scripts/class-3/espiral_quadrado_colorido.py
GabrielMMelo/python4teens
287f79ada2f8ded669f6e26210e1407202e8ff80
[ "CC-BY-4.0" ]
null
null
null
import turtle t = turtle.Pen() colors = ['red', 'yellow', 'blue', 'green'] for x in range(100): t.pencolor(colors[x % 4]) t.forward(x) t.left(91)
16
43
0.58125
import turtle t = turtle.Pen() colors = ['red', 'yellow', 'blue', 'green'] for x in range(100): t.pencolor(colors[x % 4]) t.forward(x) t.left(91)
true
true
1c349db75db5924d77d96f3fb786e6ae7ddd3095
2,193
py
Python
py/winnt/ntpfapi.py
gregzakh/sketches
acbc573b9e67228dac21a94b597d89e2ea5cd755
[ "MIT" ]
1
2022-01-07T13:18:51.000Z
2022-01-07T13:18:51.000Z
py/winnt/ntpfapi.py
gregzakh/sketches
acbc573b9e67228dac21a94b597d89e2ea5cd755
[ "MIT" ]
null
null
null
py/winnt/ntpfapi.py
gregzakh/sketches
acbc573b9e67228dac21a94b597d89e2ea5cd755
[ "MIT" ]
4
2020-02-11T01:00:11.000Z
2022-01-07T14:24:38.000Z
import wintypes as nt from enum import IntEnum # ==================================================================================== PREFETCHER_INFORMATION_CLASS = IntEnum('PREFETCHER_INFORMATION_CLASS', ( 'PrefetcherRetrieveTrace', 'PrefetcherSystemParameters', 'PrefetcherBootPhase', 'PrefetcherR...
34.265625
87
0.652987
import wintypes as nt from enum import IntEnum PREFETCHER_INFORMATION_CLASS = IntEnum('PREFETCHER_INFORMATION_CLASS', ( 'PrefetcherRetrieveTrace', 'PrefetcherSystemParameters', 'PrefetcherBootPhase', 'PrefetcherRetrieveBootLoaderTrace', 'PrefetcherBootControl', ), start=1) class PREFETCHER_...
true
true
1c349e0ca0b1a13e7b3972f3338a8e065eead2a7
4,430
py
Python
scripts/linreg_2d_bayes_demo.py
GSxiongkun/pyprobml
71b2ce90632b80206760f93ab2a1926ce6c8c490
[ "MIT" ]
1
2020-03-01T09:01:37.000Z
2020-03-01T09:01:37.000Z
scripts/linreg_2d_bayes_demo.py
etarakci-hvl/pyprobml
a3fe8086844ae0885e3f21d30be5f2e6448cdeba
[ "MIT" ]
null
null
null
scripts/linreg_2d_bayes_demo.py
etarakci-hvl/pyprobml
a3fe8086844ae0885e3f21d30be5f2e6448cdeba
[ "MIT" ]
null
null
null
#Bayesian inference for simple linear regression with known noise variance #The goal is to reproduce fig 3.7 from Bishop's book. #We fit the linear model f(x,w) = w0 + w1*x and plot the posterior over w. import numpy as np import matplotlib.pyplot as plt import os figdir = os.path.join(os.environ["PYPROBML"], "figures...
33.308271
110
0.669074
#We fit the linear model f(x,w) = w0 + w1*x and plot the posterior over w. import numpy as np import matplotlib.pyplot as plt import os figdir = os.path.join(os.environ["PYPROBML"], "figures") def save_fig(fname): plt.savefig(os.path.join(figdir, fname)) from scipy.stats import uniform, norm, multivariate_normal ...
true
true
1c349e193e2547994367bb255e6108490f7af203
797
py
Python
{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.project_slug}}.py
aocks/cookiecutter-py-flask-docker
b72f89aca9f4f4bac2262d717415ba9e5bd17692
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.project_slug}}.py
aocks/cookiecutter-py-flask-docker
b72f89aca9f4f4bac2262d717415ba9e5bd17692
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.project_slug}}.py
aocks/cookiecutter-py-flask-docker
b72f89aca9f4f4bac2262d717415ba9e5bd17692
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tests for `{{ cookiecutter.project_slug }}` package.""" import pytest from click.testing import CliRunner from {{ cookiecutter.project_slug }} import cli @pytest.mark.skip(reason='Example of test marked as something to skip.') def test_example_skip(): "Example of a test which cannot su...
28.464286
74
0.690088
"""Tests for `{{ cookiecutter.project_slug }}` package.""" import pytest from click.testing import CliRunner from {{ cookiecutter.project_slug }} import cli @pytest.mark.skip(reason='Example of test marked as something to skip.') def test_example_skip(): "Example of a test which cannot succeed so marked as sk...
false
true
1c349ebd61d9069a9e48f5a9811d7b1aa8425dc1
2,095
py
Python
api/app/resources/bookings/booking/booking_recurring_delete.py
sumesh-aot/queue-management
d8de45c2d94c1a557c8f8d207d73a067709d5abb
[ "Apache-2.0" ]
null
null
null
api/app/resources/bookings/booking/booking_recurring_delete.py
sumesh-aot/queue-management
d8de45c2d94c1a557c8f8d207d73a067709d5abb
[ "Apache-2.0" ]
null
null
null
api/app/resources/bookings/booking/booking_recurring_delete.py
sumesh-aot/queue-management
d8de45c2d94c1a557c8f8d207d73a067709d5abb
[ "Apache-2.0" ]
null
null
null
'''Copyright 2018 Province of British Columbia 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,...
36.12069
98
0.692601
from flask import abort, g, request from flask_restx import Resource from app.models.bookings import Booking from app.schemas.bookings import BookingSchema from app.models.theq import CSR from qsystem import api, db, oidc from datetime import datetime, timedelta, date import pytz from app.utilities.auth_util import Ro...
true
true
1c349f75e2a32387801b8a5e9f6d1335ce053c3a
1,139
py
Python
docs/examples/tar_and_transfer.py
rohithj494/gladier
00fc1cfd0a05f6f18b94b8afd9fef2503d2d3189
[ "Apache-2.0" ]
null
null
null
docs/examples/tar_and_transfer.py
rohithj494/gladier
00fc1cfd0a05f6f18b94b8afd9fef2503d2d3189
[ "Apache-2.0" ]
null
null
null
docs/examples/tar_and_transfer.py
rohithj494/gladier
00fc1cfd0a05f6f18b94b8afd9fef2503d2d3189
[ "Apache-2.0" ]
null
null
null
from gladier import GladierBaseClient, generate_flow_definition from pprint import pprint @generate_flow_definition class TarAndTransfer(GladierBaseClient): gladier_tools = [ 'gladier_tools.posix.Tar', 'gladier_tools.globus.Transfer', ] if __name__ == '__main__': flow_input = { '...
33.5
88
0.652327
from gladier import GladierBaseClient, generate_flow_definition from pprint import pprint @generate_flow_definition class TarAndTransfer(GladierBaseClient): gladier_tools = [ 'gladier_tools.posix.Tar', 'gladier_tools.globus.Transfer', ] if __name__ == '__main__': flow_input = { '...
true
true
1c349fa995d70055f33e2ce41fb93d7724b0fda2
6,569
py
Python
CenterNet/src/lib/datasets/sample/ctdet.py
Kalana304/KORSAL
b7a0c7cf5428f632e99d2ca5c5e10a8288f10cc0
[ "MIT" ]
null
null
null
CenterNet/src/lib/datasets/sample/ctdet.py
Kalana304/KORSAL
b7a0c7cf5428f632e99d2ca5c5e10a8288f10cc0
[ "MIT" ]
null
null
null
CenterNet/src/lib/datasets/sample/ctdet.py
Kalana304/KORSAL
b7a0c7cf5428f632e99d2ca5c5e10a8288f10cc0
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch.utils.data as data import numpy as np import torch import json import cv2 import os from utils.image import flip, color_aug from utils.image import get_affine_transform, affine_transform from utils...
39.812121
109
0.601309
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch.utils.data as data import numpy as np import torch import json import cv2 import os from utils.image import flip, color_aug from utils.image import get_affine_transform, affine_transform from utils...
true
true
1c349fb946612a0b2377a7062161d9e4e668d838
11,090
py
Python
src/pymordemos/parabolic_mor.py
pdiercks/pymor
e94f05714d666a929113543c49e88f8f494d64e1
[ "Unlicense" ]
null
null
null
src/pymordemos/parabolic_mor.py
pdiercks/pymor
e94f05714d666a929113543c49e88f8f494d64e1
[ "Unlicense" ]
4
2022-03-17T10:07:38.000Z
2022-03-30T12:41:06.000Z
src/pymordemos/parabolic_mor.py
pdiercks/pymor
e94f05714d666a929113543c49e88f8f494d64e1
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) """Reduced basis approximation of the heat equation. Usage: parabolic_mor...
36.966667
120
0.543823
from functools import partial import numpy as np from pymor.basic import * from pymor.algorithms.timestepping import ImplicitEulerTimeStepper GRID_INTERVALS = 100 FENICS_ORDER = 2 NT = 100 DT = 1. / NT
true
true
1c34a019bc2a84af2cf1508a4ea7650b0bff1654
1,918
py
Python
python/leetcode/92.py
ParkinWu/leetcode
b31312bdefbb2be795f3459e1a76fbc927cab052
[ "MIT" ]
null
null
null
python/leetcode/92.py
ParkinWu/leetcode
b31312bdefbb2be795f3459e1a76fbc927cab052
[ "MIT" ]
null
null
null
python/leetcode/92.py
ParkinWu/leetcode
b31312bdefbb2be795f3459e1a76fbc927cab052
[ "MIT" ]
null
null
null
# Definition for singly-linked list. from typing import List class ListNode: def __init__(self, x): self.val = x self.next = None def __str__(self): s = "" current = self s = s + str(current.val) while current.next: current = current.next ...
23.679012
73
0.48488
from typing import List class ListNode: def __init__(self, x): self.val = x self.next = None def __str__(self): s = "" current = self s = s + str(current.val) while current.next: current = current.next s = s + " -> " s = s + ...
true
true
1c34a0cb90a2d100b1f2c378ba1603f1e5f1e482
4,443
py
Python
ethereumetl/mappers/transaction_mapper.py
spicehq/ethereum-etl
ab76507fa32e9c89620b158b5448696daa87c6f4
[ "MIT" ]
null
null
null
ethereumetl/mappers/transaction_mapper.py
spicehq/ethereum-etl
ab76507fa32e9c89620b158b5448696daa87c6f4
[ "MIT" ]
1
2022-03-29T07:21:53.000Z
2022-03-29T07:21:53.000Z
ethereumetl/mappers/transaction_mapper.py
spicehq/ethereum-etl
ab76507fa32e9c89620b158b5448696daa87c6f4
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018 Evgeny Medvedev, evge.medvedev@gmail.com # # 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 # ...
53.53012
109
0.720684
from ethereumetl.domain.transaction import EthTransaction from ethereumetl.utils import hex_to_dec, to_normalized_address class EthTransactionMapper: @staticmethod def json_dict_to_transaction(json_dict, **kwargs): transaction = EthTransaction() transaction.hash = json_d...
true
true
1c34a0f87d311d932eeb2628cecf25e5e20da33e
1,619
py
Python
tests/calc_area_of_bbox.py
hitfee01/rtm3d
9e872c1bf857234d17c8863be6006722d4aab283
[ "MIT" ]
2
2021-01-22T01:21:24.000Z
2021-04-14T02:46:29.000Z
tests/calc_area_of_bbox.py
hitfee01/rtm3d
9e872c1bf857234d17c8863be6006722d4aab283
[ "MIT" ]
5
2021-01-14T03:18:44.000Z
2021-05-26T02:24:45.000Z
tests/calc_area_of_bbox.py
hitfee01/rtm3d
9e872c1bf857234d17c8863be6006722d4aab283
[ "MIT" ]
2
2021-04-14T02:46:35.000Z
2021-08-09T01:49:11.000Z
import argparse from utils import utils import yaml from datasets.dataset_reader import DatasetReader import os from preprocess.data_preprocess import TestTransform import random import cv2 import numpy as np import tqdm from models.configs.detault import CONFIGS as config from datasets.data.kitti.devkit_object import ...
34.446809
102
0.696109
import argparse from utils import utils import yaml from datasets.dataset_reader import DatasetReader import os from preprocess.data_preprocess import TestTransform import random import cv2 import numpy as np import tqdm from models.configs.detault import CONFIGS as config from datasets.data.kitti.devkit_object import ...
true
true
1c34a32c354ce518d6cd601a25f2b12820f04509
9,167
py
Python
docs/conf.py
ttutko/python_oidc
d090e29278533a367dfd2a91f8ecca0fa53fc5e2
[ "MIT" ]
null
null
null
docs/conf.py
ttutko/python_oidc
d090e29278533a367dfd2a91f8ecca0fa53fc5e2
[ "MIT" ]
null
null
null
docs/conf.py
ttutko/python_oidc
d090e29278533a367dfd2a91f8ecca0fa53fc5e2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import os impo...
33.578755
85
0.703502
import os import sys import inspect import shutil __location__ = os.path.join(os.getcwd(), os.path.dirname( inspect.getfile(inspect.currentframe()))) sys.path.insert(0, os.path.join(__location__, '../src')) # setup.py install" in the RTD Advanced Settings. # Additionally it helps us to avoid ru...
true
true
1c34a3939c7708c6b8b63b555e8b62e83c9f1c76
3,179
py
Python
hacksec_cli/mechanism/upcoming/upcoming.py
hacksec-in/hacksec-cli
18c1c350c21fcab9c5d1c1d799ffda80ac655251
[ "MIT" ]
4
2021-08-30T16:02:05.000Z
2022-01-05T14:49:05.000Z
hacksec_cli/mechanism/upcoming/upcoming.py
ScRiPt1337/hacksec-cli
18c1c350c21fcab9c5d1c1d799ffda80ac655251
[ "MIT" ]
1
2021-09-11T07:35:28.000Z
2021-09-11T16:09:30.000Z
hacksec_cli/mechanism/upcoming/upcoming.py
ScRiPt1337/hacksec-cli
18c1c350c21fcab9c5d1c1d799ffda80ac655251
[ "MIT" ]
2
2021-09-03T02:40:49.000Z
2022-01-05T14:49:08.000Z
from rich.console import Console from rich.table import Table import os console = Console() class upcoming_machine(): """upcoming machines class""" def get_data(self, request): """fetch upcoming machines data""" data = request.get(endpoint="/machines/upcoming") return da...
46.072464
122
0.568732
from rich.console import Console from rich.table import Table import os console = Console() class upcoming_machine(): def get_data(self, request): data = request.get(endpoint="/machines/upcoming") return data[0], data[1] def show_upcoming_machines(self, data): table = ...
true
true
1c34a504c04161e81ae8c9a241e05d32bdea3088
335
py
Python
Py Apple Dynamics V7.3 SRC/PA-Dynamics V7.3/config_s.py
musen142/py-apple-dynamics
95f831ecf9c9167e9709c63deabc989eda6bf669
[ "Apache-2.0" ]
1
2022-01-18T11:47:29.000Z
2022-01-18T11:47:29.000Z
Py Apple Dynamics V7.3 SRC/PA-Dynamics V7.3/config_s.py
musen142/py-apple-dynamics
95f831ecf9c9167e9709c63deabc989eda6bf669
[ "Apache-2.0" ]
null
null
null
Py Apple Dynamics V7.3 SRC/PA-Dynamics V7.3/config_s.py
musen142/py-apple-dynamics
95f831ecf9c9167e9709c63deabc989eda6bf669
[ "Apache-2.0" ]
null
null
null
init_1h=90 init_1s=90 init_2h=90 init_2s=90 init_3h=90 init_3s=90 init_4h=90 init_4s=90 l1=80 l2=69 l=142 b=92.8 w=108 speed=0.05 h=30 Kp_H=0.06 pit_Kp_G=0.04 pit_Kd_G=0.6 rol_Kp_G=0.04 rol_Kd_G=0.35 tran_mov_kp=0.1 CC_M=0 walk_h=50 walk_speed=0.02 ma_case=0 trot_cg_f=4 trot_cg_b=4 trot_cg_t...
5.403226
15
0.704478
init_1h=90 init_1s=90 init_2h=90 init_2s=90 init_3h=90 init_3s=90 init_4h=90 init_4s=90 l1=80 l2=69 l=142 b=92.8 w=108 speed=0.05 h=30 Kp_H=0.06 pit_Kp_G=0.04 pit_Kd_G=0.6 rol_Kp_G=0.04 rol_Kd_G=0.35 tran_mov_kp=0.1 CC_M=0 walk_h=50 walk_speed=0.02 ma_case=0 trot_cg_f=4 trot_cg_b=4 trot_cg_t...
true
true
1c34a549cd57e117fc5dda9459bde878e19744b6
2,581
py
Python
astrodom/gui/dashBoardWindowGui.py
fenriques/AstroDom
84b54d3299cf591c39b214248339a201ae8ae6ca
[ "MIT" ]
8
2020-05-17T14:57:08.000Z
2020-12-20T12:29:43.000Z
astrodom/gui/dashBoardWindowGui.py
fenriques/AstroDom
84b54d3299cf591c39b214248339a201ae8ae6ca
[ "MIT" ]
2
2020-06-04T20:49:09.000Z
2020-09-04T12:35:07.000Z
astrodom/gui/dashBoardWindowGui.py
fenriques/AstroDom
84b54d3299cf591c39b214248339a201ae8ae6ca
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'dashBoardWindow.ui' # # Created by: PyQt5 UI code generator 5.13.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog...
47.796296
108
0.74351
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(865, 741) self.verticalLayout_3 = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout_3.setObjectName("verticalLayout_3") self....
true
true
1c34a628700e2282d78c8d67525397d4f4fbeb16
1,558
py
Python
core/migrations/0021_pumping.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
922
2017-10-26T13:15:40.000Z
2020-02-05T19:06:13.000Z
core/migrations/0021_pumping.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
109
2017-10-26T14:00:30.000Z
2020-02-05T23:37:11.000Z
core/migrations/0021_pumping.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
87
2017-10-26T13:15:54.000Z
2020-01-25T12:49:46.000Z
# Generated by Django 4.0.3 on 2022-04-04 15:34 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("core", "0020_bmi_tags_diaperchange_tags_feeding_tags_and_more"), ] operations = [ migrations.CreateModel( ...
31.16
82
0.425546
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("core", "0020_bmi_tags_diaperchange_tags_feeding_tags_and_more"), ] operations = [ migrations.CreateModel( name="Pumping", fields=[...
true
true
1c34a6291a643e3bbac29e4c5019e462216187d0
7,879
py
Python
scaffold/scaffold.py
q0w/stg44
47fa2d9a5161b4e9165aa916eee24782f46679b1
[ "MIT" ]
null
null
null
scaffold/scaffold.py
q0w/stg44
47fa2d9a5161b4e9165aa916eee24782f46679b1
[ "MIT" ]
21
2020-11-13T17:06:52.000Z
2020-12-06T15:40:30.000Z
scaffold/scaffold.py
q0w/manny
47fa2d9a5161b4e9165aa916eee24782f46679b1
[ "MIT" ]
null
null
null
import os import subprocess import sys from django.core.management import CommandError from scaffold.kit.colors import TermColor from scaffold.kit.templates import ( FieldTemplate, ModelTemplate, SerializerTemplate, UrlTemplate, ViewTemplate, CommonTemplate, ) from scaffold.kit.utils import Wa...
36.308756
99
0.584846
import os import subprocess import sys from django.core.management import CommandError from scaffold.kit.colors import TermColor from scaffold.kit.templates import ( FieldTemplate, ModelTemplate, SerializerTemplate, UrlTemplate, ViewTemplate, CommonTemplate, ) from scaffold.kit.utils import Wa...
true
true
1c34a696474756e5c7ec2ad619cef2ac54d11268
1,077
py
Python
ddb/feature/ytt/__init__.py
gfi-centre-ouest/docker-devbox-ddb
1597d85ef6e9e8322cce195a454de54186ce9ec7
[ "MIT" ]
4
2020-06-11T20:54:47.000Z
2020-09-22T13:07:17.000Z
ddb/feature/ytt/__init__.py
gfi-centre-ouest/docker-devbox-ddb
1597d85ef6e9e8322cce195a454de54186ce9ec7
[ "MIT" ]
113
2019-11-07T00:40:36.000Z
2021-01-18T12:50:16.000Z
ddb/feature/ytt/__init__.py
inetum-orleans/docker-devbox-ddb
20c713cf7bfcaf289226a17a9648c17d16003b4d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from typing import ClassVar, Iterable from dotty_dict import Dotty from ddb.action import Action from ddb.feature import Feature from .actions import YttAction from .schema import YttSchema from ...utils.file import TemplateFinder class YttFeature(Feature): """ Render template files ...
24.477273
75
0.630455
from typing import ClassVar, Iterable from dotty_dict import Dotty from ddb.action import Action from ddb.feature import Feature from .actions import YttAction from .schema import YttSchema from ...utils.file import TemplateFinder class YttFeature(Feature): @property def name(self) -> str: return ...
true
true
1c34a768ddd819f0fbb6b7538001fe92725097b5
62,305
py
Python
tools/pfif-tools/tools/upload.py
priyanshu-kumar02/personfinder
d5390b60709cd0ccaaade9a3b6224a60cd523ed9
[ "Apache-2.0" ]
561
2015-02-16T07:59:42.000Z
2022-03-30T17:31:21.000Z
tools/pfif-tools/tools/upload.py
Anthonymcqueen21/personfinder
ee7791fbc434eb4ec5cfad449288a1e884db5b1e
[ "Apache-2.0" ]
591
2015-01-30T05:09:30.000Z
2022-02-26T09:31:25.000Z
tools/pfif-tools/tools/upload.py
Anthonymcqueen21/personfinder
ee7791fbc434eb4ec5cfad449288a1e884db5b1e
[ "Apache-2.0" ]
258
2015-01-25T18:35:12.000Z
2021-12-25T01:44:14.000Z
#!/usr/bin/env python # # Copyright 2007 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...
36.736439
82
0.640093
"""Tool for uploading diffs from a version control system to the codereview app. Usage summary: upload.py [options] [-- diff_options] Diff options are passed to the diff command of the underlying system. Supported version control systems: Git Mercurial Subversion It is important for Git/Mercur...
false
true
1c34a90004311f67906c6ddffd962fb446f1d3c1
12,670
py
Python
python/fetch_stats.py
IFTS/ads-platform-tools
e6a1a4bcc2e3bbfc902565bfea9004a2ec80c0b8
[ "Apache-2.0" ]
null
null
null
python/fetch_stats.py
IFTS/ads-platform-tools
e6a1a4bcc2e3bbfc902565bfea9004a2ec80c0b8
[ "Apache-2.0" ]
null
null
null
python/fetch_stats.py
IFTS/ads-platform-tools
e6a1a4bcc2e3bbfc902565bfea9004a2ec80c0b8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # import requests import oauth2 as oauth import yaml # import urllib import json import os import time # import pytz import datetime import argparse import re import sys DOMAIN = 'https://ads-api.twitter.com' VERBOSE = 0 NON_SUB_PARAM_SEGMENTATION_TYPES = ['PLATFORMS', 'LOCATIONS', 'GENDER', 'I...
36.2
100
0.627309
import oauth2 as oauth import yaml import json import os import time import datetime import argparse import re import sys DOMAIN = 'https://ads-api.twitter.com' VERBOSE = 0 NON_SUB_PARAM_SEGMENTATION_TYPES = ['PLATFORMS', 'LOCATIONS', 'GENDER', 'INTERESTS', 'KEYWORDS'] def main(options): global VERBOSE ...
true
true
1c34a93ae2bd9277a4dc8c36d811381ee461f571
20,333
py
Python
tensorflow/python/keras/legacy_tf_layers/pooling.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/python/keras/legacy_tf_layers/pooling.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/python/keras/legacy_tf_layers/pooling.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2015 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.837449
80
0.680962
import warnings from tensorflow.python.keras import layers as keras_layers from tensorflow.python.keras.legacy_tf_layers import base from tensorflow.python.util.tf_export import keras_export from tensorflow.python.util.tf_export import tf_export @keras_export(v1=['keras.__internal__.legacy.layers.Aver...
true
true
1c34a9d14522f5765d93c55935a02b61f39cd5a8
4,949
py
Python
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/resource_management_client.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.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 ...
46.252336
109
0.736108
from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.deployments_operations import DeploymentsOperations from .operations.providers_operations import ProvidersOperations from .operation...
true
true
1c34aa2b27f5bb6516cbd5dc6fc230dfc8b8ad9b
260
py
Python
lang/py/rfc/20/multiprocessing/connection_client_20_3_6.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/20/multiprocessing/connection_client_20_3_6.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/20/multiprocessing/connection_client_20_3_6.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:UTF-8 from multiprocessing.connection import Client conn = Client(('45.77.93.132', 15000), authkey=b'12345') conn.send((3, 5)) r = conn.recv() print(r) conn.send(("hello", "world")) r = conn.recv() print(r) conn.close()
16.25
56
0.657692
from multiprocessing.connection import Client conn = Client(('45.77.93.132', 15000), authkey=b'12345') conn.send((3, 5)) r = conn.recv() print(r) conn.send(("hello", "world")) r = conn.recv() print(r) conn.close()
true
true
1c34aa6b9a93347f198a6efead0a8d1dfecf2e32
2,671
py
Python
jarviscli/plugins/quote.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
1
2019-10-03T13:39:19.000Z
2019-10-03T13:39:19.000Z
jarviscli/plugins/quote.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
null
null
null
jarviscli/plugins/quote.py
qwireq/Jarvis
7d8aafd7e7c94ecc0eab2a09fa6484ae599606b8
[ "MIT" ]
null
null
null
import requests import bs4 from six.moves import input import json from plugin import plugin, require @require(network=True) @plugin('quote') class Quote(): """ quote prints quote for the day for you or quotes based on a given keyword """ def __call__(self, jarvis, s): prompt = 'Press 1 to ge...
31.797619
97
0.565331
import requests import bs4 from six.moves import input import json from plugin import plugin, require @require(network=True) @plugin('quote') class Quote(): def __call__(self, jarvis, s): prompt = 'Press 1 to get the quote of the day \n or 2 to get quotes based on a keyword: ' user_input = self.g...
true
true
1c34abec34bf7691a079a5f3bedd254cf3a0d57e
842
py
Python
main.py
AaronDewes/lnd-lnurl
8d641d9076ac2faca3244bafcd6c63e8574c1943
[ "MIT" ]
6
2021-12-05T17:29:00.000Z
2022-01-14T21:58:44.000Z
main.py
AaronDewes/lnd-lnurl
8d641d9076ac2faca3244bafcd6c63e8574c1943
[ "MIT" ]
4
2021-12-05T18:41:35.000Z
2022-02-10T12:10:00.000Z
main.py
AaronDewes/lnd-lnurl
8d641d9076ac2faca3244bafcd6c63e8574c1943
[ "MIT" ]
3
2021-12-05T17:29:52.000Z
2022-01-25T18:30:17.000Z
import argparse import sys import configparser from lndlnurl import LndLnurl config = configparser.ConfigParser() def main(): argument_parser = get_argument_parser() arguments = argument_parser.parse_args() try: with open(arguments.configfile) as f: config.read_file(f) except IOEr...
22.157895
50
0.643705
import argparse import sys import configparser from lndlnurl import LndLnurl config = configparser.ConfigParser() def main(): argument_parser = get_argument_parser() arguments = argument_parser.parse_args() try: with open(arguments.configfile) as f: config.read_file(f) except IOEr...
true
true
1c34abed7ed01b108334ab107f73a52326de0062
1,334
py
Python
src/__main__.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
src/__main__.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
src/__main__.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
from argparse import ArgumentParser from pathlib import Path import pandas as pd import spacy from tqdm import tqdm def get_parser(): parser = ArgumentParser() parser.add_argument("--file", type=Path) return parser def replace_entities(text, ents): new_text = '' start = 0 for e in sorted(en...
25.169811
86
0.63943
from argparse import ArgumentParser from pathlib import Path import pandas as pd import spacy from tqdm import tqdm def get_parser(): parser = ArgumentParser() parser.add_argument("--file", type=Path) return parser def replace_entities(text, ents): new_text = '' start = 0 for e in sorted(en...
true
true
1c34abf6ef901b6d9bcbef4062f98bddec85587d
15,640
py
Python
scripts/slave/recipe_modules/archive/api.py
yjbanov/chromium_build
22e3872f14dbf367cd787caa638f3ac948eac7d7
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/archive/api.py
yjbanov/chromium_build
22e3872f14dbf367cd787caa638f3ac948eac7d7
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/archive/api.py
yjbanov/chromium_build
22e3872f14dbf367cd787caa638f3ac948eac7d7
[ "BSD-3-Clause" ]
1
2020-07-23T11:05:06.000Z
2020-07-23T11:05:06.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re from recipe_engine import recipe_api # TODO(machenbach): Chromium specific data should move out of the archive # module, into e.g. the chromium ...
37.326969
79
0.670588
import re from recipe_engine import recipe_api EXCLUDED_FILES_ALL_PLATFORMS = [ '.landmines', '.ninja_deps', '.ninja_log', 'gen', 'obj', ] EXCLUDED_FILES = { 'win': set(EXCLUDED_FILES_ALL_PLATFORMS + [ 'cfinstaller_archive', 'installer_archive', 'lib', ]), 'mac': set(EXCLUDED_FILE...
true
true
1c34acb721c14bb3ffc8fb8ebdb0afa7d2ee5bfe
1,576
py
Python
htk-lite/commandlist/anon-on.py
otherbeast/hackers-tool-kit
12991889db1f6843dde82e7da4b4cdfb50740da5
[ "Apache-2.0" ]
393
2019-01-21T05:52:54.000Z
2022-03-29T06:07:04.000Z
htk-lite/commandlist/anon-on.py
urantialife/hackers-tool-kit
34dbabf3e94825684fd1a684f522d3dc3565eb2d
[ "Apache-2.0" ]
19
2019-02-22T00:49:28.000Z
2021-12-30T20:28:59.000Z
htk-lite/commandlist/anon-on.py
urantialife/hackers-tool-kit
34dbabf3e94825684fd1a684f522d3dc3565eb2d
[ "Apache-2.0" ]
138
2019-03-15T23:22:19.000Z
2022-03-20T17:19:09.000Z
#!/usr/local/bin/python # coding: latin-1 #if you use this code give me credit @tuf_unkn0wn #i do not give you permission to show / edit this script without my credit #to ask questions or report a problem message me on instagram @tuf_unkn0wn """ ██░ ██ ▄▄▄ ▄████▄ ██ ▄█▀▓█████ ▓█████▄ ▓██░ ██▒▒████▄ ▒██▀...
28.142857
81
0.446701
""" ██░ ██ ▄▄▄ ▄████▄ ██ ▄█▀▓█████ ▓█████▄ ▓██░ ██▒▒████▄ ▒██▀ ▀█ ██▄█▒ ▓█ ▀ ▒██▀ ██▌ ▒██▀▀██░▒██ ▀█▄ ▒▓█ ▄ ▓███▄░ ▒███ ░██ █▌ ░▓█ ░██ ░██▄▄▄▄██ ▒▓▓▄ ▄██▒▓██ █▄ ▒▓█ ▄ ░▓█▄ ▌ ░▓█▒░██▓ ▓█ ▓██▒▒ ▓███▀ ░▒██▒ █▄░▒████▒░▒████▓ ▒ ▒░▒ ▒▒ ▓▒█ ░▒ ▒ ░▒ ▒▒ ▓▒ ▒░ ░ ▒▒▓ ▒ ▒ ░▒░ ░ ▒ ▒...
false
true
1c34acd2e5e79e60abec7fa52794f10ca1591c74
753
py
Python
textWindow.py
TitaniumHocker/Slip-Out
dffc5b99207ae025901284cfa1c9fefedc282e09
[ "MIT" ]
null
null
null
textWindow.py
TitaniumHocker/Slip-Out
dffc5b99207ae025901284cfa1c9fefedc282e09
[ "MIT" ]
null
null
null
textWindow.py
TitaniumHocker/Slip-Out
dffc5b99207ae025901284cfa1c9fefedc282e09
[ "MIT" ]
4
2019-05-16T22:57:20.000Z
2019-06-08T01:09:07.000Z
# -*- coding: utf-8 -*- from pygame.sprite import Sprite from pygame import Surface from pygame import image from pygame import display from pygame import SRCALPHA from pygame import Color class TextWindow(Sprite): def __init__(self, img): Sprite.__init__(self) self.surface = Surface((1280, 720),...
25.965517
53
0.645418
from pygame.sprite import Sprite from pygame import Surface from pygame import image from pygame import display from pygame import SRCALPHA from pygame import Color class TextWindow(Sprite): def __init__(self, img): Sprite.__init__(self) self.surface = Surface((1280, 720), SRCALPHA) self...
true
true
1c34acd4a569d395db08b152cb5f398552cf3fa5
1,956
py
Python
tests/functional/test_templates.py
ChrisLi0329/warehouse
0241ccb3f2974a235815b759065b0c8a9c326009
[ "Apache-2.0" ]
4
2017-12-07T17:45:12.000Z
2021-11-15T11:14:44.000Z
tests/functional/test_templates.py
ChrisLi0329/warehouse
0241ccb3f2974a235815b759065b0c8a9c326009
[ "Apache-2.0" ]
null
null
null
tests/functional/test_templates.py
ChrisLi0329/warehouse
0241ccb3f2974a235815b759065b0c8a9c326009
[ "Apache-2.0" ]
2
2017-12-07T17:45:15.000Z
2019-11-25T23:47:20.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
36.222222
77
0.665644
import os import warehouse from jinja2 import Environment, FileSystemLoader def test_templates_for_empty_titles(): dir_name = os.path.join(os.path.dirname(warehouse.__file__), 'templates') env = Environment( loader=FileSystemLoader(dir_name), extensions=[], cache_size=0, ...
true
true
1c34ad1a177fb2f1e3912e3283617e2717c429b1
508
py
Python
PSET6/mario_more.py
jimcs1/CS50-1
1ae26f14070718fb7d98afbb5416f97693b6ae68
[ "MIT" ]
5
2018-04-23T22:38:17.000Z
2020-09-10T20:54:30.000Z
PSET6/mario_more.py
jimcs1/CS50-1
1ae26f14070718fb7d98afbb5416f97693b6ae68
[ "MIT" ]
3
2017-02-12T13:52:30.000Z
2017-02-15T15:18:27.000Z
PSET6/mario_more.py
jimcs1/CS50-1
1ae26f14070718fb7d98afbb5416f97693b6ae68
[ "MIT" ]
11
2018-07-03T08:56:29.000Z
2022-02-02T14:23:55.000Z
#!/usr/bin/env python3 def main(): height = get_height() print__double_half_pyramid(height) def get_height(): while True: try: height = int(input("Height: ")) except ValueError: continue if 0 < height < 24: break return height def prin...
16.933333
80
0.55315
def main(): height = get_height() print__double_half_pyramid(height) def get_height(): while True: try: height = int(input("Height: ")) except ValueError: continue if 0 < height < 24: break return height def print__double_half_pyramid...
true
true
1c34ad434807485e24fd932875f9ea2e7d672fd6
1,793
py
Python
LinuxCNC/my-mill/PowermaxSerialFuncs.py
CYK-Lim/Shapeoko2Plasma
b4b13f0e5fcdb4ef62bda5b43730d6be6195110a
[ "Unlicense" ]
7
2015-09-22T07:55:48.000Z
2021-11-24T13:47:26.000Z
LinuxCNC/my-mill/PowermaxSerialFuncs.py
michaellis/Shapeoko2Plasma
c7b92846279355268dbc260cec3356609ad2f859
[ "Unlicense" ]
1
2016-03-19T12:56:22.000Z
2016-03-19T12:56:22.000Z
LinuxCNC/my-mill/PowermaxSerialFuncs.py
michaellis/Shapeoko2Plasma
c7b92846279355268dbc260cec3356609ad2f859
[ "Unlicense" ]
2
2015-12-07T15:22:03.000Z
2019-08-10T01:43:47.000Z
#!/usr/bin/env python import pymodbus from pymodbus.constants import Defaults from pymodbus.exceptions import ModbusException from pymodbus.exceptions import ConnectionException from pymodbus.client.sync import ModbusSerialClient as ModbusClient from pymodbus.pdu import ModbusExceptions as ecode from pymodbus.pdu impo...
27.584615
83
0.72058
import pymodbus from pymodbus.constants import Defaults from pymodbus.exceptions import ModbusException from pymodbus.exceptions import ConnectionException from pymodbus.client.sync import ModbusSerialClient as ModbusClient from pymodbus.pdu import ModbusExceptions as ecode from pymodbus.pdu import ExceptionResponse ...
false
true
1c34b01861f826daeba5ddd70b5dfe81126c4a1a
1,065
py
Python
python/09_queue/array_queue.py
shipan3452/algo
0494cc0d8f5daf108daf4358c4531a29279dd380
[ "Apache-2.0" ]
22,028
2018-09-27T05:55:19.000Z
2022-03-30T10:44:46.000Z
python/09_queue/array_queue.py
wangjing013/algo
b2c1228ff915287ad7ebeae4355fa26854ea1557
[ "Apache-2.0" ]
164
2018-10-06T15:11:08.000Z
2022-03-28T10:04:34.000Z
python/09_queue/array_queue.py
wangjing013/algo
b2c1228ff915287ad7ebeae4355fa26854ea1557
[ "Apache-2.0" ]
7,250
2018-09-30T00:45:25.000Z
2022-03-31T20:15:33.000Z
""" Queue based upon array 用数组实现的队列 Author: Wenru """ from typing import Optional class ArrayQueue: def __init__(self, capacity: int): self._items = [] self._capacity = capacity self._head = 0 self._tail = 0 def enqueue(self, item: str) -> bool: if se...
24.767442
78
0.514554
from typing import Optional class ArrayQueue: def __init__(self, capacity: int): self._items = [] self._capacity = capacity self._head = 0 self._tail = 0 def enqueue(self, item: str) -> bool: if self._tail == self._capacity: if self._head == 0: ...
true
true
1c34b0ec85debbe97a11b8bf53e0dd66861058ab
282
py
Python
app/errors.py
lawr3nc/artwork_prov
b6a61e586e28c3afafaa75bb4681bb723fcaaf36
[ "MIT" ]
null
null
null
app/errors.py
lawr3nc/artwork_prov
b6a61e586e28c3afafaa75bb4681bb723fcaaf36
[ "MIT" ]
null
null
null
app/errors.py
lawr3nc/artwork_prov
b6a61e586e28c3afafaa75bb4681bb723fcaaf36
[ "MIT" ]
null
null
null
from flask import render_template from app import app, db @app.errorhandler(404) def page_not_found(error): return render_template('404.html'), 404 @app.errorhandler(500) def internal_server_error(error): db.session.rollback() return render_template('500.html'), 500
21.692308
43
0.758865
from flask import render_template from app import app, db @app.errorhandler(404) def page_not_found(error): return render_template('404.html'), 404 @app.errorhandler(500) def internal_server_error(error): db.session.rollback() return render_template('500.html'), 500
true
true
1c34b0f1c3bffce28462e151e7a163199cb82efe
3,799
py
Python
route_66/model.py
Casper-Smet/turing-route-66
b797485586c3491ddbcd76367aff88b7672d8d9a
[ "MIT" ]
3
2019-12-03T09:47:02.000Z
2019-12-03T09:47:51.000Z
route_66/model.py
Casper-Smet/turing-route-66
b797485586c3491ddbcd76367aff88b7672d8d9a
[ "MIT" ]
null
null
null
route_66/model.py
Casper-Smet/turing-route-66
b797485586c3491ddbcd76367aff88b7672d8d9a
[ "MIT" ]
null
null
null
import numpy as np from mesa import Model from mesa.datacollection import DataCollector from mesa.space import SingleGrid from mesa.time import StagedActivation from route_66.agent import CarAgent, TrafficLight def get_average_velocity(model): """ Gets the total average velocity over all the agents :par...
31.139344
85
0.646486
import numpy as np from mesa import Model from mesa.datacollection import DataCollector from mesa.space import SingleGrid from mesa.time import StagedActivation from route_66.agent import CarAgent, TrafficLight def get_average_velocity(model): df = model.datacollector.get_agent_vars_dataframe() df.reset_inde...
true
true
1c34b127406f89dabe2bc19eed6d0ab68bc5c09a
25,008
py
Python
server/views_admin.py
sampsontan/virtual-clinic
5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34
[ "MIT" ]
50
2019-02-04T12:33:49.000Z
2022-03-14T04:56:20.000Z
server/views_admin.py
sampsontan/virtual-clinic
5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34
[ "MIT" ]
6
2020-05-23T09:34:21.000Z
2021-06-08T19:11:57.000Z
server/views_admin.py
sampsontan/virtual-clinic
5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34
[ "MIT" ]
27
2018-04-04T03:16:00.000Z
2022-03-30T11:08:35.000Z
from csv import QUOTE_MINIMAL, writer import re import sqlite3 import sys from django.core.management import call_command from django.core import serializers from django.shortcuts import render,redirect from django.http import HttpResponseRedirect, HttpResponse from django.db.utils import IntegrityError from server.fo...
40.996721
191
0.636356
from csv import QUOTE_MINIMAL, writer import re import sqlite3 import sys from django.core.management import call_command from django.core import serializers from django.shortcuts import render,redirect from django.http import HttpResponseRedirect, HttpResponse from django.db.utils import IntegrityError from server.fo...
true
true
1c34b152f6690e26ed80dd650bad60f1f8282b89
3,838
py
Python
tests/test_create_wish.py
Zeebrow/wish
9a0efeb70e1646ed12cac03b2419cbeca10e3c1c
[ "MIT" ]
null
null
null
tests/test_create_wish.py
Zeebrow/wish
9a0efeb70e1646ed12cac03b2419cbeca10e3c1c
[ "MIT" ]
3
2021-09-26T11:33:24.000Z
2021-10-16T01:39:19.000Z
tests/test_create_wish.py
Zeebrow/wish
9a0efeb70e1646ed12cac03b2419cbeca10e3c1c
[ "MIT" ]
null
null
null
import unittest from random import randint import shutil from os.path import basename from os import PathLike from pathlib import Path from wishlist import Wish class TestCreateWish(unittest.TestCase): def gen_temp_wishlist(self, identifier: str): """ Generates a temporary wishlist (prj-skel d...
38
93
0.657634
import unittest from random import randint import shutil from os.path import basename from os import PathLike from pathlib import Path from wishlist import Wish class TestCreateWish(unittest.TestCase): def gen_temp_wishlist(self, identifier: str): tempdir_name = f"{identifier}_{randint(1000,9999)}_rep...
true
true
1c34b16a4fd6526b3ce139414ebb3d023c1737ec
761
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_100/rule_16.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_100/rule_16.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_100/rule_16.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Driving_to, obj[1]: Passanger, obj[2]: Weather, obj[3]: Temperature, obj[4]: Time, obj[5]: Coupon, obj[6]: Coupon_validity, obj[7]: Gender, obj[8]: Age, obj[9]: Maritalstatus, obj[10]: Children, obj[11]: Education, obj[12]: Occupation, obj[13]: Income, obj[14]: Bar, obj[15]: Coffeehouse,...
58.538462
441
0.65703
def findDecision(obj): if obj[10]<=0: return 'True' elif obj[10]>0: if obj[7]>0: return 'False' elif obj[7]<=0: return 'True' else: return 'True' else: return 'False'
true
true
1c34b18830edf23d2222dc9e79344ee1793436e5
33,667
py
Python
sdk/python/pulumi_azure_nextgen/web/v20200901/list_web_app_auth_settings.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/web/v20200901/list_web_app_auth_settings.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/web/v20200901/list_web_app_auth_settings.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
51.715822
1,173
0.716221
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'ListWebAppAuthSettingsResult', 'AwaitableListWebAppAuthSettingsResult', 'list_web_app_auth_settings', ] @pulumi.output_t...
true
true
1c34b472a4717165764bc88060bf3b13180e200d
128
py
Python
examples/examples/urls.py
moccu/django-adminjournal
20501affd904026025841de07d4c9f12d9a64e1d
[ "MIT" ]
1
2019-11-25T23:03:14.000Z
2019-11-25T23:03:14.000Z
examples/examples/urls.py
moccu/django-adminjournal
20501affd904026025841de07d4c9f12d9a64e1d
[ "MIT" ]
2
2019-08-23T10:48:33.000Z
2021-06-10T21:03:42.000Z
examples/examples/urls.py
moccu/django-adminjournal
20501affd904026025841de07d4c9f12d9a64e1d
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), ]
16
37
0.71875
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
1c34b5c8e5475042fc481e1d8dbf825169c80fe4
23,511
py
Python
pandas/tests/scalar/timestamp/test_timestamp.py
Arghya-Banerjee/pandas
9a4fcea8de798938a434fcaf67a0aa5a46b76b5b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2022-03-04T10:09:24.000Z
2022-03-04T10:09:24.000Z
pandas/tests/scalar/timestamp/test_timestamp.py
Arghya-Banerjee/pandas
9a4fcea8de798938a434fcaf67a0aa5a46b76b5b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/scalar/timestamp/test_timestamp.py
Arghya-Banerjee/pandas
9a4fcea8de798938a434fcaf67a0aa5a46b76b5b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
""" test the scalar Timestamp """ import calendar from datetime import ( datetime, timedelta, ) import locale import pickle import unicodedata from dateutil.tz import tzutc import numpy as np import pytest import pytz from pytz import ( timezone, utc, ) from pandas._libs.tslibs.timezones import ( ...
35.568835
88
0.59704
import calendar from datetime import ( datetime, timedelta, ) import locale import pickle import unicodedata from dateutil.tz import tzutc import numpy as np import pytest import pytz from pytz import ( timezone, utc, ) from pandas._libs.tslibs.timezones import ( dateutil_gettz as gettz, get_...
true
true
1c34b62e278a58f9d788040bddf7a3c887fc8d63
231
py
Python
NotIncluded/Depreciated/_Check_SystemOfEquation.py
MattArran/GEMMES
ed48ebef08fdf740ed28248c65ed7d8239ab19c4
[ "MIT" ]
4
2021-06-28T07:11:34.000Z
2022-01-11T13:43:17.000Z
NotIncluded/Depreciated/_Check_SystemOfEquation.py
DaluS/GEMMES
10d4a062004ce5b7fd26eb8c4937d940b7d097d5
[ "MIT" ]
167
2021-06-28T07:10:21.000Z
2022-03-18T17:30:40.000Z
NotIncluded/Depreciated/_Check_SystemOfEquation.py
MattArran/GEMMES
ed48ebef08fdf740ed28248c65ed7d8239ab19c4
[ "MIT" ]
3
2021-06-28T07:19:12.000Z
2022-03-03T02:44:15.000Z
# -*- coding: utf-8 -*- """ Created on Wed Jul 7 17:34:54 2021 @author: Paul Valcke """ """ FindTheRightOrderOfResolution(): FindParametersInModel(): CheckIfVariavblesArePrepared(): CheckIfParametersArePrepared(): """
14.4375
35
0.683983
true
true
1c34b6e1813f6fa08d384d75af43ab21cbe63c47
1,336
py
Python
run.py
quadraticmuffin/nd_maze
8f41d923d1839c0d6fb34c02f165b247f181743b
[ "MIT" ]
null
null
null
run.py
quadraticmuffin/nd_maze
8f41d923d1839c0d6fb34c02f165b247f181743b
[ "MIT" ]
null
null
null
run.py
quadraticmuffin/nd_maze
8f41d923d1839c0d6fb34c02f165b247f181743b
[ "MIT" ]
null
null
null
import numpy as np class NdMaze(): ''' ''' def __init__(self, nd, size, start=None): self.board = np.zeros(shape=[size]*nd) self.nd = nd self.size = size self.pos = start if start is None: self.pos = [0]*nd self.dimr = 0 self.dimc = 1 ...
25.692308
100
0.539671
import numpy as np class NdMaze(): def __init__(self, nd, size, start=None): self.board = np.zeros(shape=[size]*nd) self.nd = nd self.size = size self.pos = start if start is None: self.pos = [0]*nd self.dimr = 0 self.dimc = 1 def move(s...
true
true
1c34b7457ad8f2d9d0041328a63a00fffed3739b
53,584
py
Python
Python_Files/gw_driver.py
xyt556/HydroSAR
2142c300e4cf48065626832fdeb9c4aa472627dc
[ "MIT" ]
1
2022-03-01T08:46:46.000Z
2022-03-01T08:46:46.000Z
Python_Files/gw_driver.py
xyt556/HydroSAR
2142c300e4cf48065626832fdeb9c4aa472627dc
[ "MIT" ]
null
null
null
Python_Files/gw_driver.py
xyt556/HydroSAR
2142c300e4cf48065626832fdeb9c4aa472627dc
[ "MIT" ]
null
null
null
# Author: Sayantan Majumdar # Email: smxnv@mst.edu import pandas as pd from Python_Files.hydrolibs import rasterops as rops from Python_Files.hydrolibs import vectorops as vops from Python_Files.hydrolibs import data_download as dd from Python_Files.hydrolibs.sysops import makedirs, make_proper_dir_name, copy_files fr...
58.180239
120
0.659675
import pandas as pd from Python_Files.hydrolibs import rasterops as rops from Python_Files.hydrolibs import vectorops as vops from Python_Files.hydrolibs import data_download as dd from Python_Files.hydrolibs.sysops import makedirs, make_proper_dir_name, copy_files from Python_Files.hydrolibs import random_forest_re...
true
true
1c34b8088b642cdd20af9135beb848737bb80eec
3,217
py
Python
src/programy/parser/template/nodes/condtype2.py
hiitsme123/python
e08309fe61fd5ed88cfb39e9f402613dd7e39269
[ "MIT" ]
5
2017-02-03T07:38:45.000Z
2022-01-06T11:29:29.000Z
src/programy/parser/template/nodes/condtype2.py
hiitsme123/python
e08309fe61fd5ed88cfb39e9f402613dd7e39269
[ "MIT" ]
8
2017-02-03T06:59:03.000Z
2017-04-28T14:23:46.000Z
src/programy/parser/template/nodes/condtype2.py
hiitsme123/python
e08309fe61fd5ed88cfb39e9f402613dd7e39269
[ "MIT" ]
8
2017-02-02T15:12:12.000Z
2017-04-02T13:35:03.000Z
""" Copyright (c) 2016 Keith Sterling 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, distribute,...
41.779221
126
0.639105
import logging from programy.parser.template.nodes.condchild import TemplateConditionNodeWithChildren class TemplateType2ConditionNode(TemplateConditionNodeWithChildren): def __init__(self, name, local=False): TemplateConditionNodeWithChildren.__init__(self) self.name = name self.local ...
true
true
1c34b80edbdc2a9c8bfd0ca9cd1d5e6a6c0a2f82
850
py
Python
prog/process_drug.py
clussier/DeepCDR
011f155c0ffb1abf61ae403bf3b9247398676ac7
[ "MIT" ]
45
2020-02-23T20:49:45.000Z
2022-03-09T09:19:31.000Z
prog/process_drug.py
clussier/DeepCDR
011f155c0ffb1abf61ae403bf3b9247398676ac7
[ "MIT" ]
null
null
null
prog/process_drug.py
clussier/DeepCDR
011f155c0ffb1abf61ae403bf3b9247398676ac7
[ "MIT" ]
11
2020-07-15T15:39:46.000Z
2022-01-28T19:16:43.000Z
#get drug features using Deepchem library import os import deepchem as dc from rdkit import Chem import numpy as np import hickle as hkl drug_smiles_file='../data/223drugs_pubchem_smiles.txt' save_dir='../data/GDSC/drug_graph_feat' pubchemid2smile = {item.split('\t')[0]:item.split('\t')[1].strip() for item in open(dr...
28.333333
114
0.768235
import os import deepchem as dc from rdkit import Chem import numpy as np import hickle as hkl drug_smiles_file='../data/223drugs_pubchem_smiles.txt' save_dir='../data/GDSC/drug_graph_feat' pubchemid2smile = {item.split('\t')[0]:item.split('\t')[1].strip() for item in open(drug_smiles_file).readlines()} if not os.pa...
true
true
1c34b840812f9fa777c8737d8869531bef0599d6
19,134
py
Python
test/functional/dip3-deterministicmns.py
lokalnode/LokalCoin
55572130202013aef57d310bdf8b1f0700ec2168
[ "MIT" ]
null
null
null
test/functional/dip3-deterministicmns.py
lokalnode/LokalCoin
55572130202013aef57d310bdf8b1f0700ec2168
[ "MIT" ]
null
null
null
test/functional/dip3-deterministicmns.py
lokalnode/LokalCoin
55572130202013aef57d310bdf8b1f0700ec2168
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Dash Core developers # Copyright (c) 2021 The Lokal Coin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test deterministic masternodes # import sys from test_fr...
42.425721
199
0.621616
import sys from test_framework.blocktools import create_block, create_coinbase, get_masternode_payment from test_framework.mininode import CTransaction, ToHex, FromHex, CTxOut, COIN, CCbTx from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class Masternode(object...
true
true
1c34b930ea02d98164f851ca88de83a3ba581616
4,415
py
Python
spotify_dl/spotify_dl.py
Harsh14901/spotify-dl
368bc4c842e496fa468160d5422add87c359f19d
[ "MIT" ]
null
null
null
spotify_dl/spotify_dl.py
Harsh14901/spotify-dl
368bc4c842e496fa468160d5422add87c359f19d
[ "MIT" ]
null
null
null
spotify_dl/spotify_dl.py
Harsh14901/spotify-dl
368bc4c842e496fa468160d5422add87c359f19d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse from itertools import product import json import os import sys from logging import DEBUG from pathlib import Path, PurePath import spotipy from spotipy.oauth2 import SpotifyClientCredentials from constants import VERSION from models import db, Song from scaffold import log, chec...
36.791667
147
0.63171
import argparse from itertools import product import json import os import sys from logging import DEBUG from pathlib import Path, PurePath import spotipy from spotipy.oauth2 import SpotifyClientCredentials from constants import VERSION from models import db, Song from scaffold import log, check_for_tokens from spot...
true
true
1c34ba5fd330238a1f0935eb0fc70d42440fb0ff
15,773
py
Python
rpython/memory/gctransform/shadowstack.py
m4sterchain/mesapy
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
[ "Apache-2.0", "OpenSSL" ]
381
2018-08-18T03:37:22.000Z
2022-02-06T23:57:36.000Z
rpython/memory/gctransform/shadowstack.py
m4sterchain/mesapy
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
[ "Apache-2.0", "OpenSSL" ]
16
2018-09-22T18:12:47.000Z
2022-02-22T20:03:59.000Z
rpython/memory/gctransform/shadowstack.py
m4sterchain/mesapy
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
[ "Apache-2.0", "OpenSSL" ]
30
2018-08-20T03:16:34.000Z
2022-01-12T17:39:22.000Z
from rpython.annotator import model as annmodel from rpython.rtyper.llannotation import SomePtr from rpython.rlib.debug import ll_assert from rpython.rlib.nonconst import NonConstant from rpython.rlib import rgc from rpython.rlib.objectmodel import specialize from rpython.rtyper import rmodel from rpython.rtyper.annlow...
41.949468
79
0.623153
from rpython.annotator import model as annmodel from rpython.rtyper.llannotation import SomePtr from rpython.rlib.debug import ll_assert from rpython.rlib.nonconst import NonConstant from rpython.rlib import rgc from rpython.rlib.objectmodel import specialize from rpython.rtyper import rmodel from rpython.rtyper.annlow...
true
true
1c34bb5490445702128bd5163553e4461749611f
774
py
Python
Python/7/RowWeights/test_row_weight.py
hwakabh/codewars
7afce5a7424d35abc55c350301ac134f2d3edd3d
[ "MIT" ]
null
null
null
Python/7/RowWeights/test_row_weight.py
hwakabh/codewars
7afce5a7424d35abc55c350301ac134f2d3edd3d
[ "MIT" ]
6
2020-02-21T17:01:59.000Z
2021-05-04T07:04:41.000Z
Python/7/RowWeights/test_row_weight.py
hwakabh/codewars
7afce5a7424d35abc55c350301ac134f2d3edd3d
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest import main from row_weights import row_weights class TestRowWeights(TestCase): def test_row_weights(self): test_patterns = [ ([80], (80,0)), ([100,50], (100,50)), ([50,60,70,80], (120,140)), ([13,27,49], (62,27))...
27.642857
61
0.494832
from unittest import TestCase from unittest import main from row_weights import row_weights class TestRowWeights(TestCase): def test_row_weights(self): test_patterns = [ ([80], (80,0)), ([100,50], (100,50)), ([50,60,70,80], (120,140)), ([13,27,49], (62,27))...
true
true
1c34bc22a433fc208d0e12b536b1c70a65be1446
2,802
py
Python
anti_sybil/tests/test2.2.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
null
null
null
anti_sybil/tests/test2.2.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
null
null
null
anti_sybil/tests/test2.2.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
1
2020-03-28T05:05:19.000Z
2020-03-28T05:05:19.000Z
# Test if GroupSybilRank works better than SybilRank import sys sys.path.append('..') import os import copy import algorithms import graphs from utils import * OUTPUT_FOLDER = './outputs/tests2.2/' main_graph_params = { 'num_seed_groups': 0, 'max_known_ratio': 1, 'avg_known_ratio': .5, 'min_known_rat...
35.025
131
0.785867
import sys sys.path.append('..') import os import copy import algorithms import graphs from utils import * OUTPUT_FOLDER = './outputs/tests2.2/' main_graph_params = { 'num_seed_groups': 0, 'max_known_ratio': 1, 'avg_known_ratio': .5, 'min_known_ratio': .2, 'num_attacker_to_num_honest': .1, '...
true
true
1c34bd37fbb2b9caffb2adb5ac2f06077b9b84ba
152
py
Python
authlib/repo/provider/sqlite/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
25
2021-08-25T12:51:14.000Z
2022-03-29T22:56:21.000Z
authlib/repo/provider/sqlite/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
6
2021-09-09T23:09:51.000Z
2022-03-11T11:11:23.000Z
authlib/repo/provider/sqlite/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
7
2021-09-04T08:06:21.000Z
2022-03-07T23:40:02.000Z
from .. import base_provider, const, trace_activity, AppError, DatabaseError from .. import tnow_iso , tnow_iso_str, dt_from_str, dt_from_ts, dt_to_str
50.666667
76
0.809211
from .. import base_provider, const, trace_activity, AppError, DatabaseError from .. import tnow_iso , tnow_iso_str, dt_from_str, dt_from_ts, dt_to_str
true
true
1c34be80c60fd18a9c5653a8384deddadaa3addd
9,704
py
Python
docs/conf.py
anosillus/cookiecutter-poetry
11b2e238e0c2c61d0a7cc6e199787b1bd7e2f413
[ "MIT" ]
6
2021-01-07T15:39:49.000Z
2022-03-25T10:06:45.000Z
docs/conf.py
anosillus/cookiecutter-poetry
11b2e238e0c2c61d0a7cc6e199787b1bd7e2f413
[ "MIT" ]
16
2020-02-24T11:42:21.000Z
2021-08-31T14:22:21.000Z
docs/conf.py
anosillus/cookiecutter-poetry
11b2e238e0c2c61d0a7cc6e199787b1bd7e2f413
[ "MIT" ]
14
2020-05-17T15:59:01.000Z
2022-03-12T03:19:17.000Z
#!/usr/bin/env python3 # # cookiecutter-poetry documentation build configuration file, created by # sphinx-quickstart on Sun Dec 13 09:13:01 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated ...
32.13245
79
0.701979
import re from datetime import date extensions = [ "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.todo", "sphinx.ext.coverage", "sphinx.ext.viewcode", ] templates_path = ["_templates"] source_suffix = ".rst" master_doc = "index" project = "cookiecutt...
true
true
1c34bea001d0ca24b933ea842753d3ca852efb64
1,555
py
Python
main_app/urls.py
ncbentley/capstone
bbaa441f362f9ca203435724d07616dd4a43ab94
[ "PostgreSQL", "MIT" ]
null
null
null
main_app/urls.py
ncbentley/capstone
bbaa441f362f9ca203435724d07616dd4a43ab94
[ "PostgreSQL", "MIT" ]
7
2021-04-08T21:25:57.000Z
2022-03-12T00:42:19.000Z
main_app/urls.py
ncbentley/capstone
bbaa441f362f9ca203435724d07616dd4a43ab94
[ "PostgreSQL", "MIT" ]
null
null
null
from django.urls import path from . import views from django.contrib.staticfiles.storage import staticfiles_storage from django.views.generic.base import RedirectView urlpatterns = [ path('', views.home, name="home"), path('login/', views.login, name="login"), path('signup/', views.signup, name="signup"), ...
62.2
123
0.700965
from django.urls import path from . import views from django.contrib.staticfiles.storage import staticfiles_storage from django.views.generic.base import RedirectView urlpatterns = [ path('', views.home, name="home"), path('login/', views.login, name="login"), path('signup/', views.signup, name="signup"), ...
true
true
1c34bf3427f420a40915d8c91ffc86d15b8ccb54
6,077
py
Python
tarot_juicer/settings.py
abubakarA-Dot/tarot_juicer
dbc68f73d6ae3d73f50f4472a063b5363febc7b8
[ "MIT" ]
4
2020-02-27T00:11:01.000Z
2020-05-11T07:59:55.000Z
tarot_juicer/settings.py
abubakarA-Dot/tarot_juicer
dbc68f73d6ae3d73f50f4472a063b5363febc7b8
[ "MIT" ]
16
2019-12-20T06:57:54.000Z
2020-05-19T01:00:18.000Z
tarot_juicer/settings.py
abubakarA-Dot/tarot_juicer
dbc68f73d6ae3d73f50f4472a063b5363febc7b8
[ "MIT" ]
10
2019-12-25T23:38:33.000Z
2020-05-11T14:15:15.000Z
""" Django settings for tarot_juicer project. Generated by 'django-admin startproject' using Django 2.2.7. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ from dj...
30.847716
103
0.720421
from django.contrib.messages import constants as messages import os import django_heroku from decouple import config import dj_database_url from dotenv import load_dotenv from . import notification load_dotenv() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEFAULT_AUTO_FIELD='django.db.mo...
true
true