hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08ea1223f537b574d2100dee6a423930eea8a076 | 2,086 | wsgi | Python | scripts/python/backend_server/wsgi/alertsMAW-confirm.wsgi | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2020-06-03T15:59:50.000Z | 2020-12-21T11:11:57.000Z | scripts/python/backend_server/wsgi/alertsMAW-confirm.wsgi | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | null | null | null | scripts/python/backend_server/wsgi/alertsMAW-confirm.wsgi | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2019-10-02T06:47:23.000Z | 2020-02-02T18:32:23.000Z |
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
# ** Copyright UCAR (c) 1992 - 2015
# ** University Corporation for Atmospheric Research(UCAR)
# ** National Center for Atmospheric Research(NCAR)
# ** Research Applications Laboratory(RAL)
# ** P.O.Box 3000, Boulder, Colorado, 80307-3000... | 38.62963 | 272 | 0.651486 |
08ea3b654005ce8f8e37ef49c1d8cd4c353b7174 | 168 | py | Python | 1/save1_nopass.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | 1/save1_nopass.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | 1/save1_nopass.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | def sum_numbers(numbers=None):
if numbers=None:
return 101*50
else:
for i in numbers:
total += list[i]
return total
pass | 21 | 30 | 0.541667 |
08ea51c347c7e5343d3c4982172556cfb4c991f6 | 1,921 | py | Python | metrics.py | shayenne/VoiceDetection | 5b9ce0950da245fa9488301e3a024b06f363f4db | [
"MIT"
] | null | null | null | metrics.py | shayenne/VoiceDetection | 5b9ce0950da245fa9488301e3a024b06f363f4db | [
"MIT"
] | null | null | null | metrics.py | shayenne/VoiceDetection | 5b9ce0950da245fa9488301e3a024b06f363f4db | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt#
import numpy as np#
import sklearn#
import os
import glob
import librosa
import pandas as pd
from IPython.display import Audio
from sklearn.externals import joblib#
def zero_rule(vec_labels):
# Now lets predict the labels of the test data!
ones = np.ones(len(vec_labels))
#... | 28.25 | 71 | 0.70328 |
08ea65213a5fb938fa2041fe7f1e1cd7a80fc2a2 | 9,589 | py | Python | rideshare/rideshare_api/views.py | RideQuest/ridequest | a2f51d99109f9767c5d2abe7f6fb3f160e5212da | [
"MIT"
] | null | null | null | rideshare/rideshare_api/views.py | RideQuest/ridequest | a2f51d99109f9767c5d2abe7f6fb3f160e5212da | [
"MIT"
] | 12 | 2016-04-30T02:36:13.000Z | 2016-04-30T02:39:45.000Z | rideshare/rideshare_api/views.py | RideQuest/ridequest | a2f51d99109f9767c5d2abe7f6fb3f160e5212da | [
"MIT"
] | null | null | null | # from django.shortcuts import render
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
from .serializers import UserSerializer, ProfileSerializer, RouteSerializer, AvatarSerializer
from django.contrib.auth.models import User
from rideshare_profile.models import Profile, Route, ... | 36.880769 | 94 | 0.679946 |
08ea8980671843f2bcb31c36f9ab020b9ff55890 | 2,872 | py | Python | iou.py | Shall-Chee/Vision-based-Vehicle-Detection-and-Tracking | dff14e34779f142daa3254934f1e001e0777733f | [
"MIT"
] | null | null | null | iou.py | Shall-Chee/Vision-based-Vehicle-Detection-and-Tracking | dff14e34779f142daa3254934f1e001e0777733f | [
"MIT"
] | null | null | null | iou.py | Shall-Chee/Vision-based-Vehicle-Detection-and-Tracking | dff14e34779f142daa3254934f1e001e0777733f | [
"MIT"
] | 1 | 2021-12-17T20:15:08.000Z | 2021-12-17T20:15:08.000Z | '''
Combining detector and tracker
tracker can track multiple object in the video
'''
import numpy as np
import json
from utils import *
from constant import *
from constant import t_min
from ast import literal_eval
def overlap(box1, box2):
'''
check the overlap of two boxes
@param
box: shape(4,) nda... | 27.352381 | 91 | 0.571727 |
08eab67d454d47ba27b79f76ed5863bf3628c6d5 | 3,345 | py | Python | automation/utils/__init__.py | Horbee/automation-platform | 91c60791f0cbfe52c2ea16ebddb5cad8df2c00fd | [
"MIT"
] | null | null | null | automation/utils/__init__.py | Horbee/automation-platform | 91c60791f0cbfe52c2ea16ebddb5cad8df2c00fd | [
"MIT"
] | null | null | null | automation/utils/__init__.py | Horbee/automation-platform | 91c60791f0cbfe52c2ea16ebddb5cad8df2c00fd | [
"MIT"
] | null | null | null | import pydash as _
from google.oauth2 import id_token
from google.auth.transport import requests
from automation import Config
from automation.models import User
from automation.vacuum.responses import dialogflow_response
from functools import wraps
from flask import request, g, jsonify, current_app
def login_requir... | 32.794118 | 94 | 0.650523 |
08eac010877c1767c324f1c58727556124049b0f | 4,012 | py | Python | models/toy_model.py | Maarten7/neural-network-arca | 1ed80519bcfbfa871c30d28f7bc2cc3f35dfbd17 | [
"MIT"
] | 2 | 2018-09-13T17:52:00.000Z | 2019-02-06T20:30:44.000Z | models/toy_model.py | Maarten7/neural-network-arca | 1ed80519bcfbfa871c30d28f7bc2cc3f35dfbd17 | [
"MIT"
] | null | null | null | models/toy_model.py | Maarten7/neural-network-arca | 1ed80519bcfbfa871c30d28f7bc2cc3f35dfbd17 | [
"MIT"
] | null | null | null | import numpy as np
def get_random_xyz():
x = np.random.randint(13)
y = np.random.randint(13)
z = np.random.randint(18)
return x, y, z
def get_event_klass_label(num_mini_timeslices):
event = np.zeros((num_mini_timeslices, 13, 13, 18, 3))
klass = np.random.randint(3)
label = np.zeros(3)
... | 25.232704 | 68 | 0.572782 |
08eb0c8e6a851886ea02eecc9113b003eddf8f8a | 1,827 | py | Python | stock_trading_backend/data/randomized_stock_data.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | 1 | 2021-01-27T18:24:02.000Z | 2021-01-27T18:24:02.000Z | stock_trading_backend/data/randomized_stock_data.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | null | null | null | stock_trading_backend/data/randomized_stock_data.py | iryzhkov/stock-trading-backend | 7161026b7b4deb78a934b66550c85a27c6b32933 | [
"MIT"
] | null | null | null | """Class for storing randomized stock data.
"""
import numpy as np
from stock_trading_backend.data.stock_data import StockData
class RandomizedStockData(StockData):
"""Class for storing randomized stock data.
"""
name = "randomized_stock_data"
expected_num_dependencies = 1
def __init__(self, dep... | 33.218182 | 96 | 0.640941 |
08eb636e85d6aca156bdb57815d627c317d03323 | 479 | py | Python | Other/RCEintro/Python_examples/power1/power.py | IQSS/workshops | f060ee3b883c93cb4eb1410b13c3d9f8509233d8 | [
"CC-BY-4.0"
] | 30 | 2017-03-25T14:18:11.000Z | 2019-05-27T18:00:49.000Z | Other/RCEintro/Python_examples/power1/power.py | IQSS/workshops | f060ee3b883c93cb4eb1410b13c3d9f8509233d8 | [
"CC-BY-4.0"
] | 2 | 2018-08-13T18:52:32.000Z | 2018-08-22T19:49:01.000Z | Other/RCEintro/Python_examples/power1/power.py | IQSS/workshops | f060ee3b883c93cb4eb1410b13c3d9f8509233d8 | [
"CC-BY-4.0"
] | 97 | 2017-03-24T14:35:46.000Z | 2019-08-07T10:56:39.000Z | import numpy as np
from scipy import stats
## function to simulate data and perform a t.test
def sim_ttest(mu1, mu2, sd, n1, n2):
x = stats.norm.rvs(loc = mu1, scale = sd, size = n1)
y = stats.norm.rvs(loc = mu2, scale = sd, size = n2)
return(stats.ttest_ind(x, y)[1])
## run the function 10,000 times
nsi... | 31.933333 | 58 | 0.659708 |
08eb8b860d83f13ab07a1004f91191b5ea334015 | 3,520 | py | Python | src/freckles/separation/components.py | bthorne93/freckles | cacb0c3846602f13b371252876f1f8e05dca54ba | [
"MIT"
] | null | null | null | src/freckles/separation/components.py | bthorne93/freckles | cacb0c3846602f13b371252876f1f8e05dca54ba | [
"MIT"
] | null | null | null | src/freckles/separation/components.py | bthorne93/freckles | cacb0c3846602f13b371252876f1f8e05dca54ba | [
"MIT"
] | null | null | null | from __future__ import print_function
from numba import jit, float64
import numpy as np
import inspect
class Component(object):
def __init__(self, comp_name):
""" SED must be in uK_RJ units.
"""
self.comp_name = comp_name
self.sed = globals()[comp_name]
return
def __cal... | 27.5 | 86 | 0.59858 |
08eb98db6c65c0021f70e94cf50b1ef452a0c1d3 | 305 | py | Python | api/fields.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | api/fields.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | api/fields.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | from rest_framework.fields import Field
class DisplayNameField(Field):
def to_internal_value(self, data):
return data
def to_representation(self, value):
if not value:
return self.parent.data['first_name'] + ' ' + self.parent.data['last_name']
return value
| 23.461538 | 87 | 0.662295 |
08ebb2df0ae93bc41a2c056687017289579a7452 | 3,658 | py | Python | catalyst/rl/agents/actor.py | ivbelkin/catalyst | 468348d0a9a2c2e34e6e3550adf67275e96ce13d | [
"MIT"
] | null | null | null | catalyst/rl/agents/actor.py | ivbelkin/catalyst | 468348d0a9a2c2e34e6e3550adf67275e96ce13d | [
"MIT"
] | null | null | null | catalyst/rl/agents/actor.py | ivbelkin/catalyst | 468348d0a9a2c2e34e6e3550adf67275e96ce13d | [
"MIT"
] | null | null | null | import torch.nn as nn
from functools import reduce
from catalyst.contrib.models import SequentialNet
from catalyst.dl.initialization import create_optimal_inner_init, outer_init
from catalyst.rl.agents.layers import StateNet, \
GaussPolicy, RealNVPPolicy, \
LamaPooling
class Actor(StateNet):
"""
Acto... | 29.983607 | 76 | 0.56971 |
08ebc9444173f86119b2b88483c3e844087fb49b | 7,915 | py | Python | src/dewloosh/geom/tri/triplot.py | dewloosh/dewloosh-geom | 5c97fbab4b68f4748bf4309184b9e0e877f94cd6 | [
"MIT"
] | 2 | 2021-12-11T17:25:51.000Z | 2022-01-06T15:36:27.000Z | src/dewloosh/geom/tri/triplot.py | dewloosh/dewloosh-geom | 5c97fbab4b68f4748bf4309184b9e0e877f94cd6 | [
"MIT"
] | null | null | null | src/dewloosh/geom/tri/triplot.py | dewloosh/dewloosh-geom | 5c97fbab4b68f4748bf4309184b9e0e877f94cd6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from typing import Callable, Iterable
import numpy as np
from functools import partial
from dewloosh.core.tools import issequence
from .triang import triobj_to_mpl, get_triobj_data, triangulate
from .triutils import offset_tri
from ..utils import cells_coords, explode_mesh_data_bulk
from ..co... | 36.643519 | 76 | 0.565635 |
08ebd6bef20deabbc03214e9b9e6b63dc0d4da5c | 2,421 | py | Python | func_tests/pages/projectspage/projects_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/pages/projectspage/projects_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/pages/projectspage/projects_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from string import lower
from pages.createprojectpage.questionnaire_creation_options_page import QuestionnaireCreationOptionsPage
from pages.lightbox.light_box_page import LightBox
from pages.projectoverviewpage.project_overview_page import ProjectOverviewPage
from pages.proj... | 41.033898 | 120 | 0.726559 |
08ebe2b3cd338081c17f1f438ed77b3198fe65b9 | 3,122 | py | Python | scripts/monitor.py | hairyspider/tomcam | cedbe186a584cc2b08e070fefd83344ec5393dd0 | [
"MIT"
] | null | null | null | scripts/monitor.py | hairyspider/tomcam | cedbe186a584cc2b08e070fefd83344ec5393dd0 | [
"MIT"
] | 1 | 2018-06-08T19:17:47.000Z | 2018-06-08T19:17:47.000Z | scripts/monitor.py | hairyspider/tomcam | cedbe186a584cc2b08e070fefd83344ec5393dd0 | [
"MIT"
] | null | null | null | import sqlite3
import random
import json
import threading
import RPi.GPIO as GPIO
import time
import os.path
class EventType:
FAN = 1
WATER = 2
SETTINGS = 3
class Status:
Fan = False
Water = False
last_settings_file_time = 0
temp_thresh = 35
fan_duration = 5
soil_thresh = 0.5
water_duration = 5
OPT_FILE... | 20.813333 | 98 | 0.693786 |
08ebe4c58b5ca601d5246054eefd59e13affe955 | 29,065 | py | Python | pydefect/cli/main_functions.py | wangvei/pydefect | e909796c429e16982cefe549d16881039bce89e7 | [
"MIT"
] | 1 | 2021-06-07T03:05:39.000Z | 2021-06-07T03:05:39.000Z | pydefect/cli/main_functions.py | wangvei/pydefect | e909796c429e16982cefe549d16881039bce89e7 | [
"MIT"
] | null | null | null | pydefect/cli/main_functions.py | wangvei/pydefect | e909796c429e16982cefe549d16881039bce89e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from copy import deepcopy
from glob import glob
from pathlib import Path
from typing import Optional
import numpy as np
from pydefect.analysis.defect import Defect
from pydefect.analysis.defect_carrier_concentration import DefectConcentration
from pydefect.analysis.defect_eigenvalue... | 37.697795 | 80 | 0.62491 |
08ec020e49162a77f4a741f97ed947f521f99e45 | 5,169 | py | Python | m2-modified/ims/einstein/iscsi/tgt.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | m2-modified/ims/einstein/iscsi/tgt.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | m2-modified/ims/einstein/iscsi/tgt.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | import os
import re
from ims.common import shell
from ims.common.log import create_logger, log
from ims.exception import iscsi_exceptions
from ims.exception import shell_exceptions
from ims.exception.exception import ShellException
from ims.interfaces.iscsi import ISCSI
logger = create_logger(__name__)
class TGT(IS... | 32.71519 | 77 | 0.585993 |
08ec13212d7a0c443717fdd43ee23735471eac06 | 2,027 | py | Python | lib/tst_gender_classifier.py | AhmadHakroosh/MSGP | aa4aff4c4040eb87b14bb2ed5e70c92a0387cd6a | [
"Apache-2.0"
] | 1 | 2018-12-28T17:35:47.000Z | 2018-12-28T17:35:47.000Z | lib/tst_gender_classifier.py | AhmadHakroosh/MSGP | aa4aff4c4040eb87b14bb2ed5e70c92a0387cd6a | [
"Apache-2.0"
] | null | null | null | lib/tst_gender_classifier.py | AhmadHakroosh/MSGP | aa4aff4c4040eb87b14bb2ed5e70c92a0387cd6a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import get_reddit_data
import get_imdb_data
import pickle
from gensim.models import Word2Vec
from nltk.tokenize import word_tokenize
import nltk
def get_features(sentence):
words_vec = None
words = word_tokenize(sentence)
word_count = 0
for word in words:
try:
... | 19.304762 | 67 | 0.645782 |
08ec28f8a1b531203ba24669ce720433d18c3d45 | 3,531 | py | Python | worx_v2/hooks.py | UsamaNaveed9/worx_v2 | 2c46dcc9ec3d7a75ba3626502a8186891bf15bd5 | [
"MIT"
] | null | null | null | worx_v2/hooks.py | UsamaNaveed9/worx_v2 | 2c46dcc9ec3d7a75ba3626502a8186891bf15bd5 | [
"MIT"
] | null | null | null | worx_v2/hooks.py | UsamaNaveed9/worx_v2 | 2c46dcc9ec3d7a75ba3626502a8186891bf15bd5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "worx_v2"
app_title = "Worx V2"
app_publisher = "Usama Naveed"
app_description = "Worx International"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "usamanaveed9263@gmail.com... | 23.858108 | 78 | 0.677995 |
08ec2dab9e35ecb3e739d04f8f7b8b0d31ce6316 | 3,977 | py | Python | PriceCutdown/settings.py | fioan89/Price-Cutdown | eca90719f8b7016011cd2c7cdcb3dec4701adbc5 | [
"MIT"
] | null | null | null | PriceCutdown/settings.py | fioan89/Price-Cutdown | eca90719f8b7016011cd2c7cdcb3dec4701adbc5 | [
"MIT"
] | null | null | null | PriceCutdown/settings.py | fioan89/Price-Cutdown | eca90719f8b7016011cd2c7cdcb3dec4701adbc5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for PriceCutdown project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/l... | 34.885965 | 109 | 0.78602 |
08ec489faaccfa0d8cca017fda0981cd94a6fac5 | 551 | py | Python | liliput/admin.py | strassan/www.kaifeck.de | b54698e8e57eaedbc4cb4ea3335fc719df92108f | [
"MIT"
] | 2 | 2020-07-29T17:35:31.000Z | 2021-06-06T11:37:49.000Z | liliput/admin.py | strassan/www.kaifeck.de | b54698e8e57eaedbc4cb4ea3335fc719df92108f | [
"MIT"
] | 4 | 2020-10-28T19:06:02.000Z | 2021-01-11T16:06:46.000Z | liliput/admin.py | strassan/www.kaifeck.de | b54698e8e57eaedbc4cb4ea3335fc719df92108f | [
"MIT"
] | null | null | null | from django.contrib import admin
def verify_selected_short_links(modeladmin, request, queryset):
queryset.update(verified=True)
def unverify_selected_short_links(modeladmin, request, queryset):
queryset.update(verified=False)
# for ShortLinks
class ShortLinkAdmin(admin.ModelAdmin):
list_display = ['sh... | 30.611111 | 74 | 0.767695 |
08ec4f74358a41f97853df04d52cac13109a36a0 | 4,062 | py | Python | synapse/tests/test_model_telco.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | null | null | null | synapse/tests/test_model_telco.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | 4 | 2017-10-03T21:50:40.000Z | 2017-11-20T15:49:38.000Z | synapse/tests/test_model_telco.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | null | null | null | import synapse.lib.types as s_types
from synapse.tests.common import *
class TelcoTest(SynTest):
def test_model_type_phone(self):
tlib = s_types.TypeLib()
prop = 'tel:phone'
self.eq(tlib.getTypeNorm(prop, 1234567890)[0], 1234567890)
self.eq(tlib.getTypeParse(prop, '123 456 7890')... | 43.212766 | 99 | 0.624323 |
08ec5e0f8253766dd265b4bf83c67d00f4987fed | 1,906 | py | Python | py-polars/tests/test_sort.py | g-logunov/polars | a4a8854cfd6aaa582719aca2e3874cdcf44a86ca | [
"MIT"
] | 3,395 | 2021-05-06T13:46:12.000Z | 2022-03-31T23:50:15.000Z | py-polars/tests/test_sort.py | g-logunov/polars | a4a8854cfd6aaa582719aca2e3874cdcf44a86ca | [
"MIT"
] | 1,253 | 2021-05-06T15:05:23.000Z | 2022-03-31T23:31:23.000Z | py-polars/tests/test_sort.py | g-logunov/polars | a4a8854cfd6aaa582719aca2e3874cdcf44a86ca | [
"MIT"
] | 263 | 2021-05-08T07:37:45.000Z | 2022-03-30T05:19:55.000Z | from typing import List, Union
import polars as pl
def test_sort_dates_multiples() -> None:
df = pl.DataFrame(
[
pl.Series(
"date",
[
"2021-01-01 00:00:00",
"2021-01-01 00:00:00",
"2021-01-02 00:00:00"... | 29.323077 | 79 | 0.480588 |
08ec7d838bf6199261e0654448e950c2c53e94c8 | 7,518 | py | Python | ratsql/models/nl2code/infer_tree_traversal.py | xiang-deng/rat-sql | 02f5aef3e0ad77b5181b13dbf95efb247019abf4 | [
"MIT"
] | null | null | null | ratsql/models/nl2code/infer_tree_traversal.py | xiang-deng/rat-sql | 02f5aef3e0ad77b5181b13dbf95efb247019abf4 | [
"MIT"
] | null | null | null | ratsql/models/nl2code/infer_tree_traversal.py | xiang-deng/rat-sql | 02f5aef3e0ad77b5181b13dbf95efb247019abf4 | [
"MIT"
] | null | null | null | import ast
import collections
import collections.abc
import enum
import itertools
import json
import os
import operator
import re
import copy
import random
import asdl
import attr
import pyrsistent
import entmax
import torch
import torch.nn.functional as F
from ratsql.models.nl2code.tree_traversal import TreeTraversa... | 36.318841 | 119 | 0.599495 |
08eca8d9b9deb18292ce64d74d3e4d8490c20b1b | 4,232 | py | Python | vision_transform_codes/dict_update_rules/convolutional/sc_cheap_quadratic_descent.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | vision_transform_codes/dict_update_rules/convolutional/sc_cheap_quadratic_descent.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | vision_transform_codes/dict_update_rules/convolutional/sc_cheap_quadratic_descent.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | """
Updates dictionary with a modified descent for convolutional sparse coding.
What I mean by convolutional is that the basis functions are convolved with
the sparse codes to produce an image. The basis functions will be much smaller
than the images. This uses the diagonal of the Hessian to rescale the updates.
It's ... | 52.9 | 79 | 0.731096 |
08ecacafe1de7a61da5830c9d9b0bd49e8e79e20 | 554 | py | Python | pypipet/core/errors.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | null | null | null | pypipet/core/errors.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | null | null | null | pypipet/core/errors.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | 1 | 2021-12-10T22:36:34.000Z | 2021-12-10T22:36:34.000Z | """Base Error classes."""
import functools
import io
import logging
def error(error_cls):
class Error(error_cls):
"""Aggregate multiple sub-exceptions."""
def __init__(self, exceptions):
self.exceptions = exceptions
def __str__(self):
return "\n".join(str(e) for e ... | 21.307692 | 61 | 0.66065 |
08eccf482bc3d1067d86af7b51ce940fe3fd5fcc | 3,370 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/_non_string_enums_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/_non_string_enums_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/_non_string_enums_client.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 ... | 43.766234 | 100 | 0.689614 |
08ecd257e153b1a61f9a98c9b5f87768f0f3d34f | 1,084 | py | Python | cscl_tests/cscl/unit/test_utils.py | fkutzner/PyCSCL | 7500503ae2565a284af7a69483274ef480747801 | [
"X11"
] | 5 | 2019-02-14T15:25:05.000Z | 2020-04-11T19:57:01.000Z | cscl_tests/cscl/unit/test_utils.py | fkutzner/PyCSCL | 7500503ae2565a284af7a69483274ef480747801 | [
"X11"
] | null | null | null | cscl_tests/cscl/unit/test_utils.py | fkutzner/PyCSCL | 7500503ae2565a284af7a69483274ef480747801 | [
"X11"
] | null | null | null | import unittest
from cscl.utils import with_activation_literals
from cscl.interfaces import ClauseConsumer
class TestClauseConsumer(ClauseConsumer):
def __init__(self):
self._clauses = list()
def consume_clause(self, clause):
self._clauses.append(list(sorted(clause)))
def get_clauses(sel... | 34.967742 | 93 | 0.678967 |
08ecd79d3b80ffcc898b1b71a68e66e33d9cfb75 | 3,208 | py | Python | alipay/aop/api/domain/AlipayFundBailCollectionFinishModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayFundBailCollectionFinishModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayFundBailCollectionFinishModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayFundBailCollectionFinishModel(object):
def __init__(self):
self._agreement_no = None
self._extra_param = None
self._out_collection_no = None
self._principal_... | 31.762376 | 85 | 0.627805 |
08ecfd7c52935664a057507f6199257c6f96c3ac | 7,832 | py | Python | src/nti/zodb/tests/test_activitylog.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | null | null | null | src/nti/zodb/tests/test_activitylog.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | 10 | 2017-06-08T12:24:31.000Z | 2021-04-01T16:52:38.000Z | src/nti/zodb/tests/test_activitylog.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, division
__docformat__ = "restructuredtext en"
# pylint: disable=protected-access
import unittest
from hamcrest import assert_that
from hamcrest import has_property
from hamcrest import has_length
from hamcrest impor... | 29.223881 | 79 | 0.62168 |
08ed0da237d47e34e2f3384f1227c0341e4d85a3 | 17,885 | py | Python | scripts/rewritting_utils.py | Bhaskers-Blu-Org1/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 15 | 2019-09-25T21:27:25.000Z | 2020-12-24T02:22:56.000Z | scripts/rewritting_utils.py | Bhaskers-Blu-Org1/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 2 | 2020-01-10T06:03:28.000Z | 2021-01-02T05:38:19.000Z | scripts/rewritting_utils.py | IBM/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 5 | 2019-09-11T14:53:51.000Z | 2021-04-12T00:55:25.000Z | # Author: Xinyu Hua
""" utilities for rewritting_rules.py """
from nltk.corpus import wordnet as wn
import corenlp_utils as corenlp
import sys
MODULE = "../resources/pattern-2.6/"
sys.path.append(MODULE)
from pattern import en as patten
POS_TO_WORDNET = {
'NN': wn.NOUN,
'JJ': wn.ADJ,
'JJR': wn.ADJ,
'J... | 38.545259 | 124 | 0.613028 |
08ed28f3b920d319fe2d2ec5cc6b1a7cd5918412 | 19,223 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.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 ... | 46.77129 | 228 | 0.684024 |
08ed346194fc20773527c3af4809945744511c35 | 16,479 | py | Python | appengine/monorail/search/ast2sort.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/search/ast2sort.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/monorail/search/ast2sort.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Convert a user's issue sorting directives into SQL clauses.
Some sort directives translate ... | 36.457965 | 80 | 0.678682 |
08ed40d0633ea67696e99ca2a7f0c6a9c36a5a4e | 15,892 | py | Python | boudams/cli.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | null | null | null | boudams/cli.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | null | null | null | boudams/cli.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | null | null | null | import click
import re
import tqdm
import json
import datetime
from boudams.tagger import BoudamsTagger, manage_space
from boudams.trainer import Trainer
from boudams.encoder import LabelEncoder, DatasetIterator
from boudams.dataset import conllu, base as dataset_base, plaintext
@click.group()
def cli():
""" Bo... | 42.72043 | 122 | 0.64328 |
08ed672523062425528461a59e600ba40ecb4d99 | 4,987 | py | Python | leetcode_python/Linked_list/merge-two-sorted-lists.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Linked_list/merge-two-sorted-lists.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Linked_list/merge-two-sorted-lists.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | """
Merge two sorted linked lists and return it as a sorted list.
The list should be made by splicing together the nodes of the first two lists.
Example 1:
Input: l1 = [1,2,4], l2 = [1,3,4]
Output: [1,1,2,3,4,4]
Example 2:
Input: l1 = [], l2 = []
Output: []
Example 3:
Input: l1 = [], l2 = [0]
Output: [0]
Co... | 24.566502 | 85 | 0.484259 |
08ed68ca2dace89dfdf84e35da96d53d23cdced6 | 909 | py | Python | var/spack/repos/builtin/packages/r-loo/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-loo/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-loo/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RLoo(RPackage):
"""loo: Efficient Leave-One-Out Cross-Validation and WAIC for
Bayes... | 37.875 | 95 | 0.707371 |
08ed80943d825ed39ca6079931875acfbf1458eb | 3,348 | py | Python | xlcalculator/xltypes.py | ckp95/xlcalculator | 8f3f04a2a0a2ecb12c3d5837a5b13519137ae427 | [
"MIT"
] | 54 | 2020-04-26T09:18:29.000Z | 2022-03-30T08:47:45.000Z | xlcalculator/xltypes.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 41 | 2020-05-04T04:12:36.000Z | 2022-01-31T02:41:05.000Z | xlcalculator/xltypes.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 21 | 2020-05-21T20:49:23.000Z | 2022-02-20T14:15:56.000Z | """Representation of a Microsoft Excel formula
"""
from dataclasses import dataclass, field
from openpyxl.utils.cell import column_index_from_string
from typing import List
from . import ast_nodes, tokenizer, utils
from .tokenizer import ExcelParserTokens
class XLType:
pass
@dataclass
class XLFormula(XLType):
... | 35.242105 | 79 | 0.663978 |
08ed841e7e129934989dd25d3ce7446830920255 | 3,459 | py | Python | homeassistant/components/mfi/switch.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2020-04-07T15:44:54.000Z | 2020-04-07T15:44:54.000Z | homeassistant/components/mfi/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/mfi/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for Ubiquiti mFi switches."""
import logging
from mficlient.client import FailedToLogin, MFiClient
import requests
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
CONF_S... | 28.586777 | 84 | 0.648453 |
08ed9c4bcec37eed3d68197445c05cbda143f220 | 70 | py | Python | tests/_site/apps/partner/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/_site/apps/partner/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/_site/apps/partner/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | default_app_config = 'tests._site.apps.partner.config.PartnerConfig'
| 35 | 69 | 0.828571 |
08eddbe9352224123c2e62813debfd8720bf21ba | 2,140 | py | Python | pyroute/pyroutelib2/tilenames.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | pyroute/pyroutelib2/tilenames.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | pyroute/pyroutelib2/tilenames.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------
# Translates between lat/long and the slippy-map tile
# numbering scheme
#
# http://wiki.openstreetmap.org/index.php/Slippy_map_tilenames
#
# Written by Oliver White, 2007
# This file is public-domain
#---------------------------------------... | 23.777778 | 85 | 0.584112 |
08ee0078a7ea8e27644303eb6cec262800a6bc08 | 1,042 | py | Python | src/cmislib/__init__.py | concordusapps/python-cmislib | 628cca53ab05203920f7e7a063487be53b4a8d0a | [
"Apache-2.0"
] | 1 | 2019-05-31T12:30:02.000Z | 2019-05-31T12:30:02.000Z | src/cmislib/__init__.py | concordusapps/python-cmislib | 628cca53ab05203920f7e7a063487be53b4a8d0a | [
"Apache-2.0"
] | null | null | null | src/cmislib/__init__.py | concordusapps/python-cmislib | 628cca53ab05203920f7e7a063487be53b4a8d0a | [
"Apache-2.0"
] | 3 | 2019-07-11T03:08:58.000Z | 2022-01-05T10:27:15.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
... | 38.592593 | 67 | 0.713052 |
08ee481d12b3dfe1ac824648b4ad2091e06acb4b | 1,684 | py | Python | 00_Python_gxl2json/convertD2R-GXL-files.py | ActuallyFro/RBGT | a9707bcd627304a7ffa10643f876b14bdb6c4366 | [
"MIT"
] | null | null | null | 00_Python_gxl2json/convertD2R-GXL-files.py | ActuallyFro/RBGT | a9707bcd627304a7ffa10643f876b14bdb6c4366 | [
"MIT"
] | null | null | null | 00_Python_gxl2json/convertD2R-GXL-files.py | ActuallyFro/RBGT | a9707bcd627304a7ffa10643f876b14bdb6c4366 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#sudo apt-get install python3-pip
#pip3 install networkx
#pip3 install python-louvain
import sys
import argparse
import networkx as nx
import community
import json
from networkx.readwrite import json_graph
def graphmltojson(graphfile, outfile):
"""
Converts GraphML file to json while adding ... | 30.618182 | 153 | 0.75 |
08ee58b4e31354c8c93262e1f825ab23d6ee6654 | 2,614 | py | Python | modules/tools/prediction/mlp_train/generate_labels.py | DavidSplit/apollo-3.0 | 9f82838e857e4c9146952946cbc34b9f35098deb | [
"Apache-2.0"
] | 6 | 2019-10-11T07:57:49.000Z | 2022-02-23T15:23:41.000Z | modules/tools/prediction/mlp_train/generate_labels.py | DavidSplit/apollo-3.0 | 9f82838e857e4c9146952946cbc34b9f35098deb | [
"Apache-2.0"
] | null | null | null | modules/tools/prediction/mlp_train/generate_labels.py | DavidSplit/apollo-3.0 | 9f82838e857e4c9146952946cbc34b9f35098deb | [
"Apache-2.0"
] | 12 | 2019-10-11T07:57:49.000Z | 2022-03-16T05:13:00.000Z | #!/usr/bin/env python
###############################################################################
# Copyright 2018 The Apollo Authors. All Rights Reserved.
# Modifications Copyright (c) 2018 LG Electronics, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not ... | 36.816901 | 97 | 0.674828 |
08ee76c61bfc3944629cc6abea786b9af7d20b75 | 1,331 | py | Python | rootfs/api/models/domain.py | hanlucen/controller | 2be591d44508bbca8058d3f856d10d425fa4f519 | [
"MIT"
] | null | null | null | rootfs/api/models/domain.py | hanlucen/controller | 2be591d44508bbca8058d3f856d10d425fa4f519 | [
"MIT"
] | null | null | null | rootfs/api/models/domain.py | hanlucen/controller | 2be591d44508bbca8058d3f856d10d425fa4f519 | [
"MIT"
] | null | null | null | from django.db import models
from django.conf import settings
from django.db import transaction
from api.models import AuditedModel
class Domain(AuditedModel):
owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.PROTECT)
app = models.ForeignKey('App', on_delete=models.CASCADE)
domain = m... | 27.729167 | 81 | 0.619083 |
08ee7ee93d7dfb2e5c3dabd2a0af1e3a3b056b1d | 1,097 | py | Python | dstructure/MaxHeap.py | vivekpisal/Dstructure | 24c9c168290eeb609f0898a68b9a6fba38584883 | [
"MIT"
] | 1 | 2021-02-26T14:38:24.000Z | 2021-02-26T14:38:24.000Z | dstructure/MaxHeap.py | vivekpisal/Dstructure | 24c9c168290eeb609f0898a68b9a6fba38584883 | [
"MIT"
] | null | null | null | dstructure/MaxHeap.py | vivekpisal/Dstructure | 24c9c168290eeb609f0898a68b9a6fba38584883 | [
"MIT"
] | null | null | null | class MaxHeap:
def __init__(self,heap):
self.heap = heap
def __str__(self):
return f"{self.heap}"
def heapify(self,pos):
"""
This method convert list into heap.
"""
left = (2*pos)
right = (2*pos) + 1
largest = pos
if(left < len(self.heap) and self.heap[largest] < self.heap[left]):
largest = ... | 16.373134 | 72 | 0.627165 |
08ee923a96318951b5d1250716fb77299cf81169 | 4,576 | py | Python | src/birdhouse_toolbox/library/checker.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | src/birdhouse_toolbox/library/checker.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | src/birdhouse_toolbox/library/checker.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | import requests
import bs4
import re
import validators
import maya
import os
import json
import uuid
DEFAULT_TIMEOUT = 10.0
HEADERS = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36"
}
def find_urls(url, timeout=DEFAULT_TIM... | 28.246914 | 140 | 0.559441 |
08ee94272ea6a5cdcab6448ee67bed0075909567 | 592 | py | Python | classes/dog_class.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2020-11-02T05:52:33.000Z | 2021-06-09T01:28:22.000Z | classes/dog_class.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | null | null | null | classes/dog_class.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2021-04-08T05:26:04.000Z | 2021-06-09T01:28:23.000Z | class Dog:
"""A simple attempt to model a dog"""
def __init__(self, name, age):
"""Initialize name and age attributes"""
self.name = name
self.age = age
def sit(self):
"""Simulate a dog sitting in response to a command."""
print(f"{self.name} is sitting now.")
... | 26.909091 | 67 | 0.606419 |
08eeb21dbb22624c80e037604b74d596520061e5 | 685 | py | Python | migrations/versions/bb598b183353_.py | MohmedH/OpulentGroupDashboard | a071196da0146125b627894178125c1739dfbd7d | [
"MIT"
] | 1 | 2020-12-10T21:11:44.000Z | 2020-12-10T21:11:44.000Z | migrations/versions/bb598b183353_.py | MohmedH/OpulentGroupDashboard | a071196da0146125b627894178125c1739dfbd7d | [
"MIT"
] | null | null | null | migrations/versions/bb598b183353_.py | MohmedH/OpulentGroupDashboard | a071196da0146125b627894178125c1739dfbd7d | [
"MIT"
] | null | null | null | """empty message
Revision ID: bb598b183353
Revises: 5be3bbb17286
Create Date: 2020-07-21 00:12:49.479479
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bb598b183353'
down_revision = '5be3bbb17286'
branch_labels = None
depends_on = None
def upgrade():
# ... | 23.62069 | 92 | 0.705109 |
08eeb9741e6a351836862667b068da4196cbd301 | 4,499 | py | Python | pyspeckit/spectrum/models/radex_modelgrid.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pyspeckit/spectrum/models/radex_modelgrid.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pyspeckit/spectrum/models/radex_modelgrid.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """
Fit a line based on parameters output from a grid of RADEX models
"""
import numpy as np
from pyspeckit.mpfit import mpfit
from .. import units
from . import fitter,model
import matplotlib.cbook as mpcb
import copy
try:
import astropy.io.fits as pyfits
except ImportError:
import pyfits
class radex_model(ob... | 43.259615 | 156 | 0.622361 |
08eed88dc59360c8ba2d95e47839ce3058bb3127 | 2,325 | py | Python | alipay/aop/api/domain/AlipayDataAiserviceCloudbusScheduletasklistQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayDataAiserviceCloudbusScheduletasklistQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayDataAiserviceCloudbusScheduletasklistQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayDataAiserviceCloudbusScheduletasklistQueryModel(object):
def __init__(self):
self._app_version = None
self._city_code = None
self._corp_id = None
self._type ... | 27.034884 | 73 | 0.575914 |
08ef232c851dc85b63e98d67d115995bcc751cc8 | 4,718 | py | Python | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/gazebo_tracker/trackers/get_model_state_tracker.py | larsll/deepracer-simapp | 9251c32ff33d49955b63ccca4f38d01a0c721d4f | [
"MIT"
] | 3 | 2021-07-25T15:10:35.000Z | 2021-10-30T02:35:33.000Z | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/gazebo_tracker/trackers/get_model_state_tracker.py | larsll/deepracer-simapp | 9251c32ff33d49955b63ccca4f38d01a0c721d4f | [
"MIT"
] | null | null | null | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/gazebo_tracker/trackers/get_model_state_tracker.py | larsll/deepracer-simapp | 9251c32ff33d49955b63ccca4f38d01a0c721d4f | [
"MIT"
] | 3 | 2021-07-25T15:16:06.000Z | 2022-03-28T14:13:22.000Z | import threading
from markov.log_handler.deepracer_exceptions import GenericRolloutException
import copy
import rospy
from deepracer_msgs.srv import GetModelStates
from gazebo_msgs.srv import GetModelStateResponse
from markov.track_geom.constants import GET_MODEL_STATES
from markov.rospy_wrappers import ServiceProxyWr... | 40.672414 | 109 | 0.614243 |
08ef26e5438cc20f147fc0731316e605d67ab3c7 | 394 | py | Python | tests/app/externalOutages/test_getReasonId.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | tests/app/externalOutages/test_getReasonId.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | 21 | 2021-01-08T18:03:32.000Z | 2021-02-02T16:17:34.000Z | tests/app/externalOutages/test_getReasonId.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | import unittest
from src.appConfig import initAppConfig
from src.app.externalOutages.getReasonId import getReasonId
class TestGetReasonId(unittest.TestCase):
def test_run(self) -> None:
"""tests the function that gets the reason Id
"""
appConf = initAppConfig()
reasId = getReasonId... | 30.307692 | 62 | 0.692893 |
08ef432e6d4324e53bc4f5a81529a425e3bfad54 | 6,872 | py | Python | fetchMyAttch.py | bulak/fetchMyAttch | 75ea18547d8c6dbd6370cf0a1896497a9037cf28 | [
"MIT"
] | null | null | null | fetchMyAttch.py | bulak/fetchMyAttch | 75ea18547d8c6dbd6370cf0a1896497a9037cf28 | [
"MIT"
] | null | null | null | fetchMyAttch.py | bulak/fetchMyAttch | 75ea18547d8c6dbd6370cf0a1896497a9037cf28 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Fetches and saves attachments from queries of your Gmail"""
# Parts of this script are either directly copied or modified from
# Google Gmail API example codes available at
# https://developers.google.com/gmail/api
from __future__ import print_function
import httplib2
import os
import time
... | 36.748663 | 79 | 0.614086 |
08ef450bb624c2ae9a3e88e08feb52f59e6a9aa4 | 49,903 | py | Python | pyjac/loopy_utils/loopy_utils.py | stgeke/pyJac-v2 | c2716a05df432efd8e5f6cc5cc3d46b72c24c019 | [
"MIT"
] | 9 | 2018-10-08T07:49:20.000Z | 2021-06-26T15:28:30.000Z | pyjac/loopy_utils/loopy_utils.py | stgeke/pyJac-v2 | c2716a05df432efd8e5f6cc5cc3d46b72c24c019 | [
"MIT"
] | 13 | 2018-09-01T14:17:51.000Z | 2021-07-30T16:19:33.000Z | pyjac/loopy_utils/loopy_utils.py | arghdos/spyJac | bdd6940c27681e3b19ee41efb31abd20a89d1be8 | [
"MIT"
] | 7 | 2018-09-08T11:57:34.000Z | 2022-02-14T13:57:20.000Z | from __future__ import print_function
import logging
import os
import stat
import re
import six
from string import Template
# package imports
import loopy as lp
from loopy.target.c.c_execution import CPlusPlusCompiler
import numpy as np
import warnings
try:
import pyopencl as cl
from pyopencl.tools import cl... | 36.478801 | 85 | 0.584534 |
08ef63a6a61aa291529894089a3105b5681aa202 | 4,314 | py | Python | xhtml2pdf/w3c/cssDOMElementInterface.py | zulumarketing/html2pdf | 77ddeaf9a7323fec3c23a362a0e64de382cd23ce | [
"Apache-2.0"
] | 8 | 2015-05-23T21:19:43.000Z | 2021-12-23T01:54:01.000Z | xhtml2pdf/w3c/cssDOMElementInterface.py | zulumarketing/xhtml2pdf | 77ddeaf9a7323fec3c23a362a0e64de382cd23ce | [
"Apache-2.0"
] | 3 | 2015-05-22T20:51:32.000Z | 2015-08-11T17:18:58.000Z | xhtml2pdf/w3c/cssDOMElementInterface.py | zulumarketing/xhtml2pdf | 77ddeaf9a7323fec3c23a362a0e64de382cd23ce | [
"Apache-2.0"
] | 2 | 2017-04-21T01:19:21.000Z | 2018-05-22T05:38:31.000Z | #!/usr/bin/env python
##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##~ Copyright (C) 2002-2004 TechGame Networks, LLC.
##~
##~ This library is free software; you can redistribute it and/or
##~ modify it under the terms of the BSD style License as found in the
##~ LICENSE file included with this distribution.... | 29.346939 | 97 | 0.53338 |
08ef952f9e2617fc6c04daf0dadf6c1704394104 | 25,037 | py | Python | sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deployments_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deployments_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deployments_operations.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 ... | 44.079225 | 224 | 0.674562 |
08efad46a3852c784ff66ceb49863ad741b44168 | 74 | py | Python | src/cipr/commands/main.py | six8/corona-cipr | a2f45761080c874afa39bf95fd5c4467c8eae272 | [
"MIT"
] | 1 | 2015-04-19T20:53:15.000Z | 2015-04-19T20:53:15.000Z | src/cipr/commands/main.py | six8/corona-cipr | a2f45761080c874afa39bf95fd5c4467c8eae272 | [
"MIT"
] | null | null | null | src/cipr/commands/main.py | six8/corona-cipr | a2f45761080c874afa39bf95fd5c4467c8eae272 | [
"MIT"
] | 2 | 2016-04-11T15:35:10.000Z | 2020-04-13T10:42:32.000Z | from cipr.commands import app, core
def main():
app.command.main()
| 14.8 | 35 | 0.675676 |
08efc6b2fa775a37e96987917fc31fbf3254dbe1 | 413 | py | Python | scripts/simple-tcp-proxy.py | jamjven/ATX | 09571aa2745fc9c3583b17c466869db5b86bf5f5 | [
"Apache-2.0"
] | 1,132 | 2017-07-21T05:08:56.000Z | 2022-03-23T01:29:00.000Z | scripts/simple-tcp-proxy.py | jamjven/ATX | 09571aa2745fc9c3583b17c466869db5b86bf5f5 | [
"Apache-2.0"
] | 74 | 2017-07-21T06:00:32.000Z | 2019-01-25T05:10:20.000Z | scripts/simple-tcp-proxy.py | jamjven/ATX | 09571aa2745fc9c3583b17c466869db5b86bf5f5 | [
"Apache-2.0"
] | 277 | 2017-07-28T07:23:54.000Z | 2022-03-22T08:39:08.000Z | #!/usr/bin/env python
import tornado.ioloop
import maproxy.proxyserver
import socket
# HTTP->HTTP: On your computer, browse to "http://127.0.0.1:81/" and you'll get http://www.google.com
server = maproxy.proxyserver.ProxyServer("127.0.0.1", 26944)
server.listen(5555)
print("Local IP:", socket.gethostbyname(socket.geth... | 37.545455 | 101 | 0.738499 |
08efd0644d5fe0e3e727ffb870e4c439b093a7bc | 1,073 | py | Python | alipay/aop/api/response/AlipayCommerceIotAdvertiserDeviceConsultResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayCommerceIotAdvertiserDeviceConsultResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayCommerceIotAdvertiserDeviceConsultResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.DeviceRelationData import DeviceRelationData
class AlipayCommerceIotAdvertiserDeviceConsultResponse(AlipayResponse):
def __init__(self):
super(AlipayComm... | 32.515152 | 121 | 0.679404 |
08efd95d2d24b821eecbb6279ce35944b49c68a2 | 3,222 | py | Python | test/acceptance/common_steps/paas_environment_provisioning.py | FIWARE/cloud.PaaS | 3ddec91c2b0ef3baca1dd2e596373cf0d4d341e3 | [
"Apache-2.0"
] | null | null | null | test/acceptance/common_steps/paas_environment_provisioning.py | FIWARE/cloud.PaaS | 3ddec91c2b0ef3baca1dd2e596373cf0d4d341e3 | [
"Apache-2.0"
] | null | null | null | test/acceptance/common_steps/paas_environment_provisioning.py | FIWARE/cloud.PaaS | 3ddec91c2b0ef3baca1dd2e596373cf0d4d341e3 | [
"Apache-2.0"
] | 2 | 2016-08-22T16:03:25.000Z | 2018-03-05T23:28:55.000Z | # -*- coding: utf-8 -*-
# Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U
#
# This file is part of FI-WARE project.
#
# 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:
#
# h... | 38.819277 | 120 | 0.72843 |
08efe193c99f354f28b594d87af2b12fcc18e4c7 | 2,500 | py | Python | short/cli.py | timothycrosley/short | dcf25ec01b5406d9e0a35ac7dd8112239c0912a5 | [
"MIT"
] | null | null | null | short/cli.py | timothycrosley/short | dcf25ec01b5406d9e0a35ac7dd8112239c0912a5 | [
"MIT"
] | null | null | null | short/cli.py | timothycrosley/short | dcf25ec01b5406d9e0a35ac7dd8112239c0912a5 | [
"MIT"
] | null | null | null | import os
import sys
import hug
from short._version import current
from short.compile import text
INTRO = """
/##########################################################\
__ ; `.' :
| +. : ; : __
.-+\\ `: ; ,,-' : SHORT
`. `. `\\ ; :' ,'
,-+`+. `... | 33.783784 | 116 | 0.4492 |
08f02a82e1c6b5881b3dccf825c6f4216fbc0d41 | 329 | py | Python | pyargcbr/cbrs/lists_operations.py | jaumejordan/pyargcbr | 70892360a500e83215449d98ef06746adb1ab51a | [
"MIT"
] | 1 | 2021-06-24T17:15:16.000Z | 2021-06-24T17:15:16.000Z | pyargcbr/cbrs/lists_operations.py | jaumejordan/pyargcbr | 70892360a500e83215449d98ef06746adb1ab51a | [
"MIT"
] | null | null | null | pyargcbr/cbrs/lists_operations.py | jaumejordan/pyargcbr | 70892360a500e83215449d98ef06746adb1ab51a | [
"MIT"
] | null | null | null | from typing import Sequence, TypeVar, List
T = TypeVar('T')
def merge_lists_using_sets(list1: List[T], list2: Sequence[T]):
list1 += list(set(list2) - set(list1))
def merge_lists_by_looping(list1: List[T], list2: Sequence[T]):
for element in list2:
if element not in list1:
list1.append(... | 23.5 | 63 | 0.671733 |
08f08612bb12934ce83686994a83626771b41f37 | 1,422 | py | Python | bloodsword/domain/factories.py | uliang/BloodSword | fc7e173ce56989c48009ec86d834072f9f2e70ac | [
"BSD-2-Clause"
] | null | null | null | bloodsword/domain/factories.py | uliang/BloodSword | fc7e173ce56989c48009ec86d834072f9f2e70ac | [
"BSD-2-Clause"
] | null | null | null | bloodsword/domain/factories.py | uliang/BloodSword | fc7e173ce56989c48009ec86d834072f9f2e70ac | [
"BSD-2-Clause"
] | null | null | null | from dataclasses import dataclass, field
from abc import ABC, abstractmethod
from typing import Optional
from .aggregates import Character
@dataclass
class CharacterFactory(ABC):
"""
Subclass this abstract class to provide implementation for creating
behavior objects for each particular character type.
... | 27.882353 | 78 | 0.655415 |
08f097a71654e39f17b7298ec1ca6718f2e79386 | 86,877 | py | Python | modules/rna_manual_reference.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | 1 | 2018-06-18T09:46:10.000Z | 2018-06-18T09:46:10.000Z | modules/rna_manual_reference.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | modules/rna_manual_reference.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | # Do not edit this file. This file is auto genereated from rna_manual_reference_updater.py
import bpy
url_manual_prefix = "https://docs.blender.org/manual/en/dev/"
language = ""
if bpy.context.user_preferences.system.use_international_fonts:
language = bpy.context.user_preferences.system.language
if language... | 103.795699 | 186 | 0.791567 |
08f0af79e33a8330db4a7e27644abad90ce748b5 | 6,929 | py | Python | tests/frontend/test_logger.py | SubhashishQPIT/strawberryfields | dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9 | [
"Apache-2.0"
] | 646 | 2018-03-26T15:12:35.000Z | 2022-03-21T18:52:42.000Z | tests/frontend/test_logger.py | SubhashishQPIT/strawberryfields | dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9 | [
"Apache-2.0"
] | 666 | 2018-03-27T20:21:27.000Z | 2022-03-25T18:35:33.000Z | tests/frontend/test_logger.py | SubhashishQPIT/strawberryfields | dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9 | [
"Apache-2.0"
] | 182 | 2018-04-11T17:09:39.000Z | 2022-03-29T15:38:43.000Z | # Copyright 2010 Pallets
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redist... | 40.758824 | 92 | 0.738635 |
08f0d030fb6af1821f5d444a3e8aec4426338d4f | 2,299 | py | Python | mnist/part2-mnist/nnet_cnn.py | tritus/ml-courses | 687c5006863ead9bee07dc3d76245a173c21528e | [
"MIT"
] | null | null | null | mnist/part2-mnist/nnet_cnn.py | tritus/ml-courses | 687c5006863ead9bee07dc3d76245a173c21528e | [
"MIT"
] | null | null | null | mnist/part2-mnist/nnet_cnn.py | tritus/ml-courses | 687c5006863ead9bee07dc3d76245a173c21528e | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import _pickle as c_pickle, gzip
import numpy as np
from tqdm import tqdm
import torch
import torch.autograd as autograd
import torch.nn.functional as F
import torch.nn as nn
import sys
sys.path.append("..")
import utils
from utils import *
from train_utils import batchify_data, run_epoch, train... | 31.067568 | 111 | 0.650283 |
08f0fa3575fc7855bd1d0e6bc2ac7a4bc44c0f56 | 1,421 | py | Python | src/targeter.py | TamasSzepessy/DJITelloOpticalControl | 00b704afea1eb9e2bcb82fcde41baae83934c48e | [
"MIT"
] | 21 | 2020-01-08T04:40:48.000Z | 2022-03-28T21:16:35.000Z | src/targeter.py | TamasSzepessy/DJITelloOpticalControl | 00b704afea1eb9e2bcb82fcde41baae83934c48e | [
"MIT"
] | null | null | null | src/targeter.py | TamasSzepessy/DJITelloOpticalControl | 00b704afea1eb9e2bcb82fcde41baae83934c48e | [
"MIT"
] | 3 | 2021-01-17T19:11:51.000Z | 2021-10-30T03:26:05.000Z | import csv
import numpy as np
# distance from marker in camera Z coordinates
DIST = 0.9
class TargetDefine():
def __init__(self):
with open('marker_list/marker_conf.csv', 'rt', encoding='utf-8') as f:
reader = csv.reader(f, delimiter=';')
self.marker_nav = list(reader)
def cha... | 37.394737 | 78 | 0.475018 |
08f118ed9e95cda69f3f35710adbb4df72ac15fc | 18,825 | py | Python | tests/test_evo.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | 264 | 2018-01-30T10:06:09.000Z | 2022-03-28T01:39:40.000Z | tests/test_evo.py | adamcallison/quimb | a06fb9fc58976936bf7d631179ece0f832bf96a9 | [
"Apache-2.0"
] | 114 | 2017-10-24T22:37:15.000Z | 2022-03-31T18:58:55.000Z | tests/test_evo.py | adamcallison/quimb | a06fb9fc58976936bf7d631179ece0f832bf96a9 | [
"Apache-2.0"
] | 60 | 2017-10-24T22:28:43.000Z | 2022-02-28T13:54:20.000Z | from pytest import fixture, mark, raises
from math import pi, gcd, cos
from functools import reduce
import numpy as np
from numpy.testing import assert_allclose
import quimb as qu
from quimb.evo import (
schrodinger_eq_ket,
schrodinger_eq_dop,
schrodinger_eq_dop_vectorized,
lindblad_eq,
lindblad_... | 35.055866 | 79 | 0.561594 |
08f12a7a45cc4f5a3acea4f5d758d6aa8b2b29ad | 101,428 | py | Python | influxdb_client/service/dashboards_service.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/service/dashboards_service.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/service/dashboards_service.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F40... | 44.505485 | 166 | 0.640267 |
08f17d351d57b83f77772c983bfd865efeca774b | 935 | py | Python | data/sent140/preprocess/combine_data.py | weimingwill/FedProx | d2a4501f319f1594b732d88315c5ca1a72855f50 | [
"MIT"
] | 371 | 2019-01-26T01:15:53.000Z | 2022-03-29T17:41:41.000Z | data/sent140/preprocess/combine_data.py | weimingwill/FedProx | d2a4501f319f1594b732d88315c5ca1a72855f50 | [
"MIT"
] | 24 | 2019-04-19T12:22:05.000Z | 2022-02-09T23:29:38.000Z | data/sent140/preprocess/combine_data.py | weimingwill/FedProx | d2a4501f319f1594b732d88315c5ca1a72855f50 | [
"MIT"
] | 115 | 2019-07-02T04:11:14.000Z | 2022-03-19T16:57:00.000Z | '''
each row of created .csv file is of the form:
polarity, id, date, query, user, comment, test_or_training
'''
import csv
import os
parent_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
train_file_name = os.path.join(parent_path, 'data', 'raw_data', 'training.csv')
training = []
with open(tra... | 25.27027 | 81 | 0.669519 |
08f195de36fc2c8c90c421ac5ba167db725c56e9 | 17,072 | py | Python | models/criterions/SNAP.py | johnrachwan123/SNIP-it | a578a0693318f261492331298b6602de225fe21f | [
"MIT"
] | null | null | null | models/criterions/SNAP.py | johnrachwan123/SNIP-it | a578a0693318f261492331298b6602de225fe21f | [
"MIT"
] | null | null | null | models/criterions/SNAP.py | johnrachwan123/SNIP-it | a578a0693318f261492331298b6602de225fe21f | [
"MIT"
] | null | null | null | import copy
import os
import types
from collections import OrderedDict
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
from models.criterions.General import General
from models.networks.assisting_layers.GateDecoratorLayers import GatedBatchNorm
from utils.constants import SNIP_BAT... | 42.894472 | 122 | 0.523196 |
08f19ae68426955c43e38191c1caa82b69fafbe5 | 166 | py | Python | design_patterns/oop/alien_game/finished.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | design_patterns/oop/alien_game/finished.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | design_patterns/oop/alien_game/finished.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | from ObjectOriented.AlienGame import Scene
class Finished(Scene):
@staticmethod
def enter():
print("You won! Good job.")
return 'finished'
| 16.6 | 42 | 0.650602 |
08f19fe47dbf1f102e2924e4787a5c62996f8734 | 925 | py | Python | certificator/meetup/models.py | lamenezes/certificator | fdb3d6f31499da8705de5453b8f55c0d313761bd | [
"MIT"
] | 19 | 2017-09-26T14:03:33.000Z | 2021-09-11T18:18:53.000Z | certificator/meetup/models.py | lamenezes/certificator | fdb3d6f31499da8705de5453b8f55c0d313761bd | [
"MIT"
] | 12 | 2017-10-01T20:10:51.000Z | 2019-05-22T01:39:48.000Z | certificator/meetup/models.py | lamenezes/certificator | fdb3d6f31499da8705de5453b8f55c0d313761bd | [
"MIT"
] | 5 | 2017-10-24T22:14:26.000Z | 2021-09-11T18:18:55.000Z | from datetime import datetime as dt
from simple_model import Model
class Event(Model):
fields = (
'venue',
'group',
'duration',
'time',
'name',
)
MONTHS = (
'janeiro',
'fevereiro',
'março',
'abril',
'maio',
'junho',
... | 19.680851 | 61 | 0.513514 |
08f1abd9ff12d3e9638be7b4010f509b4e532af7 | 9,756 | py | Python | homeassistant/components/device_tracker/__init__.py | loghound/home-assistant | 48089b01ab38848b07517a4d3e847cc0f79cf435 | [
"MIT"
] | 1 | 2017-03-01T10:57:20.000Z | 2017-03-01T10:57:20.000Z | homeassistant/components/device_tracker/__init__.py | loghound/home-assistant | 48089b01ab38848b07517a4d3e847cc0f79cf435 | [
"MIT"
] | null | null | null | homeassistant/components/device_tracker/__init__.py | loghound/home-assistant | 48089b01ab38848b07517a4d3e847cc0f79cf435 | [
"MIT"
] | null | null | null | """
homeassistant.components.tracker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides functionality to keep track of devices.
"""
import logging
import threading
import os
import csv
from datetime import datetime, timedelta
import homeassistant as ha
from homeassistant.loader import get_component
import homeassistant.util a... | 32.41196 | 79 | 0.572981 |
08f1b120f75282a7a039b8defc4e726f66ceda55 | 2,888 | py | Python | test/manual_test/manual_test_text_item.py | loonghao/photoshop_python_api | f6796134845fb2b41d023b2085e678aeef822692 | [
"MIT"
] | 17 | 2019-03-01T12:09:37.000Z | 2020-04-09T14:14:59.000Z | test/manual_test/manual_test_text_item.py | loonghao/photoshop_python_api | f6796134845fb2b41d023b2085e678aeef822692 | [
"MIT"
] | 7 | 2019-04-28T15:20:27.000Z | 2020-04-07T19:14:47.000Z | test/manual_test/manual_test_text_item.py | loonghao/photoshop_python_api | f6796134845fb2b41d023b2085e678aeef822692 | [
"MIT"
] | 3 | 2020-02-28T14:27:11.000Z | 2020-04-01T16:12:40.000Z | """"""
# Import third-party modules
import pytest
# Import local modules
from photoshop import Session
from photoshop.api.enumerations import TextType
class TestTextItem:
"""Test the solidColor."""
# pylint: disable=attribute-defined-outside-init
@pytest.fixture(autouse=True)
def setup(self, psd_fil... | 29.469388 | 94 | 0.684903 |
08f1b19893a47e1171617ab1620b6492aa47e1c1 | 34,758 | py | Python | pili/ctrl/views.py | pilosus/pili | 8eb51e79420b7a2e4148f3b819e787cf6711e8cd | [
"MIT"
] | 2 | 2019-12-22T13:05:08.000Z | 2020-02-02T13:05:31.000Z | pili/ctrl/views.py | pilosus/pili | 8eb51e79420b7a2e4148f3b819e787cf6711e8cd | [
"MIT"
] | 71 | 2016-10-31T15:41:10.000Z | 2022-03-21T14:26:22.000Z | pili/ctrl/views.py | pilosus/pili | 8eb51e79420b7a2e4148f3b819e787cf6711e8cd | [
"MIT"
] | null | null | null | import os
from datetime import datetime
from flask import (
abort,
current_app,
flash,
jsonify,
redirect,
render_template,
request,
send_from_directory,
url_for,
)
from flask_login import current_user, login_required
from flask_sqlalchemy import get_debug_queries
from werkzeug.utils... | 32.333023 | 88 | 0.601185 |
08f1e2de06730fabab8402ed28fb9907b23ed92d | 126 | py | Python | bflib/items/survival/base.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/items/survival/base.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/items/survival/base.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from bflib.items import listing
from bflib.items.base import Item
@listing.register_type
class SurvivalItem(Item):
pass
| 15.75 | 33 | 0.793651 |
08f1e762f729952dedd3816fc865d4deca3e2eb0 | 1,156 | py | Python | ramm_tox/kegg2pubchem.py | sorgerlab/ramm_tox | 8c8ff7d3e22382272af8f1d06db9c40826b8fe5a | [
"MIT"
] | null | null | null | ramm_tox/kegg2pubchem.py | sorgerlab/ramm_tox | 8c8ff7d3e22382272af8f1d06db9c40826b8fe5a | [
"MIT"
] | null | null | null | ramm_tox/kegg2pubchem.py | sorgerlab/ramm_tox | 8c8ff7d3e22382272af8f1d06db9c40826b8fe5a | [
"MIT"
] | null | null | null | """Get PubChem CID from KEGG compound/drug accession."""
import sys
import csv
import bs4
import requests
import re
reader = csv.DictReader(open(sys.argv[1]))
writer = csv.DictWriter(sys.stdout, reader.fieldnames)
re_pubchem = re.compile(r'^PubChem:')
kegg_url = 'http://www.kegg.jp/dbget-bin/www_bget?{}'
pubchem_url... | 33.028571 | 82 | 0.613322 |
08f1f4d0be699165f6e948babaf76f53f47ddb40 | 100 | py | Python | apps/workspaces/apps.py | fylein/fyle-integrations-platform-connector | 72f5d364deca8d98516e8486ec0ab377a8ceaccc | [
"MIT"
] | null | null | null | apps/workspaces/apps.py | fylein/fyle-integrations-platform-connector | 72f5d364deca8d98516e8486ec0ab377a8ceaccc | [
"MIT"
] | 1 | 2021-12-08T13:51:14.000Z | 2021-12-08T13:51:14.000Z | apps/workspaces/apps.py | fylein/fyle-integrations-platform-connector | 72f5d364deca8d98516e8486ec0ab377a8ceaccc | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class WorkspacesConfig(AppConfig):
name = 'apps.workspaces'
| 16.666667 | 34 | 0.77 |
08f23b6755e2325aefca6f6d3eb0e75b3f9097c5 | 1,136 | py | Python | scripts/postw90_in_writer.py | Compiler-max/MEPinterp | e1b8ba0ec4a4c61d61f6555608fb26aeaaf64d71 | [
"MIT"
] | 2 | 2019-05-07T04:53:45.000Z | 2019-08-16T20:52:07.000Z | scripts/postw90_in_writer.py | cMax347/MEPinterp | e1b8ba0ec4a4c61d61f6555608fb26aeaaf64d71 | [
"MIT"
] | null | null | null | scripts/postw90_in_writer.py | cMax347/MEPinterp | e1b8ba0ec4a4c61d61f6555608fb26aeaaf64d71 | [
"MIT"
] | null | null | null | import datetime
class postw90_job:
def __init__(self, w90_dir, seedname, val_bands, mp_grid, hw=0.0,eFermi=0.0, Tkelvin=0.0,eta_smearing=0.0 ):
self.w90_dir = w90_dir
self.seedname = seedname
self.val_bands = val_bands
self.mp_grid = mp_grid
self.hw = hw
self.eFermi = eFermi
self.Tkelvin = Tkelvin... | 23.183673 | 135 | 0.650528 |
08f2937ad9af0e74049c3c664b39af63be92c7d9 | 27,731 | py | Python | stonesoup/platform/tests/test_platform_simple.py | SohSalari/Stone-Soup | e073d4145df18facad43e4ab7b0a34e8d65f67ee | [
"MIT"
] | 1 | 2020-07-21T15:20:20.000Z | 2020-07-21T15:20:20.000Z | stonesoup/platform/tests/test_platform_simple.py | SohSalari/Stone-Soup | e073d4145df18facad43e4ab7b0a34e8d65f67ee | [
"MIT"
] | null | null | null | stonesoup/platform/tests/test_platform_simple.py | SohSalari/Stone-Soup | e073d4145df18facad43e4ab7b0a34e8d65f67ee | [
"MIT"
] | null | null | null | # coding: utf-8
import datetime
import numpy as np
import pytest
from ..tests import test_platform_base
from ...types.state import State
from ..base import MovingPlatform, FixedPlatform
from ...models.transition.linear import (
ConstantVelocity, CombinedLinearGaussianTransitionModel)
from ...sensor.radar.radar im... | 41.638138 | 98 | 0.511846 |
08f29829ac970d9374923fdd54465cb59d3a577e | 743 | py | Python | master/split-ne-master/split-ne-master/bin/cnec-remove-internal-structures.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/split-ne-master/split-ne-master/bin/cnec-remove-internal-structures.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/split-ne-master/split-ne-master/bin/cnec-remove-internal-structures.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | #!/usr/bin/python -tt
## Script to remove marking of named entities that are inside other named entity
## input: STDIN
from sys import stdin
for line in stdin:
new_string = ""
last_special = ">"
inside = 0
tag = False
for ch in line:
if tag and ch in [" ", "<"]:
tag = False
if not tag:
... | 20.638889 | 80 | 0.497981 |
08f29a1ae3fc2879c471acb9c39ed87616d858fa | 8,451 | py | Python | contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2017, OpenCensus Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | 30.730909 | 74 | 0.660514 |
08f29b2f14bdea8c1e4288c0514d4ab6d3e02663 | 10,478 | py | Python | logcausality/logparser.py | cpflat/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 20 | 2016-11-22T03:21:20.000Z | 2021-06-16T02:44:58.000Z | logcausality/logparser.py | arita37/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 1 | 2019-10-23T05:45:34.000Z | 2019-11-01T04:56:01.000Z | logcausality/logparser.py | arita37/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 8 | 2015-11-13T03:33:04.000Z | 2021-09-10T09:29:23.000Z | #!/usr/bin/env python
# coding: utf-8
# Preprocessing for structuralizing log messages
import sys
import os
import re
import datetime
import ipaddress
import common
import config
DEFAULT_SYMDEF = "/".join((os.path.dirname(__file__), "symdef.txt.sample"))
class LogParser():
re_time = re.compile(r"^\d{2}:\d{2}... | 38.664207 | 1,097 | 0.497137 |
08f2a81ab60e6dd464e585e2a0ae6ee47d5ee4ca | 992 | py | Python | augly/video/augmenters/ffmpeg/noise.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/video/augmenters/ffmpeg/noise.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/video/augmenters/ffmpeg/noise.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
from typing import Tuple, Dict
from augly.video.augmenters.ffmpeg.base_augmenter import BaseFFMPEGAugmenter
from ffmpeg.nodes import FilterableStream
class VideoAugmenterByNoise(BaseFFMPEGAugmenter):
def __init__(self, level: int):
... | 31 | 79 | 0.627016 |
08f31d0d761b337a949b3d1002f87408b7851f35 | 3,693 | py | Python | benchmark/imagenet/gpipemodels/resnet/resnet.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | 9 | 2020-10-21T11:40:51.000Z | 2021-09-25T07:50:22.000Z | benchmark/imagenet/gpipemodels/resnet/resnet.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | benchmark/imagenet/gpipemodels/resnet/resnet.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | """A ResNet implementation but using :class:`nn.Sequential`. :func:`resnet101`
returns a :class:`nn.Sequential` instead of ``ResNet``.
This code is transformed :mod:`torchvision.models.resnet`.
"""
from collections import OrderedDict
from typing import Any, List
from torch import nn
from .block import bottleneck, b... | 34.194444 | 97 | 0.635527 |
08f39e589fe536f531c47d78805ba29aa996a279 | 558 | py | Python | setup.py | mikolajb/cookery | 00d88685dc9931210c6274969e82c88753f3c3b0 | [
"MIT"
] | 1 | 2016-01-07T19:56:54.000Z | 2016-01-07T19:56:54.000Z | setup.py | mikolajb/cookery | 00d88685dc9931210c6274969e82c88753f3c3b0 | [
"MIT"
] | 7 | 2015-02-10T02:54:45.000Z | 2015-03-09T16:14:05.000Z | setup.py | mikolajb/cookery | 00d88685dc9931210c6274969e82c88753f3c3b0 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name="cookery",
version="0.1",
author="Mikołaj Baranowski",
author_email="mikolajb@gmail.com",
url="http://github.com/mikolajb/cookery",
license='MIT License',
scripts=['scripts/cookery'],
packages=["cookery"],
py_modules=["cookerykerne... | 25.363636 | 47 | 0.528674 |
08f3a3eaa1dd88048069bde21fae58abc5b4ba4c | 2,241 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/eula.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | 1 | 2021-06-06T23:49:17.000Z | 2021-06-06T23:49:17.000Z | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/eula.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/eula.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import click
from ...testing import process_checks_option
from ...utils import complete_valid_checks, get_eula_from_manifest
from ..console import CONTEXT_SETTINGS, abort, echo_failure, echo_info, echo_su... | 37.35 | 117 | 0.654618 |
08f3ac7b0db4d9868ebf56de2c4d89995b0702c4 | 17,761 | py | Python | venv/Lib/site-packages/tests/test_155_FetchAssocSelect_05.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_155_FetchAssocSelect_05.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_155_FetchAssocSelect_05.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_155_FetchAssocSelect_05(self):
obj = IbmDbTestFunctions()
obj.assert_expect(self... | 95.489247 | 418 | 0.581161 |
08f3b3354624a6439c4a68a59f5315bf7373ff85 | 2,535 | py | Python | rlberry/envs/bandits/corrupted_bandits.py | kim0n0/rlberry | 6f0a68a0ea5ba7cd10c4787fbbdf1ed296d4810c | [
"MIT"
] | null | null | null | rlberry/envs/bandits/corrupted_bandits.py | kim0n0/rlberry | 6f0a68a0ea5ba7cd10c4787fbbdf1ed296d4810c | [
"MIT"
] | null | null | null | rlberry/envs/bandits/corrupted_bandits.py | kim0n0/rlberry | 6f0a68a0ea5ba7cd10c4787fbbdf1ed296d4810c | [
"MIT"
] | null | null | null | import numpy as np
from scipy import stats
from rlberry.envs.bandits import Bandit
class CorruptedLaws:
"""
Class for corrupted laws.
Parameters
----------
law: law
Can either be a frozen scipy law or any class that
has a method .rvs() to sample according to the given law.
... | 27.258065 | 83 | 0.593294 |
08f3b7e5a629ec5f237f1f8de25156862e8f637c | 6,117 | py | Python | models/object_detection/tensorflow/ssd-resnet34/inference/fp32/coco_metric.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | 1 | 2019-05-23T01:07:23.000Z | 2019-05-23T01:07:23.000Z | models/object_detection/tensorflow/ssd-resnet34/inference/fp32/coco_metric.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | null | null | null | models/object_detection/tensorflow/ssd-resnet34/inference/fp32/coco_metric.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google. 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 agree... | 31.530928 | 80 | 0.69642 |
08f3de324738121f3cdd3bb402abb4e86f5dd7e9 | 46,412 | py | Python | digits/model/images/generic/test_views.py | gheinrich/DIGITS-GAN | 63d388095b4f2a2aa6f3b0f6988e01b2c78c3877 | [
"BSD-3-Clause"
] | 111 | 2017-04-21T06:03:04.000Z | 2021-04-26T06:36:54.000Z | digits/model/images/generic/test_views.py | gheinrich/DIGITS-GAN | 63d388095b4f2a2aa6f3b0f6988e01b2c78c3877 | [
"BSD-3-Clause"
] | 6 | 2017-05-15T22:02:49.000Z | 2018-03-16T10:25:26.000Z | digits/model/images/generic/test_views.py | gheinrich/DIGITS-GAN | 63d388095b4f2a2aa6f3b0f6988e01b2c78c3877 | [
"BSD-3-Clause"
] | 40 | 2017-04-21T07:04:16.000Z | 2019-11-14T14:20:32.000Z | # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
from __future__ import absolute_import
import itertools
import json
import numpy as np
import os
import PIL.Image
import tempfile
import time
import unittest
# Find the best implementation available
try:
from cStringIO import StringIO
except Imp... | 34.051357 | 120 | 0.629837 |
08f40ede641c1ef6069cab99c4cddc72a27de650 | 14,317 | py | Python | tests/integration_tests/test_rules.py | manuel-sommer/DrHeader | c2098d592578b046e77df44445651b66394e0d49 | [
"MIT"
] | null | null | null | tests/integration_tests/test_rules.py | manuel-sommer/DrHeader | c2098d592578b046e77df44445651b66394e0d49 | [
"MIT"
] | null | null | null | tests/integration_tests/test_rules.py | manuel-sommer/DrHeader | c2098d592578b046e77df44445651b66394e0d49 | [
"MIT"
] | null | null | null | import unittest2
from tests.integration_tests import utils
class TestDefaultRules(unittest2.TestCase):
def tearDown(self):
utils.reset_default_rules()
def test__should_validate_all_rules_for_valid_headers(self):
headers = utils.get_headers()
report = utils.process_test(headers=head... | 42.610119 | 120 | 0.628553 |
08f45b3da6c3774299ae4a71dce59a298e008f08 | 1,144 | py | Python | toontown/ai/DistributedWinterCarolingTargetAI.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/ai/DistributedWinterCarolingTargetAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/ai/DistributedWinterCarolingTargetAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from direct.fsm.FSM import FSM
class DistributedWinterCarolingTargetAI(DistributedObjectAI, FSM):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedWinterCarolingTargetAI")
... | 35.75 | 93 | 0.672203 |
08f4b0bd523b3d53364c1bacf3a8ef3f7ce93fda | 8,198 | py | Python | plugins/aea-cli-benchmark/aea_cli_benchmark/case_tx_generate/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | plugins/aea-cli-benchmark/aea_cli_benchmark/case_tx_generate/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | plugins/aea-cli-benchmark/aea_cli_benchmark/case_tx_generate/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance... | 35.184549 | 91 | 0.664674 |
08f4c48523a0c60182da8270b01babba6c1821eb | 1,065 | py | Python | alipay/aop/api/response/AlipayPcreditHuabeiMerchantActivityModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayPcreditHuabeiMerchantActivityModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayPcreditHuabeiMerchantActivityModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayPcreditHuabeiMerchantActivityModifyResponse(AlipayResponse):
def __init__(self):
super(AlipayPcreditHuabeiMerchantActivityModifyResponse, self).__init__()
self.... | 29.583333 | 122 | 0.707981 |
08f4c7dd93f022a1ed9c5a6db614f2c79c90d362 | 985 | py | Python | astwro/sex/tests/test_sex_sacamp.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 6 | 2017-06-15T20:34:51.000Z | 2020-04-15T14:21:43.000Z | astwro/sex/tests/test_sex_sacamp.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 18 | 2017-08-15T20:53:55.000Z | 2020-10-05T23:40:34.000Z | astwro/sex/tests/test_sex_sacamp.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 2 | 2017-11-06T15:33:53.000Z | 2020-10-02T21:06:05.000Z | # coding=utf-8
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import unittest
from astwro.sex import Sextractor
from astwro.sex import Scamp
from astwro.sampledata import fits_image
# TODO: switch to pytest
class TestRunners(unittest.TestCase):
def test_sextractor_run(sel... | 25.25641 | 64 | 0.696447 |
08f4ca05cea716eae78e2ddcccbf2a7cbd279073 | 2,812 | py | Python | setup.py | jameschristopher/pyfolio | 774174ecdfe4011845ae1ca40ca162c26cb70233 | [
"Apache-2.0"
] | 1 | 2021-08-31T09:18:57.000Z | 2021-08-31T09:18:57.000Z | setup.py | vikram-narayan/pyfolio | 774174ecdfe4011845ae1ca40ca162c26cb70233 | [
"Apache-2.0"
] | null | null | null | setup.py | vikram-narayan/pyfolio | 774174ecdfe4011845ae1ca40ca162c26cb70233 | [
"Apache-2.0"
] | 1 | 2016-11-14T04:53:02.000Z | 2016-11-14T04:53:02.000Z | #!/usr/bin/env python
import sys
from setuptools import setup
import versioneer
DISTNAME = 'pyfolio'
DESCRIPTION = "pyfolio is a Python library for performance and risk analysis of financial portfolios"
LONG_DESCRIPTION = """pyfolio is a Python library for performance and risk analysis of
financial portfolios develo... | 32.321839 | 101 | 0.647226 |
08f4cb452ac88dc28be396cbe25d3b5aad9585f9 | 4,621 | py | Python | gibson2/robots/fetch_robot.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 3 | 2021-02-07T14:00:38.000Z | 2021-07-03T19:40:59.000Z | gibson2/robots/fetch_robot.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | gibson2/robots/fetch_robot.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 2 | 2021-04-01T12:14:59.000Z | 2021-06-18T13:04:39.000Z | import gym
import numpy as np
import pybullet as p
from gibson2.external.pybullet_tools.utils import joints_from_names, set_joint_positions
from gibson2.robots.robot_locomotor import LocomotorRobot
class Fetch(LocomotorRobot):
"""
Fetch Robot
Reference: https://fetchrobotics.com/robotics-platforms/fetch-... | 39.836207 | 95 | 0.529323 |
08f4cd45b49d433f0811a610ab4c0a20d98af256 | 1,578 | py | Python | zerver/management/commands/bankrupt_users.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2021-02-13T20:43:29.000Z | 2021-02-13T20:43:29.000Z | zerver/management/commands/bankrupt_users.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 9 | 2021-02-08T20:22:39.000Z | 2022-02-11T03:40:19.000Z | zerver/management/commands/bankrupt_users.py | tobby2002/zulip | 66e7c455759f9368bae16b9a604cf63f8e3524cd | [
"Apache-2.0"
] | 1 | 2021-06-10T15:12:52.000Z | 2021-06-10T15:12:52.000Z | from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from argparse import ArgumentParser
from django.core.management.base import BaseCommand
from zerver.lib.actions import do_update_message_flags
from zerver.models import UserProfile, Message, get_user_profile_by_email
... | 38.487805 | 88 | 0.618504 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.