hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71d1b1bc09a0b50245f87e83c6dbaa93b21299d
55,644
py
Python
Lib/idlelib/idle_test/test_configdialog.py
emsoftware/cpython
457ce60fc70f1c9290023f46fb82b6a490dff32e
[ "0BSD" ]
null
null
null
Lib/idlelib/idle_test/test_configdialog.py
emsoftware/cpython
457ce60fc70f1c9290023f46fb82b6a490dff32e
[ "0BSD" ]
5
2021-07-01T03:02:20.000Z
2022-03-01T03:03:48.000Z
Lib/idlelib/idle_test/test_configdialog.py
emsoftware/cpython
457ce60fc70f1c9290023f46fb82b6a490dff32e
[ "0BSD" ]
null
null
null
"""Test configdialog, coverage 94%. Half the class creates dialog, half works with user customizations. """ from idlelib import configdialog from test.support import requires requires('gui') import unittest from unittest import mock from idlelib.idle_test.mock_idle import Func from tkinter import (Tk, StringVar, IntVa...
34.79925
89
0.603875
from idlelib import configdialog from test.support import requires requires('gui') import unittest from unittest import mock from idlelib.idle_test.mock_idle import Func from tkinter import (Tk, StringVar, IntVar, BooleanVar, DISABLED, NORMAL) from idlelib import config from idlelib.configdialog import idleConf, change...
true
true
f71d1c9e00baedf4bf218ec2f5eaa682d4f57d68
1,911
py
Python
python_exercises/question_directory/boolean_review.py
nchristie/slide-python-intro
dd52781b5d25435f97aa83cfff58c175fa7fdd1c
[ "MIT" ]
1
2018-06-07T12:40:37.000Z
2018-06-07T12:40:37.000Z
python_exercises/question_directory/boolean_review.py
nchristie/slide-python-intro
dd52781b5d25435f97aa83cfff58c175fa7fdd1c
[ "MIT" ]
3
2018-06-07T14:39:19.000Z
2019-01-15T16:35:23.000Z
python_exercises/question_directory/boolean_review.py
nchristie/slide-python-intro
dd52781b5d25435f97aa83cfff58c175fa7fdd1c
[ "MIT" ]
9
2018-05-30T17:12:27.000Z
2021-07-01T03:22:48.000Z
# TASKS is a list of lists. Each sublist follows this structure: # [ # <string of background information to print>, # <string of question text>, # <list of answer keywords>, # <dictionary of prerequisite conditions> # ] """ empty object for copy-paste: [ "", # background info "", # question [], # l...
36.75
122
0.628467
BLURB = "" TASKS = [ [ "", "Write a statement to check if two numbers are equal to each other?\n\n", ["=="], {}, ], [ "\nwifi_available = False\nmobile_data_available = False", "What would the output of this statement be?\nwifi_available and...
true
true
f71d1cfa1a83dbc18a3f108e583046a55bb6b7ca
3,066
py
Python
modules/fsl_semi_query.py
haoxingchen/SSFormers
1cfa5c01428b8aac43219e7926989f8e9a4d817b
[ "MIT" ]
17
2021-09-28T04:25:36.000Z
2022-03-28T01:48:11.000Z
modules/fsl_semi_query.py
liyaohui347/SSFormers
3c2ea14db6a453d3345e03a790dd452af5fde8d8
[ "MIT" ]
2
2022-02-26T11:25:16.000Z
2022-03-28T13:28:41.000Z
modules/fsl_semi_query.py
liyaohui347/SSFormers
3c2ea14db6a453d3345e03a790dd452af5fde8d8
[ "MIT" ]
6
2021-09-28T13:44:57.000Z
2022-03-14T05:00:19.000Z
import torch import torch.nn as nn import torch.nn.functional as F from .encoder import make_encoder from .semi_query import make_query class FSLSemiQuery(nn.Module): def __init__(self, cfg): super().__init__() self.encoder = make_encoder(cfg) self.query = make_query(self.encoder.out_cha...
36.939759
93
0.62394
import torch import torch.nn as nn import torch.nn.functional as F from .encoder import make_encoder from .semi_query import make_query class FSLSemiQuery(nn.Module): def __init__(self, cfg): super().__init__() self.encoder = make_encoder(cfg) self.query = make_query(self.encoder.out_cha...
true
true
f71d1d40e8de3947b43250071b4e25714e0ff638
23,138
py
Python
hw2/train_pg.py
wryoung412/CS294_Deep_RL_fall2017
077167de524157cc5f85f40232e5bcf6933ab2f5
[ "MIT" ]
null
null
null
hw2/train_pg.py
wryoung412/CS294_Deep_RL_fall2017
077167de524157cc5f85f40232e5bcf6933ab2f5
[ "MIT" ]
null
null
null
hw2/train_pg.py
wryoung412/CS294_Deep_RL_fall2017
077167de524157cc5f85f40232e5bcf6933ab2f5
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import gym import logz import scipy.signal import os import time import inspect from multiprocessing import Process #============================================================================================# # Utilities #====================================================...
40.952212
116
0.500864
import numpy as np import tensorflow as tf import gym import logz import scipy.signal import os import time import inspect from multiprocessing import Process def build_mlp( input_placeholder, output_size, scope, n_layers=2, size=64, activation=tf.tanh, out...
true
true
f71d1d6431cd9864c8ac945c489e1505fd9daf69
3,271
py
Python
how_to_play.py
MuhammadTalha28/sapace-invader
dbc7eb28d48491c78d2b732a29c313ad7a1de228
[ "Unlicense" ]
null
null
null
how_to_play.py
MuhammadTalha28/sapace-invader
dbc7eb28d48491c78d2b732a29c313ad7a1de228
[ "Unlicense" ]
null
null
null
how_to_play.py
MuhammadTalha28/sapace-invader
dbc7eb28d48491c78d2b732a29c313ad7a1de228
[ "Unlicense" ]
null
null
null
import pygame from Buttons import Button import os import menu pygame.font.init() pygame.mixer.init() pygame.init() # constants FONT = pygame.font.SysFont('comicsans', 30) SEC_FONT = pygame.font.SysFont('comicsans', 22) TEXT_COLOR = (255, 255, 255) WIDTH, HEIGHT = 600, 750 WIN = pygame.display.set_m...
34.431579
208
0.602262
import pygame from Buttons import Button import os import menu pygame.font.init() pygame.mixer.init() pygame.init() FONT = pygame.font.SysFont('comicsans', 30) SEC_FONT = pygame.font.SysFont('comicsans', 22) TEXT_COLOR = (255, 255, 255) WIDTH, HEIGHT = 600, 750 WIN = pygame.display.set_mode((WIDTH, ...
true
true
f71d1e6ab9665ef77195b8e703b3c0c7acfd60f4
9,851
py
Python
runner_mockingjay.py
andi611/Mockingjay-Speech-Representation
8f41f5728bdb94497e939fee0d67c7f65729a035
[ "MIT" ]
105
2019-10-24T05:28:57.000Z
2022-02-21T23:08:07.000Z
runner_mockingjay.py
samirsahoo007/Audio-and-Speech-Processing
e77df17a7f63a983c3757140c7a1e8c199cac614
[ "MIT" ]
9
2020-02-17T06:39:53.000Z
2022-03-14T08:46:35.000Z
runner_mockingjay.py
samirsahoo007/Audio-and-Speech-Processing
e77df17a7f63a983c3757140c7a1e8c199cac614
[ "MIT" ]
19
2019-10-29T11:40:34.000Z
2021-11-24T16:36:04.000Z
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ runner_mockingjay.py ] # Synopsis [ runner for the mockingjay model ] # Author [ Andy T. Liu (Andi611) ] # Copyright [ Copyleft(c), Speech Lab, NTU, Taiwan ...
45.396313
189
0.650391
-ckpt', default='mockingjay_libri_sd1337_LinearLarge/mockingjay-500000.ckpt', type=str, help='path to mockingjay model checkpoint.', required=False) parser.add_argument('--dckpt', default='baseline_sentiment_libri_sd1337/baseline_sentiment-500000.ckpt', type=str, help='path to downstream checkpoint.', re...
true
true
f71d1e917a53f537d6a94b2b2ce9a5baf836f8aa
540
py
Python
1.py
deepaksood619/python-challenge
8ee08136b827e75571307fa36cd65e7ba6a162de
[ "MIT" ]
2
2021-04-25T08:04:46.000Z
2022-02-05T17:02:24.000Z
1.py
deepaksood619/python-challenge
8ee08136b827e75571307fa36cd65e7ba6a162de
[ "MIT" ]
null
null
null
1.py
deepaksood619/python-challenge
8ee08136b827e75571307fa36cd65e7ba6a162de
[ "MIT" ]
null
null
null
# Question - http://www.pythonchallenge.com/pc/def/map.html # Thought Process - # Its a caesar's cipher with ROT2 as the image shows the # alphabet shifting # ROT2 Shift answer - i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so l...
41.538462
225
0.744444
# alphabet shifting # ROT2 Shift answer - i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.
true
true
f71d1fa896751ba8c82289f0ddabde96392c403d
817
py
Python
data/train/python/f71d1fa896751ba8c82289f0ddabde96392c403dmain.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/train/python/f71d1fa896751ba8c82289f0ddabde96392c403dmain.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/train/python/f71d1fa896751ba8c82289f0ddabde96392c403dmain.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
#!/usr/bin/python # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 import os import sys if __name__ == '__main__': sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../utils')) import websocket def main(): gameId = 'abc123' controllerId = '90210' displayWS = websocket.WebSocket() ...
25.53125
89
0.682987
import os import sys if __name__ == '__main__': sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../utils')) import websocket def main(): gameId = 'abc123' controllerId = '90210' displayWS = websocket.WebSocket() displayWS.connect("ws://127.0.0.1:8887/%s/display" % gameId) cont...
false
true
f71d1fd277bd074b8e2770f851db3f9f3f26dc60
6,560
py
Python
api/app/helpers/cluster_task.py
riszkymf/RESTKnot
2788e0cce127e6d66fdb72e81b31a983e89979d2
[ "MIT" ]
null
null
null
api/app/helpers/cluster_task.py
riszkymf/RESTKnot
2788e0cce127e6d66fdb72e81b31a983e89979d2
[ "MIT" ]
null
null
null
api/app/helpers/cluster_task.py
riszkymf/RESTKnot
2788e0cce127e6d66fdb72e81b31a983e89979d2
[ "MIT" ]
null
null
null
from app import celery from celery.result import AsyncResult from app.libs import utils from app.helpers import command from app.models import model from app.helpers import cluster_master, cluster_slave from app import cs_storage @celery.task(bind=True) def get_cluster_data_master(self, id_master): res_master = A...
37.919075
98
0.647713
from app import celery from celery.result import AsyncResult from app.libs import utils from app.helpers import command from app.models import model from app.helpers import cluster_master, cluster_slave from app import cs_storage @celery.task(bind=True) def get_cluster_data_master(self, id_master): res_master = A...
true
true
f71d2199e355f7f3ca1e600d31a19dd65f515834
16,247
py
Python
lemur/certificates/models.py
peschmae/lemur
c10f4b64835ac6d6fe75306ecb36be793ccb7288
[ "Apache-2.0" ]
null
null
null
lemur/certificates/models.py
peschmae/lemur
c10f4b64835ac6d6fe75306ecb36be793ccb7288
[ "Apache-2.0" ]
2
2021-02-10T02:29:45.000Z
2021-04-30T21:40:40.000Z
lemur/certificates/models.py
peschmae/lemur
c10f4b64835ac6d6fe75306ecb36be793ccb7288
[ "Apache-2.0" ]
null
null
null
""" .. module: lemur.certificates.models :platform: Unix :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <kglisson@netflix.com> """ from datetime import timedelta import arrow from cryptography import x509 from flask...
31.982283
104
0.636794
from datetime import timedelta import arrow from cryptography import x509 from flask import current_app from idna.core import InvalidCodepoint from sqlalchemy import ( event, Integer, ForeignKey, String, PassiveDefault, func, Column, Text, Boolean, Index, ) from sqlalchemy.ext.h...
true
true
f71d21a276159adb2c085859eba9608d1e5a5fba
9,792
py
Python
intersight/model/niatelemetry_bootflash_details_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/niatelemetry_bootflash_details_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/niatelemetry_bootflash_details_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
51
1,678
0.635621
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) class...
true
true
f71d21c4b3c202177b850cb894bc74b88806a333
987
py
Python
kubernetes/test/test_v1_secret_key_selector.py
dix000p/kubernetes-client-python
22e473e02883aca1058606092c86311f02f42be2
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_secret_key_selector.py
dix000p/kubernetes-client-python
22e473e02883aca1058606092c86311f02f42be2
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_secret_key_selector.py
dix000p/kubernetes-client-python
22e473e02883aca1058606092c86311f02f42be2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
21.933333
105
0.716312
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_secret_key_selector import V1SecretKeySelector class TestV1SecretKeySelector(unittest.TestCase): def setUp(self): pas...
true
true
f71d21d543fb1b6678cb67ac7df8c90a77d990dc
27,520
py
Python
tests/test_game.py
NWalker4483/MSUreconchess
a95659b7fbf71ac3ea01d19c7ec9f3ed63922c86
[ "BSD-3-Clause" ]
null
null
null
tests/test_game.py
NWalker4483/MSUreconchess
a95659b7fbf71ac3ea01d19c7ec9f3ed63922c86
[ "BSD-3-Clause" ]
null
null
null
tests/test_game.py
NWalker4483/MSUreconchess
a95659b7fbf71ac3ea01d19c7ec9f3ed63922c86
[ "BSD-3-Clause" ]
null
null
null
import unittest from reconchess import LocalGame, WinReason from chess import * import time import random SENSE_BY_SQUARE = { A8: [A8, B8, A7, B7], B8: [A8, B8, C8, A7, B7, C7], C8: [B8, C8, D8, B7, C7, D7], D8: [C8, D8, E8, C7, D7, E7], E8: [D8, E8, F8, D7, E7, F7], F8: [E8, F8, G8, E7, F7, G7...
33.643032
90
0.496475
import unittest from reconchess import LocalGame, WinReason from chess import * import time import random SENSE_BY_SQUARE = { A8: [A8, B8, A7, B7], B8: [A8, B8, C8, A7, B7, C7], C8: [B8, C8, D8, B7, C7, D7], D8: [C8, D8, E8, C7, D7, E7], E8: [D8, E8, F8, D7, E7, F7], F8: [E8, F8, G8, E7, F7, G7...
true
true
f71d23144531baf87db8dd62c8a45eb53a5ae369
235
py
Python
Lection 5. Euler and Hamiltonian cycles/_gens/ansgen.py
gennadiychistyakov/graphs-theory-materials
191db41634d2bb9a0661963d489a34ba731506f1
[ "MIT" ]
null
null
null
Lection 5. Euler and Hamiltonian cycles/_gens/ansgen.py
gennadiychistyakov/graphs-theory-materials
191db41634d2bb9a0661963d489a34ba731506f1
[ "MIT" ]
null
null
null
Lection 5. Euler and Hamiltonian cycles/_gens/ansgen.py
gennadiychistyakov/graphs-theory-materials
191db41634d2bb9a0661963d489a34ba731506f1
[ "MIT" ]
null
null
null
import os os.system("javac Solver.java") for root, dirs, files in os.walk(".", topdown = False): for f in files: if ".in" in f: os.system("java Solver < " + f + " > " + f[:-3] + ".out") os.system("del Solver.class")
23.5
62
0.557447
import os os.system("javac Solver.java") for root, dirs, files in os.walk(".", topdown = False): for f in files: if ".in" in f: os.system("java Solver < " + f + " > " + f[:-3] + ".out") os.system("del Solver.class")
true
true
f71d24c470dc97f742367ab0a893121056ed787b
62,191
py
Python
python/pyspark/sql.py
shlomitub28/spark
d3a3840e077802647aced1ceace1494605dda1db
[ "Apache-2.0" ]
1
2021-05-19T17:59:20.000Z
2021-05-19T17:59:20.000Z
python/pyspark/sql.py
shlomitub28/spark
d3a3840e077802647aced1ceace1494605dda1db
[ "Apache-2.0" ]
null
null
null
python/pyspark/sql.py
shlomitub28/spark
d3a3840e077802647aced1ceace1494605dda1db
[ "Apache-2.0" ]
null
null
null
# # 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 us...
34.531371
100
0.60282
import sys import types import itertools import warnings import decimal import datetime import keyword import warnings from array import array from operator import itemgetter from pyspark.rdd import RDD from pyspark.serializers import BatchedSerializer, PickleSerializer, CloudPickleSerializer from py...
false
true
f71d24e917d59197e54b40a06a24d91d6d9bc161
5,788
py
Python
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py
aiven/azure-sdk-for-python
8764dc07423beca46ed0b51212d81289d9e52c60
[ "MIT" ]
1
2021-09-07T18:43:20.000Z
2021-09-07T18:43:20.000Z
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py
aiven/azure-sdk-for-python
8764dc07423beca46ed0b51212d81289d9e52c60
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py
msyyc/azure-sdk-for-python
e2dba75181f8b4336ae57e75aa391322c12c3123
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.834711
172
0.72944
from typing import TYPE_CHECKING from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: from typing import Any, Optional from azure.core.credentials import TokenCredential from ._configuration import NetAppManagementClientConfiguration from ....
true
true
f71d255737c2f1063170be076348fe7c0e4e203c
456
py
Python
fairseq/fairseq/__init__.py
skeshaw/LoReNMT
32ffd83f38258dfffd324f811695a44ad33954f5
[ "Apache-2.0" ]
null
null
null
fairseq/fairseq/__init__.py
skeshaw/LoReNMT
32ffd83f38258dfffd324f811695a44ad33954f5
[ "Apache-2.0" ]
null
null
null
fairseq/fairseq/__init__.py
skeshaw/LoReNMT
32ffd83f38258dfffd324f811695a44ad33954f5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. __all__ = ['pdb'] __version__ = '0.8.0' import fairseq.criterions # noqa import fairseq.models # noqa import fairseq.modules # n...
28.5
66
0.723684
__all__ = ['pdb'] __version__ = '0.8.0' import fairseq.criterions import fairseq.models import fairseq.modules import fairseq.optim import fairseq.optim.lr_scheduler import fairseq.pdb import fairseq.tasks
true
true
f71d2594ab3dd2aaf502d1ae2653ba26eaa14a87
2,011
py
Python
tests/pytests/materials/obsolete/TestGenMaxwellPlaneStrain.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
93
2015-01-08T16:41:22.000Z
2022-02-25T13:40:02.000Z
tests/pytests/materials/obsolete/TestGenMaxwellPlaneStrain.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
277
2015-02-20T16:27:35.000Z
2022-03-30T21:13:09.000Z
tests/pytests/materials/obsolete/TestGenMaxwellPlaneStrain.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
71
2015-03-24T12:11:08.000Z
2022-03-03T04:26:02.000Z
#!/usr/bin/env python # # ====================================================================== # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University of Chicago # # This code was developed as part of the Computational Infrastructure # for Geodynamics (http://ge...
22.098901
72
0.624068
llPlaneStrain(unittest.TestCase): def setUp(self): self.material = GenMaxwellPlaneStrain() return def test_constructor(self): self.assertEqual(2, self.material.dimension()) return def test_useElasticBehavior(self): self.material.useElasticBehavior(False) return ...
true
true
f71d25c8f6cc9cafcc01ba2df3d5a02e16aa646a
8,510
py
Python
models/wideresnet.py
creaiter/Classification-PyTorch
2feabf4b3d0d561420399bdf65840a58af76069d
[ "MIT" ]
1
2021-04-02T05:13:58.000Z
2021-04-02T05:13:58.000Z
models/wideresnet.py
creaiter/Classification-PyTorch
2feabf4b3d0d561420399bdf65840a58af76069d
[ "MIT" ]
null
null
null
models/wideresnet.py
creaiter/Classification-PyTorch
2feabf4b3d0d561420399bdf65840a58af76069d
[ "MIT" ]
null
null
null
import math import torch import torch.nn as nn import torch.nn.init as init import torch.nn.functional as F from torch.nn.parameter import Parameter def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, st...
34.176707
106
0.593302
import math import torch import torch.nn as nn import torch.nn.init as init import torch.nn.functional as F from torch.nn.parameter import Parameter def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, paddi...
true
true
f71d262f290551102b4dc1338a796fd3573855c9
1,069
py
Python
scripts/hf_per_train_shard_tokenize.py
myutman/contracode
f2a589e1efd2788874fd0468d1ecc30d6a14c396
[ "Apache-2.0" ]
115
2020-07-10T02:01:34.000Z
2022-03-27T06:21:43.000Z
scripts/hf_per_train_shard_tokenize.py
myutman/contracode
f2a589e1efd2788874fd0468d1ecc30d6a14c396
[ "Apache-2.0" ]
7
2020-08-05T00:25:17.000Z
2021-12-26T17:06:31.000Z
scripts/hf_per_train_shard_tokenize.py
myutman/contracode
f2a589e1efd2788874fd0468d1ecc30d6a14c396
[ "Apache-2.0" ]
21
2020-07-14T11:31:47.000Z
2022-03-25T06:10:18.000Z
import sys import numpy as np import pandas as pd import multiprocessing as mp from transformers import BertTokenizerFast from tqdm import tqdm if __name__ == "__main__": assert len(sys.argv) == 2 data_shard_idx = int(sys.argv[1]) data_shard_path = f"/data/ajay/contracode/data/hf_data/train_chunks/augmente...
36.862069
137
0.74275
import sys import numpy as np import pandas as pd import multiprocessing as mp from transformers import BertTokenizerFast from tqdm import tqdm if __name__ == "__main__": assert len(sys.argv) == 2 data_shard_idx = int(sys.argv[1]) data_shard_path = f"/data/ajay/contracode/data/hf_data/train_chunks/augmente...
true
true
f71d2652af9afa17cad4beb33592ed002af1f665
4,040
py
Python
alipay/aop/api/request/AlipayCommerceEducateCampusBiztaskFinishRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayCommerceEducateCampusBiztaskFinishRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayCommerceEducateCampusBiztaskFinishRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayCommerceEducateCampusBiztaskFinishModel import AlipayCommerceEducateCampusBiztaskFinishModel class AlipayCommerceEducateCampus...
27.862069
148
0.650495
import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayCommerceEducateCampusBiztaskFinishModel import AlipayCommerceEducateCampusBiztaskFinishModel class AlipayCommerceEducateCampusBiztaskFinishRequest(object): def __ini...
true
true
f71d265a9ef6949d78624bff82593373435b72c8
135
py
Python
lang/python/test_sound.py
df3n5/cog
da76d2350f96d77aad7d431837302f004603c35f
[ "MIT" ]
null
null
null
lang/python/test_sound.py
df3n5/cog
da76d2350f96d77aad7d431837302f004603c35f
[ "MIT" ]
null
null
null
lang/python/test_sound.py
df3n5/cog
da76d2350f96d77aad7d431837302f004603c35f
[ "MIT" ]
null
null
null
import cog cog.init() snd = cog.snd_add("media/testsnd.wav") cog.snd_play(snd) while not cog.hasquit(): cog.loopstep() cog.quit()
15
38
0.696296
import cog cog.init() snd = cog.snd_add("media/testsnd.wav") cog.snd_play(snd) while not cog.hasquit(): cog.loopstep() cog.quit()
true
true
f71d26f35e9c16f18e4f8f8585d88d4ae52e4b6f
114
py
Python
runworker.py
CodeForAfrica/geomancer
cfddbb451d2fdea75a15ceca09e7f5ec70fc853f
[ "MIT" ]
45
2015-01-14T01:14:10.000Z
2021-05-20T00:20:44.000Z
runworker.py
CodeForAfrica/geomancer
cfddbb451d2fdea75a15ceca09e7f5ec70fc853f
[ "MIT" ]
38
2015-01-09T16:58:46.000Z
2016-07-15T18:50:09.000Z
runworker.py
CodeForAfrica/geomancer
cfddbb451d2fdea75a15ceca09e7f5ec70fc853f
[ "MIT" ]
6
2015-01-28T05:39:30.000Z
2018-04-05T16:44:27.000Z
from geomancer.worker import queue_daemon from geomancer import create_app app = create_app() queue_daemon(app)
16.285714
41
0.824561
from geomancer.worker import queue_daemon from geomancer import create_app app = create_app() queue_daemon(app)
true
true
f71d27fd646465b648a230e84292740cfbceac9f
2,987
py
Python
craid/eddb/system/System.py
HausReport/ClubRaiders
88bd64d2512302ca2b391b48979b6e88b092eb92
[ "BSD-3-Clause" ]
null
null
null
craid/eddb/system/System.py
HausReport/ClubRaiders
88bd64d2512302ca2b391b48979b6e88b092eb92
[ "BSD-3-Clause" ]
2
2020-05-28T13:30:08.000Z
2020-06-02T14:12:04.000Z
craid/eddb/system/System.py
HausReport/ClubRaiders
88bd64d2512302ca2b391b48979b6e88b092eb92
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Club Raiders Project # https://github.com/HausReport/ClubRaiders # # SPDX-License-Identifier: BSD-3-Clause # # SPDX-License-Identifier: BSD-3-Clause import math from datetime import datetime, timedelta from craid.eddb.base.Aware import Aware class System(Aware): def __init__(self, j...
29.87
93
0.627051
import math from datetime import datetime, timedelta from craid.eddb.base.Aware import Aware class System(Aware): def __init__(self, jsonLine): super().__init__(jsonLine['name'], jsonLine['id']) self.x: float = float(jsonLine['x']) self.y: float = float(jsonLine['y']) self....
true
true
f71d2a4a74c4053610f3decc8970971a3192cc9f
11,567
py
Python
neutron/db/dns_db.py
MultipleCrashes/neutron
fb268d7e91b22192a6e42f78b0057b4ebd3033ef
[ "Apache-2.0" ]
1
2019-06-02T06:15:39.000Z
2019-06-02T06:15:39.000Z
neutron/db/dns_db.py
MultipleCrashes/neutron
fb268d7e91b22192a6e42f78b0057b4ebd3033ef
[ "Apache-2.0" ]
null
null
null
neutron/db/dns_db.py
MultipleCrashes/neutron
fb268d7e91b22192a6e42f78b0057b4ebd3033ef
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 IBM # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
46.083665
79
0.610876
from neutron_lib.api import validators from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_log import log as logging from neutron._i18n import _, _LE from neutron.common import utils from neutron.db import _resource_extend as resource_extend from neutron.extensions import d...
true
true
f71d2b0293d434fafa7ef64fc32c22429de5476f
4,759
py
Python
mars/tensor/fft/irfft.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
2,413
2018-12-06T09:37:11.000Z
2022-03-30T15:47:39.000Z
mars/tensor/fft/irfft.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
1,335
2018-12-07T03:06:18.000Z
2022-03-31T11:45:57.000Z
mars/tensor/fft/irfft.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
329
2018-12-07T03:12:41.000Z
2022-03-29T21:49:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2021 Alibaba Group Holding Ltd. # # 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-...
38.379032
79
0.664425
import numpy as np from ... import opcodes as OperandDef from ..datasource import tensor as astensor from .core import TensorFFTMixin, validate_fft, TensorRealFFT class TensorIRFFT(TensorRealFFT, TensorFFTMixin): _op_type_ = OperandDef.IRFFT def __init__(self, n=None, axis=-1, norm=None, **k...
true
true
f71d2bdb30bfd7496e7f2d476ade9dc68afbafb0
15,382
py
Python
heat/engine/rsrc_defn.py
hongbin/heat
1a8495eaa728d36ccff4b0285befb5a02e31b3de
[ "Apache-2.0" ]
null
null
null
heat/engine/rsrc_defn.py
hongbin/heat
1a8495eaa728d36ccff4b0285befb5a02e31b3de
[ "Apache-2.0" ]
null
null
null
heat/engine/rsrc_defn.py
hongbin/heat
1a8495eaa728d36ccff4b0285befb5a02e31b3de
[ "Apache-2.0" ]
null
null
null
# 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 # d...
39.040609
79
0.614484
import collections import copy import itertools import operator import six from heat.common import exception from heat.common.i18n import repr_wrapper from heat.engine import function from heat.engine import properties __all__ = ['ResourceDefinition'] @repr_wrapper class ResourceDefinition(object): ...
true
true
f71d2e5f7da8bfc1c7ac7dd7bd610f39b702b7fb
717
py
Python
examples/resize.py
penguinflys/imgviz
3deadced1fcce8ca51716c705d07a058b1839514
[ "MIT" ]
171
2018-12-28T23:40:01.000Z
2022-03-29T14:55:27.000Z
examples/resize.py
penguinflys/imgviz
3deadced1fcce8ca51716c705d07a058b1839514
[ "MIT" ]
16
2018-12-29T16:21:15.000Z
2022-03-09T15:36:06.000Z
examples/resize.py
penguinflys/imgviz
3deadced1fcce8ca51716c705d07a058b1839514
[ "MIT" ]
23
2018-12-29T13:11:18.000Z
2022-02-06T15:18:42.000Z
#!/usr/bin/env python import matplotlib.pyplot as plt import imgviz def resize(): data = imgviz.data.arc2017() rgb = data["rgb"] H, W = rgb.shape[:2] rgb_resized = imgviz.resize(rgb, height=0.1) # ------------------------------------------------------------------------- plt.figure(dpi=20...
17.925
79
0.562064
import matplotlib.pyplot as plt import imgviz def resize(): data = imgviz.data.arc2017() rgb = data["rgb"] H, W = rgb.shape[:2] rgb_resized = imgviz.resize(rgb, height=0.1) plt.figure(dpi=200) plt.subplot(121) plt.title("rgb:\n{}".format(rgb.shape)) plt.imshow(rgb) plt...
true
true
f71d2ecf99d8f24a2d9f3cb1384127d27bf34e53
9,072
py
Python
src/neuralnetsim/simulation.py
Nathaniel-Rodriguez/neuralnetsim
c353af92fb3f44539370220963b07bdfd9822149
[ "MIT" ]
null
null
null
src/neuralnetsim/simulation.py
Nathaniel-Rodriguez/neuralnetsim
c353af92fb3f44539370220963b07bdfd9822149
[ "MIT" ]
null
null
null
src/neuralnetsim/simulation.py
Nathaniel-Rodriguez/neuralnetsim
c353af92fb3f44539370220963b07bdfd9822149
[ "MIT" ]
null
null
null
__all__ = ["simulate_model", "simulate_grid", "simulate_orig"] import neuralnetsim import networkx as nx import numpy as np from distributed import Client from pathlib import Path from typing import Type from typing import Dict from typing import Any from typing import List from typing import Un...
28.8
79
0.584215
__all__ = ["simulate_model", "simulate_grid", "simulate_orig"] import neuralnetsim import networkx as nx import numpy as np from distributed import Client from pathlib import Path from typing import Type from typing import Dict from typing import Any from typing import List from typing import Un...
true
true
f71d2f0b2b074ee07a851d169f53038091cd1476
874
py
Python
npapibench/pyimpl.py
phetdam/numpy-api-bench
f80b104c464111a5678d7a657128cbff0497830c
[ "MIT" ]
1
2020-09-01T07:35:29.000Z
2020-09-01T07:35:29.000Z
npapibench/pyimpl.py
phetdam/numpy-api-bench
f80b104c464111a5678d7a657128cbff0497830c
[ "MIT" ]
null
null
null
npapibench/pyimpl.py
phetdam/numpy-api-bench
f80b104c464111a5678d7a657128cbff0497830c
[ "MIT" ]
null
null
null
"""Python implementation of zero mean unit variance scaling function. .. codeauthor:: Derek Huang <djh458@stern.nyu.edu> """ def stdscale(ar, ddof=0): """Center and scale numpy.ndarray to zero mean, unit variance. Treats the array like a single flattened array and computes the mean and standard deviatio...
32.37037
78
0.672769
def stdscale(ar, ddof=0): return (ar - ar.mean()) / ar.std(ddof=ddof)
true
true
f71d2fed645a3de12724dfe4fb7acd0036387d89
1,599
py
Python
Engine/Render/rpplugins/skin_shading/plugin.py
kergalym/Korlan
cc3141969d21898842a008b49f8b42492d2cf6e4
[ "MIT" ]
3
2019-09-17T15:26:42.000Z
2021-12-09T00:42:32.000Z
Engine/Render/rpplugins/skin_shading/plugin.py
kergalym/Korlan
cc3141969d21898842a008b49f8b42492d2cf6e4
[ "MIT" ]
null
null
null
Engine/Render/rpplugins/skin_shading/plugin.py
kergalym/Korlan
cc3141969d21898842a008b49f8b42492d2cf6e4
[ "MIT" ]
1
2019-09-17T13:21:31.000Z
2019-09-17T13:21:31.000Z
""" RenderPipeline Copyright (c) 2014-2016 tobspr <tobias.springer1@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 to use...
38.071429
84
0.773609
from Engine.Render.rpcore.pluginbase.base_plugin import BasePlugin from .skin_shading_stage import SkinShadingStage class Plugin(BasePlugin): name = "Skin Shading" author = "tobspr <tobias.springer1@gmail.com>" description = ("This plugin adds support for Seperable Screen Space Subsurface " ...
true
true
f71d3001f6f3b426e0db1fb36733beaceff3b849
9,171
py
Python
python/paddle/nn/functional/input.py
ZibinGuo/Paddle
6e0892312de5e4ba76d980ff0e4322ac55ca0d07
[ "Apache-2.0" ]
1
2022-02-22T01:08:00.000Z
2022-02-22T01:08:00.000Z
python/paddle/nn/functional/input.py
ZibinGuo/Paddle
6e0892312de5e4ba76d980ff0e4322ac55ca0d07
[ "Apache-2.0" ]
null
null
null
python/paddle/nn/functional/input.py
ZibinGuo/Paddle
6e0892312de5e4ba76d980ff0e4322ac55ca0d07
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle 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 appli...
40.223684
150
0.574856
from __future__ import print_function import warnings from ...fluid.framework import in_dygraph_mode from ...static import Variable from ...fluid.layer_helper import LayerHelper from ...fluid.layers import core from ...fluid.data_feeder import check_variable_and_dtype, check_dtype from paddle import _C_op...
true
true
f71d3032e42d801860be4840ffd19a2487705594
17,260
py
Python
test/functional/vuicash_condensing_txs.py
vuicash/qtum
fbc207749ed96e64073b96bd8768356e6b16ecf6
[ "MIT" ]
null
null
null
test/functional/vuicash_condensing_txs.py
vuicash/qtum
fbc207749ed96e64073b96bd8768356e6b16ecf6
[ "MIT" ]
null
null
null
test/functional/vuicash_condensing_txs.py
vuicash/qtum
fbc207749ed96e64073b96bd8768356e6b16ecf6
[ "MIT" ]
1
2022-01-10T00:08:47.000Z
2022-01-10T00:08:47.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from tes...
76.711111
2,543
0.773638
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.mininode import * from test_framework.vuicash import * from test_framework.vuicashconfig import * import sys class CondensingTxsTest(BitcoinTestFramework): ...
true
true
f71d31625c79c1f1f9b8be2745043bae002d419e
5,644
py
Python
meraki/controllers/api_usage_controller.py
bossypants22/python-sdk-test
37701d62dc18c2abb910eb790ab978913adcaf7b
[ "MIT" ]
null
null
null
meraki/controllers/api_usage_controller.py
bossypants22/python-sdk-test
37701d62dc18c2abb910eb790ab978913adcaf7b
[ "MIT" ]
null
null
null
meraki/controllers/api_usage_controller.py
bossypants22/python-sdk-test
37701d62dc18c2abb910eb790ab978913adcaf7b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ meraki This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ). """ from meraki.api_helper import APIHelper from meraki.configuration import Configuration from meraki.controllers.base_controller import BaseController from meraki.http.au...
47.428571
95
0.567151
from meraki.api_helper import APIHelper from meraki.configuration import Configuration from meraki.controllers.base_controller import BaseController from meraki.http.auth.custom_header_auth import CustomHeaderAuth class APIUsageController(BaseController): def get_organization_api_requests(self, ...
true
true
f71d335d4ca28e93dc90aa99a20721087bcac69b
3,087
py
Python
koans/about_strings.py
revarcline/python_koans
e52f58d9e0e568f4e8f7ebc79a3046cb60424eca
[ "MIT" ]
null
null
null
koans/about_strings.py
revarcline/python_koans
e52f58d9e0e568f4e8f7ebc79a3046cb60424eca
[ "MIT" ]
null
null
null
koans/about_strings.py
revarcline/python_koans
e52f58d9e0e568f4e8f7ebc79a3046cb60424eca
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import Koan class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): stri...
32.15625
85
0.652089
from runner.koan import Koan class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): string = 'Goodbye, world.' self.assertEq...
true
true
f71d341f596966bbfcf7f5bdd48c9933e254bf52
455
py
Python
data/scripts/templates/object/static/structure/naboo/shared_arbor_corner_90_s01.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/static/structure/naboo/shared_arbor_corner_90_s01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/static/structure/naboo/shared_arbor_corner_90_s01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/structure/naboo/shared_arbor_corner_90_s01.iff" result.attribute_templa...
26.764706
81
0.72967
true
true
f71d35595a558e94e5fbc76d649418de62050aaf
1,221
py
Python
pattern_recognition/code/DataSplit.py
geneti/courseworkproj
5843cc14c2ce01172420befca5d2683f1123096a
[ "MIT" ]
null
null
null
pattern_recognition/code/DataSplit.py
geneti/courseworkproj
5843cc14c2ce01172420befca5d2683f1123096a
[ "MIT" ]
null
null
null
pattern_recognition/code/DataSplit.py
geneti/courseworkproj
5843cc14c2ce01172420befca5d2683f1123096a
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import math import matplotlib.pyplot as plt import copy raw_data = pd.read_csv('./raw_data.csv', header = 0, index_col = 0) sample_num = raw_data.shape[0] # sort features by nominal or non-nominal dtypes = {} for j in range(raw_data.shape[1]): if isinstance(raw_data.iloc[0,...
27.133333
89
0.658477
import pandas as pd import numpy as np import math import matplotlib.pyplot as plt import copy raw_data = pd.read_csv('./raw_data.csv', header = 0, index_col = 0) sample_num = raw_data.shape[0] dtypes = {} for j in range(raw_data.shape[1]): if isinstance(raw_data.iloc[0,j], str) or pd.isna(raw_data.iloc[0,j]): ...
true
true
f71d36032e8429f6c06ef136c6f50460f7f5346e
5,787
py
Python
neutron/agent/rpc.py
sajuptpm/notification_neutron
45933f63c9eff0d2931a7209b040ff2dc69835c5
[ "Apache-2.0" ]
5
2015-10-20T07:56:53.000Z
2017-12-31T22:39:15.000Z
neutron/agent/rpc.py
sajuptpm/notification_neutron
45933f63c9eff0d2931a7209b040ff2dc69835c5
[ "Apache-2.0" ]
null
null
null
neutron/agent/rpc.py
sajuptpm/notification_neutron
45933f63c9eff0d2931a7209b040ff2dc69835c5
[ "Apache-2.0" ]
3
2015-05-08T22:36:28.000Z
2015-10-24T21:25:35.000Z
# Copyright (c) 2012 OpenStack Foundation. # 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...
41.042553
79
0.650423
import itertools from oslo_log import log as logging import oslo_messaging from oslo_utils import timeutils from neutron.common import constants from neutron.common import rpc as n_rpc from neutron.common import topics from neutron.i18n import _LW LOG = logging.getLogger(__name__) def create_consum...
true
true
f71d36615b51bcdf98a5e783025c508c8e09cf93
2,236
py
Python
tests/vsc_pf.py
pydgrid/pydgrid
c56073c385f42883c79333533f7cfb8383a173aa
[ "MIT" ]
15
2019-01-29T08:22:39.000Z
2022-01-13T20:41:32.000Z
tests/vsc_pf.py
pydgrid/pydgrid
c56073c385f42883c79333533f7cfb8383a173aa
[ "MIT" ]
1
2017-11-28T21:34:52.000Z
2017-11-28T21:34:52.000Z
tests/vsc_pf.py
pydgrid/pydgrid
c56073c385f42883c79333533f7cfb8383a173aa
[ "MIT" ]
4
2018-02-15T02:12:47.000Z
2020-02-16T17:52:15.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Sep 9 23:22:02 2017 @author: jmmauricio """ from pydgrid import grid from pydgrid.pydgrid import phasor2time, pq from pydgrid.pf import pf_eval,time_serie from pydgrid.electric import bess_vsc, bess_vsc_eval from pydgrid.simu import simu, f_eval, ini_...
33.373134
84
0.529964
from pydgrid import grid from pydgrid.pydgrid import phasor2time, pq from pydgrid.pf import pf_eval,time_serie from pydgrid.electric import bess_vsc, bess_vsc_eval from pydgrid.simu import simu, f_eval, ini_eval, run_eval import matplotlib.pyplot as plt import numpy as np import time data = { "lines":[ {"...
true
true
f71d381fdb5477319a7c92dead591d224115b4b8
1,121
py
Python
sms/forms.py
Ahmed-Dauda/codethinkers-test
0cf6edbaf6156e975cd1cda3bd2c97aae3afc69f
[ "MIT" ]
null
null
null
sms/forms.py
Ahmed-Dauda/codethinkers-test
0cf6edbaf6156e975cd1cda3bd2c97aae3afc69f
[ "MIT" ]
null
null
null
sms/forms.py
Ahmed-Dauda/codethinkers-test
0cf6edbaf6156e975cd1cda3bd2c97aae3afc69f
[ "MIT" ]
null
null
null
from django.contrib.auth.forms import UserCreationForm # from django.contrib.auth.models import User from django import forms from django.db import models from django.forms import ModelForm from django import forms from django.db import models from sms.models import Comment from users.models import NewUser, BaseUserM...
24.369565
54
0.597681
from django.contrib.auth.forms import UserCreationForm from django import forms from django.db import models from django.forms import ModelForm from django import forms from django.db import models from sms.models import Comment from users.models import NewUser, BaseUserManager mspostform(ModelForm): class Me...
true
true
f71d389398f75d2633d84bc4386f3422cfcf5dd6
3,515
py
Python
rl/policy.py
GyroscopeHQ/keras-rl
35f9b50c3b35f52722d740e8ee42e33c1750e44a
[ "MIT" ]
26
2018-12-30T20:32:45.000Z
2022-03-15T06:11:40.000Z
rl/policy.py
GyroscopeHQ/keras-rl
35f9b50c3b35f52722d740e8ee42e33c1750e44a
[ "MIT" ]
20
2018-08-29T10:34:48.000Z
2022-03-11T23:16:24.000Z
rl/policy.py
GyroscopeHQ/keras-rl
35f9b50c3b35f52722d740e8ee42e33c1750e44a
[ "MIT" ]
13
2019-05-11T01:59:58.000Z
2022-03-15T14:12:40.000Z
from __future__ import division import numpy as np from rl.util import * class Policy(object): def _set_agent(self, agent): self.agent = agent @property def metrics_names(self): return [] @property def metrics(self): return [] def select_action(self, **kwargs): ...
28.811475
87
0.621906
from __future__ import division import numpy as np from rl.util import * class Policy(object): def _set_agent(self, agent): self.agent = agent @property def metrics_names(self): return [] @property def metrics(self): return [] def select_action(self, **kwargs): ...
true
true
f71d39022e614e248d8c9266081b47d24579b813
9,709
py
Python
tests/unit/bokeh/model/test_model.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
tests/unit/bokeh/model/test_model.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
tests/unit/bokeh/model/test_model.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
35.434307
89
0.523638
from __future__ import annotations import pytest ; pytest from bokeh.core.properties import Int, List, String from bokeh.models import * from bokeh.models import CustomJS from bokeh.plotting import * from bokeh.document import document from bokeh.model import Model class SomeModel(Mo...
true
true
f71d39a91275757173fe4357be8edb16867f5575
3,663
py
Python
src/opnsense/scripts/systemhealth/activity.py
nowstuseeit/core
522c21e780342567c41fe262a99d73f4c0c37c2c
[ "BSD-2-Clause" ]
2
2021-02-09T13:05:49.000Z
2021-02-28T16:56:36.000Z
src/opnsense/scripts/systemhealth/activity.py
nowstuseeit/core
522c21e780342567c41fe262a99d73f4c0c37c2c
[ "BSD-2-Clause" ]
null
null
null
src/opnsense/scripts/systemhealth/activity.py
nowstuseeit/core
522c21e780342567c41fe262a99d73f4c0c37c2c
[ "BSD-2-Clause" ]
1
2020-12-31T18:57:24.000Z
2020-12-31T18:57:24.000Z
#!/usr/local/bin/python3 """ Copyright (c) 2015-2019 Ad Schellevis <ad@opnsense.org> 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 th...
41.625
111
0.613432
import collections import tempfile import subprocess import os import sys import ujson if __name__ == '__main__': fieldnames = None field_max_width = dict() result = {'headers': [], 'details': []} sp = subprocess.run(['/usr/bin/top','-aHSn','999999'], capture_output=True, text=True) is_header = T...
true
true
f71d3adca28b056b99bf96ade7d5794bf109d89e
975
py
Python
compss/programming_model/bindings/python/src/pycompss/runtime/mpi/keys.py
alexbarcelo/compss
d619faa70ac5a933543c6f8ef65e8acd18ae37a0
[ "Apache-2.0" ]
31
2018-03-06T09:30:03.000Z
2022-03-23T09:51:05.000Z
compss/programming_model/bindings/python/src/pycompss/runtime/mpi/keys.py
alexbarcelo/compss
d619faa70ac5a933543c6f8ef65e8acd18ae37a0
[ "Apache-2.0" ]
3
2020-08-28T17:16:50.000Z
2021-11-11T21:58:02.000Z
compss/programming_model/bindings/python/src/pycompss/runtime/mpi/keys.py
alexbarcelo/compss
d619faa70ac5a933543c6f8ef65e8acd18ae37a0
[ "Apache-2.0" ]
15
2018-06-07T10:03:27.000Z
2022-02-23T14:59:42.000Z
#!/usr/bin/python # # Copyright 2002-2021 Barcelona Supercomputing Center (www.bsc.es) # # 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 ...
28.676471
75
0.691282
class MPILayoutKeys(object): block_count = 'block_count' block_length = 'block_length' stride = 'stride'
true
true
f71d3b5df39acb05289fd0a6e4d5d0cce131b026
4,394
py
Python
algomorphism/datasets/graph_base.py
efthymis-mcl/algomorphism
69a41e98e10458ac333da1350fc39da8a00b80d3
[ "MIT" ]
null
null
null
algomorphism/datasets/graph_base.py
efthymis-mcl/algomorphism
69a41e98e10458ac333da1350fc39da8a00b80d3
[ "MIT" ]
null
null
null
algomorphism/datasets/graph_base.py
efthymis-mcl/algomorphism
69a41e98e10458ac333da1350fc39da8a00b80d3
[ "MIT" ]
null
null
null
from typing import List import numpy as np class GraphBaseDataset(object): def __int__(self): pass @staticmethod def numpy_to_mega_batch(x_list, a_list): """ List of numpy arrays to mega batch array. Args: x_list (`list[np.ndarray]`): feature matrixes. ...
34.328125
106
0.533227
from typing import List import numpy as np class GraphBaseDataset(object): def __int__(self): pass @staticmethod def numpy_to_mega_batch(x_list, a_list): def a_post_concat(a): a_con = np.concatenate([a, np.zeros((a.shape[0], max_d - a.shape[1]))], axis=1) a_con = ...
true
true
f71d3b6de6e139e51d7cb437f408413aac4abb5d
2,912
py
Python
reader/gitlab.py
goncalovalverde/seshat
deff5cdd985f81ac2b4ebd077eea11f7c4f4118f
[ "MIT" ]
1
2020-12-22T13:23:00.000Z
2020-12-22T13:23:00.000Z
reader/gitlab.py
goncalovalverde/seshat
deff5cdd985f81ac2b4ebd077eea11f7c4f4118f
[ "MIT" ]
5
2020-12-22T13:36:30.000Z
2021-02-27T05:42:18.000Z
reader/gitlab.py
goncalovalverde/seshat
deff5cdd985f81ac2b4ebd077eea11f7c4f4118f
[ "MIT" ]
null
null
null
import gitlab import dateutil.parser import reader.cache import hashlib import logging from pandas import DataFrame, NaT from datetime import datetime class Gitlab: def __init__(self, gitlab_config: dict, workflow: dict): self.gitlab_config = gitlab_config self.workflow = workflow def cac...
30.978723
88
0.587569
import gitlab import dateutil.parser import reader.cache import hashlib import logging from pandas import DataFrame, NaT from datetime import datetime class Gitlab: def __init__(self, gitlab_config: dict, workflow: dict): self.gitlab_config = gitlab_config self.workflow = workflow def cac...
true
true
f71d3c1b03ec24f2d9be14a9d7866efa08692cd5
1,886
py
Python
mmtfPyspark/tests/filters/test_containsDSaccharideChain.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
59
2018-01-28T06:50:56.000Z
2022-02-10T06:07:12.000Z
mmtfPyspark/tests/filters/test_containsDSaccharideChain.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
101
2018-02-01T20:51:10.000Z
2022-01-24T00:50:29.000Z
mmtfPyspark/tests/filters/test_containsDSaccharideChain.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
29
2018-01-29T10:09:51.000Z
2022-01-23T18:53:28.000Z
#!/usr/bin/env python import unittest from pyspark.sql import SparkSession from mmtfPyspark.io.mmtfReader import download_mmtf_files from mmtfPyspark.filters import ContainsDSaccharideChain from mmtfPyspark.mappers import * class ContainsDSaccharideChainTest(unittest.TestCase): def setUp(self): self.spa...
34.925926
88
0.647932
import unittest from pyspark.sql import SparkSession from mmtfPyspark.io.mmtfReader import download_mmtf_files from mmtfPyspark.filters import ContainsDSaccharideChain from mmtfPyspark.mappers import * class ContainsDSaccharideChainTest(unittest.TestCase): def setUp(self): self.spark = SparkSession.bui...
true
true
f71d3c203b2c6f45e6c4757bcfb5b8c221278039
3,273
py
Python
server/server.py
ma-he-sh/MovieMetaPredict
800ac82542a9cdf027f827fad135b052d01e83ba
[ "MIT" ]
null
null
null
server/server.py
ma-he-sh/MovieMetaPredict
800ac82542a9cdf027f827fad135b052d01e83ba
[ "MIT" ]
null
null
null
server/server.py
ma-he-sh/MovieMetaPredict
800ac82542a9cdf027f827fad135b052d01e83ba
[ "MIT" ]
null
null
null
from flask import Flask, render_template from flask_json import FlaskJSON, JsonError, json_response, as_json from flask_cors import CORS import os import sys from modules.db import DB from modules.redis import REDIS from config import APP_CONFIG dbconn = DB() dbconn.create_table() redisConn = REDIS() app = Flask(__...
30.027523
103
0.499542
from flask import Flask, render_template from flask_json import FlaskJSON, JsonError, json_response, as_json from flask_cors import CORS import os import sys from modules.db import DB from modules.redis import REDIS from config import APP_CONFIG dbconn = DB() dbconn.create_table() redisConn = REDIS() app = Flask(__...
true
true
f71d3c6ceffdf1df60e58be8ba03d0a46747639d
17,549
py
Python
pdfplumber/utils.py
guo1017138/pdfplumber
42564e074ed6ae738333fbbd046f43238faece12
[ "MIT" ]
1
2021-08-03T16:36:36.000Z
2021-08-03T16:36:36.000Z
pdfplumber/utils.py
guo1017138/pdfplumber
42564e074ed6ae738333fbbd046f43238faece12
[ "MIT" ]
null
null
null
pdfplumber/utils.py
guo1017138/pdfplumber
42564e074ed6ae738333fbbd046f43238faece12
[ "MIT" ]
null
null
null
from pdfminer.utils import PDFDocEncoding from pdfminer.psparser import PSLiteral from pdfminer.pdftypes import PDFObjRef from decimal import Decimal, ROUND_HALF_UP import numbers from operator import itemgetter import itertools from functools import lru_cache as cache DEFAULT_X_TOLERANCE = 3 DEFAULT_Y_TOLERANCE = 3 ...
28.674837
88
0.587669
from pdfminer.utils import PDFDocEncoding from pdfminer.psparser import PSLiteral from pdfminer.pdftypes import PDFObjRef from decimal import Decimal, ROUND_HALF_UP import numbers from operator import itemgetter import itertools from functools import lru_cache as cache DEFAULT_X_TOLERANCE = 3 DEFAULT_Y_TOLERANCE = 3 ...
true
true
f71d3cc15d33fdc97cccb70b2307f687317cb7a6
11,427
py
Python
main.py
ahkarimi/MMTOD
d8160f643a0ee1943630b45fa094617dd2237c7e
[ "MIT" ]
null
null
null
main.py
ahkarimi/MMTOD
d8160f643a0ee1943630b45fa094617dd2237c7e
[ "MIT" ]
null
null
null
main.py
ahkarimi/MMTOD
d8160f643a0ee1943630b45fa094617dd2237c7e
[ "MIT" ]
null
null
null
from flask import Flask, request, jsonify, render_template, session import os import pickle import datetime import time import pandas as pd import numpy as np import random import logging ##__________________________________ GPT-3 code __________________________________________## from colorama import Fore, Back, Styl...
28.929114
117
0.608734
from flask import Flask, request, jsonify, render_template, session import os import pickle import datetime import time import pandas as pd import numpy as np import random import logging T2LMHeadModel, OpenAIGPTLMHeadModel, OpenAIGPTTokenizer import sys, os import pprint import numpy as np import torch from image_han...
true
true
f71d3cdd4e0a67724f010c5aed3dd6ac0db2e50a
1,812
py
Python
tests/test_rules_sqs_policy_public.py
ocrawford555/cfripper
93b039293ea76fcb28d32b497fb0507042557b5b
[ "Apache-2.0" ]
null
null
null
tests/test_rules_sqs_policy_public.py
ocrawford555/cfripper
93b039293ea76fcb28d32b497fb0507042557b5b
[ "Apache-2.0" ]
null
null
null
tests/test_rules_sqs_policy_public.py
ocrawford555/cfripper
93b039293ea76fcb28d32b497fb0507042557b5b
[ "Apache-2.0" ]
null
null
null
""" Copyright 2018 Skyscanner Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
38.553191
109
0.75
import pytest import os import pycfmodel from cfripper.rules.SQSQueuePolicyPublicRule import SQSQueuePolicyPublicRule from cfripper.s3_adapter import S3Adapter from cfripper.model.result import Result class TestSQSQueuePolicyPublicRule: @pytest.fixture(scope="class") def template(self): dir_path =...
true
true
f71d3dbe0d00b7ccbb10b00fcb79eb056d1a9840
762
py
Python
ProjectEulerPython/problems/problem_021.py
geo-desic/project-euler
8065ee082a6948447ef961c9aa960c90a815a3ab
[ "MIT" ]
null
null
null
ProjectEulerPython/problems/problem_021.py
geo-desic/project-euler
8065ee082a6948447ef961c9aa960c90a815a3ab
[ "MIT" ]
null
null
null
ProjectEulerPython/problems/problem_021.py
geo-desic/project-euler
8065ee082a6948447ef961c9aa960c90a815a3ab
[ "MIT" ]
null
null
null
import math_helpers from problems.problem import Problem class Problem021(Problem): def __init__(self): super().__init__() self._cache = {} def calculate_answer(self) -> int: answer = 0 n = 10000 primes = math_helpers.primes_below(n) for i in range(2, n): sum_1 = self.sum_proper_di...
24.580645
76
0.641732
import math_helpers from problems.problem import Problem class Problem021(Problem): def __init__(self): super().__init__() self._cache = {} def calculate_answer(self) -> int: answer = 0 n = 10000 primes = math_helpers.primes_below(n) for i in range(2, n): sum_1 = self.sum_proper_di...
true
true
f71d3e61c2e89c13b3a370bc25b2b344042de73e
2,278
py
Python
ptsites/sites/abtorrents.py
kbnq/flexget_qbittorrent_mod
e52d9726b80aab94cf3d9ee6c382b6721b757d3b
[ "MIT" ]
null
null
null
ptsites/sites/abtorrents.py
kbnq/flexget_qbittorrent_mod
e52d9726b80aab94cf3d9ee6c382b6721b757d3b
[ "MIT" ]
null
null
null
ptsites/sites/abtorrents.py
kbnq/flexget_qbittorrent_mod
e52d9726b80aab94cf3d9ee6c382b6721b757d3b
[ "MIT" ]
null
null
null
import ast import hashlib from urllib.parse import urljoin from ..schema.site_base import Work, SignState, NetworkState from ..schema.xbt import XBT class MainClass(XBT): URL = 'https://abtorrents.me/' USER_CLASSES = { 'uploaded': [536870912000], 'share_ratio': [1.5], 'days': [90], ...
35.59375
118
0.533802
import ast import hashlib from urllib.parse import urljoin from ..schema.site_base import Work, SignState, NetworkState from ..schema.xbt import XBT class MainClass(XBT): URL = 'https://abtorrents.me/' USER_CLASSES = { 'uploaded': [536870912000], 'share_ratio': [1.5], 'days': [90], ...
true
true
f71d3e9c75c3721c2fe3bf9687f4cf71a6d3d676
559
py
Python
packs/vdx/actions/interface_set_ip.py
userlocalhost2000/st2contrib
1a5f759e76401743ed9023d298a3d767e3885db1
[ "Apache-2.0" ]
164
2015-01-17T16:08:33.000Z
2021-08-03T02:34:07.000Z
packs/vdx/actions/interface_set_ip.py
userlocalhost2000/st2contrib
1a5f759e76401743ed9023d298a3d767e3885db1
[ "Apache-2.0" ]
442
2015-01-01T11:19:01.000Z
2017-09-06T23:26:17.000Z
packs/vdx/actions/interface_set_ip.py
userlocalhost2000/st2contrib
1a5f759e76401743ed9023d298a3d767e3885db1
[ "Apache-2.0" ]
202
2015-01-13T00:37:40.000Z
2020-11-07T11:30:10.000Z
from pynos import device from st2actions.runners.pythonrunner import Action class interface_set_ip(Action): def run(self, **kwargs): conn = (str(kwargs.pop('ip')), str(kwargs.pop('port'))) auth = (str(kwargs.pop('username')), str(kwargs.pop('password'))) test = kwargs.pop('test', False) ...
31.055556
73
0.59034
from pynos import device from st2actions.runners.pythonrunner import Action class interface_set_ip(Action): def run(self, **kwargs): conn = (str(kwargs.pop('ip')), str(kwargs.pop('port'))) auth = (str(kwargs.pop('username')), str(kwargs.pop('password'))) test = kwargs.pop('test', False) ...
true
true
f71d3f2d291d9fcbb9b50687282f5924ef62d1c9
4,685
py
Python
vice/version.py
rcooke-ast/VICE
762911eb4192c7206ce2ae36b645d120ed889cb7
[ "MIT" ]
22
2018-09-26T21:02:51.000Z
2022-03-24T18:07:03.000Z
vice/version.py
rcooke-ast/VICE
762911eb4192c7206ce2ae36b645d120ed889cb7
[ "MIT" ]
2
2019-05-03T13:08:27.000Z
2021-02-17T20:11:37.000Z
vice/version.py
rcooke-ast/VICE
762911eb4192c7206ce2ae36b645d120ed889cb7
[ "MIT" ]
3
2019-05-10T19:26:31.000Z
2021-11-10T08:13:42.000Z
r""" This file implements the version_info class. """ from __future__ import absolute_import from . import version_breakdown import sys if sys.version_info[:3] < tuple( [int(_) for _ in version_breakdown.MIN_PYTHON_VERSION.split('.')]): raise RuntimeError("""This version of VICE requires python >= %s. \ Current vers...
24.657895
76
0.682177
from __future__ import absolute_import from . import version_breakdown import sys if sys.version_info[:3] < tuple( [int(_) for _ in version_breakdown.MIN_PYTHON_VERSION.split('.')]): raise RuntimeError("""This version of VICE requires python >= %s. \ Current version: %d.%d.%d""" % (version_breakdown.MIN_PYTHON_VERSI...
true
true
f71d3f2ea6d57155cccf341e8d69f798c14957e6
6,459
py
Python
ding/entry/serial_entry_reward_model.py
konnase/DI-engine
f803499cad191e9277b10e194132d74757bcfc8e
[ "Apache-2.0" ]
null
null
null
ding/entry/serial_entry_reward_model.py
konnase/DI-engine
f803499cad191e9277b10e194132d74757bcfc8e
[ "Apache-2.0" ]
null
null
null
ding/entry/serial_entry_reward_model.py
konnase/DI-engine
f803499cad191e9277b10e194132d74757bcfc8e
[ "Apache-2.0" ]
null
null
null
from typing import Union, Optional, List, Any, Tuple import os import torch import logging from functools import partial from tensorboardX import SummaryWriter from ding.envs import get_vec_env_setting, create_env_manager from ding.worker import BaseLearner, InteractionSerialEvaluator, BaseSerialCommander, create_buff...
48.56391
113
0.690355
from typing import Union, Optional, List, Any, Tuple import os import torch import logging from functools import partial from tensorboardX import SummaryWriter from ding.envs import get_vec_env_setting, create_env_manager from ding.worker import BaseLearner, InteractionSerialEvaluator, BaseSerialCommander, create_buff...
true
true
f71d3fe83ab81cbaa275dcdf79598ad722259587
6,853
py
Python
gen_version.py
Skrity/blobmoji
137924759529d6d4032df7381e72cdb5a70329a3
[ "Apache-2.0" ]
1
2021-07-22T20:56:28.000Z
2021-07-22T20:56:28.000Z
gen_version.py
Skrity/blobmoji
137924759529d6d4032df7381e72cdb5a70329a3
[ "Apache-2.0" ]
null
null
null
gen_version.py
Skrity/blobmoji
137924759529d6d4032df7381e72cdb5a70329a3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
35.507772
81
0.679119
import argparse import datetime import re from nototools import tool_utils _nameid_re = re.compile(r'\s*<namerecord nameID="5"') _version_re = re.compile(r'\s*Version\s(\d+.\d{2,3})') _headrev_re = re.compile(r'\s*<fontRevision value="(\d+.\d{2,3})"/>') def _get_existing_version(lines...
true
true
f71d4000f2d0dd6ef26eda02699bb789c6f1b62b
622
py
Python
add_devices.py
hollowpoint/hollowpoint
6f9d6c6f7147a3cec20d6e772567a29cebe2a365
[ "Apache-2.0" ]
1
2016-03-31T19:52:03.000Z
2016-03-31T19:52:03.000Z
add_devices.py
hollowpoint/hollowpoint
6f9d6c6f7147a3cec20d6e772567a29cebe2a365
[ "Apache-2.0" ]
null
null
null
add_devices.py
hollowpoint/hollowpoint
6f9d6c6f7147a3cec20d6e772567a29cebe2a365
[ "Apache-2.0" ]
null
null
null
import ast from inventory.models import TaskState, NetDevice def associate_tasks(): all_tasks = TaskState.objects.all() # Walk every task and see if it's got devices... for task in all_tasks: kwargs = ast.literal_eval(task.kwargs) devices = kwargs.get('devices', []) # Convert the ...
32.736842
80
0.662379
import ast from inventory.models import TaskState, NetDevice def associate_tasks(): all_tasks = TaskState.objects.all() for task in all_tasks: kwargs = ast.literal_eval(task.kwargs) devices = kwargs.get('devices', []) # Convert the device names to objects objects = NetDev...
false
true
f71d4091699cbd805815ffe4c19da81088333f08
976
py
Python
datan.py
Anton-Mu/finance_sentiment_analysis
e319073646f8b11a3f6b5140137a7f0205918c19
[ "MIT" ]
null
null
null
datan.py
Anton-Mu/finance_sentiment_analysis
e319073646f8b11a3f6b5140137a7f0205918c19
[ "MIT" ]
null
null
null
datan.py
Anton-Mu/finance_sentiment_analysis
e319073646f8b11a3f6b5140137a7f0205918c19
[ "MIT" ]
1
2022-02-08T06:11:51.000Z
2022-02-08T06:11:51.000Z
import datetime import time import tradedate # 获取交易日历 import pandas as pd import pymysql import pandas companys = ['隆基股份', '森特股份', '三峡能源'] work_days = tradedate.catch_url_from_baidu('2022', '1') db = pymysql.connect(host='localhost', port=3306, user='root', password='', database='spider', ...
27.111111
98
0.564549
import datetime import time import tradedate import pandas as pd import pymysql import pandas companys = ['隆基股份', '森特股份', '三峡能源'] work_days = tradedate.catch_url_from_baidu('2022', '1') db = pymysql.connect(host='localhost', port=3306, user='root', password='', database='spider', charse...
true
true
f71d40bcf651b54021979c451aaa44ec6a2a88bd
9,898
py
Python
lstm_predictor.py
akash13singh/thesis
c9c1aae3545e0412a042f5838e81622c82e8668a
[ "MIT" ]
215
2017-09-25T01:26:32.000Z
2022-01-25T04:35:04.000Z
lstm_predictor.py
akash13singh/thesis
c9c1aae3545e0412a042f5838e81622c82e8668a
[ "MIT" ]
8
2018-08-04T09:55:45.000Z
2021-05-10T07:55:44.000Z
lstm_predictor.py
akash13singh/thesis
c9c1aae3545e0412a042f5838e81622c82e8668a
[ "MIT" ]
95
2017-11-22T10:59:51.000Z
2022-02-08T18:26:39.000Z
import numpy as np import tensorflow as tf import random as rn np.random.seed(123) rn.seed(123) #single thread session_conf = tf.ConfigProto( intra_op_parallelism_threads=1, inter_op_parallelism_threads=1) from keras import backend as K tf.set_random_seed(123) sess = tf.Session(graph=tf.get_default_graph(), config=sess...
46.688679
138
0.66569
import numpy as np import tensorflow as tf import random as rn np.random.seed(123) rn.seed(123) session_conf = tf.ConfigProto( intra_op_parallelism_threads=1, inter_op_parallelism_threads=1) from keras import backend as K tf.set_random_seed(123) sess = tf.Session(graph=tf.get_default_graph(), config=session_conf) K.se...
false
true
f71d40ea4ac12f604898bb136a6e2b9b0a5f4e83
1,146
py
Python
out/euler04.py
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
22
2017-04-24T10:00:45.000Z
2021-04-01T10:11:05.000Z
out/euler04.py
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
12
2017-03-26T18:34:21.000Z
2019-03-21T19:13:03.000Z
out/euler04.py
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
7
2017-10-14T13:33:33.000Z
2021-03-18T15:18:50.000Z
import math def mod(x, y): return x - y * math.trunc(x / y) """(a + b * 10 + c * 100) * (d + e * 10 + f * 100) = a * d + a * e * 10 + a * f * 100 + 10 * (b * d + b * e * 10 + b * f * 100)+ 100 * (c * d + c * e * 10 + c * f * 100) = a * d + a * e * 10 + a * f * 100 + b * d * 10 + b * e * 100 + b * f * 1...
30.972973
140
0.383944
import math def mod(x, y): return x - y * math.trunc(x / y) def chiffre(c, m): if c == 0: return mod(m, 10) else: return chiffre(c - 1, math.trunc(m / 10)) m = 1 for a in range(0, 10): for f in range(1, 10): for d in range(0, 10): for c in range(1, 10): ...
true
true
f71d40f2d3759b44ca62a6228b24e192e7a00be9
1,008
py
Python
pro_mqtt/mqtt_le1.py
yongfang117/pro_useful_code
63ae6891d3be243c5c46329e65fcf47133c5890f
[ "MIT" ]
null
null
null
pro_mqtt/mqtt_le1.py
yongfang117/pro_useful_code
63ae6891d3be243c5c46329e65fcf47133c5890f
[ "MIT" ]
null
null
null
pro_mqtt/mqtt_le1.py
yongfang117/pro_useful_code
63ae6891d3be243c5c46329e65fcf47133c5890f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ 时间: 2019/11/24 16:29 作者: lyf 更改记录: 重要说明: """ # 关键指令: # # 1.导入包 # import paho.mqtt.client as mqtt # # 2.创建client对象 # client = mqtt.Client(id) # # 3.连接 # client.connect(host, post) # # 4.订阅 # client.subscribe(topic) # client.on_message=func #接收到信息后的处理函数 # # 5.发布 # client.publish(topic...
18.666667
50
0.666667
sys host="127.0.0.1" topic_sub = "Question" topic_pub = "temperature" def on_connect(client, userdata, flags, rc): print("Connected with result code " + str(rc)) client.subscribe(topic_sub) def on_message(client, userdata, msg): print(msg.payload) client.publish(topic_pub, "37°") def main(argv=...
true
true
f71d41eed59231c857476d3caab9e2db2e5c6a47
6,089
py
Python
test.py
jssprz/attentive-visual-semantic-specialized-network-for-video-captioning
00815884ba892c00db2d3778bd0083618ff6d2d7
[ "MIT" ]
10
2020-10-18T04:35:38.000Z
2021-02-01T13:01:10.000Z
test.py
jssprz/attentive-visual-semantic-specialized-network-for-video-captioning
00815884ba892c00db2d3778bd0083618ff6d2d7
[ "MIT" ]
6
2020-11-06T03:07:47.000Z
2021-02-15T15:39:49.000Z
test.py
jssprz/attentive-visual-semantic-specialized-network-for-video-captioning
00815884ba892c00db2d3778bd0083618ff6d2d7
[ "MIT" ]
2
2021-05-03T08:26:29.000Z
2022-03-09T09:20:39.000Z
import os import argparse import pickle from utils import decode_from_tokens from vocabulary import Vocabulary from configuration_file import ConfigurationFile from model.encoder import Encoder from model.decoder import AVSSNDecoder import h5py import torch import numpy as np if __name__ == '__main__': parser = a...
42.880282
129
0.654459
import os import argparse import pickle from utils import decode_from_tokens from vocabulary import Vocabulary from configuration_file import ConfigurationFile from model.encoder import Encoder from model.decoder import AVSSNDecoder import h5py import torch import numpy as np if __name__ == '__main__': parser = a...
true
true
f71d42f855d41d0b78af8b30cec0f6bd6a6b4519
97,512
py
Python
external/synple/synple.py
dnidever/apogee
83ad7496a0b4193df9e2c01b06dc36cb879ea6c1
[ "BSD-3-Clause" ]
null
null
null
external/synple/synple.py
dnidever/apogee
83ad7496a0b4193df9e2c01b06dc36cb879ea6c1
[ "BSD-3-Clause" ]
null
null
null
external/synple/synple.py
dnidever/apogee
83ad7496a0b4193df9e2c01b06dc36cb879ea6c1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- """Python wrapper for synspec Calculation of synthetic spectra of stars and convolution with a rotational/Gaussian kernel. Makes the use of synspec simpler, and retains the main functionalities (when used from python). The command line interface is even simpler but fairly li...
32.733132
173
0.590379
import os import sys import subprocess import numpy as np import glob import time import copy import gzip from scipy import interpolate import matplotlib.pyplot as plt from itertools import product synpledir = os.path.dirname(os.path.realpath(__file__)) modeldir = synpledir + "/models" modelatomdir = synpledir...
true
true
f71d4338552d68cb454ffab368d1505a64bd44e3
267
py
Python
datacrawler/datacrawler/items.py
NgocSon15/tmdt
a66456ff9e9b16d2b4d5f48014e14daf1c4bbdcb
[ "Apache-2.0" ]
null
null
null
datacrawler/datacrawler/items.py
NgocSon15/tmdt
a66456ff9e9b16d2b4d5f48014e14daf1c4bbdcb
[ "Apache-2.0" ]
null
null
null
datacrawler/datacrawler/items.py
NgocSon15/tmdt
a66456ff9e9b16d2b4d5f48014e14daf1c4bbdcb
[ "Apache-2.0" ]
null
null
null
# Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy class DatacrawlerItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
20.538462
53
0.719101
import scrapy class DatacrawlerItem(scrapy.Item): pass
true
true
f71d43880aab3dfc9d94437f8da31184d6a449f4
915
py
Python
TIL/bs_mog2.py
FLY-CODE77/opencv
5644e6c1ef43d81efb54ccde6c06f1adf000fb96
[ "MIT" ]
1
2020-10-23T14:29:24.000Z
2020-10-23T14:29:24.000Z
TIL/bs_mog2.py
FLY-CODE77/opencv
5644e6c1ef43d81efb54ccde6c06f1adf000fb96
[ "MIT" ]
null
null
null
TIL/bs_mog2.py
FLY-CODE77/opencv
5644e6c1ef43d81efb54ccde6c06f1adf000fb96
[ "MIT" ]
null
null
null
import sys import numpy as np import cv2 cap = cv2.VideoCapture('PETS2000.avi') if not cap.isOpened(): print('video wrong') sys.exit() bs = cv2.createBackgroundSubtractorMOG2() # knn method backgroundSubtractor # bs = cv2.createBackgroundSubtractorKNN() # don't care about shadows # bs.setDetectShadows(Fals...
20.333333
63
0.630601
import sys import numpy as np import cv2 cap = cv2.VideoCapture('PETS2000.avi') if not cap.isOpened(): print('video wrong') sys.exit() bs = cv2.createBackgroundSubtractorMOG2() # bs.setDetectShadows(False) while True: ret , frame = cap.read() if not ret: break gray = cv2.cvtColor(...
true
true
f71d44232caa9293b8d304ae7d59130d934d6f87
3,223
py
Python
pyportlib/services/cash_manager.py
phil-lo/pyportlib
96f8531c0c18c58d3476832de9d4c9b2c9285f62
[ "MIT" ]
2
2021-11-18T21:40:02.000Z
2021-12-13T21:01:18.000Z
pyportlib/services/cash_manager.py
phil-lo/PortfolioCore
3fbe7460c809a80e48615e934990dcd2d1f5003b
[ "CC0-1.0" ]
1
2022-01-24T21:10:09.000Z
2022-01-24T21:10:09.000Z
pyportlib/services/cash_manager.py
phil-lo/PortfolioCore
3fbe7460c809a80e48615e934990dcd2d1f5003b
[ "CC0-1.0" ]
null
null
null
from datetime import datetime from typing import List, Union import pandas as pd from pyportlib.services.cash_change import CashChange from pyportlib.utils import df_utils, files_utils from pyportlib.utils import logger class CashManager: NAME = "Cash Account" ACCOUNTS_DIRECTORY = files_utils.get_accounts_di...
36.213483
97
0.619299
from datetime import datetime from typing import List, Union import pandas as pd from pyportlib.services.cash_change import CashChange from pyportlib.utils import df_utils, files_utils from pyportlib.utils import logger class CashManager: NAME = "Cash Account" ACCOUNTS_DIRECTORY = files_utils.get_accounts_di...
true
true
f71d4483c26638ff4b3ecc30a2d816789e000b26
15,403
py
Python
quests/forms.py
donvvo/questr-master
6363ffb4c11ef61f3b6976e75c86a5cbc7f38590
[ "MIT" ]
null
null
null
quests/forms.py
donvvo/questr-master
6363ffb4c11ef61f3b6976e75c86a5cbc7f38590
[ "MIT" ]
null
null
null
quests/forms.py
donvvo/questr-master
6363ffb4c11ef61f3b6976e75c86a5cbc7f38590
[ "MIT" ]
null
null
null
from django import forms from .models import Quests, PACKAGE_SELECTION class QuestCreationForm(forms.ModelForm): """ A form that creates a post, from the given data """ CITY_SELECTION = ( ('Toronto', 'Toronto'), ('Brampton', 'Brampton'), ('Markham', 'Markham'), ('Missi...
34.002208
128
0.52704
from django import forms from .models import Quests, PACKAGE_SELECTION class QuestCreationForm(forms.ModelForm): CITY_SELECTION = ( ('Toronto', 'Toronto'), ('Brampton', 'Brampton'), ('Markham', 'Markham'), ('Mississauga', 'Mississauga'), ('Richmond Hill', 'Richmond Hill'),...
true
true
f71d44a480e0696a5e3de4133e6459faae7aca1e
6,235
py
Python
tests/test_parse_model.py
covid-19-impact-lab/sid
d867f55d4d005b01c672bd2edd0e1dc974cb182b
[ "MIT" ]
18
2020-04-18T09:18:52.000Z
2021-10-19T02:42:39.000Z
tests/test_parse_model.py
covid-19-impact-lab/sid
d867f55d4d005b01c672bd2edd0e1dc974cb182b
[ "MIT" ]
143
2020-04-18T16:58:20.000Z
2022-03-07T22:16:03.000Z
tests/test_parse_model.py
covid-19-impact-lab/sid
d867f55d4d005b01c672bd2edd0e1dc974cb182b
[ "MIT" ]
1
2021-01-07T07:38:53.000Z
2021-01-07T07:38:53.000Z
from contextlib import ExitStack as does_not_raise # noqa: N813 import numpy as np import pandas as pd import pytest from sid.config import DEFAULT_VIRUS_STRAINS from sid.config import INITIAL_CONDITIONS from sid.parse_model import parse_duration from sid.parse_model import parse_initial_conditions from sid.parse_mod...
32.815789
88
0.503288
from contextlib import ExitStack as does_not_raise import numpy as np import pandas as pd import pytest from sid.config import DEFAULT_VIRUS_STRAINS from sid.config import INITIAL_CONDITIONS from sid.parse_model import parse_duration from sid.parse_model import parse_initial_conditions from sid.parse_model import pa...
true
true
f71d462f369c09cf273f8dcf82d84fce5362259e
488
py
Python
cpc/asm/Assembly.py
U-Ar/Cpresto
f723458fb237c9e3e8bc8a6afdf7c81858a65363
[ "BSD-3-Clause" ]
1
2021-05-09T07:10:19.000Z
2021-05-09T07:10:19.000Z
cpc/asm/Assembly.py
U-Ar/Cpresto
f723458fb237c9e3e8bc8a6afdf7c81858a65363
[ "BSD-3-Clause" ]
null
null
null
cpc/asm/Assembly.py
U-Ar/Cpresto
f723458fb237c9e3e8bc8a6afdf7c81858a65363
[ "BSD-3-Clause" ]
null
null
null
from abc import ABCMeta, abstractmethod class Assembly(metaclass=ABCMeta): @abstractmethod def to_source(self,table): pass @abstractmethod def dump(self): pass def is_instruction(self): return False def is_label(self): return False def is_directive...
19.52
39
0.616803
from abc import ABCMeta, abstractmethod class Assembly(metaclass=ABCMeta): @abstractmethod def to_source(self,table): pass @abstractmethod def dump(self): pass def is_instruction(self): return False def is_label(self): return False def is_directive...
true
true
f71d46d8cffb81704bfaaac606134000be1c25b8
1,201
py
Python
kelbyapp/public/forms.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
kelbyapp/public/forms.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
kelbyapp/public/forms.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Public forms.""" from flask_wtf import Form from wtforms import PasswordField, StringField from wtforms.validators import DataRequired from kelbyapp.user.models import User class LoginForm(Form): """Login form.""" username = StringField('Username', validators=[DataRequired()]) ...
30.025
77
0.6403
from flask_wtf import Form from wtforms import PasswordField, StringField from wtforms.validators import DataRequired from kelbyapp.user.models import User class LoginForm(Form): username = StringField('Username', validators=[DataRequired()]) password = PasswordField('Password', validators=[DataRequired()]...
true
true
f71d49b5ea3af6b2cf6a8645afbe5f8a1d710275
5,786
py
Python
main.py
hamhochoisg/moneydetection
32a02f54a4a0c1a6f41a232fa30a3f0f15bdab13
[ "CC0-1.0" ]
1
2021-09-25T05:53:08.000Z
2021-09-25T05:53:08.000Z
main.py
hamhochoisg/moneydetection
32a02f54a4a0c1a6f41a232fa30a3f0f15bdab13
[ "CC0-1.0" ]
null
null
null
main.py
hamhochoisg/moneydetection
32a02f54a4a0c1a6f41a232fa30a3f0f15bdab13
[ "CC0-1.0" ]
null
null
null
import streamlit as st import pandas as pd import numpy as np import cv2 import matplotlib.pyplot as plt import tensorflow as tf import os from tensorflow.keras.preprocessing import image st.title('Banknotes Classification') menu = ['Home','Up Load & Predict', 'Capture From Webcam'] #========================# #==== ...
32.144444
142
0.635154
import streamlit as st import pandas as pd import numpy as np import cv2 import matplotlib.pyplot as plt import tensorflow as tf import os from tensorflow.keras.preprocessing import image st.title('Banknotes Classification') menu = ['Home','Up Load & Predict', 'Capture From Webcam'] = 'model\my_model_checkpoint.h5' ...
true
true
f71d49f08968408a9f9195a8e3883b923d68c5b2
15,027
py
Python
assets/code/taiga/conf/local.py
tcarrio/cit348-devops
e22f1c40c07608fcf9b4634207d37087194e35c5
[ "MIT" ]
null
null
null
assets/code/taiga/conf/local.py
tcarrio/cit348-devops
e22f1c40c07608fcf9b4634207d37087194e35c5
[ "MIT" ]
null
null
null
assets/code/taiga/conf/local.py
tcarrio/cit348-devops
e22f1c40c07608fcf9b4634207d37087194e35c5
[ "MIT" ]
null
null
null
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
30.419028
100
0.618886
import os.path, sys, os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) APPEND_SLASH = False ALLOWED_HOSTS = ["*"] ADMINS = ( ("Admin", "example@example.com"), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'taiga', ...
true
true
f71d4c72d1f7a82364f42009fa23310a38a6270a
3,806
py
Python
python3.4Smartforest/lib/python3.4/site-packages/django/core/cache/__init__.py
letouriste001/SmartForest_2.0
109b78bf1e8c8404800f377ab969395ccbb617be
[ "MIT" ]
null
null
null
python3.4Smartforest/lib/python3.4/site-packages/django/core/cache/__init__.py
letouriste001/SmartForest_2.0
109b78bf1e8c8404800f377ab969395ccbb617be
[ "MIT" ]
null
null
null
python3.4Smartforest/lib/python3.4/site-packages/django/core/cache/__init__.py
letouriste001/SmartForest_2.0
109b78bf1e8c8404800f377ab969395ccbb617be
[ "MIT" ]
null
null
null
""" Caching framework. This package defines set of cache backends that all conform to a simple API. In a nutshell, a cache is a set of values -- which can be any object that may be pickled -- identified by string keys. For the complete API, see the abstract BaseCache class in django.core.cache.backends.base. Client ...
3,806
3,806
0.656332
true
true
f71d4ceea4d304b20a6df92edf9fa956bd825f05
1,877
py
Python
api_mihai/management/commands/london_data_importer.py
MihaiVisu/hons-backend
95e9afc32289bc753d689c8465c991d1bcc164e0
[ "MIT" ]
null
null
null
api_mihai/management/commands/london_data_importer.py
MihaiVisu/hons-backend
95e9afc32289bc753d689c8465c991d1bcc164e0
[ "MIT" ]
15
2020-01-28T22:20:34.000Z
2022-03-11T23:20:39.000Z
api_mihai/management/commands/london_data_importer.py
MihaiVisu/hons-backend
95e9afc32289bc753d689c8465c991d1bcc164e0
[ "MIT" ]
null
null
null
import csv import calendar import datetime from django.core.management.base import BaseCommand, CommandError from api_mihai.models import CollectedData class Command(BaseCommand): help = 'Imports the CSV file from the collected data to the database' def add_arguments(self, parser): parser.add_argument('file_nam...
31.283333
96
0.696857
import csv import calendar import datetime from django.core.management.base import BaseCommand, CommandError from api_mihai.models import CollectedData class Command(BaseCommand): help = 'Imports the CSV file from the collected data to the database' def add_arguments(self, parser): parser.add_argument('file_nam...
true
true
f71d4d2cd8852f1b8e62185fadfb4d3d807e03b4
7,873
py
Python
rules/rule_functions.py
propelwise/sarle-labeler
8cdb3d494b46df2bc820592e14c9c8e23d08fa07
[ "MIT" ]
2
2020-11-24T00:53:28.000Z
2020-11-24T02:05:39.000Z
rules/rule_functions.py
propelwise/sarle-labeler
8cdb3d494b46df2bc820592e14c9c8e23d08fa07
[ "MIT" ]
null
null
null
rules/rule_functions.py
propelwise/sarle-labeler
8cdb3d494b46df2bc820592e14c9c8e23d08fa07
[ "MIT" ]
2
2021-03-17T16:36:35.000Z
2022-01-10T08:20:52.000Z
#rule_functions.py #Copyright (c) 2020 Rachel Lea Ballantyne Draelos #MIT License #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 #...
44.480226
122
0.668995
def delete_mainword(sentence, mainword, **kwargs): if mainword not in sentence: return False, sentence return True, sentence.replace(mainword,'') def delete_part(sentence, delete_part, mainword, **kwargs): if mainword not in sentence: return False, sentence sent...
true
true
f71d4d46c8227bfceeb5fb3080123438f7335d8f
230
py
Python
post-processors/CSDN/main.py
kingking888/SearchEngine
83729fcc4e872277c7eaeb6d26ce2c3e425ef6a2
[ "MIT" ]
6
2019-07-05T02:47:54.000Z
2021-05-03T08:33:28.000Z
post-processors/CSDN/main.py
SpanockLau/SearchEngine
83729fcc4e872277c7eaeb6d26ce2c3e425ef6a2
[ "MIT" ]
8
2020-08-06T03:34:38.000Z
2022-02-26T15:22:28.000Z
post-processors/CSDN/main.py
SpanockLau/SearchEngine
83729fcc4e872277c7eaeb6d26ce2c3e425ef6a2
[ "MIT" ]
4
2019-07-05T08:03:51.000Z
2019-10-05T06:48:24.000Z
from common.DataFilterHandler import DataFilterHandler if __name__ == '__main__': # first filter the data filter = DataFilterHandler(database_name='TechHub', collection_name='CSDN', use_localhost=False) filter.start()
38.333333
100
0.769565
from common.DataFilterHandler import DataFilterHandler if __name__ == '__main__': filter = DataFilterHandler(database_name='TechHub', collection_name='CSDN', use_localhost=False) filter.start()
true
true
f71d4f324eb82f6fada708be05c43ff1d35f6fbe
1,562
py
Python
aliyun-python-sdk-baas/aliyunsdkbaas/request/v20180731/DescribeSmartContractJobsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-baas/aliyunsdkbaas/request/v20180731/DescribeSmartContractJobsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-baas/aliyunsdkbaas/request/v20180731/DescribeSmartContractJobsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.5
79
0.759923
from aliyunsdkcore.request import RpcRequest from aliyunsdkbaas.endpoint import endpoint_data class DescribeSmartContractJobsRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Baas', '2018-07-31', 'DescribeSmartContractJobs') self.set_method('POST') if hasattr(self, "endpoi...
true
true
f71d500bd9d2ec3c7c795af9f44cae78b7f74e64
1,718
py
Python
Pi code/final.py
k-shenbagaraj/GoCHART_manual_drive
524594fdd10f0a3d07020985f27727076cbbd01a
[ "MIT" ]
null
null
null
Pi code/final.py
k-shenbagaraj/GoCHART_manual_drive
524594fdd10f0a3d07020985f27727076cbbd01a
[ "MIT" ]
null
null
null
Pi code/final.py
k-shenbagaraj/GoCHART_manual_drive
524594fdd10f0a3d07020985f27727076cbbd01a
[ "MIT" ]
null
null
null
import re from client import * import serial import os if os.path.exists ('/dev/ttyACM0') == True: port = "/dev/ttyACM0" print("ACM0") elif os.path.exists ('/dev/ttyACM1') == True: port = "/dev/ttyACM1" print("ACM1") elif os.path.exists ('/dev/ttyACM2') == True: port = "/dev/ttyACM2" prin...
19.976744
56
0.558789
import re from client import * import serial import os if os.path.exists ('/dev/ttyACM0') == True: port = "/dev/ttyACM0" print("ACM0") elif os.path.exists ('/dev/ttyACM1') == True: port = "/dev/ttyACM1" print("ACM1") elif os.path.exists ('/dev/ttyACM2') == True: port = "/dev/ttyACM2" prin...
true
true
f71d52ac319dee155d13be3f21121985b6a7e93f
3,813
py
Python
handler/__init__.py
glibin/binder-proxy
6ceac0cacba3e5ba8e88f020bc411fac6ab50313
[ "MIT" ]
null
null
null
handler/__init__.py
glibin/binder-proxy
6ceac0cacba3e5ba8e88f020bc411fac6ab50313
[ "MIT" ]
null
null
null
handler/__init__.py
glibin/binder-proxy
6ceac0cacba3e5ba8e88f020bc411fac6ab50313
[ "MIT" ]
null
null
null
from tornado.options import options from tortik.page import RequestHandler try: import urlparse # py2 except ImportError: import urllib.parse as urlparse # py3 class PageHandler(RequestHandler): """Base handler""" preprocessors = [] postprocessors = [] def make_request(self, *args, **kwarg...
32.87069
110
0.617886
from tornado.options import options from tortik.page import RequestHandler try: import urlparse except ImportError: import urllib.parse as urlparse class PageHandler(RequestHandler): preprocessors = [] postprocessors = [] def make_request(self, *args, **kwargs): kwargs['validate_cert...
true
true
f71d52f51e8aedf2a36a0f268bdcc342349d4ecf
2,681
py
Python
trail/upload/process_uploads/upload_wrapper.py
DinoBektesevic/trailblazer
31aeb2b2e3ab0cd97c4e4d2c0e26043f559abe06
[ "MIT" ]
null
null
null
trail/upload/process_uploads/upload_wrapper.py
DinoBektesevic/trailblazer
31aeb2b2e3ab0cd97c4e4d2c0e26043f559abe06
[ "MIT" ]
null
null
null
trail/upload/process_uploads/upload_wrapper.py
DinoBektesevic/trailblazer
31aeb2b2e3ab0cd97c4e4d2c0e26043f559abe06
[ "MIT" ]
null
null
null
import os.path from pathlib import Path from django.conf import settings """ Wrapper to Django's TemporaryUploadedFile that adds additional path manipulation and file saving functionality. """ __all__ = ["TemporaryUploadedFileWrapper", ] class TemporaryUploadedFileWrapper: """Wrapper of TemporaryUploadedFile...
28.221053
77
0.613204
import os.path from pathlib import Path from django.conf import settings __all__ = ["TemporaryUploadedFileWrapper", ] class TemporaryUploadedFileWrapper: save_root = os.path.join(settings.STATIC_ROOT, "upload/fits/") special_extensions = {".gz", ".bz2", ".xz", ".fz"} def __init__(self, upload): ...
true
true
f71d54b96a3930c6779dc4acaf02a9055a09e4e1
1,374
py
Python
Library/Application Support/iTerm2/Scripts/AutoLaunch/change_color_preset_on_theme_change.py
timriley/dotfiles
60ec6fabd5007a4e916e7a91bb831206dd9ede92
[ "MIT" ]
4
2015-08-26T02:39:23.000Z
2022-02-04T02:31:54.000Z
Library/Application Support/iTerm2/Scripts/AutoLaunch/change_color_preset_on_theme_change.py
timriley/dotfiles
60ec6fabd5007a4e916e7a91bb831206dd9ede92
[ "MIT" ]
3
2019-06-05T02:00:14.000Z
2020-04-06T23:14:52.000Z
Library/Application Support/iTerm2/Scripts/AutoLaunch/change_color_preset_on_theme_change.py
timriley/dotfiles
60ec6fabd5007a4e916e7a91bb831206dd9ede92
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # This script was created with the "basic" environment which does not support # adding dependencies with pip. # Taken from https://iterm2.com/python-api/examples/theme.html import asyncio import iterm2 async def update(connection, theme): # Themes have space-delimited attributes, one of w...
38.166667
108
0.723435
import asyncio import iterm2 async def update(connection, theme): parts = theme.split(" ") if "dark" in parts: preset = await iterm2.ColorPreset.async_get(connection, "base16-summerfruit-dark-256") else: preset = await iterm2.ColorPreset.async_get(connection, "base16-summerfruit...
true
true
f71d56c8acadb5d48d5ef1022bcaeb86b7ee9287
301
py
Python
data/multilingual/Latn.SHP/Mono_8/pdf_to_json_test_Latn.SHP_Mono_8.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
1
2021-09-19T19:47:35.000Z
2021-09-19T19:47:35.000Z
data/multilingual/Latn.SHP/Mono_8/pdf_to_json_test_Latn.SHP_Mono_8.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
data/multilingual/Latn.SHP/Mono_8/pdf_to_json_test_Latn.SHP_Mono_8.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.SHP/Mono_8/udhr_Latn.SHP_Mono_8.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
30.1
71
0.810631
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.SHP/Mono_8/udhr_Latn.SHP_Mono_8.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
true
true
f71d56d8bf4219dc71815c78eb65fcea2e48444a
11,552
py
Python
distributed/diagnostics/progress.py
bachsh/distributed
18d7b24ba315f6a5c0c892509e72d539f02babfb
[ "BSD-3-Clause" ]
3
2021-05-27T07:40:11.000Z
2021-05-27T07:40:16.000Z
distributed/diagnostics/progress.py
happyLeecz/DaskServerless
c1ddfe678fedc7f7ecb6eabb784b967f71a2054a
[ "BSD-3-Clause" ]
null
null
null
distributed/diagnostics/progress.py
happyLeecz/DaskServerless
c1ddfe678fedc7f7ecb6eabb784b967f71a2054a
[ "BSD-3-Clause" ]
null
null
null
import asyncio import logging from collections import defaultdict from timeit import default_timer from tlz import groupby, valmap from dask.utils import stringify from ..utils import key_split, key_split_group, log_errors from .plugin import SchedulerPlugin logger = logging.getLogger(__name__) def dependent_keys...
31.911602
88
0.569598
import asyncio import logging from collections import defaultdict from timeit import default_timer from tlz import groupby, valmap from dask.utils import stringify from ..utils import key_split, key_split_group, log_errors from .plugin import SchedulerPlugin logger = logging.getLogger(__name__) def dependent_keys...
true
true
f71d57efae634d6940aee542cd1c41b728f66202
7,879
py
Python
openff/toolkit/tests/test_utils_callback.py
ijpulidos/openff-toolkit
24953a407c853411bee9584d29fa0fb953e59151
[ "MIT" ]
null
null
null
openff/toolkit/tests/test_utils_callback.py
ijpulidos/openff-toolkit
24953a407c853411bee9584d29fa0fb953e59151
[ "MIT" ]
10
2021-05-06T16:02:44.000Z
2022-03-02T02:08:45.000Z
openff/toolkit/tests/test_utils_callback.py
justinGilmer/openforcefield
1bb07cfa4ceffee4a1df760e44fdbdb1d281d1c7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # ===================================================================== # MODULE DOCSTRING # ===================================================================== """ Tests for callback utility classes and functions. """ # ===================================================================== #...
35.977169
110
0.596395
import pytest from openff.toolkit.utils.callback import ( Callbackable, CallbackRegistrationError, callback_method, ) class CallHistory: history = None def reset_history(self): CallHistory.history = [] @classmethod def add_history_entry(cls, name, *args, **kwargs...
true
true
f71d581144f52f714353d28b59cb7d3475bcf930
5,279
py
Python
ikfs_anomaly_detector/core/config.py
DSPLab-IC6/ikfs_anomaly_detector
e0a36e185be6e9dcd75451c956a2aaf6a6fec677
[ "MIT" ]
null
null
null
ikfs_anomaly_detector/core/config.py
DSPLab-IC6/ikfs_anomaly_detector
e0a36e185be6e9dcd75451c956a2aaf6a6fec677
[ "MIT" ]
4
2020-01-28T22:45:39.000Z
2022-02-10T00:21:51.000Z
ikfs_anomaly_detector/core/config.py
DSPLab-IC6/ikfs_anomaly_detector
e0a36e185be6e9dcd75451c956a2aaf6a6fec677
[ "MIT" ]
null
null
null
import os from dataclasses import dataclass from typing import List import yaml from ikfs_anomaly_detector.core.format.telemetry import TelemetryAttrs, Counters from ikfs_anomaly_detector.intellectual.autoencoder import SignalsGroup DEFAULT_CONFIG_PATH = os.path.join(os.getcwd(), 'default_config.yml') DEFAULT_CONFI...
29.005495
91
0.596325
import os from dataclasses import dataclass from typing import List import yaml from ikfs_anomaly_detector.core.format.telemetry import TelemetryAttrs, Counters from ikfs_anomaly_detector.intellectual.autoencoder import SignalsGroup DEFAULT_CONFIG_PATH = os.path.join(os.getcwd(), 'default_config.yml') DEFAULT_CONFI...
true
true
f71d58cc0b0e4753056bd8d988469378f2edf90f
1,851
py
Python
setup.py
strongio/snorkel
0282a4f2323fc7bd4b0eb2a950b52d2a5d88b0c1
[ "Apache-2.0" ]
1
2021-04-22T05:10:25.000Z
2021-04-22T05:10:25.000Z
setup.py
strongio/strong-snorkel
0282a4f2323fc7bd4b0eb2a950b52d2a5d88b0c1
[ "Apache-2.0" ]
null
null
null
setup.py
strongio/strong-snorkel
0282a4f2323fc7bd4b0eb2a950b52d2a5d88b0c1
[ "Apache-2.0" ]
null
null
null
from typing import Dict from setuptools import find_packages, setup # version.py defines the VERSION and VERSION_SHORT variables. # We use exec here so we don't import snorkel. VERSION: Dict[str, str] = {} with open("snorkel/version.py", "r") as version_file: exec(version_file.read(), VERSION) # Use README.md as...
34.924528
109
0.645057
from typing import Dict from setuptools import find_packages, setup VERSION: Dict[str, str] = {} with open("snorkel/version.py", "r") as version_file: exec(version_file.read(), VERSION) # Use README.md as the long_description for the package with open("README.md", "r") as readme_file: long_description = re...
true
true
f71d59aafb808ab77a0ad8aad5cbe47cf5905790
907
py
Python
team_9/cocos/test/test_repeat.py
Donnyvdm/dojo19
3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400
[ "BSD-3-Clause" ]
1
2019-09-15T18:59:49.000Z
2019-09-15T18:59:49.000Z
team_9/cocos/test/test_repeat.py
Donnyvdm/dojo19
3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400
[ "BSD-3-Clause" ]
null
null
null
team_9/cocos/test/test_repeat.py
Donnyvdm/dojo19
3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division, print_function, unicode_literals # This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "t 0.1, s, t 1, s, t 3, s, t 4, s, q" tags = "Repeat" import cocos from cocos....
25.194444
72
0.674752
from __future__ import division, print_function, unicode_literals import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) testinfo = "t 0.1, s, t 1, s, t 3, s, t 4, s, q" tags = "Repeat" import cocos from cocos.director import director from cocos.sprite import Sprite from cocos.actio...
true
true
f71d59c9f4b83ffa1095a7b021868296f0f4e159
2,890
py
Python
vnpy/app/cta_strategy/strategies/double_ma_strategy.py
wenhaoLong/vnpyTrader
ff37e288042b9d9f9350a1c528a53c77d56ae849
[ "MIT" ]
null
null
null
vnpy/app/cta_strategy/strategies/double_ma_strategy.py
wenhaoLong/vnpyTrader
ff37e288042b9d9f9350a1c528a53c77d56ae849
[ "MIT" ]
null
null
null
vnpy/app/cta_strategy/strategies/double_ma_strategy.py
wenhaoLong/vnpyTrader
ff37e288042b9d9f9350a1c528a53c77d56ae849
[ "MIT" ]
2
2021-03-07T18:13:21.000Z
2021-12-13T10:20:10.000Z
from vnpy.app.cta_strategy import ( CtaTemplate, StopOrder, ) from vnpy.trader.object import ( TickData, BarData, TradeData, OrderData, ) from vnpy.trader.utility import ( BarGenerator, ArrayManager, ) class DoubleMaStrategy(CtaTemplate): author = "中科云集" fast_window = 10 s...
23.495935
85
0.552595
from vnpy.app.cta_strategy import ( CtaTemplate, StopOrder, ) from vnpy.trader.object import ( TickData, BarData, TradeData, OrderData, ) from vnpy.trader.utility import ( BarGenerator, ArrayManager, ) class DoubleMaStrategy(CtaTemplate): author = "中科云集" fast_window = 10 s...
true
true
f71d59ed2467f45cf5c7f7741efd4096b5a794bd
1,573
py
Python
test_individual.py
pallamidessi/mvrptv
6d4844108a4c008522b8bfb39b59f420b9484496
[ "MIT" ]
1
2019-09-03T09:18:03.000Z
2019-09-03T09:18:03.000Z
test_individual.py
pallamidessi/mvrptv
6d4844108a4c008522b8bfb39b59f420b9484496
[ "MIT" ]
null
null
null
test_individual.py
pallamidessi/mvrptv
6d4844108a4c008522b8bfb39b59f420b9484496
[ "MIT" ]
2
2015-06-15T07:21:39.000Z
2021-11-23T09:48:01.000Z
#-*- coding:utf8 -*- """ This code contains tests for the functions of the class representing an individual. """ #import copy import random import genome import model LIST_ORDER = [] random.seed(666) for i in range(0, 12): LIST_ORDER.append([]) for j in range(0, 2): LIST_ORDER[i].append(random.randr...
25.370968
79
0.651621
""" This code contains tests for the functions of the class representing an individual. """ import random import genome import model LIST_ORDER = [] random.seed(666) for i in range(0, 12): LIST_ORDER.append([]) for j in range(0, 2): LIST_ORDER[i].append(random.randrange(1, 6)) LIST_ORDER[i].ap...
false
true
f71d5a0785d3f6fa6ad4add5d7311030717d4550
21,178
py
Python
code_cr.py
ssawwqdf/-project-stock_info_dashboard
f14a462d915d2207db1da12307aefdef4b6921e1
[ "MIT" ]
1
2022-02-19T20:22:05.000Z
2022-02-19T20:22:05.000Z
code_cr.py
ssawwqdf/-project-stock_info_dashboard
f14a462d915d2207db1da12307aefdef4b6921e1
[ "MIT" ]
null
null
null
code_cr.py
ssawwqdf/-project-stock_info_dashboard
f14a462d915d2207db1da12307aefdef4b6921e1
[ "MIT" ]
null
null
null
import re import numpy as np import pandas as pd import requests #웹통신 import json from pmdarima.arima import ndiffs import pmdarima as pm from pykrx import stock from bs4 import BeautifulSoup import html5lib # ============== # 업종 분류 # ============== # -------...
29.53696
140
0.551044
import re import numpy as np import pandas as pd import requests import json from pmdarima.arima import ndiffs import pmdarima as pm from pykrx import stock from bs4 import BeautifulSoup import html5lib def select_same_industry(corp_name): indus=com_df[com_df['nm']==corp_name]['industry'].values[0] ...
true
true
f71d5a52c25390f4eb23da08757b775befe75028
610
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/celery_app.py
coordt/cookiecutter-django-project
5466510b62ea178bba238990b367b99bb6d46d37
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/celery_app.py
coordt/cookiecutter-django-project
5466510b62ea178bba238990b367b99bb6d46d37
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/celery_app.py
coordt/cookiecutter-django-project
5466510b62ea178bba238990b367b99bb6d46d37
[ "BSD-3-Clause" ]
null
null
null
import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{cookiecutter.project_slug}}.settings") app = Celery("{{cookiecutter.project_slug}}") # Using a string here means the worker doesn't have to serialize # the configu...
35.882353
89
0.781967
import os from celery import Celery os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{cookiecutter.project_slug}}.settings") app = Celery("{{cookiecutter.project_slug}}") # the configuration object to child processes. # - namespace='CELERY' means all celery-related configuration keys # should have a `CELERY_` p...
true
true
f71d5ada4f027de23ce274adfb59d424e9964cf2
4,696
py
Python
src/python/pants/option/errors.py
paiforsyth/pants
15da8db4f25d54b30d50ca4e00c066ae642a099c
[ "Apache-2.0" ]
null
null
null
src/python/pants/option/errors.py
paiforsyth/pants
15da8db4f25d54b30d50ca4e00c066ae642a099c
[ "Apache-2.0" ]
null
null
null
src/python/pants/option/errors.py
paiforsyth/pants
15da8db4f25d54b30d50ca4e00c066ae642a099c
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from typing import Tuple from pants.option.scope import GLOBAL_SCOPE class OptionsError(Exception): """An options system-related error.""" # --------------------------------------...
30.102564
99
0.636286
from typing import Tuple from pants.option.scope import GLOBAL_SCOPE class OptionsError(Exception): class RegistrationError(OptionsError): def __init__(self, scope: str, option: str, **msg_format_args) -> None: scope_str = "global scope" if scope == GLOBAL_SCOPE else f"scope {scope}" i...
true
true
f71d5c7dea7fb36ad7b6764aa8378fb2265ca95a
21
py
Python
python/testData/types/CopyDotCopy/copy.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/types/CopyDotCopy/copy.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/types/CopyDotCopy/copy.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def copy(x): pass
10.5
12
0.571429
def copy(x): pass
true
true
f71d5cdf640218fcea7f8ea7e9d1c86192c50c7b
4,371
py
Python
projects/speedup/centerX2onnx.py
donnyyou/centerX
6e381cb669a6014d02e31a43915271237690531c
[ "Apache-2.0" ]
350
2020-12-01T09:55:16.000Z
2020-12-23T13:47:43.000Z
projects/speedup/centerX2onnx.py
powerlic/centerX
1073753533f26483c3ab053a7d8753708fcacde7
[ "Apache-2.0" ]
39
2020-12-24T13:42:29.000Z
2022-02-10T01:09:56.000Z
projects/speedup/centerX2onnx.py
powerlic/centerX
1073753533f26483c3ab053a7d8753708fcacde7
[ "Apache-2.0" ]
49
2020-12-01T11:39:14.000Z
2020-12-21T01:45:39.000Z
from types import MethodType import onnx import torch from torch.onnx import OperatorExportTypes from onnxsim import simplify import argparse import io import sys import torch.nn as nn sys.path.insert(0, '.') from configs import add_centernet_config from detectron2.config import get_cfg from inference.centernet import...
28.019231
101
0.653397
from types import MethodType import onnx import torch from torch.onnx import OperatorExportTypes from onnxsim import simplify import argparse import io import sys import torch.nn as nn sys.path.insert(0, '.') from configs import add_centernet_config from detectron2.config import get_cfg from inference.centernet import...
true
true
f71d5cefc3da853120a2daae786970fa0e13e6a6
5,995
py
Python
basis_set_exchange/cli/bsecurate_cli.py
atomse/basis_set_exchange
7ffd64082c14d2f61eb43f1c2d44792e8b0e394e
[ "BSD-3-Clause" ]
null
null
null
basis_set_exchange/cli/bsecurate_cli.py
atomse/basis_set_exchange
7ffd64082c14d2f61eb43f1c2d44792e8b0e394e
[ "BSD-3-Clause" ]
null
null
null
basis_set_exchange/cli/bsecurate_cli.py
atomse/basis_set_exchange
7ffd64082c14d2f61eb43f1c2d44792e8b0e394e
[ "BSD-3-Clause" ]
null
null
null
''' Command line interface for the basis set exchange ''' import argparse import argcomplete from .. import version from .bsecurate_handlers import bsecurate_cli_handle_subcmd from .check import cli_check_normalize_args from .complete import cli_case_insensitive_validator, cli_bsname_completer, cli_readerfmt_completer...
52.130435
148
0.629191
import argparse import argcomplete from .. import version from .bsecurate_handlers import bsecurate_cli_handle_subcmd from .check import cli_check_normalize_args from .complete import cli_case_insensitive_validator, cli_bsname_completer, cli_readerfmt_completer def run_bsecurate_cli(): ding png file') subp.a...
true
true
f71d5cf776ccdf11c1fcda67f525c795c730a062
1,006
py
Python
listWmflabsdotorgRecordsets.py
Krenair/wmcs-misc-scripts
ae91b5756d73a9405634df9d6c32e98f21b97d5f
[ "Apache-2.0" ]
null
null
null
listWmflabsdotorgRecordsets.py
Krenair/wmcs-misc-scripts
ae91b5756d73a9405634df9d6c32e98f21b97d5f
[ "Apache-2.0" ]
null
null
null
listWmflabsdotorgRecordsets.py
Krenair/wmcs-misc-scripts
ae91b5756d73a9405634df9d6c32e98f21b97d5f
[ "Apache-2.0" ]
null
null
null
import yaml from keystoneclient.session import Session as KeystoneSession from keystoneclient.auth.identity.v3 import Password as KeystonePassword from keystoneclient.v3 import Client as KeystoneClient from designateclient.v2 import client as designateclient def get_keystone_session(project): return KeystoneSessi...
43.73913
144
0.717694
import yaml from keystoneclient.session import Session as KeystoneSession from keystoneclient.auth.identity.v3 import Password as KeystonePassword from keystoneclient.v3 import Client as KeystoneClient from designateclient.v2 import client as designateclient def get_keystone_session(project): return KeystoneSessi...
true
true
f71d5e89c15f2a96ab7cbc7f7360399c1dc32ae8
895
py
Python
run_models.py
rustygentile/hornet-model
d6c7dce26de241a17fd7534b0e98b6a0112bf67f
[ "MIT" ]
null
null
null
run_models.py
rustygentile/hornet-model
d6c7dce26de241a17fd7534b0e98b6a0112bf67f
[ "MIT" ]
null
null
null
run_models.py
rustygentile/hornet-model
d6c7dce26de241a17fd7534b0e98b6a0112bf67f
[ "MIT" ]
1
2022-01-19T09:28:18.000Z
2022-01-19T09:28:18.000Z
import logging from src.prep_data import main as prep_data from src.run_sims import run_aggressive_sim, run_conservative_sim from src.regression import make_and_run_model as run_model from src.coupled import make_and_run_model as run_coupled __author__ = 'Rusty Gentile' logger = logging.getLogger(__name__) ...
28.870968
69
0.694972
import logging from src.prep_data import main as prep_data from src.run_sims import run_aggressive_sim, run_conservative_sim from src.regression import make_and_run_model as run_model from src.coupled import make_and_run_model as run_coupled __author__ = 'Rusty Gentile' logger = logging.getLogger(__name__) ...
true
true
f71d61aa74de71397274ca14541acb7ad4c127e6
4,177
py
Python
scraper/scraper.py
SebChw/IsMusicANaturalLanguage
9cb245f9bea6c0f93863920fceeea867efa73ded
[ "MIT" ]
null
null
null
scraper/scraper.py
SebChw/IsMusicANaturalLanguage
9cb245f9bea6c0f93863920fceeea867efa73ded
[ "MIT" ]
null
null
null
scraper/scraper.py
SebChw/IsMusicANaturalLanguage
9cb245f9bea6c0f93863920fceeea867efa73ded
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import requests from selenium import webdriver from selenium.webdriver.common.by import By import os #! the very same functions are in scraper_artist.py. I just didn't want to make any dependencies with such simple scripts def find_sublinks(artist_link): """Some artists have that ma...
32.632813
145
0.681111
from bs4 import BeautifulSoup import requests from selenium import webdriver from selenium.webdriver.common.by import By import os def find_sublinks(artist_link): links = [artist_link] URL = f"https://freemidi.org/{artist_link}" # as it's written it works only for freemidi page artist_page = requests.g...
true
true
f71d63616367a7865c7b5676a10efc4ac37adc93
1,877
py
Python
modules/readers/vtkStructPtsRDR.py
chrisidefix/devide
99bfe156e710fa47ba7ae88b0ce1eef592a3a439
[ "BSD-3-Clause" ]
25
2015-08-24T16:05:14.000Z
2020-12-09T20:07:14.000Z
modules/readers/vtkStructPtsRDR.py
chrisidefix/devide
99bfe156e710fa47ba7ae88b0ce1eef592a3a439
[ "BSD-3-Clause" ]
1
2016-02-16T21:18:10.000Z
2016-02-16T21:18:10.000Z
modules/readers/vtkStructPtsRDR.py
chrisidefix/devide
99bfe156e710fa47ba7ae88b0ce1eef592a3a439
[ "BSD-3-Clause" ]
5
2016-02-16T20:05:37.000Z
2020-01-31T11:27:39.000Z
# $Id$ from module_base import ModuleBase from module_mixins import FilenameViewModuleMixin import module_utils import vtk class vtkStructPtsRDR(FilenameViewModuleMixin, ModuleBase): def __init__(self, module_manager): # call parent constructor ModuleBase.__init__(self, module_manager) ...
26.814286
60
0.640384
from module_base import ModuleBase from module_mixins import FilenameViewModuleMixin import module_utils import vtk class vtkStructPtsRDR(FilenameViewModuleMixin, ModuleBase): def __init__(self, module_manager): ModuleBase.__init__(self, module_manager) self._reader = vtk.vtkStructure...
true
true