hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
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
209
max_issues_repo_name
stringlengths
5
121
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
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
4a4a3dd660d721182ad54a000d5f054b27c4a1ea
480
py
Python
tests/test_search.py
City-Bureau/python-legistar-scraper
7c23d4af926a5187e86b9273e363c314cced7dba
[ "BSD-3-Clause" ]
28
2015-07-28T22:30:06.000Z
2022-02-04T01:53:53.000Z
tests/test_search.py
City-Bureau/python-legistar-scraper
7c23d4af926a5187e86b9273e363c314cced7dba
[ "BSD-3-Clause" ]
60
2015-06-15T17:14:26.000Z
2022-03-23T12:55:05.000Z
tests/test_search.py
City-Bureau/python-legistar-scraper
7c23d4af926a5187e86b9273e363c314cced7dba
[ "BSD-3-Clause" ]
23
2015-06-15T17:09:46.000Z
2021-12-07T15:00:27.000Z
import pytest class TestAPISearch(object): def test_search_raises(self, scraper): with pytest.raises(ValueError): results = scraper.search('/events/', 'EventId', "MatterFile eq 'O2010-5046'") list(results) def test_search(self, scraper): ...
28.235294
66
0.54375
0a55d4eae89d1b08701e1836a5a0e9d222d0b51f
449
py
Python
mdi/migrations/0071_add_org_language.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
1
2020-01-28T16:16:49.000Z
2020-01-28T16:16:49.000Z
mdi/migrations/0071_add_org_language.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
114
2020-02-12T20:22:07.000Z
2021-09-22T18:29:50.000Z
mdi/migrations/0071_add_org_language.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
4
2020-04-21T21:09:25.000Z
2021-01-08T14:18:58.000Z
# Generated by Django 3.0.3 on 2020-05-28 22:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mdi', '0070_add_tool_license_type'), ] operations = [ migrations.AddField( model_name='organization', name='language...
23.631579
107
0.628062
0566dad78e69f65ac0242be2c31bba21cd4c28fe
1,821
py
Python
polls/views.py
tboz203/django-tutorial
711590b490c4701c79309b53a126e86076510117
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
polls/views.py
tboz203/django-tutorial
711590b490c4701c79309b53a126e86076510117
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
polls/views.py
tboz203/django-tutorial
711590b490c4701c79309b53a126e86076510117
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
import datetime from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, Http404, HttpResponseRedirect from django.template import RequestContext, loader from django.core.urlresolvers import reverse from django.views import generic from django.utils import timezone from polls.model...
31.947368
79
0.696321
e404dcaf120684bd621d62fa0d92a36432c68f06
83,484
py
Python
scheduleServer.py
David12312341/Carmelorto
d2a7fe6522940db1d4ee186c5ff335c03e3622da
[ "MIT" ]
null
null
null
scheduleServer.py
David12312341/Carmelorto
d2a7fe6522940db1d4ee186c5ff335c03e3622da
[ "MIT" ]
null
null
null
scheduleServer.py
David12312341/Carmelorto
d2a7fe6522940db1d4ee186c5ff335c03e3622da
[ "MIT" ]
null
null
null
from flask_login import UserMixin, current_user, LoginManager, login_required, login_user, logout_user from flask import Flask, render_template, request, jsonify, redirect, url_for from flask_dance.consumer.backend.sqla import OAuthConsumerMixin, SQLAlchemyBackend from flask_dance.contrib.google import make_google_blue...
38.190302
174
0.585394
cdce956f3fbd225ed722dc671f37195dc2c562ce
766
py
Python
migrations/versions/820fdebe8007_cluster_unique_name_change.py
guioliveirabh/rhub-api
e57de57719d16dc8cc16ca30933bf2fdc5519234
[ "MIT" ]
1
2022-02-17T11:45:13.000Z
2022-02-17T11:45:13.000Z
migrations/versions/820fdebe8007_cluster_unique_name_change.py
guioliveirabh/rhub-api
e57de57719d16dc8cc16ca30933bf2fdc5519234
[ "MIT" ]
null
null
null
migrations/versions/820fdebe8007_cluster_unique_name_change.py
guioliveirabh/rhub-api
e57de57719d16dc8cc16ca30933bf2fdc5519234
[ "MIT" ]
null
null
null
""" cluster unique name change Revision ID: 820fdebe8007 Revises: 154ca1030fe2 Create Date: 2022-03-14 12:15:09.862003 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '820fdebe8007' down_revision = '154ca1030fe2' branch_labels = None depends_on = None def upg...
25.533333
80
0.703655
dab7b41a5ec445d855594652b71f5d6473183e7f
13,812
py
Python
jumeg/gui/utils/jumeg_gui_utils_inspect_module.py
fboers/jumeg
e04896989faf72f4dbe7adf136e4d158d212f24a
[ "BSD-3-Clause" ]
6
2015-04-10T07:13:07.000Z
2021-12-12T04:04:37.000Z
jumeg/gui/utils/jumeg_gui_utils_inspect_module.py
fboers/jumeg
e04896989faf72f4dbe7adf136e4d158d212f24a
[ "BSD-3-Clause" ]
112
2015-01-07T10:19:24.000Z
2022-02-01T15:48:16.000Z
jumeg/gui/utils/jumeg_gui_utils_inspect_module.py
fboers/jumeg
e04896989faf72f4dbe7adf136e4d158d212f24a
[ "BSD-3-Clause" ]
22
2015-03-11T12:19:50.000Z
2021-11-20T04:24:42.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Mar 27 10:08:17 2018 @author: fboers ---> update 03.04.2019 FB --> user logger from logging avoid print """ import os,sys,glob,re,textwrap import ast import logging from types import ModuleType from pathlib import Path import numpy as np from jume...
31.534247
146
0.555097
d663ac77464525fb0e58b6c4f62bd1e711045bc6
8,080
py
Python
scripts/crawl.py
hseom/brunet-1
26e6e75250a8ac05569e711fa77b86d0e9976c79
[ "MIT" ]
1
2020-10-10T17:21:43.000Z
2020-10-10T17:21:43.000Z
scripts/crawl.py
hseom/brunet-1
26e6e75250a8ac05569e711fa77b86d0e9976c79
[ "MIT" ]
null
null
null
scripts/crawl.py
hseom/brunet-1
26e6e75250a8ac05569e711fa77b86d0e9976c79
[ "MIT" ]
null
null
null
#!/usr/bin/env python import xmlrpclib, sys, time, thread, types, getopt, pybru usage = """usage: python crawl.py [--debug] [--port=<int>] [--namespace=<string>] debug = print the current node crawling port = the xmlrpc port for a brunet node to be used for crawling namespace = the brunet namespace to crawl help = thi...
29.59707
131
0.589109
8354cc628cb235402a0d9b63860222a0a0fc1dbc
339
py
Python
mentorbot/MentorDetails/migrations/0007_remove_mentorprofile_user.py
MentorBot/Webhook
696ce15f41d1c15a6cae336c41f3e56e4a3e5056
[ "Unlicense" ]
2
2018-06-04T10:46:09.000Z
2020-06-02T14:48:44.000Z
mentorbot/MentorDetails/migrations/0007_remove_mentorprofile_user.py
MentorBot/Webhook
696ce15f41d1c15a6cae336c41f3e56e4a3e5056
[ "Unlicense" ]
4
2018-07-18T13:16:50.000Z
2021-09-07T23:41:25.000Z
mentorbot/MentorDetails/migrations/0007_remove_mentorprofile_user.py
MentorBot/Webhook
696ce15f41d1c15a6cae336c41f3e56e4a3e5056
[ "Unlicense" ]
null
null
null
# Generated by Django 2.0.2 on 2018-07-23 18:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('MentorDetails', '0006_auto_20180723_1456'), ] operations = [ migrations.RemoveField( model_name='mentorprofile', name='user'...
18.833333
53
0.60472
8ba5c9b87eb7de74a895ad29ab96922825a018e9
7,829
py
Python
tests/www/views/test_views_dagrun.py
qgallet/airflow
8cf3d120ff44c6604e330cc9c4e7945b3f1edc6c
[ "Apache-2.0" ]
27
2019-02-25T14:20:36.000Z
2022-03-22T09:35:13.000Z
tests/www/views/test_views_dagrun.py
qgallet/airflow
8cf3d120ff44c6604e330cc9c4e7945b3f1edc6c
[ "Apache-2.0" ]
200
2019-01-09T15:33:06.000Z
2022-01-12T09:13:42.000Z
tests/www/views/test_views_dagrun.py
qgallet/airflow
8cf3d120ff44c6604e330cc9c4e7945b3f1edc6c
[ "Apache-2.0" ]
14
2019-06-25T17:08:29.000Z
2022-03-29T13:25:53.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
35.748858
100
0.686678
888db376a3498c39bc62d79c8edb7ba01ce615b8
927
py
Python
backend/src/common/utils.py
moatom/alistice
222217928d9634b14e3c192abedc8c7d419ab868
[ "MIT" ]
null
null
null
backend/src/common/utils.py
moatom/alistice
222217928d9634b14e3c192abedc8c7d419ab868
[ "MIT" ]
null
null
null
backend/src/common/utils.py
moatom/alistice
222217928d9634b14e3c192abedc8c7d419ab868
[ "MIT" ]
null
null
null
# http://tanihito.hatenablog.com/entry/20110119/1295459297 from functools import wraps def tail_recursive(func): self_func = [func] self_firstcall = [True] self_CONTINUE = [object()] self_argskwd = [None] @wraps(func) def _tail_recursive(*args, **kwd): if self_firstcall[0] == True:...
33.107143
62
0.535059
08917a67c2b638b0cce5d1bcf789f828a058b546
5,514
py
Python
mushroom-app/api-service/api/tracker.py
TangJiahui/AC215-Advanced_Practical_Data_Science
904e595630ddb9b2348889ce0d2cc777bb90f071
[ "MIT" ]
null
null
null
mushroom-app/api-service/api/tracker.py
TangJiahui/AC215-Advanced_Practical_Data_Science
904e595630ddb9b2348889ce0d2cc777bb90f071
[ "MIT" ]
null
null
null
mushroom-app/api-service/api/tracker.py
TangJiahui/AC215-Advanced_Practical_Data_Science
904e595630ddb9b2348889ce0d2cc777bb90f071
[ "MIT" ]
null
null
null
import os import asyncio from glob import glob import json import pandas as pd import tensorflow as tf from google.cloud import storage gcp_project = os.environ["GCP_PROJECT"] bucket_name = "ac215-mushroom-app-models-small" local_experiments_path = "/persistent/experiments" # Setup experiments folder if not os.pat...
33.017964
89
0.647443
79fd13e3d3c113ffcd2b6ba259d3ecdc0ce71415
259
py
Python
my_classes/.history/Tuples/modifying_extending_named_tuples_20210723141750.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/Tuples/modifying_extending_named_tuples_20210723141750.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/Tuples/modifying_extending_named_tuples_20210723141750.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
''' Modifying and extending Named Tuples Named tuples are immutable How we can change values inside the tuple Just like with strings, we have to create a new tuple, with the modified values Point2D = namedtuple('Point2D', 'x y' '''
25.9
79
0.687259
560f39ce561e455177fbb061ebdacb9c373c4582
14,357
py
Python
viper/modules/peepdf/PDFUtils.py
ncscuk/viper
9851111bbceeb50f93cb1247662ccb51d8926bea
[ "BSD-3-Clause" ]
97
2017-12-18T15:19:28.000Z
2022-03-25T07:10:00.000Z
viper/modules/peepdf/PDFUtils.py
ncscuk/viper
9851111bbceeb50f93cb1247662ccb51d8926bea
[ "BSD-3-Clause" ]
2
2016-11-13T01:43:29.000Z
2017-08-16T07:51:51.000Z
viper/modules/peepdf/PDFUtils.py
voidp34r/viper
6eab4070ff9ed81dd4817fc566f420be495ee47e
[ "BSD-3-Clause" ]
21
2018-04-04T18:12:13.000Z
2021-06-12T09:40:58.000Z
# # peepdf is a tool to analyse and modify PDF files # http://peepdf.eternal-todo.com # By Jose Miguel Esparza <jesparza AT eternal-todo.com> # # Copyright (C) 2011-2014 Jose Miguel Esparza # # This file is part of peepdf. # # peepdf is free software: you can redistribute it and/or modify # it under the terms of the ...
32.703872
166
0.623459
2256c0052a0efc50d7915bedd0653344a9d82643
1,436
py
Python
game2048/agents.py
projectyag/2048-api
50934e3695d4c6034994325f255ef0a1d5885afa
[ "Apache-2.0" ]
null
null
null
game2048/agents.py
projectyag/2048-api
50934e3695d4c6034994325f255ef0a1d5885afa
[ "Apache-2.0" ]
null
null
null
game2048/agents.py
projectyag/2048-api
50934e3695d4c6034994325f255ef0a1d5885afa
[ "Apache-2.0" ]
null
null
null
import numpy as np class Agent: '''Agent Base.''' def __init__(self, game, display=None): self.game = game self.display = display def play(self, max_iter=np.inf, verbose=False): n_iter = 0 while (n_iter < max_iter) and (not self.game.end): direction = self.ste...
28.156863
86
0.55571
9c17d2df9a9665f58ac3bde382248e91af2e7137
3,962
py
Python
hack/generators/release-controllers/content/bump_versioned_resources.py
fabianofranz/release
2ccc2e85469a82cce240a022ae7935ba75dfa380
[ "Apache-2.0" ]
185
2017-06-15T18:27:16.000Z
2022-03-31T21:14:10.000Z
hack/generators/release-controllers/content/bump_versioned_resources.py
fabianofranz/release
2ccc2e85469a82cce240a022ae7935ba75dfa380
[ "Apache-2.0" ]
26,836
2016-12-15T21:04:07.000Z
2022-03-31T23:56:51.000Z
hack/generators/release-controllers/content/bump_versioned_resources.py
fabianofranz/release
2ccc2e85469a82cce240a022ae7935ba75dfa380
[ "Apache-2.0" ]
1,055
2016-12-05T17:05:52.000Z
2022-03-31T17:08:13.000Z
import sys import glob from os import path from shutil import copyfile def _get_previous_version(version): pieces = version.split('.') if len(pieces) > 2: print(f'Unable to determine previous version number from version: {version}') sys.exit(1) pieces[1] = str(int(pieces[1])-1) re...
38.466019
124
0.719334
d0e6566fbf0f36f1ee6401080f6258240e79de59
3,405
py
Python
book_test.py
TEJESH/gandhi
0df623b7718ec5dc7a19ac82c9c7114df9715d1d
[ "MIT" ]
1
2019-01-11T11:47:50.000Z
2019-01-11T11:47:50.000Z
book_test.py
TEJESH/gandhi
0df623b7718ec5dc7a19ac82c9c7114df9715d1d
[ "MIT" ]
null
null
null
book_test.py
TEJESH/gandhi
0df623b7718ec5dc7a19ac82c9c7114df9715d1d
[ "MIT" ]
null
null
null
import collections import time #from goodreads import apikey from goodreads.client import GoodreadsClient from goodreads.book import GoodreadsBook from goodreads.author import GoodreadsAuthor from goodreads.shelf import GoodreadsShelf class TestBook(): @classmethod def setup_class(cls): client = Goodr...
32.122642
114
0.681057
40f07c2b1ca6f0b4aa7cdcf3e55af08fbadc1272
4,915
py
Python
utils/dataloaders_utils.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
29
2021-11-30T16:18:04.000Z
2022-03-29T13:47:20.000Z
utils/dataloaders_utils.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
2
2022-01-07T19:53:26.000Z
2022-01-21T05:10:17.000Z
utils/dataloaders_utils.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
5
2021-12-07T05:14:12.000Z
2022-03-22T16:17:26.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import logging from importlib.machinery import SourceFileLoader from utils import print_rank def get_exp_dataloader(task): """ Detect the dataloader declared in the experiment folder Args: task (str): task parsed from ...
37.519084
188
0.629705
2d15b122b23c15b02e89dc3b15d9d5d2f2b7f067
7,835
py
Python
MTHMBE/views.py
jvprosser/MTHMBE
14a76e69a36fd3f62f2f75d3ea2b8b7aacda5743
[ "Apache-2.0" ]
null
null
null
MTHMBE/views.py
jvprosser/MTHMBE
14a76e69a36fd3f62f2f75d3ea2b8b7aacda5743
[ "Apache-2.0" ]
null
null
null
MTHMBE/views.py
jvprosser/MTHMBE
14a76e69a36fd3f62f2f75d3ea2b8b7aacda5743
[ "Apache-2.0" ]
null
null
null
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from flask import Flask from flask_apscheduler import APScheduler from flask_sqlalchemy import SQLAlchemy from MTHMBE import app from models import RMStats,Impala_Stats import core #import time from time import mktime, strftime,localtime from pytz import t...
35.452489
188
0.656669
e13c8705ad3b1a1dd5398f36056d8b56fa0bda69
4,948
py
Python
ee/clickhouse/queries/clickhouse_funnel_trends.py
coherentdigital/posthog
8d90b00c99e7d49619140de66d3d4ab177046db0
[ "MIT" ]
1
2021-06-17T20:59:38.000Z
2021-06-17T20:59:38.000Z
ee/clickhouse/queries/clickhouse_funnel_trends.py
snawar92/posthog
0aa5e0a319a278e31d672832c61914901956918b
[ "MIT" ]
null
null
null
ee/clickhouse/queries/clickhouse_funnel_trends.py
snawar92/posthog
0aa5e0a319a278e31d672832c61914901956918b
[ "MIT" ]
1
2021-06-17T02:18:43.000Z
2021-06-17T02:18:43.000Z
from datetime import datetime, timedelta from ee.clickhouse.client import sync_execute from ee.clickhouse.models.property import parse_prop_clauses from ee.clickhouse.queries.clickhouse_funnel_base import ClickhouseFunnelBase from ee.clickhouse.queries.util import get_time_diff, get_trunc_func_ch, parse_timestamps fro...
38.96063
111
0.674616
ee3ff14599e8eefc298ace439b38850374ea8dbd
18,491
py
Python
test/engine/test_reconnect.py
nKey/sqlalchemy
02ec9afb15c2a215e0d8b777669a6edc2ed00451
[ "MIT" ]
null
null
null
test/engine/test_reconnect.py
nKey/sqlalchemy
02ec9afb15c2a215e0d8b777669a6edc2ed00451
[ "MIT" ]
null
null
null
test/engine/test_reconnect.py
nKey/sqlalchemy
02ec9afb15c2a215e0d8b777669a6edc2ed00451
[ "MIT" ]
null
null
null
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import time import weakref from sqlalchemy import select, MetaData, Integer, String, pool, create_engine from sqlalchemy.testing.schema import Table, Column import sqlalchemy as tsa from sqlalchemy import testing from sqlalchemy.testing import eng...
28.712733
88
0.581039
0fc7e59ff364b91376e5ce99e6917136a7b3c3d4
3,266
py
Python
cogs/utils/checks.py
BHBHD/Naz
c286f29ed187ec905c21ee99f307543ab6502f42
[ "MIT" ]
null
null
null
cogs/utils/checks.py
BHBHD/Naz
c286f29ed187ec905c21ee99f307543ab6502f42
[ "MIT" ]
null
null
null
cogs/utils/checks.py
BHBHD/Naz
c286f29ed187ec905c21ee99f307543ab6502f42
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import sqlite3 async def check_permissions(ctx, perms, *, check=all): is_owner = await ctx.bot.is_owner(ctx.author) if is_owner: return True resolved = ctx.channel.permissions_for(ctx.author) return check(getattr(resolved, name, None) == value f...
29.690909
108
0.679118
8acbe1b3d294fc3f5aad5a156717db46c9da08cb
1,680
py
Python
coba/environments/formats.py
anrath/coba
635fd21306f52b27e7f5d78ee05148e6934e3d38
[ "BSD-3-Clause" ]
null
null
null
coba/environments/formats.py
anrath/coba
635fd21306f52b27e7f5d78ee05148e6934e3d38
[ "BSD-3-Clause" ]
null
null
null
coba/environments/formats.py
anrath/coba
635fd21306f52b27e7f5d78ee05148e6934e3d38
[ "BSD-3-Clause" ]
null
null
null
import collections from itertools import product from typing import Sequence, Dict, Any from coba.registry import CobaRegistry from coba.pipes import Filter from coba.environments.core import SimulatedEnvironment from coba.environments.pipes import EnvironmentPipe class EnvironmentFileFmtV1(Filter[Dict[str,Any], S...
35.744681
103
0.632143
acda5e9d21ec2aa8c6a221fd0445fea13a63e045
1,057
py
Python
Vault7/Lost-in-Translation/windows/exploits/ZIBE/pyreadline/configuration/startup.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
46
2017-05-15T11:15:08.000Z
2018-07-02T03:32:52.000Z
Vault7/Lost-in-Translation/windows/exploits/ZIBE/pyreadline/configuration/startup.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
null
null
null
Vault7/Lost-in-Translation/windows/exploits/ZIBE/pyreadline/configuration/startup.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
24
2017-05-17T03:26:17.000Z
2018-07-09T07:00:50.000Z
# -*- coding: UTF-8 -*- # Example snippet to use in a PYTHONSTARTUP file try: import pyreadline.rlmain #pyreadline.rlmain.config_path=r"c:\xxx\pyreadlineconfig.ini" import readline,atexit import pyreadline.unicode_helper # # #Normally the codepage for pyreadline is set to be sys.std...
34.096774
76
0.723746
4ca7bed044191c3284afcd0533c0a26c8b76577e
2,124
py
Python
server/src/auth_module/auth_routes.py
dmitrijbozhkov/zno-library
888ccde7163f8ac6746e4065f47d5070eadff5a7
[ "Apache-2.0" ]
null
null
null
server/src/auth_module/auth_routes.py
dmitrijbozhkov/zno-library
888ccde7163f8ac6746e4065f47d5070eadff5a7
[ "Apache-2.0" ]
null
null
null
server/src/auth_module/auth_routes.py
dmitrijbozhkov/zno-library
888ccde7163f8ac6746e4065f47d5070eadff5a7
[ "Apache-2.0" ]
null
null
null
""" Manages users """ from flask import Blueprint, request, make_response, Response from json import dumps from .auth_model import CredentialsChecker, add_user, log_in_credentials import datetime credentials_checker = CredentialsChecker() auth = Blueprint("auth", "auth_routes", url_prefix="/auth") @auth.route("/crea...
36
86
0.635122
1617280ee544dc55d050c8d8fa5b438e5c0bf645
827
py
Python
game_stats.py
Steven-Kha/CPSC-386-Pong-no-walls
f0862618d8b768bd37e7561b55f8369c329b6062
[ "CC-BY-4.0" ]
null
null
null
game_stats.py
Steven-Kha/CPSC-386-Pong-no-walls
f0862618d8b768bd37e7561b55f8369c329b6062
[ "CC-BY-4.0" ]
null
null
null
game_stats.py
Steven-Kha/CPSC-386-Pong-no-walls
f0862618d8b768bd37e7561b55f8369c329b6062
[ "CC-BY-4.0" ]
null
null
null
# By Steven Kha 2018 class GameStats: """Track statistics for Alien Invasion.""" def __init__(self, ai_settings): """Initialize statistics.""" self.ai_settings = ai_settings self.reset_stats() # Start game in an inactive state. self.game_active = False self.star...
25.84375
66
0.616687
77bb66f7c3d398c453d0033c770be2284a4e3fb4
1,877
py
Python
models/lstm.py
chris4540/DT2119-Final-Project
a9e665d2fcc91442bcd80171fe557b09fcd71d00
[ "MIT" ]
1
2020-08-19T17:29:53.000Z
2020-08-19T17:29:53.000Z
models/lstm.py
chris4540/DT2119-Final-Project
a9e665d2fcc91442bcd80171fe557b09fcd71d00
[ "MIT" ]
null
null
null
models/lstm.py
chris4540/DT2119-Final-Project
a9e665d2fcc91442bcd80171fe557b09fcd71d00
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import numpy as np from torch import LongTensor from torch.nn.utils.rnn import pad_packed_sequence from torch.nn.functional import log_softmax class LSTMClassifier(nn.Module): """ Wrapper of true lstm model """ def __init__(self, n_feature, n_class, n_hidden=3, num_l...
34.759259
94
0.644113
41dc46fd208dd937ed8b95752997ba9ac3ebc64c
17,178
py
Python
xonsh/dirstack.py
sebix/xonsh
99bdf5600af446ac4e3ba4067111fc309569b8b7
[ "BSD-2-Clause-FreeBSD" ]
1
2021-12-29T17:42:08.000Z
2021-12-29T17:42:08.000Z
xonsh/dirstack.py
sebix/xonsh
99bdf5600af446ac4e3ba4067111fc309569b8b7
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xonsh/dirstack.py
sebix/xonsh
99bdf5600af446ac4e3ba4067111fc309569b8b7
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# -*- coding: utf-8 -*- """Directory stack and associated utilities for the xonsh shell. https://www.gnu.org/software/bash/manual/html_node/Directory-Stack-Builtins.html """ import glob import os import subprocess import typing as tp from contextlib import contextmanager from xonsh.built_ins import XSH from xonsh.cli...
30.675
120
0.575038
cb2cca721c73e3e7738eec49df5f1c7cedd5c4bf
2,943
py
Python
nomadgram/locations/models.py
zlyanz13/Yonwongram
a340f8ef215d3d8967e6977f89f46fbe2cc1a337
[ "MIT" ]
null
null
null
nomadgram/locations/models.py
zlyanz13/Yonwongram
a340f8ef215d3d8967e6977f89f46fbe2cc1a337
[ "MIT" ]
null
null
null
nomadgram/locations/models.py
zlyanz13/Yonwongram
a340f8ef215d3d8967e6977f89f46fbe2cc1a337
[ "MIT" ]
null
null
null
from django.db import models from django.utils.encoding import python_2_unicode_compatible from nomadgram.users import models as user_models #to prevent Conflicts Using 'as' from taggit.managers import TaggableManager from django.contrib.humanize.templatetags.humanize import naturaltime from django.core.validators impo...
36.333333
120
0.679239
5e4185e3e9e35884de5c6c03d19dad10a8297624
1,676
py
Python
190614_HW2_DFS_BFS/maze3.py
yo1995/Daily_agorithm_practices
55c6488e39f51875107b0eefd2a91e2cc251d3c8
[ "MIT" ]
null
null
null
190614_HW2_DFS_BFS/maze3.py
yo1995/Daily_agorithm_practices
55c6488e39f51875107b0eefd2a91e2cc251d3c8
[ "MIT" ]
null
null
null
190614_HW2_DFS_BFS/maze3.py
yo1995/Daily_agorithm_practices
55c6488e39f51875107b0eefd2a91e2cc251d3c8
[ "MIT" ]
null
null
null
from typing import List from collections import deque dx = [1, 0, -1, 0] dy = [0, 1, 0, -1] direction_char: [str] = ['D', 'R', 'U', 'L'] # 往小走是 up,往大走是 down maze = [ [0,0,0,0,0], [1,1,0,0,1], [0,0,0,0,0], [0,1,0,0,1], [0,1,0,0,0] ] inf = 99999 def find_shortest_path(maze: List[List[int]], sta...
28.40678
120
0.48926
cb82ae084411a2b8b809f9aee6e81dd7e2c47f2f
2,724
py
Python
tests/voids/test_move_all_datafiles_to_backupdir.py
tombaker/mklists_old
cf3ca814cf2cfc785a8cdbddd33162b9ee658570
[ "MIT" ]
1
2021-07-02T03:41:57.000Z
2021-07-02T03:41:57.000Z
tests/voids/test_move_all_datafiles_to_backupdir.py
tombaker/mklists_old
cf3ca814cf2cfc785a8cdbddd33162b9ee658570
[ "MIT" ]
null
null
null
tests/voids/test_move_all_datafiles_to_backupdir.py
tombaker/mklists_old
cf3ca814cf2cfc785a8cdbddd33162b9ee658570
[ "MIT" ]
null
null
null
"""Moves datafiles to backup directory (just before writing new datafiles).""" import os from pathlib import Path import pytest from mklists.voids import move_all_datafiles_to_backupdir def test_move_all_datafiles_to_backupdir(tmp_path): """Moves data files to backup directory.""" os.chdir(tmp_path) tmp_...
41.272727
87
0.750734
59be4b1755a236f17743d749a76282763496485b
7,181
py
Python
astropy/visualization/wcsaxes/tests/test_wcsapi.py
jonathansick/astropy
ceed879bdcf37ed2b40431c07074179d6aa5f7b3
[ "BSD-3-Clause" ]
null
null
null
astropy/visualization/wcsaxes/tests/test_wcsapi.py
jonathansick/astropy
ceed879bdcf37ed2b40431c07074179d6aa5f7b3
[ "BSD-3-Clause" ]
2
2016-11-30T20:31:42.000Z
2016-12-02T23:50:10.000Z
astropy/visualization/wcsaxes/tests/test_wcsapi.py
jonathansick/astropy
ceed879bdcf37ed2b40431c07074179d6aa5f7b3
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np import matplotlib.pyplot as plt from matplotlib.transforms import Affine2D, IdentityTransform from astropy import units as u from astropy.wcs.wcsapi import BaseLowLevelWCS from astropy.coordinates import SkyCoord from as...
31.495614
101
0.620805
7327c756df69575fd69bee1d67199827e1166f35
4,673
py
Python
validate_npi.py
syfiawoo/validate_npi
14d0da1de58ba353997b40edf840d0e10d0f76e4
[ "MIT" ]
null
null
null
validate_npi.py
syfiawoo/validate_npi
14d0da1de58ba353997b40edf840d0e10d0f76e4
[ "MIT" ]
null
null
null
validate_npi.py
syfiawoo/validate_npi
14d0da1de58ba353997b40edf840d0e10d0f76e4
[ "MIT" ]
null
null
null
def validate_npi(npi): valid = False # assume in the beginning that number hasn't been validated data_type = type(npi) # check what datatype npi is if data_type is str: # parameter is a string # check if it has 10 characters if len(npi) == 10: # number has the valid ...
37.685484
103
0.586561
6e9828c974d7d4185660e9918311171330bc296a
146
py
Python
penguin/sound1.py
richardlford/pyev3dev2
c9f58483be8527027701ec7f03caefd1dea0f88e
[ "MIT" ]
null
null
null
penguin/sound1.py
richardlford/pyev3dev2
c9f58483be8527027701ec7f03caefd1dea0f88e
[ "MIT" ]
null
null
null
penguin/sound1.py
richardlford/pyev3dev2
c9f58483be8527027701ec7f03caefd1dea0f88e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from ev3dev2.sound import Sound from time import sleep sound = Sound() sound.play_file('elephant_call.wav') sound.beep()
16.222222
36
0.760274
ad108104c86e794774045e45493c2b66b003f2f8
13,106
py
Python
Jumpscale/core/Application.py
threefoldtech/JumpscaleX
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
2
2019-05-09T07:21:25.000Z
2019-08-05T06:37:53.000Z
Jumpscale/core/Application.py
threefoldtech/JumpscaleX
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
664
2018-12-19T12:43:44.000Z
2019-08-23T04:24:42.000Z
Jumpscale/core/Application.py
threefoldtech/jumpscale10
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
7
2019-05-03T07:14:37.000Z
2019-08-05T12:36:52.000Z
import os # import sys import atexit import struct from collections import namedtuple import psutil import traceback from .BASECLASSES.JSBase import JSBase from .BASECLASSES.JSFactoryBase import JSFactoryBase from .BASECLASSES.JSBaseConfig import JSBaseConfig from .BASECLASSES.JSBaseConfigs import JSBaseConfigs from ....
30.47907
128
0.55837
364fef6d23eeeb7a79704ae0c444f76c811ec438
642
py
Python
source/python/NormalBag.py
JoHyukJun/AlgorithmAnalysis
977b88861aea8e22c671ede4228fbc172191bfb7
[ "Apache-2.0" ]
null
null
null
source/python/NormalBag.py
JoHyukJun/AlgorithmAnalysis
977b88861aea8e22c671ede4228fbc172191bfb7
[ "Apache-2.0" ]
null
null
null
source/python/NormalBag.py
JoHyukJun/AlgorithmAnalysis
977b88861aea8e22c671ede4228fbc172191bfb7
[ "Apache-2.0" ]
null
null
null
''' main.py Created by JO HYUK JUN on 2021 Copyright © 2021 JO HYUK JUN. All rights reserved. ''' import sys n, k = map(int, sys.stdin.readline().rstrip().split(' ')) knapsack = [[0 for _ in range(k + 1)] for _ in range(n + 1)] obj = [[0, 0]] for _ in range(n): obj.append(list(map(int, sys.std...
19.454545
80
0.517134
647da8f98f62663b119b8816218c350b4b81aaea
526
py
Python
django_invisible_recaptcha_admin/forms.py
ricardochaves/django_invisible_recaptcha_admin
6df9b8c0bd947903dc858635c71212523a7b4596
[ "BSD-3-Clause" ]
null
null
null
django_invisible_recaptcha_admin/forms.py
ricardochaves/django_invisible_recaptcha_admin
6df9b8c0bd947903dc858635c71212523a7b4596
[ "BSD-3-Clause" ]
null
null
null
django_invisible_recaptcha_admin/forms.py
ricardochaves/django_invisible_recaptcha_admin
6df9b8c0bd947903dc858635c71212523a7b4596
[ "BSD-3-Clause" ]
1
2019-12-12T17:53:17.000Z
2019-12-12T17:53:17.000Z
from nocaptcha_recaptcha.fields import NoReCaptchaField from django.contrib.auth.forms import AuthenticationForm from nocaptcha_recaptcha.widgets import InvisibleReCaptchaWidget class MyAdminLoginForm(AuthenticationForm): captcha = NoReCaptchaField( gtag_attrs={ 'callback': '...
43.833333
86
0.68251
09270a5a4c402ba708d970ee274f22843fad9052
748
py
Python
python/code_challenges/hash-table/linked_list.py
brendanwelzien/data-structures-and-algorithms
0bffe825e34de2e5c072b1e6b6c2cb1d7d1d61f5
[ "MIT" ]
null
null
null
python/code_challenges/hash-table/linked_list.py
brendanwelzien/data-structures-and-algorithms
0bffe825e34de2e5c072b1e6b6c2cb1d7d1d61f5
[ "MIT" ]
1
2020-11-10T01:31:39.000Z
2020-11-10T01:31:39.000Z
python/code_challenges/hash-table/linked_list.py
brendanwelzien/data-structures-and-algorithms
0bffe825e34de2e5c072b1e6b6c2cb1d7d1d61f5
[ "MIT" ]
null
null
null
# Using JB's Linked List since mine isnt functioning correctly, he mentions that we could use it in this case class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def add(self, data): node = Node(da...
23.375
109
0.552139
9bcdd7f97a6914ea5a88f52dc4ad9620133f0cfa
1,557
py
Python
src/check/operations.py
salvadorkravmaga/TreePay
c73797b240db29d55915ac0e6eae6f6a05277e34
[ "MIT" ]
null
null
null
src/check/operations.py
salvadorkravmaga/TreePay
c73797b240db29d55915ac0e6eae6f6a05277e34
[ "MIT" ]
null
null
null
src/check/operations.py
salvadorkravmaga/TreePay
c73797b240db29d55915ac0e6eae6f6a05277e34
[ "MIT" ]
null
null
null
from src.cryptography import messages, address from hashlib import sha256 import time import requests def check_payload(payload): details = payload.split(",") if len(details) == 10: operation = details[0] sender = details[1] if operation != "TREEPAY": return sender + "," + False receiver = details[2] ...
33.847826
147
0.631985
e87e86e07a080bae4fb8a9c6665a6d95097ed5b6
41,981
py
Python
tests/common/test_client.py
snorfalorpagus/python-socketio
28569d48ad74d5414a0d2a8f69d7540dbdddf066
[ "MIT" ]
2,977
2015-07-15T08:01:56.000Z
2022-03-31T15:36:09.000Z
tests/common/test_client.py
snorfalorpagus/python-socketio
28569d48ad74d5414a0d2a8f69d7540dbdddf066
[ "MIT" ]
758
2015-07-15T09:37:11.000Z
2022-03-31T22:49:07.000Z
tests/common/test_client.py
snorfalorpagus/python-socketio
28569d48ad74d5414a0d2a8f69d7540dbdddf066
[ "MIT" ]
584
2015-08-08T03:16:29.000Z
2022-03-30T09:25:30.000Z
import logging import sys import unittest from unittest import mock from engineio import exceptions as engineio_exceptions from engineio import json from engineio import packet as engineio_packet import pytest from socketio import asyncio_namespace from socketio import client from socketio import exceptions from sock...
35.248531
79
0.57769
1dd5e39981540839626d43a8523b6640b4a96cc8
647
py
Python
cgs/urls.py
avinashkranjan/CGS-Centralized_Grading_System
60d63eb8266668f16258bd99eaef428933ea5ef7
[ "CC0-1.0" ]
null
null
null
cgs/urls.py
avinashkranjan/CGS-Centralized_Grading_System
60d63eb8266668f16258bd99eaef428933ea5ef7
[ "CC0-1.0" ]
2
2020-09-05T12:29:37.000Z
2020-09-06T18:11:37.000Z
cgs/urls.py
avinashkranjan/CGS-Centralized_Grading_System
60d63eb8266668f16258bd99eaef428933ea5ef7
[ "CC0-1.0" ]
1
2020-09-04T17:23:11.000Z
2020-09-04T17:23:11.000Z
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('', include('main.urls')), path('class/', include('class.urls')), path('exam/', include('exam.urls')), path('assignment/', include('as...
32.35
78
0.717156
30c912a0834602229ea3a13d3013588e258e246f
210
py
Python
build.py
bincrafters/mysql-connector-c
b2dcb91c8482f837ee10fcab186899b1b812256e
[ "MIT" ]
3
2018-07-07T14:11:05.000Z
2019-07-03T01:30:22.000Z
build.py
bincrafters/mysql-connector-c
b2dcb91c8482f837ee10fcab186899b1b812256e
[ "MIT" ]
9
2017-12-14T02:25:36.000Z
2019-07-25T14:39:50.000Z
build.py
bincrafters/mysql-connector-c
b2dcb91c8482f837ee10fcab186899b1b812256e
[ "MIT" ]
5
2017-12-13T15:58:15.000Z
2019-07-25T12:55:29.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from bincrafters import build_template_default if __name__ == "__main__": builder = build_template_default.get_builder(pure_c=False) builder.run()
17.5
62
0.7
407f0d2a312c8bbac6b32299f1910295d6295339
4,024
py
Python
saltpylint/pep263.py
dhiltonp/salt-pylint
5da4c53c1a7b083cd0e4c0e072222a1b94026308
[ "Apache-2.0" ]
26
2015-03-20T01:17:08.000Z
2020-04-04T13:52:19.000Z
saltpylint/pep263.py
dhiltonp/salt-pylint
5da4c53c1a7b083cd0e4c0e072222a1b94026308
[ "Apache-2.0" ]
23
2015-01-31T01:26:02.000Z
2021-06-02T17:16:08.000Z
saltpylint/pep263.py
dhiltonp/salt-pylint
5da4c53c1a7b083cd0e4c0e072222a1b94026308
[ "Apache-2.0" ]
29
2015-02-26T17:13:25.000Z
2021-03-12T00:25:33.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Henrik Holmboe (henrik@holmboe.se)` :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. ====================== PEP-263 PyLint Checker ====================== ''' # Import Py...
34.101695
97
0.58499
55f012c37fb87ab96909e58fb534cfd6d6733643
1,374
py
Python
core/classifiers/UnusualActivityDetector.py
vrajesh978/Vigilancia
23368abf7b7af223363ab8aad6d68aba1e1ccb8e
[ "Apache-2.0" ]
8
2018-07-15T06:56:29.000Z
2021-09-26T02:24:17.000Z
core/classifiers/UnusualActivityDetector.py
vrajesh978/Vigilancia
23368abf7b7af223363ab8aad6d68aba1e1ccb8e
[ "Apache-2.0" ]
2
2018-03-01T17:07:47.000Z
2018-04-30T08:40:17.000Z
core/classifiers/UnusualActivityDetector.py
vrajesh978/Vigilancia
23368abf7b7af223363ab8aad6d68aba1e1ccb8e
[ "Apache-2.0" ]
3
2018-11-12T16:12:10.000Z
2020-02-06T05:03:28.000Z
"""Class for Unusual Activity Detector.""" from keras import layers, models import numpy as np from core.classifiers import BaseClassifier import vgconf class UnusualActivityDetector(BaseClassifier.BaseClassifier): def __init__(self): self.weights_file = 'UnusualActivityDetector.h5' super(UnusualA...
32.714286
78
0.680495
a5e88bb3d2faf318cc72c7d9de0c9f068de97a20
8,684
py
Python
homeassistant/components/toon/sensor.py
jasperro/core
26d7b2164e8a971506790ae5af06f31abdf278b5
[ "Apache-2.0" ]
2
2020-03-02T19:17:52.000Z
2020-03-02T19:17:53.000Z
homeassistant/components/toon/sensor.py
jasperro/core
26d7b2164e8a971506790ae5af06f31abdf278b5
[ "Apache-2.0" ]
6
2021-02-08T21:05:36.000Z
2022-03-12T00:54:00.000Z
homeassistant/components/toon/sensor.py
winterscar/core
5a55d508791aae65f16396691d014c73fb2095f0
[ "Apache-2.0" ]
1
2021-04-18T19:36:34.000Z
2021-04-18T19:36:34.000Z
"""Support for Toon sensors.""" import logging from homeassistant.config_entries import ConfigEntry from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT, UNIT_PERCENTAGE from homeassistant.helpers.typing import HomeAssistantType from . import ( ToonBoilerDeviceEntity, ToonData, ToonElectricit...
28.472131
87
0.472478
e34168bf99224cade03fa21be000f48a8a7fe47f
159
py
Python
src/lk_db/ents/both/census/EntToiletFacilitiesOfHousehold.py
nuuuwan/lk_db
ac0abfa47ba31b0d4c2c8566b3101b83749bd45d
[ "MIT" ]
null
null
null
src/lk_db/ents/both/census/EntToiletFacilitiesOfHousehold.py
nuuuwan/lk_db
ac0abfa47ba31b0d4c2c8566b3101b83749bd45d
[ "MIT" ]
null
null
null
src/lk_db/ents/both/census/EntToiletFacilitiesOfHousehold.py
nuuuwan/lk_db
ac0abfa47ba31b0d4c2c8566b3101b83749bd45d
[ "MIT" ]
null
null
null
# Auto Generated - DO NOT EDIT! from lk_db.ents.both.EntCensusResult import EntCensusResult class EntToiletFacilitiesOfHousehold(EntCensusResult): pass
19.875
59
0.811321
6556c25efe2e54d10ae08a262f267eda972ca606
34,861
py
Python
tests/components/bond/test_light.py
eyager1/core
c0ae31d86c841107930cf471fd60d65b5c163f16
[ "Apache-2.0" ]
3
2019-10-02T04:40:26.000Z
2020-02-16T13:19:08.000Z
tests/components/bond/test_light.py
LW-Ho/home-assistant
209f37196e779d96da8451a31d712313e3ae29e2
[ "Apache-2.0" ]
1,016
2019-06-18T21:27:47.000Z
2020-03-06T11:09:58.000Z
tests/components/bond/test_light.py
LW-Ho/home-assistant
209f37196e779d96da8451a31d712313e3ae29e2
[ "Apache-2.0" ]
null
null
null
"""Tests for the Bond light device.""" from datetime import timedelta from bond_api import Action, DeviceType import pytest from homeassistant import core from homeassistant.components.bond.const import ( ATTR_POWER_STATE, DOMAIN, SERVICE_SET_LIGHT_BRIGHTNESS_TRACKED_STATE, SERVICE_SET_LIGHT_POWER_TRA...
33.780039
134
0.682052
7ee6f6d0678dc1d39d16886a7cd0d2b25607ba54
1,105
py
Python
checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py
antonblr/checkov
9415c6593c537945c08f7a19f28bdd8b96966f67
[ "Apache-2.0" ]
3
2021-04-19T17:17:21.000Z
2021-09-06T06:31:09.000Z
checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py
antonblr/checkov
9415c6593c537945c08f7a19f28bdd8b96966f67
[ "Apache-2.0" ]
16
2021-03-09T07:38:38.000Z
2021-06-09T03:53:55.000Z
checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py
antonblr/checkov
9415c6593c537945c08f7a19f28bdd8b96966f67
[ "Apache-2.0" ]
1
2022-01-06T08:04:56.000Z
2022-01-06T08:04:56.000Z
from checkov.common.models.enums import CheckResult, CheckCategories from checkov.common.util.type_forcers import force_int from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceCheck class NetworkWatcherFlowLogPeriod(BaseResourceCheck): def __init__(self): name = "Ensure tha...
44.2
106
0.718552
8ea1bf140b2e96bbc7e4cab89bfc4c7bb198bd6a
825
py
Python
tests/env.py
matthewfeickert/repo2docker
befb958ed7e495cbcca90eeec052312de7d0d400
[ "BSD-3-Clause" ]
1
2019-04-19T01:30:17.000Z
2019-04-19T01:30:17.000Z
tests/env.py
matthewfeickert/repo2docker
befb958ed7e495cbcca90eeec052312de7d0d400
[ "BSD-3-Clause" ]
2
2021-03-25T23:15:17.000Z
2021-06-02T00:53:55.000Z
tests/env.py
matthewfeickert/repo2docker
befb958ed7e495cbcca90eeec052312de7d0d400
[ "BSD-3-Clause" ]
2
2018-10-05T13:34:10.000Z
2019-01-23T16:13:39.000Z
""" Test that environment variables may be defined """ import os import subprocess import tempfile import time def test_env(): """ Validate that you can define environment variables """ ts = str(time.time()) with tempfile.TemporaryDirectory() as tmpdir: username = os.getlogin() subp...
25.78125
59
0.509091
749e4b9b7e88fbd18c67acb58a39e617a4f1d8b1
1,672
py
Python
symphony/cli/gql/gql/transport/requests.py
remo5000/magma
1d1dd9a23800a8e07b1ce016776d93e12430ec15
[ "BSD-3-Clause" ]
1
2020-06-05T09:01:40.000Z
2020-06-05T09:01:40.000Z
symphony/cli/gql/gql/transport/requests.py
remo5000/magma
1d1dd9a23800a8e07b1ce016776d93e12430ec15
[ "BSD-3-Clause" ]
14
2019-11-15T12:01:18.000Z
2019-12-12T14:37:42.000Z
symphony/cli/gql/gql/transport/requests.py
remo5000/magma
1d1dd9a23800a8e07b1ce016776d93e12430ec15
[ "BSD-3-Clause" ]
3
2019-11-15T15:56:25.000Z
2019-11-21T10:34:59.000Z
from __future__ import absolute_import from graphql.execution import ExecutionResult from graphql.language.printer import print_ast from .http import HTTPTransport import json class RequestsHTTPTransport(HTTPTransport): def __init__(self, session, url, auth=None, use_json=False, timeout=None, **kwargs): ...
34.122449
88
0.634569
6325098ce09b02c6fb4dbb0318e871063f620740
3,413
py
Python
turtlebot3_bringup/launch/robot.launch.py
Anth0o0/01-robotics
af198789244bbb22297a9794652745b4c56518b9
[ "MIT" ]
null
null
null
turtlebot3_bringup/launch/robot.launch.py
Anth0o0/01-robotics
af198789244bbb22297a9794652745b4c56518b9
[ "MIT" ]
null
null
null
turtlebot3_bringup/launch/robot.launch.py
Anth0o0/01-robotics
af198789244bbb22297a9794652745b4c56518b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Copyright 2019 ROBOTIS 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 applicabl...
35.926316
95
0.684442
af9594181d5f9a61aa1bc62bb76cefe860972070
8,005
py
Python
pybind/nos/v6_0_2c/hide_routemap_holder/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v6_0_2c/hide_routemap_holder/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v6_0_2c/hide_routemap_holder/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
62.539063
1,007
0.718551
314200ba1c4502e90e2e16ead9099c6ca483b8bf
3,213
py
Python
homeassistant/components/fan/isy994.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
4
2019-01-10T14:47:54.000Z
2021-04-22T02:06:27.000Z
homeassistant/components/fan/isy994.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
6
2021-02-08T20:25:50.000Z
2022-03-11T23:27:53.000Z
homeassistant/components/fan/isy994.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
3
2018-09-14T07:34:09.000Z
2018-09-29T12:57:10.000Z
""" Support for ISY994 fans. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/fan.isy994/ """ import logging from typing import Callable from homeassistant.components.fan import (FanEntity, DOMAIN, SPEED_OFF, SPEE...
30.311321
78
0.630252
317f64af83d18e4c7b7260c241bf8ef1df02fca9
13,679
py
Python
pysnmp/ADTRAN-AOSDOWNLOAD.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/ADTRAN-AOSDOWNLOAD.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/ADTRAN-AOSDOWNLOAD.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ADTRAN-AOSDOWNLOAD (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADTRAN-AOSDOWNLOAD # Produced by pysmi-0.3.4 at Mon Apr 29 16:59:02 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, ...
147.086022
1,742
0.758535
8fa482a21f8365263022e12eb697bfce0158d25d
40,081
py
Python
interpies/grid.py
jobar8/interpies
9e7ebe0ac7cb7afa2ddf6b14dbe69dc92665d104
[ "BSD-3-Clause" ]
27
2017-09-30T20:03:41.000Z
2021-06-06T11:11:12.000Z
interpies/grid.py
jobar8/interpies
9e7ebe0ac7cb7afa2ddf6b14dbe69dc92665d104
[ "BSD-3-Clause" ]
1
2020-07-09T21:57:22.000Z
2020-07-09T21:57:22.000Z
interpies/grid.py
jobar8/interpies
9e7ebe0ac7cb7afa2ddf6b14dbe69dc92665d104
[ "BSD-3-Clause" ]
9
2017-12-02T22:48:24.000Z
2021-04-11T02:42:06.000Z
# -*- coding: utf-8 -*- """ Interpies - a libray for the interpretation of gravity and magnetic data. grid.py: Sub-module for the definition of the grid class @author: Joseph Barraud Geophysics Labs, 2017 """ import os.path import rasterio import numpy as np # import local modules from interpies import transform...
43.996707
98
0.546718
2353a2992a23cfde31c7675f12c6efa1217edcd8
1,045
py
Python
setup.py
99scratch/obfsproxy
85bea60c847ce8bb629873996bdea82210c1ea9f
[ "BSD-3-Clause" ]
101
2015-01-24T07:37:03.000Z
2022-01-22T15:38:44.000Z
setup.py
99scratch/obfsproxy
85bea60c847ce8bb629873996bdea82210c1ea9f
[ "BSD-3-Clause" ]
1
2015-03-29T15:16:04.000Z
2015-04-09T03:56:24.000Z
setup.py
99scratch/obfsproxy
85bea60c847ce8bb629873996bdea82210c1ea9f
[ "BSD-3-Clause" ]
29
2015-05-11T09:45:43.000Z
2020-02-22T17:50:27.000Z
#!/usr/bin/env python import sys from setuptools import setup, find_packages import versioneer versioneer.versionfile_source = 'obfsproxy/_version.py' versioneer.versionfile_build = 'obfsproxy/_version.py' versioneer.tag_prefix = 'obfsproxy-' # tags are like 1.2.0 versioneer.parentdir_prefix = 'obfsproxy-' # dirname...
23.75
75
0.618182
a91d7535585702af9ddf456195bd2a2513db1256
3,206
py
Python
lenstronomy/LensModel/Profiles/sersic.py
lucateo/lenstronomy
3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab
[ "MIT" ]
1
2021-06-05T15:17:39.000Z
2021-06-05T15:17:39.000Z
lenstronomy/LensModel/Profiles/sersic.py
lucateo/lenstronomy
3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab
[ "MIT" ]
null
null
null
lenstronomy/LensModel/Profiles/sersic.py
lucateo/lenstronomy
3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab
[ "MIT" ]
null
null
null
__author__ = 'sibirrer' #this file contains a class to make a gaussian import numpy as np import lenstronomy.Util.util as util from lenstronomy.LensModel.Profiles.sersic_utils import SersicUtil from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase __all__ = ['Sersic'] class Sersic(SersicUtil, Lens...
39.580247
111
0.59451
1ef34403b432da2392bd304ff22b61c2b721b343
539
py
Python
Homework 4/question_solutions/q1_format_mc_methods.py
rukmal/FE-621-Homework
9c7cef7931b58aed54867acd8e8cf1928bc6d2dd
[ "MIT" ]
4
2020-04-29T04:34:50.000Z
2021-11-11T07:49:08.000Z
Homework 4/question_solutions/q1_format_mc_methods.py
rukmal/FE-621-Homework
9c7cef7931b58aed54867acd8e8cf1928bc6d2dd
[ "MIT" ]
null
null
null
Homework 4/question_solutions/q1_format_mc_methods.py
rukmal/FE-621-Homework
9c7cef7931b58aed54867acd8e8cf1928bc6d2dd
[ "MIT" ]
1
2020-04-23T07:32:44.000Z
2020-04-23T07:32:44.000Z
from context import fe621 import pandas as pd # Loading raw CSV of MC methods analysis simple_mc_analysis = pd.read_csv( 'Homework 4/bin/raw_mc_methods_analysis.csv') # Creating formatted table out_df = simple_mc_analysis.pivot_table(index=['method', 'opt_type'], values=['estimate', 'standard_error', 'time_elap...
29.944444
124
0.727273
7493da5a056e6cfe72a1a05272547b84f89f4b3a
162
py
Python
jina/types/request/search.py
facebbook/jina
e8079af3d58f1de0f51f8aef6cdf1eb3d87a9873
[ "Apache-2.0" ]
1
2021-02-25T19:28:50.000Z
2021-02-25T19:28:50.000Z
jina/types/request/search.py
facebbook/jina
e8079af3d58f1de0f51f8aef6cdf1eb3d87a9873
[ "Apache-2.0" ]
4
2020-09-01T17:47:27.000Z
2021-04-16T23:11:57.000Z
jina/types/request/search.py
facebbook/jina
e8079af3d58f1de0f51f8aef6cdf1eb3d87a9873
[ "Apache-2.0" ]
null
null
null
from . import Request from .mixin import * class SearchRequest(Request, DocsPropertyMixin, GroundtruthPropertyMixin): """Search request class.""" pass
18
74
0.740741
a3929bca2580517de5b2aeb03667210ce1f6f123
1,257
py
Python
tests/data/tfs/tfs-test-entrypoint-with-handler/inference.py
mvsusp/sagemaker-python-sdk
12771362f3b4fdbd410e85a26d4b94425d6ffbf1
[ "Apache-2.0" ]
1
2019-06-28T14:00:34.000Z
2019-06-28T14:00:34.000Z
tests/data/tfs/tfs-test-entrypoint-with-handler/inference.py
mvsusp/sagemaker-python-sdk
12771362f3b4fdbd410e85a26d4b94425d6ffbf1
[ "Apache-2.0" ]
null
null
null
tests/data/tfs/tfs-test-entrypoint-with-handler/inference.py
mvsusp/sagemaker-python-sdk
12771362f3b4fdbd410e85a26d4b94425d6ffbf1
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
28.568182
73
0.719968
f8272435c2ade58a9431c33fc3c5381b9193fbdf
414
py
Python
robocoach1/wsgi.py
DSP209/Robo1
c421af61d4f28f742dc9e31ac805a8f3fe99bc96
[ "MIT" ]
null
null
null
robocoach1/wsgi.py
DSP209/Robo1
c421af61d4f28f742dc9e31ac805a8f3fe99bc96
[ "MIT" ]
null
null
null
robocoach1/wsgi.py
DSP209/Robo1
c421af61d4f28f742dc9e31ac805a8f3fe99bc96
[ "MIT" ]
null
null
null
""" WSGI config for robocoach1 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefa...
24.352941
79
0.758454
1300c22e38319eaf3950631f64f7b03d07cb6258
444
py
Python
solutions/python3/731.py
sm2774us/amazon_interview_prep_2021
f580080e4a6b712b0b295bb429bf676eb15668de
[ "MIT" ]
42
2020-08-02T07:03:49.000Z
2022-03-26T07:50:15.000Z
solutions/python3/731.py
ajayv13/leetcode
de02576a9503be6054816b7444ccadcc0c31c59d
[ "MIT" ]
null
null
null
solutions/python3/731.py
ajayv13/leetcode
de02576a9503be6054816b7444ccadcc0c31c59d
[ "MIT" ]
40
2020-02-08T02:50:24.000Z
2022-03-26T15:38:10.000Z
class MyCalendarTwo: def __init__(self): self.overlaps = [] self.calendar = [] def book(self, start, end): for i, j in self.overlaps: if start < j and end > i: return False for i, j in self.calendar: if start < j and end > i: ...
31.714286
66
0.506757
93d61c7829fcf74607c7daf0a3d64ccbf416b4b9
716
py
Python
dbworker.py
iskaira/bastaubot
060d3c9f8d5fb8eaa65e80b0b5a558eee303a1eb
[ "MIT" ]
null
null
null
dbworker.py
iskaira/bastaubot
060d3c9f8d5fb8eaa65e80b0b5a558eee303a1eb
[ "MIT" ]
null
null
null
dbworker.py
iskaira/bastaubot
060d3c9f8d5fb8eaa65e80b0b5a558eee303a1eb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from vedis import Vedis import config # Пытаемся узнать из базы «состояние» пользователя def get_current_state(user_id): with Vedis(config.db_file) as db: try: return db[user_id] except KeyError: # Если такого ключа почему-то не оказалось return con...
29.833333
88
0.639665
38c1b4ca210909df0d180c7a2f6ac33dc9a2033b
4,636
py
Python
game/models/domain_specific/dnn_ai_solver.py
gsurma/slitherin
91801b84b7b92be4879a84959465c027bcda091b
[ "MIT" ]
83
2018-09-28T20:28:46.000Z
2022-03-20T12:28:12.000Z
game/models/domain_specific/dnn_ai_solver.py
gsurma/slitherin
91801b84b7b92be4879a84959465c027bcda091b
[ "MIT" ]
2
2019-11-18T17:38:20.000Z
2021-07-05T05:08:16.000Z
game/models/domain_specific/dnn_ai_solver.py
gsurma/slitherin
91801b84b7b92be4879a84959465c027bcda091b
[ "MIT" ]
37
2018-11-08T22:46:34.000Z
2021-11-14T02:57:04.000Z
import random import copy import numpy as np from statistics import mean from game.models.base_game_model import BaseGameModel from tf_models.dnn_model import DeepNeuralNetModel from game.helpers.constants import Constants class BaseDNNGameModel(BaseGameModel): model = None def __init__(self, long_name, sh...
38.957983
120
0.6305
146d9efb263295e15d4c37f6a4310975aea3669c
2,637
py
Python
tests/st/model_zoo_tests/ssd_mobilenet_fpn/test_ssd_modelnet_fpn.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
1
2022-03-05T02:59:21.000Z
2022-03-05T02:59:21.000Z
tests/st/model_zoo_tests/ssd_mobilenet_fpn/test_ssd_modelnet_fpn.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
tests/st/model_zoo_tests/ssd_mobilenet_fpn/test_ssd_modelnet_fpn.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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...
44.694915
119
0.701934
a9da010e762ec16fde1059c8d38e780bfe5aa26a
87,933
py
Python
kubespawner/spawner.py
ucsd-ets/kubespawner
c8a16894d2af6d41407a4c72ffbc94c91d48e2bb
[ "BSD-3-Clause" ]
null
null
null
kubespawner/spawner.py
ucsd-ets/kubespawner
c8a16894d2af6d41407a4c72ffbc94c91d48e2bb
[ "BSD-3-Clause" ]
null
null
null
kubespawner/spawner.py
ucsd-ets/kubespawner
c8a16894d2af6d41407a4c72ffbc94c91d48e2bb
[ "BSD-3-Clause" ]
null
null
null
""" JupyterHub Spawner to spawn user notebooks on a Kubernetes cluster. This module exports `KubeSpawner` class, which is the actual spawner implementation that should be used by JupyterHub. """ from functools import partial # noqa from datetime import datetime, timedelta import asyncio import json import os import ...
37.707118
175
0.610158
fbec499679d168a5a8692900ead15dd8a3056ed1
2,648
py
Python
convert_yolo.py
akingozubek/COCO-annotations-YOLO-format
5ac995a18150c2a10397d1b8e41a8e22f315c0a6
[ "MIT" ]
null
null
null
convert_yolo.py
akingozubek/COCO-annotations-YOLO-format
5ac995a18150c2a10397d1b8e41a8e22f315c0a6
[ "MIT" ]
null
null
null
convert_yolo.py
akingozubek/COCO-annotations-YOLO-format
5ac995a18150c2a10397d1b8e41a8e22f315c0a6
[ "MIT" ]
null
null
null
# Import packages import json import os # Convert bbox to yolo type annotations. def convertYOLO(size: tuple, box: list) -> tuple: # Image height, width dw = 1./size[0] dh = 1./size[1] xmin = box[0] ymin = box[1] xmax = box[2] + box[0] ymax = box[3] + box[1] x = (xmin+xmax)*dw/2 ...
25.708738
75
0.541918
cefc6d8f23f7076e3b38f3f1e6d23dd62be1b5ee
4,897
py
Python
sofine/lib/utils/utils.py
marksweiss/sofine
eb0b1237a772ec159edb6869dfb30120cf698ffb
[ "MIT" ]
5
2017-08-10T16:46:54.000Z
2020-10-11T03:20:06.000Z
sofine/lib/utils/utils.py
marksweiss/sofine
eb0b1237a772ec159edb6869dfb30120cf698ffb
[ "MIT" ]
null
null
null
sofine/lib/utils/utils.py
marksweiss/sofine
eb0b1237a772ec159edb6869dfb30120cf698ffb
[ "MIT" ]
2
2015-04-06T11:39:01.000Z
2020-04-01T12:59:16.000Z
"""Provides utility functions used by sofine. """ import sys import os import imp import sofine.lib.utils.conf as conf import sofine.plugins.http_plugin_proxy as http_plugin_proxy def _load_plugin_module(module_name): module = None module_file = None try: module_file, module_path, desc = imp.fin...
36.274074
104
0.719012
771f8287cd2bc61cbb731314c2f70aeac561feec
1,332
py
Python
Condor/python/Lib/site-packages/pyscreenshot/plugins/qtpy_grabwindow.py
OriolOriolOriol/Condor
5b855ff7170e43149f9e9f81a97b6b88282915c5
[ "MIT" ]
null
null
null
Condor/python/Lib/site-packages/pyscreenshot/plugins/qtpy_grabwindow.py
OriolOriolOriol/Condor
5b855ff7170e43149f9e9f81a97b6b88282915c5
[ "MIT" ]
null
null
null
Condor/python/Lib/site-packages/pyscreenshot/plugins/qtpy_grabwindow.py
OriolOriolOriol/Condor
5b855ff7170e43149f9e9f81a97b6b88282915c5
[ "MIT" ]
1
2020-11-04T08:32:26.000Z
2020-11-04T08:32:26.000Z
import logging from PIL import Image from pyscreenshot.plugins.backend import CBackend from pyscreenshot.util import py2 if py2(): import StringIO BytesIO = StringIO.StringIO else: import io BytesIO = io.BytesIO log = logging.getLogger(__name__) # based on qt5 backend app = None class QtPyGrab...
20.8125
72
0.62012
62ad5766c1f15dbaa74dffa2709863e8c77e64e5
23,448
py
Python
env/lib/python3.7/site-packages/sklearn/random_projection.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
25
2019-03-08T01:03:03.000Z
2022-02-14T17:38:32.000Z
env/lib/python3.7/site-packages/sklearn/random_projection.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
9
2020-09-25T22:32:02.000Z
2022-02-09T23:45:10.000Z
env/lib/python3.7/site-packages/sklearn/random_projection.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
31
2019-01-15T20:16:50.000Z
2022-03-01T05:47:38.000Z
# -*- coding: utf8 """Random Projection transformers Random Projections are a simple and computationally efficient way to reduce the dimensionality of the data by trading a controlled amount of accuracy (as additional variance) for faster processing times and smaller model sizes. The dimensions and distribution of Ra...
36.073846
79
0.640822
75dcabecee9ab3280399c1514e805974811c5b2a
403
py
Python
icecream_shop/asgi.py
RahulML2505GitHub/React-Django
6d7fc96f7fc89d3f39ed162ad9a3d0e961e186b2
[ "MIT" ]
null
null
null
icecream_shop/asgi.py
RahulML2505GitHub/React-Django
6d7fc96f7fc89d3f39ed162ad9a3d0e961e186b2
[ "MIT" ]
null
null
null
icecream_shop/asgi.py
RahulML2505GitHub/React-Django
6d7fc96f7fc89d3f39ed162ad9a3d0e961e186b2
[ "MIT" ]
null
null
null
""" ASGI config for icecream_shop 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.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO...
23.705882
78
0.791563
cceb3605c60563cf258e96eb321028f166530552
3,279
py
Python
src/sentry/integrations/atlassian_connect.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
null
null
null
src/sentry/integrations/atlassian_connect.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
null
null
null
src/sentry/integrations/atlassian_connect.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import hashlib import jwt from sentry.models import Integration from sentry.utils.http import percent_encode __all__ = [ 'AtlassianConnectValidationError', 'get_query_hash', 'get_integration_from_request', ] class AtlassianConnectValidationError(Exception): pa...
37.689655
127
0.702043
e56115043a3c557d8e57fc5442d5051d767729cc
978
py
Python
isi_sdk_8_2_1/test/test_node_driveconfig_node_stall.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_1/test/test_node_driveconfig_node_stall.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_1/test/test_node_driveconfig_node_stall.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 8 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_8_2_1 from i...
23.853659
107
0.728016
141381f84300b540423478099d9a878859f19c55
2,023
py
Python
PythonAPI/carissma_project/lib/python3.5/site-packages/pandas/tests/groupby/test_index_as_string.py
AbdulHoffmann/carla_carissma
8d382769ffa02a6c61a22c57160285505f5ff0a4
[ "MIT" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
PythonAPI/carissma_project/lib/python3.5/site-packages/pandas/tests/groupby/test_index_as_string.py
AbdulHoffmann/carla_carissma
8d382769ffa02a6c61a22c57160285505f5ff0a4
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
PythonAPI/carissma_project/lib/python3.5/site-packages/pandas/tests/groupby/test_index_as_string.py
AbdulHoffmann/carla_carissma
8d382769ffa02a6c61a22c57160285505f5ff0a4
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
import numpy as np import pytest import pandas as pd from pandas.util.testing import assert_frame_equal, assert_series_equal @pytest.fixture(params=[['inner'], ['inner', 'outer']]) def frame(request): levels = request.param df = pd.DataFrame({'outer': ['a', 'a', 'a', 'b', 'b', 'b'], 'i...
29.318841
72
0.546713
9f176ecb3e4573282b849fb1572008a1b00cdff5
4,888
py
Python
Compiler/mpc_nonlinear.py
mczhuang/MP-SPDZ
7eb0728f76134acc4564346a2eed874a3e8ea93b
[ "BSD-2-Clause" ]
null
null
null
Compiler/mpc_nonlinear.py
mczhuang/MP-SPDZ
7eb0728f76134acc4564346a2eed874a3e8ea93b
[ "BSD-2-Clause" ]
null
null
null
Compiler/mpc_nonlinear.py
mczhuang/MP-SPDZ
7eb0728f76134acc4564346a2eed874a3e8ea93b
[ "BSD-2-Clause" ]
null
null
null
"""Upper layer Non-linear functions. """ from Compiler.library import print_ln from Compiler.types import floatingpoint, sfix import Compiler.building_blocks as bb import Compiler.ml as ml from Compiler.mpc_math import sqrt, log_fx, pow_fx import math from Compiler import types DEBUG = False # constant factors PAI =...
20.198347
104
0.582651
77413f4fd930ee88685df501bb8242c96d4e2043
139
py
Python
output/models/ms_data/particles/particles_a011_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/particles/particles_a011_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/particles/particles_a011_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.particles.particles_a011_xsd.particles_a011 import ( Doc, Elem, ) __all__ = [ "Doc", "Elem", ]
13.9
79
0.654676
689871f98fa7d66ad3f00340be8f8fd3da7cfd00
4,902
py
Python
xfeltor/feltordataset.py
feltor-dev/xFELTOR
7c2e6c1629c5fa9d9827156e2a913074ecfc4a8b
[ "MIT" ]
3
2021-11-15T11:23:46.000Z
2021-12-01T11:00:33.000Z
xfeltor/feltordataset.py
feltor-dev/xFELTOR
7c2e6c1629c5fa9d9827156e2a913074ecfc4a8b
[ "MIT" ]
4
2021-11-15T09:55:39.000Z
2021-11-25T12:44:44.000Z
xfeltor/feltordataset.py
HenrikJantti/xFELTOR
321fe73ce28fa590baedabc0aa13c5ba50a32dff
[ "MIT" ]
3
2021-11-15T10:06:55.000Z
2021-12-06T13:31:09.000Z
import warnings from matplotlib.animation import PillowWriter import matplotlib.pyplot as plt import xarray as xr from functools import partial from pprint import pformat as prettyformat import animatplot as amp import numpy as np from .plotting import _add_controls @xr.register_dataset_accessor("feltor") class Felto...
33.806897
88
0.570379
c9ebb7470a36a1a7726293a0d1fcac806067e074
1,448
py
Python
user_input.py
Rohit280297/PrintedTextRecognition
24f07e1fa9db05f71adf3c5772d034922446d38c
[ "MIT" ]
1
2021-06-08T23:52:59.000Z
2021-06-08T23:52:59.000Z
user_input.py
Rohit280297/PrintedTextRecognition
24f07e1fa9db05f71adf3c5772d034922446d38c
[ "MIT" ]
null
null
null
user_input.py
Rohit280297/PrintedTextRecognition
24f07e1fa9db05f71adf3c5772d034922446d38c
[ "MIT" ]
null
null
null
#This program is used for giving custom user input to the NN and see the output. from get_equivalent_letter import get_letter # import mnist_loader # training_data, validation_data, test_data = mnist_loader.load_data_wrapper() import network2 import numpy as np from nn_two_stage.second_nn import get_let_from_2nd_nn_...
32.177778
113
0.760359
609f0ea39fd5be152d4d3994fa1382195e92ccf9
3,675
py
Python
adventofcode-python/adventofcode2019/day/07/07.py
salockhart/adventofcode2020
d7b3bf234ade60df277aea35bbfe52728907cc5f
[ "BSD-3-Clause" ]
1
2021-11-24T16:55:45.000Z
2021-11-24T16:55:45.000Z
adventofcode-python/adventofcode2019/day/07/07.py
salockhart/adventofcode2020
d7b3bf234ade60df277aea35bbfe52728907cc5f
[ "BSD-3-Clause" ]
null
null
null
adventofcode-python/adventofcode2019/day/07/07.py
salockhart/adventofcode2020
d7b3bf234ade60df277aea35bbfe52728907cc5f
[ "BSD-3-Clause" ]
null
null
null
import fileinput import itertools import operator def val(codes, mode, value): if mode == 0: return codes[value] elif mode == 1: return value def mode(modes, idx): if idx >= len(modes): return 0 return modes[idx] def calc(opcode, modes, i, op, codes): a = codes[i+1] ...
24.019608
70
0.510204
89b7177f4925c1572e3bb6349263146ca67317fc
811
py
Python
google/ads/google_ads/v4/services/distance_view_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v4/services/distance_view_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v4/services/distance_view_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
config = { "interfaces": { "google.ads.googleads.v4.services.DistanceViewService": { "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] }, "retry_params": { "default": { "initial_retry_delay_mi...
25.34375
61
0.53021
4609d5497996d9ed72e245992a7987048c41b7ae
6,860
py
Python
examples/ble_broadcastnet_bridge.py
tekktrik/Adafruit_CircuitPython_BLE_BroadcastNet
45c2491478dfedfb95501753a6347f6ed6d6e922
[ "MIT" ]
null
null
null
examples/ble_broadcastnet_bridge.py
tekktrik/Adafruit_CircuitPython_BLE_BroadcastNet
45c2491478dfedfb95501753a6347f6ed6d6e922
[ "MIT" ]
null
null
null
examples/ble_broadcastnet_bridge.py
tekktrik/Adafruit_CircuitPython_BLE_BroadcastNet
45c2491478dfedfb95501753a6347f6ed6d6e922
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2022 Scott Shawcroft for Adafruit Industries # SPDX-License-Identifier: MIT """This example bridges from BLE to Adafruit IO on a CircuitPython device that supports both WiFi and BLE. (The first chip is the ESP32-S3.)""" from secrets import secrets # pylint: disable=no-name-in-module impor...
35.544041
93
0.676822
8013e1d9018b1192c26523272882e8954738ae10
236
py
Python
thoughtworks/matchchar.py
ganesh-95/python-programs
df4ee1ec1d13ea0cd1ad511827cb0a2e59f55908
[ "MIT" ]
1
2016-07-20T04:40:48.000Z
2016-07-20T04:40:48.000Z
thoughtworks/matchchar.py
ganesh-95/python-programs
df4ee1ec1d13ea0cd1ad511827cb0a2e59f55908
[ "MIT" ]
null
null
null
thoughtworks/matchchar.py
ganesh-95/python-programs
df4ee1ec1d13ea0cd1ad511827cb0a2e59f55908
[ "MIT" ]
null
null
null
str_1 = raw_input('enter string:') str_2 = raw_input('enter string:') l = [] for c in str_1 and str_2: if (str_1(c) for c in str_1) == (str_2(c) for c in str_2): l.append(c) print l
13.882353
62
0.508475
3933ca7571bb72d0108acc3afb969028a3dd248d
8,124
py
Python
jade2/antibody/CDRClusterer.py
RosettaCommons/jade2
40affc7c4e0f1f6ee07030e72de284e3484946e7
[ "BSD-3-Clause" ]
1
2019-12-23T21:52:23.000Z
2019-12-23T21:52:23.000Z
jade2/antibody/CDRClusterer.py
RosettaCommons/jade2
40affc7c4e0f1f6ee07030e72de284e3484946e7
[ "BSD-3-Clause" ]
null
null
null
jade2/antibody/CDRClusterer.py
RosettaCommons/jade2
40affc7c4e0f1f6ee07030e72de284e3484946e7
[ "BSD-3-Clause" ]
2
2021-11-13T01:34:15.000Z
2021-11-13T01:34:34.000Z
import math import sys import os import logging from pathlib import Path from typing import List, Union, DefaultDict, Tuple from collections import defaultdict from Bio.PDB.Polypeptide import is_aa from jade2.basic import path from jade2.basic.structure.BioPose import BioPose from jade2.basic.restype_definitions impor...
37.786047
143
0.554037
e82a200975318cde22afdf3a306009da1f45a967
624
py
Python
arbitrage/observers/historydumper.py
donnydevito/bitcoin-arbitrage
eeadb186f703827e3daba3322b7f724270d379eb
[ "Unlicense" ]
7
2017-04-14T03:35:27.000Z
2021-12-17T21:39:47.000Z
arbitrage/observers/historydumper.py
ascjones/bitcoin-arbitrage
a740d445c19e0c2acff2fb83fdec00caa74999e6
[ "Unlicense" ]
null
null
null
arbitrage/observers/historydumper.py
ascjones/bitcoin-arbitrage
a740d445c19e0c2acff2fb83fdec00caa74999e6
[ "Unlicense" ]
18
2017-01-12T11:20:57.000Z
2019-04-19T10:14:34.000Z
from .observer import Observer import json import time import os class HistoryDumper(Observer): out_dir = 'history/' def __init__(self): try: os.mkdir(self.out_dir) except: pass def begin_opportunity_finder(self, depths): filename = self.out_dir + 'order-b...
23.111111
120
0.616987
ca20fee9aee0ab6825362cd1237e001d8061532a
10,992
py
Python
amqtt/mqtt/connect.py
sjlongland/amqtt
3db7c9a3501be503beaded052006b4190538dc0e
[ "MIT" ]
null
null
null
amqtt/mqtt/connect.py
sjlongland/amqtt
3db7c9a3501be503beaded052006b4190538dc0e
[ "MIT" ]
null
null
null
amqtt/mqtt/connect.py
sjlongland/amqtt
3db7c9a3501be503beaded052006b4190538dc0e
[ "MIT" ]
null
null
null
# Copyright (c) 2015 Nicolas JOUANIN # # See the file license.txt for copying permission. from amqtt.codecs import ( bytes_to_int, decode_data_with_length, decode_string, encode_data_with_length, encode_string, int_to_bytes, read_or_raise, ) from amqtt.mqtt.packet import ( MQTTPacket, ...
27.411471
118
0.644651
cddc5f3a0ce7603035760bf0deb3693967b9499e
275
py
Python
optimal_transport_morphometry/core/admin/image.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
null
null
null
optimal_transport_morphometry/core/admin/image.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
5
2022-03-10T19:39:22.000Z
2022-03-17T21:05:10.000Z
optimal_transport_morphometry/core/admin/image.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from optimal_transport_morphometry.core.models import Image @admin.register(Image) class ImageAdmin(admin.ModelAdmin): list_display = ['id', 'name', 'type', 'blob', 'dataset', 'patient', 'size'] list_display_links = ['id', 'name']
27.5
79
0.72
4c3b0bfb25ff0061ad94b32a515efd92a862f40a
15,549
py
Python
tests/core/test_full_node_rpc.py
DrakeFS/chia-blockchain
8d617f0df0a5176e0ea117ae7617d5b3a8d5c43a
[ "Apache-2.0" ]
6
2021-06-15T00:43:35.000Z
2021-11-01T02:32:37.000Z
tests/core/test_full_node_rpc.py
xorinox/chia-blockchain
e14aafb1d7c2a5cbf6d4155a79286d1add9db279
[ "Apache-2.0" ]
null
null
null
tests/core/test_full_node_rpc.py
xorinox/chia-blockchain
e14aafb1d7c2a5cbf6d4155a79286d1add9db279
[ "Apache-2.0" ]
1
2021-07-01T05:31:02.000Z
2021-07-01T05:31:02.000Z
# flake8: noqa: F811, F401 import logging import pytest from blspy import AugSchemeMPL from chia.consensus.pot_iterations import is_overflow_block from chia.full_node.signage_point import SignagePoint from chia.protocols import full_node_protocol from chia.rpc.full_node_rpc_api import FullNodeRpcApi from chia.rpc.ful...
43.554622
120
0.640105
58d7289fc0d911c8066b1d7dcbd46598c20dfafc
4,522
py
Python
detest/detest_ui/models.py
tahpee/detest
9cf3a434ee17d4867e8cc49bc501ae0f29535f59
[ "MIT" ]
null
null
null
detest/detest_ui/models.py
tahpee/detest
9cf3a434ee17d4867e8cc49bc501ae0f29535f59
[ "MIT" ]
null
null
null
detest/detest_ui/models.py
tahpee/detest
9cf3a434ee17d4867e8cc49bc501ae0f29535f59
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User class Project(models.Model): name = models.CharField(max_length=45) notes = models.TextField(default="", blank=True) prefix = models.CharField(max_length=45) active = models.BooleanField(default=True) public = models.BooleanF...
30.972603
89
0.724458
359d6fafc2f8d7247272bf2140ab0f800147c520
20,143
py
Python
walkupEnv/lib/python3.6/site-packages/notebook/services/kernels/handlers.py
cogerk/walk-up-music-scrapper
74df610985e6ff220a605a49933a0655e247caa3
[ "Apache-2.0" ]
1
2019-01-12T13:17:32.000Z
2019-01-12T13:17:32.000Z
walkupEnv/lib/python3.6/site-packages/notebook/services/kernels/handlers.py
cogerk/walk-up-music-scrapper
74df610985e6ff220a605a49933a0655e247caa3
[ "Apache-2.0" ]
null
null
null
walkupEnv/lib/python3.6/site-packages/notebook/services/kernels/handlers.py
cogerk/walk-up-music-scrapper
74df610985e6ff220a605a49933a0655e247caa3
[ "Apache-2.0" ]
null
null
null
"""Tornado handlers for kernels. Preliminary documentation at https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping#kernels-api """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import json import logging from text...
41.276639
142
0.614655
3a19cf5912343bb98c35339f68d7fd6599d97a55
74
py
Python
src/oogeso/core/__init__.py
oogeso/oogeso
72c05fd02d62b29fc62f60daf4989370fd80cbe1
[ "MIT" ]
2
2021-05-19T13:16:20.000Z
2021-11-05T11:47:11.000Z
src/oogeso/core/__init__.py
oogeso/oogeso
72c05fd02d62b29fc62f60daf4989370fd80cbe1
[ "MIT" ]
71
2021-06-01T11:03:56.000Z
2022-03-01T09:38:37.000Z
src/oogeso/core/__init__.py
oogeso/oogeso
72c05fd02d62b29fc62f60daf4989370fd80cbe1
[ "MIT" ]
null
null
null
from .optimiser import OptimisationModel from .simulator import Simulator
24.666667
40
0.864865
f89efce29f3f79cc6876b6764be52eac1b5b90ec
9,784
py
Python
tests/integration_tests/dashboards/filter_state/api_tests.py
delorenzosoftware/superset
5403f1ec163a52623f34f459d89f20e4e190371d
[ "Apache-2.0" ]
1
2022-02-18T10:21:55.000Z
2022-02-18T10:21:55.000Z
tests/integration_tests/dashboards/filter_state/api_tests.py
delorenzosoftware/superset
5403f1ec163a52623f34f459d89f20e4e190371d
[ "Apache-2.0" ]
11
2021-12-06T10:46:10.000Z
2022-02-23T11:18:03.000Z
tests/integration_tests/dashboards/filter_state/api_tests.py
delorenzosoftware/superset
5403f1ec163a52623f34f459d89f20e4e190371d
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.832215
88
0.702065
111a4222e02c67cbb942fdb299250333ea4da775
2,621
py
Python
hasty/mapp/migrations/0002_auto_20200731_0240.py
NREL/hasty
3beb041813ee92ba8942121d8e33c6b025eea448
[ "BSD-3-Clause" ]
4
2020-10-09T19:30:04.000Z
2020-11-23T10:05:43.000Z
hasty/mapp/migrations/0002_auto_20200731_0240.py
NREL/hasty
3beb041813ee92ba8942121d8e33c6b025eea448
[ "BSD-3-Clause" ]
29
2021-01-28T14:03:05.000Z
2022-02-03T18:21:09.000Z
hasty/mapp/migrations/0002_auto_20200731_0240.py
NREL/haste
18e4941d933a90a53c162a64993ff46608a7128f
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 3.0.7 on 2020-07-31 02:40 import os from django.db import migrations from brickschema.graph import Graph as BrickGraph from brickschema.namespaces import BRICK from rdflib import Namespace, Graph, RDF PH = Namespace("https://project-haystack.org/def/ph/3.9.9#") PHICT = Namespace("https://proje...
31.578313
107
0.682564
90336c21d7c76dd9ff167ae52dced14e720c5fbd
185
py
Python
sdk/cts/build/scripts/__init__.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
5
2022-01-10T20:22:17.000Z
2022-01-21T20:14:17.000Z
sdk/cts/build/scripts/__init__.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
null
null
null
sdk/cts/build/scripts/__init__.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
null
null
null
# Copyright 2021 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from .scripts import *
30.833333
72
0.762162
688bdd1a18602156fedd2ed54bc7a1df798dc7e7
1,614
py
Python
disqus/fetch.py
tonnpa/op-leaders
2db3defa09808c04cd342c96c779baefb46720dd
[ "Apache-2.0" ]
1
2019-05-04T15:56:06.000Z
2019-05-04T15:56:06.000Z
disqus/fetch.py
tonnpa/op-leaders
2db3defa09808c04cd342c96c779baefb46720dd
[ "Apache-2.0" ]
1
2015-12-15T10:17:22.000Z
2015-12-15T10:17:22.000Z
disqus/fetch.py
tonnpa/opleaders
2db3defa09808c04cd342c96c779baefb46720dd
[ "Apache-2.0" ]
2
2019-09-25T05:47:57.000Z
2020-05-23T17:18:10.000Z
__author__ = 'tonnpa' import json from urllib.request import urlopen # static variables common to all URLs api_version = '3.0' output_type = '.json?' api_key = 'api_key=OjL90VsZnaWjtuJwYhWEC6RJKN2lNucCCCUSkygOJCc6gWtjHjZdDKcceBRbL4V2' def get_url_list_threads(forum, since='', cursor='', limit=100, order='asc'): ...
28.821429
99
0.60347
7f9f2fdfb667eb7d440005c40dbe61cf9855b2d7
32,650
py
Python
homeassistant/components/cast/media_player.py
jheddings/hass-core
4270b7535b3cc4d35dc485c4b3d6c5cb61a95768
[ "Apache-2.0" ]
3
2019-10-02T04:40:26.000Z
2020-02-16T13:19:08.000Z
homeassistant/components/cast/media_player.py
robert-alfaro/home-assistant
4a53121b58b77a318f08c64ad2c5372a16b800e0
[ "Apache-2.0" ]
null
null
null
homeassistant/components/cast/media_player.py
robert-alfaro/home-assistant
4a53121b58b77a318f08c64ad2c5372a16b800e0
[ "Apache-2.0" ]
null
null
null
"""Provide functionality to interact with Cast devices on the network.""" from __future__ import annotations import asyncio from collections.abc import Callable from contextlib import suppress from datetime import datetime import json import logging import pychromecast from pychromecast.controllers.homeassistant impo...
36.56215
88
0.642328
46e3781e9caf93e4d2d78442f1bef6314ac5b6e0
14,368
py
Python
tests/integration_tests/api/auth_methods/test_gcp.py
ddeka2910/hvac
80cf3950157bf003ee6622e6db84bb9d6c90e5f1
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/api/auth_methods/test_gcp.py
ddeka2910/hvac
80cf3950157bf003ee6622e6db84bb9d6c90e5f1
[ "Apache-2.0" ]
2
2019-07-08T03:09:38.000Z
2021-07-08T18:17:51.000Z
tests/integration_tests/api/auth_methods/test_gcp.py
ddeka2910/hvac
80cf3950157bf003ee6622e6db84bb9d6c90e5f1
[ "Apache-2.0" ]
null
null
null
import json import logging from unittest import TestCase from parameterized import parameterized, param from hvac import exceptions from tests import utils from tests.utils.hvac_integration_test_case import HvacIntegrationTestCase class TestGcp(HvacIntegrationTestCase, TestCase): TEST_MOUNT_POINT = 'gcp-test' ...
35.389163
142
0.551503
fbfa667999afeef5d2e81dd72dd482f782567bd3
13,600
py
Python
seq_utils/TranSearch/multi_thread_preprocess.py
PTYin/ESRT
4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c
[ "BSD-2-Clause" ]
null
null
null
seq_utils/TranSearch/multi_thread_preprocess.py
PTYin/ESRT
4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c
[ "BSD-2-Clause" ]
null
null
null
seq_utils/TranSearch/multi_thread_preprocess.py
PTYin/ESRT
4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c
[ "BSD-2-Clause" ]
null
null
null
import text_process import os import sys import gzip import json import argparse import itertools import _thread import threading sys.path.append(os.getcwd()) import pandas as pd import numpy as np def get_df(path): """ Apply raw data to pandas DataFrame. """ idx = 0 df = {} g = gzip.open(path, 'rb...
39.193084
112
0.595956
35cd27bad6746e52c26fd8ccc249724adeba405f
2,132
py
Python
gdx_merge.py
emhTrade-ltd/py-gdx
53513983ef78852088b6b961ab18aa593047138e
[ "MIT" ]
12
2015-02-24T16:51:00.000Z
2021-03-17T02:48:36.000Z
gdx_merge.py
elainethale/py-gdx
53513983ef78852088b6b961ab18aa593047138e
[ "MIT" ]
null
null
null
gdx_merge.py
elainethale/py-gdx
53513983ef78852088b6b961ab18aa593047138e
[ "MIT" ]
6
2015-06-04T02:19:35.000Z
2017-11-30T18:49:15.000Z
#!/usr/bin/env python # Copyright (c) 2011 Incremental IP Limited # see LICENSE for license information import gdxx import gdxdict import sys import optparse #- Merge two gdx files --------------------------------------------------------- def merge_gdx(input_gdxes, output_gdx=None, gams_dir=None): if output_gd...
29.205479
118
0.562383
b7ef3744902d24d3fddb6f42c92fb2bd2a79c4c6
1,828
py
Python
examples/hypersearch.py
yliess86/BayeFormers
2c3188e5084f86ff3a89e5dd222c2d55605d4e3e
[ "MIT" ]
21
2020-10-02T17:48:12.000Z
2022-03-21T04:03:53.000Z
examples/hypersearch.py
yliess86/Bayeformers
2c3188e5084f86ff3a89e5dd222c2d55605d4e3e
[ "MIT" ]
2
2021-12-09T08:21:00.000Z
2022-02-02T02:48:59.000Z
examples/hypersearch.py
yliess86/Bayeformers
2c3188e5084f86ff3a89e5dd222c2d55605d4e3e
[ "MIT" ]
1
2021-12-02T13:04:10.000Z
2021-12-02T13:04:10.000Z
from typing import Any from typing import Callable from typing import Dict from typing import List from typing import Tuple import numpy as np class Score: def __init__(self, score: float, parameters: Any) -> None: self.score = score self.parameters = parameters def __str__(self) -> str: ...
31.517241
78
0.547046
37c61a71a3bdac4fadef58ba8c24b853fb3638ef
21,083
py
Python
tensorflow/contrib/cudnn_rnn/python/layers/cudnn_rnn.py
ryorda/tensorflow-viennacl
054b515feec0a3fca4cfb1f29adbf423c9027c3a
[ "Apache-2.0" ]
16
2018-01-30T22:16:13.000Z
2021-07-18T10:00:55.000Z
tensorflow/contrib/cudnn_rnn/python/layers/cudnn_rnn.py
ryorda/tensorflow-viennacl
054b515feec0a3fca4cfb1f29adbf423c9027c3a
[ "Apache-2.0" ]
3
2018-05-09T11:31:58.000Z
2021-01-27T12:26:21.000Z
tensorflow/contrib/cudnn_rnn/python/layers/cudnn_rnn.py
ryorda/tensorflow-viennacl
054b515feec0a3fca4cfb1f29adbf423c9027c3a
[ "Apache-2.0" ]
13
2018-02-22T21:04:13.000Z
2020-11-17T11:38:36.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.783154
118
0.705734
677fa7859dd4922a1dbbdecfd0622dfc42b3c019
283
py
Python
cowsay/lib/cows/sachiko.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
cowsay/lib/cows/sachiko.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
cowsay/lib/cows/sachiko.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
def Sachiko(thoughts, eyes, eye, tongue): return f""" {thoughts} {thoughts} {thoughts}"""+""" , -――- 、 / ヽ、 /爻ノリノハノリlノ ゝ l <ノリノ‐' ー リ > } l ノ ┃ ┃ l ノ ノ l人 r‐┐ !ノ^) ゝ \` ´ ‐<´ """
21.769231
41
0.314488