hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7138d56d61ad0e8b49d63539499d3a2e9af36e4
6,810
py
Python
flomaster/flomaster.py
HaykTarkhanyan/flomasterplot
28cc7e53a7b947cded45828efd8777c922b32649
[ "MIT" ]
1
2022-01-26T08:48:02.000Z
2022-01-26T08:48:02.000Z
flomaster/flomaster.py
HaykTarkhanyan/flomasterplot
28cc7e53a7b947cded45828efd8777c922b32649
[ "MIT" ]
3
2022-02-07T09:28:49.000Z
2022-02-07T09:30:32.000Z
flomaster/flomaster.py
HaykTarkhanyan/flomasterplot
28cc7e53a7b947cded45828efd8777c922b32649
[ "MIT" ]
null
null
null
from helpers import * from plots import * from col_type_detector import * # from configs import * import warnings def generate_flomaster_plot(df, x="None", y=[], group_by=None, plot_type=None, x_axis=None, y_axis=None, title=None): """ Function generates interactive plot for given dataframe and columns ...
41.52439
125
0.567988
from helpers import * from plots import * from col_type_detector import * import warnings def generate_flomaster_plot(df, x="None", y=[], group_by=None, plot_type=None, x_axis=None, y_axis=None, title=None): if type(y) == str: y = [y] data_types = get_column_types(df, num_unique_categories=2) i...
true
true
f7138db8354b61ab6765a0e6828a80d6ecfe9b37
207
py
Python
l_06_lambda_functions/lists/ex_06_revers_list_in_place.py
VasAtanasov/SoftUni-Python-Fundamentals
471d0537dd6e5c8b61ede92b7673c0d67e2964fd
[ "MIT" ]
1
2019-06-05T11:16:08.000Z
2019-06-05T11:16:08.000Z
l_06_lambda_functions/lists/ex_06_revers_list_in_place.py
VasAtanasov/SoftUni-Python-Fundamentals
471d0537dd6e5c8b61ede92b7673c0d67e2964fd
[ "MIT" ]
null
null
null
l_06_lambda_functions/lists/ex_06_revers_list_in_place.py
VasAtanasov/SoftUni-Python-Fundamentals
471d0537dd6e5c8b61ede92b7673c0d67e2964fd
[ "MIT" ]
null
null
null
numbers = [int(num) for num in input().split(' ')] for i in range(len(numbers) // 2): temp = numbers[i] numbers[i] = numbers[- 1 - i] numbers[- 1 - i] = temp print(" ".join(map(str, numbers)))
23
50
0.565217
numbers = [int(num) for num in input().split(' ')] for i in range(len(numbers) // 2): temp = numbers[i] numbers[i] = numbers[- 1 - i] numbers[- 1 - i] = temp print(" ".join(map(str, numbers)))
true
true
f7138e34b3cee8963f54cec8f31ba5de752ed57b
1,541
py
Python
scripts/analyze_noise.py
nasa/GPU_SDR
5b6968425ace9b7ebddce4a4f5e5d963e74557e4
[ "Apache-2.0" ]
9
2019-07-23T10:31:18.000Z
2022-03-15T19:29:26.000Z
scripts/analyze_noise.py
BelmY/GPU_SDR
5b6968425ace9b7ebddce4a4f5e5d963e74557e4
[ "Apache-2.0" ]
null
null
null
scripts/analyze_noise.py
BelmY/GPU_SDR
5b6968425ace9b7ebddce4a4f5e5d963e74557e4
[ "Apache-2.0" ]
7
2019-08-29T20:47:56.000Z
2021-06-10T15:07:35.000Z
import sys,os,glob try: import pyUSRP as u except ImportError: try: sys.path.append('..') import pyUSRP as u except ImportError: print "Cannot find the pyUSRP package" import argparse def run(backend, files, welch, dbc): for f in files: u.calculate_noise(f, verbose = ...
34.244444
181
0.673589
import sys,os,glob try: import pyUSRP as u except ImportError: try: sys.path.append('..') import pyUSRP as u except ImportError: print "Cannot find the pyUSRP package" import argparse def run(backend, files, welch, dbc): for f in files: u.calculate_noise(f, verbose = ...
false
true
f7138f66a9017b9b3ef79b6f7ee60acad455cd18
8,620
py
Python
angr/analyses/xrefs.py
Kyle-Kyle/angr
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
[ "BSD-2-Clause" ]
1
2020-11-02T00:37:29.000Z
2020-11-02T00:37:29.000Z
angr/analyses/xrefs.py
Kyle-Kyle/angr
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/xrefs.py
Kyle-Kyle/angr
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
[ "BSD-2-Clause" ]
3
2019-10-17T07:47:36.000Z
2022-01-24T23:38:13.000Z
from collections import defaultdict import pyvex from ..knowledge_plugins.xrefs import XRef, XRefType from ..engines.light import SimEngineLight, SimEngineLightVEXMixin from .propagator.vex_vars import VEXTmp from .propagator.values import Top from . import register_analysis from .analysis import Analysis from .forw...
37.316017
118
0.616821
from collections import defaultdict import pyvex from ..knowledge_plugins.xrefs import XRef, XRefType from ..engines.light import SimEngineLight, SimEngineLightVEXMixin from .propagator.vex_vars import VEXTmp from .propagator.values import Top from . import register_analysis from .analysis import Analysis from .forw...
true
true
f71391843e2e54a205556f3567aac75b3bdccfae
639
py
Python
howfairis/mixins/RepositoryMixin.py
benvanwerkhoven/howfairis
e7128cee164154950a14b613f12c284a5fca872b
[ "Apache-2.0" ]
null
null
null
howfairis/mixins/RepositoryMixin.py
benvanwerkhoven/howfairis
e7128cee164154950a14b613f12c284a5fca872b
[ "Apache-2.0" ]
null
null
null
howfairis/mixins/RepositoryMixin.py
benvanwerkhoven/howfairis
e7128cee164154950a14b613f12c284a5fca872b
[ "Apache-2.0" ]
null
null
null
import requests class RepositoryMixin: def has_open_repository(self): url = "https://api.github.com/repos/{0}/{1}".format(self.owner, self.repo) try: response = requests.get(url) # If the response was successful, no Exception will be raised response.raise_for_...
31.95
82
0.635368
import requests class RepositoryMixin: def has_open_repository(self): url = "https://api.github.com/repos/{0}/{1}".format(self.owner, self.repo) try: response = requests.get(url) response.raise_for_status() except requests.HTTPError: self.p...
true
true
f71392d14012ff483e50a88f5af4140a2f1e471c
29,691
py
Python
tb_rest_client/api_client.py
moravcik94/python_tb_rest_client
985361890cdf4ccce93d2b24905ad9003c8dfcaa
[ "Apache-2.0" ]
1
2021-07-19T10:09:04.000Z
2021-07-19T10:09:04.000Z
tb_rest_client/api_client.py
moravcik94/python_tb_rest_client
985361890cdf4ccce93d2b24905ad9003c8dfcaa
[ "Apache-2.0" ]
null
null
null
tb_rest_client/api_client.py
moravcik94/python_tb_rest_client
985361890cdf4ccce93d2b24905ad9003c8dfcaa
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # Copyright 2020. ThingsBoard # # # 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...
41.180305
166
0.541814
from __future__ import absolute_import import datetime import json import mimetypes from multiprocessing.pool import ThreadPool import os import re import tempfile import six from six.moves.urllib.parse import quote from tb_rest_client.configuration import Configuration import tb_rest_client.models.models_ce import...
true
true
f71392e2fbf017a0e527288ef371bbfe610ae9e9
2,749
py
Python
python/craftassist/dialogue_objects/put_memory_handler.py
kepolol/craftassist
f60a7edd0b4ea72b774cca45ba468d2e275445c2
[ "MIT" ]
null
null
null
python/craftassist/dialogue_objects/put_memory_handler.py
kepolol/craftassist
f60a7edd0b4ea72b774cca45ba468d2e275445c2
[ "MIT" ]
null
null
null
python/craftassist/dialogue_objects/put_memory_handler.py
kepolol/craftassist
f60a7edd0b4ea72b774cca45ba468d2e275445c2
[ "MIT" ]
1
2020-07-16T02:16:24.000Z
2020-07-16T02:16:24.000Z
""" Copyright (c) Facebook, Inc. and its affiliates. """ import logging from typing import Dict, Tuple, Any, Optional from .dialogue_object import DialogueObject from memory_nodes import ObjectNode, RewardNode from .interpreter_helper import interpret_reference_object, ErrorWithResponse class PutMemoryHandler(Dialo...
37.148649
80
0.623863
import logging from typing import Dict, Tuple, Any, Optional from .dialogue_object import DialogueObject from memory_nodes import ObjectNode, RewardNode from .interpreter_helper import interpret_reference_object, ErrorWithResponse class PutMemoryHandler(DialogueObject): def __init__(self, speaker_name: str, act...
true
true
f71393eb95ae2bfda6e5bcd40e868594b6708b0c
30,920
py
Python
test/functional/test_framework/p2p.py
ngi-nix/namecoin-core-1
c1625db14b15bf93a362916b268b0abf6fabf7b1
[ "MIT" ]
2
2021-06-04T10:39:59.000Z
2021-06-16T00:03:57.000Z
test/functional/test_framework/p2p.py
Penny-Admixture/namecoin-core
c750aba537f6d10a3a565814f53f4999577142ab
[ "MIT" ]
1
2021-09-06T21:01:56.000Z
2021-09-15T21:05:19.000Z
test/functional/test_framework/p2p.py
Penny-Admixture/namecoin-core
c750aba537f6d10a3a565814f53f4999577142ab
[ "MIT" ]
1
2021-08-10T14:03:36.000Z
2021-08-10T14:03:36.000Z
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test objects...
39.08976
190
0.649968
import asyncio from collections import defaultdict from io import BytesIO import logging import struct import sys import threading from test_framework.messages import ( CBlockHeader, MAX_HEADERS_RESULTS, msg_addr, msg_addrv2, msg_block, MSG_BLOCK, msg_blocktxn, msg_cfcheckpt, msg_c...
true
true
f713940d48a4cf34f076e6a66255232416836474
16,010
py
Python
game_agent.py
hussaial/Isolation-search-agent
754b57905c5a309bbfbec61cfba3478682e3fcd1
[ "MIT" ]
null
null
null
game_agent.py
hussaial/Isolation-search-agent
754b57905c5a309bbfbec61cfba3478682e3fcd1
[ "MIT" ]
null
null
null
game_agent.py
hussaial/Isolation-search-agent
754b57905c5a309bbfbec61cfba3478682e3fcd1
[ "MIT" ]
null
null
null
"""This file contains all the classes you must complete for this project. You can use the test cases in agent_test.py to help during development, and augment the test suite with your own test cases to further test your code. You must test your agent's strength against a set of agents with known relative strength usin...
38.393285
176
0.563835
import random import sys import math class Timeout(Exception): pass def custom_score(game, player): if game.is_loser(player): return float("-inf") if game.is_winner(player): return float("inf") own_score = 0.0 opp_score = 0.0 own_moves = gam...
true
true
f713965066ae4da4f72c16ee7b79fbf81894ed84
2,734
py
Python
scheduler_task/scheduler_task.py
IanVzs/WindWhisper
742bc3e08d3edbd3ad9112c3149c0ad291b5e762
[ "MIT" ]
2
2020-11-18T11:01:24.000Z
2020-11-19T16:10:59.000Z
scheduler_task/scheduler_task.py
IanVzs/WindWhisper
742bc3e08d3edbd3ad9112c3149c0ad291b5e762
[ "MIT" ]
2
2020-09-10T06:20:28.000Z
2020-11-18T10:45:19.000Z
scheduler_task/scheduler_task.py
IanVzs/WindWhisper
742bc3e08d3edbd3ad9112c3149c0ad291b5e762
[ "MIT" ]
null
null
null
""" requests: sqlalchemy apscheduler 定时任务 sqlalchemy 文档: https://apscheduler.readthedocs.io/en/stable/index.html """ import time import json try: from pytz import utc, timezone china_tz = timezone('Asia/Shanghai') from apscheduler.schedulers.background import BackgroundScheduler # from apsched...
32.939759
99
0.656547
import time import json try: from pytz import utc, timezone china_tz = timezone('Asia/Shanghai') from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from aps...
true
true
f713967d33b8d32a374b78f34d77db9b0b616d88
29,988
py
Python
pynot/phot.py
jkrogager/PyNOT
2514a443079e50c12a13ebbd89a48f91a8d20626
[ "MIT" ]
2
2021-06-09T11:54:52.000Z
2021-07-29T07:47:05.000Z
pynot/phot.py
jkrogager/PyNOT
2514a443079e50c12a13ebbd89a48f91a8d20626
[ "MIT" ]
8
2021-06-21T09:44:57.000Z
2022-03-30T11:13:32.000Z
pynot/phot.py
jkrogager/PyNOT
2514a443079e50c12a13ebbd89a48f91a8d20626
[ "MIT" ]
1
2021-04-01T07:42:24.000Z
2021-04-01T07:42:24.000Z
""" Functions for Imaging Pipeline """ import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Ellipse from astropy.io import fits from astropy.modeling import models, fitting from astropy.table import Table from scipy.optimize import curve_fit import os from astropy.coordinates import SkyCo...
39.097784
150
0.627318
import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Ellipse from astropy.io import fits from astropy.modeling import models, fitting from astropy.table import Table from scipy.optimize import curve_fit import os from astropy.coordinates import SkyCoord import astropy.units as u from astr...
true
true
f71396a904140ae652cf61c26217b8c4aeb3d744
1,418
py
Python
fiases/snapshot.py
u4097/elasticsearch-fias
d03e16492af2f39a7cc59723aa2af8d04998ecfd
[ "MIT" ]
3
2020-02-14T06:20:14.000Z
2022-01-10T12:40:13.000Z
fiases/snapshot.py
u4097/elasticsearch-fias
d03e16492af2f39a7cc59723aa2af8d04998ecfd
[ "MIT" ]
null
null
null
fiases/snapshot.py
u4097/elasticsearch-fias
d03e16492af2f39a7cc59723aa2af8d04998ecfd
[ "MIT" ]
1
2020-02-14T06:28:29.000Z
2020-02-14T06:28:29.000Z
from elasticsearch.client import SnapshotClient from fiases.fias_data import ES import fiases.fias_data sn = SnapshotClient(ES) def register(location="/usr/share/elasticsearch/snapshots"): sn_body = { "type": "fs", "settings": { "compress": "true", "location": location } ...
25.321429
68
0.580395
from elasticsearch.client import SnapshotClient from fiases.fias_data import ES import fiases.fias_data sn = SnapshotClient(ES) def register(location="/usr/share/elasticsearch/snapshots"): sn_body = { "type": "fs", "settings": { "compress": "true", "location": location } ...
true
true
f713982085f31293684f7aebfef7c22becf7b805
1,743
py
Python
app.py
cop1fab/Tasky
1be5436d770d78d8eb29b21a4a523e0c5b5d36ef
[ "MIT" ]
1
2019-09-29T19:27:08.000Z
2019-09-29T19:27:08.000Z
app.py
cop1fab/Tasky
1be5436d770d78d8eb29b21a4a523e0c5b5d36ef
[ "MIT" ]
null
null
null
app.py
cop1fab/Tasky
1be5436d770d78d8eb29b21a4a523e0c5b5d36ef
[ "MIT" ]
null
null
null
from flask import Flask, render_template, url_for, request, redirect from flask_sqlalchemy import SQLAlchemy from datetime import datetime app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db' db = SQLAlchemy(app) class Todo(db.Model): id = db.Column(db.Integer, primary_key=True) ...
25.26087
68
0.626506
from flask import Flask, render_template, url_for, request, redirect from flask_sqlalchemy import SQLAlchemy from datetime import datetime app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db' db = SQLAlchemy(app) class Todo(db.Model): id = db.Column(db.Integer, primary_key=True) ...
true
true
f71399781df5c8c63aa2982c55106c73ced70eaa
7,174
py
Python
lib/modules/powershell/management/powercat.py
terrorizer1980/Empire
9259e5106986847d2bb770c4289c0c0f1adf2344
[ "BSD-3-Clause" ]
2
2021-01-15T21:16:02.000Z
2021-05-16T21:02:36.000Z
lib/modules/powershell/management/powercat.py
terrorizer1980/Empire
9259e5106986847d2bb770c4289c0c0f1adf2344
[ "BSD-3-Clause" ]
1
2020-11-04T08:15:12.000Z
2020-11-04T08:15:12.000Z
lib/modules/powershell/management/powercat.py
InfinitelyFreedom/Empire
3a922f60d92658fb716efb3be5a1c15074114766
[ "BSD-3-Clause" ]
1
2022-01-04T17:36:40.000Z
2022-01-04T17:36:40.000Z
from __future__ import print_function from builtins import object from builtins import str from lib.common import helpers class Module(object): def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module...
34.657005
115
0.476861
from __future__ import print_function from builtins import object from builtins import str from lib.common import helpers class Module(object): def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'PowerCat', 'Author': ['besimorhino'],...
true
true
f7139ab3f0fb49d1cac5d3f59d00c8d5d31e3407
1,459
py
Python
main.py
lerignoux/docker-gcloud-control
6bbe1c7f0b9712c3791637d8d83251441ed27bf8
[ "Apache-2.0" ]
null
null
null
main.py
lerignoux/docker-gcloud-control
6bbe1c7f0b9712c3791637d8d83251441ed27bf8
[ "Apache-2.0" ]
null
null
null
main.py
lerignoux/docker-gcloud-control
6bbe1c7f0b9712c3791637d8d83251441ed27bf8
[ "Apache-2.0" ]
null
null
null
import argparse import logging import os from time import sleep from googleapiclient import discovery log = logging.getLogger(__name__) parser = argparse.ArgumentParser(description="Control a google cloud instance.") parser.add_argument('--debug', '-d', dest='debug', action='store_true', help="Debug mode") parser.a...
36.475
142
0.69294
import argparse import logging import os from time import sleep from googleapiclient import discovery log = logging.getLogger(__name__) parser = argparse.ArgumentParser(description="Control a google cloud instance.") parser.add_argument('--debug', '-d', dest='debug', action='store_true', help="Debug mode") parser.a...
true
true
f7139b8260a7a3d0d34eb5ed213faef11825e676
4,055
py
Python
pyFU/flat.py
fhessman/pyFU
d9a880287f902176a6d9234e4c38180a942614d8
[ "MIT" ]
null
null
null
pyFU/flat.py
fhessman/pyFU
d9a880287f902176a6d9234e4c38180a942614d8
[ "MIT" ]
null
null
null
pyFU/flat.py
fhessman/pyFU
d9a880287f902176a6d9234e4c38180a942614d8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # pyfu/flat.py """ Method for calculating the correction for the relative transmissions of the fibres using extracted sky flats. The OBJTYP term "flatness" was created to distinguish this correction from that of a true flatfield. """ import numpy as np import logging from astropy.io impo...
35.26087
110
0.643896
""" Method for calculating the correction for the relative transmissions of the fibres using extracted sky flats. The OBJTYP term "flatness" was created to distinguish this correction from that of a true flatfield. """ import numpy as np import logging from astropy.io import fits from astropy.table import Table...
false
true
f7139ce7db9740ed4872b368a0cddb95a859e9c8
450
py
Python
code/stable/nopcm/src/python/Constants.py
Daisy-C/Drasil
20a877e463965dbb034a84a7094cdd73bdc0eb98
[ "BSD-2-Clause" ]
114
2017-12-16T04:51:37.000Z
2021-12-20T16:27:51.000Z
code/stable/nopcm/src/python/Constants.py
Daisy-C/Drasil
20a877e463965dbb034a84a7094cdd73bdc0eb98
[ "BSD-2-Clause" ]
1,762
2017-12-02T14:39:11.000Z
2022-03-29T16:28:57.000Z
code/stable/nopcm/src/python/Constants.py
Daisy-C/Drasil
20a877e463965dbb034a84a7094cdd73bdc0eb98
[ "BSD-2-Clause" ]
31
2018-11-25T22:16:12.000Z
2021-12-01T20:15:38.000Z
## \file Constants.py # \author Thulasi Jegatheesan # \brief Provides the structure for holding constant values ## \brief Structure for holding the constant values class Constants: pi = 3.14159265 L_min = 0.1 L_max = 50.0 rho_W_min = 950.0 rho_W_max = 1000.0 A_C_max = 100000.0 C_W_min = 4170...
23.684211
59
0.653333
class Constants: pi = 3.14159265 L_min = 0.1 L_max = 50.0 rho_W_min = 950.0 rho_W_max = 1000.0 A_C_max = 100000.0 C_W_min = 4170.0 C_W_max = 4210.0 h_C_min = 10.0 h_C_max = 10000.0 t_final_max = 86400.0 AR_min = 1.0e-2 AR_max = 100.0
true
true
f7139d0d1c6f8bab13a8e63017a7ecb263d70f2d
828
py
Python
hckclone/users/urls.py
hckcksrl/hckclone
3e2585b3a3ca63798d46ade02255a56e795837bf
[ "MIT" ]
null
null
null
hckclone/users/urls.py
hckcksrl/hckclone
3e2585b3a3ca63798d46ade02255a56e795837bf
[ "MIT" ]
null
null
null
hckclone/users/urls.py
hckcksrl/hckclone
3e2585b3a3ca63798d46ade02255a56e795837bf
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = "users" urlpatterns = [ path( "<str:username>", view = views.UserProfile.as_view(), name = "user_profile" ), path( "<str:username>/following", view = views.UserFollowing.as_view(), name = "user_foll...
21.789474
46
0.541063
from django.urls import path from . import views app_name = "users" urlpatterns = [ path( "<str:username>", view = views.UserProfile.as_view(), name = "user_profile" ), path( "<str:username>/following", view = views.UserFollowing.as_view(), name = "user_foll...
true
true
f7139da2c15dad77fce6e96abeded28353137ed9
18,589
py
Python
odoo-13.0/venv/lib/python3.8/site-packages/zeep/wsdl/messages/soap.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/venv/lib/python3.8/site-packages/zeep/wsdl/messages/soap.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/venv/lib/python3.8/site-packages/zeep/wsdl/messages/soap.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
""" zeep.wsdl.messages.soap ~~~~~~~~~~~~~~~~~~~~~~~ """ import copy from collections import OrderedDict from lxml import etree from lxml.builder import ElementMaker from zeep import exceptions, xsd from zeep.utils import as_qname from zeep.xsd.context import XmlParserContext from zeep.wsdl.messages.base impo...
35.748077
98
0.607026
import copy from collections import OrderedDict from lxml import etree from lxml.builder import ElementMaker from zeep import exceptions, xsd from zeep.utils import as_qname from zeep.xsd.context import XmlParserContext from zeep.wsdl.messages.base import ConcreteMessage, SerializedMessage from zeep.wsdl.messages.mul...
true
true
f713a0592cc26640121c0ba7b80b466b8ece1a2d
59,710
py
Python
test/metric_learn_test.py
RobinVogel/metric-learn
5f4def7b9f6b877d24b7662f0f1ef54c3dc4d5eb
[ "MIT" ]
1
2020-05-22T19:04:24.000Z
2020-05-22T19:04:24.000Z
test/metric_learn_test.py
q-vision/metric-learn
a30471424d35b0ef47582751fa6acea7b3a3bce5
[ "MIT" ]
null
null
null
test/metric_learn_test.py
q-vision/metric-learn
a30471424d35b0ef47582751fa6acea7b3a3bce5
[ "MIT" ]
null
null
null
import unittest import re import pytest import numpy as np import scipy from scipy.optimize import check_grad, approx_fprime from six.moves import xrange from sklearn.metrics import pairwise_distances, euclidean_distances from sklearn.datasets import (load_iris, make_classification, make_regression, ...
41.901754
79
0.635505
import unittest import re import pytest import numpy as np import scipy from scipy.optimize import check_grad, approx_fprime from six.moves import xrange from sklearn.metrics import pairwise_distances, euclidean_distances from sklearn.datasets import (load_iris, make_classification, make_regression, ...
true
true
f713a22268d35fec0c248fbb31768628bbadd87f
412
py
Python
csv_to_table/migrations/0004_auto_20200119_1410.py
KariSpace/CRM_Sedicomm
cb19e90ca99c7a50a1841afbfb878191f62dec5c
[ "MIT" ]
null
null
null
csv_to_table/migrations/0004_auto_20200119_1410.py
KariSpace/CRM_Sedicomm
cb19e90ca99c7a50a1841afbfb878191f62dec5c
[ "MIT" ]
null
null
null
csv_to_table/migrations/0004_auto_20200119_1410.py
KariSpace/CRM_Sedicomm
cb19e90ca99c7a50a1841afbfb878191f62dec5c
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-01-19 12:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('csv_to_table', '0003_auto_20200119_1405'), ] operations = [ migrations.AlterField( model_name='people', name='date', ...
21.684211
75
0.614078
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('csv_to_table', '0003_auto_20200119_1405'), ] operations = [ migrations.AlterField( model_name='people', name='date', field=models.DateField(auto_now_add...
true
true
f713a32ffa56c392f78bb86890ac67b2a4fb768f
1,249
py
Python
classes/abstract_command.py
platofff/quote-bot
ab7e96b8ce67f16e879cf8628cbbbac6d63eab83
[ "MIT" ]
1
2021-10-16T18:48:05.000Z
2021-10-16T18:48:05.000Z
classes/abstract_command.py
platofff/quote-bot
ab7e96b8ce67f16e879cf8628cbbbac6d63eab83
[ "MIT" ]
null
null
null
classes/abstract_command.py
platofff/quote-bot
ab7e96b8ce67f16e879cf8628cbbbac6d63eab83
[ "MIT" ]
1
2022-01-15T14:11:26.000Z
2022-01-15T14:11:26.000Z
import json config = 'config.json' with open(config, 'r') as f: data = json.load(f) default = data["default"] class AbstractCommand(): def __init__(self, handler = [], description = None): self.handler = handler self.description = description def hdl(self): return self.ha...
26.020833
73
0.453963
import json config = 'config.json' with open(config, 'r') as f: data = json.load(f) default = data["default"] class AbstractCommand(): def __init__(self, handler = [], description = None): self.handler = handler self.description = description def hdl(self): return self.ha...
true
true
f713a46f949cdeca6f625144d43e51fc0aacc310
24,542
py
Python
localstack/services/install.py
VanRoy/localstack
39f1a1c034ae345f87a1485d717428b59308e6fc
[ "Apache-2.0" ]
1
2022-01-05T10:10:38.000Z
2022-01-05T10:10:38.000Z
localstack/services/install.py
VanRoy/localstack
39f1a1c034ae345f87a1485d717428b59308e6fc
[ "Apache-2.0" ]
null
null
null
localstack/services/install.py
VanRoy/localstack
39f1a1c034ae345f87a1485d717428b59308e6fc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import functools import glob import logging import os import platform import re import shutil import stat import sys import tempfile import time from pathlib import Path from typing import Callable, Dict, List, Tuple import requests from plugin import Plugin, PluginManager from localstack import...
36.251108
164
0.691223
import functools import glob import logging import os import platform import re import shutil import stat import sys import tempfile import time from pathlib import Path from typing import Callable, Dict, List, Tuple import requests from plugin import Plugin, PluginManager from localstack import config from localstac...
true
true
f713a54b6e20ca35a6b59abf3d1037510ba24f26
4,880
py
Python
script_projet/MainAnnotator.py
JyLIU-emma/Complexit-_recettes
9ae6db442cbf3f10460a5e1b6e2d7d33fdf8f8f3
[ "CC0-1.0" ]
null
null
null
script_projet/MainAnnotator.py
JyLIU-emma/Complexit-_recettes
9ae6db442cbf3f10460a5e1b6e2d7d33fdf8f8f3
[ "CC0-1.0" ]
null
null
null
script_projet/MainAnnotator.py
JyLIU-emma/Complexit-_recettes
9ae6db442cbf3f10460a5e1b6e2d7d33fdf8f8f3
[ "CC0-1.0" ]
null
null
null
""" le script principale sert à annoter un répertoire de fichiers xml de recettes """ import glob import re import os from oper_utils import xml_to_recipe_annotated from Ner_classifieur_annote import load_crf_model, predict_text, transform_to_xml_annote from NER_ingredient_detector import get_content_from_xmlfile from...
43.963964
207
0.647541
import glob import re import os from oper_utils import xml_to_recipe_annotated from Ner_classifieur_annote import load_crf_model, predict_text, transform_to_xml_annote from NER_ingredient_detector import get_content_from_xmlfile from ComplexCalculator import ComplexCalculator modelpath = "../ml_models/model-20210515...
true
true
f713a559516860b1f3ff1a93a7e37ed2fca2b47d
526
py
Python
lognotify/setup.py
shashank-ssriva/lognotify
800cb76c55d01d8fafde214486059794846887df
[ "MIT" ]
null
null
null
lognotify/setup.py
shashank-ssriva/lognotify
800cb76c55d01d8fafde214486059794846887df
[ "MIT" ]
null
null
null
lognotify/setup.py
shashank-ssriva/lognotify
800cb76c55d01d8fafde214486059794846887df
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='lognotify', version='0.1', py_modules = ['lognotify'], description='A real-time log monitoring & notification utility which pops up a notification (while running your application) whenever it sees an error in log-file.', url='http://github.com/shashank-s...
32.875
171
0.63308
from setuptools import setup setup(name='lognotify', version='0.1', py_modules = ['lognotify'], description='A real-time log monitoring & notification utility which pops up a notification (while running your application) whenever it sees an error in log-file.', url='http://github.com/shashank-s...
true
true
f713a65884e06087a7d7534a6c0f82513c734815
1,428
py
Python
60824855-centroid-arcLength-approxPolyDP/centroid_room.py
nathancy/stackoverflow
e9e2e2b8fba61e41526638a13ac7ada6de2d7560
[ "MIT" ]
3
2019-09-18T10:45:20.000Z
2021-09-18T08:36:49.000Z
60824855-centroid-arcLength-approxPolyDP/centroid_room.py
nathancy/stackoverflow
e9e2e2b8fba61e41526638a13ac7ada6de2d7560
[ "MIT" ]
1
2020-03-19T15:49:31.000Z
2020-03-30T14:54:03.000Z
60824855-centroid-arcLength-approxPolyDP/centroid_room.py
nathancy/stackoverflow
e9e2e2b8fba61e41526638a13ac7ada6de2d7560
[ "MIT" ]
1
2021-04-08T19:30:42.000Z
2021-04-08T19:30:42.000Z
import cv2 import numpy as np # Load image, grayscale, Otsu's threshold image = cv2.imread('1.png') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1] # Remove text cnts = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) cnts...
34
139
0.648459
import cv2 import numpy as np image = cv2.imread('1.png') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1] # Remove text cnts = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) cnts = cnts[0] if len(cnts) == 2 else cnts[1] ...
true
true
f713a67c0c5b77aacca20f819144495e8969b5c4
45,738
py
Python
conans/client/conan_api.py
kolrami/conan
93e4191e970d7ea464901c62d680d76517bb76ca
[ "MIT" ]
null
null
null
conans/client/conan_api.py
kolrami/conan
93e4191e970d7ea464901c62d680d76517bb76ca
[ "MIT" ]
null
null
null
conans/client/conan_api.py
kolrami/conan
93e4191e970d7ea464901c62d680d76517bb76ca
[ "MIT" ]
null
null
null
import os import sys import requests from collections import OrderedDict import conans from conans import __version__ as client_version from conans.client.cmd.create import create from conans.client.hook_manager import HookManager from conans.client.recorder.action_recorder import ActionRecorder from conans.client.cl...
45.829659
125
0.642792
import os import sys import requests from collections import OrderedDict import conans from conans import __version__ as client_version from conans.client.cmd.create import create from conans.client.hook_manager import HookManager from conans.client.recorder.action_recorder import ActionRecorder from conans.client.cl...
true
true
f713a7ea6776cb4b67b41e994ff550f530ea010a
2,778
py
Python
leaf/selling/order/manager.py
guiqiqi/leaf
79e34f4b8fba8c6fd208b5a3049103dca2064ab5
[ "Apache-2.0" ]
119
2020-01-30T04:25:03.000Z
2022-03-27T07:15:45.000Z
leaf/selling/order/manager.py
guiqiqi/leaf
79e34f4b8fba8c6fd208b5a3049103dca2064ab5
[ "Apache-2.0" ]
8
2020-02-02T05:49:47.000Z
2021-01-25T03:31:09.000Z
leaf/selling/order/manager.py
guiqiqi/leaf
79e34f4b8fba8c6fd208b5a3049103dca2064ab5
[ "Apache-2.0" ]
11
2020-01-31T15:07:11.000Z
2021-03-24T03:47:48.000Z
""" 使用有限状态机算法 通过已经创建的事件和状态 对订单状态进行自动的调度 """ # pylint: disable=arguments-differ from typing import NoReturn from ...core.tools import web from ...core.algorithm import fsm from . import events from . import status from . import settings # 状态转移表 _TransferTable = ( (status.Created, events.Confirm, status.Confirmed)...
33.46988
74
0.658747
from typing import NoReturn from ...core.tools import web from ...core.algorithm import fsm from . import events from . import status from . import settings _TransferTable = ( (status.Created, events.Confirm, status.Confirmed), (status.Created, events.UserClose, status.Closed), (status.Created, events.Or...
true
true
f713a8a1a1549acb0e7bad080484cb845b0706a9
1,917
py
Python
numpy/ma/tests/test_regression.py
WeatherGod/numpy
5be45b280b258e158b93163b937f8f9c08d30393
[ "BSD-3-Clause" ]
null
null
null
numpy/ma/tests/test_regression.py
WeatherGod/numpy
5be45b280b258e158b93163b937f8f9c08d30393
[ "BSD-3-Clause" ]
null
null
null
numpy/ma/tests/test_regression.py
WeatherGod/numpy
5be45b280b258e158b93163b937f8f9c08d30393
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division, absolute_import, print_function import numpy as np import numpy.ma as ma from numpy.testing import * from numpy.compat import sixu rlevel = 1 class TestRegression(TestCase): def test_masked_array_create(self,level=rlevel): """Ticket #17""" x = np.ma.masked_array([...
28.61194
74
0.581116
from __future__ import division, absolute_import, print_function import numpy as np import numpy.ma as ma from numpy.testing import * from numpy.compat import sixu rlevel = 1 class TestRegression(TestCase): def test_masked_array_create(self,level=rlevel): x = np.ma.masked_array([0,1,2,3,0,4,5,6],mask=[0,...
true
true
f713a9dc7b039e0ec3ed6a843cbb5ec20cd3d558
23,351
py
Python
source/spot_detection_tracking/trackmate_xml_2d.py
zhanyinx/SPT_analysis
1cf806c1fd6051e7fc998d2860a16bea6aa9de1a
[ "MIT" ]
1
2021-07-09T11:51:04.000Z
2021-07-09T11:51:04.000Z
source/spot_detection_tracking/trackmate_xml_2d.py
zhanyinx/SPT_analysis
1cf806c1fd6051e7fc998d2860a16bea6aa9de1a
[ "MIT" ]
null
null
null
source/spot_detection_tracking/trackmate_xml_2d.py
zhanyinx/SPT_analysis
1cf806c1fd6051e7fc998d2860a16bea6aa9de1a
[ "MIT" ]
null
null
null
"""\U0001F1EB\U0001F1EF \U00002B50 CSV track coordinate to TrackMate XML conversion. Fiji allows for quick and easy viewing of images. TrackMate can be used to view tracks. Unfortunately, it isn't that simple to convert "normal" coordinate output into TrackMate-viewable format. Requires a "tracks.csv" file that contai...
30.524183
90
0.480493
import argparse import os import tempfile import xml.dom.minidom import xml.etree.ElementTree as ET import numpy as np import pandas as pd import skimage.io def get_gaps(frames): def __longest_consecutive(a): a = set(a) longest = 0 for i in a: if i - 1 not in a: ...
true
true
f713ad1b0c007eaefdbe5b1736bad81fd1c6c192
5,530
py
Python
homekit/tools.py
LucaKaufmann/homekit_python
12f95aba5db676fa9254ccfb4382aa1f6cc8862d
[ "Apache-2.0" ]
null
null
null
homekit/tools.py
LucaKaufmann/homekit_python
12f95aba5db676fa9254ccfb4382aa1f6cc8862d
[ "Apache-2.0" ]
null
null
null
homekit/tools.py
LucaKaufmann/homekit_python
12f95aba5db676fa9254ccfb4382aa1f6cc8862d
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 Joachim Lusiardi # # 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 wri...
37.619048
120
0.682098
import json import sys import base64 import binascii from homekit.http_impl.http_client import HomeKitHTTPConnection from homekit.zeroconf_ import find_device_ip_and_port from homekit.protocol import get_session_keys from homekit.model.characteristics import CharacteristicFormats from distutils.util import strtobool ...
true
true
f713ad9cc4719c8e9bec1ba17ee8b320554f1bbc
3,331
py
Python
tests/test_models/test_engine/test_file_storage.py
yasheymateen/AirBnB_clone
865cbef47738371f66b9264635a04b983d7accfd
[ "Unlicense" ]
null
null
null
tests/test_models/test_engine/test_file_storage.py
yasheymateen/AirBnB_clone
865cbef47738371f66b9264635a04b983d7accfd
[ "Unlicense" ]
null
null
null
tests/test_models/test_engine/test_file_storage.py
yasheymateen/AirBnB_clone
865cbef47738371f66b9264635a04b983d7accfd
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 """ This module contains the tests for FileStorage class """ import unittest import io import sys import models from models.engine.file_storage import FileStorage from models.base_model import BaseModel from models.user import User from models.state import State from models.city import City from mode...
33.31
75
0.65686
import unittest import io import sys import models from models.engine.file_storage import FileStorage from models.base_model import BaseModel from models.user import User from models.state import State from models.city import City from models.amenity import Amenity from models.place import Place from models.review impo...
true
true
f713af60491a19d75d5d98d285087f166e61f127
12,467
py
Python
scripts/asr_language_modeling/neural_rescorer/eval_neural_rescorer.py
PatrykNeubauer/NeMo
3ada744b884dba5f233f22c6991fc6092c6ca8d0
[ "Apache-2.0" ]
2
2021-09-21T07:36:20.000Z
2022-02-05T15:29:04.000Z
scripts/asr_language_modeling/neural_rescorer/eval_neural_rescorer.py
PatrykNeubauer/NeMo
3ada744b884dba5f233f22c6991fc6092c6ca8d0
[ "Apache-2.0" ]
null
null
null
scripts/asr_language_modeling/neural_rescorer/eval_neural_rescorer.py
PatrykNeubauer/NeMo
3ada744b884dba5f233f22c6991fc6092c6ca8d0
[ "Apache-2.0" ]
12
2021-06-20T08:56:10.000Z
2022-03-16T19:07:10.000Z
# Copyright (c) 2021, NVIDIA CORPORATION. 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...
43.138408
136
0.657416
import contextlib import json from argparse import ArgumentParser import editdistance import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch import tqdm from nemo.collections.nlp.models.language_modeling import TransformerLMModel from nemo.utils import logging class BeamScoresDataset(...
true
true
f713afaf83175476277e6164a0ad61b115c896f7
1,900
py
Python
magnetic_diffusion/diffusion1D.py
mattzett/numerical_electromagnetics
07634817ba854a5515c8c31545b735f651878c5e
[ "MIT" ]
null
null
null
magnetic_diffusion/diffusion1D.py
mattzett/numerical_electromagnetics
07634817ba854a5515c8c31545b735f651878c5e
[ "MIT" ]
null
null
null
magnetic_diffusion/diffusion1D.py
mattzett/numerical_electromagnetics
07634817ba854a5515c8c31545b735f651878c5e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 21 19:43:50 2022 Illustrating a basic transient magnetic diffusion problem, See Jackson Section 5.18 @author: zettergm """ import numpy as np import scipy.sparse.linalg import scipy.sparse from scipy.special import erf import matplotlib.pyplot as ...
27.142857
128
0.678947
import numpy as np import scipy.sparse.linalg import scipy.sparse from scipy.special import erf import matplotlib.pyplot as plt from numpy import pi,sqrt,abs from difftools import matrix_kernel mu=4*pi*1e-7 sigma=1e6 D=1/mu/sigma a=1 H0=1 nu=1/mu/sigma/a**2 lz=250 Nmax=200 z=np.linspace(-5*a,5*a,lz) dz=z[1]-z[0] ...
true
true
f713b03a2ce3c22466f083dc5ee76b456b3c089f
2,341
py
Python
src/code.py
Bikin-Bot/cnnindonesia-news-api
4b137f5dcfa537fe4ece4fcc484cd6ab9166f5ac
[ "MIT" ]
28
2020-06-29T23:18:48.000Z
2021-12-19T07:15:32.000Z
src/code.py
Bikin-Bot/cnnindonesia-news-api
4b137f5dcfa537fe4ece4fcc484cd6ab9166f5ac
[ "MIT" ]
2
2020-11-04T06:53:08.000Z
2022-03-18T09:06:53.000Z
src/code.py
Bikin-Bot/cnnindonesia-news-api
4b137f5dcfa537fe4ece4fcc484cd6ab9166f5ac
[ "MIT" ]
17
2020-12-11T01:39:45.000Z
2022-03-29T01:25:24.000Z
from bs4 import BeautifulSoup from requests import get import json class Script: def query(self, url): datas = get(url) soup = BeautifulSoup(datas.text, 'html.parser') tag = soup.find_all('article') data = [] for i in tag: try: title = i.find('h...
30.012821
84
0.513883
from bs4 import BeautifulSoup from requests import get import json class Script: def query(self, url): datas = get(url) soup = BeautifulSoup(datas.text, 'html.parser') tag = soup.find_all('article') data = [] for i in tag: try: title = i.find('h...
true
true
f713b083499d28d14fa6a7c7ae53ff0fb3fad718
4,785
py
Python
extensions/utils.py
Yang-YiFan/DiracDeltaNet
36487542422d7573fec6e852b9eece18c6cbce21
[ "Apache-2.0" ]
30
2018-12-27T06:56:26.000Z
2022-01-10T10:43:53.000Z
extensions/utils.py
heheda365/DiracDeltaNet
36487542422d7573fec6e852b9eece18c6cbce21
[ "Apache-2.0" ]
4
2019-11-05T10:44:38.000Z
2021-06-22T18:41:08.000Z
extensions/utils.py
heheda365/DiracDeltaNet
36487542422d7573fec6e852b9eece18c6cbce21
[ "Apache-2.0" ]
12
2018-12-21T08:36:15.000Z
2021-12-16T08:38:27.000Z
'''Some helper functions for PyTorch, including: - get_mean_and_std: calculate the mean and std value of dataset. - msr_init: net parameter initialization. - progress_bar: progress bar mimic xlua.progress. ''' import os import sys import time import math import torch import torch.nn as nn impor...
28.482143
97
0.543783
import os import sys import time import math import torch import torch.nn as nn import torch.nn.init as init import numpy as np def get_mean_and_std(dataset): dataloader = torch.utils.data.DataLoader(dataset, batch_size=1, shuffle=True, num_workers=2) mean = torch.zeros(3) std = torch.zer...
true
true
f713b17335259f44d8fc254662e6850b184a61d9
9,180
py
Python
venv/lib/python3.6/site-packages/pip/_vendor/lockfile/__init__.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/pip/_vendor/lockfile/__init__.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
1
2021-06-01T23:32:38.000Z
2021-06-01T23:32:38.000Z
venv/lib/python3.6/site-packages/pip/_vendor/lockfile/__init__.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ lockfile.py - Platform-independent advisory file locks. Requires Python 2.5 unless you apply 2.4.diff Locking is done on a per-thread basis instead of a per-process basis. Usage: >>> lock = LockFile('somefile') >>> try: ... lock.acquire() ... except AlreadyLocked: ... print 'some...
24.285714
88
0.611329
from __future__ import absolute_import import functools import os import socket import threading import warnings if not hasattr(threading, "current_thread"): threading.current_thread = threading.currentThread if not hasattr(threading.Thread, "get_name"): threading.Thread.get_name = threading.Thread.getName ...
true
true
f713b1ea0c11d8b85504679217766f2c5726271f
12,913
py
Python
tests/ut/python/ops/test_tensor_slice.py
XinYao1994/mindspore
2c1a2bf752a1fde311caddba22633d2f4f63cb4e
[ "Apache-2.0" ]
2
2020-04-28T03:49:10.000Z
2020-04-28T03:49:13.000Z
tests/ut/python/ops/test_tensor_slice.py
XinYao1994/mindspore
2c1a2bf752a1fde311caddba22633d2f4f63cb4e
[ "Apache-2.0" ]
null
null
null
tests/ut/python/ops/test_tensor_slice.py
XinYao1994/mindspore
2c1a2bf752a1fde311caddba22633d2f4f63cb4e
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., 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...
31.962871
126
0.61016
import numpy as np import pytest from mindspore import Tensor from mindspore import context from mindspore import dtype as mstype from mindspore.nn import Cell from ....mindspore_test_framework.mindspore_test import mindspore_test from ....mindspore_test_framework.pipeline.forward.compile_forward \ import pipelin...
true
true
f713b345bd277bc050a9b295cca338adedc276d5
1,193
py
Python
Utils/lockfile.py
RobertCsordas/dnc
1a01d64d30430e19380084847e84b52c0d58c81e
[ "Apache-2.0" ]
3
2020-10-17T20:34:07.000Z
2021-04-15T04:01:36.000Z
Utils/lockfile.py
RobertCsordas/dnc
1a01d64d30430e19380084847e84b52c0d58c81e
[ "Apache-2.0" ]
null
null
null
Utils/lockfile.py
RobertCsordas/dnc
1a01d64d30430e19380084847e84b52c0d58c81e
[ "Apache-2.0" ]
1
2022-02-23T02:31:41.000Z
2022-02-23T02:31:41.000Z
# Copyright 2017 Robert Csordas. 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 applicable law or a...
28.404762
80
0.640402
import os import fcntl class LockFile: def __init__(self, fname): self._fname = fname self._fd = None def acquire(self): self._fd=open(self._fname, "w") os.chmod(self._fname, 0o777) fcntl.lockf(self._fd, fcntl.LOCK_EX) def release(self): fcntl.lockf(self...
true
true
f713b4a98deb1a3197e73fe21905fc50ff875827
139
py
Python
testes/008 - Copia.py
AlexCaprian/Python
4d343330bb4e82f639ca103b119f0a9eeee916e0
[ "MIT" ]
null
null
null
testes/008 - Copia.py
AlexCaprian/Python
4d343330bb4e82f639ca103b119f0a9eeee916e0
[ "MIT" ]
null
null
null
testes/008 - Copia.py
AlexCaprian/Python
4d343330bb4e82f639ca103b119f0a9eeee916e0
[ "MIT" ]
null
null
null
m=float(input('Quantos metros?')) c=m*100 mm=m*1000 print('A conversão de {} para centímetros é {} e para milímetros é {}.'.format(m,c,mm))
34.75
87
0.683453
m=float(input('Quantos metros?')) c=m*100 mm=m*1000 print('A conversão de {} para centímetros é {} e para milímetros é {}.'.format(m,c,mm))
true
true
f713b561e8db2c29bdc9f9f639374ec689869888
390
py
Python
dict01/pinky_brain.py
mikerauer/pyb-class
b7f6202c58df654eb81263d12c2634fa37a27e07
[ "MIT" ]
null
null
null
dict01/pinky_brain.py
mikerauer/pyb-class
b7f6202c58df654eb81263d12c2634fa37a27e07
[ "MIT" ]
null
null
null
dict01/pinky_brain.py
mikerauer/pyb-class
b7f6202c58df654eb81263d12c2634fa37a27e07
[ "MIT" ]
null
null
null
#!/usr/bin/python3 mice = {"number": 2, "names": [{"name": "Pinky", "tag": "the real genius"},{"name": "The Brain", "tag": "insane one"}], "world_domination_status": "pending"} ## print following ## Pinky is the real genius, and The Brain is the insane one print(f'{mice["names"][0]["name"]} is {mice["names"][0]["tag"]...
55.714286
157
0.607692
mice = {"number": 2, "names": [{"name": "Pinky", "tag": "the real genius"},{"name": "The Brain", "tag": "insane one"}], "world_domination_status": "pending"} print(f'{mice["names"][0]["name"]} is {mice["names"][0]["tag"]}, and {mice["names"][1]["name"]} is the {mice["names"][1]["tag"]}.')
true
true
f713b5e3c74cd9f95a301019d4e5f568395f8611
3,712
py
Python
intersight/models/syslog_remote_logging_client_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/syslog_remote_logging_client_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/syslog_remote_logging_client_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Intersight REST API This is Intersight REST API OpenAPI spec version: 1.0.9-262 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class SyslogRemoteLoggingClientRef(object): """ NOT...
24.746667
81
0.554149
from pprint import pformat from six import iteritems import re class SyslogRemoteLoggingClientRef(object): swagger_types = { 'moid': 'str', 'object_type': 'str' } attribute_map = { 'moid': 'Moid', 'object_type': 'ObjectType' } def __init__(self, moid=None, ob...
true
true
f713b6a7b772fb52e300f15bc3b1304b170ad695
182
py
Python
Controllers/EditSessionForm.py
esot0/jmsa-tutoring-backend
f35000c73fbbb31f9b4dcca36e40854dc2e06d23
[ "MIT" ]
null
null
null
Controllers/EditSessionForm.py
esot0/jmsa-tutoring-backend
f35000c73fbbb31f9b4dcca36e40854dc2e06d23
[ "MIT" ]
null
null
null
Controllers/EditSessionForm.py
esot0/jmsa-tutoring-backend
f35000c73fbbb31f9b4dcca36e40854dc2e06d23
[ "MIT" ]
null
null
null
from wtforms import StringField, Form class EditSessionForm(Form): subject = StringField('Subject') date = StringField('Date') other_user = StringField('Other User')
20.222222
42
0.714286
from wtforms import StringField, Form class EditSessionForm(Form): subject = StringField('Subject') date = StringField('Date') other_user = StringField('Other User')
true
true
f713b6c9f2f54c3584469cc5be229a9e0af8e5ca
3,761
py
Python
components/deprecated/tfx/ExampleGen/CsvExampleGen/with_URI_IO/component.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
2,860
2018-05-24T04:55:01.000Z
2022-03-31T13:49:56.000Z
components/deprecated/tfx/ExampleGen/CsvExampleGen/with_URI_IO/component.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
7,331
2018-05-16T09:03:26.000Z
2022-03-31T23:22:04.000Z
components/deprecated/tfx/ExampleGen/CsvExampleGen/with_URI_IO/component.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
1,359
2018-05-15T11:05:41.000Z
2022-03-31T09:42:09.000Z
from typing import NamedTuple def CsvExampleGen( output_examples_uri: 'ExamplesUri', input_base: str, input_config: {'JsonObject': {'data_type': 'proto:tfx.components.example_gen.Input'}}, output_config: {'JsonObject': {'data_type': 'proto:tfx.components.example_gen.Output'}}, range_config: {'JsonO...
44.77381
129
0.697421
from typing import NamedTuple def CsvExampleGen( output_examples_uri: 'ExamplesUri', input_base: str, input_config: {'JsonObject': {'data_type': 'proto:tfx.components.example_gen.Input'}}, output_config: {'JsonObject': {'data_type': 'proto:tfx.components.example_gen.Output'}}, range_config: {'JsonO...
true
true
f713b7232b0919cbb5b6eac3bc695c1343a44fe2
1,808
py
Python
python/src/main/python/setup.py
radiant-maxar/geowave
2d9f39d32e4621c8f5965a4dffff0623c1c03231
[ "Apache-2.0" ]
280
2017-06-14T01:26:19.000Z
2022-03-28T15:45:23.000Z
python/src/main/python/setup.py
radiant-maxar/geowave
2d9f39d32e4621c8f5965a4dffff0623c1c03231
[ "Apache-2.0" ]
458
2017-06-12T20:00:59.000Z
2022-03-31T04:41:59.000Z
python/src/main/python/setup.py
radiant-maxar/geowave
2d9f39d32e4621c8f5965a4dffff0623c1c03231
[ "Apache-2.0" ]
135
2017-06-12T20:39:34.000Z
2022-03-15T13:42:30.000Z
# Packages up pygw so it's pip-installable from setuptools import setup, find_packages with open('README.md', 'r') as fh: long_description = fh.read() def get_version(): try: from maven_version import get_maven_version version = get_maven_version() except ModuleNotFoundError: # If...
36.16
95
0.65542
from setuptools import setup, find_packages with open('README.md', 'r') as fh: long_description = fh.read() def get_version(): try: from maven_version import get_maven_version version = get_maven_version() except ModuleNotFoundError: # If maven version isn't found, it must be from...
true
true
f713b7cba5b2c11f1ceac74906715a9f7d2dd421
657
py
Python
venv/lib/python3.8/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-numba.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
12
2020-12-15T15:12:06.000Z
2022-03-18T16:17:42.000Z
venv/lib/python3.8/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-numba.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
venv/lib/python3.8/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-numba.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
10
2020-12-15T15:12:14.000Z
2022-02-09T21:02:17.000Z
# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE.GPL.txt, distributed with # this software. # # SPD...
31.285714
68
0.576865
excludedimports = ["IPython", "scipy"] hiddenimports = ["llvmlite"]
true
true
f713b8d08238284849c9342f3be734f7fb3a2bdb
1,699
py
Python
Other/GaussianRandomStockPrice.py
AcudoDev/FinanceToolbox
90676e798f2e8eac164ccfcd6708cc717e1911f2
[ "MIT" ]
null
null
null
Other/GaussianRandomStockPrice.py
AcudoDev/FinanceToolbox
90676e798f2e8eac164ccfcd6708cc717e1911f2
[ "MIT" ]
null
null
null
Other/GaussianRandomStockPrice.py
AcudoDev/FinanceToolbox
90676e798f2e8eac164ccfcd6708cc717e1911f2
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import yfinance as yf from sklearn.linear_model import LinearRegression import statsmodels import statsmodels.api as sm import statsmodels.tsa.stattools as ts import datetime import scipy.stats import math import openpyxl as pyxl from scipy import signal from scipy import stats...
25.742424
88
0.649205
import pandas as pd import numpy as np import yfinance as yf from sklearn.linear_model import LinearRegression import statsmodels import statsmodels.api as sm import statsmodels.tsa.stattools as ts import datetime import scipy.stats import math import openpyxl as pyxl from scipy import signal from scipy import stats...
true
true
f713ba9833d44add8863407d37e88c84d47ea6f3
522
py
Python
pyschieber/player/random_player.py
Murthy10/pyschieber
f9db28c9553b8f321f6ed71cff04eff7879af5f6
[ "MIT" ]
5
2018-01-17T08:11:14.000Z
2018-11-27T11:37:15.000Z
pyschieber/player/random_player.py
Murthy10/pyschieber
f9db28c9553b8f321f6ed71cff04eff7879af5f6
[ "MIT" ]
4
2018-05-09T08:41:05.000Z
2018-11-16T08:07:39.000Z
pyschieber/player/random_player.py
Murthy10/pyschieber
f9db28c9553b8f321f6ed71cff04eff7879af5f6
[ "MIT" ]
3
2018-04-20T07:39:30.000Z
2018-11-10T12:44:08.000Z
import random from pyschieber.player.base_player import BasePlayer from pyschieber.trumpf import Trumpf class RandomPlayer(BasePlayer): def choose_trumpf(self, geschoben): return move(choices=list(Trumpf)) def choose_card(self, state=None): cards = self.allowed_cards(state=state) ret...
22.695652
52
0.683908
import random from pyschieber.player.base_player import BasePlayer from pyschieber.trumpf import Trumpf class RandomPlayer(BasePlayer): def choose_trumpf(self, geschoben): return move(choices=list(Trumpf)) def choose_card(self, state=None): cards = self.allowed_cards(state=state) ret...
true
true
f713bb1e600d2ca18e6774b088fb0443723b8c85
6,909
py
Python
data/p3BR/R2/benchmark/startQiskit289.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit289.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit289.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=60 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
31.547945
140
0.636995
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.test.mock import FakeVigo, ...
true
true
f713bb216808a56db66a5efb35ac61c688245d4d
15,257
py
Python
topi/python/topi/cuda/rcnn/proposal.py
seanlatias/incubator-tvm
2e5cb16b4cebe53fba4fb3be49b6748738e20224
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
9
2019-12-17T08:03:54.000Z
2022-01-19T02:34:23.000Z
topi/python/topi/cuda/rcnn/proposal.py
seanlatias/incubator-tvm
2e5cb16b4cebe53fba4fb3be49b6748738e20224
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
2
2020-06-18T21:15:42.000Z
2020-06-24T17:38:37.000Z
topi/python/topi/cuda/rcnn/proposal.py
seanlatias/incubator-tvm
2e5cb16b4cebe53fba4fb3be49b6748738e20224
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
3
2020-10-04T20:30:18.000Z
2022-01-24T18:03:52.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...
40.044619
100
0.604575
import math import tvm from tvm import te from ...vision.rcnn import generate_anchor, reg_bbox, reg_iou from ...util import get_const_tuple, get_const_int def predict_bbox_ir(cls_prob_buf, bbox_pred_buf, im_info_buf, out_buf, scales, ratios, feature_stride, rpn_min_size, iou_loss): batch, num_...
true
true
f713bd33c2d69f8941017073c807f9fb3f287a60
50,346
py
Python
nuitka/optimizations/OptimizeBuiltinCalls.py
jvalduvieco/Nuitka
b93046d5d1c162d416d392d835790936d15a2cf8
[ "Apache-2.0" ]
null
null
null
nuitka/optimizations/OptimizeBuiltinCalls.py
jvalduvieco/Nuitka
b93046d5d1c162d416d392d835790936d15a2cf8
[ "Apache-2.0" ]
null
null
null
nuitka/optimizations/OptimizeBuiltinCalls.py
jvalduvieco/Nuitka
b93046d5d1c162d416d392d835790936d15a2cf8
[ "Apache-2.0" ]
null
null
null
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
33.144174
88
0.648095
from nuitka.__past__ import xrange from nuitka.Errors import NuitkaAssumptionError from nuitka.nodes.AssignNodes import ( StatementAssignmentVariable, StatementDelVariable, ) from nuitka.nodes.AttributeNodes import ( ExpressionAttributeLookup, ExpressionBuiltinGetattr, ExpressionBuiltinHasattr, ...
true
true
f713bd605f56403edd2af58f3a6b67b73eebfb33
746
py
Python
release/stubs.min/System/__init___parts/IFormatProvider.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
182
2017-06-27T02:26:15.000Z
2022-03-30T18:53:43.000Z
release/stubs.min/System/__init___parts/IFormatProvider.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
28
2017-06-27T13:38:23.000Z
2022-03-15T11:19:44.000Z
release/stubs.min/System/__init___parts/IFormatProvider.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
67
2017-06-28T09:43:59.000Z
2022-03-20T21:17:10.000Z
class IFormatProvider: """ Provides a mechanism for retrieving an object to control formatting. """ def GetFormat(self,formatType): """ GetFormat(self: IFormatProvider,formatType: Type) -> object Returns an object that provides formatting services for the specified type. formatType: An...
32.434783
147
0.718499
class IFormatProvider: def GetFormat(self,formatType): pass def __init__(self,*args): pass
true
true
f713bd7d306ff19bdfc4bafacd88ec5bf2b55af8
782
py
Python
backend/histocat/api/panorama/controller.py
BodenmillerGroup/histocat-web
c598cd07506febf0b7c209626d4eb869761f2e62
[ "MIT" ]
4
2021-06-14T15:19:25.000Z
2022-02-09T13:17:39.000Z
backend/histocat/api/panorama/controller.py
BodenmillerGroup/histocat-web
c598cd07506febf0b7c209626d4eb869761f2e62
[ "MIT" ]
null
null
null
backend/histocat/api/panorama/controller.py
BodenmillerGroup/histocat-web
c598cd07506febf0b7c209626d4eb869761f2e62
[ "MIT" ]
1
2022-02-09T13:17:41.000Z
2022-02-09T13:17:41.000Z
import os from fastapi import APIRouter, Depends from sqlalchemy.orm import Session from starlette.responses import FileResponse from histocat.api.db import get_db from histocat.core.panorama import service router = APIRouter() @router.get("/panoramas/{id}/image", responses={200: {"content": {"image/png": {}}}}) a...
24.4375
85
0.649616
import os from fastapi import APIRouter, Depends from sqlalchemy.orm import Session from starlette.responses import FileResponse from histocat.api.db import get_db from histocat.core.panorama import service router = APIRouter() @router.get("/panoramas/{id}/image", responses={200: {"content": {"image/png": {}}}}) a...
true
true
f713bd985d707ee952fc4906911d895395ad2c03
2,325
py
Python
google-cloud-sdk/lib/surface/runtime_config/configs/list.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/surface/runtime_config/configs/list.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/surface/runtime_config/configs/list.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
3
2017-07-27T18:44:13.000Z
2020-07-25T17:48:53.000Z
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
28.703704
80
0.695914
from apitools.base.py import list_pager from googlecloudsdk.api_lib.runtime_config import util from googlecloudsdk.calliope import base class List(base.ListCommand): DEFAULT_PAGE_SIZE = 100 detailed_help = { 'EXAMPLES': """\ To list all runtime-config resources for the current project, run: ...
true
true
f713be977bca839114bb2f2747397cf2cbc53701
786
py
Python
filemonitor/migrations/0006_auto_20170523_1706.py
imsilence/shadow-hostmonitor
faa28d7f5bb85212d5a64a60f742b807cf8644f7
[ "Apache-2.0" ]
1
2019-11-02T14:25:29.000Z
2019-11-02T14:25:29.000Z
filemonitor/migrations/0006_auto_20170523_1706.py
imsilence/shadow-hostmonitor
faa28d7f5bb85212d5a64a60f742b807cf8644f7
[ "Apache-2.0" ]
null
null
null
filemonitor/migrations/0006_auto_20170523_1706.py
imsilence/shadow-hostmonitor
faa28d7f5bb85212d5a64a60f742b807cf8644f7
[ "Apache-2.0" ]
1
2019-11-02T14:25:19.000Z
2019-11-02T14:25:19.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-23 09:06 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('filemonitor', '0005_auto_20170523_1541'), ] operations = [ mi...
25.354839
52
0.550891
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('filemonitor', '0005_auto_20170523_1541'), ] operations = [ migrations.RenameField( model_name='actualfile', ol...
true
true
f713bed89ea6d867f3c6c6448a2bf04f05614686
1,695
py
Python
async.py
Ethan-Xie/python_study
0e251709de37d38e3ea9af2202d8f94766d3a64f
[ "MIT" ]
null
null
null
async.py
Ethan-Xie/python_study
0e251709de37d38e3ea9af2202d8f94766d3a64f
[ "MIT" ]
null
null
null
async.py
Ethan-Xie/python_study
0e251709de37d38e3ea9af2202d8f94766d3a64f
[ "MIT" ]
null
null
null
# 使用yield 实现单线程的异步并发效果 import time def consumer(name): print("%s 准备吃包子啦!" %name) while True: baozi = yield #接收值 print("包子[%s]来了,被[%s]吃了!" %(baozi,name)) def producer(name): c = consumer("A") c2 = consumer("B") c.__next__() c2.__next__() print("老子开始做包子了") for i in ran...
13.139535
48
0.532743
import time def consumer(name): print("%s 准备吃包子啦!" %name) while True: baozi = yield print("包子[%s]来了,被[%s]吃了!" %(baozi,name)) def producer(name): c = consumer("A") c2 = consumer("B") c.__next__() c2.__next__() print("老子开始做包子了") for i in range(1): time.sleep(1...
true
true
f713bf3131754f4b99d4daaa838e48deebcdd659
3,937
py
Python
openGaussBase/testcase/GUC/QUERYPLAN/Opengauss_Function_Guc_Queryplan_Case0101.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/GUC/QUERYPLAN/Opengauss_Function_Guc_Queryplan_Case0101.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/GUC/QUERYPLAN/Opengauss_Function_Guc_Queryplan_Case0101.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
36.119266
84
0.624333
import unittest from testcase.utils.CommonSH import CommonSH from testcase.utils.Constant import Constant from testcase.utils.Logger import Logger LOG = Logger() commonsh = CommonSH('dbuser') class QueryPlan(unittest.TestCase): def setUp(self): self.constant = Constant() LOG.info( '...
true
true
f713bf7049d636559b31faa12aae89196f72bea9
3,608
py
Python
docs/samples/specification/azure_key_credential/generated/azure/key/credential/sample/_auto_rest_head_test_service.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
35
2018-04-03T12:15:53.000Z
2022-03-11T14:03:34.000Z
docs/samples/specification/azure_key_credential/generated/azure/key/credential/sample/_auto_rest_head_test_service.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
652
2017-08-28T22:44:41.000Z
2022-03-31T21:20:31.000Z
docs/samples/specification/azure_key_credential/generated/azure/key/credential/sample/_auto_rest_head_test_service.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
29
2017-08-28T20:57:01.000Z
2022-03-11T14:03:38.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 ...
39.217391
113
0.665188
from copy import deepcopy from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer from ._configuration import AutoRestHeadTestServiceConfiguration from .operations import HttpSuccessOperations if TYPE_CHECKING: from typing import Any, Dict, Optional...
true
true
f713c0cb8c9f0306d03c4ed99fa96bed9e43aa74
713
py
Python
assignment/migrations/0008_auto_20201218_1203.py
Magesh-sam/E-Assignment
241252e88b0526afbb97a01b9b1814d693688885
[ "MIT" ]
1
2020-12-23T07:04:51.000Z
2020-12-23T07:04:51.000Z
assignment/migrations/0008_auto_20201218_1203.py
Magesh-sam/E-Assignment
241252e88b0526afbb97a01b9b1814d693688885
[ "MIT" ]
null
null
null
assignment/migrations/0008_auto_20201218_1203.py
Magesh-sam/E-Assignment
241252e88b0526afbb97a01b9b1814d693688885
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2020-12-18 06:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('assignment', '0007_document'), ] operations = [ migrations.RenameField( model_name='document', old_name='description...
24.586207
63
0.56662
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('assignment', '0007_document'), ] operations = [ migrations.RenameField( model_name='document', old_name='description', new_name='assignmentname', ...
true
true
f713c211024b61164dea46dcd8cf5c99dd053cc0
8,371
py
Python
datagateway_api/src/common/config.py
MRichards99/datagateway-api
2e6133636fed950a16190d2f703f152c73bb5b1b
[ "Apache-2.0" ]
null
null
null
datagateway_api/src/common/config.py
MRichards99/datagateway-api
2e6133636fed950a16190d2f703f152c73bb5b1b
[ "Apache-2.0" ]
null
null
null
datagateway_api/src/common/config.py
MRichards99/datagateway-api
2e6133636fed950a16190d2f703f152c73bb5b1b
[ "Apache-2.0" ]
null
null
null
import json import logging from pathlib import Path import sys from typing import Optional from pydantic import ( BaseModel, StrictBool, StrictInt, StrictStr, ValidationError, validator, ) log = logging.getLogger() def validate_extension(extension): """ Checks that the API extension...
38.223744
88
0.687851
import json import logging from pathlib import Path import sys from typing import Optional from pydantic import ( BaseModel, StrictBool, StrictInt, StrictStr, ValidationError, validator, ) log = logging.getLogger() def validate_extension(extension): extension = extension.strip() if...
true
true
f713c29c86cdc35f0168c2009748e732ac290b18
44,536
py
Python
kolla/common/config.py
priteau/kolla
2ee796bdce78aadaeaf42796a4f4dce9e7471ce0
[ "Apache-2.0" ]
null
null
null
kolla/common/config.py
priteau/kolla
2ee796bdce78aadaeaf42796a4f4dce9e7471ce0
[ "Apache-2.0" ]
null
null
null
kolla/common/config.py
priteau/kolla
2ee796bdce78aadaeaf42796a4f4dce9e7471ce0
[ "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 # distributed under th...
35.374106
78
0.505793
import itertools import os from oslo_config import cfg from oslo_config import types from kolla.version import version_info as version BASE_OS_DISTRO = ['centos', 'rhel', 'ubuntu', 'debian'] BASE_ARCH = ['x86_64', 'ppc64le', 'aarch64'] DEFAULT_BASE_TAGS = { 'centos': '7', 'rhel': '7', 'debian': '10', ...
true
true
f713c2cb062950ac487056e50952bf6ad98944fa
2,603
py
Python
azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/log_analytics_input_base_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.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 ...
44.118644
201
0.668844
from msrest.serialization import Model class LogAnalyticsInputBase(Model): _validation = { 'blob_container_sas_uri': {'required': True}, 'from_time': {'required': True}, 'to_time': {'required': True}, } _attribute_map = { 'blob_container_sas_uri': {'key': 'blobContainerS...
true
true
f713c3f0a6eab75b579be5aed0e1103595220c9e
7,372
py
Python
mailchimp_marketing_asyncio/models/signup_form.py
john-parton/mailchimp-asyncio
3865ca0867bec8f537dc1e3256aa3a160c00f8a2
[ "Apache-2.0" ]
null
null
null
mailchimp_marketing_asyncio/models/signup_form.py
john-parton/mailchimp-asyncio
3865ca0867bec8f537dc1e3256aa3a160c00f8a2
[ "Apache-2.0" ]
null
null
null
mailchimp_marketing_asyncio/models/signup_form.py
john-parton/mailchimp-asyncio
3865ca0867bec8f537dc1e3256aa3a160c00f8a2
[ "Apache-2.0" ]
1
2022-03-09T14:52:22.000Z
2022-03-09T14:52:22.000Z
# coding: utf-8 """ Mailchimp Marketing API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 3.0.74 Contact: apihelp@mailchimp.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import...
28.796875
126
0.589257
import pprint import re import six class SignupForm(object): swagger_types = { 'header': 'SignupFormHeaderOptions', 'contents': 'list[CollectionOfContentForListSignupForms]', 'styles': 'list[CollectionOfElementStyleForListSignupForms]', 'signup_form_url': 'str', 'list...
true
true
f713c3fd343f05467d069a91846cfa29aed8d972
124
py
Python
old/02/09.py
systemquant/book-pandas-for-finance
90b7eb9be1de20a12ae72b9bb5d51424a979b174
[ "MIT" ]
10
2021-02-04T12:49:56.000Z
2022-03-26T11:28:11.000Z
old/02/09.py
systemquant/book-pandas-for-finance
90b7eb9be1de20a12ae72b9bb5d51424a979b174
[ "MIT" ]
1
2022-03-24T03:47:14.000Z
2022-03-24T03:54:52.000Z
old/02/09.py
systemquant/book-pandas-for-finance
90b7eb9be1de20a12ae72b9bb5d51424a979b174
[ "MIT" ]
4
2021-07-17T16:50:15.000Z
2022-03-22T05:55:34.000Z
data = [("000060", 8.25), ("000020", 5.75), ("039490", 1.3)] def 정렬규칙(x): return x[1] data.sort(key=정렬규칙) print(data)
15.5
60
0.564516
data = [("000060", 8.25), ("000020", 5.75), ("039490", 1.3)] def 정렬규칙(x): return x[1] data.sort(key=정렬규칙) print(data)
true
true
f713c43c0962dea49c922bae1e450935719dbbf8
3,500
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_configuration.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_configuration.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_configuration.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# 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.297297
125
0.693714
from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy from ._version import VERSION if TYPE_CHECKING: from azure.core.credentials import Tok...
true
true
f713c66f57be20c2bd1dddc1a8ba715d1887c1ef
822
py
Python
cnns/nnlib/robustness/pni/code/models/noise_layer_robust.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
null
null
null
cnns/nnlib/robustness/pni/code/models/noise_layer_robust.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
null
null
null
cnns/nnlib/robustness/pni/code/models/noise_layer_robust.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.nn.functional as F class noise_Conv2d(nn.Conv2d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, noise_std=0.1): super(noise_Conv2d, self).__init__(in_channels, out_chann...
34.25
75
0.559611
import torch.nn as nn import torch.nn.functional as F class noise_Conv2d(nn.Conv2d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, noise_std=0.1): super(noise_Conv2d, self).__init__(in_channels, out_chann...
true
true
f713c7525055ce6ba983ba32bc4b5e05efb1bc80
2,221
py
Python
rally/plugins/openstack/context/nova/keypairs.py
aforalee/rallyALi
8050ca08b0e253aeb19a1cec34f33c648f00136a
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/context/nova/keypairs.py
aforalee/rallyALi
8050ca08b0e253aeb19a1cec34f33c648f00136a
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/context/nova/keypairs.py
aforalee/rallyALi
8050ca08b0e253aeb19a1cec34f33c648f00136a
[ "Apache-2.0" ]
null
null
null
# Copyright 2014: Rackspace UK # 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...
35.822581
79
0.677172
import novaclient.exceptions from rally.common.i18n import _ from rally.common import log as logging from rally.common import utils from rally import osclients from rally.plugins.openstack.context.cleanup import manager as resource_manager from rally.task import context LOG = logging.getLogger(__name__) @context....
true
true
f713c757918c68117662e36f5c6f0adb8d3638a6
142
py
Python
blazingsql/__init__.py
paulhendricks/pyBlazing
792d286054ec4ae8a0546d57ef758a60812d24c3
[ "Apache-2.0" ]
1
2020-05-28T14:06:15.000Z
2020-05-28T14:06:15.000Z
blazingsql/__init__.py
paulhendricks/pyBlazing
792d286054ec4ae8a0546d57ef758a60812d24c3
[ "Apache-2.0" ]
null
null
null
blazingsql/__init__.py
paulhendricks/pyBlazing
792d286054ec4ae8a0546d57ef758a60812d24c3
[ "Apache-2.0" ]
null
null
null
from pyblazing.apiv2 import context from pyblazing.apiv2 import make_context BlazingContext = context.BlazingContext import pyblazing.apiv2
20.285714
40
0.859155
from pyblazing.apiv2 import context from pyblazing.apiv2 import make_context BlazingContext = context.BlazingContext import pyblazing.apiv2
true
true
f713c763b71c7ae43f02b4463df5842ee7f1a936
5,690
py
Python
test_scripts/test_element_and_compare_to_kratos.py
JoZimmer/ParOptBeam
50d15d8d822a2718f2932807e06c4a7e02f866a3
[ "BSD-3-Clause" ]
1
2021-04-09T14:08:20.000Z
2021-04-09T14:08:20.000Z
test_scripts/test_element_and_compare_to_kratos.py
JoZimmer/ParOptBeam
50d15d8d822a2718f2932807e06c4a7e02f866a3
[ "BSD-3-Clause" ]
2
2021-04-28T15:05:01.000Z
2021-11-10T15:12:56.000Z
test_scripts/test_element_and_compare_to_kratos.py
JoZimmer/ParOptBeam
50d15d8d822a2718f2932807e06c4a7e02f866a3
[ "BSD-3-Clause" ]
2
2021-02-01T08:49:45.000Z
2021-08-10T02:07:36.000Z
from source.element.cr_beam_element import CRBeamElement import numpy as np np.set_printoptions(suppress=False, precision=4, linewidth=100) def test_crbeam_element_update_incremental(): material_params = {'rho': 7850, 'e': 2069000000.0, 'nu': 0.29, 'zeta': 0.05, 'lx_i': 1.2, 'is_nonlinear': True} element_pa...
42.462687
115
0.496485
from source.element.cr_beam_element import CRBeamElement import numpy as np np.set_printoptions(suppress=False, precision=4, linewidth=100) def test_crbeam_element_update_incremental(): material_params = {'rho': 7850, 'e': 2069000000.0, 'nu': 0.29, 'zeta': 0.05, 'lx_i': 1.2, 'is_nonlinear': True} element_pa...
true
true
f713c8014b3825c0746482bc5b3f6306b4660275
2,931
py
Python
TangoChat/core.py
sierra-m/TangoBot
2a7eafc391a60862b660efaee5c3b9b1c78fac8e
[ "MIT" ]
null
null
null
TangoChat/core.py
sierra-m/TangoBot
2a7eafc391a60862b660efaee5c3b9b1c78fac8e
[ "MIT" ]
null
null
null
TangoChat/core.py
sierra-m/TangoBot
2a7eafc391a60862b660efaee5c3b9b1c78fac8e
[ "MIT" ]
null
null
null
from typing import List import random import re class Concept: def __init__(self, name: str, options: List[str]): self.name = name.lower() self.options = options def next(self): return random.choice(self.options) def render_to(self, template): return [template.format(opti...
29.606061
98
0.569089
from typing import List import random import re class Concept: def __init__(self, name: str, options: List[str]): self.name = name.lower() self.options = options def next(self): return random.choice(self.options) def render_to(self, template): return [template.format(opti...
true
true
f713c8c7f32ad47156ece2c400acb571c9609d70
5,669
py
Python
tests/test_plantuml_markdown.py
getnikola/plugins
c9305572359263c719b19dc17bb6770521e08dee
[ "MIT" ]
53
2015-08-14T20:28:05.000Z
2021-06-02T00:38:23.000Z
tests/test_plantuml_markdown.py
matthew16550/nikola-plugins
fbd784ea737419dd2b5b7365549bf3cf57d66700
[ "MIT" ]
280
2015-01-10T15:57:44.000Z
2022-03-27T20:47:08.000Z
tests/test_plantuml_markdown.py
matthew16550/nikola-plugins
fbd784ea737419dd2b5b7365549bf3cf57d66700
[ "MIT" ]
93
2015-01-26T19:39:02.000Z
2022-03-24T17:12:42.000Z
import os import sys import pytest from pytest import fixture if sys.version_info < (3, 6): raise pytest.skip("plantuml_markdown plugin requires Python >= 3.6", allow_module_level=True) from tests import V8_PLUGIN_PATH from tests.conftest import CompileResult from v8.plantuml_markdown.plantuml_markdown import Pl...
30.809783
106
0.550362
import os import sys import pytest from pytest import fixture if sys.version_info < (3, 6): raise pytest.skip("plantuml_markdown plugin requires Python >= 3.6", allow_module_level=True) from tests import V8_PLUGIN_PATH from tests.conftest import CompileResult from v8.plantuml_markdown.plantuml_markdown import Pl...
true
true
f713c9b41c726431974465bcc7603f9e84650f97
15,254
py
Python
tests/exceptions.py
skulegirl/pyxero
700d331392fada72ec0a9490e9c4896048a603b2
[ "BSD-3-Clause" ]
null
null
null
tests/exceptions.py
skulegirl/pyxero
700d331392fada72ec0a9490e9c4896048a603b2
[ "BSD-3-Clause" ]
null
null
null
tests/exceptions.py
skulegirl/pyxero
700d331392fada72ec0a9490e9c4896048a603b2
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import unittest from datetime import date from mock import Mock, patch from xero import Xero from xero.exceptions import ( XeroBadRequest, XeroExceptionUnknown, XeroForbidden, XeroInternalError, XeroNotAvailable, XeroNotFound, XeroNotImplemented, ...
37.571429
148
0.592631
from __future__ import unicode_literals import unittest from datetime import date from mock import Mock, patch from xero import Xero from xero.exceptions import ( XeroBadRequest, XeroExceptionUnknown, XeroForbidden, XeroInternalError, XeroNotAvailable, XeroNotFound, XeroNotImplemented, ...
true
true
f713ca429669bcdd8b420dc01264b77dfd212b9e
5,496
py
Python
audio_controller/api_handler/views.py
Maxning1/MusicBox
19b35569da31efa2d9e62aae83ddbb028a4032f7
[ "MIT" ]
1
2021-02-07T23:04:21.000Z
2021-02-07T23:04:21.000Z
audio_controller/api_handler/views.py
Maxning1/MusicBox
19b35569da31efa2d9e62aae83ddbb028a4032f7
[ "MIT" ]
null
null
null
audio_controller/api_handler/views.py
Maxning1/MusicBox
19b35569da31efa2d9e62aae83ddbb028a4032f7
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import generics, status from .serializers import RoomSerializer, CreateRoomSerializer, UpdateRoomSerializer from .models import Room from rest_framework.views import APIView from rest_framework.response import Response from django.http import JsonResponse # Creat...
43.275591
122
0.64738
from django.shortcuts import render from rest_framework import generics, status from .serializers import RoomSerializer, CreateRoomSerializer, UpdateRoomSerializer from .models import Room from rest_framework.views import APIView from rest_framework.response import Response from django.http import JsonResponse class ...
true
true
f713caaf57b9575f6fccea9f21007d77f54ac6a8
1,709
py
Python
app/core/migrations/0001_initial.py
TecateWine/receipe-app-api
b181aef2abe0b9acdf2ada3f3fd3cfe674345f5f
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
TecateWine/receipe-app-api
b181aef2abe0b9acdf2ada3f3fd3cfe674345f5f
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
TecateWine/receipe-app-api
b181aef2abe0b9acdf2ada3f3fd3cfe674345f5f
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2019-12-31 00:14 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
50.264706
266
0.63897
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.Aut...
true
true
f713caea696d748be4a67cfee124977a76d0d29a
6,072
py
Python
idrac_powerunit/idrac_powerunit.py
anita-mithran/plugins
3c34f4b92b9c0ae985dc3b6abfb8c952aba00cd7
[ "BSD-2-Clause" ]
null
null
null
idrac_powerunit/idrac_powerunit.py
anita-mithran/plugins
3c34f4b92b9c0ae985dc3b6abfb8c952aba00cd7
[ "BSD-2-Clause" ]
null
null
null
idrac_powerunit/idrac_powerunit.py
anita-mithran/plugins
3c34f4b92b9c0ae985dc3b6abfb8c952aba00cd7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python import json import SNMPUtil import argparse ### Monitoring iDRAC Servers - Powerunit Performance ### It uses snmpwalk command to get the hadrware data from the iDRAC Servers. ### SNMPUtil.py is used to get the snmp raw data and parsed to get the output json ### Download and install the latest v...
42.461538
166
0.550889
import json import SNMPUtil import argparse OIDS = {'powerunit' : ['powerUnitTable','amperageProbeLocationName','amperageProbeReading']} hardware = {'powerunit' : ['powerUnitStateSettings','powerUnitRedundancyStatus','powerUnitStatus','amperageProbeReading']} names = {'powerunit' : ['state','redundancystatus','st...
true
true
f713cb45e38bb0e36bf56e9f6b5359fe16568126
342
py
Python
examples/blogengine/email_client.py
perkinslr/nevow-py3
69c7a64832a176955af5534febf5a405c511b5eb
[ "MIT" ]
1
2019-11-11T13:58:23.000Z
2019-11-11T13:58:23.000Z
examples/blogengine/email_client.py
perkinslr/nevow-py3
69c7a64832a176955af5534febf5a405c511b5eb
[ "MIT" ]
null
null
null
examples/blogengine/email_client.py
perkinslr/nevow-py3
69c7a64832a176955af5534febf5a405c511b5eb
[ "MIT" ]
1
2019-02-28T13:46:26.000Z
2019-02-28T13:46:26.000Z
import sys, smtplib fromaddr = input("From: ") toaddrs = input("To: ").split(',') print("Enter message, end with ^D:") msg = '' while 1: line = sys.stdin.readline() if not line: break msg = msg + line # The actual mail send server = smtplib.SMTP('localhost', 2500) server.sendmail(fromaddr, toaddr...
20.117647
40
0.640351
import sys, smtplib fromaddr = input("From: ") toaddrs = input("To: ").split(',') print("Enter message, end with ^D:") msg = '' while 1: line = sys.stdin.readline() if not line: break msg = msg + line server = smtplib.SMTP('localhost', 2500) server.sendmail(fromaddr, toaddrs, msg) server.quit()
true
true
f713cb5fa957f4d1f054a5bfa70d75e73f16384a
51,194
py
Python
discord/client.py
PanKlipcio/discord.py
9bb4bd8003dcabcfbedfbfc8fe0cee91543c13a5
[ "MIT" ]
1
2021-07-23T05:56:09.000Z
2021-07-23T05:56:09.000Z
discord/client.py
PanKlipcio/discord.py
9bb4bd8003dcabcfbedfbfc8fe0cee91543c13a5
[ "MIT" ]
null
null
null
discord/client.py
PanKlipcio/discord.py
9bb4bd8003dcabcfbedfbfc8fe0cee91543c13a5
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
33.858466
144
0.591476
from __future__ import annotations import asyncio import logging import signal import sys import traceback from typing import Any, Callable, Coroutine, Dict, Generator, Iterable, List, Optional, Sequence, TYPE_CHECKING, Tuple, TypeVar, Union import aiohttp from .user import User from .invite import Invite from .tem...
true
true
f713cb7a449c438cfcce5616f6b52263398ce8bd
1,121
py
Python
wowp/tests/test_special_actors.py
coobas/wowp
9d029b1c26ef65f83a5cd0279a45fe0cb4933ad9
[ "MIT" ]
2
2017-12-14T08:10:28.000Z
2017-12-29T13:31:33.000Z
wowp/tests/test_special_actors.py
coobas/wowp
9d029b1c26ef65f83a5cd0279a45fe0cb4933ad9
[ "MIT" ]
4
2019-10-19T08:55:04.000Z
2019-10-22T06:50:18.000Z
wowp/tests/test_special_actors.py
coobas/wowp
9d029b1c26ef65f83a5cd0279a45fe0cb4933ad9
[ "MIT" ]
1
2017-12-15T08:22:30.000Z
2017-12-15T08:22:30.000Z
from __future__ import absolute_import, division, print_function, unicode_literals from wowp.actors.special import Splitter, Chain from wowp.schedulers import NaiveScheduler from wowp.actors import FuncActor from wowp.util import ConstructorWrapper def test_splitter(): splitter = Splitter(multiplicity=2, inport_n...
27.341463
82
0.668153
from __future__ import absolute_import, division, print_function, unicode_literals from wowp.actors.special import Splitter, Chain from wowp.schedulers import NaiveScheduler from wowp.actors import FuncActor from wowp.util import ConstructorWrapper def test_splitter(): splitter = Splitter(multiplicity=2, inport_n...
true
true
f713cb97fe8f101eb0e99515797b7446859d5de2
25,409
py
Python
project_generator/tools/uvision.py
knowledgejunkie/project_generator
f43c4a3e20d938a0738a4be19a4179ac22168945
[ "Apache-2.0" ]
12
2015-01-02T06:59:55.000Z
2019-12-15T17:08:12.000Z
project_generator/tools/uvision.py
knowledgejunkie/project_generator
f43c4a3e20d938a0738a4be19a4179ac22168945
[ "Apache-2.0" ]
65
2015-01-16T07:38:08.000Z
2015-07-06T18:16:48.000Z
project_generator/tools/uvision.py
knowledgejunkie/project_generator
f43c4a3e20d938a0738a4be19a4179ac22168945
[ "Apache-2.0" ]
7
2015-01-17T09:55:54.000Z
2019-04-11T06:27:54.000Z
# Copyright 2015 0xc0170 # # 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, soft...
44.971681
202
0.587272
import os import subprocess import shutil import logging import xmltodict import copy import re from codecs import open from os import getcwd from os.path import basename, join, normpath from collections import OrderedDict from project_generator_definitions.definitions import ProGenDef from .tool import Tool, Builde...
true
true
f713cd4ccb4c24a7f9ce8c790aa81d48b9aee1af
947
py
Python
VSR/Model/__init__.py
soufiomario/VideoSuperResolution
3677e562df4674b9ff827feecce1806de15131a4
[ "MIT" ]
2
2021-08-05T08:32:03.000Z
2021-08-12T09:33:44.000Z
VSR/Model/__init__.py
AbdulMoqeet/VideoSuperResolution
82c3347554561ff9dfb5e86d9cf0a55239ca662e
[ "MIT" ]
null
null
null
VSR/Model/__init__.py
AbdulMoqeet/VideoSuperResolution
82c3347554561ff9dfb5e86d9cf0a55239ca662e
[ "MIT" ]
null
null
null
# Copyright (c) 2017-2020 Wenyi Tang. # Author: Wenyi Tang # Email: wenyitang@outlook.com # Update: 2020 - 2 - 7 from importlib import import_module from ..Backend import BACKEND __all__ = [ 'get_model', 'list_supported_models' ] def get_model(name: str): name = name.lower() try: if BACKEND == 'pyt...
26.305556
80
0.685322
from importlib import import_module from ..Backend import BACKEND __all__ = [ 'get_model', 'list_supported_models' ] def get_model(name: str): name = name.lower() try: if BACKEND == 'pytorch': return import_module('.Models', 'VSR.Backend.Torch').get_model(name) elif BACKEND == 'tensorflow': ...
true
true
f713cdf606aeb3b1f7bc76ca741473444b804ed1
9,735
py
Python
advent_of_code/flood_advent/utils.py
mflood/whimsical
e39865193b232cc8fc280f371a76f7ac7d07d782
[ "Apache-2.0" ]
null
null
null
advent_of_code/flood_advent/utils.py
mflood/whimsical
e39865193b232cc8fc280f371a76f7ac7d07d782
[ "Apache-2.0" ]
null
null
null
advent_of_code/flood_advent/utils.py
mflood/whimsical
e39865193b232cc8fc280f371a76f7ac7d07d782
[ "Apache-2.0" ]
null
null
null
import argparse import re import logging import requests from typing import Iterator from typing import List LOGGER_NAME="advent" def init_logging(is_verbose: bool): """ Creates standard logging for the logger_name passed in """ logger = logging.getLogger(LOGGER_NAME) logger.setLevel(logging....
29.5
110
0.543606
import argparse import re import logging import requests from typing import Iterator from typing import List LOGGER_NAME="advent" def init_logging(is_verbose: bool): logger = logging.getLogger(LOGGER_NAME) logger.setLevel(logging.DEBUG) channel = logging.StreamHandler() if is_verbose: channel...
true
true
f713ce651c7de767cc25c8ccf653e5662e9a0c44
1,924
py
Python
discooord/extras/examples/email.py
TehBigA/discooord
9a290686664a0c8636958058e28d4115f45c1cc3
[ "MIT" ]
null
null
null
discooord/extras/examples/email.py
TehBigA/discooord
9a290686664a0c8636958058e28d4115f45c1cc3
[ "MIT" ]
1
2016-12-15T02:03:58.000Z
2016-12-15T02:07:42.000Z
discooord/extras/examples/email.py
TehBigA/discooord
9a290686664a0c8636958058e28d4115f45c1cc3
[ "MIT" ]
null
null
null
import poplib from ...utils import Timer class EmailChecker(Timer): '''WARNING: This uses POP3 and by default deletes the emails it reads!''' username = None password = None server = None port = None on_mail = None delete = None def __init__(self, username, password, server, port=1...
26
108
0.519751
import poplib from ...utils import Timer class EmailChecker(Timer): username = None password = None server = None port = None on_mail = None delete = None def __init__(self, username, password, server, port=110, on_mail=None, delete=True, interval=60): super(EmailChecker, self)...
true
true
f713cfbc3fcc396bb31f42807f7dbac75767ddb1
25,923
py
Python
scripts/s3manage.py
procrastinatio/mf-geoadmin3
2580f549e8aae5b1dad6484c87507371c34a33dc
[ "BSD-3-Clause" ]
null
null
null
scripts/s3manage.py
procrastinatio/mf-geoadmin3
2580f549e8aae5b1dad6484c87507371c34a33dc
[ "BSD-3-Clause" ]
null
null
null
scripts/s3manage.py
procrastinatio/mf-geoadmin3
2580f549e8aae5b1dad6484c87507371c34a33dc
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import botocore import boto3 import sys import os import json import subprocess import click import StringIO import gzip from datetime import datetime from textwrap import dedent import mimetypes TARGETS = ['infra', 'dev', 'int', 'prod'] mimetypes.init() mimet...
37.138968
118
0.600818
import re import botocore import boto3 import sys import os import json import subprocess import click import StringIO import gzip from datetime import datetime from textwrap import dedent import mimetypes TARGETS = ['infra', 'dev', 'int', 'prod'] mimetypes.init() mimetypes.add_type('application/x-font-ttf', '.ttf'...
false
true
f713d06ec761c4d741cb3e1577bfbd581ebd687d
439
py
Python
python_roms_modules/calc_etat.py
NoeLahaye/InTideScat_JGR
6849e82b3cda816ca7bdc6ab207e2c857a3f5f5f
[ "CC0-1.0" ]
null
null
null
python_roms_modules/calc_etat.py
NoeLahaye/InTideScat_JGR
6849e82b3cda816ca7bdc6ab207e2c857a3f5f5f
[ "CC0-1.0" ]
null
null
null
python_roms_modules/calc_etat.py
NoeLahaye/InTideScat_JGR
6849e82b3cda816ca7bdc6ab207e2c857a3f5f5f
[ "CC0-1.0" ]
null
null
null
from __future__ import print_function, division import numpy as np from R_tools import rho2u,rho2v def calc_etat(ubar,vbar,hflow,pm,pn): ''' compute divergence of barotropic momentum (units m/h) arrays are (x,y) ordered -- hflow is full column depth (SSE-z_bot)''' return -( np.diff(rho2u(hflow/pn)*ubar,ax...
36.583333
73
0.649203
from __future__ import print_function, division import numpy as np from R_tools import rho2u,rho2v def calc_etat(ubar,vbar,hflow,pm,pn): return -( np.diff(rho2u(hflow/pn)*ubar,axis=0)[:,1:-1] \ + np.diff(rho2v(hflow/pm)*vbar,axis=1)[1:-1,:] )\ * pm[1:-1,1:-1]*pn[1:-1,1:-1]*3600.
true
true
f713d171e7f9310b01643e43fb15f40f64caac4e
172
py
Python
starter/__init__.py
sjdillon/starter
6ed51098008c5ae18d1f809dddf81aa3de3e8ce2
[ "MIT" ]
null
null
null
starter/__init__.py
sjdillon/starter
6ed51098008c5ae18d1f809dddf81aa3de3e8ce2
[ "MIT" ]
null
null
null
starter/__init__.py
sjdillon/starter
6ed51098008c5ae18d1f809dddf81aa3de3e8ce2
[ "MIT" ]
null
null
null
from .starter_class import StarterClass from .boto_manager import BotoClientManager from .config import _CONFIG __all__ = ['BotoClientManager', 'StarterClass', '_CONFIG']
28.666667
58
0.813953
from .starter_class import StarterClass from .boto_manager import BotoClientManager from .config import _CONFIG __all__ = ['BotoClientManager', 'StarterClass', '_CONFIG']
true
true
f713d17923015c16f0e5cb322bcc69119cb35958
8,925
py
Python
beaconrunner/eth2spec/test/phase0/block_processing/test_process_voluntary_exit.py
casparschwa/beaconrunner
d5430e08b120462beea19f65a4cf335ec9eb9134
[ "MIT" ]
5
2021-04-08T23:17:19.000Z
2021-11-02T18:24:37.000Z
tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_voluntary_exit.py
sthagen/eth2.0-specs
27b0d1f32e4ce430dd13b447c273a0f64b637066
[ "CC0-1.0" ]
127
2021-04-09T21:15:08.000Z
2021-10-19T03:58:26.000Z
tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_voluntary_exit.py
sthagen/eth2.0-specs
27b0d1f32e4ce430dd13b447c273a0f64b637066
[ "CC0-1.0" ]
1
2022-03-06T06:08:17.000Z
2022-03-06T06:08:17.000Z
from eth2spec.test.context import spec_state_test, expect_assertion_error, always_bls, with_all_phases from eth2spec.test.helpers.keys import pubkey_to_privkey from eth2spec.test.helpers.voluntary_exits import sign_voluntary_exit def run_voluntary_exit_processing(spec, state, signed_voluntary_exit, valid=True): "...
39.666667
117
0.779384
from eth2spec.test.context import spec_state_test, expect_assertion_error, always_bls, with_all_phases from eth2spec.test.helpers.keys import pubkey_to_privkey from eth2spec.test.helpers.voluntary_exits import sign_voluntary_exit def run_voluntary_exit_processing(spec, state, signed_voluntary_exit, valid=True): v...
true
true
f713d1e1ac8fca799a224fac9038388cc476ff10
815
py
Python
src/personal/migrations/0001_initial.py
shopeyinwale/blog
ade90270f4b23cd11e4529e98ad9c6d78b3eae8e
[ "bzip2-1.0.6" ]
null
null
null
src/personal/migrations/0001_initial.py
shopeyinwale/blog
ade90270f4b23cd11e4529e98ad9c6d78b3eae8e
[ "bzip2-1.0.6" ]
9
2021-03-19T11:55:42.000Z
2022-02-10T14:35:53.000Z
src/personal/migrations/0001_initial.py
shopeyin5/blog
ade90270f4b23cd11e4529e98ad9c6d78b3eae8e
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.2.2 on 2019-07-29 19:03 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Question', fields=[ ('id', models.AutoField...
29.107143
117
0.537423
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Question', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=...
true
true
f713d1f837f20b709093ad344a72f4801ea14f31
618
py
Python
Funny_Js_Crack/16-虾米音乐翻页JS破解/taoyizhu.py
qqizai/Func_Js_Crack
8cc8586107fecace4b71d0519cfbc760584171b1
[ "MIT" ]
18
2020-12-09T06:49:46.000Z
2022-01-27T03:20:36.000Z
Funny_Js_Crack/16-虾米音乐翻页JS破解/taoyizhu.py
sumerzhang/Func_Js_Crack
8cc8586107fecace4b71d0519cfbc760584171b1
[ "MIT" ]
null
null
null
Funny_Js_Crack/16-虾米音乐翻页JS破解/taoyizhu.py
sumerzhang/Func_Js_Crack
8cc8586107fecace4b71d0519cfbc760584171b1
[ "MIT" ]
9
2020-12-20T08:52:09.000Z
2021-12-19T09:13:09.000Z
import execjs def get_js_function(js_path, func_name, *func_args): ''' 获取指定目录下的js代码, 并且指定js代码中函数的名字以及函数的参数。 :param js_path: js代码的位置 :param func_name: js代码中函数的名字 :param func_args: js代码中函数的参数 :return: 返回调用js函数的结果 ''' with open(js_path, encoding='utf-8') as fp: js = fp.read() ...
24.72
62
0.621359
import execjs def get_js_function(js_path, func_name, *func_args): with open(js_path, encoding='utf-8') as fp: js = fp.read() ctx = execjs.compile(js) return ctx.call(func_name, func_args[0], func_args[1]) if __name__ == '__main__': passwd = get_js_function('xiami.js', '_s', "")...
true
true
f713d227c0e8d9d2e332c2aa25f7e7796a1d69f9
5,727
py
Python
samples/client/petstore-security-test/python/petstore_api/apis/fake_api.py
zhiyongwang/swagger-codegen
fb3d4e61bb5c7f5ea343d8eac2d0842c2ffe685e
[ "Apache-2.0" ]
1
2019-05-24T14:03:57.000Z
2019-05-24T14:03:57.000Z
samples/client/petstore-security-test/python/petstore_api/apis/fake_api.py
zhiyongwang/swagger-codegen
fb3d4e61bb5c7f5ea343d8eac2d0842c2ffe685e
[ "Apache-2.0" ]
null
null
null
samples/client/petstore-security-test/python/petstore_api/apis/fake_api.py
zhiyongwang/swagger-codegen
fb3d4e61bb5c7f5ea343d8eac2d0842c2ffe685e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \...
38.959184
184
0.572027
from __future__ import absolute_import import sys import os import re from six import iteritems from ..configuration import Configuration from ..api_client import ApiClient class FakeApi(object): def __init__(self, api_client=None): config = Configuration() if api_client: self.a...
true
true
f713d2dfa0940a023fa6c459b519fe50dd7f2466
407
py
Python
onem2m/util.py
franjial/ghostm2m
2e7898761237cb12f4fddd55665b3a15fb84dddc
[ "MIT" ]
null
null
null
onem2m/util.py
franjial/ghostm2m
2e7898761237cb12f4fddd55665b3a15fb84dddc
[ "MIT" ]
null
null
null
onem2m/util.py
franjial/ghostm2m
2e7898761237cb12f4fddd55665b3a15fb84dddc
[ "MIT" ]
null
null
null
class Singleton(type): """ """ _instances = {} def __call__(cls, *args, **kwargs): """ Possible changes to the value of the `__init__` argument do not affect the returned instance. """ if cls not in cls._instances: instance = super().__call__(*args, ...
27.133333
78
0.560197
class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: instance = super().__call__(*args, **kwargs) cls._instances[cls] = instance return cls._instances[cls]
true
true
f713d2ef2e90d06531edcf6a3efcb4a1542366f0
397
py
Python
to_do_list/to_do_list/asgi.py
sanjaykrishnan/to-do-list-backend
fbc322aac526afc69ba2385a4d503b2e9fd096c0
[ "MIT" ]
null
null
null
to_do_list/to_do_list/asgi.py
sanjaykrishnan/to-do-list-backend
fbc322aac526afc69ba2385a4d503b2e9fd096c0
[ "MIT" ]
null
null
null
to_do_list/to_do_list/asgi.py
sanjaykrishnan/to-do-list-backend
fbc322aac526afc69ba2385a4d503b2e9fd096c0
[ "MIT" ]
null
null
null
""" ASGI config for to_do_list project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'to_do_list.settings') application = get_asgi_application()
true
true
f713d3498adfa663334e6f44326c17d626d08012
8,682
py
Python
qa/rpc-tests/rawtransactions.py
v1nc0/macclone14.3
e91fb2566205b5f4e2e1b2384cd93309a24261c4
[ "MIT" ]
null
null
null
qa/rpc-tests/rawtransactions.py
v1nc0/macclone14.3
e91fb2566205b5f4e2e1b2384cd93309a24261c4
[ "MIT" ]
null
null
null
qa/rpc-tests/rawtransactions.py
v1nc0/macclone14.3
e91fb2566205b5f4e2e1b2384cd93309a24261c4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Machinecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """rawtranscation RPCs QA test. # Tests the following RPCs: # - createrawtransaction # - signra...
44.752577
147
0.644782
from test_framework.test_framework import MachinecoinTestFramework from test_framework.util import * class RawTransactionsTest(MachinecoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 3 def setup_network(self, split=False): ...
true
true
f713d39ef8fd6add029331f47f48d93c39cfe6a7
1,039
py
Python
tests/test_laguerre_inv.py
jab0707/UncertainSCI
569c978c4f67dd7bb37e730276f2a376b8639235
[ "MIT" ]
1
2021-07-25T17:02:36.000Z
2021-07-25T17:02:36.000Z
tests/test_laguerre_inv.py
jab0707/UncertainSCI
569c978c4f67dd7bb37e730276f2a376b8639235
[ "MIT" ]
70
2020-04-09T17:38:12.000Z
2022-03-18T17:06:09.000Z
tests/test_laguerre_inv.py
jab0707/UncertainSCI
569c978c4f67dd7bb37e730276f2a376b8639235
[ "MIT" ]
7
2020-05-28T17:26:05.000Z
2021-08-13T21:41:10.000Z
import unittest import numpy as np from UncertainSCI.families import LaguerrePolynomials class IDistTestCase(unittest.TestCase): """ Tests for (Laguerre polynomial) inversed induced distributions. """ def test_idistinv_laguerre(self): """Evaluation of Laguerre inversed induced distribution ...
25.341463
94
0.596728
import unittest import numpy as np from UncertainSCI.families import LaguerrePolynomials class IDistTestCase(unittest.TestCase): def test_idistinv_laguerre(self): rho = 11*np.random.random() - 1 L = LaguerrePolynomials(rho=rho) n = int(np.ceil(10*np.random.rand(1))[0]) ...
true
true
f713d436a3df74fcfc8664b3066de64a6190fdca
2,796
py
Python
michiru/modules/logger.py
moeIO/michiru
f1bafb90c2d82debee9e0402b426eba592038f24
[ "WTFPL" ]
1
2018-01-25T15:39:12.000Z
2018-01-25T15:39:12.000Z
michiru/modules/logger.py
moeIO/michiru
f1bafb90c2d82debee9e0402b426eba592038f24
[ "WTFPL" ]
null
null
null
michiru/modules/logger.py
moeIO/michiru
f1bafb90c2d82debee9e0402b426eba592038f24
[ "WTFPL" ]
null
null
null
# Logging module. import os from os import path import datetime from michiru import config from michiru.modules import hook ## Module information. __name__ = 'logger' __author__ = 'Shiz' __license__ = 'WTFPL' __desc__ = 'Log activities.' config.item('logger.path', path.join('{local}', 'logs', '{server}', '{channel...
31.772727
150
0.670601
import os from os import path import datetime from michiru import config from michiru.modules import hook __name__ = 'logger' __author__ = 'Shiz' __license__ = 'WTFPL' __desc__ = 'Log activities.' config.item('logger.path', path.join('{local}', 'logs', '{server}', '{channel}.log')) config.item('logger.date_format'...
true
true
f713d6cad3bb95d57bc72cad5289e97d9d7f1a6b
2,225
py
Python
coding/fetching_RE.py
Thyme-The-Herb/Web-Scraping
80fbc0370ebb0152ce778fe5b985f1703ec4839b
[ "MIT" ]
null
null
null
coding/fetching_RE.py
Thyme-The-Herb/Web-Scraping
80fbc0370ebb0152ce778fe5b985f1703ec4839b
[ "MIT" ]
null
null
null
coding/fetching_RE.py
Thyme-The-Herb/Web-Scraping
80fbc0370ebb0152ce778fe5b985f1703ec4839b
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup from selenium import webdriver import selenium as se from selenium.webdriver.chrome.options import Options # This is the temporary url **** Need to make it dynamic url = "https://www.realestate.co.nz/residential/sale?by=featured&lct=d225&maxba=2&maxbe=4&maxp=1400000&ql=80&scat=1" # Compo...
40.454545
124
0.670112
from bs4 import BeautifulSoup from selenium import webdriver import selenium as se from selenium.webdriver.chrome.options import Options url = "https://www.realestate.co.nz/residential/sale?by=featured&lct=d225&maxba=2&maxbe=4&maxp=1400000&ql=80&scat=1" options = se.webdriver.ChromeOptions() ...
true
true
f713d72ab83c2f34fb2686c69f7fc5ff3e1e1581
13,844
py
Python
tests/messages_tests/base.py
kkoralsky/django
924af638e4d4fb8eb46a19ac0cafcb2e83480cf3
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/messages_tests/base.py
kkoralsky/django
924af638e4d4fb8eb46a19ac0cafcb2e83480cf3
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/messages_tests/base.py
kkoralsky/django
924af638e4d4fb8eb46a19ac0cafcb2e83480cf3
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-02-06T10:31:51.000Z
2020-02-06T10:31:51.000Z
from django import http from django.contrib.messages import constants, get_level, set_level, utils from django.contrib.messages.api import MessageFailure from django.contrib.messages.constants import DEFAULT_LEVELS from django.contrib.messages.storage import base, default_storage from django.contrib.messages.storage.ba...
36.917333
99
0.630526
from django import http from django.contrib.messages import constants, get_level, set_level, utils from django.contrib.messages.api import MessageFailure from django.contrib.messages.constants import DEFAULT_LEVELS from django.contrib.messages.storage import base, default_storage from django.contrib.messages.storage.ba...
true
true
f713d8b7796ccabed8db2a1d07dbfb48bd718890
6,406
py
Python
opps/containers/admin.py
mauler/opps
24a8d81434b8c17eafc894d51c1c3adbb67d7d07
[ "MIT" ]
null
null
null
opps/containers/admin.py
mauler/opps
24a8d81434b8c17eafc894d51c1c3adbb67d7d07
[ "MIT" ]
null
null
null
opps/containers/admin.py
mauler/opps
24a8d81434b8c17eafc894d51c1c3adbb67d7d07
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from django.contrib import admin from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.conf import settings from .models import Container, ContainerImage, Mirror from .models import ContainerBox, ContainerBoxConta...
35.005464
78
0.642523
import json from django.contrib import admin from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.conf import settings from .models import Container, ContainerImage, Mirror from .models import ContainerBox, ContainerBoxContainers from .forms import ContainerBoxContainer...
true
true
f713d8ddadb695ef35b334d9bdb44a3532a72d22
448
py
Python
map_objects/tile.py
MikeChunko/rogue
7974a55f732ec03c47321ccbd8950ff8856bd5f2
[ "BSD-2-Clause" ]
null
null
null
map_objects/tile.py
MikeChunko/rogue
7974a55f732ec03c47321ccbd8950ff8856bd5f2
[ "BSD-2-Clause" ]
null
null
null
map_objects/tile.py
MikeChunko/rogue
7974a55f732ec03c47321ccbd8950ff8856bd5f2
[ "BSD-2-Clause" ]
null
null
null
# File name: tile.py # Author: Michael Chunko # Python Version: 3.7 # This file contains the class representing a tile on a map class Tile: def __init__(self, blocked=True, block_sight=None, seen=False): self.blocked = blocked # By default, a blocked tile also blocks sight if block_sight...
23.578947
67
0.640625
class Tile: def __init__(self, blocked=True, block_sight=None, seen=False): self.blocked = blocked if block_sight is None: self.block_sight = blocked else: self.block_sight = blocked self.seen = seen
true
true
f713d947567df750231c71b544d1b9bc0cef1b63
1,978
py
Python
panoptes_aggregation/running_reducers/tess_user_reducer.py
alnah005/aggregation-for-caesar
b2422f4c007857531ac3ff2636b567adb667dd0c
[ "Apache-2.0" ]
9
2018-04-11T13:44:32.000Z
2022-03-09T16:39:26.000Z
panoptes_aggregation/running_reducers/tess_user_reducer.py
alnah005/aggregation-for-caesar
b2422f4c007857531ac3ff2636b567adb667dd0c
[ "Apache-2.0" ]
217
2017-07-27T09:20:15.000Z
2022-03-21T11:15:33.000Z
panoptes_aggregation/running_reducers/tess_user_reducer.py
hughdickinson/aggregation-for-caesar
d6bca0a1126e0397315d5773401c71075c33ee2f
[ "Apache-2.0" ]
10
2018-11-12T21:36:48.000Z
2022-02-07T11:50:03.000Z
''' TESS User Reducer ----------------- This module porvides functions to calculate uesr weights for the TESS project. Extracts are from Ceasars `PluckFieldExtractor`. ''' from .running_reducer_wrapper import running_reducer_wrapper import numpy as np @running_reducer_wrapper(relevant_reduction=True) def tess_user_re...
31.903226
103
0.636502
from .running_reducer_wrapper import running_reducer_wrapper import numpy as np @running_reducer_wrapper(relevant_reduction=True) def tess_user_reducer(data, **kwargs): success = [d['success'] for d in data[0]['feedback']] store = kwargs.pop('store') relevant_reduction = kwargs.pop('relevant_reduction')[0...
true
true
f713d95566b79d1732ae7300f0c55116e9f79c8b
1,017
bzl
Python
tools/bazel_deps.bzl
rockwotj/run_binary_example
cf613bdb2cd2c1e411e50ad53980d1c022498a88
[ "MIT" ]
null
null
null
tools/bazel_deps.bzl
rockwotj/run_binary_example
cf613bdb2cd2c1e411e50ad53980d1c022498a88
[ "MIT" ]
null
null
null
tools/bazel_deps.bzl
rockwotj/run_binary_example
cf613bdb2cd2c1e411e50ad53980d1c022498a88
[ "MIT" ]
null
null
null
# Third-party dependencies fetched by Bazel # Unlike WORKSPACE, the content of this file is unordered. # We keep them separate to make the WORKSPACE file more maintainable. # Install the nodejs "bootstrap" package # This provides the basic tools for running and packaging nodejs programs in Bazel load("@bazel_tools//to...
44.217391
112
0.72468
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def fetch_dependencies(): http_archive( name = "build_bazel_rules_nodejs", sha256 = "e79c08a488cc5ac40981987d862c7320cee8741122a2649e9b08e850b6f20442", urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/...
true
true