hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
b2d17e05c973d4afec2889fae68a1be4d13ef5c7
2,440
py
Python
src/lib/template.py
emil-jacero/powerdns-auth-docker
922f08d6c2182cd8497fc869e42a6218ecc1b105
[ "MIT" ]
null
null
null
src/lib/template.py
emil-jacero/powerdns-auth-docker
922f08d6c2182cd8497fc869e42a6218ecc1b105
[ "MIT" ]
2
2021-05-08T13:30:42.000Z
2022-02-06T22:28:54.000Z
src/lib/template.py
emil-jacero/powerdns-auth-docker
922f08d6c2182cd8497fc869e42a6218ecc1b105
[ "MIT" ]
null
null
null
import os import jinja2 import logging from lib.config import Config class Template: def __init__(self, env_search_term="ENV"): self.log_name = f'{Config.logger_name}.{self.__class__.__name__}' self.log = logging.getLogger(self.log_name) self.path = None self.name = None s...
38.730159
109
0.607787
2,367
0.970082
0
0
0
0
0
0
756
0.309836
b2d18501d17a461813526ffc739b3386958593ec
2,829
py
Python
backend/fief/schemas/workspace.py
fief-dev/fief
cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1
[ "MIT" ]
1
2022-02-13T17:39:42.000Z
2022-02-13T17:39:42.000Z
backend/fief/schemas/workspace.py
fief-dev/fief
cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1
[ "MIT" ]
1
2022-02-13T14:46:24.000Z
2022-02-13T14:46:24.000Z
backend/fief/schemas/workspace.py
fief-dev/fief
cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1
[ "MIT" ]
null
null
null
from typing import Optional from pydantic import BaseModel, root_validator, validator from fief.crypto.encryption import decrypt from fief.db.types import DatabaseType from fief.errors import APIErrorCode from fief.schemas.generics import UUIDSchema from fief.settings import settings def validate_all_database_setti...
28.29
85
0.721456
1,611
0.569459
0
0
550
0.194415
0
0
196
0.069282
b2d1a8016c0b95e209c421ed0aa8314cc552c1ba
491
py
Python
art/migrations/0007_alter_artimage_project.py
rrozander/Art-Website
2cedba90f2adc30d9e83e957903e890af7863eac
[ "MIT" ]
null
null
null
art/migrations/0007_alter_artimage_project.py
rrozander/Art-Website
2cedba90f2adc30d9e83e957903e890af7863eac
[ "MIT" ]
null
null
null
art/migrations/0007_alter_artimage_project.py
rrozander/Art-Website
2cedba90f2adc30d9e83e957903e890af7863eac
[ "MIT" ]
null
null
null
# Generated by Django 3.2.12 on 2022-03-01 23:06 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('art', '0006_auto_20220301_1452'), ] operations = [ migrations.AlterField( model_name='artimage...
24.55
122
0.643585
364
0.741344
0
0
0
0
0
0
118
0.240326
b2d2f0394cea895eb88a51c785769332faca9031
844
py
Python
blog/tasks.py
iloveyougit/ylink2
a87d8fde79ab259012cd6486299fcf86e1afc740
[ "MIT" ]
null
null
null
blog/tasks.py
iloveyougit/ylink2
a87d8fde79ab259012cd6486299fcf86e1afc740
[ "MIT" ]
null
null
null
blog/tasks.py
iloveyougit/ylink2
a87d8fde79ab259012cd6486299fcf86e1afc740
[ "MIT" ]
null
null
null
from __future__ import absolute_import, unicode_literals import string from django.contrib.auth.models import User from django.utils.crypto import get_random_string from celery import shared_task, current_task @shared_task def create_random_user_accounts(total_user): for i in range(total_user): use...
29.103448
87
0.667062
0
0
0
0
620
0.734597
0
0
85
0.100711
b2d418afad092a7839f43f08bf37f5d322277d2e
392
py
Python
fehler_auth/migrations/0003_auto_20220416_1626.py
dhavall13/fehler_core
dd27802d5b227a32aebcc8bfde68e78a69a36d66
[ "MIT" ]
null
null
null
fehler_auth/migrations/0003_auto_20220416_1626.py
dhavall13/fehler_core
dd27802d5b227a32aebcc8bfde68e78a69a36d66
[ "MIT" ]
null
null
null
fehler_auth/migrations/0003_auto_20220416_1626.py
dhavall13/fehler_core
dd27802d5b227a32aebcc8bfde68e78a69a36d66
[ "MIT" ]
null
null
null
# Generated by Django 2.2.27 on 2022-04-16 16:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fehler_auth', '0002_auto_20211002_1511'), ] operations = [ migrations.AlterField( model_name='invite', name='email'...
20.631579
52
0.604592
298
0.760204
0
0
0
0
0
0
101
0.257653
b2d5339e5e531cf1c00d606b9884958e7a82d30b
5,637
py
Python
models/gene.py
rogamba/neuropy
e5ee36126537c75e041d3413c45c6cc20d58a58e
[ "MIT" ]
null
null
null
models/gene.py
rogamba/neuropy
e5ee36126537c75e041d3413c45c6cc20d58a58e
[ "MIT" ]
null
null
null
models/gene.py
rogamba/neuropy
e5ee36126537c75e041d3413c45c6cc20d58a58e
[ "MIT" ]
null
null
null
from random import choice, gauss, random class Gene(object): def __init__(self, config, key): self.config = config self.key = key def __str__(self): attrib = ['key'] + [a for a in self.__gene_attributes__] attrib = ['{0}={1}'.format(a, getattr(self, a)) for a in attrib] ...
35.012422
102
0.583999
5,585
0.990775
0
0
0
0
0
0
1,609
0.285436
b2d6aec912e54487b7271a6bbbbeac36be760ac4
552
py
Python
tapis_cli/commands/taccapis/v2/apps/mixins.py
bpachev/tapis-cli
c3128fb5b63ef74e06b737bbd95ef28fb24f0d32
[ "BSD-3-Clause" ]
8
2020-10-18T22:48:23.000Z
2022-01-10T09:16:14.000Z
tapis_cli/commands/taccapis/v2/apps/mixins.py
bpachev/tapis-cli
c3128fb5b63ef74e06b737bbd95ef28fb24f0d32
[ "BSD-3-Clause" ]
238
2019-09-04T14:37:54.000Z
2020-04-15T16:24:24.000Z
tapis_cli/commands/taccapis/v2/apps/mixins.py
bpachev/tapis-cli
c3128fb5b63ef74e06b737bbd95ef28fb24f0d32
[ "BSD-3-Clause" ]
5
2019-09-20T04:23:49.000Z
2020-01-16T17:45:14.000Z
from tapis_cli.clients.services.mixins import ServiceIdentifier __all__ = ['AppIdentifier'] class AppIdentifier(ServiceIdentifier): service_id_type = 'App' dest = 'app_id' def validate_identifier(self, identifier, permissive=False): try: self.tapis_client.apps.get(appId=identifier) ...
27.6
74
0.615942
456
0.826087
0
0
0
0
0
0
62
0.112319
b2d6f5f40b8910601f5ded38d8738f9d70e406e6
835
py
Python
agents/antifa.py
fan-weiwei/mercury-unicorn
6c36d6baeaaee990a622caa0d7790dbd9982962c
[ "Apache-2.0" ]
null
null
null
agents/antifa.py
fan-weiwei/mercury-unicorn
6c36d6baeaaee990a622caa0d7790dbd9982962c
[ "Apache-2.0" ]
null
null
null
agents/antifa.py
fan-weiwei/mercury-unicorn
6c36d6baeaaee990a622caa0d7790dbd9982962c
[ "Apache-2.0" ]
null
null
null
from agents.agent import Agent from random import randint class Antifa(Agent): def __init__(self): super().__init__() self.is_spy = False def __str__(self): return 'Basic Antifa' def assign_mission(self, board): number_to_assign = board.number_to_assign() board....
24.558824
65
0.635928
774
0.926946
0
0
0
0
0
0
70
0.083832
b2d75b157f57c7832de3185889e5c4f8fbd90377
234
py
Python
faketranslate/metadata.py
HeywoodKing/faketranslate
683821eccd0004305c9f1bbfa0aae16f5fbcd829
[ "MIT" ]
null
null
null
faketranslate/metadata.py
HeywoodKing/faketranslate
683821eccd0004305c9f1bbfa0aae16f5fbcd829
[ "MIT" ]
null
null
null
faketranslate/metadata.py
HeywoodKing/faketranslate
683821eccd0004305c9f1bbfa0aae16f5fbcd829
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- """ @File : metadata.py @Time : 2020/1/1 @Author : flack @Email : [email protected] @ide : PyCharm @project : faketranslate @description : 描述 """
23.4
40
0.491453
0
0
0
0
0
0
0
0
237
0.995798
b2d8b14f8188a2112f4bdf4db0fef92891d9717a
6,062
py
Python
Scaffold_Code/test scripts/test10_vm.py
tzortzispanagiotis/nbc-blockchain-python
4e59bfd3f8aa6fb72ce89f430909a1d5c90629e2
[ "MIT" ]
null
null
null
Scaffold_Code/test scripts/test10_vm.py
tzortzispanagiotis/nbc-blockchain-python
4e59bfd3f8aa6fb72ce89f430909a1d5c90629e2
[ "MIT" ]
null
null
null
Scaffold_Code/test scripts/test10_vm.py
tzortzispanagiotis/nbc-blockchain-python
4e59bfd3f8aa6fb72ce89f430909a1d5c90629e2
[ "MIT" ]
1
2021-03-20T20:18:40.000Z
2021-03-20T20:18:40.000Z
import requests, json, time from multiprocessing.dummy import Pool pool = Pool(100) transactions0 = [] transactions1 = [] transactions2 = [] transactions3 = [] transactions4 = [] transactions5 = [] transactions6 = [] transactions7 = [] transactions8 = [] transactions9 = [] nodeid = { 'id0': 0, 'id1': 1, ...
35.040462
80
0.615473
0
0
0
0
0
0
0
0
1,644
0.271198
b2d93ba833cf1e0c7961b1add21037470175c381
1,550
py
Python
api/standup/utils/email.py
adoval4/standup
307200b46952c8129a36931103920d3200640b83
[ "BSD-2-Clause" ]
null
null
null
api/standup/utils/email.py
adoval4/standup
307200b46952c8129a36931103920d3200640b83
[ "BSD-2-Clause" ]
11
2020-02-12T02:27:29.000Z
2022-03-12T00:08:22.000Z
api/standup/utils/email.py
adoval4/standup
307200b46952c8129a36931103920d3200640b83
[ "BSD-2-Clause" ]
null
null
null
# django from django.core.mail import EmailMessage from django.conf import settings from django.template.loader import render_to_string # utiltities import threading class EmailThread(threading.Thread): """ Class uses a thread to send email """ def __init__(self, subject, content, recipient_list, is_html): sel...
24.21875
77
0.762581
490
0.316129
0
0
0
0
0
0
310
0.2
b2d93cfb63dcf1ebc579a1abfad61711545c68bf
628
py
Python
app/main/controller/sample_controller.py
Eliotdoesprogramming/python.flask.sqlalchemy.Rest_Api_Template
3f0a98ae4676aef9ecdf0df70eb9d1990fee6182
[ "MIT" ]
null
null
null
app/main/controller/sample_controller.py
Eliotdoesprogramming/python.flask.sqlalchemy.Rest_Api_Template
3f0a98ae4676aef9ecdf0df70eb9d1990fee6182
[ "MIT" ]
null
null
null
app/main/controller/sample_controller.py
Eliotdoesprogramming/python.flask.sqlalchemy.Rest_Api_Template
3f0a98ae4676aef9ecdf0df70eb9d1990fee6182
[ "MIT" ]
null
null
null
from flask import Flask from flask_sqlalchemy import SQLAlchemy from service.api_service import Service class SampleController(object): def __init__(self,app:Flask,db:SQLAlchemy,service:Service) -> None: self.app=app self.db=db self.service=service self.add_routes(app) def add_ro...
39.25
80
0.703822
524
0.834395
0
0
0
0
0
0
31
0.049363
b2d981ecabea84bee53271f8bc9c6bdef3c97cef
3,533
py
Python
supervised/preprocessing/datetime_transformer.py
sourcery-ai-bot/mljar-supervised
f60f4ac65516ac759e4b84a198205480a56ada64
[ "MIT" ]
null
null
null
supervised/preprocessing/datetime_transformer.py
sourcery-ai-bot/mljar-supervised
f60f4ac65516ac759e4b84a198205480a56ada64
[ "MIT" ]
null
null
null
supervised/preprocessing/datetime_transformer.py
sourcery-ai-bot/mljar-supervised
f60f4ac65516ac759e4b84a198205480a56ada64
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import datetime import json class DateTimeTransformer(object): def __init__(self): self._new_columns = [] self._old_column = None self._min_datetime = None self._transforms = [] def fit(self, X, column): self._old_column = column ...
32.712963
69
0.565242
3,463
0.980187
0
0
0
0
0
0
350
0.099066
b2da249453d5ecc88736b8a335fffd1d8b76e78e
10,592
py
Python
tac/gui/dashboards/controller.py
fetchai/agents-tac
9e7de7cf6a43fff789972f6d7a3ed906858009e0
[ "Apache-2.0" ]
29
2019-07-17T08:58:19.000Z
2021-12-08T19:25:22.000Z
tac/gui/dashboards/controller.py
fetchai/agents-tac
9e7de7cf6a43fff789972f6d7a3ed906858009e0
[ "Apache-2.0" ]
90
2019-07-03T09:19:15.000Z
2022-01-20T10:37:48.000Z
tac/gui/dashboards/controller.py
fetchai/agents-tac
9e7de7cf6a43fff789972f6d7a3ed906858009e0
[ "Apache-2.0" ]
8
2019-07-12T11:06:54.000Z
2020-05-29T18:54:51.000Z
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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...
31.244838
88
0.558912
8,510
0.803437
0
0
645
0.060895
0
0
2,521
0.23801
b2da2f7f294d67b0e66ebfb594c13ddc9e71fc29
13,568
py
Python
timecat/apps/users/views.py
LinXueyuanStdio/memp
c6f6609cec7c54ec23881838dacb5f4ffba2e68c
[ "Apache-2.0" ]
null
null
null
timecat/apps/users/views.py
LinXueyuanStdio/memp
c6f6609cec7c54ec23881838dacb5f4ffba2e68c
[ "Apache-2.0" ]
null
null
null
timecat/apps/users/views.py
LinXueyuanStdio/memp
c6f6609cec7c54ec23881838dacb5f4ffba2e68c
[ "Apache-2.0" ]
null
null
null
import json from django.urls import reverse from django.shortcuts import render from django.db.models import Q from django.views.generic.base import View from django.contrib.auth import authenticate,login,logout from django.contrib.auth.backends import ModelBackend from django.contrib.auth.hashers import make_password ...
34.176322
108
0.627874
12,895
0.886742
0
0
0
0
0
0
3,983
0.273896
b2dc609945782154da069152ac5405f35cce2d2b
25
py
Python
SWSIdentity/Controllers/__init__.py
vanzhiganov/identity
90936482cc23251ba06121658e6a0a9251e30b3b
[ "Apache-2.0" ]
1
2018-03-26T21:18:52.000Z
2018-03-26T21:18:52.000Z
SWSIdentity/Controllers/__init__.py
vanzhiganov/identity
90936482cc23251ba06121658e6a0a9251e30b3b
[ "Apache-2.0" ]
null
null
null
SWSIdentity/Controllers/__init__.py
vanzhiganov/identity
90936482cc23251ba06121658e6a0a9251e30b3b
[ "Apache-2.0" ]
null
null
null
__all__ = [ 'Users' ]
8.333333
11
0.48
0
0
0
0
0
0
0
0
7
0.28
b2dc6929b15ae89ed88d8e3ef2cd52728dbd110e
5,794
py
Python
gui/Ui_sales_transaction.py
kim-song/kimsong-apriori
0f2a4a2b749989ad1305da3836e7404c09482534
[ "MIT" ]
2
2020-07-17T09:36:56.000Z
2020-12-11T11:36:11.000Z
gui/Ui_sales_transaction.py
kimsongsao/kimsong-apriori
0f2a4a2b749989ad1305da3836e7404c09482534
[ "MIT" ]
null
null
null
gui/Ui_sales_transaction.py
kimsongsao/kimsong-apriori
0f2a4a2b749989ad1305da3836e7404c09482534
[ "MIT" ]
1
2020-07-17T09:23:15.000Z
2020-07-17T09:23:15.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'd:\MITE12\ksapriori\gui\sales_transaction.ui' # # Created by: PyQt5 UI code generator 5.12.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_FormSalesTransaction(ob...
48.283333
101
0.681049
5,504
0.949948
0
0
0
0
0
0
885
0.152744
b2dddf20dfadcb66e5efbea5b82b5fce448e57cf
727
py
Python
setup.py
dboddie/Beeware-Hello-VOC
a22ffc58121ead7acac850c6edb60576bdb66993
[ "MIT" ]
35
2017-09-21T03:45:33.000Z
2021-11-18T01:18:13.000Z
setup.py
dboddie/Beeware-Hello-VOC
a22ffc58121ead7acac850c6edb60576bdb66993
[ "MIT" ]
6
2017-09-25T12:34:31.000Z
2021-07-05T03:40:19.000Z
setup.py
dboddie/Beeware-Hello-VOC
a22ffc58121ead7acac850c6edb60576bdb66993
[ "MIT" ]
10
2018-02-03T12:51:31.000Z
2022-02-08T18:54:48.000Z
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='{{ cookiecutter.app_name }}', version='0.0.1', description='{{ cookiecutter.description }}', author='{{ cookiecutter.author }}', author_email='{{ cookiecutter.author_email }}', license='{{ cookiecutter.license }}', ...
25.964286
64
0.569464
0
0
0
0
0
0
0
0
375
0.515818
b2de089e75f188f3482c29fc33bcbb7a91997599
27,975
py
Python
src/app.py
chunyuyuan/NEWS_2019_network-master
0eec84b383156c82fbd64d900dce578700575d99
[ "MIT" ]
null
null
null
src/app.py
chunyuyuan/NEWS_2019_network-master
0eec84b383156c82fbd64d900dce578700575d99
[ "MIT" ]
null
null
null
src/app.py
chunyuyuan/NEWS_2019_network-master
0eec84b383156c82fbd64d900dce578700575d99
[ "MIT" ]
null
null
null
from flask import Flask, request, render_template, send_file, Response import io import base64 import csv import json import time from collections import OrderedDict import numpy import pandas as pd from numpy import genfromtxt from flask import jsonify from flask_cors import CORS from LoadingNetwork import...
16.913543
360
0.43378
8,450
0.302055
0
0
3,544
0.126685
0
0
10,870
0.388561
b2df22a6002e061c7249b53a9c05a87dc4e272cf
697
py
Python
src/oca/models/__init__.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/oca/models/__init__.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/oca/models/__init__.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # flake8: noqa """ Our City App Our City App internal apis # noqa: E501 The version of the OpenAPI document: 0.0.1 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import # import models into model package from oca.models.home_screen import HomeScre...
30.304348
82
0.826399
0
0
0
0
0
0
0
0
230
0.329986
b2df334cefd6c85d1832ef9e9b56545aefa460f8
428
py
Python
calibrate.py
jamesbowman/k40-python
02054fe7f0bf727910c58d634aae7ba4799a2e2c
[ "BSD-3-Clause" ]
2
2018-07-11T00:36:34.000Z
2018-09-03T06:58:29.000Z
calibrate.py
jamesbowman/k40-python
02054fe7f0bf727910c58d634aae7ba4799a2e2c
[ "BSD-3-Clause" ]
null
null
null
calibrate.py
jamesbowman/k40-python
02054fe7f0bf727910c58d634aae7ba4799a2e2c
[ "BSD-3-Clause" ]
null
null
null
import svgwrite def cross(dwg, x, y, r = 5): dwg.add(dwg.line((x - r, y), (x + r, y), stroke='red', stroke_width=.1)) dwg.add(dwg.line((x, y - r), (x, y + r), stroke='red', stroke_width=.1)) if __name__ == '__main__': dwg = svgwrite.Drawing('test.svg', size=('150mm', '150mm'), viewBox=('0 0 150 150')) ...
23.777778
88
0.556075
0
0
0
0
0
0
0
0
57
0.133178
b2df89e53c0696d724b6e84ea61023d0f33bec67
597
py
Python
Pokemon Identifier/app.py
sethuiyer/mlhub
6be271c0070a0c0bb90dd92aceb344e7415bb1db
[ "MIT" ]
22
2016-12-28T16:14:18.000Z
2019-09-22T16:39:29.000Z
Pokemon Identifier/app.py
sethuiyer/mlhub
6be271c0070a0c0bb90dd92aceb344e7415bb1db
[ "MIT" ]
6
2020-03-24T17:48:55.000Z
2022-03-12T00:04:58.000Z
Pokemon Identifier/app.py
sethuiyer/mlhub
6be271c0070a0c0bb90dd92aceb344e7415bb1db
[ "MIT" ]
17
2017-01-17T09:45:14.000Z
2020-04-21T07:19:39.000Z
from poketype import PokemonTypeIdentifier from flask import Flask, request, make_response,jsonify import os id = PokemonTypeIdentifier() app = Flask(__name__,static_url_path='/static') @app.route('/findtype',methods=['GET']) def classify(): poke_name=request.args.get('pokename') results = id.predict_type(poke...
33.166667
67
0.721943
0
0
0
0
268
0.448911
0
0
89
0.149079
b2e0de9c060c5c18b08f58d054b60642948a19ab
13,975
py
Python
SViTE/backup/sparselearning/snip.py
VITA-Group/SViTE
b0c62fd153c8b0b99917ab935ee76925c9de1149
[ "MIT" ]
50
2021-05-29T00:52:45.000Z
2022-03-17T11:39:47.000Z
SViTE/backup/sparselearning/snip.py
VITA-Group/SViTE
b0c62fd153c8b0b99917ab935ee76925c9de1149
[ "MIT" ]
2
2022-01-16T07:24:52.000Z
2022-03-29T01:56:24.000Z
SViTE/backup/sparselearning/snip.py
VITA-Group/SViTE
b0c62fd153c8b0b99917ab935ee76925c9de1149
[ "MIT" ]
6
2021-06-27T22:24:16.000Z
2022-01-17T02:45:32.000Z
import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import math import copy import types def fgsm_attack(image, epsilon, data_grad): print('Attacking...') # Collect the element-wise sign of the data gradient sign_data_grad = data_grad.sign() # Create th...
34.506173
129
0.606082
0
0
0
0
0
0
0
0
2,083
0.149052
b2e1c343a37dcd72cd8cbdfb5d12721802108339
296
py
Python
digin/leads/views.py
yhung119/cs411-digin
55e884ff0c26ca06056219e6cb641dc1ceae1f56
[ "Apache-2.0" ]
null
null
null
digin/leads/views.py
yhung119/cs411-digin
55e884ff0c26ca06056219e6cb641dc1ceae1f56
[ "Apache-2.0" ]
null
null
null
digin/leads/views.py
yhung119/cs411-digin
55e884ff0c26ca06056219e6cb641dc1ceae1f56
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render from leads.models import Lead from leads.serializers import LeadSerializer from rest_framework import generics # Create your views here. class LeadListCreate(generics.ListCreateAPIView): queryset = Lead.objects.all() serializer_class = LeadSerializer
29.6
49
0.820946
121
0.408784
0
0
0
0
0
0
25
0.084459
b2e290a686a1065fd69b5d2e7d362f288caf266f
117
py
Python
Module01/OOP/FirstClassDef.py
fenglihanxiao/Python
872baf3a3a5ee42740161152605ca2b1ddf4cd30
[ "MIT" ]
null
null
null
Module01/OOP/FirstClassDef.py
fenglihanxiao/Python
872baf3a3a5ee42740161152605ca2b1ddf4cd30
[ "MIT" ]
null
null
null
Module01/OOP/FirstClassDef.py
fenglihanxiao/Python
872baf3a3a5ee42740161152605ca2b1ddf4cd30
[ "MIT" ]
null
null
null
""" First class definition""" class Cat: pass class RaceCar: pass cat1 = Cat() cat2 = Cat() cat3 = Cat()
9
29
0.589744
42
0.358974
0
0
0
0
0
0
29
0.247863
b2e37635f83fbc719c3828b77b744bc8d962608e
870
py
Python
ddtrace/contrib/aiobotocore/__init__.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/aiobotocore/__init__.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/aiobotocore/__init__.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
""" The aiobotocore integration will trace all AWS calls made with the ``aiobotocore`` library. This integration isn't enabled when applying the default patching. To enable it, you must run ``patch_all(botocore=True)`` :: import aiobotocore.session from ddtrace import patch # If not patched yet, you can ...
28.064516
82
0.74023
0
0
0
0
0
0
0
0
655
0.752874
b2e5f383923565aa615eda28c9950c8812f8c749
3,161
py
Python
luna/__init__.py
ktemkin/luna
661dc89f7f60ba8a51165f7f8037ad2d5854cf34
[ "BSD-3-Clause" ]
4
2020-02-11T18:40:02.000Z
2020-04-03T13:07:38.000Z
luna/__init__.py
ktemkin/luna
661dc89f7f60ba8a51165f7f8037ad2d5854cf34
[ "BSD-3-Clause" ]
null
null
null
luna/__init__.py
ktemkin/luna
661dc89f7f60ba8a51165f7f8037ad2d5854cf34
[ "BSD-3-Clause" ]
null
null
null
# # This file is part of LUNA. # import shutil import tempfile import argparse from nmigen import Elaboratable from .gateware.platform import get_appropriate_platform def top_level_cli(fragment, *pos_args, **kwargs): """ Runs a default CLI that assists in building and running gateware. If the user's opt...
37.188235
140
0.669092
0
0
0
0
0
0
0
0
1,521
0.481177
b2e71e54f3ede13551ca6c960041e280c9f907b3
761
py
Python
htdocs/geojson/hsearch.py
akrherz/depbackend
d43053319227a3aaaf7553c823e8e2e748fbe95d
[ "Apache-2.0" ]
null
null
null
htdocs/geojson/hsearch.py
akrherz/depbackend
d43053319227a3aaaf7553c823e8e2e748fbe95d
[ "Apache-2.0" ]
1
2022-02-17T17:43:52.000Z
2022-02-17T17:43:52.000Z
htdocs/geojson/hsearch.py
akrherz/depbackend
d43053319227a3aaaf7553c823e8e2e748fbe95d
[ "Apache-2.0" ]
2
2021-11-28T11:41:32.000Z
2022-01-26T17:12:03.000Z
"""search for HUC12 by name.""" import json from paste.request import parse_formvars from pyiem.util import get_dbconn def search(q): """Search for q""" pgconn = get_dbconn("idep") cursor = pgconn.cursor() d = dict(results=[]) cursor.execute( """SELECT huc_12, hu_12_name from huc12 WH...
23.78125
61
0.622865
0
0
0
0
0
0
0
0
229
0.30092
b2e84727d200add756532d87eca711fb92b61dde
1,570
py
Python
setup.py
Peque/mmsim
b3a78ad0119db6ee8df349a89559ea8006c85db1
[ "BSD-3-Clause" ]
null
null
null
setup.py
Peque/mmsim
b3a78ad0119db6ee8df349a89559ea8006c85db1
[ "BSD-3-Clause" ]
null
null
null
setup.py
Peque/mmsim
b3a78ad0119db6ee8df349a89559ea8006c85db1
[ "BSD-3-Clause" ]
null
null
null
""" Setup module. """ from setuptools import setup from mmsim import __version__ setup( name='mmsim', version=__version__, description='A simple Micromouse Maze Simulator server', long_description="""The server can load different mazes and any client can connect to it to ask for the current po...
26.610169
77
0.54586
0
0
0
0
0
0
0
0
877
0.557888
b2e911b19926607cd6e241f7b09f34ddcf0231cd
2,556
py
Python
fastinference.py
wkcw/VariousDiscriminator-CycleGan
de9c033aeed1c429f37c531056c1f74cb51a771c
[ "MIT" ]
null
null
null
fastinference.py
wkcw/VariousDiscriminator-CycleGan
de9c033aeed1c429f37c531056c1f74cb51a771c
[ "MIT" ]
null
null
null
fastinference.py
wkcw/VariousDiscriminator-CycleGan
de9c033aeed1c429f37c531056c1f74cb51a771c
[ "MIT" ]
null
null
null
""" A fast version of the original inference. Constructing one graph to infer all the samples. Originaly one graph for each sample. """ import tensorflow as tf import os from model import CycleGAN import utils import scipy.misc import numpy as np try: from os import scandir except ImportError: # Python 2 polyfill...
31.555556
91
0.658842
0
0
0
0
0
0
0
0
460
0.179969
b2eaad3cf6ba61735dc17fc8cd249e0de4bd056b
8,879
py
Python
examples/json_serializer.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
2
2021-12-02T00:13:16.000Z
2022-02-26T11:18:33.000Z
examples/json_serializer.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
null
null
null
examples/json_serializer.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
null
null
null
""" This test will show how to use the various Json serializer(s) """ from lazy.io.pathz import get_path from lazy.serialize import SimdJson, OrJson, Json, Serializer from lazy.utils import get_logger, timer logger = get_logger('lazytest') test_file = './files/naics_codes.json' test_path = get_path(test_file, resolve...
75.245763
1,231
0.582273
0
0
0
0
0
0
0
0
6,437
0.724969
b2ec6ef197e2fb9ff51a3b958346b6692ead91be
1,018
py
Python
donatello/utils.py
adrianchifor/donatello
5a384b3203965b16324e9d322e83a8f1f1b27fd1
[ "Apache-2.0" ]
7
2018-12-01T10:41:16.000Z
2021-04-08T19:04:46.000Z
donatello/utils.py
adrianchifor/donatello
5a384b3203965b16324e9d322e83a8f1f1b27fd1
[ "Apache-2.0" ]
4
2018-12-01T15:31:58.000Z
2018-12-01T23:59:52.000Z
donatello/utils.py
adrianchifor/donatello
5a384b3203965b16324e9d322e83a8f1f1b27fd1
[ "Apache-2.0" ]
2
2018-12-01T10:41:29.000Z
2018-12-02T15:56:30.000Z
import http.client def getFunctionPublicIP(): conn = http.client.HTTPSConnection('api.ipify.org', 443) conn.request('GET', '/?format=json') ip = conn.getresponse().read() print(ip) conn.close() return str(ip) def non_zero_balance(balance): """ Return the balance with zero-value coins...
24.829268
62
0.609037
0
0
0
0
0
0
0
0
209
0.205305
b2ee1fd8d6c226332f2055e2d1c443475db998ec
2,442
py
Python
omop_cdm/utility_programs/load_concept_files_into_db.py
jhajagos/CommonDataModelMapper
65d2251713e5581b76cb16e36424d61fb194c901
[ "Apache-2.0" ]
1
2019-06-14T02:26:35.000Z
2019-06-14T02:26:35.000Z
omop_cdm/utility_programs/load_concept_files_into_db.py
jhajagos/CommonDataModelMapper
65d2251713e5581b76cb16e36424d61fb194c901
[ "Apache-2.0" ]
null
null
null
omop_cdm/utility_programs/load_concept_files_into_db.py
jhajagos/CommonDataModelMapper
65d2251713e5581b76cb16e36424d61fb194c901
[ "Apache-2.0" ]
1
2019-08-12T20:19:28.000Z
2019-08-12T20:19:28.000Z
import argparse import json import sys import os try: from utility_functions import load_csv_files_into_db, generate_vocabulary_load except(ImportError): sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], os.path.pardir, os.path.pardir, "src"))) from utility_functions import load_...
37
137
0.72154
0
0
0
0
0
0
0
0
559
0.228911
b2ef1e91c18ddeb4d7361450a7de67ebdb4b2e6e
1,588
py
Python
triplinker/tests/test_views/test_non_dynamic_urls/test_accounts_views/tests.py
GonnaFlyMethod/triplinker
f4189e499ad48fd9102dd2211a8884078136eae9
[ "MIT" ]
null
null
null
triplinker/tests/test_views/test_non_dynamic_urls/test_accounts_views/tests.py
GonnaFlyMethod/triplinker
f4189e499ad48fd9102dd2211a8884078136eae9
[ "MIT" ]
null
null
null
triplinker/tests/test_views/test_non_dynamic_urls/test_accounts_views/tests.py
GonnaFlyMethod/triplinker
f4189e499ad48fd9102dd2211a8884078136eae9
[ "MIT" ]
null
null
null
# Python modules. import pytest # Django modules. from django.urls import reverse from django.test import TestCase # !Triplinker modules: from tests.helpers.create_user import new_user @pytest.mark.django_db def test_signup_view(client): url = reverse('accounts:signup') response = client.get(u...
25.206349
47
0.691436
0
0
0
0
1,352
0.851385
0
0
230
0.144836
b2efa45aafbdbf20dc2a3beb6bb3e66667896bb3
414
py
Python
DNN_Experiments/MaskRCNN/convert.py
wmjpillow/FlameDetectionAPP
c3761c9e15adccbd084b17cd6b6f63c561c7f856
[ "MIT" ]
2
2019-12-28T21:46:18.000Z
2020-01-10T03:41:03.000Z
DNN_Experiments/MaskRCNN/convert.py
wmjpillow/FlameDetectionAPP
c3761c9e15adccbd084b17cd6b6f63c561c7f856
[ "MIT" ]
10
2019-12-28T21:31:19.000Z
2020-04-12T20:01:58.000Z
DNN_Experiments/MaskRCNN/convert.py
wmjpillow/FlameDetectionAPP
c3761c9e15adccbd084b17cd6b6f63c561c7f856
[ "MIT" ]
null
null
null
#!/usr/bin/env python # convert jpg tp png from glob import glob import cv2 pngs = glob('./*.jpg') for j in pngs: img = cv2.imread(j) cv2.imwrite(j[:-3] + 'png', img) # delete jpg files import glob import os dir = "/Users/wangmeijie/ALLImportantProjects/FlameDetectionAPP/Models/MaskRCNN/02_26_2020/Mask_RCNN...
21.789474
115
0.707729
0
0
0
0
0
0
0
0
189
0.456522
b2effe0f8a82275a9712cccbfe5467301c5502b1
4,544
py
Python
src/title2Id_redirect_parser.py
mjstrobl/WEXEA
0af0be1cdb93fc00cd81f885aa15ef8d6579b304
[ "Apache-2.0" ]
10
2020-06-14T15:46:53.000Z
2021-04-29T15:02:23.000Z
src/title2Id_redirect_parser.py
mjstrobl/WEXEA
0af0be1cdb93fc00cd81f885aa15ef8d6579b304
[ "Apache-2.0" ]
3
2021-08-25T16:16:45.000Z
2022-02-10T04:29:10.000Z
src/title2Id_redirect_parser.py
mjstrobl/WEXEA
0af0be1cdb93fc00cd81f885aa15ef8d6579b304
[ "Apache-2.0" ]
1
2021-02-17T17:44:06.000Z
2021-02-17T17:44:06.000Z
import xml.sax import re import os import json import time current_milli_time = lambda: int(round(time.time() * 1000)) RE_LINKS = re.compile(r'\[{2}(.*?)\]{2}', re.DOTALL | re.UNICODE) IGNORED_NAMESPACES = [ 'wikipedia', 'category', 'file', 'portal', 'template', 'mediaWiki', 'user', 'help', 'book', 'draft', ...
36.352
150
0.568442
3,258
0.716989
0
0
0
0
0
0
629
0.138424
b2f00de04b4a4965219cd8965a1067b02342ac09
1,571
bzl
Python
rules/starlark_configurations/cc_test/defs.bzl
CyberFlameGO/examples
87a4812cb23f7e7969d74cc073579fb82540c0f6
[ "Apache-2.0" ]
572
2015-09-02T20:26:41.000Z
2022-03-30T07:43:22.000Z
rules/starlark_configurations/cc_test/defs.bzl
CyberFlameGO/examples
87a4812cb23f7e7969d74cc073579fb82540c0f6
[ "Apache-2.0" ]
158
2015-08-31T20:21:50.000Z
2022-03-20T20:13:14.000Z
rules/starlark_configurations/cc_test/defs.bzl
CyberFlameGO/examples
87a4812cb23f7e7969d74cc073579fb82540c0f6
[ "Apache-2.0" ]
408
2015-08-31T20:05:14.000Z
2022-03-28T02:36:44.000Z
# We can transition on native options using this # //command_line_option:<option-name> syntax _BUILD_SETTING = "//command_line_option:test_arg" def _test_arg_transition_impl(settings, attr): _ignore = (settings, attr) return {_BUILD_SETTING: ["new arg"]} _test_arg_transition = transition( implementation ...
33.425532
85
0.700827
0
0
0
0
0
0
0
0
381
0.242521
b2f00fc324ac567aafda05e99a1cb8336f8b4e7a
7,116
py
Python
test_cases/apache_avro_adapter.py
QratorLabs/ritfest2016
cddaaa9e827f5315d2e426c083029124649d6f50
[ "MIT" ]
null
null
null
test_cases/apache_avro_adapter.py
QratorLabs/ritfest2016
cddaaa9e827f5315d2e426c083029124649d6f50
[ "MIT" ]
null
null
null
test_cases/apache_avro_adapter.py
QratorLabs/ritfest2016
cddaaa9e827f5315d2e426c083029124649d6f50
[ "MIT" ]
null
null
null
import io import avro.io try: from avro.schema import parse except ImportError: from avro.schema import Parse as parse class ApacheAvroAdapter(object): NAME = 'avro' def __init__(self): with open('specs/str.avsc', 'r') as f: schema = parse(f.read()) self.str_reader = a...
32.054054
76
0.604272
6,986
0.981731
0
0
0
0
0
0
268
0.037662
b2f17c3de89d94e2aba8cc14a42ef09cd569851a
41
py
Python
tests/test_vec/__init__.py
karin0018/EduNLP
172c36a2cd2c41a1f1c5833d7b1abcbc5e3bbd5f
[ "Apache-2.0" ]
18
2021-02-15T13:10:42.000Z
2022-03-17T12:57:34.000Z
tests/test_vec/__init__.py
karin0018/EduNLP
172c36a2cd2c41a1f1c5833d7b1abcbc5e3bbd5f
[ "Apache-2.0" ]
81
2021-06-02T07:45:20.000Z
2022-03-29T15:21:32.000Z
tests/test_vec/__init__.py
karin0018/EduNLP
172c36a2cd2c41a1f1c5833d7b1abcbc5e3bbd5f
[ "Apache-2.0" ]
29
2021-05-18T08:34:58.000Z
2022-03-12T00:19:09.000Z
# coding: utf-8 # 2021/5/30 @ tongshiwei
13.666667
24
0.658537
0
0
0
0
0
0
0
0
39
0.95122
b2f1d9ab07a35f78efc77316abd28bebe9c01e76
4,004
py
Python
tests/test_nameko_prometheus.py
alfaro28/nameko-prometheus
0f50006b1510eef375712a1b7c4bd00d5f08eb1b
[ "Apache-2.0" ]
null
null
null
tests/test_nameko_prometheus.py
alfaro28/nameko-prometheus
0f50006b1510eef375712a1b7c4bd00d5f08eb1b
[ "Apache-2.0" ]
null
null
null
tests/test_nameko_prometheus.py
alfaro28/nameko-prometheus
0f50006b1510eef375712a1b7c4bd00d5f08eb1b
[ "Apache-2.0" ]
null
null
null
import pytest from nameko.events import EventDispatcher, event_handler from nameko.rpc import rpc from nameko.testing.services import entrypoint_hook, entrypoint_waiter from nameko.web.handlers import http from prometheus_client import REGISTRY, Counter from nameko_prometheus import PrometheusMetrics @pytest.fixture...
33.932203
108
0.727273
600
0.14985
0
0
1,038
0.259241
0
0
920
0.22977
b2f264acc957c78592942a789c9b0334224d0fdd
604
py
Python
testing/forms/products.py
Miki761000/storage_podari_s_luibov
a82caccfd40391f6a2609538e4e629d3b113aca9
[ "MIT" ]
null
null
null
testing/forms/products.py
Miki761000/storage_podari_s_luibov
a82caccfd40391f6a2609538e4e629d3b113aca9
[ "MIT" ]
null
null
null
testing/forms/products.py
Miki761000/storage_podari_s_luibov
a82caccfd40391f6a2609538e4e629d3b113aca9
[ "MIT" ]
null
null
null
from django import forms from warehouse.models import Product, ProductAdditionalInformation class ProductForm(forms.ModelForm): class Meta: model = Product fields = '__all__' field_order = [ 'product_name', 'product_code', 'product_quantity', ...
25.166667
66
0.622517
506
0.837748
0
0
0
0
0
0
99
0.163907
b2f42395c99cb32b176d6e1140d0291edc965ff1
1,210
py
Python
src/amuse/community/sei/test_sei.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
1
2019-12-28T22:47:51.000Z
2019-12-28T22:47:51.000Z
src/amuse/community/sei/test_sei.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
null
null
null
src/amuse/community/sei/test_sei.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
2
2021-11-19T04:41:37.000Z
2021-11-20T02:11:17.000Z
from amuse.test.amusetest import TestWithMPI from amuse.units import nbody_system from amuse.units import units import os import sys import numpy import math from amuse.community.sei.interface import SeiInterface from amuse.community.sei.interface import Sei from amuse import datamodel class TestSeiInterface(TestWit...
29.512195
80
0.661157
913
0.754545
0
0
0
0
0
0
0
0
b2f4e0a17b1d50d9e628464d9c96026fcbff615c
20,063
py
Python
datetimeparser/enums.py
aridevelopment-de/datetimeparser
df63d6f7ed0c362f6d6b4e55d61b973b7fcf3f56
[ "MIT" ]
12
2021-11-05T21:17:21.000Z
2022-03-30T17:53:50.000Z
datetimeparser/enums.py
aridevelopment-de/datetimeparser
df63d6f7ed0c362f6d6b4e55d61b973b7fcf3f56
[ "MIT" ]
45
2021-11-14T16:05:04.000Z
2022-03-29T18:51:31.000Z
datetimeparser/enums.py
aridevelopment-de/datetimeparser
df63d6f7ed0c362f6d6b4e55d61b973b7fcf3f56
[ "MIT" ]
1
2021-11-14T13:44:37.000Z
2021-11-14T13:44:37.000Z
from datetime import datetime, timedelta from enum import Enum, auto from dateutil.relativedelta import relativedelta from .baseclasses import Constant, MethodEnum from .formulars import days_feb, eastern_calc, thanksgiving_calc, year_start class ConstantOption(Enum): TIME_VARIABLE = auto() DATE_VARIABLE = ...
64.719355
140
0.648358
19,790
0.986393
0
0
420
0.020934
0
0
4,565
0.227533
b2f5acf01cacb2c9f5deb948c74813e3ef341bde
2,295
py
Python
ontospy/extras/hacks/server.py
michaelyryi/Ontospy
f1a18daa296285ea02a97d1331e94140e801edc4
[ "MIT" ]
null
null
null
ontospy/extras/hacks/server.py
michaelyryi/Ontospy
f1a18daa296285ea02a97d1331e94140e801edc4
[ "MIT" ]
null
null
null
ontospy/extras/hacks/server.py
michaelyryi/Ontospy
f1a18daa296285ea02a97d1331e94140e801edc4
[ "MIT" ]
null
null
null
# !/usr/bin/env python # -*- coding: UTF-8 -*- """ UTILITY TO START A LOCAL SERVER Copyright (c) 2015 __Michele Pasin__ <http://www.michelepasin.org>. All rights reserved. Shows local repo within a server """ MODULE_VERSION = 0.1 USAGE = "@todo" import time, optparse, os, rdflib, sys, webbrowser import SimpleHT...
19.285714
124
0.712418
260
0.11329
0
0
0
0
0
0
1,005
0.437908
b2f71e9c0092918763ba4db64292488e285e5cbe
14,866
py
Python
python/dolfinx_contact/unbiased/nitsche_unbiased.py
jorgensd/asimov-contact
08704ade6343c346bc54dfd38186983cc7ab4485
[ "MIT" ]
null
null
null
python/dolfinx_contact/unbiased/nitsche_unbiased.py
jorgensd/asimov-contact
08704ade6343c346bc54dfd38186983cc7ab4485
[ "MIT" ]
null
null
null
python/dolfinx_contact/unbiased/nitsche_unbiased.py
jorgensd/asimov-contact
08704ade6343c346bc54dfd38186983cc7ab4485
[ "MIT" ]
null
null
null
# Copyright (C) 2021 Sarah Roggendorf # # SPDX-License-Identifier: MIT from typing import Callable, Tuple, Union import dolfinx.common as _common import dolfinx.fem as _fem import dolfinx.log as _log import dolfinx.mesh as _mesh import dolfinx_cuas import numpy as np import ufl from dolfinx.cpp.graph import Adjace...
42.965318
108
0.654245
0
0
0
0
1,921
0.129221
0
0
5,039
0.338961
b2f7f4cc70879c961d4345ed522c0b9c510c8bf6
5,218
py
Python
scratch/movielens-mongodb.py
crcsmnky/movielens-data-exports
f316f1367abef80a1abce64d3adb3bd3effc6365
[ "Apache-2.0" ]
1
2022-02-01T19:44:36.000Z
2022-02-01T19:44:36.000Z
scratch/movielens-mongodb.py
crcsmnky/movielens-data-exports
f316f1367abef80a1abce64d3adb3bd3effc6365
[ "Apache-2.0" ]
null
null
null
scratch/movielens-mongodb.py
crcsmnky/movielens-data-exports
f316f1367abef80a1abce64d3adb3bd3effc6365
[ "Apache-2.0" ]
null
null
null
""" usage: python movielens-mongodb.py [movies] [ratings] [links] """ import sys import re import csv import os # import tmdbsimple as tmdb from pymongo import MongoClient from pymongo import ASCENDING, DESCENDING from datetime import datetime from time import sleep def import_movies(db, mfile): movies = [] ...
26.622449
116
0.526639
0
0
0
0
0
0
0
0
1,049
0.201035
b2f7fb8b602bfdd673abb75e7f89ca8dc32301c9
1,400
py
Python
coretabs ATM py/withdraw.py
attia7/Test
c74f09816ba2e0798b0533e31ea8b72249dec598
[ "MIT" ]
null
null
null
coretabs ATM py/withdraw.py
attia7/Test
c74f09816ba2e0798b0533e31ea8b72249dec598
[ "MIT" ]
11
2020-03-24T17:40:26.000Z
2022-01-13T01:42:38.000Z
coretabs ATM py/withdraw.py
attia7/AttiaGit
c74f09816ba2e0798b0533e31ea8b72249dec598
[ "MIT" ]
null
null
null
balance = 700 papers=[100, 50, 10, 5,4,3,2,1] def withdraw(balance, request): if balance < request : print('Sorry, you are try withdraw: {0}, but Your balance just : {1}'.format(request, balance)) else: print ('your balance >>', balance) orgnal_request = request while request > ...
30.434783
103
0.512857
0
0
0
0
0
0
0
0
172
0.122857
b2f8b3e8d1857a6e5f87e42cb97fafb1e51c9432
1,126
py
Python
dynamicform/widgets.py
cdgagne/django-dynamicform
f60c549d01c6c091addaf0b4121367d7a1d917f0
[ "MIT" ]
null
null
null
dynamicform/widgets.py
cdgagne/django-dynamicform
f60c549d01c6c091addaf0b4121367d7a1d917f0
[ "MIT" ]
null
null
null
dynamicform/widgets.py
cdgagne/django-dynamicform
f60c549d01c6c091addaf0b4121367d7a1d917f0
[ "MIT" ]
null
null
null
from django import forms from django.forms.utils import flatatt from django.utils import formats from django.utils.encoding import force_text from django.utils.html import format_html class AjaxValidatingTextInput(forms.TextInput): def __init__(self, *args, **kwargs): super(AjaxValidatingTextInput, self)....
41.703704
91
0.652753
939
0.833925
0
0
0
0
0
0
203
0.180284
b2fa232a245de5b9da5a3e07a8eb834b4df0cb1b
1,406
py
Python
ocdskingfisherprocess/maindatabase/migrations/versions/8e3f80979dc9_change_unique_constraint_on_collection.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
1
2019-04-11T10:17:32.000Z
2019-04-11T10:17:32.000Z
ocdskingfisherprocess/maindatabase/migrations/versions/8e3f80979dc9_change_unique_constraint_on_collection.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
282
2018-12-20T16:49:22.000Z
2022-02-01T00:48:10.000Z
ocdskingfisherprocess/maindatabase/migrations/versions/8e3f80979dc9_change_unique_constraint_on_collection.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
7
2019-04-15T13:36:18.000Z
2021-03-02T16:25:41.000Z
"""Change unique constraint on collection Revision ID: 8e3f80979dc9 Revises: 3d5fae27a215 Create Date: 2019-12-18 13:14:56.466907 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '8e3f80979dc9' down_revision = '3d5fae27a215' branch_labels = None depends_on = None...
32.697674
107
0.72404
0
0
0
0
0
0
0
0
921
0.65505
b2fa730dbd73b043c294390890c9c13d76abf7ce
1,685
py
Python
tests/stdlib_test.py
misantroop/jsonpickle
97f4a05ccffe8593458b4b787c3fc97622f23cec
[ "BSD-3-Clause" ]
null
null
null
tests/stdlib_test.py
misantroop/jsonpickle
97f4a05ccffe8593458b4b787c3fc97622f23cec
[ "BSD-3-Clause" ]
1
2019-04-03T20:19:40.000Z
2019-04-03T20:19:40.000Z
tests/stdlib_test.py
parsons-kyle-89/jsonpickle
2828dd4a247bbae9d37a3d78194caaaeadeb2ed2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Test miscellaneous objects from the standard library""" import uuid import unittest import jsonpickle class UUIDTestCase(unittest.TestCase): def test_random_uuid(self): u = uuid.uuid4() encoded = jsonpickle.encode(u) decoded = jsonpickle.decode(encoded) ...
30.089286
70
0.629674
1,310
0.777448
0
0
0
0
0
0
532
0.315727
b2fb2e91c6a7d4ac7cee9919699e52b9663ccb72
3,435
py
Python
app/core.py
JoonyoungYi/lol-recommend
b92efff858e491b68c902abb6de31212c688b47e
[ "Apache-2.0" ]
null
null
null
app/core.py
JoonyoungYi/lol-recommend
b92efff858e491b68c902abb6de31212c688b47e
[ "Apache-2.0" ]
null
null
null
app/core.py
JoonyoungYi/lol-recommend
b92efff858e491b68c902abb6de31212c688b47e
[ "Apache-2.0" ]
null
null
null
import os import time import tensorflow as tf import numpy as np import pandas as pd from .configs import * from .models import init_models EPOCH_NUMBER = 10000 EARLY_STOP = True EARLY_STOP_MAX_ITER = 40 def _train(session, saver, models, train_data, valid_data): model_file_path = _init_model_file_path() p...
31.227273
78
0.546725
0
0
0
0
0
0
0
0
483
0.140611
b2fce30e886d32040df251037d8a8ded7ce043ca
3,817
py
Python
aito/client/requests/query_api_request.py
AitoDotAI/aito-python-tools
891d433222b04f4ff8a4eeafbb9268516fd215dc
[ "MIT" ]
6
2019-10-16T02:35:06.000Z
2021-02-03T13:39:43.000Z
aito/client/requests/query_api_request.py
AitoDotAI/aito-python-tools
891d433222b04f4ff8a4eeafbb9268516fd215dc
[ "MIT" ]
23
2020-03-17T13:16:02.000Z
2021-04-23T15:09:51.000Z
aito/client/requests/query_api_request.py
AitoDotAI/aito-python-tools
891d433222b04f4ff8a4eeafbb9268516fd215dc
[ "MIT" ]
null
null
null
"""Aito `Query API <https://aito.ai/docs/api/#query-api>`__ Request Class""" import re from abc import ABC from typing import Dict, Optional, Union, List from .aito_request import AitoRequest, _PatternEndpoint, _PostRequest from ..responses import SearchResponse, PredictResponse, RecommendResponse, EvaluateResponse, ...
37.058252
119
0.687451
3,401
0.891014
0
0
858
0.224784
0
0
1,698
0.444852
b2fcf5fc344b109dbc4a9623cb76fea9e977c60b
3,417
py
Python
tests/test_domain.py
shyams2/pychebfun
0c1efee54829457b9e1b0d6c34259af6c002e105
[ "BSD-3-Clause" ]
72
2015-02-23T17:08:38.000Z
2022-02-09T18:17:08.000Z
tests/test_domain.py
shyams2/pychebfun
0c1efee54829457b9e1b0d6c34259af6c002e105
[ "BSD-3-Clause" ]
6
2015-01-19T14:12:23.000Z
2021-11-05T08:16:27.000Z
tests/test_domain.py
shyams2/pychebfun
0c1efee54829457b9e1b0d6c34259af6c002e105
[ "BSD-3-Clause" ]
14
2015-07-31T00:08:36.000Z
2021-02-01T22:20:41.000Z
#!/usr/bin/env python # coding: UTF-8 from __future__ import division from pychebfun import Chebfun import operator import unittest import pytest from . import tools import numpy as np import numpy.testing as npt #------------------------------------------------------------------------------ # Unit test for arbitrary...
33.831683
79
0.59643
1,474
0.431373
0
0
1,119
0.32748
0
0
702
0.205443
b2fd53048e194cb59b5b4420a7e50d932868c531
1,878
py
Python
glance/rpc/common.py
Quinton/glance
7674bc8963a3bec21f719c48f40e8a3fc0846e6f
[ "Apache-2.0" ]
5
2017-04-23T05:50:36.000Z
2019-03-12T09:45:20.000Z
glance/rpc/common.py
Quinton/glance
7674bc8963a3bec21f719c48f40e8a3fc0846e6f
[ "Apache-2.0" ]
null
null
null
glance/rpc/common.py
Quinton/glance
7674bc8963a3bec21f719c48f40e8a3fc0846e6f
[ "Apache-2.0" ]
2
2018-08-16T11:41:18.000Z
2018-10-21T06:56:50.000Z
#!/usr/bin/env python #encode=utf-8 #vim: tabstop=4 shiftwidth=4 softtabstop=4 #Created on 2013-8-17 #Copyright 2013 nuoqingyun xuqifeng import copy import logging import traceback class RPCException(Exception): message = "An Unknown RPC related exception occurred" def __init__(self, messa...
22.357143
73
0.596912
1,428
0.760383
0
0
0
0
0
0
356
0.189563
b2fdab74611ca607c1a5e2e63e4ac639ef552870
12,029
py
Python
tests/test_simple.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
8
2018-06-04T09:34:28.000Z
2021-09-16T15:21:24.000Z
tests/test_simple.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
4
2018-03-03T07:45:27.000Z
2019-12-26T20:38:18.000Z
tests/test_simple.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
1
2019-12-26T20:36:32.000Z
2019-12-26T20:36:32.000Z
import unittest import socket import json import base64 import zlib import gzip import bs4 from http.server import BaseHTTPRequestHandler, HTTPServer from threading import Thread import WebRequest from . import testing_server class TestPlainCreation(unittest.TestCase): def test_plain_instantiation_1(self): wg = W...
39.569079
203
0.750104
11,792
0.980298
0
0
0
0
0
0
3,629
0.301688
b2fdbd3d23a1257e8c2fb2f6d739b834e644b93d
5,220
py
Python
cplcom/moa/device/mcdaq.py
matham/cplcom
54b1dc8445ff97bab248418d861354beb7c4e656
[ "MIT" ]
null
null
null
cplcom/moa/device/mcdaq.py
matham/cplcom
54b1dc8445ff97bab248418d861354beb7c4e656
[ "MIT" ]
null
null
null
cplcom/moa/device/mcdaq.py
matham/cplcom
54b1dc8445ff97bab248418d861354beb7c4e656
[ "MIT" ]
null
null
null
'''Barst Measurement Computing DAQ Wrapper ========================================== ''' from functools import partial from pybarst.mcdaq import MCDAQChannel from kivy.properties import NumericProperty, ObjectProperty from moa.threads import ScheduledEventLoop from moa.device.digital import ButtonViewPort from cplco...
35.033557
79
0.627203
4,824
0.924138
0
0
0
0
0
0
1,807
0.346169
b2fdd34a89c4f597f4f4706f3635728cd6c36c6a
2,827
py
Python
train_utils.py
BatyrM/QL-Net
b245aadeb106810d075064137f26d773b2dbd679
[ "MIT" ]
null
null
null
train_utils.py
BatyrM/QL-Net
b245aadeb106810d075064137f26d773b2dbd679
[ "MIT" ]
null
null
null
train_utils.py
BatyrM/QL-Net
b245aadeb106810d075064137f26d773b2dbd679
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.autograd import Variable import torch.optim as optim def accuracy(output, target, topk=(1,)): """Computes the precision@k for the specified values of k""" maxk = max(topk) batch_size = target.size(0) _, pred = output.topk(maxk, 1, True, True) pred = pr...
36.714286
97
0.573753
0
0
0
0
0
0
0
0
510
0.180403
b2feb55d6f844492c6231b317cce3362c8ea498f
69
py
Python
Bronze/Bronze_V/17496.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
Bronze/Bronze_V/17496.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
Bronze/Bronze_V/17496.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
N, T, C, P = map(int, input().split()) print(((N - 1) // T) * C * P)
23
38
0.434783
0
0
0
0
0
0
0
0
0
0
b2ffff75cff848e9cc4d8a6143bf4d9bf43e64d3
5,702
py
Python
sapy_script/SAP.py
fkfouri/sapy_script
476041288367e2098b955bc2377f442ce503e822
[ "MIT" ]
3
2018-12-03T15:51:54.000Z
2020-11-20T01:05:39.000Z
sapy_script/SAP.py
whrocha/sapy_script
476041288367e2098b955bc2377f442ce503e822
[ "MIT" ]
null
null
null
sapy_script/SAP.py
whrocha/sapy_script
476041288367e2098b955bc2377f442ce503e822
[ "MIT" ]
3
2018-07-28T21:53:32.000Z
2018-08-22T13:51:17.000Z
from multiprocessing import Pool, Manager from time import sleep from wmi import WMI from win32com.client import GetObject from subprocess import Popen from collections import Iterable from tqdm import tqdm from os import getpid from sapy_script.Session import Session session_process = None all_processes_id = [] de...
28.368159
113
0.573834
4,970
0.871471
0
0
1,677
0.294056
0
0
718
0.125899
65004332cb733aa8aa9fc8e64faf35799f2ce289
2,158
py
Python
shepherd/blueprints/editor/__init__.py
Systemetric/shepherd
28473503130cddd2c40702240f3deaad3a21e52b
[ "BSD-2-Clause" ]
null
null
null
shepherd/blueprints/editor/__init__.py
Systemetric/shepherd
28473503130cddd2c40702240f3deaad3a21e52b
[ "BSD-2-Clause" ]
8
2017-12-13T15:27:52.000Z
2019-01-27T21:35:14.000Z
shepherd/blueprints/editor/__init__.py
Systemetric/shepherd
28473503130cddd2c40702240f3deaad3a21e52b
[ "BSD-2-Clause" ]
null
null
null
import json import os import os.path as path import re from flask import Blueprint, request blueprint = Blueprint("editor", __name__) robotsrc_path = path.join(os.getcwd(), "robotsrc") if not path.exists(robotsrc_path): os.mkdir(robotsrc_path) main_path = path.join(robotsrc_path, 'main.py') main_file = open(main...
28.394737
88
0.596386
0
0
0
0
1,708
0.791474
0
0
323
0.149676
6501e436cf727b0f646b61fcf716e2f64d47d65c
1,131
py
Python
hai_tests/test_event_emitter.py
valohai/hai
f49c4eae2eb74b1738699e32b4b2aeb0f4d922dd
[ "MIT" ]
2
2018-10-03T11:13:06.000Z
2020-08-07T12:44:22.000Z
hai_tests/test_event_emitter.py
valohai/hai
f49c4eae2eb74b1738699e32b4b2aeb0f4d922dd
[ "MIT" ]
16
2018-02-07T11:08:53.000Z
2021-11-26T09:21:57.000Z
hai_tests/test_event_emitter.py
valohai/hai
f49c4eae2eb74b1738699e32b4b2aeb0f4d922dd
[ "MIT" ]
null
null
null
import pytest from hai.event_emitter import EventEmitter class Thing(EventEmitter): event_types = {'one', 'two'} @pytest.mark.parametrize('omni', (False, True)) def test_event_emitter(omni): t = Thing() events = [] def handle(sender, **args): assert sender is t events.append(args) ...
18.85
47
0.528736
59
0.052166
0
0
598
0.528736
0
0
142
0.125553
6502f4ca30fdd305a49eeefeb8dc2c19d45c0e83
2,598
py
Python
dit/divergences/tests/test_jensen_shannon_divergence.py
chebee7i/dit
59626e34c7938fddeec140522dd2a592ba4f42ef
[ "BSD-2-Clause" ]
null
null
null
dit/divergences/tests/test_jensen_shannon_divergence.py
chebee7i/dit
59626e34c7938fddeec140522dd2a592ba4f42ef
[ "BSD-2-Clause" ]
null
null
null
dit/divergences/tests/test_jensen_shannon_divergence.py
chebee7i/dit
59626e34c7938fddeec140522dd2a592ba4f42ef
[ "BSD-2-Clause" ]
null
null
null
""" Tests for dit.divergences.jensen_shannon_divergence. """ from nose.tools import assert_almost_equal, assert_raises from dit import Distribution from dit.exceptions import ditException from dit.divergences.jensen_shannon_divergence import ( jensen_shannon_divergence as JSD, jensen_shannon_divergence_pmf as...
30.928571
73
0.624326
0
0
0
0
0
0
0
0
746
0.287144
65036c3303afa1e8b9728043f619a82fc6c9e04f
261
py
Python
demo/test_scans.py
zhanwj/multi-task-pytorch
7d57645ec8be0ca0c258cfa99fb788e3cd37f106
[ "MIT" ]
2
2019-06-11T16:16:11.000Z
2020-07-21T10:34:40.000Z
demo/test_scans.py
zhanwj/multi-task-pytorch
7d57645ec8be0ca0c258cfa99fb788e3cd37f106
[ "MIT" ]
null
null
null
demo/test_scans.py
zhanwj/multi-task-pytorch
7d57645ec8be0ca0c258cfa99fb788e3cd37f106
[ "MIT" ]
2
2019-05-21T11:07:29.000Z
2019-06-11T16:17:02.000Z
import torch maxdisp = 10 disp_scans = torch.arange(maxdisp).view(1,maxdisp,1,1) zeros_scans = torch.arange(maxdisp).view(1,maxdisp,1,1) semseg = torch.arange(16).view(4,4) zeros_scans = torch.cat([zeros_scans.repeat(1, repeat,1, 1) for i in range(1)],dim=0)
32.625
85
0.731801
0
0
0
0
0
0
0
0
0
0
65054cfd998e3e6858fee00ff01c36b5dddea1ff
383
py
Python
models.py
collingreen/yaib_plugin_leavemessage
c1e7254edee5255167c2015ee2566f9770b35412
[ "MIT" ]
null
null
null
models.py
collingreen/yaib_plugin_leavemessage
c1e7254edee5255167c2015ee2566f9770b35412
[ "MIT" ]
1
2015-06-06T06:28:45.000Z
2015-06-06T06:28:45.000Z
models.py
collingreen/yaib_plugin_leavemessage
c1e7254edee5255167c2015ee2566f9770b35412
[ "MIT" ]
null
null
null
from sqlalchemy import Table, Column, String, DateTime, Text from modules.persistence import Base, getModelBase CustomBase = getModelBase('leavemessage') class Message(Base, CustomBase): user = Column(String(200)) nick = Column(String(100)) message_time = Column(DateTime) to_nick = Column(String(100...
25.533333
60
0.723238
224
0.584856
0
0
0
0
0
0
14
0.036554
65055cb608c13b9ada0803b4c98f800c169f7118
1,490
py
Python
data/raw_data/test.py
orion-orion/Cloze_Test
021e550e4323d17832f992b9cd7000552b568bc8
[ "MIT" ]
1
2020-02-13T11:13:09.000Z
2020-02-13T11:13:09.000Z
data/raw_data/test.py
lonelyprince7/cloze_test
021e550e4323d17832f992b9cd7000552b568bc8
[ "MIT" ]
1
2020-02-08T06:34:19.000Z
2020-02-12T13:02:19.000Z
data/raw_data/test.py
lonelyprince7/cloze_test
021e550e4323d17832f992b9cd7000552b568bc8
[ "MIT" ]
1
2020-02-13T06:31:17.000Z
2020-02-13T06:31:17.000Z
''' Descripttion: Version: 1.0 Author: ZhangHongYu Date: 2022-02-05 18:23:00 LastEditors: ZhangHongYu LastEditTime: 2022-05-17 16:26:12 ''' import os import sys import json import argparse from transformers import AlbertTokenizer from pytorch_pretrained_bert import BertTokenizer, BertForMaskedLM file_path = sys.argv[1...
31.041667
119
0.573826
0
0
0
0
0
0
0
0
419
0.280455
6506db5995970d6837a7164f54f13ccdaecfc008
1,651
py
Python
steampipe_alchemy/models/aws_route53_resolver_rule.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
9
2021-04-21T04:21:01.000Z
2021-06-19T19:33:36.000Z
steampipe_alchemy/models/aws_route53_resolver_rule.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
null
null
null
steampipe_alchemy/models/aws_route53_resolver_rule.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
1
2021-04-26T21:08:20.000Z
2021-04-26T21:08:20.000Z
from sqlalchemy import Column from sqlalchemy.types import JSON, Text, Boolean, TIMESTAMP, BigInteger from sqlalchemy.dialects import postgresql as psql from steampipe_alchemy.mixins import FormatMixins from steampipe_alchemy import Base class AwsRoute53ResolverRule(Base, FormatMixins): __tablename__ = 'aws_route...
53.258065
90
0.740763
1,411
0.854634
0
0
0
0
0
0
290
0.175651
650ab0f46dda1e9c953f58c0e88233c1aedea04d
8,825
py
Python
harvester/sharekit/extraction.py
nppo/search-portal
aedf21e334f178c049f9d6cf37cafd6efc07bc0d
[ "MIT" ]
1
2022-01-10T00:26:12.000Z
2022-01-10T00:26:12.000Z
harvester/sharekit/extraction.py
nppo/search-portal
aedf21e334f178c049f9d6cf37cafd6efc07bc0d
[ "MIT" ]
48
2021-11-11T13:43:09.000Z
2022-03-30T11:33:37.000Z
harvester/sharekit/extraction.py
nppo/search-portal
aedf21e334f178c049f9d6cf37cafd6efc07bc0d
[ "MIT" ]
null
null
null
import re from mimetypes import guess_type from django.conf import settings from datagrowth.processors import ExtractProcessor from datagrowth.utils import reach from core.constants import HIGHER_EDUCATION_LEVELS, RESTRICTED_MATERIAL_SETS class SharekitMetadataExtraction(ExtractProcessor): youtube_regex = re....
37.394068
107
0.643853
6,785
0.768839
0
0
6,451
0.730992
0
0
2,040
0.231161
650b61eb839964413b4047a7102a2ba07a9d68e0
1,518
py
Python
jake/test/test_audit.py
lvcarlosja/jake
0ecbcdd89352d27f50e35d1d73b624b86456e568
[ "Apache-2.0" ]
null
null
null
jake/test/test_audit.py
lvcarlosja/jake
0ecbcdd89352d27f50e35d1d73b624b86456e568
[ "Apache-2.0" ]
4
2021-07-29T18:51:06.000Z
2021-12-13T20:50:20.000Z
jake/test/test_audit.py
lvcarlosja/jake
0ecbcdd89352d27f50e35d1d73b624b86456e568
[ "Apache-2.0" ]
null
null
null
# # Copyright 2019-Present Sonatype Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
33
81
0.725296
725
0.477602
0
0
84
0.055336
0
0
901
0.593544
650bd2653086235614c46bb1b73a337dfc0ba477
6,046
py
Python
vintage_commands.py
ktuan89/Vintage
81f178043d1dad4ec9bd50ad4db2df9ef994f098
[ "MIT", "Unlicense" ]
null
null
null
vintage_commands.py
ktuan89/Vintage
81f178043d1dad4ec9bd50ad4db2df9ef994f098
[ "MIT", "Unlicense" ]
null
null
null
vintage_commands.py
ktuan89/Vintage
81f178043d1dad4ec9bd50ad4db2df9ef994f098
[ "MIT", "Unlicense" ]
null
null
null
import sublime, sublime_plugin import os #import subprocess def is_legal_path_char(c): # XXX make this platform-specific? return c not in " \n\"|*<>{}[]()" def move_while_path_character(view, start, is_at_boundary, increment=1): while True: if not is_legal_path_char(view.substr(start)): ...
35.775148
148
0.561528
5,453
0.901919
0
0
0
0
0
0
2,073
0.342871
650c687c2aa892784fed03faf887190ac6a55992
3,718
py
Python
bitten/tests/notify.py
dokipen/bitten
d4d2829c63eec84bcfab05ec7035a23e85d90c00
[ "BSD-3-Clause" ]
1
2016-08-28T03:13:03.000Z
2016-08-28T03:13:03.000Z
bitten/tests/notify.py
dokipen/bitten
d4d2829c63eec84bcfab05ec7035a23e85d90c00
[ "BSD-3-Clause" ]
null
null
null
bitten/tests/notify.py
dokipen/bitten
d4d2829c63eec84bcfab05ec7035a23e85d90c00
[ "BSD-3-Clause" ]
null
null
null
#-*- coding: utf-8 -*- # # Copyright (C) 2007 Ole Trenner, <[email protected]> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. import unittest from trac.db import DatabaseManager from trac.test import EnvironmentStub, M...
38.329897
83
0.687197
2,959
0.795858
0
0
0
0
0
0
741
0.199301
650d0ad17e404144a026ce3f06aafc17ea1fda8f
1,962
py
Python
sparse gamma def/gamma_def_score.py
blei-lab/ars-reparameterization
b20a84c28537d85e0aaf62cbbaacb6de9370f0a3
[ "MIT" ]
33
2017-03-11T10:00:32.000Z
2022-03-08T14:23:45.000Z
ars-reparameterization/sparse gamma def/gamma_def_score.py
astirn/neural-inverse-cdf-sampling
80eb2eb7cf396a4e53df62bc126e9a1828f55ca9
[ "MIT" ]
2
2018-02-05T17:14:00.000Z
2019-08-02T14:37:25.000Z
ars-reparameterization/sparse gamma def/gamma_def_score.py
astirn/neural-inverse-cdf-sampling
80eb2eb7cf396a4e53df62bc126e9a1828f55ca9
[ "MIT" ]
10
2017-03-05T13:31:01.000Z
2020-03-29T01:09:01.000Z
from autograd import grad import autograd.numpy as np import autograd.numpy.random as npr import autograd.scipy.special as sp from gamma_def import * # Define helper functions for score fnc estimator def logQ(sample, alpha, m): """ Evaluates log of variational approximation, vectorized. """ temp = alp...
29.727273
104
0.574414
0
0
0
0
0
0
0
0
317
0.16157
650d548dfcf197b677b3b51c6953dea2bc1cb40b
305
py
Python
codes/Ex036.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
3
2021-08-17T14:02:14.000Z
2021-08-19T02:37:30.000Z
codes/Ex036.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
null
null
null
codes/Ex036.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
null
null
null
x = float(input('Qual o valor da casa que quer comprar? ')) y = int(input("em quantos anos quer comprar a casa? ")) z = int(input("Qual seu salario? ")) w = y*12 if x / w > (z/100)*30: print("Voce não pode comprar a casa") else: print('Voce pode comprar a casa a parcela é de {:.2f}'.format(x/y))
33.888889
71
0.636066
0
0
0
0
0
0
0
0
180
0.586319
650e93f40d797c0460bad1ce4c72fe47deb0c2b7
3,313
py
Python
datasets/base_dataset.py
iclr2022submission4/cgca
3e6ea65c0ebf72a8291dde3ffdb06b50e4d2900a
[ "MIT" ]
13
2022-01-10T05:28:26.000Z
2022-02-02T10:22:42.000Z
datasets/base_dataset.py
iclr2022submission4/cgca
3e6ea65c0ebf72a8291dde3ffdb06b50e4d2900a
[ "MIT" ]
null
null
null
datasets/base_dataset.py
iclr2022submission4/cgca
3e6ea65c0ebf72a8291dde3ffdb06b50e4d2900a
[ "MIT" ]
null
null
null
import torch import random from torch.utils.data import Dataset, DataLoader from abc import ABC from models.base_model import Model from torch.utils.tensorboard import SummaryWriter from typing import List class BaseDataset(Dataset, ABC): name = 'base' def __init__(self, config: dict, mode: str = 'train'): self....
29.061404
83
0.705101
3,103
0.936613
94
0.028373
0
0
0
0
802
0.242077
650ec3bb5d3381c505f9bd3240d3f221d5e35e00
660
py
Python
open_data/dataset/migrations/0005_keyword_squashed_0006_remove_keyword_relevancy.py
balfroim/OpenData
f0334dae16c2806e81f7d2d53adeabc72403ecce
[ "MIT" ]
null
null
null
open_data/dataset/migrations/0005_keyword_squashed_0006_remove_keyword_relevancy.py
balfroim/OpenData
f0334dae16c2806e81f7d2d53adeabc72403ecce
[ "MIT" ]
null
null
null
open_data/dataset/migrations/0005_keyword_squashed_0006_remove_keyword_relevancy.py
balfroim/OpenData
f0334dae16c2806e81f7d2d53adeabc72403ecce
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-04-21 13:01 from django.db import migrations, models class Migration(migrations.Migration): replaces = [('dataset', '0005_keyword'), ('dataset', '0006_remove_keyword_relevancy')] dependencies = [ ('dataset', '0004_alter_theme_id'), ] operation...
28.695652
118
0.587879
563
0.85303
0
0
0
0
0
0
196
0.29697
650f4d544268699293dfae61c4d5b0971b890ccb
50
py
Python
src/converters/__init__.py
Peilonrayz/json_to_object
ae5ba42dcab71010302f42d78dbfd559c12496c9
[ "MIT" ]
null
null
null
src/converters/__init__.py
Peilonrayz/json_to_object
ae5ba42dcab71010302f42d78dbfd559c12496c9
[ "MIT" ]
null
null
null
src/converters/__init__.py
Peilonrayz/json_to_object
ae5ba42dcab71010302f42d78dbfd559c12496c9
[ "MIT" ]
null
null
null
from .converter import Converter, Converters, ron
25
49
0.82
0
0
0
0
0
0
0
0
0
0
65106635994d91a479c18b140e8932588b6e8457
2,385
py
Python
result/forms.py
Uqhs-1/uqhs
1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40
[ "MIT" ]
3
2020-06-16T20:03:31.000Z
2021-01-17T20:45:51.000Z
result/forms.py
Uqhs-1/uqhs
1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40
[ "MIT" ]
8
2020-02-08T09:04:08.000Z
2021-06-09T18:31:03.000Z
result/forms.py
Uqhs-1/uqhs
1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Jan 23 08:25:37 2019 @author: AdeolaOlalekan """ from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import BTUTOR, CNAME, Edit_User, QSUBJECT, Post class login_form(forms.Fo...
29.8125
154
0.609224
1,932
0.810063
0
0
0
0
0
0
632
0.26499
6512ccce127a82c68b221b5453c2086be0c2bb8b
3,165
py
Python
00-basic/04_01_data_structures_lists.py
TranXuanHoang/Python
6e62282540a7f1e2b2d0dff99b1803715bf6c4b0
[ "CNRI-Python" ]
null
null
null
00-basic/04_01_data_structures_lists.py
TranXuanHoang/Python
6e62282540a7f1e2b2d0dff99b1803715bf6c4b0
[ "CNRI-Python" ]
null
null
null
00-basic/04_01_data_structures_lists.py
TranXuanHoang/Python
6e62282540a7f1e2b2d0dff99b1803715bf6c4b0
[ "CNRI-Python" ]
null
null
null
# Lists # Basics foods = ['rice', 'Meat', 'vegetables', 'Eggs'] print(foods) # Same as foods[len(foods):] = ['butter'] foods.append('butter') print(foods) # Same as foods[len(foods):] = ['tomatoes', 'chili sauce'] foods.extend(['tomatoes', 'Chili sauce']) print(foods) # Reverse order of elements in th...
25.524194
79
0.581043
0
0
0
0
0
0
0
0
919
0.290363
6513f213b7ae02509adbae8bebb7d8031a8a3323
110
py
Python
pond5/blueprints/webui/views.py
IvanFrezzaJr/pond5
02cc39262b33eac59727ee416645f7006a99b099
[ "MIT" ]
null
null
null
pond5/blueprints/webui/views.py
IvanFrezzaJr/pond5
02cc39262b33eac59727ee416645f7006a99b099
[ "MIT" ]
null
null
null
pond5/blueprints/webui/views.py
IvanFrezzaJr/pond5
02cc39262b33eac59727ee416645f7006a99b099
[ "MIT" ]
null
null
null
from flask import render_template def index(): return render_template("index.html", title='pond5 test')
18.333333
60
0.745455
0
0
0
0
0
0
0
0
24
0.218182
6514ff55c2d00ee1deed3eaa7d8b92b095c218ad
141
py
Python
featureflags/__init__.py
enverbisevac/ff-python-server-sdk
e7c809229d13517e0bf4b28fc0a556e693c9034e
[ "Apache-2.0" ]
null
null
null
featureflags/__init__.py
enverbisevac/ff-python-server-sdk
e7c809229d13517e0bf4b28fc0a556e693c9034e
[ "Apache-2.0" ]
null
null
null
featureflags/__init__.py
enverbisevac/ff-python-server-sdk
e7c809229d13517e0bf4b28fc0a556e693c9034e
[ "Apache-2.0" ]
null
null
null
"""Top-level package for Feature Flag Server SDK.""" __author__ = """Enver Bisevac""" __email__ = "[email protected]" __version__ = "0.1.0"
23.5
52
0.695035
0
0
0
0
0
0
0
0
97
0.687943
651500c04d2f53be7a66dad2701232feba9db8b0
4,919
py
Python
MachineLearning/potential_field.py
JhaAman/lihax
c0421f62d7b86908a7c74251c1dc35b1407c4568
[ "MIT" ]
null
null
null
MachineLearning/potential_field.py
JhaAman/lihax
c0421f62d7b86908a7c74251c1dc35b1407c4568
[ "MIT" ]
null
null
null
MachineLearning/potential_field.py
JhaAman/lihax
c0421f62d7b86908a7c74251c1dc35b1407c4568
[ "MIT" ]
null
null
null
#!/usr/bin/env python import math, socket, struct, numpy as np, sys # Get the gradient of the potential of an obstacle # particle at (ox, oy) with the origin at (mx, my) # Get the potential of an obstacle particle at (ox, oy) # with the origin at (mx, my) def potential(mx, my, ox, oy): 1.0 / ((mx - ox)**2 + (m...
42.042735
237
0.584468
4,537
0.922342
0
0
0
0
0
0
1,787
0.363285
6515124d4e3250bc474b369d4832ef055edc0d00
5,031
py
Python
decomp/c/gen.py
nihilus/epanos
998a9e3f45337df98b1bbc40b64954b079a1d4de
[ "MIT" ]
1
2017-07-25T00:05:09.000Z
2017-07-25T00:05:09.000Z
decomp/c/gen.py
nihilus/epanos
998a9e3f45337df98b1bbc40b64954b079a1d4de
[ "MIT" ]
null
null
null
decomp/c/gen.py
nihilus/epanos
998a9e3f45337df98b1bbc40b64954b079a1d4de
[ "MIT" ]
null
null
null
from itertools import imap, chain from pycparser import c_generator, c_ast from decomp import data, ida from decomp.c import decl as cdecl, types as ep_ct from decomp.cpu import ida as cpu_ida XXX_INTRO_HACK = cpu_ida.ida_current_cpu().insns.support_header + ''' #include <stdint.h> typedef union EPANOS_REG { uint8...
33.993243
135
0.624329
0
0
246
0.048897
0
0
0
0
1,531
0.304313
6515bd49015bb821ccbe010e9e5fbc460bed9de7
1,112
py
Python
ocelot/io/__init__.py
cmutel/Ocelot
20e9639570c43f84ae255750a6c402ebabe00981
[ "BSD-3-Clause" ]
21
2016-06-01T14:10:07.000Z
2022-02-28T01:56:31.000Z
ocelot/io/__init__.py
cmutel/Ocelot
20e9639570c43f84ae255750a6c402ebabe00981
[ "BSD-3-Clause" ]
152
2016-05-16T21:33:22.000Z
2019-06-24T12:57:14.000Z
ocelot/io/__init__.py
cmutel/Ocelot
20e9639570c43f84ae255750a6c402ebabe00981
[ "BSD-3-Clause" ]
12
2016-09-05T15:35:59.000Z
2021-07-03T19:28:47.000Z
# -*- coding: utf-8 -*- __all__ = ( "extract_directory", "cleanup_data_directory", "dataset_schema", "validate_directory", "validate_directory_against_xsd", ) from .extract_ecospold2 import extract_ecospold2_directory from ..filesystem import check_cache_directory, get_from_cache, cache_data import...
31.771429
82
0.75
0
0
0
0
0
0
0
0
327
0.294065
65164ebc73c88c773a56c1c8312715ea40cc9b6c
626
py
Python
Data-Structure/Basic-Struct/Stack-Queues/Evaluation-of-Expressions/Eval.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
1
2015-08-27T17:27:43.000Z
2015-08-27T17:27:43.000Z
Data-Structure/Basic-Struct/Stack-Queues/Evaluation-of-Expressions/Eval.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
null
null
null
Data-Structure/Basic-Struct/Stack-Queues/Evaluation-of-Expressions/Eval.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import stack import queue opset = {'*','+','(',")"} def readinfix(): fh = open("infix.txt") li = [] li += fh.read() print (li) return li def eval(): evlist = readinfix() postlist = [] st = stack.Stack() for op in evlist: if op in opset: s...
17.885714
41
0.469649
0
0
0
0
0
0
0
0
55
0.087859
65185342728b8ea46c26ce2b78a8072737b087c9
2,102
py
Python
example/py/CHSHInequality/chsh_inequality.py
samn33/qlazy
b215febfec0a3b8192e57a20ec85f14576745a89
[ "Apache-2.0" ]
15
2019-04-09T13:02:58.000Z
2022-01-13T12:57:08.000Z
example/py/CHSHInequality/chsh_inequality.py
samn33/qlazy
b215febfec0a3b8192e57a20ec85f14576745a89
[ "Apache-2.0" ]
3
2020-02-26T16:21:18.000Z
2022-03-31T00:46:53.000Z
example/py/CHSHInequality/chsh_inequality.py
samn33/qlazy
b215febfec0a3b8192e57a20ec85f14576745a89
[ "Apache-2.0" ]
3
2021-01-28T05:38:55.000Z
2021-10-30T12:19:19.000Z
import random from qlazy import QState def classical_strategy(trials=1000): win_cnt = 0 for _ in range(trials): # random bits by Charlie (x,y) x = random.randint(0,1) y = random.randint(0,1) # response by Alice (a) a = 0 # response by Bob (b) b = 0 ...
25.634146
77
0.450523
0
0
0
0
0
0
0
0
593
0.282112
65192f76bf69dd1b91580c7c3d8c5be7720e2e54
410
py
Python
peerplays/blockchainobject.py
farisshajahan/python-peerplays
260e43d39307554f5c35574fe7a6f5451a51697f
[ "MIT" ]
10
2019-03-14T03:09:42.000Z
2021-03-17T10:20:05.000Z
peerplays/blockchainobject.py
farisshajahan/python-peerplays
260e43d39307554f5c35574fe7a6f5451a51697f
[ "MIT" ]
8
2019-04-02T17:07:20.000Z
2020-04-30T08:24:01.000Z
peerplays/blockchainobject.py
farisshajahan/python-peerplays
260e43d39307554f5c35574fe7a6f5451a51697f
[ "MIT" ]
4
2019-04-02T17:00:22.000Z
2021-08-09T11:28:20.000Z
# -*- coding: utf-8 -*- from .instance import BlockchainInstance from graphenecommon.blockchainobject import ( BlockchainObject as GrapheneBlockchainObject, BlockchainObjects as GrapheneBlockchainObjects, ObjectCache, ) @BlockchainInstance.inject class BlockchainObject(GrapheneBlockchainObject): pass ...
22.777778
51
0.807317
118
0.287805
0
0
172
0.419512
0
0
23
0.056098
651a2825c2a207bb2573070d6b6a820935667fe9
102
py
Python
Code/Python/LeetCode/tempCodeRunnerFile.py
dks1018/CoffeeShopCoding
13ac1700673c86c601eb2758570920620a956e4c
[ "ADSL" ]
null
null
null
Code/Python/LeetCode/tempCodeRunnerFile.py
dks1018/CoffeeShopCoding
13ac1700673c86c601eb2758570920620a956e4c
[ "ADSL" ]
null
null
null
Code/Python/LeetCode/tempCodeRunnerFile.py
dks1018/CoffeeShopCoding
13ac1700673c86c601eb2758570920620a956e4c
[ "ADSL" ]
null
null
null
arr_1 = ["1","2","3","4","5","6","7"] arr_2 = [] for n in arr_1: arr_2.insert(0,n) print(arr_2)
12.75
37
0.5
0
0
0
0
0
0
0
0
21
0.205882
651ec842e96c1b1f0d0e9ffe6067c0199b8a1424
124
py
Python
pyvat/utils.py
ponyville/pyvat
75fb781d3c00cf323544eb929a96344c1978e2c8
[ "Apache-2.0" ]
48
2015-07-22T12:02:20.000Z
2022-02-07T16:54:13.000Z
pyvat/utils.py
ponyville/pyvat
75fb781d3c00cf323544eb929a96344c1978e2c8
[ "Apache-2.0" ]
34
2015-03-27T17:47:38.000Z
2022-02-08T18:14:55.000Z
pyvat/utils.py
ponyville/pyvat
75fb781d3c00cf323544eb929a96344c1978e2c8
[ "Apache-2.0" ]
40
2015-04-08T14:03:06.000Z
2022-02-09T12:29:04.000Z
from decimal import Decimal def ensure_decimal(value): return value if isinstance(value, Decimal) else Decimal(value)
20.666667
66
0.782258
0
0
0
0
0
0
0
0
0
0
651f360c505b719ccafc01d1fe50f1f24c9b71d7
117
py
Python
pype/modules/idle_manager/__init__.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/modules/idle_manager/__init__.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/modules/idle_manager/__init__.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
from .idle_module import ( IdleManager, IIdleManager ) __all__ = ( "IdleManager", "IIdleManager" )
10.636364
26
0.632479
0
0
0
0
0
0
0
0
27
0.230769
652012211d75f39757469a76ffbd1e2d590d912a
289
py
Python
server/src/tests/samples/typeConstraint3.py
higoshi/pyright
183c0ef56d2c010d28018149949cda1a40aa59b8
[ "MIT" ]
null
null
null
server/src/tests/samples/typeConstraint3.py
higoshi/pyright
183c0ef56d2c010d28018149949cda1a40aa59b8
[ "MIT" ]
null
null
null
server/src/tests/samples/typeConstraint3.py
higoshi/pyright
183c0ef56d2c010d28018149949cda1a40aa59b8
[ "MIT" ]
null
null
null
# This sample exercises the type analyzer's assert type constraint logic. from typing import Union def foo(a: Union[str, int]) -> int: if True: # This should generate an error because # a could be a str. return a assert isinstance(a, int) return a
19.266667
73
0.643599
0
0
0
0
0
0
0
0
131
0.453287
65204673556284e6d6670bed61daa5eb343644d4
2,764
py
Python
Attention.py
Pok0923/Time-series-forecasting-model
58c0b1fd151b7fa73be323e8e1a6072876f06d10
[ "MIT" ]
null
null
null
Attention.py
Pok0923/Time-series-forecasting-model
58c0b1fd151b7fa73be323e8e1a6072876f06d10
[ "MIT" ]
null
null
null
Attention.py
Pok0923/Time-series-forecasting-model
58c0b1fd151b7fa73be323e8e1a6072876f06d10
[ "MIT" ]
null
null
null
import tensorflow as tf from tensorflow import keras from tensorflow.keras import backend as K from keras.models import Sequential,Model from keras.layers import * from keras.optimizers import SGD,Adam class OurLayer(Layer): def reuse(self, layer, *args, **kwargs): if not layer.built: if len(a...
36.368421
71
0.608538
2,153
0.778944
0
0
0
0
0
0
78
0.02822
6523b70720c5c976b6f562eb7fe63867146d03b1
774
py
Python
tests/remix/test_audio_chunk_merger.py
nroldanf/infiniteremixer
5ffc2fc85e9cbebf6196d5baa374ba4630f2e3c0
[ "MIT" ]
null
null
null
tests/remix/test_audio_chunk_merger.py
nroldanf/infiniteremixer
5ffc2fc85e9cbebf6196d5baa374ba4630f2e3c0
[ "MIT" ]
null
null
null
tests/remix/test_audio_chunk_merger.py
nroldanf/infiniteremixer
5ffc2fc85e9cbebf6196d5baa374ba4630f2e3c0
[ "MIT" ]
null
null
null
import numpy as np import pytest from infiniteremixer.remix.audiochunkmerger import AudioChunkMerger @pytest.fixture def chunk_manager(): return AudioChunkMerger() def test_chunk_manager_is_instantiated(chunk_manager): assert isinstance(chunk_manager, AudioChunkMerger) def test_audio_chunks_are_concatena...
27.642857
85
0.744186
0
0
0
0
66
0.085271
0
0
144
0.186047
6524869e78875d68bc7830017790dd24a2253209
738
py
Python
app/libpinanny/__init__.py
MelonSmasher/piNanny
2bc3a7b5eda83615e21518a2f36c3844b241d201
[ "MIT" ]
null
null
null
app/libpinanny/__init__.py
MelonSmasher/piNanny
2bc3a7b5eda83615e21518a2f36c3844b241d201
[ "MIT" ]
2
2021-03-10T05:28:36.000Z
2021-09-02T05:40:44.000Z
app/libpinanny/__init__.py
MelonSmasher/piNanny
2bc3a7b5eda83615e21518a2f36c3844b241d201
[ "MIT" ]
null
null
null
from subprocess import PIPE, Popen # Converts celsius temps to fahrenheit def c2f(celsius): return (9.0 / 5) * celsius + 32 # Gets the CPU temperature in degrees C def get_cpu_temperature(): process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE) output, _error = process.communicate() return floa...
25.448276
62
0.609756
0
0
0
0
0
0
0
0
179
0.242547
6525a7237e80a2dde7d058af9b7795a2a3cd2f21
4,247
py
Python
paas-ce/paas/paas/esb/apps/guide/component_template/en/hcp/get_host_list.py
renmcc/bk-PaaS
1c9e4e9cfb40fc3375cd6b5f08af8c84203de246
[ "Apache-2.0" ]
2
2019-09-22T13:54:53.000Z
2021-07-29T02:31:40.000Z
paas-ce/paas/paas/esb/apps/guide/component_template/en/hcp/get_host_list.py
renmcc/bk-PaaS
1c9e4e9cfb40fc3375cd6b5f08af8c84203de246
[ "Apache-2.0" ]
10
2021-02-08T20:32:31.000Z
2022-03-11T23:47:06.000Z
paas-ce/paas/paas/esb/apps/guide/component_template/en/hcp/get_host_list.py
renmcc/bk-PaaS
1c9e4e9cfb40fc3375cd6b5f08af8c84203de246
[ "Apache-2.0" ]
3
2019-08-22T09:05:31.000Z
2021-03-23T14:21:19.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
30.120567
305
0.536379
3,334
0.781712
0
0
0
0
0
0
2,831
0.663775
6525b9fa24410fbd6e88a3ac0d7c4387bef24c34
1,354
py
Python
pretix_googlepaypasses/views.py
pc-coholic/pretix-googlepaypasses
1591ebf2b53294989ffca6ffcb185842196e034d
[ "Apache-2.0" ]
2
2018-11-02T11:32:21.000Z
2018-12-07T07:18:06.000Z
pretix_googlepaypasses/views.py
pc-coholic/pretix-googlepaypasses
1591ebf2b53294989ffca6ffcb185842196e034d
[ "Apache-2.0" ]
5
2018-10-30T19:49:56.000Z
2018-11-26T21:11:42.000Z
pretix_googlepaypasses/views.py
pc-coholic/pretix-googlepaypasses
1591ebf2b53294989ffca6ffcb185842196e034d
[ "Apache-2.0" ]
null
null
null
import json import logging from json import JSONDecodeError from django.http import ( HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, ) from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from pretix.base.models import Organizer from . import tas...
31.488372
117
0.716396
0
0
0
0
990
0.731167
0
0
329
0.242984
652624be473f589627bafdda2fb46234674c0cff
12,300
py
Python
alf/utils/checkpoint_utils.py
breakds/alf
b3d60048daee2c9625ba44f778e49570d0d029a7
[ "Apache-2.0" ]
1
2021-11-17T17:08:04.000Z
2021-11-17T17:08:04.000Z
alf/utils/checkpoint_utils.py
ipsec/alf
15fd71896eac5ad0987dbe14a9f630b32e0e131f
[ "Apache-2.0" ]
null
null
null
alf/utils/checkpoint_utils.py
ipsec/alf
15fd71896eac5ad0987dbe14a9f630b32e0e131f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 Horizon Robotics and ALF Contributors. 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...
39.805825
89
0.579106
10,794
0.877561
0
0
6,553
0.532764
0
0
5,216
0.424065
6526bd14e91e02ab2897caf04024aa618b204008
956
py
Python
automon/integrations/slack/config.py
TheShellLand/automonisaur
b5f304a44449b8664c93d8a8a3c3cf2d73aa0ce9
[ "MIT" ]
2
2021-09-15T18:35:44.000Z
2022-01-18T05:36:54.000Z
automon/integrations/slack/config.py
TheShellLand/automonisaur
b5f304a44449b8664c93d8a8a3c3cf2d73aa0ce9
[ "MIT" ]
16
2021-08-29T22:51:53.000Z
2022-03-09T16:08:19.000Z
automon/integrations/slack/config.py
TheShellLand/automonisaur
b5f304a44449b8664c93d8a8a3c3cf2d73aa0ce9
[ "MIT" ]
null
null
null
import os from automon.log import Logging log = Logging(name=__name__, level=Logging.ERROR) class ConfigSlack: slack_name = os.getenv('SLACK_USER') or '' slack_webhook = os.getenv('SLACK_WEBHOOK') or '' slack_proxy = os.getenv('SLACK_PROXY') or '' slack_token = os.getenv('SLACK_TOKEN') or '' SL...
35.407407
70
0.707113
859
0.898536
0
0
0
0
0
0
262
0.274059
652a2bec3a1bbb15dcd3f0465f2e3a5760856d24
182
py
Python
z2z_metadata/__init__.py
Mitchellpkt/z2z-metadata
261a694225efc21d65a9f3be69a9017bbc29864e
[ "MIT" ]
null
null
null
z2z_metadata/__init__.py
Mitchellpkt/z2z-metadata
261a694225efc21d65a9f3be69a9017bbc29864e
[ "MIT" ]
null
null
null
z2z_metadata/__init__.py
Mitchellpkt/z2z-metadata
261a694225efc21d65a9f3be69a9017bbc29864e
[ "MIT" ]
null
null
null
"""Top-level package for z2z Metadata analysis.""" __author__ = """Isthmus // Mitchell P. Krawiec-Thayer""" __email__ = '[email protected]' __version__ = '0.0.1'
30.333333
56
0.730769
0
0
0
0
0
0
0
0
138
0.758242
652bea27b54e41523374e9b0f3eb5a5744c81344
81
py
Python
pyeparse/tests/__init__.py
Eric89GXL/pyeparse
c1907c39276aacb0fad80034d69b537b07f82786
[ "BSD-3-Clause" ]
null
null
null
pyeparse/tests/__init__.py
Eric89GXL/pyeparse
c1907c39276aacb0fad80034d69b537b07f82786
[ "BSD-3-Clause" ]
null
null
null
pyeparse/tests/__init__.py
Eric89GXL/pyeparse
c1907c39276aacb0fad80034d69b537b07f82786
[ "BSD-3-Clause" ]
null
null
null
# Authors: Denis Engemann <[email protected]> # # License: BSD (3-clause)
20.25
52
0.716049
0
0
0
0
0
0
0
0
78
0.962963
652cc48a5f826ddc6ae73b306f5bcedc4dba7eb7
1,659
py
Python
Murphi/ModularMurphi/TemplateClass.py
icsa-caps/HieraGen
4026c1718878d2ef69dd13d3e6e10cab69174fda
[ "MIT" ]
6
2020-07-07T15:45:13.000Z
2021-08-29T06:44:29.000Z
Murphi/ModularMurphi/TemplateClass.py
icsa-caps/HieraGen
4026c1718878d2ef69dd13d3e6e10cab69174fda
[ "MIT" ]
null
null
null
Murphi/ModularMurphi/TemplateClass.py
icsa-caps/HieraGen
4026c1718878d2ef69dd13d3e6e10cab69174fda
[ "MIT" ]
null
null
null
import inspect import os import re class TemplateHandler: # Constant definitions tab = " " nl = "\n" sem = ";" end = sem + nl def __init__(self, template_dir: str): self.templatepath = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + \ ...
29.105263
120
0.485835
1,621
0.977095
0
0
270
0.162749
0
0
320
0.192887
652d0559a2243d1e92871449e1c32a5d4ef6cbbb
8,660
py
Python
bot/exts/filters/token_remover.py
adhikariprajitraj/bot
207eb16e7be7a339bb3e670ffd74283e755a73a7
[ "MIT" ]
null
null
null
bot/exts/filters/token_remover.py
adhikariprajitraj/bot
207eb16e7be7a339bb3e670ffd74283e755a73a7
[ "MIT" ]
null
null
null
bot/exts/filters/token_remover.py
adhikariprajitraj/bot
207eb16e7be7a339bb3e670ffd74283e755a73a7
[ "MIT" ]
null
null
null
import base64 import binascii import logging import re import typing as t from discord import Colour, Message, NotFound from discord.ext.commands import Cog from bot import utils from bot.bot import Bot from bot.constants import Channels, Colours, Event, Icons from bot.exts.moderation.modlog import ModLog from bot.ut...
37.008547
105
0.639145
6,878
0.794226
0
0
5,373
0.620439
1,940
0.224018
3,699
0.427136