hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
559ad11e61e76b073ffa707dfeef7cd524cd64ce | 4,923 | py | Python | delpapa/avalanches/data_analysis.py | delpapa/CritSORN | cdad55d55f39e04f568ca1bc0c6036bec8db08fb | [
"MIT"
] | null | null | null | delpapa/avalanches/data_analysis.py | delpapa/CritSORN | cdad55d55f39e04f568ca1bc0c6036bec8db08fb | [
"MIT"
] | null | null | null | delpapa/avalanches/data_analysis.py | delpapa/CritSORN | cdad55d55f39e04f568ca1bc0c6036bec8db08fb | [
"MIT"
] | null | null | null | ########################################################################
# This script contains all the data analysis functions #
########################################################################
from __future__ import division
from pylab import *
import scipy, scipy.stats
import tables
import ... | 33.489796 | 78 | 0.558399 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,123 | 0.228113 |
559adf86675fc57065409a6e9ac6154669c807e5 | 3,404 | py | Python | edwin/__init__.py | AlanSwenson/edwin | 94f62a4db6cc5123224607f92a1f552be072c708 | [
"MIT"
] | null | null | null | edwin/__init__.py | AlanSwenson/edwin | 94f62a4db6cc5123224607f92a1f552be072c708 | [
"MIT"
] | 8 | 2019-03-13T13:39:00.000Z | 2019-04-02T14:58:21.000Z | edwin/__init__.py | AlanSwenson/edwin | 94f62a4db6cc5123224607f92a1f552be072c708 | [
"MIT"
] | null | null | null | import eventlet
eventlet.monkey_patch()
import time
from datetime import datetime, timedelta, timezone
import pytz
from email.utils import parsedate_tz
import json
from flask import Flask, request, render_template
from threading import Thread
from tweepy import OAuthHandler, API, Stream, Cursor
from flask_socketio i... | 30.392857 | 84 | 0.574031 | 0 | 0 | 0 | 0 | 418 | 0.122797 | 0 | 0 | 565 | 0.165981 |
559ae7307b62942efd1983a817dbb736879880c0 | 2,255 | py | Python | troop/admin.py | packmas13/registration | bfb42c5479d59494b59e7c656cb04826e110e8d2 | [
"MIT"
] | 1 | 2020-08-12T09:51:42.000Z | 2020-08-12T09:51:42.000Z | troop/admin.py | packmas13/registration | bfb42c5479d59494b59e7c656cb04826e110e8d2 | [
"MIT"
] | 46 | 2020-01-24T16:51:41.000Z | 2022-03-29T16:03:12.000Z | troop/admin.py | packmas13/registration | bfb42c5479d59494b59e7c656cb04826e110e8d2 | [
"MIT"
] | 1 | 2020-01-28T21:25:06.000Z | 2020-01-28T21:25:06.000Z | from django import forms
from django.contrib import admin
from .models import Attendance, Diet, Participant, Troop
from payment.admin import DiscountInline, PaymentInline
class AttendanceInline(admin.TabularInline):
model = Participant.attendance.through
readonly_fields = ("participant",)
can_delete = F... | 21.47619 | 75 | 0.632373 | 1,883 | 0.835033 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.103326 |
559af5721a6a15c927e5d10a7e185b857bbef70d | 142 | py | Python | {{cookiecutter.project_name}}/service/worker/beat.py | ProjectTemplates/python-backend-service | 5266916e54faaf236bc972a2cd7bb1217e8a8625 | [
"MIT"
] | 7 | 2020-07-28T18:45:20.000Z | 2021-12-11T23:33:49.000Z | {{cookiecutter.project_name}}/service/worker/beat.py | ProjectTemplates/python-fastapi-backend | 5266916e54faaf236bc972a2cd7bb1217e8a8625 | [
"MIT"
] | null | null | null | {{cookiecutter.project_name}}/service/worker/beat.py | ProjectTemplates/python-fastapi-backend | 5266916e54faaf236bc972a2cd7bb1217e8a8625 | [
"MIT"
] | 1 | 2020-05-10T20:26:02.000Z | 2020-05-10T20:26:02.000Z | from conf import celery_settings
from .app import app
@app.on_after_configure.connect
def setup_periodic_tasks(sender, **kwargs):
pass
| 15.777778 | 43 | 0.788732 | 0 | 0 | 0 | 0 | 84 | 0.591549 | 0 | 0 | 0 | 0 |
559b8b906411edd79ce8b01d4b0d9cdea4c7292c | 829 | py | Python | demo_snippets/11_Datenvisualisierung/main.py | fabod/pro2 | 69b1015fa789ef05bf9b514d94b231f76bdf5e29 | [
"MIT"
] | 2 | 2020-03-03T14:57:40.000Z | 2020-03-20T10:59:47.000Z | demo_snippets/11_Datenvisualisierung/main.py | fabod/pro2 | 69b1015fa789ef05bf9b514d94b231f76bdf5e29 | [
"MIT"
] | null | null | null | demo_snippets/11_Datenvisualisierung/main.py | fabod/pro2 | 69b1015fa789ef05bf9b514d94b231f76bdf5e29 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
import plotly.express as px
from plotly.offline import plot
app = Flask("Datenvisualisierung")
def data():
data = px.data.gapminder()
data_ch = data[data.country == 'Switzerland']
return data_ch
def viz():
data_ch = data()
fig = px.ba... | 18.422222 | 53 | 0.587455 | 0 | 0 | 0 | 0 | 141 | 0.170084 | 0 | 0 | 187 | 0.225573 |
559bff5f8a9189b7032f820f194b11e430ff84ea | 24,336 | py | Python | sdk/python/pulumi_digitalocean/database_connection_pool.py | mikealgj/pulumi-digitalocean | 77c109ab364eb69b7668b007c29413f5d2c95209 | [
"ECL-2.0",
"Apache-2.0"
] | 53 | 2019-04-25T14:43:12.000Z | 2022-03-14T15:51:44.000Z | sdk/python/pulumi_digitalocean/database_connection_pool.py | mikealgj/pulumi-digitalocean | 77c109ab364eb69b7668b007c29413f5d2c95209 | [
"ECL-2.0",
"Apache-2.0"
] | 158 | 2019-04-15T21:47:18.000Z | 2022-03-29T21:21:57.000Z | sdk/python/pulumi_digitalocean/database_connection_pool.py | mikealgj/pulumi-digitalocean | 77c109ab364eb69b7668b007c29413f5d2c95209 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2019-04-15T20:16:11.000Z | 2021-05-28T19:08:32.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 39.764706 | 166 | 0.623973 | 23,890 | 0.981673 | 0 | 0 | 20,883 | 0.858111 | 0 | 0 | 11,248 | 0.462196 |
559c155e6e0b7efb591c20bbc5e5237149bd61eb | 2,940 | py | Python | data_analysis/get_model_statistics.py | fluTN/influenza | 40cbede52bc4e95d52369eebe4a50ad4b71369d1 | [
"MIT"
] | 1 | 2020-10-29T09:56:31.000Z | 2020-10-29T09:56:31.000Z | data_analysis/get_model_statistics.py | fluTN/influenza | 40cbede52bc4e95d52369eebe4a50ad4b71369d1 | [
"MIT"
] | null | null | null | data_analysis/get_model_statistics.py | fluTN/influenza | 40cbede52bc4e95d52369eebe4a50ad4b71369d1 | [
"MIT"
] | 1 | 2022-01-22T11:34:29.000Z | 2022-01-22T11:34:29.000Z | # -*- coding: utf-8 -*-
"""Script which can be used to compare the features obtained of two different influenza models
Usage:
get_model_statistics.py <model> [--country=<country_name>] [--no-future] [--basedir=<directory>] [--start-year=<start_year>] [--end-year=<end_year>] [--save] [--no-graph]
<baseline> ... | 33.409091 | 172 | 0.644558 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,157 | 0.393537 |
559f3ab5a294666e58af2d7a21dc2e34d7f16b41 | 21,887 | py | Python | sisu/summarizer.py | balouf/sisu | 07541e6a02e545372452b33f7df056331397001f | [
"BSD-3-Clause"
] | null | null | null | sisu/summarizer.py | balouf/sisu | 07541e6a02e545372452b33f7df056331397001f | [
"BSD-3-Clause"
] | null | null | null | sisu/summarizer.py | balouf/sisu | 07541e6a02e545372452b33f7df056331397001f | [
"BSD-3-Clause"
] | null | null | null | from scipy.sparse import vstack
from sklearn.metrics.pairwise import cosine_similarity
import numpy as np
from sisu.preprocessing.tokenizer import is_relevant_sentence, make_sentences, sanitize_text
from gismo.gismo import Gismo, covering_order
from gismo.common import auto_k
from gismo.parameters import Parameters
fr... | 46.077895 | 161 | 0.646 | 14,742 | 0.673551 | 0 | 0 | 0 | 0 | 0 | 0 | 15,225 | 0.695618 |
559fa91e2cb3fcb7a60d3f0698d9ba9ef4cfe606 | 4,482 | py | Python | automr/bridge.py | hebrewsnabla/pyAutoMR | 8e81ed7fd780abd94f8b51e48ee4b980a868c204 | [
"Apache-2.0"
] | 5 | 2021-06-03T07:49:02.000Z | 2022-02-21T11:35:20.000Z | automr/bridge.py | hebrewsnabla/pyAutoMR | 8e81ed7fd780abd94f8b51e48ee4b980a868c204 | [
"Apache-2.0"
] | 2 | 2022-01-20T08:33:59.000Z | 2022-03-26T12:21:15.000Z | automr/bridge.py | hebrewsnabla/pyAutoMR | 8e81ed7fd780abd94f8b51e48ee4b980a868c204 | [
"Apache-2.0"
] | 1 | 2022-02-21T11:35:34.000Z | 2022-02-21T11:35:34.000Z | import numpy as np
import os
from automr import dump_mat
from functools import partial, reduce
print = partial(print, flush=True)
einsum = partial(np.einsum, optimize=True)
def print_mol(mol):
print(mol._basis)
print(mol.atom)
print(mol._atom)
print(mol.aoslice_by_atom())
print(mol.ao_labels())
#if... | 35.015625 | 86 | 0.51071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,611 | 0.359438 |
55a1b6b516c4d12eb63cdf47d747201063521f8c | 487 | py | Python | Example/playstore.py | goodop/api-imjustgood.com | 6406b531c4393fa8a4ace3c206d23895da915caf | [
"MIT"
] | 4 | 2021-01-01T10:20:13.000Z | 2021-11-08T09:32:54.000Z | Example/playstore.py | goodop/api-imjustgood.com | 6406b531c4393fa8a4ace3c206d23895da915caf | [
"MIT"
] | null | null | null | Example/playstore.py | goodop/api-imjustgood.com | 6406b531c4393fa8a4ace3c206d23895da915caf | [
"MIT"
] | 25 | 2021-01-09T18:22:32.000Z | 2021-05-29T07:42:06.000Z | from justgood import imjustgood
media = imjustgood("YOUR_APIKEY_HERE")
query = "gojek" # example query
data = media.playstore(query)
# Get attributes
number = 0
result = "Playstore :"
for a in data["result"]:
number += 1
result += "\n\n{}. {}".format(number, a["title"])
result += "\nDeveloper : {}".format... | 24.35 | 55 | 0.63655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 193 | 0.396304 |
55a448450ef16dcbbfd95d6484daa13257f8e1ca | 1,089 | py | Python | disjoint_set.py | Mt-Kunlun/Object-Saliency-Map-Atari | 759f7d9d2658626043f6b0e0dcaf8acd3c0e4655 | [
"MIT"
] | null | null | null | disjoint_set.py | Mt-Kunlun/Object-Saliency-Map-Atari | 759f7d9d2658626043f6b0e0dcaf8acd3c0e4655 | [
"MIT"
] | null | null | null | disjoint_set.py | Mt-Kunlun/Object-Saliency-Map-Atari | 759f7d9d2658626043f6b0e0dcaf8acd3c0e4655 | [
"MIT"
] | null | null | null | import numpy as np
# disjoint-set forests using union-by-rank and path compression (sort of).
class universe:
def __init__(self, n_elements):
self.num = n_elements
self.elts = np.empty(shape=(n_elements, 3), dtype=int)
for i in range(n_elements):
self.elts[i, 0] = 0 #... | 27.923077 | 75 | 0.459137 | 987 | 0.906336 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.109275 |
55a528f7f755e76f01a1fec6c18655befd899209 | 131 | py | Python | Logon.py | fenglihanxiao/multi_test | 46ee84aaa36f1d9594ccf7a14caa167dfcd719d5 | [
"MIT"
] | null | null | null | Logon.py | fenglihanxiao/multi_test | 46ee84aaa36f1d9594ccf7a14caa167dfcd719d5 | [
"MIT"
] | null | null | null | Logon.py | fenglihanxiao/multi_test | 46ee84aaa36f1d9594ccf7a14caa167dfcd719d5 | [
"MIT"
] | null | null | null | num1 = 1
num2 = 20
num3 = 168
# dev first commit
num1 = 1
# resolve conflict
num2 = 88888888
# Test next commit
num3 = 99
| 8.1875 | 18 | 0.641221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.412214 |
55a5624a3d2ac28eb83b211136e77b9c0d5431d3 | 1,441 | py | Python | latteys/latteys/doctype/auto_mail.py | hrgadesha/lattyeys | 428b752ac99620ac7ad706fd305f07210bdcb315 | [
"MIT"
] | 1 | 2021-09-10T03:51:22.000Z | 2021-09-10T03:51:22.000Z | latteys/latteys/doctype/auto_mail.py | hrgadesha/lattyeys | 428b752ac99620ac7ad706fd305f07210bdcb315 | [
"MIT"
] | null | null | null | latteys/latteys/doctype/auto_mail.py | hrgadesha/lattyeys | 428b752ac99620ac7ad706fd305f07210bdcb315 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import frappe
from datetime import datetime
from frappe.model.document import Document
@frappe.whitelist(allow_guest=True)
def sendMail(doc,method):
if doc.send_email_on_event_creation:
for d in doc.event_participants:
if d.reference_doctype == "Employee":
email = frap... | 65.5 | 277 | 0.687717 | 0 | 0 | 0 | 0 | 1,312 | 0.910479 | 0 | 0 | 564 | 0.391395 |
55a57c64b93ff64ee4143c416e8510e88ce162fa | 8,022 | py | Python | foulacces.py | Danukeru/FOULACCES | 54304c7a91326f9517c45f6981c4ab8de4eb3964 | [
"BSD-3-Clause"
] | 1 | 2019-10-21T23:43:21.000Z | 2019-10-21T23:43:21.000Z | foulacces.py | Danukeru/FOULACCES | 54304c7a91326f9517c45f6981c4ab8de4eb3964 | [
"BSD-3-Clause"
] | null | null | null | foulacces.py | Danukeru/FOULACCES | 54304c7a91326f9517c45f6981c4ab8de4eb3964 | [
"BSD-3-Clause"
] | 1 | 2019-10-21T23:43:29.000Z | 2019-10-21T23:43:29.000Z | #!/usr/bin/env python
import os
import sys
import hashlib
import httplib
import base64
import socket
from xml.dom.minidom import *
RAC_CODE = { 'x' : 'Unknown error',
'0x0' : 'Success',
'0x4' : 'Number of arguments does not match',
'0xc' : 'Syntax... | 40.11 | 87 | 0.446771 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,028 | 0.502119 |
55a63e41c61dfc7f2803753c38bd275ef075fcb4 | 10,272 | py | Python | codes/3_derive_elementary_effects.py | aviolinist/EEE | 032e2029815229875048cc92dd7da24ff3f71e93 | [
"MIT"
] | 6 | 2019-09-27T15:38:37.000Z | 2021-02-03T13:58:01.000Z | codes/3_derive_elementary_effects.py | aviolinist/EEE | 032e2029815229875048cc92dd7da24ff3f71e93 | [
"MIT"
] | null | null | null | codes/3_derive_elementary_effects.py | aviolinist/EEE | 032e2029815229875048cc92dd7da24ff3f71e93 | [
"MIT"
] | 5 | 2019-09-27T15:38:52.000Z | 2022-03-22T17:24:37.000Z | #!/usr/bin/env python
from __future__ import print_function
# Copyright 2019 Juliane Mai - juliane.mai(at)uwaterloo.ca
#
# License
# This file is part of the EEE code library for "Computationally inexpensive identification
# of noninformative model parameters by sequential screening: Efficient Elementary Effects (EEE)... | 43.897436 | 405 | 0.633178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,612 | 0.54634 |
55a64a7a3b06450aa004faf6e58c77885b9ba532 | 1,377 | py | Python | leetcode/medium/113-Path_sum_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/113-Path_sum_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/113-Path_sum_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #113
"""
from typing import List
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def pathSum(self, root: TreeNode, sum: int) -> List[List[int]]:
if not root:
re... | 19.394366 | 67 | 0.511256 | 764 | 0.554829 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.122731 |
55a6a32920fa2fc82181f6e01d6935314fa6f974 | 137 | py | Python | transiter_ny_mta/transiter_ny_mta/__init__.py | Pizza-Ratz/transiter-ny | 40091d3ff0c1b9e046b0d3ca708acb81df5019c6 | [
"MIT"
] | 1 | 2021-01-25T16:02:14.000Z | 2021-01-25T16:02:14.000Z | transiter_ny_mta/transiter_ny_mta/__init__.py | Pizza-Ratz/transiter-ny | 40091d3ff0c1b9e046b0d3ca708acb81df5019c6 | [
"MIT"
] | null | null | null | transiter_ny_mta/transiter_ny_mta/__init__.py | Pizza-Ratz/transiter-ny | 40091d3ff0c1b9e046b0d3ca708acb81df5019c6 | [
"MIT"
] | 1 | 2021-07-02T14:34:04.000Z | 2021-07-02T14:34:04.000Z | from .alertsparser import AlertsParser
from .subwaytripsparser import SubwayTripsParser
from .stationscsvparser import StationsCsvParser
| 34.25 | 48 | 0.890511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
55a76346989d9cefd61701c39bcea10af1d5f5b9 | 4,254 | py | Python | main.py | MrValdez/ggj-2018 | d8806a47f561f54afd915d7b5e03181fbd2dbcfa | [
"MIT"
] | null | null | null | main.py | MrValdez/ggj-2018 | d8806a47f561f54afd915d7b5e03181fbd2dbcfa | [
"MIT"
] | null | null | null | main.py | MrValdez/ggj-2018 | d8806a47f561f54afd915d7b5e03181fbd2dbcfa | [
"MIT"
] | 1 | 2018-02-25T15:04:43.000Z | 2018-02-25T15:04:43.000Z | import os
import pygame
from input import Input
from stages.stage import Stage
from stages.stage_example import StageExample
from stages.stage1 import Stage1
from stages.stage2 import Stage2
from stages.stage3 import Stage3
from stages.stage4 import Stage4
from stages.stage5 import Stage5
from stages.stage6 import St... | 32.723077 | 77 | 0.704278 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 737 | 0.173249 |
55a8a143755092a98ad8640901e8dbdb8d58845f | 9,439 | py | Python | install/app_store/tk-framework-desktopserver/v1.3.1/python/tk_framework_desktopserver/command.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | null | null | null | install/app_store/tk-framework-desktopserver/v1.3.1/python/tk_framework_desktopserver/command.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | null | null | null | install/app_store/tk-framework-desktopserver/v1.3.1/python/tk_framework_desktopserver/command.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | 1 | 2020-02-15T10:42:56.000Z | 2020-02-15T10:42:56.000Z | # Copyright (c) 2013 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the S... | 36.727626 | 123 | 0.604831 | 8,799 | 0.932196 | 0 | 0 | 8,070 | 0.854963 | 0 | 0 | 4,893 | 0.518381 |
55acdcacf4ba82a80f3cb7a16e721e05d9bb07b7 | 127 | py | Python | knock-knock4/knockpy/__init__.py | abhinashjain/proxyfuzzer | 9c372390afe4cd3d277bcaaeb289e4c8ef398e5e | [
"BSD-3-Clause"
] | 1 | 2017-03-14T21:16:43.000Z | 2017-03-14T21:16:43.000Z | knock-knock4/knockpy/__init__.py | abhinashjain/proxyfuzzer | 9c372390afe4cd3d277bcaaeb289e4c8ef398e5e | [
"BSD-3-Clause"
] | 1 | 2016-12-19T16:35:53.000Z | 2016-12-22T19:40:30.000Z | knock-knock4/knockpy/__init__.py | abhinashjain/proxyfuzzer | 9c372390afe4cd3d277bcaaeb289e4c8ef398e5e | [
"BSD-3-Clause"
] | 2 | 2018-06-15T02:00:49.000Z | 2021-09-08T19:15:35.000Z | import os
_ROOT = os.path.abspath(os.path.dirname(__file__))
def get_data(path):
return os.path.join(_ROOT, 'wordlist', path)
| 25.4 | 50 | 0.748031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.07874 |
55ae9ba4b65519bc33be7de8562a205f27c9a655 | 745 | py | Python | brilws/cli/briltag_insertdata.py | xiezhen/brilws | e3652dd4506dff9d713184ff623b59bc11fbe2c7 | [
"MIT"
] | 1 | 2017-03-23T16:26:06.000Z | 2017-03-23T16:26:06.000Z | brilws/cli/briltag_insertdata.py | xiezhen/brilws | e3652dd4506dff9d713184ff623b59bc11fbe2c7 | [
"MIT"
] | 1 | 2017-03-24T15:02:20.000Z | 2017-10-02T13:43:26.000Z | brilws/cli/briltag_insertdata.py | xiezhen/brilws | e3652dd4506dff9d713184ff623b59bc11fbe2c7 | [
"MIT"
] | 1 | 2019-12-06T09:23:01.000Z | 2019-12-06T09:23:01.000Z | """
Usage:
briltag insertdata [options]
Options:
-h --help Show this screen.
-c CONNECT Service name [default: onlinew]
-p AUTHPATH Authentication file
--name TAGNAME Name of the data tag
--comments COMMENTS Comments on the t... | 25.689655 | 93 | 0.625503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 365 | 0.489933 |
55b3f38a36b36ad5c48a9910aaae79865f7775ae | 17,152 | py | Python | techniques/volumerec.py | lleonart1984/rendezvous | f8f5e73fa1ede7c33d8cf08548bce1475a0cc8da | [
"MIT"
] | null | null | null | techniques/volumerec.py | lleonart1984/rendezvous | f8f5e73fa1ede7c33d8cf08548bce1475a0cc8da | [
"MIT"
] | null | null | null | techniques/volumerec.py | lleonart1984/rendezvous | f8f5e73fa1ede7c33d8cf08548bce1475a0cc8da | [
"MIT"
] | null | null | null | from rendering.manager import *
from rendering.scenes import *
from rendering.training import *
import random
import glm
import os
import numpy as np
import math
__VOLUME_RECONSTRUCTION_SHADERS__ = os.path.dirname(__file__)+"/shaders/VR"
compile_shader_sources(__VOLUME_RECONSTRUCTION_SHADERS__)
class RayGenerator(R... | 45.983914 | 136 | 0.65007 | 16,832 | 0.981343 | 0 | 0 | 0 | 0 | 0 | 0 | 466 | 0.027169 |
55b6264d004418dd7f3a7bb277c12e4c208f7910 | 868 | py | Python | basics/merge_sort.py | zi-NaN/algorithm_exercise | 817916a62774145fe6387b715f76c5badbf99197 | [
"MIT"
] | null | null | null | basics/merge_sort.py | zi-NaN/algorithm_exercise | 817916a62774145fe6387b715f76c5badbf99197 | [
"MIT"
] | null | null | null | basics/merge_sort.py | zi-NaN/algorithm_exercise | 817916a62774145fe6387b715f76c5badbf99197 | [
"MIT"
] | 1 | 2018-11-21T05:14:07.000Z | 2018-11-21T05:14:07.000Z |
def _merge_sort(arr:'list'):
if len(arr) <= 1:
return arr
begin = 0
end = len(arr)-1
middle = (begin+end)//2
first = _merge_sort(arr[begin:middle+1])
second = _merge_sort(arr[middle+1:end+1])
# merge
ptr1 = begin
ptr2 = middle+1
ptr = 0
while(ptr1<middle... | 24.111111 | 48 | 0.483871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.058756 |
55b6ea1d5523af9cb10562cdce01d07f5fcf19a0 | 2,605 | py | Python | main.py | famaxth/Amazon-Parser | efc236459f2c9d723e02c87e5ebd3b1cf5a09e58 | [
"MIT"
] | null | null | null | main.py | famaxth/Amazon-Parser | efc236459f2c9d723e02c87e5ebd3b1cf5a09e58 | [
"MIT"
] | null | null | null | main.py | famaxth/Amazon-Parser | efc236459f2c9d723e02c87e5ebd3b1cf5a09e58 | [
"MIT"
] | null | null | null | # - *- coding: utf- 8 - *-
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
options = Options()
options.headless = True
path = 'path/to/chromedriver.exe' # You need to change this
def parser():
tex... | 56.630435 | 222 | 0.603839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,456 | 0.557641 |
55b7410f25633189b2b806b878e6eeb2f52c7ecc | 679 | py | Python | Data_Science/Python-Estatistica/stats-ex8.py | maledicente/cursos | 00ace48da7e48b04485e4ca97b3ca9ba5f33a283 | [
"MIT"
] | 1 | 2021-05-03T22:59:38.000Z | 2021-05-03T22:59:38.000Z | Data_Science/Python-Estatistica/stats-ex8.py | maledicente/cursos | 00ace48da7e48b04485e4ca97b3ca9ba5f33a283 | [
"MIT"
] | null | null | null | Data_Science/Python-Estatistica/stats-ex8.py | maledicente/cursos | 00ace48da7e48b04485e4ca97b3ca9ba5f33a283 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
def cinematica(t,s0,v0,a):
s = s0 + v0*t +(a*t*t/2.0)
return s
t = np.linspace(0, 5, 500)
s0 = 0.5
v0 = 2.0
a = 1.5
s_noise = 0.5 * np.random.normal(size=t.size)
s = cinematica(t,s0,v0,a)
sdata = s + s_noise
coefs, pcov = ... | 20.575758 | 64 | 0.673049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.207602 |
55b9023ec88372bc40c1756a9431095fe3d52bb6 | 1,059 | py | Python | xgboost_model.py | aravindpadman/Riiid-Answer-Correctness-Prediction | 127037d372352af969fbfa335bff8bad84afb603 | [
"MIT"
] | null | null | null | xgboost_model.py | aravindpadman/Riiid-Answer-Correctness-Prediction | 127037d372352af969fbfa335bff8bad84afb603 | [
"MIT"
] | null | null | null | xgboost_model.py | aravindpadman/Riiid-Answer-Correctness-Prediction | 127037d372352af969fbfa335bff8bad84afb603 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import optuna
import xgboost
train = pd.read_csv("~/kaggledatasets/riiid-test-answer-prediction/train.csv", nrows=3e6,
dtype={'row_id': 'int64',
'timestamp': 'int64',
'user_id': 'int32',
... | 28.621622 | 90 | 0.481586 | 331 | 0.312559 | 0 | 0 | 0 | 0 | 0 | 0 | 298 | 0.281398 |
55b93809c23b2f231b7acf1f7f0608d40af2f69c | 1,828 | py | Python | run.py | Gandor26/covid-open | 50dcb773160edc16b107785a6bb32ae6f82fc9a7 | [
"MIT"
] | 12 | 2020-10-29T20:52:26.000Z | 2021-11-10T14:11:59.000Z | run.py | Gandor26/covid-open | 50dcb773160edc16b107785a6bb32ae6f82fc9a7 | [
"MIT"
] | 1 | 2021-02-16T09:48:39.000Z | 2021-03-20T04:21:54.000Z | run.py | Gandor26/covid-open | 50dcb773160edc16b107785a6bb32ae6f82fc9a7 | [
"MIT"
] | 1 | 2020-12-05T15:51:43.000Z | 2020-12-05T15:51:43.000Z | from typing import Optional, Dict
from pathlib import Path
from copy import deepcopy
from tqdm import tqdm
import torch as pt
from torch import Tensor, nn
from torch.optim import Adam
def train(
train_data: Dict[str, Tensor],
valid_data: Dict[str, Tensor],
model: nn.Module,
optimizer: Adam,
model... | 29.967213 | 64 | 0.565646 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.019694 |
55b9f31d49258d834824cb0904941fbaf15740b7 | 898 | py | Python | authors/apps/profiles/models.py | andela/ah-backend-odin | 0e9ef1a10c8a3f6736999a5111736f7bd7236689 | [
"BSD-3-Clause"
] | null | null | null | authors/apps/profiles/models.py | andela/ah-backend-odin | 0e9ef1a10c8a3f6736999a5111736f7bd7236689 | [
"BSD-3-Clause"
] | 43 | 2018-10-25T10:14:52.000Z | 2022-03-11T23:33:46.000Z | authors/apps/profiles/models.py | andela/ah-backend-odin | 0e9ef1a10c8a3f6736999a5111736f7bd7236689 | [
"BSD-3-Clause"
] | 4 | 2018-10-29T07:04:58.000Z | 2020-04-02T14:15:10.000Z | from django.db import models
from django.conf import settings
from django.db.models.signals import post_save
class Profile(models.Model):
username = models.CharField(max_length=255, primary_key=True)
bio = models.TextField(null=True, blank=True)
image = models.URLField(
null=True,
blank=T... | 26.411765 | 68 | 0.711581 | 492 | 0.547884 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.066815 |
55bb1301f3cfe948295e5ac6f60a5f73e88c2c17 | 975 | py | Python | python/StatsUtil.py | cbaldassano/Parcellating-connectivity | a98142a6b0dc10e9cb6f6e603cb5334996d018ec | [
"Unlicense"
] | 2 | 2020-08-17T21:06:28.000Z | 2021-05-10T14:37:16.000Z | python/StatsUtil.py | cbaldassano/Parcellating-connectivity | a98142a6b0dc10e9cb6f6e603cb5334996d018ec | [
"Unlicense"
] | null | null | null | python/StatsUtil.py | cbaldassano/Parcellating-connectivity | a98142a6b0dc10e9cb6f6e603cb5334996d018ec | [
"Unlicense"
] | 3 | 2018-07-06T17:08:47.000Z | 2019-10-09T18:58:31.000Z | import numpy as np
# Compute normalized mutual information between two parcellations z1 and z2
def NMI(z1, z2):
N = len(z1)
assert N == len(z2)
p1 = np.bincount(z1)/N
p1[p1 == 0] = 1
H1 = (-p1*np.log(p1)).sum()
p2 = np.bincount(z2)/N
p2[p2 == 0] = 1
H2 = (-p2*np.log(p2)).sum()
joint = np.histogram2d(z1,z2,... | 24.375 | 75 | 0.610256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.171282 |
55bb525b00d7081596041b440b9ccf7eb9668e9b | 31,939 | py | Python | tests/test_model.py | olzama/xigt | 60daa7201258ec02330264317e7a2315d929bd86 | [
"MIT"
] | 17 | 2017-01-14T23:29:07.000Z | 2022-02-23T08:50:09.000Z | tests/test_model.py | olzama/xigt | 60daa7201258ec02330264317e7a2315d929bd86 | [
"MIT"
] | 31 | 2015-02-11T17:25:59.000Z | 2015-12-07T21:04:39.000Z | tests/test_model.py | olzama/xigt | 60daa7201258ec02330264317e7a2315d929bd86 | [
"MIT"
] | 4 | 2018-02-04T17:21:53.000Z | 2021-11-29T16:33:45.000Z | import pytest
from xigt import XigtCorpus, Igt, Tier, Item, Metadata, Meta, MetaChild
from xigt.errors import XigtError, XigtStructureError
class TestMetadata():
md1 = Metadata()
m1 = Meta(id='meta1', text='meta')
md2 = Metadata(
id='md2',
type='basic',
attributes={'attr':'val'},... | 31.312745 | 82 | 0.558032 | 31,778 | 0.994959 | 0 | 0 | 0 | 0 | 0 | 0 | 3,868 | 0.121106 |
55bbc7c595e31e90737d59f74df6dbd5b4ab1f77 | 121 | py | Python | api_v2/views.py | LonelVino/club-chinois-home | 3e2ecc6728f0b7349adfe10e515e3f5908d09c9d | [
"MIT"
] | null | null | null | api_v2/views.py | LonelVino/club-chinois-home | 3e2ecc6728f0b7349adfe10e515e3f5908d09c9d | [
"MIT"
] | null | null | null | api_v2/views.py | LonelVino/club-chinois-home | 3e2ecc6728f0b7349adfe10e515e3f5908d09c9d | [
"MIT"
] | null | null | null |
from django.http import JsonResponse
def names(request):
return JsonResponse({'names': ['William', 'Rod', 'Grant']}) | 30.25 | 63 | 0.702479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.231405 |
55bbcfb0657fa9d696e2cb0dec828c20a4c0e1c7 | 156 | py | Python | rpi/LiDAR.py | shadowsburney/LiDAR | f88cca9fbdae2d0dbe47a6e06cd965a2aaa82a0a | [
"MIT"
] | null | null | null | rpi/LiDAR.py | shadowsburney/LiDAR | f88cca9fbdae2d0dbe47a6e06cd965a2aaa82a0a | [
"MIT"
] | null | null | null | rpi/LiDAR.py | shadowsburney/LiDAR | f88cca9fbdae2d0dbe47a6e06cd965a2aaa82a0a | [
"MIT"
] | null | null | null | from sensor import Sensor
from stepper import Stepper
sensor = Sensor()
stepper = Stepper(100)
#stepper.start()
while True:
print(sensor.measure())
| 13 | 27 | 0.730769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.102564 |
55bc6334d6372aec8c3f097cf63d231873013d04 | 1,351 | py | Python | peering/migrations/0051_auto_20190818_1816.py | schiederme/peering-manager | 2d29427fd4f2b91a5208f31e1a7ad69eaf82924c | [
"Apache-2.0"
] | 173 | 2020-08-08T15:38:08.000Z | 2022-03-21T11:35:25.000Z | peering/migrations/0051_auto_20190818_1816.py | schiederme/peering-manager | 2d29427fd4f2b91a5208f31e1a7ad69eaf82924c | [
"Apache-2.0"
] | 247 | 2017-12-26T12:55:34.000Z | 2020-08-08T11:57:35.000Z | peering/migrations/0051_auto_20190818_1816.py | schiederme/peering-manager | 2d29427fd4f2b91a5208f31e1a7ad69eaf82924c | [
"Apache-2.0"
] | 63 | 2017-10-13T06:46:05.000Z | 2020-08-08T00:41:57.000Z | # Generated by Django 2.2.4 on 2019-08-18 16:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("peering", "0050_auto_20190806_2159")]
operations = [
migrations.RenameField(
model_name="autonomoussystem", old_name="comment", new_name="comments"
... | 32.95122 | 86 | 0.6151 | 1,266 | 0.937084 | 0 | 0 | 0 | 0 | 0 | 0 | 396 | 0.293116 |
55beea09bbe265b3360f6e0c1ea21bb757b756fd | 7,784 | py | Python | pysnmp-with-texts/HP-ICF-IPV6-RA-GUARD-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/HP-ICF-IPV6-RA-GUARD-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/HP-ICF-IPV6-RA-GUARD-MIB.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 HP-ICF-IPV6-RA-GUARD-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-IPV6-RA-GUARD-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:34:21 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.... | 127.606557 | 828 | 0.776208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,776 | 0.356629 |
55bfeb24ff5584cd80bb449c46db4ec74f53fd3c | 102 | py | Python | API/utils/tokenizer.py | accordproject/labs-cicero-classify | 3a52ebaf45252515c417bf94a05e33fc1c2628b8 | [
"Apache-2.0"
] | 2 | 2021-07-07T01:06:18.000Z | 2021-11-12T18:54:21.000Z | API/utils/tokenizer.py | accordproject/labs_cicero_classify | 3a52ebaf45252515c417bf94a05e33fc1c2628b8 | [
"Apache-2.0"
] | 3 | 2021-06-25T12:40:23.000Z | 2022-02-14T13:42:30.000Z | API/utils/tokenizer.py | accordproject/labs_cicero_classify | 3a52ebaf45252515c417bf94a05e33fc1c2628b8 | [
"Apache-2.0"
] | null | null | null | from transformers import RobertaTokenizer
tokenizer = RobertaTokenizer.from_pretrained("roberta-base") | 51 | 60 | 0.872549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.137255 |
55c01bcc5785d0af3f6437a91b853450fda2bb63 | 2,531 | py | Python | gdesk/panels/imgview/quantiles.py | thocoo/gamma-desk | 9cb63a65fe23e30e155b3beca862f369b7fa1b7e | [
"Apache-2.0"
] | null | null | null | gdesk/panels/imgview/quantiles.py | thocoo/gamma-desk | 9cb63a65fe23e30e155b3beca862f369b7fa1b7e | [
"Apache-2.0"
] | 8 | 2021-04-09T11:31:43.000Z | 2021-06-09T09:07:18.000Z | gdesk/panels/imgview/quantiles.py | thocoo/gamma-desk | 9cb63a65fe23e30e155b3beca862f369b7fa1b7e | [
"Apache-2.0"
] | null | null | null | import numpy as np
from .fasthist import hist2d
stdquant = np.ndarray(13)
stdquant[0] = (0.0000316712418331200) #-4 sdev
stdquant[1] = (0.0013498980316301000) #-3 sdev
stdquant[2] = (0.0227501319481792000) #-2 sdev
stdquant[3] = (0.05)
stdquant[4] = (0.1586552539314570000) #-1 sdev or lsdev
stdquant[5] = (0.25) ... | 34.671233 | 83 | 0.590281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.092058 |
55c0577110244c4fafd7e8c73ddb2adb8d710299 | 10,584 | py | Python | isi_sdk/models/report_subreport_policy_file_matching_pattern_or_criteria_item_and_criteria_item.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | isi_sdk/models/report_subreport_policy_file_matching_pattern_or_criteria_item_and_criteria_item.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | isi_sdk/models/report_subreport_policy_file_matching_pattern_or_criteria_item_and_criteria_item.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Copyright 2016 SmartBear Software
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... | 36.371134 | 305 | 0.647865 | 9,839 | 0.929611 | 0 | 0 | 6,957 | 0.657313 | 0 | 0 | 7,083 | 0.669218 |
55c0c3ecc4384f35e0ec61e90038c58f6fa656b9 | 89 | py | Python | languages/116/examples/test_problem.py | c3333/sphereengine-languages | ef76cbffe67407d88519ba1e4bfaa20e3a55ccff | [
"Apache-2.0"
] | 5 | 2019-05-05T15:47:24.000Z | 2021-07-22T14:29:13.000Z | languages/116/examples/test_problem.py | c3333/sphereengine-languages | ef76cbffe67407d88519ba1e4bfaa20e3a55ccff | [
"Apache-2.0"
] | 1 | 2022-03-29T14:20:04.000Z | 2022-03-29T14:20:04.000Z | languages/116/examples/test_problem.py | c3333/sphereengine-languages | ef76cbffe67407d88519ba1e4bfaa20e3a55ccff | [
"Apache-2.0"
] | 4 | 2020-02-25T14:30:43.000Z | 2021-05-12T10:05:05.000Z | from sys import stdin
for line in stdin:
n = int(line)
if n == 42:
break
print(n)
| 9.888889 | 21 | 0.629213 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e9480334f3e96fb87240d084ea753201b541d895 | 367 | py | Python | Python/Effective Python/item19.py | Vayne-Lover/Effective | 05f0a08bec8eb112fdb4e7a489d0e33bc81522ff | [
"MIT"
] | null | null | null | Python/Effective Python/item19.py | Vayne-Lover/Effective | 05f0a08bec8eb112fdb4e7a489d0e33bc81522ff | [
"MIT"
] | null | null | null | Python/Effective Python/item19.py | Vayne-Lover/Effective | 05f0a08bec8eb112fdb4e7a489d0e33bc81522ff | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def remainder(number,divisor):
return number % divisor
def flow_rate(weight,time,period=1):
return weight/time*period
if __name__=="__main__":
print(remainder(20,7))
print(remainder(20,divisor=7))
print(remainder(number=20,divisor=7))
print(remainder(divisor=7,number=20))
print... | 21.588235 | 39 | 0.708447 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.089918 |
e94dc72d516776aab0f1e035f052d60121476db1 | 1,981 | py | Python | create_h5ad.py | xmuyulab/DAISM-XMBD | 916e18a1f111789a1c0bd3c1209d5a73813f3d3a | [
"MIT"
] | 2 | 2021-11-05T00:43:16.000Z | 2021-12-14T08:39:29.000Z | create_h5ad.py | biosyy/DAISM-XMBD | a76f976db8c33ef33f78533a5a2be50a85148e79 | [
"MIT"
] | 2 | 2021-01-14T19:40:46.000Z | 2021-01-14T19:41:14.000Z | create_h5ad.py | biosyy/DAISM-XMBD | a76f976db8c33ef33f78533a5a2be50a85148e79 | [
"MIT"
] | 1 | 2021-08-30T15:11:45.000Z | 2021-08-30T15:11:45.000Z | ##############################
## cread purified h5ad file ##
##############################
# input: annotation table and the whole expression profile
# output: purified h5ad file
import os
import pandas as pd
import anndata
import argparse
import gc
import numpy as np
parser = argparse.ArgumentParser(description='... | 34.155172 | 135 | 0.649167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 561 | 0.28319 |
e94e1af31de28cb3ee32e1feeddbef4991bf43d4 | 1,424 | py | Python | FM_Tuning.py | RomanGutin/GEMSEC | cb2c26d4747cbd3d4c048787ca41665ef0e64155 | [
"MIT"
] | null | null | null | FM_Tuning.py | RomanGutin/GEMSEC | cb2c26d4747cbd3d4c048787ca41665ef0e64155 | [
"MIT"
] | null | null | null | FM_Tuning.py | RomanGutin/GEMSEC | cb2c26d4747cbd3d4c048787ca41665ef0e64155 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 29 13:56:44 2018
@author: RomanGutin
"""
import pandas as pd
import numpy as np
#Frequency Tuning Loop
amino_letter = ['A','R','D','N','C','E','Q','G','H','I','L','K','M','F','P','S','T','W','Y','V']
length_scores =[4,8,6,6,5,7,7,4,7,5,6,8,7,8,5,5,5,9,8,5]
FM_df = pd.Dat... | 30.297872 | 96 | 0.656601 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 432 | 0.303371 |
e94e9483c973c25abe2c71d5816ab7d9b774441e | 692 | py | Python | unified_api/brokers/kafka/consumer.py | campos537/deep-fashion-system | 1de31dd6260cc967e1832cff63ae7e537a3a4e9d | [
"Unlicense"
] | 1 | 2021-04-06T00:43:26.000Z | 2021-04-06T00:43:26.000Z | unified_api/brokers/kafka/consumer.py | campos537/deep-fashion-system | 1de31dd6260cc967e1832cff63ae7e537a3a4e9d | [
"Unlicense"
] | null | null | null | unified_api/brokers/kafka/consumer.py | campos537/deep-fashion-system | 1de31dd6260cc967e1832cff63ae7e537a3a4e9d | [
"Unlicense"
] | null | null | null | from kafka import KafkaConsumer
class Consumer:
def __init__(self, config):
bootstrap_server = config.get(
"bootstrap_server") + ":" + config.get("port")
self.consumer = KafkaConsumer(config.get(
"subscription_id_2"), bootstrap_servers=bootstrap_server, api_version=(0, 10), ... | 34.6 | 109 | 0.601156 | 658 | 0.950867 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.089595 |
e94ef8f2fd09f77bca0e59bab465fb16e55c0ca1 | 2,159 | py | Python | utils.py | mino2401200231/File-convertor | 6fb438dc5f37bf0efd78e18e4848b4cdb0331343 | [
"MIT"
] | null | null | null | utils.py | mino2401200231/File-convertor | 6fb438dc5f37bf0efd78e18e4848b4cdb0331343 | [
"MIT"
] | null | null | null | utils.py | mino2401200231/File-convertor | 6fb438dc5f37bf0efd78e18e4848b4cdb0331343 | [
"MIT"
] | 2 | 2021-08-12T06:37:52.000Z | 2021-09-05T13:03:36.000Z | # utilities
import os
from re import sub
import uuid
import subprocess
# Image To Pdf
import img2pdf
# PDF To Images
from pdf2image import convert_from_path
# PDF To Word
from pdf2docx import parse
_BASE_DIR = os.getcwd()
_BASE_DIR_FILE = os.path.join(_BASE_DIR, "files")
def process_image_to_pdf(files, pdf_name... | 26.329268 | 117 | 0.656322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.079203 |
e950fb1913401e7e3634e1210cfe24f9fddcf950 | 2,026 | py | Python | screens/tasks/tasks.py | athrn/kognitivo | 15822338778213c09ea654ec4e06a300129f9478 | [
"Apache-2.0"
] | 80 | 2017-11-13T21:58:55.000Z | 2022-01-03T20:10:42.000Z | screens/tasks/tasks.py | athrn/kognitivo | 15822338778213c09ea654ec4e06a300129f9478 | [
"Apache-2.0"
] | null | null | null | screens/tasks/tasks.py | athrn/kognitivo | 15822338778213c09ea654ec4e06a300129f9478 | [
"Apache-2.0"
] | 21 | 2017-11-14T09:47:41.000Z | 2021-11-23T06:44:31.000Z | from kivy.uix.screenmanager import Screen
from kivy.properties import StringProperty, ObjectProperty, NumericProperty, ListProperty, BooleanProperty
from kivy.app import App
from kivy.logger import Logger
from library_widgets import TrackingScreenMixin
from utils import import_kv
import_kv(__file__)
class TasksScr... | 35.54386 | 106 | 0.673248 | 1,719 | 0.84847 | 0 | 0 | 211 | 0.104146 | 0 | 0 | 146 | 0.072063 |
e954754c8db1dbc45662c97eec7de33aed7d3e19 | 1,240 | py | Python | imclassify/train_model.py | AdamSpannbauer/imclassify | 27c24576ef6a2ed344cad7f568f7e4cdfe6ea0bd | [
"MIT"
] | null | null | null | imclassify/train_model.py | AdamSpannbauer/imclassify | 27c24576ef6a2ed344cad7f568f7e4cdfe6ea0bd | [
"MIT"
] | null | null | null | imclassify/train_model.py | AdamSpannbauer/imclassify | 27c24576ef6a2ed344cad7f568f7e4cdfe6ea0bd | [
"MIT"
] | null | null | null | """Train logistic regression model on hdf5 features for classification
Modified from:
https://gurus.pyimagesearch.com/topic/transfer-learning-example-dogs-and-cats/
"""
import pickle
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report
def train_model(h5py_db, mod... | 37.575758 | 90 | 0.704839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 652 | 0.525806 |
e955b53af943d2f078f97e589977586caea5ae03 | 1,760 | py | Python | Test/final/V5_baseline_CC_ref/aggregate.py | WangWenhao0716/ISC-Track1-Submission | 3484142c0550262c90fc229e5e0ba719c58c592d | [
"MIT"
] | 46 | 2021-10-31T08:02:51.000Z | 2022-03-11T08:42:30.000Z | Test/final/V5_baseline_CC_ref/aggregate.py | WangWenhao0716/ISC-Track1-Submission | 3484142c0550262c90fc229e5e0ba719c58c592d | [
"MIT"
] | 3 | 2021-11-18T09:35:45.000Z | 2022-03-31T01:20:34.000Z | Test/final/V5_baseline_CC_ref/aggregate.py | WangWenhao0716/ISC-Track1-Submission | 3484142c0550262c90fc229e5e0ba719c58c592d | [
"MIT"
] | 8 | 2021-12-01T08:02:08.000Z | 2022-02-26T13:29:36.000Z | import pandas as pd
v_4 = pd.read_csv('50/predictions_dev_queries_50k_normalized_exp.csv')
temp = list(v_4['query_id'])
v_4['query_id'] = list(v_4['reference_id'])
v_4['reference_id'] = temp
v_5 = pd.read_csv('ibn/predictions_dev_queries_50k_normalized_exp.csv')
temp = list(v_5['query_id'])
v_5['query_id'] = list(v_5... | 31.428571 | 74 | 0.710795 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 515 | 0.292614 |
e95640499c478bef869502f2fe8e6dcadc430eb2 | 399 | py | Python | src/commands/i_stat/anticheat.py | slimsevernake/osbb-bot | 3a6b9512523a5374034c2f1cdb83ea5cd6de0ac8 | [
"MIT"
] | 9 | 2018-08-19T12:55:58.000Z | 2021-07-17T15:38:40.000Z | src/commands/i_stat/anticheat.py | slimsevernake/osbb-bot | 3a6b9512523a5374034c2f1cdb83ea5cd6de0ac8 | [
"MIT"
] | 124 | 2018-07-31T13:43:58.000Z | 2022-03-11T23:27:43.000Z | src/commands/i_stat/anticheat.py | slimsevernake/osbb-bot | 3a6b9512523a5374034c2f1cdb83ea5cd6de0ac8 | [
"MIT"
] | 3 | 2019-10-21T13:18:14.000Z | 2021-02-09T11:05:10.000Z | from src.utils.cache import cache
def cheats_key(chat_id: int, user_id: int) -> str:
return f'i_stat:cheats:{chat_id}:{user_id}'
def cheats_found(chat_id: int, user_id: int, sum_count: int) -> bool:
key = cheats_key(chat_id, user_id)
sums = cache.get(key, 0)
sums += sum_count
if sums > 50:
... | 23.470588 | 69 | 0.649123 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.102757 |
e9569e3a4e8763ed40f2c7965c464907cae6ec57 | 744 | py | Python | tutorial/flask-api-mongo/app/services/mail_service.py | carrenolg/python | 7c1f0013d911177ce3bc2c5ea58b8e6e562b7282 | [
"Apache-2.0"
] | null | null | null | tutorial/flask-api-mongo/app/services/mail_service.py | carrenolg/python | 7c1f0013d911177ce3bc2c5ea58b8e6e562b7282 | [
"Apache-2.0"
] | null | null | null | tutorial/flask-api-mongo/app/services/mail_service.py | carrenolg/python | 7c1f0013d911177ce3bc2c5ea58b8e6e562b7282 | [
"Apache-2.0"
] | null | null | null | from threading import Thread
from flask_mail import Mail, Message
from resources.errors import InternalServerError
mail = Mail(app=None)
app = None
def initialize_mail_service(appiclation):
global mail
global app
mail = Mail(app=appiclation)
app = appiclation
def send_async_email(app, msg, mail):
... | 25.655172 | 66 | 0.711022 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.03629 |
e9570255d9896891bde513fb7630bb22b041b8d0 | 18,541 | py | Python | vxsandbox/resources/tests/test_http.py | praekeltfoundation/vumi-sandbox | 1e2dfca8325ce98e52fe32a072749fe4cf7f448d | [
"BSD-3-Clause"
] | 1 | 2021-05-26T08:38:28.000Z | 2021-05-26T08:38:28.000Z | vxsandbox/resources/tests/test_http.py | praekelt/vumi-sandbox | 1e2dfca8325ce98e52fe32a072749fe4cf7f448d | [
"BSD-3-Clause"
] | 24 | 2015-03-04T08:33:12.000Z | 2016-08-18T07:57:12.000Z | vxsandbox/resources/tests/test_http.py | praekeltfoundation/vumi-sandbox | 1e2dfca8325ce98e52fe32a072749fe4cf7f448d | [
"BSD-3-Clause"
] | null | null | null | import base64
import json
from OpenSSL.SSL import (
VERIFY_PEER, VERIFY_FAIL_IF_NO_PEER_CERT, VERIFY_NONE,
SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD)
from twisted.web.http_headers import Headers
from twisted.internet.defer import inlineCallbacks, fail, succeed
from vxsandbox.resources.http import (
HttpC... | 42.138636 | 79 | 0.644356 | 18,054 | 0.973734 | 9,198 | 0.49609 | 9,618 | 0.518742 | 0 | 0 | 3,520 | 0.18985 |
e9576153377cb8542e00446bc31a32f660d4a2a6 | 99 | py | Python | examples/port_demo.py | smilelight/lightUtils | e9b7ed35ed50cf6b7c6284fe60918ce4dc71beac | [
"MIT"
] | 2 | 2020-01-23T02:03:19.000Z | 2020-12-13T09:05:45.000Z | examples/port_demo.py | smilelight/lightUtils | e9b7ed35ed50cf6b7c6284fe60918ce4dc71beac | [
"MIT"
] | null | null | null | examples/port_demo.py | smilelight/lightUtils | e9b7ed35ed50cf6b7c6284fe60918ce4dc71beac | [
"MIT"
] | null | null | null | from lightutils import get_free_tcp_port
port = get_free_tcp_port()
print(port)
print(type(port))
| 16.5 | 40 | 0.808081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e95a4fa6b39694c0762d544398c6a91dc4eb000f | 722 | py | Python | soundDB/__init__.py | gjoseph92/soundDB2 | 4d9cc93cc596a5089233f17b0b8be252f73e1224 | [
"CC0-1.0"
] | 3 | 2017-05-16T19:37:32.000Z | 2020-03-29T21:54:33.000Z | soundDB/__init__.py | gjoseph92/soundDB2 | 4d9cc93cc596a5089233f17b0b8be252f73e1224 | [
"CC0-1.0"
] | 19 | 2016-12-02T20:47:24.000Z | 2021-10-05T19:01:01.000Z | soundDB/__init__.py | gjoseph92/soundDB2 | 4d9cc93cc596a5089233f17b0b8be252f73e1224 | [
"CC0-1.0"
] | 2 | 2017-05-10T23:01:06.000Z | 2019-12-27T19:49:29.000Z | from .accessor import Accessor
from . import parsers
import inspect
def populateAccessors():
"""
Find all filetype-specific Accessor subclasses in the parsers file (i.e. NVSPL, SRCID, etc.) and instantiate them.
This way, one instance of each Accessor is added to the soundDB namespace under the name of th... | 34.380952 | 118 | 0.756233 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.34349 |
e95c3c23ff20e2cb3d818ef3d5c5a11d27117013 | 3,953 | py | Python | ipbb/models/ipbb.py | aagusti/i-pbb | 8178f68744b440f96f2c3d114c2485d728655e24 | [
"MIT"
] | null | null | null | ipbb/models/ipbb.py | aagusti/i-pbb | 8178f68744b440f96f2c3d114c2485d728655e24 | [
"MIT"
] | null | null | null | ipbb/models/ipbb.py | aagusti/i-pbb | 8178f68744b440f96f2c3d114c2485d728655e24 | [
"MIT"
] | null | null | null | from datetime import datetime
from sqlalchemy import (
Column,
Integer,
Text,
DateTime,
SmallInteger,
BigInteger,
String,
Date,
ForeignKey,
UniqueConstraint
)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.exc import NoResultFound
from sqlalchemy.... | 39.53 | 85 | 0.698963 | 3,422 | 0.865672 | 0 | 0 | 363 | 0.091829 | 0 | 0 | 312 | 0.078927 |
e95c5e6fc88c9d5b12bafc54c0d0afb1690c36cf | 556 | py | Python | tests/testLoadMapFromString.py | skowronskij/OGCServer | 3fd11438180944ffa43e315c6390e89437a28f4e | [
"BSD-3-Clause"
] | 90 | 2015-04-30T22:13:14.000Z | 2022-02-16T17:30:11.000Z | tests/testLoadMapFromString.py | skowronskij/OGCServer | 3fd11438180944ffa43e315c6390e89437a28f4e | [
"BSD-3-Clause"
] | 6 | 2019-09-09T06:07:27.000Z | 2020-06-17T09:52:49.000Z | tests/testLoadMapFromString.py | skowronskij/OGCServer | 3fd11438180944ffa43e315c6390e89437a28f4e | [
"BSD-3-Clause"
] | 28 | 2015-05-12T09:08:17.000Z | 2021-07-02T11:53:29.000Z | import nose
import os
from ogcserver.WMS import BaseWMSFactory
def test_wms_capabilities():
base_path, tail = os.path.split(__file__)
file_path = os.path.join(base_path, 'mapfile_encoding.xml')
wms = BaseWMSFactory()
with open(file_path) as f:
settings = f.read()
wms.loadXML(xmlstring=setti... | 27.8 | 63 | 0.676259 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.140288 |
e95cb362167c296066d686777e92e50fed2083ee | 977 | py | Python | core/models/transaction.py | soslaio/openme | b6e8c87279363a62992b5db14646dbaa655dc936 | [
"MIT"
] | null | null | null | core/models/transaction.py | soslaio/openme | b6e8c87279363a62992b5db14646dbaa655dc936 | [
"MIT"
] | null | null | null | core/models/transaction.py | soslaio/openme | b6e8c87279363a62992b5db14646dbaa655dc936 | [
"MIT"
] | null | null | null |
from django.db import models
from .base import Base
class Transaction(Base):
date = models.DateField()
description = models.CharField(max_length=400)
ammount = models.DecimalField(max_digits=10, decimal_places=2)
category = models.ForeignKey('Category', on_delete=models.CASCADE)
from_account = mo... | 33.689655 | 107 | 0.69089 | 921 | 0.942682 | 0 | 0 | 234 | 0.239509 | 0 | 0 | 89 | 0.091095 |
e95f809c079ce79cbabf21b0bd9fca926c8f6149 | 864 | py | Python | setup.py | mikemalinowski/insomnia | ea637e5eba608eacd1731239f7ddf6bb91aacc9e | [
"MIT"
] | 2 | 2019-02-28T09:58:55.000Z | 2020-03-06T05:03:34.000Z | setup.py | mikemalinowski/insomnia | ea637e5eba608eacd1731239f7ddf6bb91aacc9e | [
"MIT"
] | null | null | null | setup.py | mikemalinowski/insomnia | ea637e5eba608eacd1731239f7ddf6bb91aacc9e | [
"MIT"
] | null | null | null | import setuptools
try:
with open('README.md', 'r') as fh:
long_description = fh.read()
except:
long_description = ''
setuptools.setup(
name='blackout',
version='1.0.4',
author='Mike Malinowski',
author_email='mike@twisted.space',
description='A python package making it... | 28.8 | 99 | 0.635417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 405 | 0.46875 |
e96093e48bfaf833c59e3c55fbafb9b3d90f3407 | 710 | py | Python | src/hypermd/html/html.py | Riib11/HyperMD | d6921b701635356236b00d0a8794ab68d733ad59 | [
"MIT"
] | null | null | null | src/hypermd/html/html.py | Riib11/HyperMD | d6921b701635356236b00d0a8794ab68d733ad59 | [
"MIT"
] | null | null | null | src/hypermd/html/html.py | Riib11/HyperMD | d6921b701635356236b00d0a8794ab68d733ad59 | [
"MIT"
] | null | null | null | class Element:
def __init__(self, name, single):
self.name = name
self.single = single
self.attrs = {}
self.content = ""
def set_attr(self, k, v): self.attrs[k] = v
def get_attr(self, v): return self.attrs[k]
def tohtml(self):
attrs = (" " + " ".join([ "%s=\"%s\... | 29.583333 | 53 | 0.453521 | 710 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.061972 |
e960b0fabb4246bd94bb826b4cf1e4c34f2696b5 | 2,590 | py | Python | vk_music/__main__.py | w1r2p1/vk_music | 066fa623f87a6351846011c477cff2aad2943bc5 | [
"MIT"
] | 7 | 2015-01-26T08:46:12.000Z | 2020-08-29T13:07:07.000Z | vk_music/__main__.py | w1r2p1/vk_music | 066fa623f87a6351846011c477cff2aad2943bc5 | [
"MIT"
] | 3 | 2015-04-29T20:34:53.000Z | 2015-07-08T08:43:47.000Z | vk_music/__main__.py | sashasimkin/vk_music | 3814909ffd914103e80734e51b01dddb458b1bfe | [
"MIT"
] | 4 | 2016-04-24T14:09:48.000Z | 2019-11-23T14:50:46.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import argparse
from subprocess import call
from .vk_music import VkMusic
from .exceptions import AlreadyRunningError
from .defaults import SafeFsStorage
def main():
parser = argparse.ArgumentParser()
parser.add_argumen... | 39.846154 | 116 | 0.622008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 896 | 0.345946 |
e962ef78829cd251169298d5da18fd8a33cb94ba | 950 | py | Python | misc/convert.py | Fusion-Goettingen/ExtendedTargetTrackingToolbox | 945ede661e9258a8f1ca8abc00e25727fedf3ac7 | [
"MIT"
] | 40 | 2018-07-30T13:07:23.000Z | 2021-08-30T05:53:29.000Z | misc/convert.py | GitRooky/ExtendedTargetTrackingToolbox | 945ede661e9258a8f1ca8abc00e25727fedf3ac7 | [
"MIT"
] | null | null | null | misc/convert.py | GitRooky/ExtendedTargetTrackingToolbox | 945ede661e9258a8f1ca8abc00e25727fedf3ac7 | [
"MIT"
] | 21 | 2018-10-03T11:50:00.000Z | 2022-01-11T06:41:24.000Z | __author__ = "Jens Honer"
__copyright__ = "Copyright 2018, Jens Honer Tracking Toolbox"
__email__ = "-"
__license__ = "mit"
__version__ = "1.0"
__status__ = "Prototype"
import numpy as np
_bbox_sign_factors = np.asarray(
[
[1.0, 1.0],
[0.0, 1.0],
[-1.0, 1.0],
[... | 27.142857 | 93 | 0.548421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.14 |
e96535fbd6c7f8ed1b7186f2611a4c30b772e4ba | 866 | py | Python | tbx/settings/dev.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 103 | 2015-02-24T17:58:21.000Z | 2022-03-23T08:08:58.000Z | tbx/settings/dev.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 145 | 2015-01-13T17:13:43.000Z | 2022-03-29T12:56:20.000Z | tbx/settings/dev.py | elviva404/wagtail-torchbox | 718d9e2c4337073f010296932d369c726a01dbd3 | [
"MIT"
] | 57 | 2015-01-03T12:00:37.000Z | 2022-02-09T13:11:30.000Z | from .base import * # noqa
DEBUG = True
SECURE_SSL_REDIRECT = False
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "CHANGEME!!!"
# Enable FE component library
PATTERN_LIBRARY_ENABLED = True
INTERNAL_IPS = ("127.0.0.1", "10.0.2.2")
BASE_URL = "http://localhost:8000"
# URL to dire... | 23.405405 | 66 | 0.742494 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 522 | 0.602771 |
e965d671abefc6771ef8f31d4904d2ca170eeb5c | 84 | py | Python | EKF/swig/python/test.py | fx815/EKF | ac33a6500d6cedd441758cae2f9aa7192f0f2a87 | [
"BSD-3-Clause"
] | 38 | 2017-09-03T18:27:48.000Z | 2022-01-25T04:56:57.000Z | EKF/swig/python/test.py | fx815/EKF | ac33a6500d6cedd441758cae2f9aa7192f0f2a87 | [
"BSD-3-Clause"
] | 1 | 2020-08-24T03:28:49.000Z | 2020-08-24T03:28:49.000Z | EKF/swig/python/test.py | fx815/EKF | ac33a6500d6cedd441758cae2f9aa7192f0f2a87 | [
"BSD-3-Clause"
] | 10 | 2018-05-11T18:57:27.000Z | 2022-03-10T02:53:54.000Z | import swig_example
swig_example.swig_example_hello()
swig_example.link_liba_hello() | 28 | 33 | 0.892857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e9667bd424694f5af16378d0dfcd7bc9fa58a7a6 | 3,356 | py | Python | src/base/local_dataset.py | wenyushi451/Deep-SAD-PyTorch | 168d31f538a50fb029739206994ea5517d907853 | [
"MIT"
] | null | null | null | src/base/local_dataset.py | wenyushi451/Deep-SAD-PyTorch | 168d31f538a50fb029739206994ea5517d907853 | [
"MIT"
] | null | null | null | src/base/local_dataset.py | wenyushi451/Deep-SAD-PyTorch | 168d31f538a50fb029739206994ea5517d907853 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
from torchvision.transforms import transforms
from sklearn.model_selection import train_test_split
import os
import glob
import torch
import numpy as np
from PIL import Image
import pdb
class LocalDataset(Dataset):
def __init__(
self,
root: str,
datase... | 35.326316 | 111 | 0.56615 | 3,129 | 0.93236 | 0 | 0 | 0 | 0 | 0 | 0 | 591 | 0.176103 |
e9676f23c227a8e3dbd2af8223b0d6f349a5e56a | 408 | py | Python | envdsys/envdaq/migrations/0009_auto_20210415_2246.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | 1 | 2021-11-06T19:22:53.000Z | 2021-11-06T19:22:53.000Z | envdsys/envdaq/migrations/0009_auto_20210415_2246.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | 25 | 2019-06-18T20:40:36.000Z | 2021-07-23T20:56:48.000Z | envdsys/envdaq/migrations/0009_auto_20210415_2246.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | null | null | null | # Generated by Django 3.1.7 on 2021-04-15 22:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('envdaq', '0008_interface'),
]
operations = [
migrations.AlterField(
model_name='interface',
name='config',
... | 21.473684 | 79 | 0.607843 | 315 | 0.772059 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.257353 |
e9681f3574652f7f41d0d0d5c77f92d6ff04b1eb | 2,020 | py | Python | works/migrations/0001_initial.py | wildcodear/wildcode_project | 95d396ad3acbed08f607f618d6ada9d04b351bd8 | [
"MIT"
] | null | null | null | works/migrations/0001_initial.py | wildcodear/wildcode_project | 95d396ad3acbed08f607f618d6ada9d04b351bd8 | [
"MIT"
] | null | null | null | works/migrations/0001_initial.py | wildcodear/wildcode_project | 95d396ad3acbed08f607f618d6ada9d04b351bd8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('documents', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Client',
fields=[
... | 40.4 | 114 | 0.550495 | 1,911 | 0.94604 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.136139 |
e96a119d9fa6a43015c4274d98d22fcf31a25276 | 3,181 | py | Python | 2020/python/template.py | tadhg-ohiggins/advent-of-code | d0f113955940e69cbe0953607f62862f8a8bb830 | [
"CC0-1.0"
] | 1 | 2021-12-04T18:09:44.000Z | 2021-12-04T18:09:44.000Z | 2020/python/template.py | tadhg-ohiggins/advent-of-code | d0f113955940e69cbe0953607f62862f8a8bb830 | [
"CC0-1.0"
] | null | null | null | 2020/python/template.py | tadhg-ohiggins/advent-of-code | d0f113955940e69cbe0953607f62862f8a8bb830 | [
"CC0-1.0"
] | null | null | null | from tutils import pdb
from tutils import subprocess
from tutils import Counter
from tutils import partial
from tutils import reduce
from tutils import wraps
from tutils import count
from tutils import groupby
from tutils import product
from tutils import prod
from tutils import itemgetter
from tutils import Path
from ... | 25.653226 | 77 | 0.786231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.034266 |
e96a9a36758616e89fb2f6e13a5fba67dd556005 | 323 | py | Python | setup.py | alkaupp/weather | 0aab40b26064ae8ebc4b0868da828a07a4c39631 | [
"MIT"
] | null | null | null | setup.py | alkaupp/weather | 0aab40b26064ae8ebc4b0868da828a07a4c39631 | [
"MIT"
] | null | null | null | setup.py | alkaupp/weather | 0aab40b26064ae8ebc4b0868da828a07a4c39631 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='weather',
version='0.1',
description='CLI frontend for querying weather',
packages=['weather'],
entry_points={
'console_scripts': ['weather = weather.__main__:main']
},
author='Aleksi Kauppila',
author_email='aleksi.kauppila@gmail.com'
)... | 20.1875 | 62 | 0.656347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.470588 |
e96abeb27deaf4502ac786cdfa144e452aa4f116 | 271 | py | Python | mordor_magic/mordor_app/admin.py | Far4Ru/mordor-magic-2 | 7082ae8cc0b12154f74f4f58f9cad8f0325a8f57 | [
"MIT"
] | null | null | null | mordor_magic/mordor_app/admin.py | Far4Ru/mordor-magic-2 | 7082ae8cc0b12154f74f4f58f9cad8f0325a8f57 | [
"MIT"
] | null | null | null | mordor_magic/mordor_app/admin.py | Far4Ru/mordor-magic-2 | 7082ae8cc0b12154f74f4f58f9cad8f0325a8f57 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .models import *
admin.site.register(CharacterEvent)
admin.site.register(Event)
admin.site.register(CharacterOwner)
admin.site.register(Character)
admin.site.register(User, UserAdmin)
| 27.1 | 47 | 0.830258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e96b4f43c95a1b4ce5857c21e88b3785232408aa | 9,142 | py | Python | main.py | Lmy0217/Flight | faf5045712c4d28e0ca3df408308a5e3b9bf8038 | [
"MIT"
] | 2 | 2019-03-31T01:42:29.000Z | 2019-05-16T06:31:50.000Z | main.py | Lmy0217/Flight | faf5045712c4d28e0ca3df408308a5e3b9bf8038 | [
"MIT"
] | 1 | 2019-03-31T01:45:25.000Z | 2019-04-17T05:46:35.000Z | main.py | Lmy0217/Flight | faf5045712c4d28e0ca3df408308a5e3b9bf8038 | [
"MIT"
] | 1 | 2019-03-31T01:42:34.000Z | 2019-03-31T01:42:34.000Z | #coding=utf-8
import tkinter as tk
from tkinter import ttk
from tkinter import scrolledtext
from tkinter import messagebox as mBox
from tkinter import filedialog
import matplotlib
matplotlib.use('TkAgg')
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import matplotlib.pyplot as plt
import datetime
i... | 27.371257 | 161 | 0.669438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,029 | 0.20599 |
e96b8708dc8be78814c697d042595105e2d873c2 | 80 | py | Python | Getting_Started_With_Raspberry_Pi_Pico/variable/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 665 | 2017-09-27T21:20:14.000Z | 2022-03-31T09:09:25.000Z | Getting_Started_With_Raspberry_Pi_Pico/variable/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 641 | 2017-10-03T19:46:37.000Z | 2022-03-30T18:28:46.000Z | Getting_Started_With_Raspberry_Pi_Pico/variable/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 734 | 2017-10-02T22:47:38.000Z | 2022-03-30T14:03:51.000Z | """Example of assigning a variable."""
user_name = input("What is your name? ")
| 26.666667 | 40 | 0.6875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.7375 |
e96d84302227c0aff1faeef0969afac44cd9a679 | 228 | py | Python | sitator/visualization/__init__.py | lekah/sitator | 0f9c84989758eb7b76be8104a94a8d6decd27b55 | [
"MIT"
] | 8 | 2018-10-05T18:02:24.000Z | 2021-02-22T20:24:58.000Z | sitator/visualization/__init__.py | lekah/sitator | 0f9c84989758eb7b76be8104a94a8d6decd27b55 | [
"MIT"
] | 6 | 2019-02-21T04:33:01.000Z | 2021-01-06T20:05:25.000Z | sitator/visualization/__init__.py | lekah/sitator | 0f9c84989758eb7b76be8104a94a8d6decd27b55 | [
"MIT"
] | 6 | 2018-08-11T21:43:59.000Z | 2021-12-21T06:32:12.000Z | from .common import layers, grid, plotter, DEFAULT_COLORS, set_axes_equal
from .atoms import plot_atoms, plot_points
from .SiteNetworkPlotter import SiteNetworkPlotter
from .SiteTrajectoryPlotter import SiteTrajectoryPlotter
| 28.5 | 73 | 0.855263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e96dd4f2640b513649fb3793b8d1056d51d5824e | 1,525 | py | Python | src/futebol_wss_agent/lib/verification.py | nerds-ufes/futebol-optical-agent | 405117b152ce96f09770ff5ca646bd18a72ee2fa | [
"Apache-2.0"
] | null | null | null | src/futebol_wss_agent/lib/verification.py | nerds-ufes/futebol-optical-agent | 405117b152ce96f09770ff5ca646bd18a72ee2fa | [
"Apache-2.0"
] | null | null | null | src/futebol_wss_agent/lib/verification.py | nerds-ufes/futebol-optical-agent | 405117b152ce96f09770ff5ca646bd18a72ee2fa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2017-2022 Anderson Bravalheri, Univertity of Bristol
# High Performance Networks Group
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# Yo... | 34.659091 | 74 | 0.727213 | 781 | 0.512131 | 0 | 0 | 0 | 0 | 0 | 0 | 1,079 | 0.707541 |
e96debb65a28b71e00c0a2a49cd0ca34ceacdd69 | 449 | py | Python | api/compat.py | fancystats/api | 298ae6d71fa37f649bbd61ad000767242f49a698 | [
"MIT"
] | 1 | 2015-03-20T20:35:22.000Z | 2015-03-20T20:35:22.000Z | api/compat.py | fancystats/api | 298ae6d71fa37f649bbd61ad000767242f49a698 | [
"MIT"
] | null | null | null | api/compat.py | fancystats/api | 298ae6d71fa37f649bbd61ad000767242f49a698 | [
"MIT"
] | null | null | null | """
Python 2/3 Compatibility
========================
Not sure we need to support anything but Python 2.7 at this point , but copied
this module over from flask-peewee for the time being.
"""
import sys
PY2 = sys.version_info[0] == 2
if PY2:
text_type = unicode
string_types = (str, unicode)
unichr = u... | 17.96 | 78 | 0.639198 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.432071 |
e96f7f5812e754a8c8dec16943815bc6604a8f49 | 216 | py | Python | rxkcd/models.py | aeternalis1/Relevant-XKCD | a9145974453b94ecf77a587b83bd69d974f14380 | [
"MIT"
] | null | null | null | rxkcd/models.py | aeternalis1/Relevant-XKCD | a9145974453b94ecf77a587b83bd69d974f14380 | [
"MIT"
] | null | null | null | rxkcd/models.py | aeternalis1/Relevant-XKCD | a9145974453b94ecf77a587b83bd69d974f14380 | [
"MIT"
] | null | null | null | class Comic:
def __init__(self, comic_num):
self.id = comic_num
self.title = ""
self.title_text = ""
self.transcript = ""
self.explanation = ""
self.img_url = ""
self.og_title = ""
self.og_ttext = "" | 21.6 | 31 | 0.62963 | 216 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.064815 |
e96ffd9e458abb20cec71135158a8cf1ce09e9d1 | 888 | py | Python | ElevatorBot/commands/funStuff/ticTacToe/vsAI.py | LukasSchmid97/destinyBloodoakStats | 1420802ce01c3435ad5c283f44eb4531d9b22c38 | [
"MIT"
] | 3 | 2019-10-19T11:24:50.000Z | 2021-01-29T12:02:17.000Z | ElevatorBot/commands/funStuff/ticTacToe/vsAI.py | LukasSchmid97/destinyBloodoakStats | 1420802ce01c3435ad5c283f44eb4531d9b22c38 | [
"MIT"
] | 29 | 2019-10-14T12:26:10.000Z | 2021-07-28T20:50:29.000Z | ElevatorBot/commands/funStuff/ticTacToe/vsAI.py | LukasSchmid97/destinyBloodoakStats | 1420802ce01c3435ad5c283f44eb4531d9b22c38 | [
"MIT"
] | 2 | 2019-10-13T17:11:09.000Z | 2020-05-13T15:29:04.000Z | # from discord.ext.commands import Cog
# from discord_slash import SlashContext, cog_ext
# from discord_slash.utils.manage_commands import create_option
#
#
# class TicTacToeAI(Cog):
# def __init__(self, client):
# self.client = client
#
# @cog_ext.cog_subcommand(
# base="tictactoe",
# b... | 29.6 | 89 | 0.581081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 859 | 0.967342 |
e97022aba46b50c4fc79f34b4e0641ec360d25a6 | 3,254 | bzl | Python | infra-sk/karma_test/index.bzl | bodymovin/skia-buildbot | 1570e4e48ecb330750264d4ae6a875b5e49a37fe | [
"BSD-3-Clause"
] | null | null | null | infra-sk/karma_test/index.bzl | bodymovin/skia-buildbot | 1570e4e48ecb330750264d4ae6a875b5e49a37fe | [
"BSD-3-Clause"
] | null | null | null | infra-sk/karma_test/index.bzl | bodymovin/skia-buildbot | 1570e4e48ecb330750264d4ae6a875b5e49a37fe | [
"BSD-3-Clause"
] | null | null | null | """This module defines the karma_test rule."""
load("@infra-sk_npm//@bazel/typescript:index.bzl", "ts_library")
load("@infra-sk_npm//@bazel/rollup:index.bzl", "rollup_bundle")
load("@infra-sk_npm//karma:index.bzl", _generated_karma_test = "karma_test")
def karma_test(name, srcs, deps, entry_point = None):
"""Runs... | 36.977273 | 100 | 0.609711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,208 | 0.678549 |
e970a8957b84490bbe0b79a62e25d6fddc55f490 | 5,894 | py | Python | stats/ClassicAnalyzerStats.py | arndff/fpl-rivals-tracker | 311b932ab7c07b03c1676e5a971df13e652a1b7b | [
"Apache-2.0"
] | 4 | 2019-02-06T10:42:50.000Z | 2021-02-17T21:09:26.000Z | stats/ClassicAnalyzerStats.py | arndff/fpl-rivals-tracker | 311b932ab7c07b03c1676e5a971df13e652a1b7b | [
"Apache-2.0"
] | null | null | null | stats/ClassicAnalyzerStats.py | arndff/fpl-rivals-tracker | 311b932ab7c07b03c1676e5a971df13e652a1b7b | [
"Apache-2.0"
] | 1 | 2021-02-17T21:09:27.000Z | 2021-02-17T21:09:27.000Z | from fileutils.fileutils import save_output_to_file, select_option_from_menu
class ClassicAnalyzerStats:
def __init__(self, data, current_event, output_file_name):
self.__data = data
self.__current_event = current_event
self.__output_file_name = output_file_name
self.__output = []... | 33.68 | 120 | 0.588904 | 5,814 | 0.986427 | 0 | 0 | 164 | 0.027825 | 0 | 0 | 601 | 0.101968 |
e971243f262537809157c1b4baa49f7bcb8914f9 | 88 | py | Python | xallennlp/training/__init__.py | himkt/xallennlp | 073a1475398e59c70230623016f4036432b9c186 | [
"MIT"
] | null | null | null | xallennlp/training/__init__.py | himkt/xallennlp | 073a1475398e59c70230623016f4036432b9c186 | [
"MIT"
] | null | null | null | xallennlp/training/__init__.py | himkt/xallennlp | 073a1475398e59c70230623016f4036432b9c186 | [
"MIT"
] | null | null | null | import xallennlp.training.mlflow_callback
import xallennlp.training.mlflow_checkpointer
| 29.333333 | 45 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e972ad4a4720505a28ff8ccfa9d6a0290e94f706 | 11,599 | py | Python | colabutil.py | cmcheungMOOC/colabUtil | c08da88ae56d461404960de3426344e7da49f3db | [
"MIT"
] | 1 | 2018-08-07T05:34:11.000Z | 2018-08-07T05:34:11.000Z | colabutil.py | cmcheungMOOC/colabUtil | c08da88ae56d461404960de3426344e7da49f3db | [
"MIT"
] | null | null | null | colabutil.py | cmcheungMOOC/colabUtil | c08da88ae56d461404960de3426344e7da49f3db | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""colabUtil.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1KX9x-rqyj0XfUkLtfOVh8t8T_kW0hs0u
#Colab Util
This is a collection of utility functions that simplifies data science researchin using colab. I wrote this while ... | 30.049223 | 512 | 0.691698 | 234 | 0.020174 | 0 | 0 | 0 | 0 | 0 | 0 | 6,024 | 0.519355 |
e9736a918f48d6f382688f91eb8391428a99f968 | 2,893 | py | Python | sarpy/io/product/base.py | spacefan/sarpy | 2791af86b568c8a8560275aee426a4718d5a4606 | [
"MIT"
] | 119 | 2018-07-12T22:08:17.000Z | 2022-03-24T12:11:39.000Z | sarpy/io/product/base.py | spacefan/sarpy | 2791af86b568c8a8560275aee426a4718d5a4606 | [
"MIT"
] | 72 | 2018-03-29T15:57:37.000Z | 2022-03-10T01:46:21.000Z | sarpy/io/product/base.py | spacefan/sarpy | 2791af86b568c8a8560275aee426a4718d5a4606 | [
"MIT"
] | 54 | 2018-03-27T19:57:20.000Z | 2022-03-09T20:53:11.000Z | """
Base common features for product readers
"""
__classification__ = "UNCLASSIFIED"
__author__ = "Thomas McCullough"
from typing import Sequence, List, Tuple, Union
from sarpy.io.general.base import AbstractReader
from sarpy.io.product.sidd1_elements.SIDD import SIDDType as SIDDType1
from sarpy.io.product.sidd2_el... | 31.445652 | 98 | 0.59281 | 2,472 | 0.854476 | 0 | 0 | 483 | 0.166955 | 0 | 0 | 1,108 | 0.382993 |
e9782a8f7459b65fce4ad645e6b56ab9d0f6103d | 2,144 | py | Python | gladier/base.py | globus-labs/gladier_tools | 0dc4a23af81a2355a908b9a9026f0e68a527c6dc | [
"Apache-2.0"
] | 1 | 2020-08-25T20:20:18.000Z | 2020-08-25T20:20:18.000Z | gladier/base.py | globus-labs/gladier_tools | 0dc4a23af81a2355a908b9a9026f0e68a527c6dc | [
"Apache-2.0"
] | null | null | null | gladier/base.py | globus-labs/gladier_tools | 0dc4a23af81a2355a908b9a9026f0e68a527c6dc | [
"Apache-2.0"
] | null | null | null |
class GladierBaseTool(object):
"""Gladier Defaults defines a common method of tying together
flows, funcx-functions, and default inputs for starting a flow."""
flow_definition = None
flow_input = dict()
required_input = []
alias_exempt = ['funcx_endpoint_compute', 'funcx_endpoint_non_compute'... | 37.614035 | 97 | 0.615672 | 2,141 | 0.998601 | 0 | 0 | 0 | 0 | 0 | 0 | 326 | 0.152052 |
e97c7053b712437ddd9adb3801c6bf654177920e | 2,717 | py | Python | PersonManage/role/views.py | ahriknow/ahriknow | 817b5670c964e01ffe19ed182ce0a7b42e17ce09 | [
"MIT"
] | null | null | null | PersonManage/role/views.py | ahriknow/ahriknow | 817b5670c964e01ffe19ed182ce0a7b42e17ce09 | [
"MIT"
] | 3 | 2021-03-19T01:28:43.000Z | 2021-04-08T19:57:19.000Z | PersonManage/role/views.py | ahriknow/ahriknow | 817b5670c964e01ffe19ed182ce0a7b42e17ce09 | [
"MIT"
] | null | null | null | from django.conf import settings
from redis import StrictRedis
from rest_framework.response import Response
from rest_framework.views import APIView
from PersonManage.role.models import Role
from PersonManage.role.serializer import OneRole, ManyRole
from PersonManage.jurisdiction.models import Jurisdiction
class Role... | 46.844828 | 92 | 0.560177 | 2,406 | 0.885536 | 0 | 0 | 0 | 0 | 0 | 0 | 479 | 0.176297 |
e97d491587ef3bda7620cb34a61d716763821b01 | 5,288 | py | Python | datalad_osf/utils.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | null | null | null | datalad_osf/utils.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | null | null | null | datalad_osf/utils.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See LICENSE file distributed along with the datalad_osf package for the
# copyright and license terms.
#
# ## ##... | 31.664671 | 87 | 0.580182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,776 | 0.524962 |
e97dc3bd342d59f1490983b6c64ea74961cdd4e4 | 1,487 | py | Python | tpDcc/libs/qt/core/observable.py | tpDcc/tpQtLib | 26b6e893395633a1b189a1b73654891b7688648d | [
"MIT"
] | 3 | 2019-08-26T05:56:12.000Z | 2019-10-03T11:35:53.000Z | tpDcc/libs/qt/core/observable.py | tpDcc/tpQtLib | 26b6e893395633a1b189a1b73654891b7688648d | [
"MIT"
] | null | null | null | tpDcc/libs/qt/core/observable.py | tpDcc/tpQtLib | 26b6e893395633a1b189a1b73654891b7688648d | [
"MIT"
] | 1 | 2021-03-03T21:01:50.000Z | 2021-03-03T21:01:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains Qt observer pattern related functions and classes
"""
from __future__ import print_function, division, absolute_import
from uuid import uuid4
from functools import partial
from Qt.QtCore import Signal, QObject
class ObservableProxy(QObject):
... | 31.638298 | 119 | 0.462677 | 1,199 | 0.806321 | 0 | 0 | 0 | 0 | 0 | 0 | 699 | 0.470074 |
e98066a2b0d3ed3bbd8dc11131cf9f11efdf134a | 3,645 | py | Python | advent-of-code-2019/day 12/main.py | gikf/advent-of-code | 923b026ce87121b73093554734746c2ecb17c5e2 | [
"MIT"
] | null | null | null | advent-of-code-2019/day 12/main.py | gikf/advent-of-code | 923b026ce87121b73093554734746c2ecb17c5e2 | [
"MIT"
] | null | null | null | advent-of-code-2019/day 12/main.py | gikf/advent-of-code | 923b026ce87121b73093554734746c2ecb17c5e2 | [
"MIT"
] | null | null | null | """Advent of Code 2019 Day 12."""
from functools import lru_cache
import re
def main(file_input='input.txt'):
lines = [line.strip() for line in get_file_contents(file_input)]
moons = parse_moons(lines)
after_steps = simulate_steps(moons, 1000)
total_energy = find_total_energy(after_steps)
print(f'... | 27.201493 | 74 | 0.608505 | 0 | 0 | 0 | 0 | 213 | 0.058436 | 0 | 0 | 828 | 0.22716 |
e980cd0e0ae302b2d5e582e27e0280d700f45285 | 1,909 | py | Python | rest_framework_json_api/utils.py | jwhitlock/drf-json-api | a62802432c612c34079f3c3694129f37778e2577 | [
"MIT"
] | null | null | null | rest_framework_json_api/utils.py | jwhitlock/drf-json-api | a62802432c612c34079f3c3694129f37778e2577 | [
"MIT"
] | null | null | null | rest_framework_json_api/utils.py | jwhitlock/drf-json-api | a62802432c612c34079f3c3694129f37778e2577 | [
"MIT"
] | null | null | null | from django.utils.encoding import force_text
from django.utils.text import slugify
try:
from rest_framework.serializers import ManyRelatedField
except ImportError:
ManyRelatedField = type(None)
try:
from rest_framework.serializers import ListSerializer
except ImportError:
ListSerializer = type(None)
... | 20.526882 | 71 | 0.671032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 550 | 0.288109 |
e982548723b8fb19b5a93e5e600f9ad6d5133e1c | 2,246 | py | Python | Ui_ZhkuMainWindow.py | yujiecong/PyQt-Zhku-Client | 8fa35592cbf8af7efe8d55d4f66625cd4918a3ff | [
"MIT"
] | null | null | null | Ui_ZhkuMainWindow.py | yujiecong/PyQt-Zhku-Client | 8fa35592cbf8af7efe8d55d4f66625cd4918a3ff | [
"MIT"
] | null | null | null | Ui_ZhkuMainWindow.py | yujiecong/PyQt-Zhku-Client | 8fa35592cbf8af7efe8d55d4f66625cd4918a3ff | [
"MIT"
] | 1 | 2021-09-14T03:28:16.000Z | 2021-09-14T03:28:16.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Ui_ZhkuMainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import Qt... | 44.92 | 81 | 0.740427 | 1,883 | 0.838379 | 0 | 0 | 0 | 0 | 0 | 0 | 525 | 0.233749 |
e9869e465ad91d2e5ca0674a3741999310e41b5c | 95 | py | Python | calheatmap/apps.py | acdh-oeaw/gtrans | 6f56b1d09de0cad503273bf8a01cd81e25220524 | [
"MIT"
] | 1 | 2020-03-15T16:14:02.000Z | 2020-03-15T16:14:02.000Z | calheatmap/apps.py | acdh-oeaw/gtrans | 6f56b1d09de0cad503273bf8a01cd81e25220524 | [
"MIT"
] | 14 | 2018-11-09T08:34:23.000Z | 2022-02-10T08:15:53.000Z | calheatmap/apps.py | acdh-oeaw/gtrans | 6f56b1d09de0cad503273bf8a01cd81e25220524 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CalheatmapConfig(AppConfig):
name = 'calheatmap'
| 15.833333 | 34 | 0.768421 | 58 | 0.610526 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.126316 |
e987a8021b1287256296f2282748c6e9f81dfd63 | 767 | py | Python | ntcir15_tools/eval/__init__.py | longpham28/ntcir15_tools | d5fd138a3c90dfd2c5a67ea908101fed5563484d | [
"MIT"
] | null | null | null | ntcir15_tools/eval/__init__.py | longpham28/ntcir15_tools | d5fd138a3c90dfd2c5a67ea908101fed5563484d | [
"MIT"
] | null | null | null | ntcir15_tools/eval/__init__.py | longpham28/ntcir15_tools | d5fd138a3c90dfd2c5a67ea908101fed5563484d | [
"MIT"
] | null | null | null | import numpy as np
from pyNTCIREVAL import Labeler
from pyNTCIREVAL.metrics import MSnDCG
from collections import defaultdict
from ntcir15_tools.data import en_query_ids, ja_query_ids, en_labels, ja_labels
def get_rel_level(text):
if text == "L0":
return 0
if text == "L1":
return 1
if text... | 24.741935 | 85 | 0.647979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.049544 |
e987c807f21477bc86678b22246d01c6112ae5c0 | 50 | py | Python | classification/cifar10/losses/__init__.py | AkibMashrur/Ensembling | bdf2f601be90070fed10db62a9c15506e1df37b6 | [
"Apache-2.0"
] | null | null | null | classification/cifar10/losses/__init__.py | AkibMashrur/Ensembling | bdf2f601be90070fed10db62a9c15506e1df37b6 | [
"Apache-2.0"
] | null | null | null | classification/cifar10/losses/__init__.py | AkibMashrur/Ensembling | bdf2f601be90070fed10db62a9c15506e1df37b6 | [
"Apache-2.0"
] | null | null | null | from .contrastive import SupConLoss, NoiseConLoss
| 25 | 49 | 0.86 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e988aca86693a630d0af6b4768506c2e555391e5 | 71 | py | Python | Atividade do Livro-Nilo Ney(PYTHON)/Cap.03/exe 3.13.py | EduardoJonathan0/Python | 0e4dff4703515a6454ba25c6f401960b6155f32f | [
"MIT"
] | null | null | null | Atividade do Livro-Nilo Ney(PYTHON)/Cap.03/exe 3.13.py | EduardoJonathan0/Python | 0e4dff4703515a6454ba25c6f401960b6155f32f | [
"MIT"
] | null | null | null | Atividade do Livro-Nilo Ney(PYTHON)/Cap.03/exe 3.13.py | EduardoJonathan0/Python | 0e4dff4703515a6454ba25c6f401960b6155f32f | [
"MIT"
] | null | null | null | C = int(input("Insira um valor: "))
Fire = (9 * C / 5) + 32
print(Fire) | 23.666667 | 35 | 0.56338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.267606 |
e9895372814e45f43f516d5ef779aac132b10fc9 | 2,145 | py | Python | notebooks/Detecting Covid-19 through Transfer Learning/src/test.py | supria68/Data-Science-Projects | 423695c130a92db1a188b3d3a13871f0f76f6f5b | [
"MIT"
] | 2 | 2020-09-16T19:37:30.000Z | 2021-11-01T17:49:36.000Z | notebooks/Detecting Covid-19 through Transfer Learning/src/test.py | supria68/Data-Science-Projects | 423695c130a92db1a188b3d3a13871f0f76f6f5b | [
"MIT"
] | null | null | null | notebooks/Detecting Covid-19 through Transfer Learning/src/test.py | supria68/Data-Science-Projects | 423695c130a92db1a188b3d3a13871f0f76f6f5b | [
"MIT"
] | 1 | 2021-11-01T17:49:37.000Z | 2021-11-01T17:49:37.000Z | """
filename: test.py
author: Supriya Sudarshan
version: 19.04.2021
description: Takes in the images and predicts (Covid or Non-Covid/Normal) using the *.h5 models
"""
import numpy as np
import matplotlib.pyplot as plt
import os
from tensorflow.keras.models import load_model
from tensorflow.keras.preprocessing impor... | 32.014925 | 97 | 0.674592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 757 | 0.352914 |
e98a1dc0d5d9161eac10445f95ac9ce1dbe57950 | 348 | py | Python | projecteuler/problems/problem_41.py | hjheath/ProjectEuler | 6961fe81e2039c281ea9d4ab0bdd85611bf256a8 | [
"MIT"
] | 1 | 2015-04-25T10:37:52.000Z | 2015-04-25T10:37:52.000Z | projecteuler/problems/problem_41.py | hjheath/ProjectEuler | 6961fe81e2039c281ea9d4ab0bdd85611bf256a8 | [
"MIT"
] | null | null | null | projecteuler/problems/problem_41.py | hjheath/ProjectEuler | 6961fe81e2039c281ea9d4ab0bdd85611bf256a8 | [
"MIT"
] | null | null | null | """Problem 41 of https://projecteuler.net"""
from itertools import permutations
from projecteuler.inspectors import is_prime
def problem_41():
"""Solution to problem 41."""
# All 8 and 9 digit pandigitals are divisible by 3.
perms = [int(''.join(x)) for x in permutations('1234567')]
return max(x for... | 26.769231 | 62 | 0.698276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.387931 |
e98cb6485313bf23d0ef3116dfc0e309cd633aad | 3,064 | py | Python | preprocess/utils.py | federicozaiter/LogClass | 62c1c9c61294625bdb3d99dc01b6adc7b735c4ab | [
"MIT"
] | 159 | 2020-02-19T00:19:23.000Z | 2022-03-30T08:40:08.000Z | preprocess/utils.py | WeibinMeng/LogClass-1 | 8edbaf4377374e2aac5e7057987e1d047b83ff2f | [
"MIT"
] | 3 | 2021-06-09T04:30:35.000Z | 2022-01-09T23:26:07.000Z | preprocess/utils.py | WeibinMeng/LogClass-1 | 8edbaf4377374e2aac5e7057987e1d047b83ff2f | [
"MIT"
] | 41 | 2020-02-19T00:19:26.000Z | 2022-03-28T08:02:22.000Z | import re
import numpy as np
from tqdm import tqdm
from ..decorators import print_step
from multiprocessing import Pool
# Compiling for optimization
re_sub_1 = re.compile(r"(:(?=\s))|((?<=\s):)")
re_sub_2 = re.compile(r"(\d+\.)+\d+")
re_sub_3 = re.compile(r"\d{2}:\d{2}:\d{2}")
re_sub_4 = re.compile(r"Mar|Apr|Dec|Jan|... | 35.627907 | 77 | 0.568864 | 0 | 0 | 0 | 0 | 1,545 | 0.504243 | 0 | 0 | 674 | 0.219974 |
e98ead08452c6bd2e01e97b70008a25d1afdf8fe | 4,494 | py | Python | examples/FasterRCNN/dataset/data_configs_dict.py | ruodingt/tensorpack | 026006457f3ecdedf23d1bb57c8610591d936b3e | [
"Apache-2.0"
] | null | null | null | examples/FasterRCNN/dataset/data_configs_dict.py | ruodingt/tensorpack | 026006457f3ecdedf23d1bb57c8610591d936b3e | [
"Apache-2.0"
] | null | null | null | examples/FasterRCNN/dataset/data_configs_dict.py | ruodingt/tensorpack | 026006457f3ecdedf23d1bb57c8610591d936b3e | [
"Apache-2.0"
] | null | null | null | import os
from dataset.data_config import DataConfig
images_data_base_dir = os.path.abspath('../../../data/datasets_coco/')
data_conf = {
DataConfig.IMAGE_BASEDIR: images_data_base_dir,
DataConfig.TRAIN: [
{
DataConfig.NICKNAME: 'decay_train',
DataConfig.AN... | 36.536585 | 99 | 0.459947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,104 | 0.245661 |
e98ee77c65cf6881d1b3b3557c92ca630d8803bb | 2,905 | py | Python | beaconsite/tests/test_permissions.py | brand-fabian/varfish-server | 6a084d891d676ff29355e72a29d4f7b207220283 | [
"MIT"
] | 14 | 2019-09-30T12:44:17.000Z | 2022-02-04T14:45:16.000Z | beaconsite/tests/test_permissions.py | brand-fabian/varfish-server | 6a084d891d676ff29355e72a29d4f7b207220283 | [
"MIT"
] | 244 | 2021-03-26T15:13:15.000Z | 2022-03-31T15:48:04.000Z | beaconsite/tests/test_permissions.py | brand-fabian/varfish-server | 6a084d891d676ff29355e72a29d4f7b207220283 | [
"MIT"
] | 8 | 2020-05-19T21:55:13.000Z | 2022-03-31T07:02:58.000Z | from django.urls import reverse
from projectroles.tests.test_permissions import TestProjectPermissionBase
from beaconsite.tests.factories import ConsortiumFactory, SiteFactory
class UsersMixin:
def setUp(self):
super().setUp()
self.consortium = ConsortiumFactory()
self.site = SiteFactory(... | 35.864198 | 98 | 0.664028 | 2,716 | 0.93494 | 0 | 0 | 0 | 0 | 0 | 0 | 284 | 0.097762 |
e98f3c0cbfe695e09cf6acaf634dcaef0d39ab20 | 965 | py | Python | backend/forms.py | adarshrao1/Flood_detection | 4a2a7ecef178366700d5c29a13d45143eaa7cc54 | [
"CC0-1.0"
] | null | null | null | backend/forms.py | adarshrao1/Flood_detection | 4a2a7ecef178366700d5c29a13d45143eaa7cc54 | [
"CC0-1.0"
] | null | null | null | backend/forms.py | adarshrao1/Flood_detection | 4a2a7ecef178366700d5c29a13d45143eaa7cc54 | [
"CC0-1.0"
] | 5 | 2021-06-05T14:11:04.000Z | 2021-06-19T05:51:56.000Z | from django.forms import ModelForm
from backend.models import Image, Image2
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django import forms
class CreateUserForm(UserCreationForm):
email = forms.EmailField(
widget=forms.TextInput(attrs={'class': '... | 26.081081 | 70 | 0.654922 | 756 | 0.78342 | 0 | 0 | 0 | 0 | 0 | 0 | 141 | 0.146114 |
e98f933a4b8c3a1b81125f679e51f0db2f252a76 | 22,851 | py | Python | uldaq-1.2.1/uldaq/ul_c_interface.py | Novellogiampiero/RapLib | 614d25abf402052dcaf81aa72044e3a03cb014fa | [
"Apache-2.0"
] | null | null | null | uldaq-1.2.1/uldaq/ul_c_interface.py | Novellogiampiero/RapLib | 614d25abf402052dcaf81aa72044e3a03cb014fa | [
"Apache-2.0"
] | null | null | null | uldaq-1.2.1/uldaq/ul_c_interface.py | Novellogiampiero/RapLib | 614d25abf402052dcaf81aa72044e3a03cb014fa | [
"Apache-2.0"
] | null | null | null | """
Created on Mar 7 2018
@author: MCC
"""
from ctypes import (CDLL, CFUNCTYPE, Structure, c_uint, c_int, c_longlong,
POINTER, c_double, c_char, py_object, c_ulonglong, cast,
c_char_p, c_byte)
from enum import IntEnum
from .ul_structs import DaqDeviceDescriptor, AiQueueElement, ... | 56.843284 | 136 | 0.733928 | 12,835 | 0.561682 | 0 | 0 | 0 | 0 | 0 | 0 | 9,479 | 0.414818 |
e991e9f5f0c1bdfb1e7229e0942eed1c870966c6 | 1,478 | py | Python | gfg/trees/sorted_ll_to_bst.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | 1 | 2019-04-18T03:29:02.000Z | 2019-04-18T03:29:02.000Z | gfg/trees/sorted_ll_to_bst.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | null | null | null | gfg/trees/sorted_ll_to_bst.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | null | null | null | """
Given a Singly Linked List which has data members sorted in ascending order.
Construct a Balanced Binary Search Tree which has same data members as the given Linked List.
"""
from typing import Optional
from binary_tree_node import Node # type: ignore
from tree_traversal import inorder # type: ignore
class LLN... | 23.460317 | 93 | 0.635995 | 116 | 0.078484 | 0 | 0 | 0 | 0 | 0 | 0 | 216 | 0.146143 |
e9920d3efc1f0f760192d2dad03a56edd3268c51 | 556 | py | Python | uvcoverage.py | haricash/bayesian-ionized-bubbles | c0de5d8ff66f797c72f119b1bc9b11ff8cc63ee6 | [
"MIT"
] | null | null | null | uvcoverage.py | haricash/bayesian-ionized-bubbles | c0de5d8ff66f797c72f119b1bc9b11ff8cc63ee6 | [
"MIT"
] | null | null | null | uvcoverage.py | haricash/bayesian-ionized-bubbles | c0de5d8ff66f797c72f119b1bc9b11ff8cc63ee6 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from modules.conversions import enu2uvw
data = np.load("uv-array.npy")
e = data[0,:].transpose()
n = data[1,:].transpose()
uvarray = []
for i in range(120):
u,v = enu2uvw( wavelength=1.690,
hour_angle=i/30,
declination=... | 23.166667 | 41 | 0.526978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.109712 |
e99213e148fd6d67da5c28d0d36014f1bdd56a29 | 6,540 | py | Python | main.py | Bishalsarang/Leetcode-Questions | 9d0c938778343c073b631884cc38411ea0ac7cd3 | [
"MIT"
] | 6 | 2021-09-17T12:26:59.000Z | 2022-03-11T00:37:35.000Z | main.py | Bishalsarang/Leetcode-Questions | 9d0c938778343c073b631884cc38411ea0ac7cd3 | [
"MIT"
] | null | null | null | main.py | Bishalsarang/Leetcode-Questions | 9d0c938778343c073b631884cc38411ea0ac7cd3 | [
"MIT"
] | null | null | null | # Author: Bishal Sarang
import json
import os
import pickle
import time
import bs4
import colorama
import requests
from colorama import Back, Fore
from ebooklib import epub
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
fro... | 40.875 | 376 | 0.657034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,503 | 0.382722 |
e992f77a4ff4f3363d1bcb7a821282c7065578b8 | 4,985 | py | Python | model/magenta_app.py | DesmondYuan/DeepMovement | b4f347f139d52c345b592bc712260fa579b6c9a8 | [
"MIT"
] | null | null | null | model/magenta_app.py | DesmondYuan/DeepMovement | b4f347f139d52c345b592bc712260fa579b6c9a8 | [
"MIT"
] | null | null | null | model/magenta_app.py | DesmondYuan/DeepMovement | b4f347f139d52c345b592bc712260fa579b6c9a8 | [
"MIT"
] | 1 | 2020-12-31T14:44:38.000Z | 2020-12-31T14:44:38.000Z | # Adapted from Magenta console commands
import os
from magenta.models.arbitrary_image_stylization import arbitrary_image_stylization_build_model as build_model
from magenta.models.image_stylization import image_utils
import numpy as np
import tensorflow.compat.v1 as tf
import tf_slim as slim
class Magenta_Model():
... | 39.88 | 109 | 0.664995 | 4,227 | 0.847944 | 0 | 0 | 0 | 0 | 0 | 0 | 530 | 0.106319 |